From 3ad407664b41656d1b8230c58291f9aaf8c6d5f3 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Fri, 27 Dec 2024 18:37:00 -0800 Subject: [PATCH] feat(ref): use initialHashedPassword for users/youwen --- reference/hosts/demeter/configuration.nix | 10 ---------- reference/hosts/demeter/home.nix | 2 +- reference/users/youwen/{default.nix => hm.nix} | 0 reference/users/youwen/nixos.nix | 13 +++++++++++++ 4 files changed, 14 insertions(+), 11 deletions(-) rename reference/users/youwen/{default.nix => hm.nix} (100%) create mode 100644 reference/users/youwen/nixos.nix diff --git a/reference/hosts/demeter/configuration.nix b/reference/hosts/demeter/configuration.nix index fa27d7c..2e6d58c 100755 --- a/reference/hosts/demeter/configuration.nix +++ b/reference/hosts/demeter/configuration.nix @@ -72,16 +72,6 @@ "/dev/disk/by-uuid/af320a0f-b388-43f5-b5a3-af2b47cfc716"; }; - users.users.youwen = { - isNormalUser = true; - description = "Youwen Wu"; - extraGroups = [ - "networkmanager" - "wheel" - ]; - shell = pkgs.fish; - }; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/reference/hosts/demeter/home.nix b/reference/hosts/demeter/home.nix index f7103b6..a13e590 100644 --- a/reference/hosts/demeter/home.nix +++ b/reference/hosts/demeter/home.nix @@ -1,7 +1,7 @@ { lib, ... }: { imports = [ - ../../users/youwen + ../../users/youwen/hm.nix ]; home.stateVersion = "24.05"; diff --git a/reference/users/youwen/default.nix b/reference/users/youwen/hm.nix similarity index 100% rename from reference/users/youwen/default.nix rename to reference/users/youwen/hm.nix diff --git a/reference/users/youwen/nixos.nix b/reference/users/youwen/nixos.nix new file mode 100644 index 0000000..1da37bd --- /dev/null +++ b/reference/users/youwen/nixos.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: +{ + users.users.youwen = { + isNormalUser = true; + description = "Youwen Wu"; + extraGroups = [ + "networkmanager" + "wheel" + ]; + shell = pkgs.fish; + initialHashedPassword = "$y$j9T$v0OkEeCntj8KwgPJQxyWx0$dx8WtFDYgZZ8WE3FWetWwRfutjQkznRuJ0IG3LLAtP2"; + }; +}