changed: oh nvm, last commit + this one = setting up hybrid unified/multi-user home-manager configs
This commit is contained in:
parent
8fb26b9344
commit
ae478562e6
6 changed files with 64 additions and 11 deletions
|
|
@ -14,7 +14,7 @@
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
|
||||||
# also split up configuration.nix and import pieces:
|
# also split up configuration.nix and import pieces:
|
||||||
./users.nix
|
../home/users/default.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
||||||
25
home/users/-template.nix
Normal file
25
home/users/-template.nix
Normal 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
17
home/users/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.home-manager.nixosModules.default
|
||||||
|
./users.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -13,11 +13,10 @@
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
# To add a user, copy the template and adjust it to match,
|
# To add a user, copy the template in the users.users
|
||||||
# then the same with the home-manager block below, then
|
# block and adjust it to match,then the same with the
|
||||||
# add new $user.nix file in home/users/ by copyoing the
|
# home-manager block below, then add new username.nix
|
||||||
# existing template
|
# file in home/users by copying the existing template
|
||||||
#
|
|
||||||
#
|
#
|
||||||
# A suite of programs and applications has been provided
|
# A suite of programs and applications has been provided
|
||||||
# via a shared home.nix file, as well as a common config
|
# via a shared home.nix file, as well as a common config
|
||||||
|
|
@ -29,6 +28,7 @@
|
||||||
# TEMPLATE = {
|
# TEMPLATE = {
|
||||||
# description = "TEMPLATE";
|
# description = "TEMPLATE";
|
||||||
# isNormalUser = true;
|
# isNormalUser = true;
|
||||||
|
# # be sure to change this with 'passwd'
|
||||||
# initialPassword = "password";
|
# initialPassword = "password";
|
||||||
# shell = pkgs.fish;
|
# shell = pkgs.fish;
|
||||||
# extraGroups = [
|
# extraGroups = [
|
||||||
|
|
@ -40,6 +40,7 @@
|
||||||
coffee = {
|
coffee = {
|
||||||
description = "Coffee Beans";
|
description = "Coffee Beans";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
# be sure to change this with 'passwd'
|
||||||
initialPassword = "password";
|
initialPassword = "password";
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
|
|
@ -51,6 +52,7 @@
|
||||||
serenity = {
|
serenity = {
|
||||||
description = "Serenity Amalgam";
|
description = "Serenity Amalgam";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
# be sure to change this with 'passwd'
|
||||||
initialPassword = "password";
|
initialPassword = "password";
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
|
|
@ -67,17 +69,26 @@
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
users = {
|
users = {
|
||||||
|
|
||||||
# coffee = {
|
# TEMPLATE = {
|
||||||
# imports = [ ../home/users/coffee.nix ];
|
# imports = [ ./-template.nix ];
|
||||||
# home = {
|
# home = {
|
||||||
# username = "coffee";
|
# username = "TEMPLATE";
|
||||||
# homeDirectory = "/home/coffee";
|
# homeDirectory = "/home/TEMPLATE";
|
||||||
# stateVersion = "23.11";
|
# stateVersion = "23.11";
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
coffee = {
|
||||||
|
imports = [ ./-coffee.nix ];
|
||||||
|
home = {
|
||||||
|
username = "coffee";
|
||||||
|
homeDirectory = "/home/coffee";
|
||||||
|
stateVersion = "23.11";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
serenity = {
|
serenity = {
|
||||||
imports = [ ../home/home.nix ];
|
imports = [ ./-serenity.nix ];
|
||||||
home = {
|
home = {
|
||||||
username = "serenity";
|
username = "serenity";
|
||||||
homeDirectory = "/home/serenity";
|
homeDirectory = "/home/serenity";
|
||||||
Loading…
Add table
Add a link
Reference in a new issue