feat: add a lot of stuff
This commit is contained in:
parent
350aebc01d
commit
5505eec77d
28 changed files with 224 additions and 97 deletions
|
|
@ -1,19 +1,11 @@
|
|||
{ pkgs, unstable, ... }:
|
||||
{ unstable, ... }:
|
||||
let
|
||||
aliases = import ../../modules/aliases.nix;
|
||||
in
|
||||
{
|
||||
users.users.gandalf = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
speechd # https://support.mozilla.org/en-US/kb/speechd-setup
|
||||
gopass
|
||||
gopass-jsonapi
|
||||
gnome.nautilus
|
||||
gimp
|
||||
];
|
||||
extraGroups = [ "wheel" "networkmanager" "libvirtd" ];
|
||||
};
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
|
|
|||
|
|
@ -21,4 +21,3 @@ in
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
73
users/gandalf/modules/chromium.nix
Normal file
73
users/gandalf/modules/chromium.nix
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
|
||||
icons = {
|
||||
chromium = pkgs.fetchurl {
|
||||
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/2/28/Chromium_Logo.svg/240px-Chromium_Logo.svg.png";
|
||||
sha256 = "ff6383a5c08745100e1f8720397c3d6e1b30bc6d4a329cf44bbac16ec03948e7";
|
||||
meta.licenses = lib.licenses.publicDomain;
|
||||
};
|
||||
spotify = pkgs.fetchurl {
|
||||
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Spotify_icon.svg/232px-Spotify_icon.svg.png";
|
||||
sha256 = "0568b108bf4533e7382e0f3526e211308868d2d2aa35ab8f0cc7beb464e70d5f";
|
||||
meta.licenses = lib.licenses.publicDomain;
|
||||
};
|
||||
teams = pkgs.fetchurl {
|
||||
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Microsoft_Office_Teams_%282018%E2%80%93present%29.svg/258px-Microsoft_Office_Teams_%282018%E2%80%93present%29.svg.png";
|
||||
sha256 = "a7bf37b6132e45c3c3314e7ed3a465138caabe3d87535a8b82a84be6a5f70dac";
|
||||
meta.licenses = lib.licenses.publicDomain;
|
||||
};
|
||||
outlook = pkgs.fetchurl {
|
||||
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Microsoft_Office_Outlook_%282018%E2%80%93present%29.svg/258px-Microsoft_Office_Outlook_%282018%E2%80%93present%29.svg.png";
|
||||
sha256 = "565fff2ed6a3c4c98daf7a2b56aad386c2d076f4f5b88199785593eb380eb3d4";
|
||||
meta.licenses = lib.licenses.publicDomain;
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
extensions = [
|
||||
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # ublock origin
|
||||
{ id = "dbepggeogbaibhgnhhndojpepiihcmeb"; } # vimium
|
||||
];
|
||||
};
|
||||
|
||||
xdg.dataFile = {
|
||||
"applications/chromium-development.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Chromium (Development Modus)
|
||||
Exec=${pkgs.chromium}/bin/chromium --allow-file-access-from-files --disable-site-isolation-trials --allow-running-insecure-content --no-referrers --unlimited-storage --user-data-dir=${config.xdg.dataHome}/chromium-development/data --disable-web-security
|
||||
Terminal=false
|
||||
Icon=${icons.chromium}
|
||||
'';
|
||||
"applications/spotify.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Spotify
|
||||
Exec=${pkgs.chromium}/bin/chromium --app=https://spotify.com
|
||||
Terminal=false
|
||||
Icon=${icons.spotify}
|
||||
'';
|
||||
"applications/teams.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Microsoft Teams
|
||||
Exec=${pkgs.chromium}/bin/chromium --app=https://teams.microsoft.com
|
||||
Terminal=false
|
||||
Icon=${icons.teams}
|
||||
'';
|
||||
"applications/outlook.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Microsoft Outlook
|
||||
Exec=${pkgs.chromium}/bin/chromium --app=https://outlook.office365.com/mail
|
||||
Terminal=false
|
||||
Icon=${icons.outlook}
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
# https://yeun.github.io/open-color/
|
||||
active = "#ffdeeb"; # pink1
|
||||
activeDark = "#f783ac"; # pink4
|
||||
_activeDark = "f783ac"; # pink4
|
||||
inactive = "#495057"; # gray7
|
||||
inactiveDark = "#212529"; # gray9
|
||||
alert = "#c92a2a"; # red9
|
||||
|
|
|
|||
10
users/gandalf/modules/dconf.nix
Normal file
10
users/gandalf/modules/dconf.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ ... }: {
|
||||
|
||||
dconf.settings = {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,15 +1,18 @@
|
|||
{
|
||||
imports = [
|
||||
./alacritty.nix
|
||||
./chromium.nix
|
||||
./dconf.nix
|
||||
./fzf.nix
|
||||
./git.nix
|
||||
./gnupg.nix
|
||||
./kanshi.nix
|
||||
./keyring.nix
|
||||
./neovim.nix
|
||||
./obs.nix
|
||||
./packages.nix
|
||||
./playerctl.nix
|
||||
./spotify-player
|
||||
./spotify
|
||||
./ssh.nix
|
||||
./sway.nix
|
||||
./swaync
|
||||
|
|
|
|||
14
users/gandalf/modules/flameshot/build.nix
Normal file
14
users/gandalf/modules/flameshot/build.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs , cmake , qttools , qtsvg , kguiaddons , wrapQtAppsHook }:
|
||||
|
||||
# https://ryantm.github.io/nixpkgs/using/overrides/
|
||||
pkgs.flameshot.overrideAttrs (finalAttrs: previousAttrs: {
|
||||
|
||||
pname = previousAttrs.pname + "-wl";
|
||||
|
||||
nativeBuildInputs = [ cmake qttools qtsvg kguiaddons wrapQtAppsHook ];
|
||||
cmakeFlags = [
|
||||
"-DUSE_WAYLAND_CLIPBOARD=1"
|
||||
"-DUSE_WAYLAND_GRIM=1"
|
||||
];
|
||||
|
||||
})
|
||||
1
users/gandalf/modules/flameshot/default.nix
Normal file
1
users/gandalf/modules/flameshot/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
import ./flameshot.nix
|
||||
5
users/gandalf/modules/flameshot/flameshot.nix
Normal file
5
users/gandalf/modules/flameshot/flameshot.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
# https://nixos.wiki/wiki/Qt
|
||||
# https://nixos.org/manual/nixpkgs/stable/#sec-language-qt
|
||||
pkgs.libsForQt5.callPackage ./build.nix { }
|
||||
33
users/gandalf/modules/kanshi.nix
Normal file
33
users/gandalf/modules/kanshi.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ ... }: {
|
||||
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
|
||||
profiles = {
|
||||
|
||||
home = {
|
||||
outputs = [
|
||||
{
|
||||
criteria = "DP-3";
|
||||
mode = "1920x1080";
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = "DP-2";
|
||||
mode = "1920x1080";
|
||||
position = "1920,0";
|
||||
}
|
||||
{
|
||||
criteria = "LVDS-1";
|
||||
mode = "1920x1080";
|
||||
position = "3840,0";
|
||||
scale = 1.33;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -76,9 +76,9 @@
|
|||
indent = {
|
||||
enable = true
|
||||
},
|
||||
highlight = {
|
||||
enable = true
|
||||
},
|
||||
-- highlight = {
|
||||
-- enable = true
|
||||
-- },
|
||||
}
|
||||
|
||||
-- nvim-lspconfig
|
||||
|
|
|
|||
|
|
@ -1,7 +1,14 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
firefox
|
||||
speechd # https://support.mozilla.org/en-US/kb/speechd-setup
|
||||
gopass
|
||||
gopass-jsonapi
|
||||
gnome.nautilus
|
||||
gimp
|
||||
vlc
|
||||
gnome.simple-scan
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,4 @@
|
|||
playerctl
|
||||
];
|
||||
|
||||
/*
|
||||
services.playerctld = {
|
||||
enable = true;
|
||||
};
|
||||
*/
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
theme = "dracula"
|
||||
client_id = "65b708073fc0480ea92a077233ca87bd"
|
||||
client_port = 8080
|
||||
playback_format = """
|
||||
{track} • {artists}
|
||||
{album}
|
||||
{metadata}"""
|
||||
tracks_playback_limit = 50
|
||||
app_refresh_duration_in_ms = 32
|
||||
playback_refresh_duration_in_ms = 0
|
||||
cover_image_refresh_duration_in_ms = 2000
|
||||
page_size_in_rows = 20
|
||||
track_table_item_max_len = 32
|
||||
play_icon = "▶"
|
||||
pause_icon = "▌▌"
|
||||
liked_icon = "♥"
|
||||
border_type = "Plain"
|
||||
progress_bar_type = "Rectangle"
|
||||
playback_window_position = "Top"
|
||||
cover_img_length = 9
|
||||
cover_img_width = 5
|
||||
cover_img_scale = 1.0
|
||||
playback_window_width = 6
|
||||
enable_media_control = true
|
||||
enable_streaming = true
|
||||
enable_cover_image_cache = true
|
||||
default_device = "spotify-player"
|
||||
|
||||
[copy_command]
|
||||
command = "xclip"
|
||||
args = [
|
||||
"-sel",
|
||||
"c",
|
||||
]
|
||||
|
||||
[notify_format]
|
||||
summary = "{track} • {artists}"
|
||||
body = "{album}"
|
||||
|
||||
[device]
|
||||
name = "spotify-player"
|
||||
device_type = "speaker"
|
||||
volume = 80
|
||||
bitrate = 320
|
||||
audio_cache = false
|
||||
|
||||
# test
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
imports = [
|
||||
./spotify-player.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
spotify-player
|
||||
];
|
||||
|
||||
xdg.configFile."spotify-player/app.toml".source = ./app.toml;
|
||||
|
||||
}
|
||||
|
|
@ -1,14 +1,20 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
|
||||
cfg = config.wayland.windowManager.sway.config;
|
||||
common = import ./common.nix;
|
||||
|
||||
wallpaper = pkgs.fetchurl {
|
||||
url = "https://live.staticflickr.com/65535/52797919139_2444712a38_o_d.png";
|
||||
sha256 = "1a9148d8911fa25afa82d3b843ee620173955a7ca705d525f3e9d00e00696308";
|
||||
meta.licenses = lib.licenses.cc0;
|
||||
};
|
||||
|
||||
# flameshot = pkgs.libsForQt5.callPackage ./flameshot/build.nix { };
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
home.packages = with pkgs; [
|
||||
brightnessctl # control screen brightness
|
||||
pavucontrol # control audio
|
||||
|
|
@ -16,13 +22,17 @@ in
|
|||
networkmanagerapplet # control network
|
||||
dracula-theme # gtk theme
|
||||
gnome3.adwaita-icon-theme # default gnome cursors
|
||||
# wdisplays # graphical output manager
|
||||
# wev # wayland event monitor
|
||||
wl-clipboard # cli tool to manage wayland clipboard
|
||||
# wl-mirror # emulation for “mirror display” mode
|
||||
# wlr-randr # output management that actually works
|
||||
sway-contrib.grimshot
|
||||
wdisplays
|
||||
wlr-randr
|
||||
];
|
||||
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
package = pkgs.swaylock-effects;
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures = {
|
||||
|
|
@ -44,6 +54,7 @@ in
|
|||
export SDL_VIDEODRIVER=wayland
|
||||
# QT (needs qt5.qtwayland in systemPackages):
|
||||
export QT_QPA_PLATFORM=wayland-egl
|
||||
# export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
# Fix for some Java AWT applications (e.g. Android Studio),
|
||||
# use this if they aren't displayed properly:
|
||||
|
|
@ -81,7 +92,10 @@ in
|
|||
down = "j";
|
||||
up = "k";
|
||||
right = "l";
|
||||
|
||||
keybindings = {
|
||||
"${cfg.modifier}+Ctrl+Shift+l" = "exec ${pkgs.swaylock-effects}/bin/swaylock --screenshots --clock --indicator --indicator-radius 100 --indicator-thickness 7 --effect-blur 7x5 --effect-vignette 0.5:0.5 --ring-color ffffff --key-hl-color ${common.colorschemes.default._activeDark} --line-color 00000000 --inside-color 00000088 --inside-ver-color ${common.colorschemes.default._activeDark} --separator-color 00000000 --text-color ${common.colorschemes.default._activeDark} --fade-in 0.1";
|
||||
|
||||
# Basics
|
||||
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
|
||||
"${cfg.modifier}+q" = "kill";
|
||||
|
|
@ -175,6 +189,9 @@ in
|
|||
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioPause" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
|
||||
# Screenshot
|
||||
"Print" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
|
||||
|
||||
# Programs
|
||||
"${cfg.modifier}+Shift+v" = "exec ${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
"${cfg.modifier}+Shift+b" = "exec ${pkgs.blueman}/bin/blueman-manager";
|
||||
|
|
@ -287,5 +304,6 @@ in
|
|||
# ^-- resize again, case moving to different output
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,20 @@ in
|
|||
"**/__pycache__" = true;
|
||||
};
|
||||
|
||||
"vim.normalModeKeyBindingsNonRecursive" = [
|
||||
{
|
||||
"before" = [ "<C-p>" ];
|
||||
"commands" = [ "workbench.action.quickOpen" ];
|
||||
}
|
||||
{
|
||||
"before" = [ "<C-b>" ];
|
||||
"commands" = [
|
||||
"workbench.view.explorer"
|
||||
"workbench.action.toggleSidebarVisibility"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
"[html]" = {
|
||||
"editor.tabSize" = 2;
|
||||
"editor.insertSpaces" = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue