ssh for laptop test

This commit is contained in:
2026-04-22 21:59:17 -05:00
parent c6b84a7c49
commit 5731f191f7
2 changed files with 21 additions and 11 deletions

View File

@@ -15,6 +15,7 @@
steam
avahi
netbird
openssh
];
config = {
@@ -87,6 +88,8 @@
dhcpcd.enable = false;
};
services.openssh.openFirewall = false;
fonts.packages = with pkgs; [ nerd-fonts.fira-code ];

View File

@@ -1,6 +1,11 @@
{ self, inputs, ... }: {
flake.nixosModules.user-nathan = { config, lib, pkgs, ... }: {
flake.nixosModules.user-nathan = { config, lib, pkgs, ... }: let
laptop = [ "laptop" ];
homebox = [ "homebox" ];
#both = laptop ++ homebox;
useWith = x: y: (lib.mkIf (builtins.any (z: z == config.networking.hostName) x) y);
in {
config = {
@@ -12,21 +17,23 @@
isNormalUser = lib.mkDefault true;
#hashedPasswordFile = lib.mkIf (cfg.hashedPasswordFile != null) cfg.hashedPasswordFile;
extraGroups = [ "networkmanager" "docker" "libvirtd" ];
openssh.authorizedKeys.keys = [
openssh.authorizedKeys.keys = lib.mkMerge [
(useWith homebox [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAsU69CxfQk58CvItPN426h5Alnpb60SH37wet97Vb57 nathan@laptop"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEnUhN2uHwAJF/SLRX3wlGRmfhV3zpP88JQAYB+gh8jW nathan@localhost"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCM7ZgIu4+ntHZbzo9iQPq5pUt7AhpOnfvvI0lWDgO4CgtkPGvyFrDnW87wjAKGKYkgKeHWHIkwq2hkEDqlPD+7xxtPpwzfyo7ZS23xlP31rL14HcG21jGHgx9SO7RmGDHHylu4PwJzz/KX59hcVmpSSV4hgB/mYA9UKe6VHv39X4y3HsjmiHwNBOKXltG4V+VkxOZD6HcZ62sgkyDTaqDpE7p+q8vHPbm6dVTKC9cMjtJmjB5EesMGKcEAy3VN2tA9M0EndtaLcBKM39vDXGpBsjURYZTu7NbQnncnO7L8kVL0nT4vA/d4mCjB51dPoXIcxn1ise0TOb9G7TxMbBQQO5YMOpiB2iuZRRvB3sYoKwbO8YfSxZi0EhvLcxkF9GBFw+pWPl0p0D2fPBbW88YQfEpoAt2EWvEu/pgaMJsTHpgaIuDwPLVQmDciX4MRoi324oElGSK8yN0P8IaCHhFchuehLBWvTi34Qot0GpnxeTzmlLzImICO9Yq0I7dk2rk= nathan@rpi-3dp"
])
(useWith laptop [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEnUhN2uHwAJF/SLRX3wlGRmfhV3zpP88JQAYB+gh8jW nathan@localhost"
])
];
packages = lib.mkIf (false) [ pkgs.home-manager ];
};
home-manager.users.nathan = with self.homeModules; let
laptop = [ "laptop" ];
#homebox = [ "homebox" ];
#both = laptop ++ homebox;
useWith = x: y: (lib.mkIf (builtins.any (z: z == config.networking.hostName) x) y);
in lib.mkMerge [
home-manager.users.nathan = with self.homeModules; lib.mkMerge [
self.homeModules.nathan
(useWith laptop nathan-aurora)
(useWith laptop nathan-firefox)