mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-06 21:20:13 +00:00
initial refactoring
This commit is contained in:
35
platforms/nixos/modules/nmasur/profiles/base.nix
Normal file
35
platforms/nixos/modules/nmasur/profiles/base.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.nmasur.profiles.base;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options.nmasur.profiles.base.enable = lib.mkEnableOption "base Linux config";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# Allows us to declaritively set password
|
||||
users.mutableUsers = false;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.${config.user} = {
|
||||
|
||||
# Create a home directory for human user
|
||||
isNormalUser = true;
|
||||
|
||||
# Automatically create a password to start
|
||||
hashedPassword = config.passwordHash;
|
||||
|
||||
extraGroups = [
|
||||
"wheel" # Sudo privileges
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user