From 59bc9064134481aefa26c8a941c995b9acea0e6a Mon Sep 17 00:00:00 2001 From: Jona Date: Fri, 10 Jul 2026 22:06:33 +0200 Subject: [PATCH] create seperate packages.nix module --- configuration.nix | 21 +++++---------------- flake.nix | 6 ++++-- packages.nix | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 packages.nix diff --git a/configuration.nix b/configuration.nix index fa98998..0d1fcc7 100644 --- a/configuration.nix +++ b/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, ... }: +{ config, pkgs, inputs, ... }: { imports = @@ -26,6 +26,10 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; + environment.systemPackages = with pkgs; import ./packages.nix { + inherit pkgs inputs; + }; + # Set your time zone. time.timeZone = "Europe/Berlin"; @@ -100,21 +104,6 @@ # Allow unfree packages nixpkgs.config.allowUnfree = true; - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ -fastfetch -htop -neovim -lazygit -git -ghostty - wget - stow - fish - bat - ]; - # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; diff --git a/flake.nix b/flake.nix index d68abf7..537e90a 100644 --- a/flake.nix +++ b/flake.nix @@ -5,9 +5,11 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; }; - outputs = { self, nixpkgs }: { + outputs = { self, nixpkgs, ... } @ inputs: { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { - modules = [ ./configuration.nix ]; + specialArgs = { inherit inputs; }; + + modules = [ ./configuration.nix ]; }; }; diff --git a/packages.nix b/packages.nix new file mode 100644 index 0000000..a314947 --- /dev/null +++ b/packages.nix @@ -0,0 +1,17 @@ +{ pkgs, inputs, ... }: + +with pkgs; + +[ + fastfetch + htop + neovim + lazygit + git + ghostty + wget + stow + fish + bat + inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default +]