From 3a7334c3b914499386cfec4867cb5095fa22b77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20K=C3=A4nner?= Date: Sat, 28 Dec 2024 22:09:41 +0100 Subject: [PATCH] move nix configuration --- hosts/MaxNixosLaptop/configuration.nix | 13 ------------- modules/nixos/default.nix | 2 +- modules/nixos/nix.nix | 10 ++++++++++ 3 files changed, 11 insertions(+), 14 deletions(-) create mode 100644 modules/nixos/nix.nix diff --git a/hosts/MaxNixosLaptop/configuration.nix b/hosts/MaxNixosLaptop/configuration.nix index 544158e..e9c137f 100644 --- a/hosts/MaxNixosLaptop/configuration.nix +++ b/hosts/MaxNixosLaptop/configuration.nix @@ -23,19 +23,6 @@ networking.hostName = "MaxNixosLaptop"; # Define your hostname. - # NIXOS - nix.settings = { - experimental-features = ["nix-command" "flakes"]; - substituters = ["https://nix-community.cachix.org" "https://raspberry-pi-nix.cachix.org"]; - trusted-public-keys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "raspberry-pi-nix.cachix.org-1:WmV2rdSangxW0rZjY/tBvBDSaNFQ3DyEQsVw8EvHn9o=" - ]; - auto-optimise-store = true; - max-jobs = "auto"; - cores = 12; - }; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.max = { isNormalUser = true; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 4b7ca9e..7bfcc92 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -5,7 +5,7 @@ }: let cfg = config.myConfig; in { - imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix ./cups.nix ./gpu/amd.nix ./touch.nix ./cache.nix]; + imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix ./cups.nix ./gpu/amd.nix ./touch.nix ./cache.nix ./nix.nix]; options.myConfig = { enable = lib.mkEnableOption "my custom config"; diff --git a/modules/nixos/nix.nix b/modules/nixos/nix.nix new file mode 100644 index 0000000..424d5b3 --- /dev/null +++ b/modules/nixos/nix.nix @@ -0,0 +1,10 @@ +{...}: { + config = { + nix.settings = { + experimental-features = ["nix-command" "flakes"]; + auto-optimise-store = true; + max-jobs = "auto"; + cores = 1; + }; + }; +}