tweak: user-parts options
This commit is contained in:
parent
2fb777a82c
commit
4e5c848501
3 changed files with 45 additions and 22 deletions
|
|
@ -33,8 +33,8 @@
|
||||||
|
|
||||||
# user details
|
# user details
|
||||||
user = {
|
user = {
|
||||||
name = "serenity-F";
|
name = "${user-parts.git.username}";
|
||||||
email = "serenity-F@noreply.codeberg.org";
|
email = "${user-parts.git.email}";
|
||||||
|
|
||||||
# path to signing key
|
# path to signing key
|
||||||
signingKey = "/home/${user-parts.user.username}/.ssh/id_ed25519.pub";
|
signingKey = "/home/${user-parts.user.username}/.ssh/id_ed25519.pub";
|
||||||
|
|
|
||||||
|
|
@ -25,32 +25,19 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
options.nixos.user-parts = {
|
options.nixos.user-parts = {
|
||||||
|
|
||||||
user = lib.mkOption {
|
user = lib.mkOption {
|
||||||
type = lib.types.submodule {
|
type = lib.types.submodule {
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
username = lib.mkOption {
|
username = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "user";
|
default = "user";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
|
|
||||||
git = lib.mkOption {
|
avatar = lib.mkOption {
|
||||||
type = lib.types.submodule {
|
|
||||||
options = {
|
|
||||||
username = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "DontBlameMe";
|
default = "avatar.png";
|
||||||
};
|
|
||||||
email = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "dontblameme@noreply.codeberg.org";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
default = { };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home-directory = lib.mkOption {
|
home-directory = lib.mkOption {
|
||||||
|
|
@ -63,6 +50,38 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
shell = lib.mkOption {
|
||||||
|
type = lib.types.submodule {
|
||||||
|
options = {
|
||||||
|
user-shell = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "pkgs.fish";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
git = lib.mkOption {
|
||||||
|
type = lib.types.submodule {
|
||||||
|
options = {
|
||||||
|
username = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "serenity-F";
|
||||||
|
};
|
||||||
|
email = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "serenity-F@noreply.codeberg.org";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
# Make `nixos-variables` available as a module argument to all NixOS
|
# Make `nixos-variables` available as a module argument to all NixOS
|
||||||
|
|
|
||||||
|
|
@ -27,16 +27,20 @@
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# configure user here
|
||||||
nixos.user-parts = {
|
nixos.user-parts = {
|
||||||
user.username = "serenity";
|
user = {
|
||||||
|
username = "serenity";
|
||||||
|
avatar = "../../assets/media/avatars/carpet.jpg";
|
||||||
|
home-directory = "/home/serenity/"
|
||||||
|
default-locale = "en_AU.UTF-8";
|
||||||
|
};
|
||||||
|
git = {
|
||||||
|
username = "serenity-F";
|
||||||
|
email = "serenity-F@noreply.codeberg.org";
|
||||||
};
|
};
|
||||||
|
|
||||||
# configure user here
|
};
|
||||||
#config.user-options = {
|
|
||||||
#username = "serenity";
|
|
||||||
#dots = "/home/serenity/SerenityOS";
|
|
||||||
# see `modules/features/stylix.nix` for theme declared above
|
|
||||||
#};
|
|
||||||
|
|
||||||
# nixos user declaration
|
# nixos user declaration
|
||||||
users.users.${user-parts.user.username} = {
|
users.users.${user-parts.user.username} = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue