diff --git a/extra-packages/default.nix b/extra-packages/default.nix new file mode 100644 index 0000000..c554bd2 --- /dev/null +++ b/extra-packages/default.nix @@ -0,0 +1,10 @@ +pkgs: { + dracula-gtk = pkgs.callPackage ./dracula-gtk { }; + misc-scripts = pkgs.callPackage ./scripts/misc { }; + getpaper = pkgs.callPackage ./scripts/getpaper { }; + setpaper = pkgs.callPackage ./scripts/setpaper { }; + youtube = pkgs.callPackage ./scripts/youtube { }; + rofi-bluetooth = pkgs.callPackage ./rofi-bluetooth { }; + smc-manjari = pkgs.callPackage ./smc-manjari { }; + smc-nupuram = pkgs.callPackage ./smc-nupuram { }; +} diff --git a/packages/dracula-gtk/default.nix b/extra-packages/dracula-gtk/default.nix similarity index 100% rename from packages/dracula-gtk/default.nix rename to extra-packages/dracula-gtk/default.nix diff --git a/packages/rofi-bluetooth/default.nix b/extra-packages/rofi-bluetooth/default.nix similarity index 100% rename from packages/rofi-bluetooth/default.nix rename to extra-packages/rofi-bluetooth/default.nix diff --git a/packages/scripts/getpaper/default.nix b/extra-packages/scripts/getpaper/default.nix similarity index 100% rename from packages/scripts/getpaper/default.nix rename to extra-packages/scripts/getpaper/default.nix diff --git a/packages/scripts/getpaper/getpaper.sh b/extra-packages/scripts/getpaper/getpaper.sh similarity index 100% rename from packages/scripts/getpaper/getpaper.sh rename to extra-packages/scripts/getpaper/getpaper.sh diff --git a/packages/scripts/misc/default.nix b/extra-packages/scripts/misc/default.nix similarity index 100% rename from packages/scripts/misc/default.nix rename to extra-packages/scripts/misc/default.nix diff --git a/packages/scripts/misc/power-menu.sh b/extra-packages/scripts/misc/power-menu.sh similarity index 100% rename from packages/scripts/misc/power-menu.sh rename to extra-packages/scripts/misc/power-menu.sh diff --git a/packages/scripts/misc/tmux-sessions.sh b/extra-packages/scripts/misc/tmux-sessions.sh similarity index 100% rename from packages/scripts/misc/tmux-sessions.sh rename to extra-packages/scripts/misc/tmux-sessions.sh diff --git a/packages/scripts/setpaper/default.nix b/extra-packages/scripts/setpaper/default.nix similarity index 100% rename from packages/scripts/setpaper/default.nix rename to extra-packages/scripts/setpaper/default.nix diff --git a/packages/scripts/setpaper/setpaper.sh b/extra-packages/scripts/setpaper/setpaper.sh similarity index 100% rename from packages/scripts/setpaper/setpaper.sh rename to extra-packages/scripts/setpaper/setpaper.sh diff --git a/packages/scripts/youtube/default.nix b/extra-packages/scripts/youtube/default.nix similarity index 100% rename from packages/scripts/youtube/default.nix rename to extra-packages/scripts/youtube/default.nix diff --git a/packages/scripts/youtube/youtube.sh b/extra-packages/scripts/youtube/youtube.sh similarity index 100% rename from packages/scripts/youtube/youtube.sh rename to extra-packages/scripts/youtube/youtube.sh diff --git a/packages/smc-manjari/default.nix b/extra-packages/smc-manjari/default.nix similarity index 100% rename from packages/smc-manjari/default.nix rename to extra-packages/smc-manjari/default.nix diff --git a/packages/smc-nupuram/default.nix b/extra-packages/smc-nupuram/default.nix similarity index 100% rename from packages/smc-nupuram/default.nix rename to extra-packages/smc-nupuram/default.nix diff --git a/flake.nix b/flake.nix index 53e4ce5..932686c 100644 --- a/flake.nix +++ b/flake.nix @@ -34,20 +34,20 @@ } @ inputs: let secrets = import ./secrets.nix; - nixpkgs-config = { - allowUnfree = true; + packages = system: import nixpkgs { + inherit system; + config = { + allowUnfree = true; + }; }; + extra-packages = system: import ./extra-packages (packages system); in { nixosConfigurations = { Skipper = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - config = nixpkgs-config; - overlays = [ (import ./packages) ]; - }; - specialArgs = inputs // { inherit secrets; }; + pkgs = packages system; + specialArgs = inputs // { inherit secrets; extra-packages = (extra-packages system); }; modules = [ { system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; @@ -64,7 +64,7 @@ home-manager = { useUserPackages = true; useGlobalPkgs = true; - extraSpecialArgs = inputs // { inherit secrets; }; + extraSpecialArgs = inputs // { inherit secrets; extra-packages = (extra-packages system); }; users.${secrets.users.primary.userName} = _: { imports = [ impermanence.nixosModules.home-manager.impermanence diff --git a/home/gtk.nix b/home/gtk.nix index 4d0a5ff..76a55d9 100644 --- a/home/gtk.nix +++ b/home/gtk.nix @@ -1,10 +1,11 @@ { pkgs +, extra-packages , ... }: let gtkTheme = { name = "Dracula"; - package = pkgs.dracula-gtk; + package = extra-packages.dracula-gtk; }; iconTheme = { diff --git a/home/wm/addon/wallpaper.nix b/home/wm/addon/wallpaper.nix index 02f7ca0..352e2ec 100644 --- a/home/wm/addon/wallpaper.nix +++ b/home/wm/addon/wallpaper.nix @@ -1,7 +1,7 @@ -{ pkgs, ... }: +{ extra-packages, ... }: let - change-wallpaper = "${pkgs.setpaper}/bin/setpaper"; - wallpaper-downloader = "${pkgs.getpaper}/bin/getpaper"; + change-wallpaper = "${extra-packages.setpaper}/bin/setpaper"; + wallpaper-downloader = "${extra-packages.getpaper}/bin/getpaper"; in { systemd.user = { diff --git a/home/wm/hyprland/default.nix b/home/wm/hyprland/default.nix index f875980..7a40af8 100644 --- a/home/wm/hyprland/default.nix +++ b/home/wm/hyprland/default.nix @@ -1,5 +1,6 @@ { config , pkgs +, extra-packages , ... }: let @@ -168,10 +169,10 @@ in "SUPER,i, exec, ${firefox}" "SUPER_SHIFT,i, exec, ${librewolf}" - "SUPER_SHIFT,escape, exec, ${pkgs.misc-scripts}/bin/power-menu" - "SUPER,f11, exec, ${pkgs.misc-scripts}/bin/tmux-sessions" - "SUPER_SHIFT,y, exec, ${pkgs.youtube}/bin/youtube" - "SUPER_SHIFT,b, exec, ${pkgs.rofi-bluetooth}/bin/rofi-bluetooth" + "SUPER_SHIFT,escape, exec, ${extra-packages.misc-scripts}/bin/power-menu" + "SUPER,f11, exec, ${extra-packages.misc-scripts}/bin/tmux-sessions" + "SUPER_SHIFT,y, exec, ${extra-packages.youtube}/bin/youtube" + "SUPER_SHIFT,b, exec, ${extra-packages.rofi-bluetooth}/bin/rofi-bluetooth" "SUPER,escape, exec, ${loginctl} lock-session" "SUPER_SHIFT,W, exec, systemctl --user start wallpaper.service" diff --git a/hosts/skipper/default.nix b/hosts/skipper/default.nix index ed4a0e2..f84b897 100644 --- a/hosts/skipper/default.nix +++ b/hosts/skipper/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ pkgs, extra-packages, ... }: { imports = [ ./hardware ./programs @@ -21,15 +21,14 @@ fonts = { fontDir.enable = true; - packages = with pkgs; [ + packages = (with pkgs; [ cantarell-fonts liberation_ttf (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-cjk noto-fonts-emoji - smc-manjari - ]; + ]) ++ [ extra-packages.smc-manjari ]; }; gtk.iconCache.enable = true; diff --git a/packages/default.nix b/packages/default.nix deleted file mode 100644 index 89e6fa4..0000000 --- a/packages/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -final: prev: { - dracula-gtk = prev.callPackage ./dracula-gtk { }; - misc-scripts = prev.callPackage ./scripts/misc { }; - getpaper = prev.callPackage ./scripts/getpaper { }; - setpaper = prev.callPackage ./scripts/setpaper { }; - youtube = prev.callPackage ./scripts/youtube { }; - rofi-bluetooth = prev.callPackage ./rofi-bluetooth { }; - smc-manjari = prev.callPackage ./smc-manjari { }; - smc-nupuram = prev.callPackage ./smc-nupuram { }; -}