changed: oh nvm, last commit + this one = setting up hybrid unified/multi-user home-manager configs

This commit is contained in:
Serenity-F 2024-04-09 00:41:40 +10:00
parent 8fb26b9344
commit ae478562e6
6 changed files with 64 additions and 11 deletions

25
home/users/-template.nix Normal file
View file

@ -0,0 +1,25 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}:
{
imports = [
../home.nix
];
home = {
packages = with pkgs; [
];
stateVersion = "23.11";
};
}

17
home/users/default.nix Normal file
View file

@ -0,0 +1,17 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}:
{
imports = [
inputs.home-manager.nixosModules.default
./users.nix
];
}

102
home/users/users.nix Normal file
View file

@ -0,0 +1,102 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}:
{
imports = [
inputs.home-manager.nixosModules.default
];
# To add a user, copy the template in the users.users
# block and adjust it to match,then the same with the
# home-manager block below, then add new username.nix
# file in home/users by copying the existing template
#
# A suite of programs and applications has been provided
# via a shared home.nix file, as well as a common config
# across machines and users. Please do not add or remove
# entries outside of these mentioned locations, thankyou&
users.users = {
# TEMPLATE = {
# description = "TEMPLATE";
# isNormalUser = true;
# # be sure to change this with 'passwd'
# initialPassword = "password";
# shell = pkgs.fish;
# extraGroups = [
# "wheel"
# "networkmanager"
# ];
# };
coffee = {
description = "Coffee Beans";
isNormalUser = true;
# be sure to change this with 'passwd'
initialPassword = "password";
shell = pkgs.fish;
extraGroups = [
"wheel"
"networkmanager"
];
};
serenity = {
description = "Serenity Amalgam";
isNormalUser = true;
# be sure to change this with 'passwd'
initialPassword = "password";
shell = pkgs.fish;
extraGroups = [
"wheel"
"networkmanager"
];
};
};
home-manager = {
extraSpecialArgs = { inherit inputs outputs; };
useGlobalPkgs = true;
useUserPackages = true;
users = {
# TEMPLATE = {
# imports = [ ./-template.nix ];
# home = {
# username = "TEMPLATE";
# homeDirectory = "/home/TEMPLATE";
# stateVersion = "23.11";
# };
# };
coffee = {
imports = [ ./-coffee.nix ];
home = {
username = "coffee";
homeDirectory = "/home/coffee";
stateVersion = "23.11";
};
};
serenity = {
imports = [ ./-serenity.nix ];
home = {
username = "serenity";
homeDirectory = "/home/serenity";
stateVersion = "23.11";
};
};
};
};
}