summaryrefslogtreecommitdiff
path: root/options.nix
diff options
context:
space:
mode:
Diffstat (limited to 'options.nix')
-rw-r--r--options.nix496
1 files changed, 468 insertions, 28 deletions
diff --git a/options.nix b/options.nix
index e80b028..1a569c2 100644
--- a/options.nix
+++ b/options.nix
@@ -1,38 +1,478 @@
{
- user = "freya";
- fullName = "Freya Murphy";
- email = "freya@freyacat.org";
+ config,
+ lib,
+ ...
+}:
+with lib; let
+ # monitor options
+ monitorOpts = self: {
+ options = {
+ name = mkOption {
+ type = types.str;
+ description = "Name of the monitor.";
+ };
- theme = {
- colors = (import ./themes).catppuccin.mocha;
+ scale = mkOption {
+ type = types.float;
+ description = "Scaling factor of the monitor.";
+ default = 1.0;
+ };
- font = {
- size = 14;
- monospace = "monospace";
- regular = "SF Pro Text";
- header = "SF Pro Display Bold";
- icon = "Font Awesome 6 Pro";
+ bitdepth = mkOption {
+ type = types.int;
+ description = "Monitor color bitdepth";
+ default = 8;
+ };
};
+ };
+
+ # theme color options
+
+ colorOpts = self: {
+ options = {
+ name = mkOption {
+ type = types.str;
+ description = "Name of the theme";
+ };
+
+ author = mkOption {
+ type = types.str;
+ description = "Author of the theme";
+ };
+
+ text = mkOption {
+ type = types.str;
+ description = "Text color.";
+ };
+
+ subtext = mkOption {
+ type = types.str;
+ description = "Subtext color.";
+ };
+
+ base = mkOption {
+ type = types.str;
+ description = "Base background color.";
+ };
+
+ surface = mkOption {
+ type = types.str;
+ description = "Surface (lighter) background color.";
+ };
+
+ overlay = mkOption {
+ type = types.str;
+ description = "Overlay (light) background color.";
+ };
+
+ primary = mkOption {
+ type = types.str;
+ description = "Primary accent color";
+ };
+
+ success = mkOption {
+ type = types.str;
+ description = "Success color";
+ };
+
+ warning = mkOption {
+ type = types.str;
+ description = "Warning color";
+ };
+
+ error = mkOption {
+ type = types.str;
+ description = "Error color";
+ };
+
+ normal = {
+ black = mkOption {
+ type = types.str;
+ description = "Terminal black normal color";
+ };
+
+ red = mkOption {
+ type = types.str;
+ description = "Terminal red normal color";
+ };
+
+ green = mkOption {
+ type = types.str;
+ description = "Terminal green normal color";
+ };
+
+ yellow = mkOption {
+ type = types.str;
+ description = "Terminal yellow normal color";
+ };
+
+ blue = mkOption {
+ type = types.str;
+ description = "Terminal blue normal color";
+ };
+
+ magenta = mkOption {
+ type = types.str;
+ description = "Terminal magenta normal color";
+ };
+
+ cyan = mkOption {
+ type = types.str;
+ description = "Terminal cyan normal color";
+ };
+
+ white = mkOption {
+ type = types.str;
+ description = "Terminal white normal color";
+ };
- borderWidth = 2;
- opacity = 0.75;
- outerRadius = 8;
- innerRadius = 4;
- outerGap = 10;
- innerGap = 3;
- blur = false;
+ pink = mkOption {
+ type = types.str;
+ description = "Terminal pink (extended) normal color.";
+ };
- wallpaper = toString ./files/wallpapers/moran.jpg;
- lockscreen = toString ./files/wallpapers/flower.jpg;
- avatar = toString ./files/pfps/mioShun.jpg;
+ orange = mkOption {
+ type = types.str;
+ description = "Terminal orange (extended) normal color.";
+ };
+ };
+
+ bright = {
+ black = mkOption {
+ type = types.str;
+ description = "Terminal black bright color";
+ };
+
+ red = mkOption {
+ type = types.str;
+ description = "Terminal red bright color";
+ };
+
+ green = mkOption {
+ type = types.str;
+ description = "Terminal green bright color";
+ };
+
+ yellow = mkOption {
+ type = types.str;
+ description = "Terminal yellow bright color";
+ };
+
+ blue = mkOption {
+ type = types.str;
+ description = "Terminal blue bright color";
+ };
+
+ magenta = mkOption {
+ type = types.str;
+ description = "Terminal magenta bright color";
+ };
+
+ cyan = mkOption {
+ type = types.str;
+ description = "Terminal cyan bright color";
+ };
+
+ white = mkOption {
+ type = types.str;
+ description = "Terminal white bright color";
+ };
+
+ pink = mkOption {
+ type = types.str;
+ description = "Terminal pink (extended) bright color.";
+ };
+
+ orange = mkOption {
+ type = types.str;
+ description = "Terminal orange (extended) bright color.";
+ };
+ };
+ };
};
+in {
+ options = {
+ #
+ # System information
+ #
+ hostName = mkOption {
+ type = types.str;
+ description = "Hostname of the system.";
+ };
+ timeZone = mkOption {
+ type = types.str;
+ description = "System time zone";
+ default = "America/New_York";
+ };
+ stateVersion = mkOption {
+ type = types.str;
+ description = "NixOS State Version";
+ default = "25.11";
+ };
+
+ #
+ # System modules
+ #
+ battery = mkEnableOption {
+ description = "Install battery and power system services and programs.";
+ };
+ bluetooth = mkEnableOption {
+ description = "Install bluetooth system services and programs.";
+ };
+ fingerprint = mkEnableOption {
+ description = "Install fingerprint system services and programs.";
+ };
+ network = mkEnableOption {
+ description = "Install networking system services and programs.";
+ };
+ tpm = mkEnableOption {
+ description = "Enable system TPM";
+ };
+ minimal = mkEnableOption {
+ description = "Install only required system services, drivers, and programs.";
+ };
+
+ #
+ # Primary user of the system
+ #
+ user = mkOption {
+ type = types.str;
+ description = "Primary user of the system";
+ default = "freya";
+ };
+ fullName = mkOption {
+ type = types.str;
+ description = "Human readable name of the user";
+ default = "Freya Murphy";
+ };
+ email = mkOption {
+ type = types.str;
+ description = "Primary email of the user";
+ default = "freya@freyacat.org";
+ };
+ homePath = mkOption {
+ type = types.path;
+ description = "Home directory path of the user";
+ default = builtins.toPath "/home/${config.user}";
+ };
+ dotfilesPath = mkOption {
+ type = types.path;
+ description = "Dotfiles path inside the users home dir";
+ default = builtins.toPath "${config.homePath}/.config/nix";
+ };
+
+ #
+ # Monitors of the system
+ #
+ monitors = mkOption {
+ type = with types; listOf (submodule monitorOpts);
+ description = "Monitors of the system.";
+ default = [];
+ };
+
+ #
+ # Theme of the system
+ #
+ theme = {
+ colors = mkOption {
+ type = with types; (submodule colorOpts);
+ description = "color scheme";
+ default = (import ./themes).catppuccin.mocha;
+ };
+
+ opacity = mkOption {
+ type = types.float;
+ description = "Window opacity.";
+ default = 0.75;
+ };
+
+ # theme fonts
+ font = {
+ size = mkOption {
+ type = types.int;
+ description = "Theme primary font size.";
+ default = 14;
+ };
+
+ regular = mkOption {
+ type = types.str;
+ description = "Regular system font.";
+ default = "SF Pro Text";
+ };
+
+ monospace = mkOption {
+ type = types.str;
+ description = "Monospace system font.";
+ default = "monospace";
+ };
+
+ header = mkOption {
+ type = types.str;
+ description = "Header system font.";
+ default = "SF Pro Display Bold";
+ };
+
+ icon = mkOption {
+ type = types.str;
+ description = "Icon system font.";
+ default = "Font Awesome 6 Pro";
+ };
+ };
+
+ borderWidth = mkOption {
+ type = types.int;
+ description = "Theme border width";
+ default = 2;
+ };
+
+ outerRadius = mkOption {
+ type = types.int;
+ description = "Theme outer border radius.";
+ default = 8;
+ };
+
+ innerRadius = mkOption {
+ type = types.int;
+ description = "Theme inner border radius.";
+ default = 4;
+ };
+
+ outerGap = mkOption {
+ type = types.int;
+ description = "Theme outer gap/spacing.";
+ default = 10;
+ };
+
+ innerGap = mkOption {
+ type = types.int;
+ description = "Theme inner gap/spacing.";
+ default = 3;
+ };
- autoRun = [
- "wl-clip-persist -c both"
- "thunderbird"
- "discord"
- "element-desktop"
- ];
+ blur = mkEnableOption {
+ description = "If to enable blur in some programs.";
+ default = false;
+ };
- stateVersion = "25.11";
+ wallpaper = mkOption {
+ type = types.str;
+ description = "Path to wallpaper image";
+ default = toString ./files/wallpapers/moran.jpg;
+ };
+
+ lockscreen = mkOption {
+ type = types.str;
+ description = "Path to lockscreen image";
+ default = toString ./files/wallpapers/flower.jpg;
+ };
+
+ avatar = mkOption {
+ type = types.str;
+ description = "Path to avatar image";
+ default = toString ./files/pfps/mioShun.jpg;
+ };
+ };
+
+ #
+ # Default programs
+ #
+ default = {
+ browser = mkOption {
+ type = types.str;
+ description = "Default browser launch command.";
+ };
+ appLauncher = mkOption {
+ type = types.str;
+ description = "Default application launcher launch command.";
+ };
+ lockScreen = mkOption {
+ type = types.str;
+ description = "Default lock screen launch command.";
+ };
+ terminal = mkOption {
+ type = types.str;
+ description = "Default terminal launch command.";
+ };
+ session = mkOption {
+ type = types.str;
+ description = "Default systemd graphical session target.";
+ default = "graphical-session.target";
+ };
+ };
+
+ #
+ # Desktop applications to choose from
+ #
+ apps = {
+ alacritty.enable = mkEnableOption "Enable the alacritty terminal.";
+ astal.enable = mkEnableOption "Enable the astal gtk shell.";
+ kitty.enable = mkEnableOption "Enable the kitty terminal.";
+ mako.enable = mkEnableOption "Enable the mako notification daemon.";
+ hyprlock.enable = mkEnableOption "Enable the hyprlock lockscreen.";
+ waybar.enable = mkEnableOption "Enable the waybar bar.";
+ wofi.enable = mkEnableOption "Enable the wofi launcher.";
+ };
+
+ #
+ # Desktop browsers to choose from
+ #
+ browsers = {
+ firefox.enable = mkEnableOption "Enable the firefox browser.";
+ zen.enable = mkEnableOption "Enable the zen browser.";
+ };
+
+ #
+ # Desktops to choose from
+ #
+ desktops = {
+ enable = mkEnableOption "Enable baseline desktop utils and programs.";
+ wayland.enable = mkEnableOption "Enable wayland desktop components.";
+ ly.enable = mkEnableOption "Install the ly display manager.";
+ hyprland.enable = mkEnableOption "Install the Hyprland desktop.";
+ sway.enable = mkEnableOption "Install the sway desktop.";
+ };
+
+ #
+ # Gaming programs to choose from
+ #
+ gaming = {
+ homestuck.enable = mkEnableOption "Install the unofficial homestuck collection.";
+ minecraft.enable = mkEnableOption "Install the minecraft block game.";
+ steam.enable = mkEnableOption "Install the steam game launcher.";
+ };
+
+ #
+ # Development programming languages to enable
+ #
+ development = {
+ c.enable = mkEnableOption "Enable c/c++ development tools.";
+ java.enable = mkEnableOption "Enable java/kotlin development tools.";
+ lua.enable = mkEnableOption "Enable lua development tools.";
+ rust.enable = mkEnableOption "Enable rust development tools.";
+ web.enable = mkEnableOption "Enable web development tools.";
+ zig.enable = mkEnableOption "Enable zig development tools.";
+ };
+
+ #
+ # Virt/VM programs to enable
+ #
+ virt = {
+ docker.enable = mkEnableOption "Install docker and its components.";
+ qemu.enable = mkEnableOption "Install qemu and its components.";
+ };
+
+ #
+ # Programs to auto start on launch
+ #
+ autoRun = mkOption {
+ type = with types; listOf str;
+ description = "List of programs to auto run in a graphical environment.";
+ default = optionals config.desktops.enable [
+ "wl-clip-persist -c both"
+ "thunderbird"
+ "discord"
+ "element-desktop"
+ ];
+ };
+ };
}