inital steps into sops-nix. figured out ssh pubkey management.

This commit is contained in:
Gabe Venberg 2024-05-31 21:05:06 -05:00
parent a04727757b
commit 3d9e197056
11 changed files with 117 additions and 15 deletions

View file

@ -1,11 +1,12 @@
{
inputs,
outputs,
configLib,
...
}:
inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs outputs;};
specialArgs = {inherit inputs outputs configLib;};
# > Our main nixos configuration file <
modules = [
inputs.home-manager.nixosModules.home-manager
@ -19,6 +20,7 @@ inputs.nixpkgs.lib.nixosSystem {
({
config,
pkgs,
configLib,
...
}: {
host = {
@ -39,6 +41,9 @@ inputs.nixpkgs.lib.nixosSystem {
xkb.variant = "";
};
users.users.root.openssh.authorizedKeys.keys =
configLib.dirToStrings "${inputs.nix-secrets}/public-keys";
programs.zsh.enable = true;
environment.shells = with pkgs; [zsh];
# Define a user account. Don't forget to set a password with passwd.
@ -51,6 +56,7 @@ inputs.nixpkgs.lib.nixosSystem {
firefox
# thunderbird
];
openssh.authorizedKeys.keys=config.users.users.root.openssh.authorizedKeys.keys;
};
home-manager.users.${config.host.user} = {