From b227b7cb191ca5db3ab2e54a8f0930bc8a100d60 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Mon, 16 Sep 2024 12:35:14 +0300 Subject: [PATCH] Split user configuration --- common.nix | 3 ++- flake.nix | 2 +- users.nix | 17 ----------------- users/functionalhacker/configuration.nix | 9 +++++++++ home.nix => users/functionalhacker/home.nix | 8 ++++---- users/som/configuration.nix | 9 +++++++++ 6 files changed, 25 insertions(+), 23 deletions(-) delete mode 100644 users.nix create mode 100644 users/functionalhacker/configuration.nix rename home.nix => users/functionalhacker/home.nix (100%) create mode 100644 users/som/configuration.nix diff --git a/common.nix b/common.nix index 15b8ff2a..29bb3487 100644 --- a/common.nix +++ b/common.nix @@ -2,8 +2,9 @@ { imports = [ - ./users.nix ./gpg.nix + ./users/functionalhacker/configuration.nix + ./users/som/configuration.nix ]; system.stateVersion = "24.05"; diff --git a/flake.nix b/flake.nix index 19b0b102..e7095d3f 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,7 @@ homeConfigurations = { functionalhacker = home-manager.lib.homeManagerConfiguration { inherit pkgs; - modules = [ ./home.nix ]; + modules = [ ./users/functionalhacker/home.nix ]; }; }; }; diff --git a/users.nix b/users.nix deleted file mode 100644 index 1316b409..00000000 --- a/users.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, pkgs, ... }: - -{ - users.users = { - functionalhacker = { - isNormalUser = true; - description = "Marko"; - extraGroups = [ "networkmanager" "wheel" ]; - }; - - som = { - isNormalUser = true; - description = "Som"; - extraGroups = [ "networkmanager" ]; - }; - }; -} diff --git a/users/functionalhacker/configuration.nix b/users/functionalhacker/configuration.nix new file mode 100644 index 00000000..a750b41f --- /dev/null +++ b/users/functionalhacker/configuration.nix @@ -0,0 +1,9 @@ +{ config, pkgs, ... }: + +{ + users.users.functionalhacker = { + description = "Marko"; + isNormalUser = true; + extraGroups = [ "networkmanager" "wheel" ]; + }; +} diff --git a/home.nix b/users/functionalhacker/home.nix similarity index 100% rename from home.nix rename to users/functionalhacker/home.nix index 9a3b88d8..5934169a 100644 --- a/home.nix +++ b/users/functionalhacker/home.nix @@ -2,14 +2,14 @@ { home = { + username = "functionalhacker"; + homeDirectory = "/home/functionalhacker"; + stateVersion = "24.05"; + packages = with pkgs; [ neofetch pass zsh ]; - - username = "functionalhacker"; - homeDirectory = "/home/functionalhacker"; - stateVersion = "24.05"; }; } diff --git a/users/som/configuration.nix b/users/som/configuration.nix new file mode 100644 index 00000000..5a7a4124 --- /dev/null +++ b/users/som/configuration.nix @@ -0,0 +1,9 @@ +{ config, pkgs, ... }: + +{ + users.users.som = { + description = "Som"; + isNormalUser = true; + extraGroups = [ "networkmanager" ]; + }; +}