tidied home/users
This commit is contained in:
parent
dcb2cc8c6a
commit
7ecf39516b
1 changed files with 51 additions and 17 deletions
|
|
@ -2,10 +2,29 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [ inputs.home-manager.nixosModules.default ];
|
imports = [
|
||||||
|
|
||||||
|
## Modules
|
||||||
|
inputs.home-manager.nixosModules.default # home-manager module
|
||||||
|
../../home # home-manager configuration
|
||||||
|
|
||||||
|
## misc.
|
||||||
|
../resources
|
||||||
|
|
||||||
|
## Users
|
||||||
|
#./u-username
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
## Primary user configuration -
|
||||||
|
## to create additional users, copy all options
|
||||||
|
## below to a new file akin to `u-username.nix`,
|
||||||
|
## or `u-username/default.nix` with more modules,
|
||||||
|
## making sure to replace all instances of
|
||||||
|
## `${primaryUser}` with the new username.
|
||||||
|
|
||||||
|
## System-level user declarations
|
||||||
users.users = {
|
users.users = {
|
||||||
## Define users like this
|
|
||||||
${primaryUser} = {
|
${primaryUser} = {
|
||||||
description = "Serenity Amalgam";
|
description = "Serenity Amalgam";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|
@ -15,36 +34,51 @@
|
||||||
## A catgirl's favourite shell
|
## A catgirl's favourite shell
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
## home-manager configuration
|
||||||
home-manager = {
|
home-manager = {
|
||||||
## Enables verbose output on activation
|
verbose = true; # enables verbose output on activation
|
||||||
verbose = true;
|
extraSpecialArgs = { # passes in specialArgs from flake.nix
|
||||||
## This line passes in specialArgs from flake.nix
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs outputs;
|
inherit inputs outputs;
|
||||||
inherit primaryUser;
|
inherit primaryUser;
|
||||||
inherit flakePath disksPath;
|
inherit flakePath disksPath;
|
||||||
};
|
};
|
||||||
## This line ensures all packages declared follow the
|
|
||||||
## same nix-channel we declared in the flake.nix
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
backupFileExtension = "backup";
|
|
||||||
users = {
|
users = {
|
||||||
|
|
||||||
## Also make sure to include a user definition here
|
|
||||||
${primaryUser} = {
|
${primaryUser} = {
|
||||||
## This is where the user configs/packages are imported
|
|
||||||
imports = [ ./u-${primaryUser}.nix ];
|
imports = [
|
||||||
|
|
||||||
|
## Home configuration -
|
||||||
|
## currently all users share the same home
|
||||||
|
## configuration, though each has separate
|
||||||
|
## home directories. Additional modules
|
||||||
|
## can be declared alongside `u-username/default.nix`
|
||||||
|
## and then imported in this section.
|
||||||
|
../../home
|
||||||
|
|
||||||
|
## Themes -
|
||||||
|
## to set a different theme for a user,
|
||||||
|
## create a theme by copying `SerenityOS.nix`
|
||||||
|
## as a template and import it in this section
|
||||||
|
## of the users individual configuration.
|
||||||
|
../resources/themes # imports base theme options
|
||||||
|
../resources/themes/SerenityOS.nix # user theme
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
username = "${primaryUser}";
|
username = "${primaryUser}";
|
||||||
homeDirectory = "/home/${primaryUser}";
|
homeDirectory = "/home/${primaryUser}";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
backupFileExtension = "backup"; # prevents errors on activation
|
||||||
|
useGlobalPkgs = true; # ensures all packages declared follow -
|
||||||
|
useUserPackages = true; # the same nix-channel as in the flake.nix
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue