diff --git a/hosts/gerg-desktop/main.nix b/hosts/gerg-desktop/main.nix index 9da33e5..9c95976 100644 --- a/hosts/gerg-desktop/main.nix +++ b/hosts/gerg-desktop/main.nix @@ -25,6 +25,37 @@ "steam-unwrapped" "steam-run" ]; + packages = { + inherit (pkgs) + bitwarden-desktop # store stuff + qbittorrent # steal stuff + pavucontrol # gui volume control + pcmanfm # file manager + vlc # play stuff + ripgrep + fd + jq + wget + xautoclick + prismlauncher + deadnix + statix + #element-desktop + vesktop + gh + nixfmt-rfc-style + prusa-slicer # 3D printer slicer + # QMK configuration + #via + #qmk + + ; + inherit (nvim-flake.packages) neovim; + inherit (self'.packages) lint; + + librewolf = pkgs.librewolf.override { cfg.speechSynthesisSupport = false; }; + nixpkgs-review = pkgs.nixpkgs-review.override { nix = config.nix.package; }; + }; }; boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; @@ -88,42 +119,9 @@ }; sops.secrets.github_token = { }; - environment = { - systemPackages = builtins.attrValues { - inherit (pkgs) - bitwarden-desktop # store stuff - qbittorrent # steal stuff - pavucontrol # gui volume control - pcmanfm # file manager - vlc # play stuff - ripgrep - fd - jq - wget - xautoclick - prismlauncher - deadnix - statix - #element-desktop - vesktop - gh - nixfmt-rfc-style - prusa-slicer # 3D printer slicer - # QMK configuration - #via - #qmk - - ; - inherit (nvim-flake.packages) neovim; - inherit (self'.packages) lint; - - librewolf = pkgs.librewolf.override { cfg.speechSynthesisSupport = false; }; - nixpkgs-review = pkgs.nixpkgs-review.override { nix = config.nix.package; }; - }; - etc = { - "jdks/17".source = "${pkgs.openjdk17}/bin"; - "jdks/8".source = "${pkgs.openjdk8}/bin"; - }; + environment.etc = { + "jdks/17".source = "${pkgs.openjdk17}/bin"; + "jdks/8".source = "${pkgs.openjdk8}/bin"; }; services.udev.packages = [ diff --git a/hosts/media-laptop/main.nix b/hosts/media-laptop/main.nix index 7ea7b6b..7a03148 100644 --- a/hosts/media-laptop/main.nix +++ b/hosts/media-laptop/main.nix @@ -17,16 +17,16 @@ enable = true; kmscon.enable = true; }; + packages = { + inherit (pkgs) + vlc + pavucontrol # gui volume control + chromium + ; + inherit (nvim-flake.packages) neovim; + }; }; - environment.systemPackages = builtins.attrValues { - inherit (pkgs) - vlc - pavucontrol # gui volume control - chromium - ; - inherit (nvim-flake.packages) neovim; - }; services.xserver.videoDrivers = [ "modesetting" ]; networking.networkmanager.enable = true; diff --git a/modules/DE/dwm.nix b/modules/DE/dwm.nix index af7b6cb..c869fab 100644 --- a/modules/DE/dwm.nix +++ b/modules/DE/dwm.nix @@ -9,6 +9,31 @@ options.local.DE.dwm.enable = lib.mkEnableOption ""; config = lib.mkIf config.local.DE.dwm.enable { + local.packages = { + inherit (suckless.packages) dmenu dwm st; + inherit (pkgs) + maim + playerctl + xclip + feh + numlockx + picom + sxhkd + xscreensaver + ; + + xsecurelock = pkgs.writeShellScriptBin "xsecurelock" '' + export XSECURELOCK_BLANK_TIMEOUT="30" + export XSECURELOCK_AUTH_TIMEOUT="30" + export XSECURELOCK_BLANK_DPMS_STATE="off" + export XSECURELOCK_BACKGROUND_COLOR="#000000" + export XSECURELOCK_AUTH_BACKGROUND_COLOR="#080808" + export XSECURELOCK_AUTH_FOREGROUND_COLOR="#bdbdbd" + export XSECURELOCK_FONT="Overpass" + export XSECURELOCK_SHOW_DATETIME="1" + ${lib.getExe pkgs.xsecurelock} + ''; + }; systemd.user.services = { sxhkd = { wantedBy = [ "graphical-session.target" ]; @@ -67,64 +92,36 @@ ]; }; }; - environment = { - systemPackages = builtins.attrValues { - inherit (suckless.packages) dmenu dwm st; - inherit (pkgs) - maim - playerctl - xclip - feh - numlockx - picom - sxhkd - xscreensaver - ; - xsecurelock = pkgs.writeShellScriptBin "xsecurelock" '' - export XSECURELOCK_BLANK_TIMEOUT="30" - export XSECURELOCK_AUTH_TIMEOUT="30" - export XSECURELOCK_BLANK_DPMS_STATE="off" - export XSECURELOCK_BACKGROUND_COLOR="#000000" - export XSECURELOCK_AUTH_BACKGROUND_COLOR="#080808" - export XSECURELOCK_AUTH_FOREGROUND_COLOR="#bdbdbd" - export XSECURELOCK_FONT="Overpass" - export XSECURELOCK_SHOW_DATETIME="1" - ${lib.getExe pkgs.xsecurelock} - ''; - }; - etc = { - "sxhkd/sxhkdrc".text = '' - XF86AudioPlay - playerctl play-pause - XF86AudioPause - playerctl play-pause - XF86AudioStop - playerctl stop - XF86AudioNext - playerctl next - XF86AudioPrev - playerctl previous - XF86AudioRaiseVolume - wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+ - XF86AudioLowerVolume - wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%- - XF86AudioMute - wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle - Print - maim $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg - Print + shift - maim | xclip -selection clipboard -t image/png - super + Print - maim -s $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg - super + Print + shift - maim -s | xclip -selection clipboard -t image/png - super + ctrl + r - pkill -usr1 -x sxhkd - super + ctrl + l - xsecurelock - ''; - }; - }; + environment.etc."sxhkd/sxhkdrc".text = '' + XF86AudioPlay + playerctl play-pause + XF86AudioPause + playerctl play-pause + XF86AudioStop + playerctl stop + XF86AudioNext + playerctl next + XF86AudioPrev + playerctl previous + XF86AudioRaiseVolume + wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+ + XF86AudioLowerVolume + wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%- + XF86AudioMute + wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle + Print + maim $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg + Print + shift + maim | xclip -selection clipboard -t image/png + super + Print + maim -s $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg + super + Print + shift + maim -s | xclip -selection clipboard -t image/png + super + ctrl + r + pkill -usr1 -x sxhkd + super + ctrl + l + xsecurelock + ''; }; } diff --git a/modules/packages.nix b/modules/packages.nix new file mode 100644 index 0000000..8281ef1 --- /dev/null +++ b/modules/packages.nix @@ -0,0 +1,8 @@ +{ lib, config }: +{ + options.local.packages = lib.mkOption { + type = lib.types.attrsOf lib.types.package; + default = { }; + }; + config.environment.systemPackages = builtins.attrValues config.local.packages; +} diff --git a/modules/shell.nix b/modules/shell.nix index 62409c9..34cc22d 100644 --- a/modules/shell.nix +++ b/modules/shell.nix @@ -3,11 +3,11 @@ pkgs, }: { + local.packages = { + inherit (pkgs) eza fzf; + inherit (fetch-rs.packages) fetch-rs; + }; environment = { - systemPackages = builtins.attrValues { - inherit (pkgs) eza fzf; - inherit (fetch-rs.packages) fetch-rs; - }; variables = { EDITOR = "nvim"; VISUAL = "nvim";