diff --git a/default.nix b/default.nix index 244da23..c437f39 100755 --- a/default.nix +++ b/default.nix @@ -13,39 +13,6 @@ in { ] ++ (mapModulesRec' (toString ./modules) import); - environment.variables = { - NIXPKGS_ALLOW_UNFREE = "1"; - }; - - nix = { - package = pkgs.nix; - - # flake registry and nix path pinning - # might not be needed? see: https://github.com/NixOS/nixpkgs/commit/e456032addae76701eb17e6c03fc515fd78ad74f - nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; - registry.nixpkgs.flake = inputs.nixpkgs; - - settings = { - experimental-features = [ "nix-command" "flakes" ]; - auto-optimise-store = true; - keep-outputs = true; - keep-derivations = true; - substituters = [ - "https://nix-community.cachix.org" - ]; - trusted-public-keys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; - }; - - optimise.automatic = true; - gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; - }; - system.stateVersion = mkDefault "25.11"; system.configurationRevision = with inputs; mkIf (self ? rev) self.rev; @@ -61,9 +28,6 @@ in { hardware.enableRedistributableFirmware = true; environment.systemPackages = with pkgs; [ - unrar unzip - micro - curl wget git ]; } diff --git a/hosts/nixos-server-reid/default.nix b/hosts/nixos-server-reid/default.nix index d6c9ed7..10af3b8 100755 --- a/hosts/nixos-server-reid/default.nix +++ b/hosts/nixos-server-reid/default.nix @@ -12,7 +12,18 @@ reidlab = { conf = { packages = with pkgs; [ - bat btop duf file micro nix-output-monitor tree which + # archives + zip xz unrar unzip p7zip zstd lrzip + # utils + ripgrep ripgrep-all jq libqalculate + # nix + nix-output-monitor nix-prefetch-scripts nix-top + # system + btop duf lm_sensors killall + # debug + strace ltrace lsof + # misc + bat file which ]; extraGroups = [ "wheel" "dotfiles" ]; openssh.authorizedKeys.keys = [ diff --git a/modules/nix.nix b/modules/nix.nix new file mode 100644 index 0000000..9b4a31e --- /dev/null +++ b/modules/nix.nix @@ -0,0 +1,36 @@ +{ lib, pkgs, inputs, config, ... }: +{ + environment.variables = { + NIXPKGS_ALLOW_UNFREE = "1"; + }; + + nixpkgs.flake.setNixPath = true; + nixpkgs.flake.setFlakeRegistry = true; + + nix = { + package = pkgs.nixVersions.latest; + + settings = { + experimental-features = [ "nix-command" "flakes" ]; + + auto-optimise-store = true; + + keep-outputs = true; + keep-derivations = true; + + substituters = [ + "https://nix-community.cachix.org" + ]; + trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; + }; + + nix.optimise.automatic = true; + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; +}