feat: add utility functions
This commit is contained in:
parent
ca71ddac8c
commit
b8d7062228
12 changed files with 177 additions and 156 deletions
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue