From c37f00205b7bab05d4c6fd565d7d5cce71aab3af Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Tue, 14 Jan 2025 13:49:29 +0100 Subject: [PATCH] treewide: config/nixos/nix -> modules/nix/core/nix.nix --- config/nixos/default.nix | 1 - config/nixos/nix/default.nix | 17 ----------------- config/nixos/nix/nh.nix | 9 --------- config/nixos/nix/nixpkgs.nix | 13 ------------- modules/nix/core/default.nix | 1 + modules/nix/core/nix.nix | 35 +++++++++++++++++++++++++++++++++++ 6 files changed, 36 insertions(+), 40 deletions(-) delete mode 100644 config/nixos/nix/default.nix delete mode 100644 config/nixos/nix/nh.nix delete mode 100644 config/nixos/nix/nixpkgs.nix create mode 100644 modules/nix/core/nix.nix diff --git a/config/nixos/default.nix b/config/nixos/default.nix index b2dabcd..a5aa301 100644 --- a/config/nixos/default.nix +++ b/config/nixos/default.nix @@ -1,6 +1,5 @@ { imports = [ - ./nix ./programs ./services ]; diff --git a/config/nixos/nix/default.nix b/config/nixos/nix/default.nix deleted file mode 100644 index 3cef10e..0000000 --- a/config/nixos/nix/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{pkgs, ...}: { - imports = [./nixpkgs.nix ./nh.nix]; - environment.systemPackages = [pkgs.git]; - nix = { - package = pkgs.lix; - settings = { - accept-flake-config = true; - warn-dirty = false; - auto-optimise-store = true; - trusted-users = ["root" "@wheel"]; - experimental-features = [ - "nix-command" - "flakes" - ]; - }; - }; -} diff --git a/config/nixos/nix/nh.nix b/config/nixos/nix/nh.nix deleted file mode 100644 index d6508cf..0000000 --- a/config/nixos/nix/nh.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - programs.nh = { - enable = true; - clean = { - enable = true; - extraArgs = "--keep-since 30d --keep 3"; - }; - }; -} diff --git a/config/nixos/nix/nixpkgs.nix b/config/nixos/nix/nixpkgs.nix deleted file mode 100644 index bc54cff..0000000 --- a/config/nixos/nix/nixpkgs.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - nixpkgs = { - config = { - allowUnfree = true; - permittedInsecurePackages = [ - "cinny-4.2.3" - "cinny-unwrapped-4.2.3" - "segger-jlink-qt4-810" - ]; - segger-jlink.acceptLicense = true; - }; - }; -} diff --git a/modules/nix/core/default.nix b/modules/nix/core/default.nix index 3a603de..7c020c6 100644 --- a/modules/nix/core/default.nix +++ b/modules/nix/core/default.nix @@ -6,6 +6,7 @@ ./home-manager.nix ./locales.nix ./networking.nix + ./nix.nix ./users.nix ./security.nix ]; diff --git a/modules/nix/core/nix.nix b/modules/nix/core/nix.nix new file mode 100644 index 0000000..af14dbb --- /dev/null +++ b/modules/nix/core/nix.nix @@ -0,0 +1,35 @@ +{pkgs, ...}: { + nix = { + package = pkgs.lix; + settings = { + accept-flake-config = true; + warn-dirty = false; + auto-optimise-store = true; + trusted-users = ["root" "@wheel"]; + experimental-features = [ + "nix-command" + "flakes" + ]; + }; + }; + + programs.nh = { + enable = true; + clean = { + enable = true; + extraArgs = "--keep-since 30d --keep 3"; + }; + }; + + nixpkgs = { + config = { + allowUnfree = true; + permittedInsecurePackages = [ + "cinny-4.2.3" + "cinny-unwrapped-4.2.3" + "segger-jlink-qt4-810" + ]; + segger-jlink.acceptLicense = true; + }; + }; +}