diff options
| author | Fuwn <[email protected]> | 2025-01-02 01:20:55 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-01-02 01:20:55 -0800 |
| commit | 85e46deedbb32dfa1c37bfb6ca3a7fb10d7be446 (patch) | |
| tree | 18f7846f2bdcd3a8d1a41f972040aa981acc5780 /modules | |
| parent | nara: move home-manager modules to home (diff) | |
| download | nixos-config-85e46deedbb32dfa1c37bfb6ca3a7fb10d7be446.tar.xz nixos-config-85e46deedbb32dfa1c37bfb6ca3a7fb10d7be446.zip | |
nara: move some core modules to base
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/base/default.nix | 6 | ||||
| -rw-r--r-- | modules/base/nix.nix | 10 | ||||
| -rw-r--r-- | modules/base/programs.nix (renamed from modules/core/programs.nix) | 0 | ||||
| -rw-r--r-- | modules/core/default.nix | 3 | ||||
| -rw-r--r-- | modules/core/nix/default.nix | 138 |
5 files changed, 83 insertions, 74 deletions
diff --git a/modules/base/default.nix b/modules/base/default.nix new file mode 100644 index 0000000..bca5d83 --- /dev/null +++ b/modules/base/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./nix.nix + ./programs.nix + ]; +} diff --git a/modules/base/nix.nix b/modules/base/nix.nix new file mode 100644 index 0000000..ff1ba2c --- /dev/null +++ b/modules/base/nix.nix @@ -0,0 +1,10 @@ +{ inputs, lib, pkgs, ... }: +{ + nix = { + optimise.automatic = true; + registry.nixpkgs.flake = inputs.nixpkgs; + package = lib.mkForce pkgs.nixVersions.git; + nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; + channel.enable = false; + }; +} diff --git a/modules/core/programs.nix b/modules/base/programs.nix index 2b13a22..2b13a22 100644 --- a/modules/core/programs.nix +++ b/modules/base/programs.nix diff --git a/modules/core/default.nix b/modules/core/default.nix index c9b855c..56d8ad9 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -1,9 +1,10 @@ +{ self, ... }: { imports = [ + "${self}/modules/base" ./access ./networking ./nix - ./programs.nix ./sops.nix ]; } diff --git a/modules/core/nix/default.nix b/modules/core/nix/default.nix index 7f60e31..5211041 100644 --- a/modules/core/nix/default.nix +++ b/modules/core/nix/default.nix @@ -11,83 +11,75 @@ ./nh.nix ]; - nix = { - optimise.automatic = true; - registry.nixpkgs.flake = inputs.nixpkgs; - package = pkgs.nixVersions.git; - nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; - channel.enable = false; + nix.settings = { + auto-optimise-store = true; + http-connections = 0; + warn-dirty = false; + log-lines = 30; + sandbox-fallback = false; + keep-going = true; + connect-timeout = 5; + stalled-download-timeout = 20; + auto-allocate-uids = true; + use-cgroups = pkgs.stdenv.isLinux; + builders-use-substitutes = true; + nix-path = lib.mkForce "nixpkgs=flake:nixpkgs"; + flake-registry = "${inputs.flake-registry}/flake-registry.json"; + trusted-users = [ "@wheel" ]; + max-jobs = "auto"; + keep-outputs = true; - settings = { - auto-optimise-store = true; - http-connections = 0; - warn-dirty = false; - log-lines = 30; - sandbox-fallback = false; - keep-going = true; - connect-timeout = 5; - stalled-download-timeout = 20; - auto-allocate-uids = true; - use-cgroups = pkgs.stdenv.isLinux; - builders-use-substitutes = true; - nix-path = lib.mkForce "nixpkgs=flake:nixpkgs"; - flake-registry = "${inputs.flake-registry}/flake-registry.json"; - trusted-users = [ "@wheel" ]; - max-jobs = "auto"; - keep-outputs = true; + system-features = [ + "nixos-test" + "kvm" + "recursive-nix" + "big-parallel" + ]; - system-features = [ - "nixos-test" - "kvm" - "recursive-nix" - "big-parallel" - ]; + allowed-users = [ + "root" + "@wheel" + ]; - allowed-users = [ - "root" - "@wheel" - ]; + extra-substituters = [ + "https://nix-community.cachix.org" + "https://hyprland.cachix.org" + "https://nyx.chaotic.cx/" + "https://nixpkgs-wayland.cachix.org" + "https://cuda-maintainers.cachix.org" + "https://nixpkgs-unfree.cachix.org" + # "https://cache.flox.dev" + "https://cache.iog.io" + "https://ezkea.cachix.org" + "https://nix-gaming.cachix.org" + "https://tsutsumi.cachix.org" + "https://devenv.cachix.org" + ]; - extra-substituters = [ - "https://nix-community.cachix.org" - "https://hyprland.cachix.org" - "https://nyx.chaotic.cx/" - "https://nixpkgs-wayland.cachix.org" - "https://cuda-maintainers.cachix.org" - "https://nixpkgs-unfree.cachix.org" - # "https://cache.flox.dev" - "https://cache.iog.io" - "https://ezkea.cachix.org" - "https://nix-gaming.cachix.org" - "https://tsutsumi.cachix.org" - "https://devenv.cachix.org" - ]; + extra-trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + "nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" + "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" + "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" + "nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs=" + # "flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs=" + "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" + "ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI=" + "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" + "tsutsumi.cachix.org-1:MojIlGI60CT5EoyuTgjB4VRVgf/uUvakZVWoYJThQNk=" + "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" + ]; - extra-trusted-public-keys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" - "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" - "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" - "nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs=" - # "flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs=" - "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" - "ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI=" - "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" - "tsutsumi.cachix.org-1:MojIlGI60CT5EoyuTgjB4VRVgf/uUvakZVWoYJThQNk=" - "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" - ]; - - experimental-features = [ - "nix-command" - "flakes" - "recursive-nix" - "ca-derivations" - "auto-allocate-uids" - "cgroups" - "no-url-literals" - "dynamic-derivations" - ]; - }; + experimental-features = [ + "nix-command" + "flakes" + "recursive-nix" + "ca-derivations" + "auto-allocate-uids" + "cgroups" + "no-url-literals" + "dynamic-derivations" + ]; }; } |