refactor arguments to options

also change theme to colorscheme
This commit is contained in:
Noah Masur
2022-05-05 23:01:56 -04:00
parent 531c78ebe0
commit 417623965e
33 changed files with 415 additions and 347 deletions

View File

@ -1,6 +1,6 @@
# Replace sudo with doas
{ identity, ... }: {
{ config, ... }: {
security = {
@ -24,7 +24,7 @@
};
};
home-manager.users.${identity.user}.programs.fish.shellAliases = {
home-manager.users.${config.user}.programs.fish.shellAliases = {
sudo = "doas";
};
}

View File

@ -1,14 +1,10 @@
{ config, ... }:
{ ... }: {
{
config = {
# Service to determine location for time zone
services.geoclue2.enable = true;
location = { provider = "geoclue2"; };
# Service to determine location for time zone
services.geoclue2.enable = true;
location = { provider = "geoclue2"; };
# Enable local time based on time zone
services.localtime.enable = true;
# Enable local time based on time zone
services.localtime.enable = true;
};
}

View File

@ -1,17 +1,36 @@
{ identity, ... }: {
{ config, lib, ... }: {
# Define a user account. Don't forget to set a password with passwd.
users.users.${identity.user} = {
options = {
# Create a home directory for human user
isNormalUser = true;
user = lib.mkOption {
type = lib.types.str;
description = "Primary user of the system";
default = "nixos";
};
# Automatically create a password to start
initialPassword = "changeme";
passwordHash = lib.mkOption {
type = lib.types.str;
description = "Password created with mkpasswd -m sha-512";
};
extraGroups = [
"wheel" # Sudo privileges
];
};
config = {
# 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
];
};
};