diff options
author | Franck Cuny <franck@fcuny.net> | 2024-03-11 17:15:43 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2024-03-11 17:15:43 -0700 |
commit | 63637f993f7d15cc8750d519e210a7d7c22a1efa (patch) | |
tree | 155caba0021e551a50baad53be190256d025012f | |
parent | mark nix 2.16.2 as insecure (diff) | |
download | world-63637f993f7d15cc8750d519e210a7d7c22a1efa.tar.gz |
reorganize common files for hosts
Move the common configuration for nix to its own file.
-rw-r--r-- | hosts/common/homebrew.nix (renamed from hosts/common/darwin/homebrew.nix) | 0 | ||||
-rw-r--r-- | hosts/common/macos.nix (renamed from hosts/common/darwin/macos.nix) | 0 | ||||
-rw-r--r-- | hosts/common/nix.nix | 24 | ||||
-rw-r--r-- | hosts/mba/default.nix | 21 | ||||
-rw-r--r-- | hosts/work/default.nix | 26 | ||||
-rw-r--r-- | nix/flake/hosts.nix | 5 |
6 files changed, 29 insertions, 47 deletions
diff --git a/hosts/common/darwin/homebrew.nix b/hosts/common/homebrew.nix index b358695..b358695 100644 --- a/hosts/common/darwin/homebrew.nix +++ b/hosts/common/homebrew.nix diff --git a/hosts/common/darwin/macos.nix b/hosts/common/macos.nix index edc57a0..edc57a0 100644 --- a/hosts/common/darwin/macos.nix +++ b/hosts/common/macos.nix diff --git a/hosts/common/nix.nix b/hosts/common/nix.nix new file mode 100644 index 0000000..c828a16 --- /dev/null +++ b/hosts/common/nix.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: { + nix = { + package = pkgs.nixFlakes; + + gc = { + user = "root"; + automatic = true; + interval = { Weekday = 0; Hour = 2; Minute = 0; }; + options = "--delete-older-than 30d"; + }; + + settings = { + trusted-users = [ "@admin" "fcuny" ]; + experimental-features = [ "nix-command" "flakes" ]; + }; + }; + + nixpkgs.config = { + allowUnfree = true; + permittedInsecurePackages = [ + "nix-2.16.2" # FIXME https://github.com/nix-community/nixd/issues/357 + ]; + }; +} diff --git a/hosts/mba/default.nix b/hosts/mba/default.nix index 6e59f7b..5908a53 100644 --- a/hosts/mba/default.nix +++ b/hosts/mba/default.nix @@ -1,26 +1,7 @@ -{ pkgs, ... }: +{ ... }: { services.nix-daemon.enable = true; - nix = { - package = pkgs.nixFlakes; - - gc = { - user = "root"; - automatic = true; - interval = { Weekday = 0; Hour = 2; Minute = 0; }; - options = "--delete-older-than 30d"; - }; - - settings = { - trusted-users = [ "@admin" "fcuny" ]; - experimental-features = [ "nix-command" "flakes" ]; - }; - }; - - # in order to install things like 1password's extensions - nixpkgs.config.allowUnfree = true; - programs.zsh.enable = true; users.users.fcuny.home = "/Users/fcuny"; diff --git a/hosts/work/default.nix b/hosts/work/default.nix index 6cc3d5d..3db1e6f 100644 --- a/hosts/work/default.nix +++ b/hosts/work/default.nix @@ -1,31 +1,7 @@ -{ pkgs, ... }: +{ ... }: { services.nix-daemon.enable = true; - nix = { - package = pkgs.nixFlakes; - - gc = { - user = "root"; - automatic = true; - interval.Day = 7; - options = "--delete-older-than 30d"; - }; - - settings = { - trusted-users = [ "@admin" "fcuny" ]; - experimental-features = [ "nix-command" "flakes" ]; - }; - }; - - # in order to install things like 1password's extensions - nixpkgs.config.allowUnfree = true; - - # FIXME https://github.com/nix-community/nixd/issues/357 - nixpkgs.config.permittedInsecurePackages = [ - "nix-2.16.2" - ]; - programs.zsh.enable = true; users.users.fcuny.home = "/Users/fcuny"; diff --git a/nix/flake/hosts.nix b/nix/flake/hosts.nix index c2ba71b..a6390e5 100644 --- a/nix/flake/hosts.nix +++ b/nix/flake/hosts.nix @@ -17,8 +17,9 @@ let }; }; } - ../../hosts/common/darwin/homebrew.nix - ../../hosts/common/darwin/macos.nix + ../../hosts/common/homebrew.nix + ../../hosts/common/macos.nix + ../../hosts/common/nix.nix path { nixpkgs.overlays = [ |