Created
November 18, 2024 09:15
-
-
Save letThemPlay/6f9fcbe28562de22d34c8995747a88b1 to your computer and use it in GitHub Desktop.
Stripped Down version of agenix home-manager setup with Env Vars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| inputs, | |
| stateVersion, | |
| pkgs, | |
| nixvim, | |
| ... | |
| }: | |
| { | |
| imports = [ ./hmuser.nix ]; | |
| home-manager = { | |
| sharedModules = [ | |
| ../../hm | |
| nixvim.homeManagerModules.nixvim | |
| inputs.agenix.homeManagerModules.default | |
| ]; | |
| useGlobalPkgs = true; | |
| useUserPackages = true; | |
| extraSpecialArgs = { | |
| inherit inputs stateVersion pkgs; | |
| }; | |
| }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| pkgs, | |
| stateVersion, | |
| inputs, | |
| config, | |
| ... | |
| }: | |
| { | |
| programs = { | |
| home-manager.enable = true; | |
| }; | |
| age.secrets.tailscaleAuth.file = ../../../../secrets/tailscale-authkey.age; | |
| xdg = { | |
| enable = true; | |
| userDirs = { | |
| enable = true; | |
| createDirectories = true; | |
| }; | |
| }; | |
| home = { | |
| inherit stateVersion; | |
| username = "bob"; | |
| homeDirectory = "/home/bob"; | |
| sessionVariables = { | |
| tailscaleAuth = '' | |
| $(${pkgs.coreutils}/bin/cat ${config.age.secrets.tailscaleAuth.path}) | |
| ''; | |
| }; | |
| }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let | |
| user1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDynItXS1ayKkq9UZ6Tw1jIB9Q1SK0lsuFsYofJY56Ni"; | |
| in | |
| { | |
| "tailscale-authkey.age".publicKeys = [ | |
| user1 | |
| ]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment