diff options
author | Freya Murphy <freya@freyacat.org> | 2025-06-17 21:57:53 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-06-17 21:57:53 -0400 |
commit | e0f2eb724245e02cb247b644f0947261d8665318 (patch) | |
tree | 13f929df40059d37165cbe46be95a6404a1bbecb /config/default.nix | |
parent | refactor styles to new color scheme basis (diff) | |
download | dotfiles-nix-e0f2eb724245e02cb247b644f0947261d8665318.tar.gz dotfiles-nix-e0f2eb724245e02cb247b644f0947261d8665318.tar.bz2 dotfiles-nix-e0f2eb724245e02cb247b644f0947261d8665318.zip |
remove nix dir and move out all sub modules
Diffstat (limited to 'config/default.nix')
-rw-r--r-- | config/default.nix | 359 |
1 files changed, 359 insertions, 0 deletions
diff --git a/config/default.nix b/config/default.nix new file mode 100644 index 0000000..376b642 --- /dev/null +++ b/config/default.nix @@ -0,0 +1,359 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + # monitor options + + monitorOpts = self: { + options = { + + name = mkOption { + type = types.str; + description = "Name of the monitor."; + }; + + scale = mkOption { + type = types.float; + description = "Scaling factor of the monitor."; + default = 1.0; + }; + + }; + }; + + # 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"; + }; + + fg = mkOption { + type = types.str; + description = "Text color"; + }; + + bg = mkOption { + type = types.str; + description = "Background color"; + }; + + surface = { + fg = mkOption { + type = types.str; + description = "Surface text color"; + }; + bg = mkOption { + type = types.str; + description = "Surface background color"; + }; + }; + + hover = { + fg = mkOption { + type = types.str; + description = "Hover text color"; + }; + bg = mkOption { + type = types.str; + description = "Hover 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 normal color"; + }; + + blue = mkOption { + type = types.str; + description = "Terminal normal color"; + }; + + cyan = mkOption { + type = types.str; + description = "Terminal normal color"; + }; + + green = mkOption { + type = types.str; + description = "Terminal normal color"; + }; + + magenta = mkOption { + type = types.str; + description = "Terminal normal color"; + }; + + red = mkOption { + type = types.str; + description = "Terminal normal color"; + }; + + white = mkOption { + type = types.str; + description = "Terminal normal color"; + }; + + yellow = mkOption { + type = types.str; + description = "Terminal normal color"; + }; + }; + + bright = { + black = mkOption { + type = types.str; + description = "Terminal bright color"; + }; + + blue = mkOption { + type = types.str; + description = "Terminal bright color"; + }; + + cyan = mkOption { + type = types.str; + description = "Terminal bright color"; + }; + + green = mkOption { + type = types.str; + description = "Terminal bright color"; + }; + + magenta = mkOption { + type = types.str; + description = "Terminal bright color"; + }; + + red = mkOption { + type = types.str; + description = "Terminal bright color"; + }; + + white = mkOption { + type = types.str; + description = "Terminal bright color"; + }; + + yellow = mkOption { + type = types.str; + description = "Terminal bright color"; + }; + }; + + }; + }; + + stateVersion = "25.05"; + +in + +{ + + options = { + + # + # System information + # + hostName = mkOption { + type = types.str; + description = "Hostname of the system."; + }; + + # + # Primary user of the system + # + user = mkOption { + type = types.str; + description = "Primary user of the system"; + }; + fullName = mkOption { + type = types.str; + description = "Human readable name of the user"; + }; + email = mkOption { + type = types.str; + description = "Primary email of the user"; + }; + 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 { + default = []; + description = "Monitors of the system."; + type = with types; listOf (submodule monitorOpts); + }; + + # + # Theme of the system + # + theme = { + colors = mkOption { + type = with types; (submodule colorOpts); + description = "color scheme"; + }; + + opacity = mkOption { + type = types.float; + description = "Window opacity."; + }; + + # theme fonts + font = { + size = mkOption { + type = types.int; + description = "Theme primary font size."; + }; + + regular = mkOption { + type = types.str; + description = "Regular system font."; + }; + + monospace = mkOption { + type = types.str; + description = "Monospace system font."; + }; + + header = mkOption { + type = types.str; + description = "Header system font."; + }; + + icon = mkOption { + type = types.str; + description = "Icon system font."; + }; + + }; + + borderWidth = mkOption { + type = types.int; + description = "Theme border width"; + }; + + outerRadius = mkOption { + type = types.int; + description = "Theme outer border radius."; + }; + + innerRadius = mkOption { + type = types.int; + description = "Theme inner border radius."; + }; + + outerGap = mkOption { + type = types.int; + description = "Theme outer gap/spacing."; + }; + + innerGap = mkOption { + type = types.int; + description = "Theme inner gap/spacing."; + }; + + wallpaper = mkOption { + type = types.str; + description = "Path to wallpaper image"; + }; + + avatar = mkOption { + type = types.str; + description = "Path to avatar image"; + }; + }; + + # + # 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."; + }; + }; + + # + # 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 = []; + }; + + }; + + config = { + # use system packages in home manager + home-manager.useGlobalPkgs = true; + + # install user packages to /etc/profiles and not home directory + home-manager.useUserPackages = true; + + # allow unfree packages + nixpkgs.config.allowUnfree = true; + + # set state version + home-manager.users.${config.user}.home.stateVersion = stateVersion; + home-manager.users.root.home.stateVersion = stateVersion; + system.stateVersion = stateVersion; + }; + +} |