pin reg
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, namespace, host, ... }:
|
||||
{ config, lib, pkgs, inputs, namespace, host, ... }:
|
||||
let
|
||||
inherit (lib) types mkIf;
|
||||
inherit (lib.${namespace}) mkBoolOpt mkOpt;
|
||||
@@ -14,6 +14,14 @@ in
|
||||
config = mkIf cfg.enable {
|
||||
nix =
|
||||
let
|
||||
mappedRegistry = lib.pipe inputs [
|
||||
(lib.filterAttrs (_: lib.isType "flake"))
|
||||
(lib.mapAttrs (_: flake: { inherit flake; }))
|
||||
(x: x // {
|
||||
nixpkgs.flake = if pkgs.stdenv.hostPlatform.isLinux then inputs.nixpkgs else inputs.nixpkgs-unstable;
|
||||
})
|
||||
(x: if pkgs.stdenv.hostPlatform.isDarwin then lib.removeAttrs x [ "nixpkgs-unstable" ] else x)
|
||||
];
|
||||
users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
@@ -48,6 +56,9 @@ in
|
||||
|
||||
optimise.automatic = true;
|
||||
|
||||
# Pin the registry to avoid downloading and evaluating a new nixpkgs version everytime
|
||||
registry = mappedRegistry;
|
||||
|
||||
settings = {
|
||||
allowed-users = users;
|
||||
auto-optimise-store = pkgs.stdenv.hostPlatform.isLinux;
|
||||
|
||||
@@ -22,5 +22,6 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.hostName = lib.mkForce "";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,9 +11,7 @@ in
|
||||
extraGroups = mkOpt (listOf str) [ ] "Groups for the user to be assigned.";
|
||||
extraOptions = mkOpt attrs { } "Extra options passed to <option>users.users.<name></option>.";
|
||||
fullName = mkOpt str "Evan Reichard" "The full name of the user.";
|
||||
initialPassword =
|
||||
mkOpt str "password"
|
||||
"The initial password to use when the user is first created.";
|
||||
initialPassword = mkOpt str "changeMe2025!" "The initial password to use when the user is first created.";
|
||||
name = mkOpt str "evanreichard" "The name to use for the user account.";
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user