From 6228f2b8e99849cadb439a06c80cb97aa0c0a66b Mon Sep 17 00:00:00 2001 From: kenny Date: Thu, 2 Oct 2025 14:56:18 +0300 Subject: [PATCH] moved user declaration to file and invoking in the end --- hosts/box/default.nix | 9 +-------- hosts/box/user.nix | 11 +++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 hosts/box/user.nix diff --git a/hosts/box/default.nix b/hosts/box/default.nix index 3917b20..ca313ce 100644 --- a/hosts/box/default.nix +++ b/hosts/box/default.nix @@ -12,15 +12,8 @@ ../../modules/raspberrypi.nix ../../modules/common/networking.nix ../../modules/common/shell.nix + ./user.nix ]; - users.users.boxuser = { - isNormalUser = true; - extraGroups = ["wheel" "docker" "networkmanager"]; # Enable ‘sudo’ for the user. - password = "boxuser"; - packages = with pkgs; [ - fastfetch - ]; - }; networking.hostName = "box"; networking.firewall.enable = false; # This will be overridden by system/default.nix diff --git a/hosts/box/user.nix b/hosts/box/user.nix new file mode 100644 index 0000000..3694ee5 --- /dev/null +++ b/hosts/box/user.nix @@ -0,0 +1,11 @@ +{ config, pkgs, lib, ...}: +{ +users.users.boxuser = { + isNormalUser = true; + extraGroups = ["wheel" "docker" "networkmanager"]; # Enable ‘sudo’ for the user. + password = "boxuser"; + packages = with pkgs; [ + fastfetch + ]; + }; +}