diff --git a/hosts/snowbelle/configuration.nix b/hosts/snowbelle/configuration.nix index 5eb44b7..6e6c007 100644 --- a/hosts/snowbelle/configuration.nix +++ b/hosts/snowbelle/configuration.nix @@ -8,7 +8,7 @@ in imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - ../../users + ../../users/blake ../../modules/system ../../modules/homelab ../../modules/homelab/minecraft_recpro @@ -54,12 +54,6 @@ in minecraft_recpro.enable = true; }; - # configure users & groups - users = { - blake.enable = true; # main user, home manager - defaultUserShell = pkgs.zsh; # the goat - }; - # boot (systemd is going on me) boot.loader.systemd-boot.enable = true; # systemd your pretty cool ya know boot.loader.efi.canTouchEfiVariables = true; diff --git a/modules/system/sops/default.nix b/modules/system/sops/default.nix index d1eead7..658b9b8 100644 --- a/modules/system/sops/default.nix +++ b/modules/system/sops/default.nix @@ -19,7 +19,7 @@ in age.keyFile = "/etc/sops/keys.txt"; secrets = { - "blake_passwd" = lib.mkIf config.users.blake.enable { + "blake_passwd" = { owner = "root"; group = "root"; neededForUsers = true; diff --git a/users/blake/default.nix b/users/blake/default.nix index 2d0b18a..240ed56 100644 --- a/users/blake/default.nix +++ b/users/blake/default.nix @@ -6,19 +6,22 @@ ... }: { # create blake user - users.users = { - blake = { - isNormalUser = true; - extraGroups = ["wheel" "networkmanager" "docker" "media" "podman" "minecraft"]; # Enable ‘sudo’ for the user. - uid = 1000; - shell = pkgs.zsh; - group = "blake"; - hashedPasswordFile = config.sops.secrets."blake_passwd".path; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBK0AGJfZGyqW8/krvQV+PL7axcDW/EnKyHy9M8wryQx klefki" - "ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBPdC9cCX8awvA19Ri65fvbYjZYe8X1Ef+nOZAIv92AS6u4SkJYqOvPYfqRHXORNDpbzjTV6nackyCKvV5EO4niv4MFIgdkEQwuVHcYX32/dOsWdDoeXBT/l2sFFM7JESwQ== blake@zygarde" - ]; + users = { + users = { + blake = { + isNormalUser = true; + extraGroups = ["wheel" "networkmanager" "docker" "media" "podman" "minecraft"]; # Enable ‘sudo’ for the user. + uid = 1000; + shell = pkgs.zsh; + group = "blake"; + hashedPasswordFile = config.sops.secrets."blake_passwd".path; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBK0AGJfZGyqW8/krvQV+PL7axcDW/EnKyHy9M8wryQx klefki" + "ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBPdC9cCX8awvA19Ri65fvbYjZYe8X1Ef+nOZAIv92AS6u4SkJYqOvPYfqRHXORNDpbzjTV6nackyCKvV5EO4niv4MFIgdkEQwuVHcYX32/dOsWdDoeXBT/l2sFFM7JESwQ== blake@zygarde" + ]; + }; }; + groups.blake = { gid = 1000; }; }; # define home-manager user diff --git a/users/blake/home.nix b/users/blake/home.nix index b564ded..f4edd02 100644 --- a/users/blake/home.nix +++ b/users/blake/home.nix @@ -64,22 +64,22 @@ }; }; # import sshkeys from keyring - #home.file.".ssh/id_snowbelle".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle; - #home.file.".ssh/id_snowbelle.pub".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle.pub; + home.file.".ssh/id_snowbelle".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle; + home.file.".ssh/id_snowbelle.pub".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle.pub; - # manage secrets with sops - sops.secrets = { - "id_snowbelle" = { - owner = "blake"; - group = "blake"; - mode = "0600"; - path = "/home/blake/.ssh/id_snowbelle"; - }; - "id_snowbelle.pub" = { - owner = "blake"; - group = "blake"; - mode = "644"; - path = "/home/blake/.ssh/id_snowbelle.pub"; - }; - }; + # # manage secrets with sops + # sops.secrets = { + # "id_snowbelle" = { + # owner = "blake"; + # group = "blake"; + # mode = "0600"; + # path = "/home/blake/.ssh/id_snowbelle"; + # }; + # "id_snowbelle.pub" = { + # owner = "blake"; + # group = "blake"; + # mode = "644"; + # path = "/home/blake/.ssh/id_snowbelle.pub"; + # }; + # }; } diff --git a/users/default.nix b/users/default.nix index b1d32eb..0198da1 100644 --- a/users/default.nix +++ b/users/default.nix @@ -5,6 +5,5 @@ ./blake ]; - users.blake.enable = lib.mkDefault true; }