From 6e2ef44fd1fe632780b4da378183b773aa9fe027 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Tue, 30 Jul 2024 21:50:08 -0700 Subject: [PATCH] snowhawk: sops secret password hee hee hoo hoo --- hosts/snowhawk/configuration.nix | 7 ++++++- modules/default.nix | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hosts/snowhawk/configuration.nix b/hosts/snowhawk/configuration.nix index 67cb491..76af9cf 100644 --- a/hosts/snowhawk/configuration.nix +++ b/hosts/snowhawk/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running `nixos-help`). -{ pkgs, inputs, lib, ... }: +{ pkgs, inputs, lib, config, ... }: { imports = [ @@ -41,10 +41,15 @@ # # ]; + # users sops setup + sops.secrets."passwords/ravenshade".neededForUsers = true; + users.mutableUsers = false; + # Define a user account. Don't forget to set a password with `passwd`. users.users.ravenshade = { isNormalUser = true; description = "Zynh Ludwig"; + hashedPasswordFile = config.sops.secrets."passwords/ravenshade".path; extraGroups = [ "networkmanager" "wheel" "audio" ]; packages = with pkgs; [ ripgrep diff --git a/modules/default.nix b/modules/default.nix index 43ad7a9..7b712c5 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -13,4 +13,5 @@ in snowhawk.i18n.enable = lib.mkDefault true; snowhawk.audio.enable = lib.mkDefault true; snowhawk.env.enable = lib.mkDefault true; + snowhawk.sops.enable = lib.mkDefault true; }