From fc03bb0b937e388209ce2f066240f02206e78d5d Mon Sep 17 00:00:00 2001 From: caem Date: Sat, 18 Jan 2025 20:34:22 +0100 Subject: [PATCH] Stuff --- .gitignore | 1 - .gitmodules | 3 +++ flake.nix | 7 +++---- modules/nixos/user/caem.nix | 8 +++++++- secrets | 1 + 5 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 .gitmodules create mode 160000 secrets diff --git a/.gitignore b/.gitignore index 9998018..a0e8414 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -secrets/ dotfiles/zsh/.zcompdump dotfiles/nvim/lazy-lock.json result diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..254bd98 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "secrets"] + path = secrets + url = git@git.caem.dev:caem/secrets diff --git a/flake.nix b/flake.nix index 3c33eb3..58da0d1 100644 --- a/flake.nix +++ b/flake.nix @@ -44,6 +44,9 @@ inputs = inputs; user = "caem"; modules = [ + impermanence.nixosModules.impermanence + disko.nixosModules.disko + sops-nix.nixosModules.sops home-manager.nixosModules.home-manager { home-manager = { useGlobalPkgs = true; @@ -53,10 +56,6 @@ }; }; } - - impermanence.nixosModules.impermanence - disko.nixosModules.disko - sops-nix.nixosModules.sops ]; }; }; diff --git a/modules/nixos/user/caem.nix b/modules/nixos/user/caem.nix index 3cb4d29..a4b07a5 100644 --- a/modules/nixos/user/caem.nix +++ b/modules/nixos/user/caem.nix @@ -1,9 +1,15 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { + sops.secrets.user_password = { + sopsFile = ../../../secrets/user_password.yaml; + neededForUsers = true; + }; + users.users.caem = { isNormalUser = true; shell = pkgs.zsh; + hashedPasswordFile = config.sops.secrets.user_password.path; extraGroups = [ "wheel" ]; diff --git a/secrets b/secrets new file mode 160000 index 0000000..7390891 --- /dev/null +++ b/secrets @@ -0,0 +1 @@ +Subproject commit 73908914ee288a689dede75c9e4ff1531e41159c