feat: add utility functions

This commit is contained in:
uku 2024-07-29 10:58:43 +02:00
parent ca71ddac8c
commit b8d7062228
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
12 changed files with 177 additions and 156 deletions

View file

@ -2,6 +2,7 @@
lib,
pkgs,
config,
_utils,
nixpkgs,
agenix,
home-manager,
@ -9,6 +10,8 @@
}: let
username = "leo";
stateVersion = "23.11";
rootPassword = _utils.setupSingleSecret config "rootPassword" {};
in {
imports = [
agenix.nixosModules.default
@ -16,6 +19,8 @@ in {
(lib.mkAliasOptionModule ["hm"] ["home-manager" "users" username])
rootPassword.generate
../programs/fish.nix
../programs/git.nix
../programs/rust.nix
@ -26,7 +31,6 @@ in {
identityPaths = ["/etc/age/key"];
secrets = {
rootPassword.file = ../secrets/${config.networking.hostName}/rootPassword.age;
userPassword.file = ../secrets/userPassword.age;
tailscaleKey.file = ../secrets/tailscaleKey.age;
};
@ -174,7 +178,7 @@ in {
root = {
shell = pkgs.fish;
hashedPasswordFile = config.age.secrets.rootPassword.path;
hashedPasswordFile = rootPassword.path;
};
};