From 32a7e59b93a9c3748cd6aeca3d4fc9dadf8e0f59 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Sun, 11 Jan 2026 08:03:58 -0600 Subject: move various configs into modules where they belong --- modules/desktop/nixos/fonts.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/desktop') diff --git a/modules/desktop/nixos/fonts.nix b/modules/desktop/nixos/fonts.nix index 3f10d92..5ac17ec 100644 --- a/modules/desktop/nixos/fonts.nix +++ b/modules/desktop/nixos/fonts.nix @@ -1,8 +1,7 @@ {pkgs, ...}: { fonts = { enableDefaultPackages = false; - # fontDir.enable = true; fontconfig.enable = true; - packages = [pkgs.nerd-fonts.iosevka pkgs.ibm-plex]; # for terminal (blackbox or foot) + packages = [pkgs.nerd-fonts.iosevka pkgs.ibm-plex]; # for terminal (blackbox or foot or ghostty) }; } -- cgit v1.3.1 From dbc5cb478c7fad1c1750421486252f0a5d98ef9c Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Sun, 11 Jan 2026 13:36:45 -0600 Subject: now there's docs --- flake.lock | 59 ++++------------------- flake.nix | 15 ++++-- lib/lib.nix | 14 ++++-- lib/nix-furnace/mkSystem.nix | 82 ++++++++++++++++++++----------- modules/boot/options.nix | 9 ++-- modules/desktop/options.nix | 112 +++++++++++++++++++++++-------------------- modules/options.nix | 3 ++ modules/secrets/options.nix | 10 +++- modules/services/options.nix | 43 ++++++++++++----- modules/terminal/options.nix | 10 ++-- modules/user/options.nix | 2 + 11 files changed, 197 insertions(+), 162 deletions(-) (limited to 'modules/desktop') diff --git a/flake.lock b/flake.lock index 5832b7a..dae6702 100644 --- a/flake.lock +++ b/flake.lock @@ -150,24 +150,6 @@ "type": "github" } }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1765835352, - "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "a34fae9c08a15ad73f295041fec82323541400a9", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -323,18 +305,18 @@ "type": "github" } }, - "nixpkgs-lib": { + "nmd": { "locked": { - "lastModified": 1765674936, - "narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85", + "lastModified": 1759339018, + "narHash": "sha256-13x2gvgnnr3cJ5qp7zz7ZnUSrg0DF/sU9KiwZkML6J0=", + "owner": "gvolpe", + "repo": "nmd", + "rev": "5ecbe493e22de649e79c8e51dc5e92659940e081", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", + "owner": "gvolpe", + "repo": "nmd", "type": "github" } }, @@ -371,8 +353,8 @@ "lanzaboote": "lanzaboote", "nixos-facter-modules": "nixos-facter-modules", "nixpkgs": "nixpkgs", - "tmux-tsunami": "tmux-tsunami", - "tsnsrv": "tsnsrv" + "nmd": "nmd", + "tmux-tsunami": "tmux-tsunami" } }, "rust-overlay": { @@ -507,27 +489,6 @@ "type": "github" } }, - "tsnsrv": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1767001347, - "narHash": "sha256-uRm4oWMFUBSmXgofOngMWIyA/yUmLlon6f3XoFTWvBA=", - "owner": "boinkor-net", - "repo": "tsnsrv", - "rev": "8f3fbf69e1517612c0fde9be27522e12c2ddc238", - "type": "github" - }, - "original": { - "owner": "boinkor-net", - "repo": "tsnsrv", - "type": "github" - } - }, "utils": { "inputs": { "systems": "systems_2" diff --git a/flake.nix b/flake.nix index 6f71eb4..35afadd 100644 --- a/flake.nix +++ b/flake.nix @@ -38,14 +38,13 @@ flake = false; }; - tsnsrv = { - url = "github:boinkor-net/tsnsrv"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + nmd.url = "github:gvolpe/nmd"; }; outputs = inputs: let - inherit (import ./lib/nix-furnace/mkSystem.nix) mkNixosSystem; + inherit (import ./lib/nix-furnace/mkSystem.nix) mkNixosSystem genDocs; + + buildPkgs = import inputs.nixpkgs {system = "x86_64-linux";}; in rec { nixosConfigurations."mercury" = mkNixosSystem { inherit inputs; @@ -63,6 +62,12 @@ username = "collin"; }; + packages."x86_64-linux".docs = buildPkgs.callPackage genDocs { + inherit inputs; + pkgs = buildPkgs; + hostname = "mercury"; + }; + deploy.nodes."ganymede" = { hostname = "ganymede"; sshUser = "root"; diff --git a/lib/lib.nix b/lib/lib.nix index 00cc334..56f0dfd 100644 --- a/lib/lib.nix +++ b/lib/lib.nix @@ -32,15 +32,21 @@ let config, }: let inherit (lib) mkOption mkEnableOption; - mkProgramOption = name: { - enable = mkEnableOption "whether to enable ${name}"; - theme = mkOption { + + mkThemeOption = name: + mkOption { + description = "Pre-made theme for ${name}"; type = lib.types.enum ["catppuccin" "adwaita" "kanagawa"]; default = config.collinux.theme; + defaultText = "config.collinux.theme"; }; + + mkProgramOption = name: { + enable = mkEnableOption "whether to enable ${name}"; + theme = mkThemeOption name; }; in { - inherit mkProgramOption; + inherit mkProgramOption mkThemeOption; }; in { inherit globimport; diff --git a/lib/nix-furnace/mkSystem.nix b/lib/nix-furnace/mkSystem.nix index 85f952c..2766082 100644 --- a/lib/nix-furnace/mkSystem.nix +++ b/lib/nix-furnace/mkSystem.nix @@ -4,6 +4,32 @@ let listModules = getSubdirs ../../modules; + nixosModules = hostname: + [ + ../../modules/options.nix + ../../hosts/${hostname}/config.nix + (lazyImport ../../hosts/${hostname}/nixos.nix) + ] + ++ (listModules + |> (builtins.map (modName: [ + (lazyImport ../../modules/${modName}/options.nix) + (lazyImport ../../modules/${modName}/nixos/default.nix) + ])) + |> my-lib.flatten); + + hjemModules = hostname: + [ + ../../modules/options.nix + ../../hosts/${hostname}/config.nix + (lazyImport ../../hosts/${hostname}/hjem.nix) + ] + ++ (listModules + |> (builtins.map (modName: [ + (lazyImport ../../modules/${modName}/options.nix) + (lazyImport ../../modules/${modName}/hjem/default.nix) + ])) + |> my-lib.flatten); + mkNixosSystem = { inputs, hostname, @@ -17,20 +43,7 @@ let ../../hosts/${hostname}/config.nix # Nixos-sided modules - { - imports = - [ - ../../modules/options.nix - ../../hosts/${hostname}/config.nix - (lazyImport ../../hosts/${hostname}/nixos.nix) - ] - ++ (listModules - |> (builtins.map (modName: [ - (lazyImport ../../modules/${modName}/options.nix) - (lazyImport ../../modules/${modName}/nixos/default.nix) - ])) - |> my-lib.flatten); - } + {imports = nixosModules hostname;} # Hjem-sided modules { @@ -38,18 +51,7 @@ let inputs.hjem.nixosModules.hjem ]; hjem = { - extraModules = - [ - ../../modules/options.nix - ../../hosts/${hostname}/config.nix - (lazyImport ../../hosts/${hostname}/hjem.nix) - ] - ++ (listModules - |> (builtins.map (modName: [ - (lazyImport ../../modules/${modName}/options.nix) - (lazyImport ../../modules/${modName}/hjem/default.nix) - ])) - |> my-lib.flatten); + extraModules = hjemModules hostname; specialArgs = {inherit inputs my-lib;}; users.${username} = { enable = true; @@ -60,6 +62,32 @@ let } ]; }; + + genDocs = { + lib, + pkgs, + inputs, + hostname, + ... + }: let + eval = lib.evalModules { + modules = listModules |> (builtins.map (m: (lazyImport ../../modules/${m}/options.nix))); + specialArgs = { + inherit my-lib pkgs; + }; + check = false; + }; + + optionsDoc = pkgs.nixosOptionsDoc { + inherit (eval) options; + }; + in + pkgs.runCommand "options-doc.md" { + buildInputs = [pkgs.pandoc]; + } '' + mkdir -p $out + cat ${optionsDoc.optionsCommonMark} | pandoc -t html -o - | tee $out/index.html + ''; in { - inherit mkNixosSystem; + inherit mkNixosSystem genDocs; } diff --git a/modules/boot/options.nix b/modules/boot/options.nix index 2f670f9..9e85570 100644 --- a/modules/boot/options.nix +++ b/modules/boot/options.nix @@ -1,9 +1,11 @@ { + my-lib, config, lib, ... }: let - inherit (lib) mkOption mkEnableOption types; + inherit (lib) mkOption mkEnableOption; + inherit (my-lib.options {inherit lib config;}) mkThemeOption; in { options = { collinux.boot = { @@ -15,10 +17,7 @@ in { }; plymouth = { enable = mkEnableOption "plymouth bootsplash"; - theme = mkOption { - type = types.enum ["catppuccin" "adwaita"]; - default = config.collinux.theme; - }; + theme = mkThemeOption "plymouth"; }; secureBoot.enable = mkEnableOption "lanzaboote"; }; diff --git a/modules/desktop/options.nix b/modules/desktop/options.nix index 1067d0b..e59ed68 100644 --- a/modules/desktop/options.nix +++ b/modules/desktop/options.nix @@ -6,7 +6,7 @@ ... }: let inherit (lib) mkOption mkEnableOption types; - inherit (my-lib.options {inherit lib config;}) mkProgramOption; + inherit (my-lib.options {inherit lib config;}) mkProgramOption mkThemeOption; in { options = { collinux.desktop = { @@ -17,12 +17,14 @@ in { wallpaper_cmd = mkOption { type = types.str; default = "${lib.getExe pkgs.wbg} -s ${config.collinux.desktop.wallpaper}"; + internal = true; }; greetd = { enable = mkEnableOption "greetd greeter"; command = mkOption { type = lib.types.str; + internal = true; default = let cfg = config.collinux.desktop; in @@ -40,7 +42,6 @@ in { niri.enable = mkEnableOption "niri"; components = { - # waybar = mkProgramOption "waybar"; dunst = mkProgramOption "dunst"; fuzzel = mkProgramOption "fuzzel"; }; @@ -49,54 +50,63 @@ in { gtk = { enable = mkEnableOption "gtk theming"; - theme = mkOption { - type = types.enum ["catppuccin" "adwaita" "kanagawa"]; - default = config.collinux.theme; - }; - cursor_data = { - package = mkOption { - type = lib.types.package; - default = - if (config.collinux.desktop.gtk.theme == "catppuccin") - then pkgs.catppuccin-cursors.mochaDark - else if (config.collinux.desktop.gtk.theme == "adwaita") - then pkgs.vanilla-dmz - else null; - }; - name = mkOption { - type = lib.types.str; - default = - if (config.collinux.desktop.gtk.theme == "catppuccin") - then "catppuccin-mocha-dark-cursors" - else if (config.collinux.desktop.gtk.theme == "adwaita") - then "Vanilla-DMZ" - else null; + theme = mkThemeOption "gtk"; + + cursor_data = mkOption { + internal = true; + type = lib.types.submodule { + package = mkOption { + internal = true; + type = lib.types.package; + }; + name = mkOption { + internal = true; + type = lib.types.str; + }; }; + default = + if config.collinux.desktop.gtk.theme == "catppuccin" + then { + name = "catppuccin-mocha-dark-cursors"; + package = pkgs.catppuccin-cursors.mochaDark; + } + else if config.collinux.gtk.theme == "adwaita" + then { + name = "Vanilla-DMZ"; + package = pkgs.vanilla-dmz; + } + else null; }; - theme_data = { - package = mkOption { - type = lib.types.package; - default = - if (config.collinux.desktop.gtk.theme == "catppuccin") - then - (pkgs.catppuccin-gtk.override { - variant = "mocha"; - accents = ["blue"]; - size = "standard"; - }) - else if (config.collinux.desktop.gtk.theme == "adwaita") - then pkgs.adw-gtk3 - else ""; - }; - name = mkOption { - type = lib.types.str; - default = - if (config.collinux.desktop.gtk.theme == "catppuccin") - then "catppuccin-mocha-blue-standard" - else if (config.collinux.desktop.gtk.theme == "adwaita") - then "adw-gtk3" - else ""; + + theme_data = mkOption { + internal = true; + type = lib.types.submodule { + package = mkOption { + internal = true; + type = lib.types.package; + }; + name = mkOption { + internal = true; + type = lib.types.str; + }; }; + + default = + if config.collinux.desktop.gtk.theme == "catppuccin" + then { + package = pkgs.catppuccin-gtk.override { + variant = "mocha"; + accents = ["blue"]; + size = "standard"; + }; + name = "catppuccin-mocha-blue-standard"; + } + else if config.collinux.desktop.gtk.theme == "adwaita" + then { + package = pkgs.adw-gtk3; + name = "adw-gtk3"; + } + else null; }; }; @@ -106,11 +116,9 @@ in { profileName = mkOption { type = types.str; default = config.collinux.user.name; + internal = true; }; - theme = mkOption { - type = types.enum ["none" "catppuccin" "adwaita" "kanagawa"]; - default = config.collinux.theme; - }; + theme = mkThemeOption "firefox"; extensions.zotero.enable = mkOption { description = "install Zotero Connector for Firefox"; default = config.collinux.desktop.programs.research.enable; @@ -122,7 +130,7 @@ in { ghostty.enable = mkEnableOption "ghostty"; alacritty.enable = mkEnableOption "alacritty"; - research.enable = mkEnableOption "zathura, Xournal++, Zotero, Zotero Connector"; + research.enable = mkEnableOption "zathura, Xournal++, Zotero"; }; }; }; diff --git a/modules/options.nix b/modules/options.nix index 65de32e..8ecf1d7 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -7,15 +7,18 @@ in { options = { collinux.theme = mkOption { + description = "System-wide theme"; type = types.enum ["catppuccin" "adwaita" "kanagawa"]; }; collinux.palette = let colorOption = lib.mkOption { type = lib.types.strMatching "^([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$"; + internal = true; }; in lib.mkOption { + internal = true; type = lib.types.submodule { options = { base00 = colorOption; diff --git a/modules/secrets/options.nix b/modules/secrets/options.nix index de15f50..fa53d6f 100644 --- a/modules/secrets/options.nix +++ b/modules/secrets/options.nix @@ -3,25 +3,33 @@ in { options = { collinux.secrets = lib.mkOption { + description = "Atribute set of secrets"; type = lib.types.attrsOf ( lib.types.submodule ({config, ...}: { options = { name = mkOption { type = lib.types.str; default = config._module.args.name; + internal = true; + }; + file = mkOption { + description = "Name of the file in the /run/secrets.d"; + type = lib.types.path; }; - file = mkOption {type = lib.types.path;}; mode = mkOption { + description = "Permissions mode of the decrypted secret in a format understood by chmod"; type = lib.types.str; default = "0400"; }; owner = mkOption { + description = "Owner of the decrypted secret file"; type = lib.types.str; default = "0"; }; path = mkOption { type = lib.types.str; default = "/run/secrets.d/${config.name}"; + description = "Path where the decrypted secret is installed"; }; }; }) diff --git a/modules/services/options.nix b/modules/services/options.nix index 16bf5ac..231c949 100644 --- a/modules/services/options.nix +++ b/modules/services/options.nix @@ -18,36 +18,47 @@ in { networkd = { enable = mkEnableOption "use systemd-networkd"; - ssid = mkOption {type = lib.types.str;}; - pskFile = mkOption {type = lib.types.str;}; + ssid = mkOption { + description = "SSID for this network"; + type = lib.types.str; + }; + pskFile = mkOption { + description = "Absolute path to a file containing the pre-shared key for this network"; + type = lib.types.str; + example = "/run/secrets.d/wifi-psk"; + }; static = lib.mkOption { + description = "Set a static IP address for this device on this network. Set to null to use DHCP"; type = lib.types.nullOr (lib.types.submodule { options = { - ip = mkOption {type = ip_addr_cidr;}; - gateway = mkOption {type = ip_addr;}; + ip = mkOption { + description = "IP address"; + type = ip_addr_cidr; + }; + gateway = mkOption { + description = "default gateway"; + type = ip_addr; + }; }; }); default = null; }; }; - tailscale = { - enable = mkEnableOption "tailscale"; - tailnet = mkOption { - type = lib.types.str; - default = "tail7cca06.ts.net"; - }; - }; + + tailscale.enable = mkEnableOption "tailscale"; + sshd = { enable = mkEnableOption "OpenSSH server"; bind_host = mkOption { + description = "The IP address on which OpenSSH will listen for incomming connections. The default, `0.0.0.0`, means 'all interfaces'"; type = ip_addr; default = "0.0.0.0"; }; }; }; - audio.enable = mkEnableOption "pipewire + wireplumber"; + audio.enable = mkEnableOption "pipewire and wireplumber"; bluetooth = { enable = mkEnableOption "bluetooth"; @@ -64,24 +75,28 @@ in { service_name = mkOption { type = lib.types.str; + internal = true; }; bind_host = mkOption { + description = "The IP address on which ${service_name} will listen for incoming connections. The default, `0.0.0.0`, means 'all interfaces'"; type = ip_addr; default = "0.0.0.0"; }; port = mkOption { + description = "The port on which ${service_name} will listen for incomming connections"; type = lib.types.port; default = default_port; }; root_url = mkOption { + description = "The final url that this service will be hosted on. Required for caddy, otherwise optional"; type = lib.types.nullOr lib.types.str; }; caddy = { enable = mkEnableOption "Automatically create caddy configurations for this service"; - bind_tailscale = mkEnableOption "Bind the service to {service_name}.{tailnet}"; + bind_tailscale = mkEnableOption "Bind the service to ${service_name}.{tailnet}"; }; }; in { @@ -103,7 +118,9 @@ in { caddy = { enable = mkEnableOption "caddy https server"; envFile = mkOption { + description = "Absolute path to file that contains environment variables for caddy operations"; type = lib.types.str; + example = "/run/secrets.d/caddy-env"; }; }; }; diff --git a/modules/terminal/options.nix b/modules/terminal/options.nix index 25e0eb4..8207be3 100644 --- a/modules/terminal/options.nix +++ b/modules/terminal/options.nix @@ -6,7 +6,7 @@ ... }: let inherit (lib) mkOption mkEnableOption types; - inherit (my-lib.options {inherit lib config;}) mkProgramOption; + inherit (my-lib.options {inherit lib config;}) mkProgramOption mkThemeOption; in { options = { collinux.terminal = { @@ -37,10 +37,11 @@ in { git = { enable = mkEnableOption "git"; userName = mkOption { + description = "Public name uses for git"; type = types.str; - default = config.collinux.user.name; }; userEmail = mkOption { + description = "Public email used for git"; type = types.str; }; installKey = mkEnableOption "automatically install github authentication key"; @@ -48,10 +49,7 @@ in { helix = { enable = mkEnableOption "helix text editor"; - theme = mkOption { - type = lib.types.enum ["catppuccin" "adwaita" "kanagawa"]; - default = config.collinux.theme; - }; + theme = mkThemeOption "helix"; hardMode = mkOption { type = types.bool; description = "Disable arrow keys and mouse"; diff --git a/modules/user/options.nix b/modules/user/options.nix index 1024494..d805bf9 100644 --- a/modules/user/options.nix +++ b/modules/user/options.nix @@ -4,9 +4,11 @@ in { options = { collinux.user = { name = mkOption { + description = "Name for the sole user of this system"; type = types.str; }; isAdmin = mkOption { + description = "Whether this user is an admin"; type = types.bool; default = true; }; -- cgit v1.3.1 From bd5c9fd6ecb52095e463a2edc0d3ee32f43c849d Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Wed, 14 Jan 2026 13:34:55 -0600 Subject: configurable greeter for greetd --- hosts/mercury/config.nix | 9 ++++-- modules/desktop/nixos/greeters/greetd.nix | 28 +++++++++++++---- modules/desktop/options.nix | 50 +++++++++++++++---------------- 3 files changed, 53 insertions(+), 34 deletions(-) (limited to 'modules/desktop') diff --git a/hosts/mercury/config.nix b/hosts/mercury/config.nix index 3427a2e..657c4e5 100644 --- a/hosts/mercury/config.nix +++ b/hosts/mercury/config.nix @@ -6,10 +6,15 @@ desktop = { wallpaper = ./wallpaper.jpg; gtk.enable = true; - greetd.enable = true; + greetd = { + enable = true; + autologin.enable = true; + }; wm = { - niri.enable = true; + # niri.enable = true; + sway.enable = true; + components = { fuzzel.enable = true; dunst.enable = true; diff --git a/modules/desktop/nixos/greeters/greetd.nix b/modules/desktop/nixos/greeters/greetd.nix index b612c86..02af31f 100644 --- a/modules/desktop/nixos/greeters/greetd.nix +++ b/modules/desktop/nixos/greeters/greetd.nix @@ -1,19 +1,35 @@ { + pkgs, config, lib, ... }: let cfg = config.collinux.desktop.greetd; + + session = + if cfg.cosmic-greeter.enable + then { + command = "${pkgs.cosmic-greeter}/bin/cosmic-greeter-start"; + user = config.collinux.user.name; + } + else if cfg.autologin.enable + then { + user = config.collinux.user.name; + command = with config.collinux.desktop; + if (wm.sway.enable && !gnome.enable && !wm.niri.enable) + then lib.getExe pkgs.sway + else if (wm.niri.enable && !gnome.enable && !wm.sway.enable) + then "${pkgs.niri}/bin/niri-session" + else null; + } + else {}; in lib.mkIf cfg.enable { services.greetd = { enable = true; - settings = rec { - initial_session = { - command = cfg.command; - user = config.collinux.user.name; - }; - default_session = initial_session; + settings = { + initial_session = session; + default_session = session; }; }; } diff --git a/modules/desktop/options.nix b/modules/desktop/options.nix index e59ed68..a4ba38d 100644 --- a/modules/desktop/options.nix +++ b/modules/desktop/options.nix @@ -22,18 +22,8 @@ in { greetd = { enable = mkEnableOption "greetd greeter"; - command = mkOption { - type = lib.types.str; - internal = true; - default = let - cfg = config.collinux.desktop; - in - if (cfg.wm.sway.enable && !cfg.gnome.enable && !cfg.wm.niri.enable) - then lib.getExe pkgs.sway - else if (cfg.wm.niri.enable && !cfg.gnome.enable && !cfg.wm.sway.enable) - then "${pkgs.niri}/bin/niri-session" - else null; - }; + autologin.enable = mkEnableOption "autologin"; + cosmic-greeter.enable = mkEnableOption "cosmic-greeter"; }; gdm.enable = mkEnableOption "gdm display manager"; @@ -55,13 +45,15 @@ in { cursor_data = mkOption { internal = true; type = lib.types.submodule { - package = mkOption { - internal = true; - type = lib.types.package; - }; - name = mkOption { - internal = true; - type = lib.types.str; + options = { + package = mkOption { + internal = true; + type = lib.types.package; + }; + name = mkOption { + internal = true; + type = lib.types.str; + }; }; }; default = @@ -81,13 +73,15 @@ in { theme_data = mkOption { internal = true; type = lib.types.submodule { - package = mkOption { - internal = true; - type = lib.types.package; - }; - name = mkOption { - internal = true; - type = lib.types.str; + options = { + package = mkOption { + internal = true; + type = lib.types.package; + }; + name = mkOption { + internal = true; + type = lib.types.str; + }; }; }; @@ -141,6 +135,10 @@ in { assertion = with config.collinux.desktop; !(gdm.enable && greetd.enable); message = "Can't enable gdm and greetd at the same time"; } + { + assertion = with config.collinux.desktop.greetd; enable && !(autologin.enable && cosmic-greeter.enable); + message = "Can't use autologin and cosmic-greeter at the same time"; + } ]; }; } -- cgit v1.3.1 From 06aadaacf55900cc1cf4be411c2dde1297656cd1 Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Fri, 16 Jan 2026 17:38:20 -0600 Subject: work on fuzzel configuration --- modules/desktop/hjem/wm/fuzzel.nix | 40 +++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'modules/desktop') diff --git a/modules/desktop/hjem/wm/fuzzel.nix b/modules/desktop/hjem/wm/fuzzel.nix index 7d61255..f9a9edb 100644 --- a/modules/desktop/hjem/wm/fuzzel.nix +++ b/modules/desktop/hjem/wm/fuzzel.nix @@ -8,34 +8,38 @@ settings = { main = { - prompt = ""; - dpi-aware = false; + prompt = builtins.fromJSON ''"\u200B"''; # https://discourse.nixos.org/t/how-can-i-put-an-nonprintable-character-in-a-nix-expression/47750/7 - font = "Iosevka Nerd Font"; - line-height = 25; + font = "Iosevka Nerd Font:size=9"; + use-bold = true; + line-height = 16; lines = 10; - width = 30; + width = 20; - horizontal-pad = 8; - vertical-pad = 8; + anchor = "bottom-right"; + + horizontal-pad = 0; + vertical-pad = 0; }; border = { radius = 0; width = 3; }; - colors = with config.collinux.palette; { - background = "${base00}99"; - border = "ffffff00"; - input = base05; - match = base13; - placeholder = base03; - text = base01; - prompt = base01; + colors = with config.collinux.palette; let + transparent = "#ffffff00"; + in { + background = transparent; + border = transparent; + input = transparent; + match = "#${base13}ff"; + placeholder = "#${base03}ff"; + text = "#${base04}ff"; + prompt = "#${base05}ff"; - selection = "${base01}5a"; - selection-match = base13; - selection-text = base05; + selection = transparent; + selection-match = "#${base13}ff"; + selection-text = "#${base05}ff"; }; }; in -- cgit v1.3.1 From c077985d73e021de9b7878dc8864352aff9ad1bd Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Sun, 18 Jan 2026 07:03:30 -0600 Subject: betterfox --- flake.lock | 17 +++++++++++++++++ flake.nix | 4 ++++ modules/desktop/hjem/programs/firefox.nix | 2 ++ 3 files changed, 23 insertions(+) (limited to 'modules/desktop') diff --git a/flake.lock b/flake.lock index fbaf251..581d824 100644 --- a/flake.lock +++ b/flake.lock @@ -23,6 +23,22 @@ "type": "github" } }, + "betterfox": { + "flake": false, + "locked": { + "lastModified": 1765663165, + "narHash": "sha256-zGpfQk2gY6ifxIk1fvCk5g5SIFo+o8RItmw3Yt3AeCg=", + "owner": "yokoffing", + "repo": "Betterfox", + "rev": "eee6e58b2b0ee10a59efb6586a5db07ae181d8c7", + "type": "github" + }, + "original": { + "owner": "yokoffing", + "repo": "Betterfox", + "type": "github" + } + }, "crane": { "locked": { "lastModified": 1767461147, @@ -346,6 +362,7 @@ "root": { "inputs": { "agenix": "agenix", + "betterfox": "betterfox", "deploy-rs": "deploy-rs", "disko": "disko", "firefox-csshacks": "firefox-csshacks", diff --git a/flake.nix b/flake.nix index 35afadd..742cf5c 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,10 @@ url = "github:MrOtherGuy/firefox-csshacks"; flake = false; }; + betterfox = { + url = "github:yokoffing/Betterfox"; + flake = false; + }; nmd.url = "github:gvolpe/nmd"; }; diff --git a/modules/desktop/hjem/programs/firefox.nix b/modules/desktop/hjem/programs/firefox.nix index b5ea433..2078e3c 100644 --- a/modules/desktop/hjem/programs/firefox.nix +++ b/modules/desktop/hjem/programs/firefox.nix @@ -27,6 +27,8 @@ in }; }; + ".mozilla/firefox/collin/user.js".source = "${inputs.betterfox}/user.js"; + ".mozilla/firefox/collin/chrome/userChrome.css".text = mkCssHacks ( # (lib.optional (cfg.theme == "adwaita") "window_control_placeholder_support") ++ [ -- cgit v1.3.1