This commit is contained in:
Evan Reichard 2025-04-08 21:12:51 -04:00
parent c2ea64512c
commit a1a5ee1f8f
4 changed files with 16 additions and 6 deletions

View File

@ -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;

View File

@ -22,5 +22,6 @@ in
};
};
};
networking.hostName = lib.mkForce "";
};
}

View File

@ -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.";
};

View File

@ -15,8 +15,8 @@ sops:
SC91WFNocEN2K1NFK2dBUHYwZTQrVFkKKb3AlaRX96vJwEmxNNAThTlO9ZwtD1tv
c6aBELEbmJFdHOcIJITzmS3YOssDOgTL2TbcSFu8mdAQYsRvxC96HA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-04-05T02:29:22Z"
mac: ENC[AES256_GCM,data:2rI+pEYmQIPmtcnDTuyroAbfIvLIZKvsyAMEbQM2y9xYXhLyK8Vt7IzmdHy//hQRBSWdBV7/HfCMWJcg9i1B/P9fXrKx+OxaIb654SkthWhkORq32Sr1Gee3Yj195MffIUrEZ4rVauCeprzdEXqN6oTVXjHvnqV2/VXuTkkbztE=,iv:gCgo+8uLH6H9R3OQvzf2K9SgXb3tXG7Lvu6lxL0P2xo=,tag:ev+vMOn6UAfKexfyUnMP5Q==,type:str]
lastmodified: "2025-04-09T00:53:28Z"
mac: ENC[AES256_GCM,data:NKv91i8Ms4TfbU0t9td4QoGD+9d9KYGQ9Mu1QlFdCc4AjMfRCcUCrvb9SVMF5JbYa8oZAH4Qp9FEJ5fFmgoTNrewspLUMpyjUYRgARYQWiHYhZjE/uTNhFo2FxXYLWsAlQjEJ8abbwUyr2y6NsK2tcQcOBDIWUssb4XqajNcylE=,iv:gvwQZB20JR4bKfMMR6sYjTnf3CNiOjcd8T30s2drKwY=,tag:mF9etyVyPVw5YblI8VdtTw==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.9.4