From 115f1e6711e3fac5041974b3dbe6df2aa22f78db Mon Sep 17 00:00:00 2001 From: Pacman99 Date: Sat, 3 Apr 2021 08:09:36 -0700 Subject: [PATCH] make core an unecessary profile and add to suites Prevents mkHosts subverting standard devos api to import core and add all necessary core features to mkHosts, so core can be safely deleted in suites --- lib/devos/mkHosts.nix | 6 ++++-- profiles/core/default.nix | 3 --- suites/default.nix | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/devos/mkHosts.nix b/lib/devos/mkHosts.nix index 1d1bfce..8a8abdb 100644 --- a/lib/devos/mkHosts.nix +++ b/lib/devos/mkHosts.nix @@ -12,7 +12,6 @@ let ]; modules = { - core = "${self}/profiles/core"; modOverrides = { config, overrideModulesPath, ... }: let inherit (overrides) modules disabledModules; @@ -24,7 +23,7 @@ let modules; }; - global = { config, ... }: { + global = { config, pkgs, ... }: { home-manager = { useGlobalPkgs = true; useUserPackages = true; @@ -32,6 +31,7 @@ let extraSpecialArgs = extern.userSpecialArgs // { suites = suites.user; }; sharedModules = extern.userModules ++ (builtins.attrValues self.homeModules); }; + users.mutableUsers = lib.mkDefault false; hardware.enableRedistributableFirmware = lib.mkDefault true; @@ -49,6 +49,8 @@ let override.flake = inputs.override; }; + nix.package = pkgs.nixFlakes; + nix.extraOptions = '' experimental-features = ${lib.concatStringsSep " " experimentalFeatures diff --git a/profiles/core/default.nix b/profiles/core/default.nix index 1e789a4..1e8b698 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -2,7 +2,6 @@ let inherit (lib) fileContents; in { - nix.package = pkgs.nixFlakes; nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; @@ -145,6 +144,4 @@ in services.earlyoom.enable = true; - users.mutableUsers = false; - } diff --git a/suites/default.nix b/suites/default.nix index 4a65b55..eadb20c 100644 --- a/suites/default.nix +++ b/suites/default.nix @@ -2,7 +2,7 @@ { system = with profiles; rec { - base = [ users.nixos users.root ]; + base = [ core users.nixos users.root ]; }; user = with userProfiles; rec { base = [ direnv git ];