-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
preferences: move to option based setup
- Loading branch information
1 parent
fb736df
commit 75d778a
Showing
5 changed files
with
132 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{lib, ... }: | ||
{ | ||
options.myOptions = { | ||
# ---- SYSTEM SETTINGS ---- # | ||
systemSettings = { | ||
systemarch = lib.mkOption { | ||
type = lib.types.singleLineStr; | ||
default = "x86_64-linux"; | ||
description = "System architecture"; | ||
}; | ||
hostname = lib.mkOption { | ||
type = lib.types.singleLineStr; | ||
default = "NixOS"; | ||
description = "Hostname"; | ||
}; | ||
timezone = lib.mkOption { | ||
type = lib.types.singleLineStr; | ||
default = "America/New_York"; | ||
description = "Timezone"; | ||
}; | ||
locale = lib.mkOption { | ||
type = lib.types.singleLineStr; | ||
default = "en_US.UTF-8"; | ||
description = "Locale"; | ||
}; | ||
additionalLocale = lib.mkOption { | ||
type = lib.types.singleLineStr; | ||
default = "en_IN"; | ||
description = "Additonal Locale"; | ||
}; | ||
stableversion = lib.mkOption { | ||
type = lib.types.singleLineStr; | ||
default = "24.11"; | ||
description = "Stable version (DO NOT CHANGE)"; | ||
}; | ||
secureboot = lib.mkEnableOption "Secure Boot"; | ||
laptop = lib.mkEnableOption "Laptop features"; | ||
}; | ||
|
||
# ----- USER SETTINGS ----- # | ||
userSettings = { | ||
username = lib.mkOption { | ||
type = lib.types.singleLineStr; | ||
default = "alice"; | ||
description = "Username"; | ||
}; | ||
name = lib.mkOption { | ||
type = lib.types.singleLineStr; | ||
default = "Alice"; | ||
description = "Name/Identifier"; | ||
}; | ||
gitname = lib.mkOption { | ||
type = lib.types.singleLineStr; | ||
default = "Alice"; | ||
description = "Name used for Git operations"; | ||
}; | ||
gitemail = lib.mkOption { | ||
type = lib.types.singleLineStr; | ||
default = "[email protected]"; | ||
description = "Email used for Git operations"; | ||
}; | ||
gpgkey = lib.mkOption { | ||
type = lib.types.singleLineStr; | ||
description = "GPG key ID for Git operations"; | ||
}; | ||
shell = lib.mkOption { | ||
type = lib.types.enum [ "zsh" "bash" ]; | ||
default = "zsh"; | ||
description = "User default shell"; | ||
}; | ||
}; | ||
|
||
servicesSettings = { | ||
adb = lib.mkEnableOption "ADB"; | ||
avahi = lib.mkEnableOption "Avahi"; | ||
nginx = lib.mkEnableOption "Nginx"; | ||
containers = lib.mkEnableOption "Containers"; | ||
tpm = lib.mkEnableOption "TPM"; | ||
virtualisation = lib.mkEnableOption "Virtualisation"; | ||
printing = lib.mkEnableOption "Printing"; | ||
apparmor = lib.mkEnableOption "AppArmor"; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,37 @@ | ||
{...}: | ||
{ | ||
# ---- SYSTEM SETTINGS ---- # | ||
systemSettings = { | ||
systemarch = "x86_64-linux"; # system arch | ||
hostname = "Ainz-NIX"; # hostname | ||
timezone = "Asia/Kolkata"; # select timezone | ||
locale = "en_US.UTF-8"; # select locale | ||
localeoverride = "en_IN"; | ||
stableversion = "24.11"; | ||
secureboot = true; | ||
laptop = false; | ||
}; | ||
myOptions = { | ||
# ---- SYSTEM SETTINGS ---- # | ||
systemSettings = { | ||
systemarch = "x86_64-linux"; # system arch | ||
hostname = "Ainz-NIX"; # hostname | ||
timezone = "Asia/Kolkata"; # select timezone | ||
locale = "en_US.UTF-8"; # select locale | ||
additionalLocale = "en_IN"; | ||
stableversion = "24.11"; | ||
secureboot = true; | ||
laptop = false; | ||
}; | ||
|
||
# ----- USER SETTINGS ----- # | ||
userSettings = { | ||
username = "masum"; # username | ||
name = "Masum R."; # name/identifier | ||
gitname = "John Titor"; # git name | ||
gitemail = "[email protected]"; # git email | ||
gpgkey = "29B0514F4E3C1CC0"; # gpg key | ||
shell = "zsh"; # user default shell # choose either zsh or bash | ||
}; | ||
# ----- USER SETTINGS ----- # | ||
userSettings = { | ||
username = "masum"; # username | ||
name = "Masum R."; # name/identifier | ||
gitname = "John Titor"; # git name | ||
gitemail = "[email protected]"; # git email | ||
gpgkey = "29B0514F4E3C1CC0"; # gpg key | ||
shell = "zsh"; # user default shell # choose either zsh or bash | ||
}; | ||
|
||
servicesSettings = { | ||
adb = false; | ||
avahi = false; | ||
nginx = true; | ||
containers = false; | ||
tpm = false; | ||
virtualisation = false; | ||
printing = false; | ||
apparmor = false; | ||
servicesSettings = { | ||
adb = false; | ||
avahi = false; | ||
nginx = true; | ||
containers = false; | ||
tpm = false; | ||
virtualisation = false; | ||
printing = false; | ||
apparmor = false; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters