diff --git a/dots/.config/gtk/settings.ini.nix b/dots/.config/gtk/settings.ini.nix new file mode 100644 index 0000000..279496b --- /dev/null +++ b/dots/.config/gtk/settings.ini.nix @@ -0,0 +1,35 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf mkEnableOption; + cfg = config.horseman.dots.gtk; + username = config.horseman.username; + + catppuccin = config.horseman.catppuccin; +in { + options = { + horseman.dots.gtk = { + enable = mkEnableOption "~/.config/gtk-4.0/settings.ini"; + }; + }; + + config = let + settings = '' + [Settings] + gtk-theme-name=Adwaita + gtk-icon-theme-name=Adwaita + gtk-font-name=Adwaita Sans 11 + gtk-cursor-theme-name=catppuccin-${catppuccin.flavor}-dark-cursors + gtk-cursor-theme-size=24 + gtk-application-prefer-dark-theme=0 + ''; + in + mkIf cfg.enable { + home-manager.users.${username}.home.file = { + ".config/gtk-4.0/settings.ini".text = settings; + ".config/gtk-3.0/settings.ini".text = settings; + }; + }; +} diff --git a/dots/default.nix b/dots/default.nix index 059ab0d..b909d4b 100644 --- a/dots/default.nix +++ b/dots/default.nix @@ -6,5 +6,6 @@ ./.config/kitty/kitty.conf.nix ./.config/wofi/style.css.nix ./.config/waybar/style.css.nix + ./.config/gtk/settings.ini.nix ]; } diff --git a/flake.lock b/flake.lock index e679881..370907a 100644 --- a/flake.lock +++ b/flake.lock @@ -10,11 +10,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1762618334, - "narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=", + "lastModified": 1770165109, + "narHash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=", "owner": "ryantm", "repo": "agenix", - "rev": "fcdea223397448d35d9b31f798479227e80183f6", + "rev": "b027ee29d959fda4b60b57566d64c98a202e0feb", "type": "github" }, "original": { @@ -73,11 +73,11 @@ ] }, "locked": { - "lastModified": 1767780135, - "narHash": "sha256-5SbmsLMgxzPd9YMbFR4IHfOXv6bjWs+dfl6IbSq3r7s=", + "lastModified": 1770260404, + "narHash": "sha256-3iVX1+7YUIt23hBx1WZsUllhbmP2EnXrV8tCRbLxHc8=", "owner": "nix-community", "repo": "home-manager", - "rev": "c08430923ed417abc653884328a39e98496cfd0f", + "rev": "0d782ee42c86b196acff08acfbf41bb7d13eed5b", "type": "github" }, "original": { @@ -97,11 +97,11 @@ ] }, "locked": { - "lastModified": 1767801421, - "narHash": "sha256-z6+cVdgkJSz+MLUOChLDUZsiBP/h6tuAZSjVG+66jpo=", + "lastModified": 1770641372, + "narHash": "sha256-Vwc5X8QZEeVoJSy0i3SrLN/t8v17mCAirhlTVouUjd4=", "owner": "KoenDR06", "repo": "nix-hyprland", - "rev": "4efff468c6435080b0716fd289ab7c06c4bb215f", + "rev": "bd4b87ef132fd55dcfb446211bc9c83fef344285", "type": "github" }, "original": { @@ -112,11 +112,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1767634882, - "narHash": "sha256-2GffSfQxe3sedHzK+sTKlYo/NTIAGzbFCIsNMUPAAnk=", + "lastModified": 1770464364, + "narHash": "sha256-z5NJPSBwsLf/OfD8WTmh79tlSU8XgIbwmk6qB1/TFzY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3c9db02515ef1d9b6b709fc60ba9a540957f661c", + "rev": "23d72dabcb3b12469f57b37170fcbc1789bd7457", "type": "github" }, "original": { @@ -136,11 +136,11 @@ ] }, "locked": { - "lastModified": 1767662275, - "narHash": "sha256-d5Q1GmQ+sW1Bt8cgDE0vOihzLaswsm8cSdg8124EqXE=", + "lastModified": 1769956244, + "narHash": "sha256-12RCFLyAedyMOdenUi7cN3ioJPEGjA/ZG1BLjugfUVs=", "owner": "pjones", "repo": "plasma-manager", - "rev": "51816be33a1ff0d4b22427de83222d5bfa96d30e", + "rev": "fe54ea85c6e4413fba03b84d50f2b431d2f7c831", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 5bf8c32..ae95711 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,7 @@ nix-hyprland = { url = "github:KoenDR06/nix-hyprland"; + # url = "path:/home/horseman/Programming/nix-hyprland"; inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; @@ -58,22 +59,24 @@ in { formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); - nixosConfigurations = nixpkgs.lib.genAttrs hosts (host: - nixpkgs.lib.nixosSystem { - specialArgs = { - inherit inputs outputs lib; - }; - modules = [ - ./modules - ./dots - ./machines/${host}/configuration.nix - home-manager.nixosModules.home-manager - agenix.nixosModules.default - nix-hyprland.nixosModules.default - { - home-manager.sharedModules = [plasma-manager.homeModules.plasma-manager]; - } - ]; - }); + nixosConfigurations = nixpkgs.lib.genAttrs hosts ( + host: + nixpkgs.lib.nixosSystem { + specialArgs = { + inherit inputs outputs lib; + }; + modules = [ + ./modules + ./dots + ./machines/${host}/configuration.nix + home-manager.nixosModules.home-manager + agenix.nixosModules.default + nix-hyprland.nixosModules.default + { + home-manager.sharedModules = [plasma-manager.homeModules.plasma-manager]; + } + ]; + } + ); }; } diff --git a/machines/artemis/modules.nix b/machines/artemis/modules.nix index 015d62b..2513b45 100644 --- a/machines/artemis/modules.nix +++ b/machines/artemis/modules.nix @@ -13,6 +13,7 @@ y = 0; bar = "top"; scale = 1.175; # Idk why hyprland doesn't think 1.25 is invalid but whatever. + wallpaper = ../../misc/wallpaper.png; } ]; }; diff --git a/machines/solis/modules.nix b/machines/solis/modules.nix index f5e7307..0c9e32e 100644 --- a/machines/solis/modules.nix +++ b/machines/solis/modules.nix @@ -32,7 +32,7 @@ timers = { backup.enable = true; - rooms.enable = false; + rooms.enable = true; }; }; } diff --git a/machines/terra/modules.nix b/machines/terra/modules.nix index 9a03aa0..145ba7e 100644 --- a/machines/terra/modules.nix +++ b/machines/terra/modules.nix @@ -11,6 +11,8 @@ x = 0; y = 0; wallpaper = ../../misc/landscape.png; + refreshRate = "165"; + resolution = "2560x1440"; } { output = "DP-3"; @@ -19,6 +21,8 @@ transform = 1; wallpaper = ../../misc/portrait.png; bar = "top"; + refreshRate = "165"; + resolution = "2560x1440"; } ]; bindWorkspaces = "interlaced"; diff --git a/misc/backup.sh b/misc/backup.sh index cb546de..aae0042 100755 --- a/misc/backup.sh +++ b/misc/backup.sh @@ -1,15 +1,17 @@ #!/run/current-system/sw/bin/zsh +now=$(date +'%Y-%m-%d') + # Documents cd /home/horseman -tar -cf backups/documents.tar Documents +tar -cf backups/documents-$now.tar Documents # Vaultwarden cd /home/horseman -tar -cf backups/vaultwarden.tar docker/vaultwarden/data +tar -cf backups/vaultwarden-$now.tar docker/vaultwarden/data # Forgejo cd /home/horseman -tar -cf backups/git.tar docker/git/data +tar -cf backups/git-$now.tar docker/git/data exit 0 diff --git a/misc/wallpaper.jpg b/misc/default-wallpaper.jpg similarity index 100% rename from misc/wallpaper.jpg rename to misc/default-wallpaper.jpg diff --git a/misc/landscape.png b/misc/landscape.png index e963cad..6c763bf 100644 Binary files a/misc/landscape.png and b/misc/landscape.png differ diff --git a/misc/portrait.png b/misc/portrait.png index f46b0c2..1fcc0d7 100644 Binary files a/misc/portrait.png and b/misc/portrait.png differ diff --git a/misc/power-menu.sh b/misc/power-menu.sh index 3a8be49..1838deb 100755 --- a/misc/power-menu.sh +++ b/misc/power-menu.sh @@ -1,11 +1,8 @@ cmds=('shutdown now' 'reboot' 'hyprlock' 'hyprctl dispatch exit') count=${#cmds[@]} -default=15 -lines=$((count > default ? default : count)) - -a=$(printf ' Shut down\n Reboot\n Lock\n Log out' | fuzzel --cache /dev/null --dmenu --index --lines $lines --placeholder "Power action: " -I) +a=$(printf ' Shut down\n Reboot\n Lock\n Log out' | fuzzel --cache /dev/null --dmenu --index --minimal-lines -l $count --placeholder "Power action: " -I) if [ -n "$a" ]; then ${cmds[a]} diff --git a/misc/sound-menu.sh b/misc/sound-menu.sh index 1676471..99a3ee6 100755 --- a/misc/sound-menu.sh +++ b/misc/sound-menu.sh @@ -3,11 +3,8 @@ mapfile -t ids < <(wpctl status | sed -n '/Audio/,/Video/p' | sed -n '/├─ Si mapfile -t sinks < <(wpctl status | sed -n '/Audio/,/Video/p' | sed -n '/├─ Sinks:/,/├─ Sources:/p' | tail -n +2 | head -n -2 | sed -r 's/^........//' | sed -r 's/[0-9]+\. //') count=${#ids[@]} -default=15 -lines=$((count > default ? default : count)) - -a=$(printf '%s\n' "${sinks[@]}" | fuzzel --cache /dev/null --dmenu --index --lines $lines --placeholder "Switch audio source: " -I) +a=$(printf '%s\n' "${sinks[@]}" | fuzzel --cache /dev/null --dmenu --index --minimal-lines -l $count --placeholder "Switch audio source: " -I) if [ -n "$a" ]; then wpctl set-default ${ids[a]} diff --git a/misc/wallpaper.png b/misc/wallpaper.png new file mode 100644 index 0000000..5ba95d8 Binary files /dev/null and b/misc/wallpaper.png differ diff --git a/modules/apps/dev/default.nix b/modules/apps/dev/default.nix index 82f2fdb..f19e21f 100644 --- a/modules/apps/dev/default.nix +++ b/modules/apps/dev/default.nix @@ -27,6 +27,7 @@ in { jetbrains.rider jetbrains.rust-rover jetbrains.webstorm + libqalculate mermaid-cli mono nodejs_22 @@ -35,8 +36,10 @@ in { quickemu sqlite sqlitebrowser + typst xclip uv + zed-editor haskellPackages.ghc haskellPackages.cabal-install @@ -53,5 +56,10 @@ in { # QuickEMU USB Support virtualisation.spiceUSBRedirection.enable = true; + + programs.nix-ld.enable = true; + programs.nix-ld.libraries = with pkgs; [ + dotnetCorePackages.sdk_9_0 + ]; }; } diff --git a/modules/apps/terminal/default.nix b/modules/apps/terminal/default.nix index 6cf66e1..357b1c6 100644 --- a/modules/apps/terminal/default.nix +++ b/modules/apps/terminal/default.nix @@ -53,7 +53,6 @@ in { sops sxiv termdown - texliveTeTeX tmux unzip wakeonlan diff --git a/modules/apps/terminal/helix.nix b/modules/apps/terminal/helix.nix index 10bea16..4f206ba 100644 --- a/modules/apps/terminal/helix.nix +++ b/modules/apps/terminal/helix.nix @@ -7,6 +7,7 @@ in { settings = { theme = "catppuccin_${flavor}"; editor = { + completion-timeout = 5; clipboard-provider = "wayland"; cursor-shape = { normal = "block"; diff --git a/modules/base/nix.nix b/modules/base/nix.nix index 1f7d2e8..3d4d5eb 100644 --- a/modules/base/nix.nix +++ b/modules/base/nix.nix @@ -2,7 +2,6 @@ inputs, lib, config, - pkgs, ... }: let inherit (lib) mkEnableOption mkIf; @@ -22,11 +21,6 @@ in { nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs); - programs.nix-ld.enable = true; - programs.nix-ld.libraries = with pkgs; [ - dotnetCorePackages.sdk_9_0 - ]; - nix.nixPath = ["/etc/nix/path"]; environment.etc = lib.mapAttrs' diff --git a/modules/hardware/wifi.nix b/modules/hardware/wifi.nix index 9acb5b3..d66cf91 100644 --- a/modules/hardware/wifi.nix +++ b/modules/hardware/wifi.nix @@ -46,6 +46,10 @@ in { pskRaw = "ext:psk_sticky"; }; + "Woestgaafsecure" = { + pskRaw = "ext:psk_sticky"; + }; + "Utrecht University" = { authProtocols = ["WPA-EAP"]; auth = '' diff --git a/modules/wm/hyprland/animations.nix b/modules/wm/hyprland/animations.nix index 18044ce..cbf7ccc 100644 --- a/modules/wm/hyprland/animations.nix +++ b/modules/wm/hyprland/animations.nix @@ -5,138 +5,84 @@ }: let inherit (lib) mkIf; cfg = config.horseman.wm.hyprland; + + easeOut = { + startX = 0.23; + startY = 1.0; + endX = 0.32; + endY = 1.0; + }; + easeInOut = { + startX = 0.65; + startY = 0.05; + endX = 0.36; + endY = 1.0; + }; + linear = { + startX = 0.0; + startY = 0.0; + endX = 1.0; + endY = 1.0; + }; + slowFade = { + startX = 0.4; + startY = 1.0; + endX = 0.4; + endY = 1.0; + }; in { config = mkIf cfg.enable { nix-hyprland = { animations = { enabled = true; - beziers = [ - { - name = "easeOutQuint"; - startX = 0.23; - startY = 1.0; - endX = 0.32; - endY = 1.0; - } - { - name = "easeInOutCubic"; - startX = 0.65; - startY = 0.05; - endX = 0.36; - endY = 1.0; - } - { - name = "linear"; - startX = 0.0; - startY = 0.0; - endX = 1.0; - endY = 1.0; - } - { - name = "almostLinear"; - startX = 0.5; - startY = 0.5; - endX = 0.75; - endY = 1.0; - } - { - name = "quick"; - startX = 0.15; - startY = 0.0; - endX = 0.1; - endY = 1.0; - } - ]; + animations = { + global = { + enabled = false; + }; - animations = [ - { - name = "global"; - speed = 10.0; - curve = "default"; - } - { - name = "border"; - speed = 5.39; - curve = "easeOutQuint"; - } - { - name = "windows"; - speed = 4.79; - curve = "easeOutQuint"; - } - { - name = "windowsIn"; - speed = 4.1; - curve = "easeOutQuint"; - style = "popin 87%"; - } - { - name = "windowsOut"; - speed = 1.49; - curve = "linear"; - style = "popin 87%"; - } - { - name = "fadeIn"; - speed = 1.73; - curve = "almostLinear"; - } - { - name = "fadeOut"; - speed = 1.46; - curve = "almostLinear"; - } - { - name = "fade"; - speed = 3.03; - curve = "quick"; - } - { - name = "layers"; - speed = 3.81; - curve = "easeOutQuint"; - } - { - name = "layersIn"; - speed = 4.0; - curve = "easeOutQuint"; - style = "fade"; - } - { - name = "layersOut"; + border = { + speed = 3; + curve = easeOut; + }; + + workspaces = { + speed = 3; + curve = easeInOut; + style = "slidefade 5%"; + }; + + specialWorkspace = { + speed = 3; + curve = easeInOut; + style = "slidefadevert 10%"; + }; + + fadeDpms = { + speed = 20; + curve = slowFade; + }; + + windows = { + speed = 3; + curve = easeOut; + style = "gnomed"; + }; + + layers = { speed = 1.5; - curve = "linear"; - style = "fade"; - } - { - name = "fadeLayersIn"; - speed = 1.79; - curve = "almostLinear"; - } - { - name = "fadeLayersOut"; - speed = 1.39; - curve = "almostLinear"; - } - { - name = "workspaces"; - speed = 1.94; - curve = "almostLinear"; - style = "fade"; - } - { - name = "workspacesIn"; - speed = 1.21; - curve = "almostLinear"; - style = "fade"; - } - { - name = "workspacesOut"; - speed = 1.94; - curve = "almostLinear"; - style = "fade"; - } - ]; + curve = slowFade; + style = "popin"; + }; + + fadeLayers = { + speed = 1.5; + curve = linear; + }; + fadeOut = { + speed = 10; + curve = linear; + }; + }; }; }; }; diff --git a/modules/wm/hyprland/default.nix b/modules/wm/hyprland/default.nix index 908eb2b..4e6b294 100644 --- a/modules/wm/hyprland/default.nix +++ b/modules/wm/hyprland/default.nix @@ -8,6 +8,9 @@ cfg = config.horseman.wm.hyprland; colors = config.horseman.catppuccin.colors; + flavor = config.horseman.catppuccin.flavor; + + cursorSize = 24; in { imports = [ ./options.nix @@ -40,9 +43,11 @@ in { wl-clipboard # Clipboard fuzzel # Launcher xdg-desktop-portal-hyprland # XDG Portal (needed but idk why) + catppuccin-cursors."${flavor}Dark" # Cursors ]; horseman.hardware.keyd.enable = true; + horseman.dots.gtk.enable = true; nix-hyprland = { enable = true; @@ -53,16 +58,17 @@ in { "hyprpaper" "systemctl --user start hyprpolkitagent" "waybar" + "hyprctl setcursor catppuccin-${flavor}-dark-cursors 24" ]; env = [ { name = "XCURSOR_SIZE"; - value = "24"; + value = toString cursorSize; } { name = "HYPRCURSOR_SIZE"; - value = "24"; + value = toString cursorSize; } ]; @@ -72,7 +78,8 @@ in { "float, initialTitle:^Picture-in-Picture$" "center, initialTitle:^Picture-in-Picture$" - "size 33% 33%, initialTitle:^Picture-in-Picture$" + "size 1280 720, initialTitle:^Picture-in-Picture$" + "opacity 1.0 override, initialTitle:^Picture-in-Picture$" "float, initialClass:CImg" "float, initialTitle:GLFW" @@ -141,6 +148,8 @@ in { sensitivity = 0.0; touchpad.naturalScroll = true; numlockByDefault = true; + + touchpad.disableWhileTyping = true; }; group = { @@ -173,6 +182,7 @@ in { monitors = { addDefault = true; + defaultWallpaper = ../../../misc/default-wallpaper.jpg; }; sleep = { diff --git a/modules/wm/hyprland/keybindings.nix b/modules/wm/hyprland/keybindings.nix index 0c2ec5c..7ad6416 100644 --- a/modules/wm/hyprland/keybindings.nix +++ b/modules/wm/hyprland/keybindings.nix @@ -136,7 +136,7 @@ in { mods = ["SUPER" "SHIFT"]; key = "S"; dispatcher = "exec"; - params = "hyprshot -m region --clipboard-only"; + params = "pkill hyprshot || hyprshot -m region --clipboard-only"; } { @@ -474,7 +474,7 @@ in { mods = []; key = "XF86AudioMute"; dispatcher = "exec"; - params = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; + params = "wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 0%"; } { flags = ["e" "l"];