From 16dae5c0b87debe723c04845739f598c182fa437 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Thu, 18 Jan 2024 16:58:05 +0800 Subject: [PATCH] hosts/ni: convert foo-dogsquared home-manager user to declarative hosts method --- configs/flake-parts/nixos.nix | 38 ++++++++++++++++++++--------------- configs/nixos/ni/default.nix | 18 ----------------- 2 files changed, 22 insertions(+), 34 deletions(-) diff --git a/configs/flake-parts/nixos.nix b/configs/flake-parts/nixos.nix index 634626aa..371d757a 100644 --- a/configs/flake-parts/nixos.nix +++ b/configs/flake-parts/nixos.nix @@ -14,22 +14,28 @@ ni = { systems = [ "x86_64-linux" ]; formats = null; - overlays = [ - # Neovim nightly! - inputs.neovim-nightly-overlay.overlays.default - - # Emacs unstable version! - inputs.emacs-overlay.overlays.default - - # Helix master! - inputs.helix-editor.overlays.default - - # Access to NUR. - inputs.nur.overlay - ]; - modules = [ - inputs.nur.nixosModules.nur - ]; + homeManagerUsers = { + nixpkgsInstance = "global"; + users.foo-dogsquared = { + userConfig = { + extraGroups = [ + "adbusers" + "wheel" + "audio" + "docker" + "podman" + "networkmanager" + "wireshark" + ]; + hashedPassword = + "$6$.cMYto0K0CHbpIMT$dRqyKs4q1ppzmTpdzy5FWP/V832a6X..FwM8CJ30ivK0nfLjQ7DubctxOZbeOtygfjcUd1PZ0nQoQpOg/WMvg."; + isNormalUser = true; + createHome = true; + home = "/home/foo-dogsquared"; + description = "Gabriel Arazas"; + }; + }; + }; }; # A remote server. diff --git a/configs/nixos/ni/default.nix b/configs/nixos/ni/default.nix index ddaa0100..e7aae3bd 100644 --- a/configs/nixos/ni/default.nix +++ b/configs/nixos/ni/default.nix @@ -5,24 +5,6 @@ # Include the results of the hardware scan. ./hardware-configuration.nix ./modules - - (lib.private.mapHomeManagerUser "foo-dogsquared" { - extraGroups = [ - "adbusers" - "wheel" - "audio" - "docker" - "podman" - "networkmanager" - "wireshark" - ]; - hashedPassword = - "$6$.cMYto0K0CHbpIMT$dRqyKs4q1ppzmTpdzy5FWP/V832a6X..FwM8CJ30ivK0nfLjQ7DubctxOZbeOtygfjcUd1PZ0nQoQpOg/WMvg."; - isNormalUser = true; - createHome = true; - home = "/home/foo-dogsquared"; - description = "Gabriel Arazas"; - }) ]; hosts.ni = {