From e46158b32874ae8e7d7637769da0badc7753e990 Mon Sep 17 00:00:00 2001 From: iFargle Date: Fri, 1 Dec 2023 12:43:38 +0900 Subject: [PATCH] Add root ssh keys --- nixos/default.nix | 3 +-- nixos/minimal.nix | 1 + nixos/small.nix | 1 + nixos/users/root/default.nix | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 nixos/users/root/default.nix diff --git a/nixos/default.nix b/nixos/default.nix index d42bc3a8..cc82a6e7 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -21,6 +21,7 @@ ./common/modules/nixos.nix # NixOS related items ./common/modules/remote-builders.nix # Add remote builders + ./users/root ./users/${username} ./hosts/${hostname} ] ++ lib.optional (builtins.isString desktop) ./common/desktops/${desktop}; @@ -49,8 +50,6 @@ cryptsetup # used to open LUKS devices parted # Disk partitioner / Formatter screen # Terminal screen manager - alejandra # Nix code formatter - nixfmt # Nix code formatter e2fsprogs # disk format utilities, like mkfs.ext4 bat # Like cat, but with syntax highlighting openssl # Used to generate certs, random strings, etc diff --git a/nixos/minimal.nix b/nixos/minimal.nix index 1e4e6122..f0c87d98 100644 --- a/nixos/minimal.nix +++ b/nixos/minimal.nix @@ -9,6 +9,7 @@ ./common/modules/nixos.nix # NixOS related items ./common/modules/remote-builders.nix # Add remote builders + ./users/root ./users/${username} ./hosts/${hostname} ] ++ lib.optional (builtins.isString desktop) ./common/desktops/${desktop}; diff --git a/nixos/small.nix b/nixos/small.nix index 749abd92..24803ccd 100644 --- a/nixos/small.nix +++ b/nixos/small.nix @@ -15,6 +15,7 @@ ./common/modules/nixos.nix # Common NixOS Configurations ./common/modules/remote-builders.nix # Add remote builders + ./users/root ./users/${username} ./hosts/${hostname} ]; diff --git a/nixos/users/root/default.nix b/nixos/users/root/default.nix new file mode 100644 index 00000000..8a8c1e39 --- /dev/null +++ b/nixos/users/root/default.nix @@ -0,0 +1,3 @@ +{ config, desktop, lib, pkgs, ... }: + users.users.root.openssh.authorizedKeys.keyFiles = [ ../../../keys/ssh/keys.txt ]; +} \ No newline at end of file