From 6a49646d5e423b15532f6a767fe94af41cb65df6 Mon Sep 17 00:00:00 2001 From: kiri Date: Tue, 3 Mar 2026 16:30:58 +0100 Subject: [PATCH] Commit --- GEMINI.md | 70 ++- _ref/den | 1 - _ref/quasigod-nixconfig | 1 - flake.lock | 99 ++- flake.nix | 2 + modules/apps/bitwarden.nix | 2 +- modules/apps/email.nix | 200 +++---- modules/apps/gemini.nix | 10 + modules/apps/helium.nix | 12 - modules/apps/vicinae.nix | 53 ++ modules/core/xdg.nix | 20 +- modules/desktop/_noctalia-config.nix | 564 ++++++++++++++++++ modules/desktop/niri.nix | 129 ++-- modules/desktop/noctalia.nix | 547 +---------------- modules/desktop/theme.nix | 44 ++ modules/dev/dev.nix | 8 + modules/dev/neovim/default.nix | 1 - .../neovim/lua-config/lua/plugins/coding.lua | 3 - modules/dev/podman.nix | 10 + modules/dev/shell.nix | 22 +- modules/dev/terminal.nix | 2 +- modules/keys.nix | 67 ++- modules/profiles/workstation.nix | 39 +- modules/secrets/secrets.yaml | 14 +- modules/secrets/sops.nix | 48 +- modules/services/actual.nix | 38 +- modules/services/caddy.nix | 25 +- modules/services/gitea.nix | 58 +- modules/services/openssh.nix | 30 +- modules/services/radicale.nix | 4 +- modules/services/vaultwarden.nix | 43 +- modules/users/kiri.nix | 5 + programs/helium.nix | 101 ---- result | 1 + 34 files changed, 1229 insertions(+), 1044 deletions(-) delete mode 160000 _ref/den delete mode 160000 _ref/quasigod-nixconfig create mode 100644 modules/apps/gemini.nix delete mode 100644 modules/apps/helium.nix create mode 100644 modules/apps/vicinae.nix create mode 100644 modules/desktop/_noctalia-config.nix create mode 100644 modules/desktop/theme.nix create mode 100644 modules/dev/podman.nix delete mode 100644 programs/helium.nix create mode 120000 result diff --git a/GEMINI.md b/GEMINI.md index da5afe5..85af444 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -1,27 +1,51 @@ -# Gemini Context & Project Guidelines +# Den Configuration Framework: Core Concepts & Guidelines -This file serves as persistent contextual memory for the Gemini CLI when working on this NixOS configuration project. +## Overview +This NixOS configuration uses `den`, a declarative pipeline framework that shifts away from static module wiring to a system of **Context Transformation** and **Context-Aware Aspects**. -## Architecture: The `den` Framework -This repository manages NixOS and Home Manager configurations using the `den` framework. The approach here drastically differs from standard NixOS setups. +**Important Resource:** The `den` repository is vendored at `_ref/den/` and its official documentation can be found at `_ref/den/docs`. Use these resources (via `read_file`, `grep_search`, or `list_directory`) anytime you need to gain a deeper understanding of den's internal behavior or available features. -### Core Concepts & Rules -1. **Freeform Schemas over Custom Options:** Do not use legacy Nix module options (`lib.mkOption`, `lib.mkIf`) to define simple user/host properties (like email addresses, domains, or names). Instead, attach properties directly to the host or user definition objects in `hosts//default.nix` or `users/.nix`. Den's freeform entity schemas will pass these through the context pipeline automatically. -2. **Parametric Aspects:** When a module requires access to host or user variables (like `user.email` or `host.domain`), the aspect MUST be wrapped in `den.lib.parametric`. - * *Example:* `lux.myapp = den.lib.parametric { includes = [ ({ user, ... }: { ... }) ]; };` -3. **Decentralized Host & User Definitions:** Do not centralize host definitions in a single file. Follow the `quasigod` reference structure: - * **Hosts** declare themselves in `modules/hosts//default.nix` (e.g., `den.hosts.x86_64-linux.orion = { ... }`). - * **Users** bind themselves to hosts in their own user files in `modules/users/.nix` (e.g., `den.hosts.x86_64-linux.orion.users.kiri = userAccount // { ... }`). -4. **App Categories & Naming:** - * `/modules/desktop/`: GUI, Wayland, display managers, WMs. - * `/modules/dev/`: Developer tools, terminal, neovim. - * `/modules/apps/`: User-level software (PIM, Bitwarden, MPV, Email). Note: `pim.nix` stands for Personal Information Management and is an app, not a user definition. - * `/modules/services/`: System-level daemons (Caddy, Gitea, Vaultwarden). - * `/modules/profiles/`: Aggregations (like workstation/server). +## 1. Core Principles +* **Aspects (`__functor` pattern):** Configurations are functions of context, not static sets. An aspect (e.g., `{ host, user, ... }: { ... }`) inspects the context it receives and produces configs across domains (`nixos`, `homeManager`, `darwin`) simultaneously. +* **Context (`den.ctx`):** Attribute sets containing data (like `host` or `user`). Contexts are *named* (e.g., `ctx.hm-host` vs `ctx.host`) to provide guarantees (e.g., `hm-host` proves Home Manager detection passed). +* **The Pipeline (`into`):** Data flows through a defined pipeline. One context transforms `into` others (e.g., a single `ctx.host` fans out into multiple `ctx.user` contexts). +* **Providers (`provides`):** Aspects use `provides` to declare sub-aspects or inject configurations across contexts. -### Common Pitfalls & Lessons Learned -* **`home-manager` vs `homeManager`:** When defining class configurations inside a parametric function, the key for Home Manager is strictly `homeManager` (camelCase). Writing `home-manager.programs...` will cause evaluation errors because `home-manager` is not the class name used by the schema. -* **`user` is an Object:** In context parameters (`{ user, ... }:`), `user` is an attribute set, not a string. Do not interpolate it directly as a string (`"${user}"`); use `${user.name}`. -* **Namespace Inclusion:** The project uses the `lux` namespace. When an aspect needs to pull in other aspects, use `with lux; [ ... ]` rather than writing out `den.ful.lux...` repeatedly. -* **Abstracting Paths:** Never hardcode `/home/`. Inside `homeManager` modules, use `config.home.homeDirectory`. Inside `nixos` modules (like SOPS), use `/home/${user.name}` where `user` is provided by the parametric context. -* **Git Status dependency:** When moving, creating, or renaming files (`mv`, `mkdir`), they must be staged in Git (`git add `) before running `nix flake check`, otherwise the flake evaluator will not see the changes and will throw "undefined variable" or "path does not exist" errors. \ No newline at end of file +## 2. Idiomatic Structure +* **Declaration vs. Configuration:** `den.hosts` and `den.homes` declare *what* exists (hosts, architectures, users). `den.aspects` define *how* they are configured. +* **Domain Spanning:** A single aspect file handles all relevant domains (e.g., a `git` aspect defines both `nixos.environment.systemPackages` and `homeManager.programs.git`). +* **Composition:** High-level aspects `include` lower-level aspect functions. + +## 3. The Context Pipeline +1. **`ctx.host` `{ host }`:** Resolves the host's primary aspect (`den.aspects.`). +2. **`ctx.default` `{ host }`:** Activates global defaults for the host. +3. **`ctx.user` `{ host, user }`:** Fans out to create a context for each user on the host. Resolves user aspects (`den.aspects.`). *Crucially, host aspects can configure users here, and user aspects can configure the host.* +4. **`ctx.default` `{ host, user }`:** Activates global defaults for the user. +5. **`ctx.hm-host` `{ host }`:** If the host supports Home Manager and has HM users, this safely imports the HM module. +6. **`ctx.hm-user` `{ host, user }`:** For HM users, their config is forwarded into the host's `home-manager.users.`. + +## 4. Configuration Placement +* **Host Aspect (`den.aspects.`):** Hardware, networking, system services. Can define default `homeManager` settings for all its users. +* **User Aspect (`den.aspects.`):** Dotfiles, user packages, shell preferences. Can define required `nixos` settings for every host the user is on. +* **Global Defaults (`den.ctx.default`):** Universal settings (e.g., `stateVersion`, `den._.define-user`). **Note:** Prefer using more specific contexts (like `den.ctx.host` or `den.ctx.user`) over `den.ctx.default` whenever possible. Always write it as `den.ctx.default` rather than `den.default` to make it clear it is a context. +* **Feature Aspects:** Granular aspects included conditionally via ` take.exactly` (or `den.lib.take.exactly`). + +## 5. Common Pitfalls +* **The "Lax Context" Duplicate Config Bug:** A function like `({ host, ... }: { ... })` in `den.default.includes` runs at both the `ctx.host` and `ctx.user` stages, causing duplicate config errors. + * **Fix:** Use ` take.exactly ({ host }: ...)` to run only at the host stage. +* **Missing `parametric` Wrapper:** Custom aspect trees (not auto-created by Den) that fail to forward context to their includes will throw `error: function 'anonymous lambda' called without required argument`. + * **Fix:** Wrap the custom aspect in ` parametric`. +* **Home Manager Silent Failures:** If the detection gate fails (wrong OS, missing `"homeManager"` class on user, or missing `inputs.home-manager`), HM configs won't generate. + +## 6. Essential Library Functions (`den.lib.*` & Batteries) +* `take.exactly`: Executes only if context matches arguments exactly. +* `take.atLeast`: Executes if context has at least the requested arguments. +* `parametric`: Wrapper to make an aspect forward context to its `includes`. +* `_.forward`: Translates config from one domain (e.g., custom class) to another. +* **Batteries (`den._.*`):** Built-in parametric aspects (e.g., `define-user`, `user-shell`, `tty-autologin`, `unfree`). + +## 7. Useful Commands +* **`nix-search-tv`:** Use this command to look up docs for relevant options. + * Examples: `nix-search-tv preview "home-manager/ home.packages"`, `nix-search-tv preview "nixos/ environment.systemPackages"`. + * Prefix with `nixpkgs/` for nixpkgs docs. + * Use `nix-search-tv print` to print all available options and packages (filter output to avoid bloating context). diff --git a/_ref/den b/_ref/den deleted file mode 160000 index 311d77a..0000000 --- a/_ref/den +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 311d77a3afee7c0f3cd3d4f494b5129b17c12aa2 diff --git a/_ref/quasigod-nixconfig b/_ref/quasigod-nixconfig deleted file mode 160000 index e8204cf..0000000 --- a/_ref/quasigod-nixconfig +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e8204cf923d7d828f94b3c798f0efc5afaaa8d4d diff --git a/flake.lock b/flake.lock index 93e07ea..45bd1e6 100644 --- a/flake.lock +++ b/flake.lock @@ -83,6 +83,24 @@ } }, "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "nvf", @@ -136,6 +154,25 @@ "type": "github" } }, + "lux-pkgs": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1772315038, + "narHash": "sha256-YL6NQd97AiZGe/Q4ZWxZaguKVHL0pfNvP/Cqgl/oh4g=", + "ref": "refs/heads/main", + "rev": "d7660146e70475c096bed703e4dad687a58e13dc", + "revCount": 1, + "type": "git", + "url": "ssh://gitea@orion/kiri/lux-pkgs" + }, + "original": { + "type": "git", + "url": "ssh://gitea@orion/kiri/lux-pkgs" + } + }, "mnw": { "locked": { "lastModified": 1770419553, @@ -177,7 +214,7 @@ "inputs": { "niri-stable": "niri-stable", "niri-unstable": "niri-unstable", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" @@ -231,7 +268,7 @@ }, "nix-wrapper-modules": { "inputs": { - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1772285008, @@ -294,6 +331,21 @@ "type": "github" } }, + "nixpkgs-lib_2": { + "locked": { + "lastModified": 1769909678, + "narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "72716169fe93074c333e8d0173151350670b824c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1772047000, @@ -327,6 +379,22 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1772173633, + "narHash": "sha256-MOH58F4AIbCkh6qlQcwMycyk5SWvsqnS/TCfnqDlpj4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c0f3d81a7ddbc2b1332be0d8481a672b4f6004d6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1771848320, "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", @@ -342,7 +410,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1771207753, "narHash": "sha256-b9uG8yN50DRQ6A7JdZBfzq718ryYrlmGgqkRm9OOwCE=", @@ -358,7 +426,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1772173633, "narHash": "sha256-BHKMR414WpfUddNyUtx2GR1VPl0R9sWGQs/opgYm9rc=", @@ -371,7 +439,7 @@ "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1771848320, "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", @@ -387,7 +455,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1771008912, "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", @@ -403,7 +471,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { "lastModified": 1771207753, "narHash": "sha256-b9uG8yN50DRQ6A7JdZBfzq718ryYrlmGgqkRm9OOwCE=", @@ -421,15 +489,15 @@ }, "noctalia": { "inputs": { - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_7", "noctalia-qs": "noctalia-qs" }, "locked": { - "lastModified": 1772283575, - "narHash": "sha256-Avh/W7rFoyx9JAgwkMfpQG7J9+AtytZ6EmqFLtADPh4=", + "lastModified": 1772316133, + "narHash": "sha256-5fiLc9OwZ5GaPRRhuOPo0MOVNiszmLaEp8t+2iNOx9Y=", "owner": "noctalia-dev", "repo": "noctalia-shell", - "rev": "d886dd7861b8e6ff53dad320c53f665930396b02", + "rev": "cb9d6c3e2a4e716d6eb986439b19007387a2f6c1", "type": "github" }, "original": { @@ -462,10 +530,10 @@ "nvf": { "inputs": { "flake-compat": "flake-compat", - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts_3", "mnw": "mnw", "ndg": "ndg", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_8", "systems": "systems" }, "locked": { @@ -490,10 +558,11 @@ "flake-parts": "flake-parts", "home-manager": "home-manager", "import-tree": "import-tree", + "lux-pkgs": "lux-pkgs", "niri": "niri", "nix-wrapper-modules": "nix-wrapper-modules", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "noctalia": "noctalia", "nvf": "nvf", "sops-nix": "sops-nix" @@ -501,7 +570,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_9" }, "locked": { "lastModified": 1772048434, diff --git a/flake.nix b/flake.nix index 773911c..6f1269f 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,8 @@ noctalia.url = "github:noctalia-dev/noctalia-shell"; nvf.url = "github:notashelf/nvf"; sops-nix.url = "github:Mic92/sops-nix"; + + lux-pkgs.url = "git+ssh://gitea@orion/kiri/lux-pkgs"; }; outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules); diff --git a/modules/apps/bitwarden.nix b/modules/apps/bitwarden.nix index 596a8e6..63e3e6d 100644 --- a/modules/apps/bitwarden.nix +++ b/modules/apps/bitwarden.nix @@ -24,7 +24,7 @@ programs.rbw = { enable = true; settings = { - pinentry = pkgs.pinentry-qt; + pinentry = pkgs.pinentry-gnome3; }; }; }; diff --git a/modules/apps/email.nix b/modules/apps/email.nix index 687e163..21d7512 100644 --- a/modules/apps/email.nix +++ b/modules/apps/email.nix @@ -1,121 +1,117 @@ { den, ... }: { - lux.email = den.lib.parametric { - includes = [ - ( - { user, ... }: + lux.email = den.lib.take.atLeast ( + { user, ... }: + { + homeManager = + { ... }: { - homeManager = - { ... }: - { - programs.thunderbird = { - enable = true; - profiles.${user.name} = { - isDefault = true; - withExternalGnupg = true; - settings = { - # LAYOUT: Force 3-Pane Vertical View (Folders | List | Message) - "mail.ui.display.message_pane_vertical" = true; + programs.thunderbird = { + enable = true; + profiles.${user.name} = { + isDefault = true; + withExternalGnupg = true; + settings = { + # LAYOUT: Force 3-Pane Vertical View (Folders | List | Message) + "mail.ui.display.message_pane_vertical" = true; - # APPEARANCE: Enable "Cards View" (modern multi-line list) - # Note: 'cards' is the value for the new view - "mail.ui.display.thread_pane_view_type" = "cards"; + # APPEARANCE: Enable "Cards View" (modern multi-line list) + # Note: 'cards' is the value for the new view + "mail.ui.display.thread_pane_view_type" = "cards"; - # DENSITY: "Compact" is usually cleaner for tech-savvy users - "mail.uidensity" = 1; # 0=Default, 1=Compact, 2=Touch + # DENSITY: "Compact" is usually cleaner for tech-savvy users + "mail.uidensity" = 1; # 0=Default, 1=Compact, 2=Touch - # PRIVACY & CLEANUP - "privacy.donottrackheader.enabled" = true; - "mail.server.server2.hidden" = true; # Hide "Local Folders" + # PRIVACY & CLEANUP + "privacy.donottrackheader.enabled" = true; + "mail.server.server2.hidden" = true; # Hide "Local Folders" - # Start page disable for faster boot - "mailnews.start_page.enabled" = false; + # Start page disable for faster boot + "mailnews.start_page.enabled" = false; - # Disable the "Get a new email address" feature in account manager - "mail.provider.enabled" = false; + # Disable the "Get a new email address" feature in account manager + "mail.provider.enabled" = false; - "layout.css.devPixelsPerPx" = 0.85; - }; - }; + "layout.css.devPixelsPerPx" = 0.85; }; + }; + }; - accounts.email.accounts = { - main = { - enable = true; - primary = true; - address = user.email; - imap = { - authentication = "plain"; - host = "taylor.mxrouting.net"; - port = 993; - tls.enable = true; - }; - realName = user.realName; - smtp = { - authentication = "plain"; - host = "taylor.mxrouting.net"; - port = 465; - tls.enable = true; - }; - userName = user.email; + accounts.email.accounts = { + main = { + enable = true; + primary = true; + address = user.email; + imap = { + authentication = "plain"; + host = "taylor.mxrouting.net"; + port = 993; + tls.enable = true; + }; + realName = user.realName; + smtp = { + authentication = "plain"; + host = "taylor.mxrouting.net"; + port = 465; + tls.enable = true; + }; + userName = user.email; - thunderbird.enable = true; - }; + thunderbird.enable = true; + }; - old = { - enable = true; - address = user.emails.old; - imap = { - authentication = "plain"; - host = "taylor.mxrouting.net"; - port = 993; - tls.enable = true; - }; - realName = user.realName; - smtp = { - authentication = "plain"; - host = "taylor.mxrouting.net"; - port = 465; - tls.enable = true; - }; - userName = user.emails.old; + old = { + enable = true; + address = user.emails.old; + imap = { + authentication = "plain"; + host = "taylor.mxrouting.net"; + port = 993; + tls.enable = true; + }; + realName = user.realName; + smtp = { + authentication = "plain"; + host = "taylor.mxrouting.net"; + port = 465; + tls.enable = true; + }; + userName = user.emails.old; - thunderbird.enable = true; - }; + thunderbird.enable = true; + }; - uni = { - enable = true; - flavor = "outlook.office365.com"; - address = user.emails.uni; - realName = user.realName; - userName = user.emails.uni; - thunderbird = { - enable = true; - settings = id: { - "mail.smtpserver.smtp_${id}.authMethod" = 10; - "mail.server.server_${id}.authMethod" = 10; - }; - }; - }; - - work = { - enable = true; - flavor = "outlook.office365.com"; - address = user.emails.work; - realName = user.realName; - userName = user.emails.work; - thunderbird = { - enable = true; - settings = id: { - "mail.smtpserver.smtp_${id}.authMethod" = 10; - "mail.server.server_${id}.authMethod" = 10; - }; - }; + uni = { + enable = true; + flavor = "outlook.office365.com"; + address = user.emails.uni; + realName = user.realName; + userName = user.emails.uni; + thunderbird = { + enable = true; + settings = id: { + "mail.smtpserver.smtp_${id}.authMethod" = 10; + "mail.server.server_${id}.authMethod" = 10; }; }; }; - } - ) - ]; - }; + + work = { + enable = true; + flavor = "outlook.office365.com"; + address = user.emails.work; + realName = user.realName; + userName = user.emails.work; + thunderbird = { + enable = true; + settings = id: { + "mail.smtpserver.smtp_${id}.authMethod" = 10; + "mail.server.server_${id}.authMethod" = 10; + }; + }; + }; + }; + }; + } + ); } diff --git a/modules/apps/gemini.nix b/modules/apps/gemini.nix new file mode 100644 index 0000000..f367d85 --- /dev/null +++ b/modules/apps/gemini.nix @@ -0,0 +1,10 @@ +{ + lux.gemini = { + homeManager = { + programs.gemini-cli.enable = true; + + # Needed for extensions + programs.npm.enable = true; + }; + }; +} diff --git a/modules/apps/helium.nix b/modules/apps/helium.nix deleted file mode 100644 index 9814380..0000000 --- a/modules/apps/helium.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ ... }: -{ - lux.helium = { - homeManager = - { pkgs, ... }: - { - home.packages = [ - (pkgs.callPackage ../../programs/helium.nix { }) - ]; - }; - }; -} diff --git a/modules/apps/vicinae.nix b/modules/apps/vicinae.nix new file mode 100644 index 0000000..d22f790 --- /dev/null +++ b/modules/apps/vicinae.nix @@ -0,0 +1,53 @@ +{ ... }: +{ + lux.vicinae = { + homeManager = { + programs.vicinae = { + enable = true; + systemd.enable = true; + + themes = { + kanagawa-wave = { + meta = { + version = 1; + name = "Kanagawa Wave"; + description = "A dark theme inspired by the colors of the famous painting by Katsushika Hokusai."; + variant = "dark"; + inherits = "vicinae-dark"; + }; + colors = { + core = { + background = "#1F1F28"; + foreground = "#DCD7BA"; + secondary_background = "#16161D"; + border = "#2A2A37"; + accent = "#7E9CD8"; + }; + accents = { + blue = "#7E9CD8"; + green = "#98BB6C"; + magenta = "#D27E99"; + orange = "#FFA066"; + purple = "#957FB8"; + red = "#E82424"; + yellow = "#E6C384"; + cyan = "#7AA89F"; + }; + input = { + border_focus = "colors.core.accent"; + }; + }; + }; + }; + + settings = { + theme = { + light.name = "kanagawa-wave"; + dark.name = "kanagawa-wave"; + }; + }; + }; + + }; + }; +} diff --git a/modules/core/xdg.nix b/modules/core/xdg.nix index e14ac90..f9bd2df 100644 --- a/modules/core/xdg.nix +++ b/modules/core/xdg.nix @@ -2,7 +2,7 @@ { lux.xdg = { homeManager = - { config, ... }: + { config, pkgs, ... }: let homeDir = config.home.homeDirectory; localDir = "${homeDir}/.local"; @@ -34,6 +34,24 @@ publicShare = "${localDir}/public"; templates = "${localDir}/templates"; }; + + mimeApps = { + enable = true; + defaultApplicationPackages = with pkgs; [ + sioyek + vivaldi + neovim + ]; + }; + + terminal-exec = { + enable = true; + settings = { + default = [ + "kitty.desktop" + ]; + }; + }; }; }; }; diff --git a/modules/desktop/_noctalia-config.nix b/modules/desktop/_noctalia-config.nix new file mode 100644 index 0000000..95c23c6 --- /dev/null +++ b/modules/desktop/_noctalia-config.nix @@ -0,0 +1,564 @@ +{ + settingsVersion = 53; + bar = { + barType = "simple"; + position = "top"; + monitors = []; + density = "default"; + showOutline = false; + showCapsule = false; + capsuleOpacity = 1; + capsuleColorKey = "none"; + widgetSpacing = 6; + contentPadding = 2; + fontScale = 1; + backgroundOpacity = 0; + useSeparateOpacity = false; + floating = false; + marginVertical = 6; + marginHorizontal = 8; + frameThickness = 0; + frameRadius = 0; + outerCorners = false; + hideOnOverview = true; + displayMode = "always_visible"; + autoHideDelay = 500; + autoShowDelay = 150; + showOnWorkspaceSwitch = true; + widgets = { + left = [ + { + colorizeSystemIcon = "none"; + customIconPath = ""; + enableColorization = false; + icon = "rocket"; + iconColor = "none"; + id = "Launcher"; + useDistroLogo = false; + } + { + characterCount = 2; + colorizeIcons = true; + emptyColor = "secondary"; + enableScrollWheel = true; + focusedColor = "primary"; + followFocusedScreen = false; + groupedBorderOpacity = 1; + hideUnoccupied = true; + iconScale = 0.75; + id = "Workspace"; + labelMode = "none"; + occupiedColor = "secondary"; + pillSize = 0.6; + showApplications = true; + showBadge = false; + showLabelsOnlyWhenOccupied = true; + unfocusedIconsOpacity = 1; + } + ]; + center = [ + { + clockColor = "none"; + customFont = ""; + formatHorizontal = "HH:mm ddd, MMM dd"; + formatVertical = "HH mm - dd MM"; + id = "Clock"; + tooltipFormat = "HH:mm ddd, MMM dd"; + useCustomFont = false; + } + ]; + right = [ + { + blacklist = []; + chevronColor = "none"; + colorizeIcons = false; + drawerEnabled = true; + hidePassive = false; + id = "Tray"; + pinned = []; + } + { + displayMode = "onhover"; + iconColor = "none"; + id = "Volume"; + middleClickCommand = "pwvucontrol || pavucontrol"; + textColor = "none"; + } + { + colorizeDistroLogo = false; + colorizeSystemIcon = "none"; + customIconPath = ""; + enableColorization = false; + icon = "noctalia"; + id = "ControlCenter"; + useDistroLogo = false; + } + ]; + }; + screenOverrides = []; + }; + general = { + avatarImage = "/home/kiri/.face"; + dimmerOpacity = 0; + showScreenCorners = false; + forceBlackScreenCorners = false; + scaleRatio = 1; + radiusRatio = 0.5; + iRadiusRatio = 0.5; + boxRadiusRatio = 0; + screenRadiusRatio = 0; + animationSpeed = 2; + animationDisabled = false; + compactLockScreen = false; + lockScreenAnimations = false; + lockOnSuspend = true; + showSessionButtonsOnLockScreen = true; + showHibernateOnLockScreen = false; + enableLockScreenMediaControls = false; + enableShadows = true; + shadowDirection = "bottom_right"; + shadowOffsetX = 2; + shadowOffsetY = 3; + language = ""; + allowPanelsOnScreenWithoutBar = true; + showChangelogOnStartup = true; + telemetryEnabled = false; + enableLockScreenCountdown = true; + lockScreenCountdownDuration = 10000; + autoStartAuth = false; + allowPasswordWithFprintd = false; + clockStyle = "custom"; + clockFormat = "hh\\nmm"; + passwordChars = false; + lockScreenMonitors = []; + lockScreenBlur = 0; + lockScreenTint = 0; + keybinds = { + keyUp = [ + "Up" + "Ctrl+K" + ]; + keyDown = [ + "Down" + "Ctrl+J" + ]; + keyLeft = [ + "Left" + "Ctrl+H" + ]; + keyRight = [ + "Right" + "Ctrl+L" + ]; + keyEnter = [ + "Return" + ]; + keyEscape = [ + "Esc" + ]; + keyRemove = [ + "Del" + ]; + }; + reverseScroll = false; + }; + ui = { + fontDefault = "Comfortaa Medium"; + fontFixed = "FiraCode Nerd Font"; + fontDefaultScale = 1; + fontFixedScale = 1; + tooltipsEnabled = true; + boxBorderEnabled = false; + panelBackgroundOpacity = 1; + panelsAttachedToBar = true; + settingsPanelMode = "attached"; + settingsPanelSideBarCardStyle = false; + }; + location = { + name = "Meterik, Limburg"; + weatherEnabled = true; + weatherShowEffects = true; + useFahrenheit = false; + use12hourFormat = false; + showWeekNumberInCalendar = true; + showCalendarEvents = true; + showCalendarWeather = true; + analogClockInCalendar = false; + firstDayOfWeek = "unknown character to parse: -"; + ", + " = "unknown character to parse: h"; + deWeatherTimezone = false; + hideWeatherCityName = false; + }; + calendar = { + cards = [ + { + enabled = true; + id = "calendar-header-card"; + } + { + enabled = true; + id = "calendar-month-card"; + } + { + enabled = true; + id = "weather-card"; + } + ]; + }; + wallpaper = { + enabled = true; + overviewEnabled = false; + directory = "/home/kiri/media/images/wallpapers"; + monitorDirectories = []; + enableMultiMonitorDirectories = false; + showHiddenFiles = false; + viewMode = "recursive"; + setWallpaperOnAllMonitors = true; + fillMode = "crop"; + fillColor = "#000000"; + useSolidColor = false; + solidColor = "#1a1a2e"; + automationEnabled = false; + wallpaperChangeMode = "random"; + randomIntervalSec = 300; + transitionDuration = 1500; + transitionType = "random"; + skipStartupTransition = false; + transitionEdgeSmoothness = 5.0e-2; + panelPosition = "follow_bar"; + hideWallpaperFilenames = false; + overviewBlur = 0.4; + overviewTint = 0.6; + useWallhaven = false; + wallhavenQuery = ""; + wallhavenSorting = "relevance"; + wallhavenOrder = "desc"; + wallhavenCategories = "111"; + wallhavenPurity = "100"; + wallhavenRatios = ""; + wallhavenApiKey = ""; + wallhavenResolutionMode = "atleast"; + wallhavenResolutionWidth = ""; + wallhavenResolutionHeight = ""; + sortOrder = "name"; + favorites = []; + }; + appLauncher = { + enableClipboardHistory = true; + autoPasteClipboard = false; + enableClipPreview = true; + clipboardWrapText = true; + clipboardWatchTextCommand = "wl-paste --type text --watch cliphist store"; + clipboardWatchImageCommand = "wl-paste --type image --watch cliphist store"; + position = "top_center"; + pinnedApps = []; + useApp2Unit = false; + sortByMostUsed = true; + terminalCommand = "kitty -e"; + customLaunchPrefixEnabled = false; + customLaunchPrefix = ""; + viewMode = "grid"; + showCategories = true; + iconMode = "tabler"; + showIconBackground = false; + enableSettingsSearch = true; + enableWindowsSearch = true; + enableSessionSearch = true; + ignoreMouseInput = false; + screenshotAnnotationTool = ""; + overviewLayer = false; + density = "default"; + }; + controlCenter = { + position = "close_to_bar_button"; + diskPath = "/"; + shortcuts = { + left = [ + { + id = "Network"; + } + { + id = "Bluetooth"; + } + { + id = "WallpaperSelector"; + } + { + id = "NoctaliaPerformance"; + } + ]; + right = [ + { + id = "Notifications"; + } + { + id = "PowerProfile"; + } + { + id = "KeepAwake"; + } + { + id = "NightLight"; + } + ]; + }; + cards = [ + { + enabled = true; + id = "profile-card"; + } + { + enabled = true; + id = "shortcuts-card"; + } + { + enabled = true; + id = "audio-card"; + } + { + enabled = false; + id = "brightness-card"; + } + { + enabled = true; + id = "weather-card"; + } + { + enabled = true; + id = "media-sysmon-card"; + } + ]; + }; + systemMonitor = { + cpuWarningThreshold = 80; + cpuCriticalThreshold = 90; + tempWarningThreshold = 80; + tempCriticalThreshold = 90; + gpuWarningThreshold = 80; + gpuCriticalThreshold = 90; + memWarningThreshold = 80; + memCriticalThreshold = 90; + swapWarningThreshold = 80; + swapCriticalThreshold = 90; + diskWarningThreshold = 80; + diskCriticalThreshold = 90; + diskAvailWarningThreshold = 20; + diskAvailCriticalThreshold = 10; + batteryWarningThreshold = 20; + batteryCriticalThreshold = 5; + enableDgpuMonitoring = false; + useCustomColors = false; + warningColor = ""; + criticalColor = ""; + externalMonitor = "resources || missioncenter || jdsystemmonitor || corestats || system-monitoring-center || gnome-system-monitor || plasma-systemmonitor || mate-system-monitor || ukui-system-monitor || deepin-system-monitor || pantheon-system-monitor"; + }; + dock = { + enabled = false; + position = "bottom"; + displayMode = "exclusive"; + dockType = "floating"; + backgroundOpacity = 1; + floatingRatio = 1; + size = 1; + onlySameOutput = true; + monitors = []; + pinnedApps = []; + colorizeIcons = false; + showLauncherIcon = false; + launcherPosition = "end"; + launcherIconColor = "none"; + pinnedStatic = false; + inactiveIndicators = false; + groupApps = false; + groupContextMenuMode = "extended"; + groupClickAction = "cycle"; + groupIndicatorStyle = "dots"; + deadOpacity = 0.6; + animationSpeed = 1; + sitOnFrame = false; + showFrameIndicator = true; + }; + network = { + wifiEnabled = true; + airplaneModeEnabled = false; + bluetoothRssiPollingEnabled = false; + bluetoothRssiPollIntervalMs = 60000; + networkPanelView = "wifi"; + wifiDetailsViewMode = "grid"; + bluetoothDetailsViewMode = "grid"; + bluetoothHideUnnamedDevices = false; + disableDiscoverability = false; + }; + sessionMenu = { + enableCountdown = true; + countdownDuration = 10000; + position = "center"; + showHeader = true; + showKeybinds = true; + largeButtonsStyle = true; + largeButtonsLayout = "single-row"; + powerOptions = [ + { + action = "lock"; + command = ""; + countdownEnabled = true; + enabled = true; + keybind = "1"; + } + { + action = "suspend"; + command = ""; + countdownEnabled = true; + enabled = true; + keybind = "2"; + } + { + action = "hibernate"; + command = ""; + countdownEnabled = true; + enabled = true; + keybind = "3"; + } + { + action = "reboot"; + command = ""; + countdownEnabled = true; + enabled = true; + keybind = "4"; + } + { + action = "logout"; + command = ""; + countdownEnabled = true; + enabled = true; + keybind = "5"; + } + { + action = "shutdown"; + command = ""; + countdownEnabled = true; + enabled = true; + keybind = "6"; + } + { + action = "rebootToUefi"; + command = ""; + countdownEnabled = true; + enabled = true; + keybind = ""; + } + ]; + }; + notifications = { + enabled = true; + enableMarkdown = false; + density = "default"; + monitors = []; + location = "top_right"; + overlayLayer = true; + backgroundOpacity = 1; + respectExpireTimeout = false; + lowUrgencyDuration = 3; + normalUrgencyDuration = 8; + criticalUrgencyDuration = 15; + clearDismissed = true; + saveToHistory = { + low = true; + normal = true; + critical = true; + }; + sounds = { + enabled = false; + volume = 0.5; + separateSounds = false; + criticalSoundFile = ""; + normalSoundFile = ""; + lowSoundFile = ""; + excludedApps = "discord,firefox,chrome,chromium,edge"; + }; + enableMediaToast = false; + enableKeyboardLayoutToast = true; + enableBatteryToast = true; + }; + osd = { + enabled = true; + location = "top_right"; + autoHideMs = 2000; + overlayLayer = true; + backgroundOpacity = 1; + enabledTypes = [ + 0 + 1 + 2 + ]; + monitors = []; + }; + audio = { + volumeStep = 5; + volumeOverdrive = false; + cavaFrameRate = 30; + visualizerType = "linear"; + mprisBlacklist = []; + preferredPlayer = ""; + volumeFeedback = false; + volumeFeedbackSoundFile = ""; + }; + brightness = { + brightnessStep = 5; + enforceMinimum = true; + enableDdcSupport = false; + backlightDeviceMappings = []; + }; + colorSchemes = { + useWallpaperColors = false; + predefinedScheme = "Kanagawa"; + darkMode = true; + schedulingMode = "off"; + manualSunrise = "06:30"; + manualSunset = "18:30"; + generationMethod = "tonal-spot"; + monitorForColors = ""; + }; + templates = { + activeTemplates = []; + enableUserTheming = false; + }; + nightLight = { + enabled = false; + forced = false; + autoSchedule = true; + nightTemp = "4000"; + dayTemp = "6500"; + manualSunrise = "06:30"; + manualSunset = "18:30"; + }; + hooks = { + enabled = false; + wallpaperChange = ""; + darkModeChange = ""; + screenLock = ""; + screenUnlock = ""; + performanceModeEnabled = ""; + performanceModeDisabled = ""; + startup = ""; + session = ""; + }; + plugins = { + autoUpdate = false; + }; + idle = { + enabled = false; + screenOffTimeout = 600; + lockTimeout = 660; + suspendTimeout = 1800; + fadeDuration = 5; + customCommands = "[]"; + }; + desktopWidgets = { + enabled = false; + overviewEnabled = true; + gridSnap = false; + monitorWidgets = []; + }; +} \ No newline at end of file diff --git a/modules/desktop/niri.nix b/modules/desktop/niri.nix index aa70d6a..a745fac 100644 --- a/modules/desktop/niri.nix +++ b/modules/desktop/niri.nix @@ -9,42 +9,76 @@ programs.niri.enable = true; programs.niri.package = pkgs.niri-unstable; + programs.dconf.enable = true; + + # Essential services for Nautilus (Trash, Networking, Disks, Search) + services.gvfs.enable = true; + services.udisks2.enable = true; }; homeManager = { config, pkgs, ... }: { - # Needed for file picker + dconf.settings = { + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + }; + }; + home.packages = with pkgs; [ playerctl nautilus + brightnessctl ]; programs.niri = { settings = { + spawn-at-startup = [ + { command = [ "noctalia-shell" ]; } + ]; prefer-no-csd = true; hotkey-overlay.skip-at-startup = true; screenshot-path = "${config.xdg.userDirs.pictures}/screenshots/%Y-%m-%dT%H:%M:%S.png"; + # ----------------------------------------------------------------- + # Aesthetics & Visuals + # ----------------------------------------------------------------- + + # Fast, snappy animations + animations.slowdown = 0.6; + cursor = with config.home.pointerCursor; { size = size; theme = name; - hide-after-inactive-ms = 3000; hide-when-typing = true; }; layout = { always-center-single-column = true; - gaps = 16; - focus-ring.width = 3; + gaps = 14; + + focus-ring.enable = false; + + default-column-width = { + proportion = 1. / 2.; + }; + # Kanagawa-wave Colorscheme for border + border = { + enable = true; + width = 3; + active.color = "#7E9CD8"; # Crystal Blue + inactive.color = "#54546D"; # Sumi Ink 4 + urgent.color = "#E82424"; # Samurai Red + }; }; window-rules = [ { + # Sleek rounded corners geometry-corner-radius = let - radius = 15.0; + radius = 10.0; in { bottom-left = radius; @@ -56,6 +90,10 @@ } ]; + # ----------------------------------------------------------------- + # System & Input + # ----------------------------------------------------------------- + debug = { honor-xdg-activation-with-invalid-serial = true; }; @@ -81,33 +119,39 @@ position.y = 0; }; + # ----------------------------------------------------------------- + # Keybinds + # ----------------------------------------------------------------- + binds = { - "Mod+Space".action.spawn-sh = "noctalia-shell ipc call launcher toggle"; - - # --- Helpful Overlays & Launchers --- - "Mod+Shift+Slash".action.show-hotkey-overlay = [ ]; - + # --- Applications & Launchers --- "Mod+Return" = { action.spawn = "kitty"; - hotkey-overlay.title = "Open a Terminal"; + hotkey-overlay.title = "Terminal"; }; - "Mod+B" = { - action.spawn = "brave"; - hotkey-overlay.title = "Open a Browser"; + action.spawn = "vivaldi"; + hotkey-overlay.title = "Browser"; + }; + "Mod+Space" = { + repeat = false; + action.spawn = [ + "vicinae" + "toggle" + ]; + hotkey-overlay.title = "App Launcher"; }; - "Mod+D" = { action.spawn = "fuzzel"; - hotkey-overlay.title = "Run an Application: fuzzel"; + hotkey-overlay.title = "App Launcher (Fallback)"; }; "Mod+Alt+S" = { action.spawn-sh = "pkill orca || exec orca"; allow-when-locked = true; - hotkey-overlay.hidden = true; # Equivalent to hotkey-overlay-title=null + hotkey-overlay.hidden = true; }; - # --- Audio & Media Controls --- + # --- Media & Brightness Controls --- "XF86AudioPlay" = { action.spawn-sh = "playerctl play-pause"; allow-when-locked = true; @@ -140,6 +184,33 @@ action.spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; allow-when-locked = true; }; + "XF86MonBrightnessUp" = { + action.spawn-sh = "brightnessctl s 10%+"; + allow-when-locked = true; + }; + "XF86MonBrightnessDown" = { + action.spawn-sh = "brightnessctl s 10%-"; + allow-when-locked = true; + }; + + # --- Screenshots --- + "Print".action.screenshot = [ ]; + "Ctrl+Print".action.screenshot-screen = [ ]; + "Alt+Print".action.screenshot-window = [ ]; + + # --- Session & System --- + "Mod+Shift+Slash".action.show-hotkey-overlay = [ ]; + "Mod+Escape" = { + action.toggle-keyboard-shortcuts-inhibit = [ ]; + allow-inhibiting = false; + }; + "Mod+Alt+L" = { + action.spawn-sh = "loginctl lock-session"; + hotkey-overlay.title = "Lock Screen"; + }; + "Mod+Shift+E".action.quit = [ ]; + "Ctrl+Alt+Delete".action.quit = [ ]; + "Mod+Shift+P".action.power-off-monitors = [ ]; # --- Overview & Window Management --- "Mod+O" = { @@ -151,11 +222,11 @@ repeat = false; }; - # Focus Movement - "Mod+H".action.focus-column-left = [ ]; + # Focus Movement (Vim-like + Arrows) + "Mod+H".action.focus-column-or-monitor-left = [ ]; "Mod+J".action.focus-window-down = [ ]; "Mod+K".action.focus-window-up = [ ]; - "Mod+L".action.focus-column-right = [ ]; + "Mod+L".action.focus-column-or-monitor-right = [ ]; # Window Movement "Mod+Ctrl+Left".action.move-column-left = [ ]; @@ -233,7 +304,6 @@ "Mod+WheelScrollLeft".action.focus-column-left = [ ]; "Mod+Ctrl+WheelScrollRight".action.move-column-right = [ ]; "Mod+Ctrl+WheelScrollLeft".action.move-column-left = [ ]; - "Mod+Shift+WheelScrollDown".action.focus-column-right = [ ]; "Mod+Shift+WheelScrollUp".action.focus-column-left = [ ]; "Mod+Ctrl+Shift+WheelScrollDown".action.move-column-right = [ ]; @@ -284,21 +354,6 @@ "Mod+V".action.toggle-window-floating = [ ]; "Mod+Shift+V".action.switch-focus-between-floating-and-tiling = [ ]; "Mod+W".action.toggle-column-tabbed-display = [ ]; - - # --- Screenshots --- - "Print".action.screenshot = [ ]; - "Ctrl+Print".action.screenshot-screen = [ ]; - "Alt+Print".action.screenshot-window = [ ]; - - # --- System & Session --- - "Mod+Escape" = { - action.toggle-keyboard-shortcuts-inhibit = [ ]; - allow-inhibiting = false; - }; - - "Mod+Shift+E".action.quit = [ ]; - "Ctrl+Alt+Delete".action.quit = [ ]; - "Mod+Shift+P".action.power-off-monitors = [ ]; }; }; }; diff --git a/modules/desktop/noctalia.nix b/modules/desktop/noctalia.nix index 6270545..c33aa46 100644 --- a/modules/desktop/noctalia.nix +++ b/modules/desktop/noctalia.nix @@ -16,552 +16,7 @@ calendarSupport = true; }; - systemd.enable = true; - settings = { - settingsVersion = 53; - bar = { - barType = "simple"; - position = "top"; - monitors = [ ]; - density = "default"; - showOutline = false; - showCapsule = true; - capsuleOpacity = 1; - capsuleColorKey = "none"; - backgroundOpacity = 0.93; - useSeparateOpacity = false; - floating = false; - marginVertical = 4; - marginHorizontal = 4; - frameThickness = 8; - frameRadius = 12; - outerCorners = true; - hideOnOverview = false; - displayMode = "always_visible"; - autoHideDelay = 500; - autoShowDelay = 150; - widgets = { - left = [ - { - icon = "rocket"; - iconColor = "none"; - id = "Launcher"; - } - { - clockColor = "none"; - customFont = ""; - formatHorizontal = "HH:mm ddd, MMM dd"; - formatVertical = "HH mm - dd MM"; - id = "Clock"; - tooltipFormat = "HH:mm ddd, MMM dd"; - useCustomFont = false; - } - { - characterCount = 2; - colorizeIcons = false; - emptyColor = "secondary"; - enableScrollWheel = true; - focusedColor = "primary"; - followFocusedScreen = false; - groupedBorderOpacity = 1; - hideUnoccupied = false; - iconScale = 0.8; - id = "Workspace"; - labelMode = "index"; - occupiedColor = "secondary"; - pillSize = 0.6; - reverseScroll = false; - showApplications = false; - showBadge = true; - showLabelsOnlyWhenOccupied = true; - unfocusedIconsOpacity = 1; - } - ]; - center = [ - { - colorizeIcons = false; - hideMode = "hidden"; - id = "ActiveWindow"; - maxWidth = 400; - scrollingMode = "hover"; - showIcon = true; - textColor = "none"; - useFixedWidth = false; - } - ]; - right = [ - { - compactMode = false; - compactShowAlbumArt = true; - compactShowVisualizer = false; - hideMode = "hidden"; - hideWhenIdle = false; - id = "MediaMini"; - maxWidth = 145; - panelShowAlbumArt = true; - panelShowVisualizer = true; - scrollingMode = "hover"; - showAlbumArt = true; - showArtistFirst = true; - showProgressRing = true; - showVisualizer = false; - textColor = "none"; - useFixedWidth = false; - visualizerType = "linear"; - } - { - blacklist = [ ]; - chevronColor = "none"; - colorizeIcons = false; - drawerEnabled = true; - hidePassive = false; - id = "Tray"; - pinned = [ ]; - } - { - hideWhenZero = false; - hideWhenZeroUnread = false; - iconColor = "none"; - id = "NotificationHistory"; - showUnreadBadge = true; - unreadBadgeColor = "primary"; - } - { - displayMode = "onhover"; - iconColor = "none"; - id = "Volume"; - middleClickCommand = "pwvucontrol || pavucontrol"; - textColor = "none"; - } - { - colorizeDistroLogo = false; - colorizeSystemIcon = "none"; - customIconPath = ""; - enableColorization = false; - icon = "noctalia"; - id = "ControlCenter"; - useDistroLogo = false; - } - ]; - }; - screenOverrides = [ ]; - }; - general = { - avatarImage = "${config.home.homeDirectory}/.face"; - dimmerOpacity = 0; - showScreenCorners = false; - forceBlackScreenCorners = false; - scaleRatio = 1; - radiusRatio = 1; - iRadiusRatio = 1; - boxRadiusRatio = 1; - screenRadiusRatio = 1; - animationSpeed = 1; - animationDisabled = false; - compactLockScreen = false; - lockScreenAnimations = false; - lockOnSuspend = true; - showSessionButtonsOnLockScreen = true; - showHibernateOnLockScreen = false; - enableShadows = true; - shadowDirection = "bottom_right"; - shadowOffsetX = 2; - shadowOffsetY = 3; - language = ""; - allowPanelsOnScreenWithoutBar = true; - showChangelogOnStartup = true; - telemetryEnabled = false; - enableLockScreenCountdown = true; - lockScreenCountdownDuration = 10000; - autoStartAuth = false; - allowPasswordWithFprintd = false; - clockStyle = "custom"; - clockFormat = "hh\\nmm"; - lockScreenMonitors = [ ]; - lockScreenBlur = 0; - lockScreenTint = 0; - keybinds = { - keyUp = [ - "Up" - ]; - keyDown = [ - "Down" - ]; - keyLeft = [ - "Left" - ]; - keyRight = [ - "Right" - ]; - keyEnter = [ - "Return" - ]; - keyEscape = [ - "Esc" - ]; - keyRemove = [ - "Del" - ]; - }; - }; - ui = { - fontDefault = "Comfortaa Medium"; - fontFixed = "FiraCode Nerd Font"; - fontDefaultScale = 1; - fontFixedScale = 1; - tooltipsEnabled = true; - panelBackgroundOpacity = 1; - panelsAttachedToBar = true; - settingsPanelMode = "attached"; - wifiDetailsViewMode = "grid"; - bluetoothDetailsViewMode = "grid"; - networkPanelView = "wifi"; - bluetoothHideUnnamedDevices = false; - boxBorderEnabled = false; - }; - location = { - name = "Meterik, Limburg"; - weatherEnabled = true; - weatherShowEffects = true; - useFahrenheit = false; - use12hourFormat = false; - showWeekNumberInCalendar = true; - showCalendarEvents = true; - showCalendarWeather = true; - analogClockInCalendar = false; - firstDayOfWeek = -1; - hideWeatherTimezone = false; - hideWeatherCityName = false; - }; - calendar = { - cards = [ - { - enabled = true; - id = "calendar-header-card"; - } - { - enabled = true; - id = "calendar-month-card"; - } - { - enabled = true; - id = "weather-card"; - } - ]; - }; - wallpaper = { - enabled = true; - overviewEnabled = false; - directory = "${config.home.homeDirectory}/media/images/wallpapers"; - monitorDirectories = [ ]; - enableMultiMonitorDirectories = false; - showHiddenFiles = false; - viewMode = "recursive"; - setWallpaperOnAllMonitors = true; - fillMode = "crop"; - fillColor = "#000000"; - useSolidColor = false; - solidColor = "#1a1a2e"; - automationEnabled = false; - wallpaperChangeMode = "random"; - randomIntervalSec = 300; - transitionDuration = 1500; - transitionType = "random"; - skipStartupTransition = false; - transitionEdgeSmoothness = 0.05; - panelPosition = "follow_bar"; - hideWallpaperFilenames = false; - overviewBlur = 0.4; - overviewTint = 0.6; - useWallhaven = false; - wallhavenQuery = ""; - wallhavenSorting = "relevance"; - wallhavenOrder = "desc"; - wallhavenCategories = "111"; - wallhavenPurity = "100"; - wallhavenRatios = ""; - wallhavenApiKey = ""; - wallhavenResolutionMode = "atleast"; - wallhavenResolutionWidth = ""; - wallhavenResolutionHeight = ""; - sortOrder = "name"; - favorites = [ ]; - }; - appLauncher = { - enableClipboardHistory = true; - autoPasteClipboard = false; - enableClipPreview = true; - clipboardWrapText = true; - clipboardWatchTextCommand = "wl-paste --type text --watch cliphist store"; - clipboardWatchImageCommand = "wl-paste --type image --watch cliphist store"; - position = "top_center"; - pinnedApps = [ ]; - useApp2Unit = false; - sortByMostUsed = true; - terminalCommand = "kitty -e"; - customLaunchPrefixEnabled = false; - customLaunchPrefix = ""; - viewMode = "grid"; - showCategories = true; - iconMode = "tabler"; - showIconBackground = false; - enableSettingsSearch = true; - enableWindowsSearch = true; - enableSessionSearch = true; - ignoreMouseInput = false; - screenshotAnnotationTool = ""; - overviewLayer = false; - density = "default"; - }; - controlCenter = { - position = "close_to_bar_button"; - diskPath = "/"; - shortcuts = { - left = [ - { - id = "Network"; - } - { - id = "Bluetooth"; - } - { - id = "WallpaperSelector"; - } - { - id = "NoctaliaPerformance"; - } - ]; - right = [ - { - id = "Notifications"; - } - { - id = "PowerProfile"; - } - { - id = "KeepAwake"; - } - { - id = "NightLight"; - } - ]; - }; - cards = [ - { - enabled = true; - id = "profile-card"; - } - { - enabled = true; - id = "shortcuts-card"; - } - { - enabled = true; - id = "audio-card"; - } - { - enabled = false; - id = "brightness-card"; - } - { - enabled = true; - id = "weather-card"; - } - { - enabled = true; - id = "media-sysmon-card"; - } - ]; - }; - systemMonitor = { - cpuWarningThreshold = 80; - cpuCriticalThreshold = 90; - tempWarningThreshold = 80; - tempCriticalThreshold = 90; - gpuWarningThreshold = 80; - gpuCriticalThreshold = 90; - memWarningThreshold = 80; - memCriticalThreshold = 90; - swapWarningThreshold = 80; - swapCriticalThreshold = 90; - diskWarningThreshold = 80; - diskCriticalThreshold = 90; - diskAvailWarningThreshold = 20; - diskAvailCriticalThreshold = 10; - batteryWarningThreshold = 20; - batteryCriticalThreshold = 5; - enableDgpuMonitoring = false; - useCustomColors = false; - warningColor = ""; - criticalColor = ""; - externalMonitor = "resources || missioncenter || jdsystemmonitor || corestats || system-monitoring-center || gnome-system-monitor || plasma-systemmonitor || mate-system-monitor || ukui-system-monitor || deepin-system-monitor || pantheon-system-monitor"; - }; - dock = { - enabled = false; - position = "bottom"; - displayMode = "auto_hide"; - backgroundOpacity = 1; - floatingRatio = 1; - size = 1; - onlySameOutput = true; - monitors = [ ]; - pinnedApps = [ ]; - colorizeIcons = false; - pinnedStatic = false; - inactiveIndicators = false; - deadOpacity = 0.6; - animationSpeed = 1; - }; - network = { - wifiEnabled = true; - airplaneModeEnabled = false; - bluetoothRssiPollingEnabled = false; - bluetoothRssiPollIntervalMs = 60000; - wifiDetailsViewMode = "grid"; - bluetoothDetailsViewMode = "grid"; - bluetoothHideUnnamedDevices = false; - disableDiscoverability = false; - }; - sessionMenu = { - enableCountdown = true; - countdownDuration = 10000; - position = "center"; - showHeader = true; - showKeybinds = true; - largeButtonsStyle = true; - largeButtonsLayout = "single-row"; - powerOptions = [ - { - action = "lock"; - enabled = true; - keybind = "1"; - } - { - action = "suspend"; - enabled = true; - keybind = "2"; - } - { - action = "hibernate"; - enabled = true; - keybind = "3"; - } - { - action = "reboot"; - enabled = true; - keybind = "4"; - } - { - action = "logout"; - enabled = true; - keybind = "5"; - } - { - action = "shutdown"; - enabled = true; - keybind = "6"; - } - ]; - }; - notifications = { - enabled = true; - density = "default"; - monitors = [ ]; - location = "top_right"; - overlayLayer = true; - backgroundOpacity = 1; - respectExpireTimeout = false; - lowUrgencyDuration = 3; - normalUrgencyDuration = 8; - criticalUrgencyDuration = 15; - saveToHistory = { - low = true; - normal = true; - critical = true; - }; - sounds = { - enabled = false; - volume = 0.5; - separateSounds = false; - criticalSoundFile = ""; - normalSoundFile = ""; - lowSoundFile = ""; - excludedApps = "discord,firefox,chrome,chromium,edge"; - }; - enableMediaToast = false; - enableKeyboardLayoutToast = true; - enableBatteryToast = true; - }; - osd = { - enabled = true; - location = "top_right"; - autoHideMs = 2000; - overlayLayer = true; - backgroundOpacity = 1; - enabledTypes = [ - 0 - 1 - 2 - ]; - monitors = [ ]; - }; - audio = { - volumeStep = 5; - volumeOverdrive = false; - cavaFrameRate = 30; - visualizerType = "linear"; - mprisBlacklist = [ ]; - preferredPlayer = ""; - volumeFeedback = false; - }; - brightness = { - brightnessStep = 5; - enforceMinimum = true; - enableDdcSupport = false; - }; - colorSchemes = { - useWallpaperColors = false; - predefinedScheme = "Kanagawa"; - darkMode = true; - schedulingMode = "off"; - manualSunrise = "06:30"; - manualSunset = "18:30"; - generationMethod = "tonal-spot"; - monitorForColors = ""; - }; - templates = { - activeTemplates = [ ]; - enableUserTheming = false; - }; - nightLight = { - enabled = false; - forced = false; - autoSchedule = true; - nightTemp = "4000"; - dayTemp = "6500"; - manualSunrise = "06:30"; - manualSunset = "18:30"; - }; - hooks = { - enabled = false; - wallpaperChange = ""; - darkModeChange = ""; - screenLock = ""; - screenUnlock = ""; - performanceModeEnabled = ""; - performanceModeDisabled = ""; - startup = ""; - session = ""; - }; - plugins = { - autoUpdate = false; - }; - desktopWidgets = { - enabled = false; - gridSnap = false; - monitorWidgets = [ ]; - }; - }; + settings = import ./_noctalia-config.nix; }; }; } diff --git a/modules/desktop/theme.nix b/modules/desktop/theme.nix new file mode 100644 index 0000000..0785501 --- /dev/null +++ b/modules/desktop/theme.nix @@ -0,0 +1,44 @@ +{ + lux.theme = { + homeManager = + { pkgs, ... }: + { + gtk = { + enable = true; + gtk3.bookmarks = [ + "sftp://orion Orion VPS" + ]; + theme = { + name = "Kanagawa-BL-LB"; + # Package in nixpkgs is outdated + package = pkgs.kanagawa-gtk-theme.overrideAttrs (oldAttrs: { + version = "unstable-2025-10-23"; + src = pkgs.fetchFromGitHub { + owner = "Fausto-Korpsvart"; + repo = "Kanagawa-GKT-Theme"; + rev = "55ca4ba249eba21f861b9866b71ab41bb8930318"; + hash = "sha256-UdMoMx2DoovcxSp/zBZ3PRv/Qpj+prd0uPm1gmdak2E="; + }; + }); + }; + iconTheme = { + name = "Kanagawa"; + package = pkgs.kanagawa-icon-theme.overrideAttrs (oldAttrs: { + version = "unstable-2025-10-23"; + src = pkgs.fetchFromGitHub { + owner = "Fausto-Korpsvart"; + repo = "Kanagawa-GKT-Theme"; + rev = "55ca4ba249eba21f861b9866b71ab41bb8930318"; + hash = "sha256-UdMoMx2DoovcxSp/zBZ3PRv/Qpj+prd0uPm1gmdak2E="; + }; + }); + }; + }; + + qt = { + enable = true; + platformTheme.name = "gtk3"; + }; + }; + }; +} diff --git a/modules/dev/dev.nix b/modules/dev/dev.nix index e2cc1f6..d713b9e 100644 --- a/modules/dev/dev.nix +++ b/modules/dev/dev.nix @@ -23,6 +23,14 @@ enableZshIntegration = true; nix-direnv.enable = true; }; + + programs.lazygit = { + enable = true; + # TODO: Figure out how to handle this flag. Set it in shell.nix or here? + # Maybe set it conditionally on if zsh is enabled? + # Might be relevant: lib.hm.shell.mkZshIntegrationOption + enableZshIntegration = true; + }; }; }; } diff --git a/modules/dev/neovim/default.nix b/modules/dev/neovim/default.nix index b3b56f6..0aab54c 100644 --- a/modules/dev/neovim/default.nix +++ b/modules/dev/neovim/default.nix @@ -47,7 +47,6 @@ rustc rust-analyzer rustfmt - markdownlint-cli2 astro-language-server tinymist typstyle diff --git a/modules/dev/neovim/lua-config/lua/plugins/coding.lua b/modules/dev/neovim/lua-config/lua/plugins/coding.lua index e599b71..070fc7c 100644 --- a/modules/dev/neovim/lua-config/lua/plugins/coding.lua +++ b/modules/dev/neovim/lua-config/lua/plugins/coding.lua @@ -14,9 +14,6 @@ require("lz.n").load({ event = { "BufReadPre", "BufNewFile" }, after = function() local lint = require("lint") - lint.linters_by_ft = { - markdown = { "markdownlint-cli2" }, - } -- Create autocommand which carries out the actual linting -- on the specified events. diff --git a/modules/dev/podman.nix b/modules/dev/podman.nix new file mode 100644 index 0000000..7ea98f8 --- /dev/null +++ b/modules/dev/podman.nix @@ -0,0 +1,10 @@ +{ ... }: +{ + lux.podman = { + homeManager = { + services.podman = { + enable = true; + }; + }; + }; +} diff --git a/modules/dev/shell.nix b/modules/dev/shell.nix index 0e9c97d..4fbbbb2 100644 --- a/modules/dev/shell.nix +++ b/modules/dev/shell.nix @@ -7,7 +7,7 @@ # Delete zcompdump on config switch, so that we regenerate completions home.activation = { clearZshCompDump = lib.hm.dag.entryAfter [ "writeBoundary" ] '' - rm -f '${config.programs.zsh.dotDir}/.zcompdump*' + rm -f "${config.programs.zsh.dotDir}"/.zcompdump* ''; }; @@ -17,20 +17,16 @@ enableCompletion = true; completionInit = '' - setopt EXTENDED_GLOB - autoload -U compinit - local dump_path="${config.programs.zsh.dotDir}/.zcompdump" - local cache_check=( $dump_path(#qN.mh-24) ) + compinit -C - if (( $#cache_check )); then - # Array has items: File exists and is new - compinit -C - else - # Array is empty: File is older than 24 hours OR doesn't exist - compinit - zcompile "$dump_path" & - fi + ZCOMPDUMP="${config.programs.zsh.dotDir}/.zcompdump" + # Compile it in the background + { + if [[ -s "$ZCOMPDUMP" && (! -s "''${ZCOMPDUMP}.zwc" || "$ZCOMPDUMP" -nt "''${ZCOMPDUMP}.zwc") ]]; then + zcompile "$ZCOMPDUMP" + fi + } &! ''; autosuggestion.enable = true; diff --git a/modules/dev/terminal.nix b/modules/dev/terminal.nix index ea56b80..97a2d1b 100644 --- a/modules/dev/terminal.nix +++ b/modules/dev/terminal.nix @@ -22,7 +22,7 @@ # Window layout confirm_os_window_close = 0; - window_padding_width = 5; + window_padding_width = 3; # Advanced update_check_interval = 0; diff --git a/modules/keys.nix b/modules/keys.nix index 22701b6..45f5ebe 100644 --- a/modules/keys.nix +++ b/modules/keys.nix @@ -1,39 +1,40 @@ { den, ... }: { - lux.ssh = den.lib.parametric { - includes = [ - ( - { user, ... }: - { - homeManager = - { config, pkgs, ... }: - { - programs.gpg = { - enable = true; - homedir = "${config.xdg.dataHome}/gnupg"; - }; + lux.ssh = { + homeManager = + { config, pkgs, ... }: + { + programs.gpg = { + enable = true; + homedir = "${config.xdg.dataHome}/gnupg"; + }; - services.gpg-agent = { - enable = true; - enableSshSupport = true; - enableZshIntegration = true; - pinentry.package = pkgs.pinentry-qt; - sshKeys = [ - "CD848796822630B280FC6DFA55F24A20040F22B5" - "B8FBDFBD7F42C444C17E086E0EE2E34FB43A7187" - ]; - }; + services.gpg-agent = { + enable = true; + enableSshSupport = true; + enableZshIntegration = true; + pinentry.package = pkgs.pinentry-gnome3; + sshKeys = [ + "CD848796822630B280FC6DFA55F24A20040F22B5" + "B8FBDFBD7F42C444C17E086E0EE2E34FB43A7187" + ]; + }; - programs.ssh = { - enable = true; - enableDefaultConfig = false; - includes = [ - "${config.home.homeDirectory}/.ssh/ssh-config-orion" - ]; - }; - }; - } - ) - ]; + programs.ssh = { + enable = true; + enableDefaultConfig = false; + includes = [ + "${config.sops.secrets.ssh-config-orion.path}" + ]; + }; + + sops.secrets.ssh-config-orion = { }; + }; + + # Forward ssh agent to root when using sudo + # Useful for nixos-rebuild when pulling private repos + nixos.security.sudo.extraConfig = '' + Defaults env_keep+=SSH_AUTH_SOCK + ''; }; } diff --git a/modules/profiles/workstation.nix b/modules/profiles/workstation.nix index 9f50934..ce28aef 100644 --- a/modules/profiles/workstation.nix +++ b/modules/profiles/workstation.nix @@ -1,4 +1,9 @@ -{ lux, den, ... }: +{ + lux, + den, + inputs, + ... +}: { lux.workstation = den.lib.parametric { includes = with lux; [ @@ -6,7 +11,9 @@ greeter niri + vicinae xdg + theme # GUI Applications & Dev Tools bitwarden @@ -15,7 +22,8 @@ noctalia pim mpv - helium + podman + gemini ]; homeManager = @@ -23,22 +31,43 @@ { home.packages = with pkgs; [ brave + vivaldi localsend postman wl-clipboard spotify - gemini-cli qbittorrent + calcure planify + (pkgs.writeShellApplication { + name = "ns"; + runtimeInputs = [ + fzf + nix-search-tv + ]; + text = builtins.readFile "${pkgs.nix-search-tv.src}/nixpkgs.sh"; + }) ]; + programs.sioyek.enable = true; + + programs.television = { + enable = true; + enableZshIntegration = true; + }; + + programs.nix-search-tv = { + enable = true; + enableTelevisionIntegration = true; + }; + programs.ripgrep.enable = true; programs.uv.enable = true; home.pointerCursor = { name = "phinger-cursors-light"; package = pkgs.phinger-cursors; - size = 32; + size = 24; gtk.enable = true; }; @@ -46,7 +75,7 @@ home.sessionVariables = { NIXOS_OZONE_WL = "1"; - BROWSER = "brave"; + BROWSER = "vivaldi"; EDITOR = "nvim"; VISUAL = "nvim"; diff --git a/modules/secrets/secrets.yaml b/modules/secrets/secrets.yaml index 51466fb..575c8ad 100644 --- a/modules/secrets/secrets.yaml +++ b/modules/secrets/secrets.yaml @@ -1,7 +1,7 @@ -radicale_pass: ENC[AES256_GCM,data:zdUxtJKNPC8SzajhFKo=,iv:H55GWMiQLJvZx6rAufkk807lZflg0sepxoq6z0XJ/q4=,tag:MoDOuF37PeF7QEpUxBntEg==,type:str] -university_calendar_url: ENC[AES256_GCM,data:y5UtZVC0KJPUz//6S0QsrNeFGQshc88zieQgmlur75VFw9y5CJpnZRpdhLnYva00z5HBkxYQelLqS/I5GrXexWtC7Y7d1dCcQ+IZ0K7GGJ5NrYtjNXfMhzNSlhqjvl5lBGb+S565kel3VsCTyo/YRxdbBN6FA/oQNsx8/AvTgtsPeFkQRDGlGkybFRfWHWuTIDLL,iv:rZK9utRrm/KAkVRUjC3VR09MvDZjpoLx7BgaidzQo3o=,tag:tGWGoQCsS3zZh818OKixPw==,type:str] -ssh_config_orion: ENC[AES256_GCM,data:P2jH5BDIzeHSIwTBcZwTOXKes727xK0Xoj9W64GmEszEPZw8vA==,iv:hSY9mFdC82pBbOjMFuzoR2eufhjY2MGERJ4ODmcogbA=,tag:ejF535LrQwwH66nQG3qLGw==,type:str] -orion_ip: ENC[AES256_GCM,data:RCK6EKOEDaTu1uR2d/8=,iv:5JhIkVQEELB6MoPh49xq+0CrbPjI/6+qfqUHRqCza5s=,tag:+00T4+pWOWRj7R1ft39HAw==,type:str] +radicale-pass: ENC[AES256_GCM,data:3CpCnSibLWeZUJRBMuc=,iv:3J9x4ejcsYXCjRRGP5lOex+9EG8STLsbJ7FWesRpLIk=,tag:Pg1jIlnr2enuTsCvvWRWjg==,type:str] +university-calendar-url: ENC[AES256_GCM,data:oGP1BdF3YxdRRr061LaC4HaaiPXoyZq7ZALqU+cv8wb2GgYT+jgshgx9LRjM3jsIjPXolkG5bCZi46r/rpEk3mWSskQ3YnCXcwM1BN+PPVapdtQgkRSWriAOUXPnRpaZzpMs5WaJTnkOrJJqfAoy+jGIE0Nhul/CRw5tOeRkwPbDxfA/dY9MT80ciHWHscHb1w9R,iv:1JqN80OnrIjOl4LGmk99LsJMmoT3hGjlCet6mYeRb5o=,tag:9GhVQIa1BXAEjdOxswHH/A==,type:str] +ssh-config-orion: ENC[AES256_GCM,data:VEe6VSnrpySOdEJ+Sxcc2K6bL/eh/3PjAUNLBjvG7ceJcVnvdA==,iv:yJEhPQ3rYcCn+V7mzC8bPFjkW2GYDArjDJDI8vC1D70=,tag:n49AfsnZZgPuKO8MtAzVtg==,type:str] +orion-ip: ENC[AES256_GCM,data:S6fpCWnD8dvchvrHlEo=,iv:72+oRxHUEJ7imJ+sWjGbG+TUrSqYL8hbyHl3ChwFYwA=,tag:Rj6msje87+Ve+M6kcZd4Jw==,type:str] hashed-password-kiri: ENC[AES256_GCM,data:xubN5stH4RPlHYl+Jzcu2BCepz3Hra3TxjiSspktzjgpEWrU79h3NbcPMrYC0MSjsv3oaWio/S7nBV3Tes3WBlI9EC9vq+6tyTVPynUqpB7c9CvvYSmqc9bAHOnIOBb+gP2RR6JB395UoQ==,iv:uN83RNTfCJdBDhFhywV5NbVBp4xcptqzoKVAoAnaiQk=,tag:x9yufiPdSJwBADT6QymExA==,type:str] sops: age: @@ -32,7 +32,7 @@ sops: YlZ4VGIzaE5kQ3ZSczI2Wk5IU1UvOXcKqkj/OYP37+60Gr2xJmPE9O7HB7LCu4Tp AvvoMQLkkvVJ30Y03pfEzIMnvJHKREy9zDOScfqUflDk79mcDaDhvg== -----END AGE ENCRYPTED FILE----- - lastmodified: "2026-02-16T13:53:22Z" - mac: ENC[AES256_GCM,data:DuGE9Ovae5Y2Qpm5v8OYgFC2/u/Yzprv+ImmX1OVsh5KjGS26HaX1HLbzGu7NZCMfg2ZrJ5BeFNCO3UaZ7tXNoWGKxQZRNYpAH8PjI225l+GWozcva0on6S0UD2MhtKkpFPFUg1uEDSzqwMoXgPbWoB1W0VeAOkfAhKM9j/tggs=,iv:/Hsh9JvdcZMy7v4tLGaBwDlMIf5HBta3GeZC5gDUO9k=,tag:mtwqk41SA9qzIw+cVDSgQg==,type:str] + lastmodified: "2026-03-01T17:21:02Z" + mac: ENC[AES256_GCM,data:O3SPxEu8M7au3NF2jZvqqzj4yK44dH7ccb04n59tZmx5lDQfa6nRTJUrlEnwRPUMYmta1WyYZDSje+Yf9hNLSj9ARKMx9Ot/gfBRISOdDQ5FyeHNEU8aq8/HeRkf2CHJYqbNi8wn27IKrMXOG6TktNUXaqb8v4POo3K0qbJ5Z6s=,iv:Aw4G8VXbr48yWWqVhUa5KQ61y1o6ST8VHRECc9s0f5U=,tag:EP218k82eh7itHYO+iNTwQ==,type:str] unencrypted_suffix: _unencrypted - version: 3.11.0 + version: 3.12.1 diff --git a/modules/secrets/sops.nix b/modules/secrets/sops.nix index 3d9d74e..2ece996 100644 --- a/modules/secrets/sops.nix +++ b/modules/secrets/sops.nix @@ -1,29 +1,27 @@ -{ inputs, den, ... }: +{ inputs, ... }: +let + sopsConfig = { + # TODO: Should this be user owned or root-owned? + # How do we determine the keys location without hardcoding? + # TODO: Take a look at quasigod + age.keyFile = "/home/kiri/.config/sops/age/keys.txt"; + defaultSopsFile = ./secrets.yaml; + + }; +in { - den.default.includes = [ - ( - { host, ... }: - { - nixos = - { pkgs, ... }: - { - imports = [ inputs.sops-nix.nixosModules.sops ]; + # TODO: Do we need both modules? + den.ctx.host.nixos = { + imports = [ inputs.sops-nix.nixosModules.sops ]; + sops = sopsConfig; + }; - sops = { - age.keyFile = "/home/${(builtins.head (builtins.attrValues host.users)).name}/.config/sops/age/keys.txt"; - defaultSopsFile = ./secrets.yaml; - secrets = { - hashed-password-kiri.neededForUsers = true; - }; - }; + den.ctx.user.homeManager = + { pkgs, ... }: + { + imports = [ inputs.sops-nix.homeManagerModules.sops ]; + sops = sopsConfig; - environment.systemPackages = with pkgs; [ - sops - age - ]; - - }; - } - ) - ]; + home.packages = [ pkgs.sops ]; + }; } diff --git a/modules/services/actual.nix b/modules/services/actual.nix index bb8ebaa..5ee268c 100644 --- a/modules/services/actual.nix +++ b/modules/services/actual.nix @@ -1,26 +1,22 @@ { den, ... }: { - lux.services._.actual = den.lib.exactly { - includes = [ - ( - { host, ... }: + lux.services._.actual = den.lib.take.exactly ( + { host, ... }: + { + nixos = + { config, ... }: { - nixos = - { config, ... }: - { - services.actual = { - enable = true; - openFirewall = false; - settings = { - port = 3000; - hostname = "127.0.0.1"; - }; - }; - services.caddy.virtualHosts."finance.${host.domain}".extraConfig = - "reverse_proxy :${toString config.services.actual.settings.port}"; + services.actual = { + enable = true; + openFirewall = false; + settings = { + port = 3000; + hostname = "127.0.0.1"; }; - } - ) - ]; - }; + }; + services.caddy.virtualHosts."finance.${host.domain}".extraConfig = + "reverse_proxy :${toString config.services.actual.settings.port}"; + }; + } + ); } diff --git a/modules/services/caddy.nix b/modules/services/caddy.nix index 7eb494b..e1e7224 100644 --- a/modules/services/caddy.nix +++ b/modules/services/caddy.nix @@ -1,19 +1,10 @@ { den, lib, ... }: { - lux.services._.caddy = den.lib.parametric { - includes = [ - ( - { host, ... }: - { - nixos = { - services.caddy = { - enable = true; - email = "mail@jelles.net"; - openFirewall = true; - }; - }; - } - ) - ]; - }; -} + lux.services._.caddy = den.lib.take.atLeast ({ host, ... }: { + nixos.services.caddy = { + enable = true; + email = "mail@jelles.net"; + openFirewall = true; + }; + }); +} \ No newline at end of file diff --git a/modules/services/gitea.nix b/modules/services/gitea.nix index d44058d..fc69d8e 100644 --- a/modules/services/gitea.nix +++ b/modules/services/gitea.nix @@ -1,40 +1,36 @@ { den, ... }: { - lux.services._.gitea = den.lib.parametric { - includes = [ - ( - den.lib.take.exactly({ host }: + lux.services._.gitea = den.lib.take.exactly ( + { host }: + { + nixos = + { config, ... }: { - nixos = - { config, ... }: - { - services.gitea = { - enable = true; + services.gitea = { + enable = true; - settings = { - server = { - DOMAIN = "git.${host.domain}"; - ROOT_URL = "https://git.${host.domain}/"; - HTTP_PORT = 3001; - HTTP_ADDR = "127.0.0.1"; + settings = { + server = { + DOMAIN = "git.${host.domain}"; + ROOT_URL = "https://git.${host.domain}/"; + HTTP_PORT = 3001; + HTTP_ADDR = "127.0.0.1"; - START_SSH_SERVER = false; - SSH_PORT = 22; - }; - - service = { - DISABLE_REGISTRATION = true; - }; - }; + START_SSH_SERVER = false; + SSH_PORT = 22; }; - services.openssh.settings.AllowUsers = [ "git" ]; - - services.caddy.virtualHosts."git.${host.domain}".extraConfig = - "reverse_proxy :${toString config.services.gitea.settings.server.HTTP_PORT}"; + service = { + DISABLE_REGISTRATION = true; + }; }; - } - )) - ]; - }; + }; + + services.openssh.settings.AllowUsers = [ "gitea" ]; + + services.caddy.virtualHosts."git.${host.domain}".extraConfig = + "reverse_proxy :${toString config.services.gitea.settings.server.HTTP_PORT}"; + }; + } + ); } diff --git a/modules/services/openssh.nix b/modules/services/openssh.nix index 04e8373..621d457 100644 --- a/modules/services/openssh.nix +++ b/modules/services/openssh.nix @@ -1,21 +1,13 @@ { den, lib, ... }: { - lux.services._.openssh = den.lib.parametric.exactly { - includes = [ - ( - { host }: - { - nixos.services.openssh.settings.nixos.services.openssh = { - enable = true; - settings = { - PermitRootLogin = "no"; - PasswordAuthentication = false; - AllowUsers = lib.attrNames host.users; - }; - }; - } - ) - ]; - }; - -} + lux.services._.openssh = den.lib.take.exactly ({ host }: { + nixos.services.openssh = { + enable = true; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + AllowUsers = lib.attrNames host.users; + }; + }; + }); +} \ No newline at end of file diff --git a/modules/services/radicale.nix b/modules/services/radicale.nix index 2b40185..41e4354 100644 --- a/modules/services/radicale.nix +++ b/modules/services/radicale.nix @@ -1,6 +1,6 @@ { den, ... }: { - lux.services._.radicale = den.lib.exactly { + lux.services._.radicale = den.lib.parametric.exactly { includes = [ ( { host, ... }: @@ -15,7 +15,7 @@ auth = { type = "htpasswd"; - htpasswd_filename = config.sops.secrets.radicale-users.path; + htpasswd_filename = "/var/lib/radicale/users"; htpasswd_encryption = "bcrypt"; }; diff --git a/modules/services/vaultwarden.nix b/modules/services/vaultwarden.nix index c311d95..028cc79 100644 --- a/modules/services/vaultwarden.nix +++ b/modules/services/vaultwarden.nix @@ -1,29 +1,20 @@ { den, ... }: { - lux.services._.vaultwarden = den.lib.parametric.exactly { - includes = [ - ( - { host }: - { - nixos = - { config, ... }: - { - services.vaultwarden = { - enable = true; - backupDir = "/var/backup/vaultwarden"; - config = { - DOMAIN = "https://vault.${host.domain}"; - SIGNUPS_ALLOWED = false; - ROCKET_PORT = 8100; - ROCKET_LOG = "critical"; - }; - }; + lux.services._.vaultwarden = den.lib.take.exactly ({ host }: { + nixos = { config, ... }: { + services.vaultwarden = { + enable = true; + backupDir = "/var/backup/vaultwarden"; + config = { + DOMAIN = "https://vault.${host.domain}"; + SIGNUPS_ALLOWED = false; + ROCKET_PORT = 8100; + ROCKET_LOG = "critical"; + }; + }; - services.caddy.virtualHosts."vault.${host.domain}".extraConfig = - "reverse_proxy :${toString config.services.vaultwarden.config.ROCKET_PORT}"; - }; - } - ) - ]; - }; -} + services.caddy.virtualHosts."vault.${host.domain}".extraConfig = + "reverse_proxy :${toString config.services.vaultwarden.config.ROCKET_PORT}"; + }; + }); +} \ No newline at end of file diff --git a/modules/users/kiri.nix b/modules/users/kiri.nix index bc8988c..81da815 100644 --- a/modules/users/kiri.nix +++ b/modules/users/kiri.nix @@ -45,6 +45,11 @@ in nixos = { config, ... }: { + # TODO: Do we event want this? + # What is standard on a VPS? + sops.secrets.hashed-password-kiri = { + neededForUsers = true; + }; users.users.kiri.hashedPasswordFile = config.sops.secrets.hashed-password-kiri.path; }; }; diff --git a/programs/helium.nix b/programs/helium.nix deleted file mode 100644 index ae21228..0000000 --- a/programs/helium.nix +++ /dev/null @@ -1,101 +0,0 @@ -{ - lib, - unzip, - autoPatchelfHook, - stdenv, - fetchurl, - libxcb, - libx11, - libxcomposite, - libxdamage, - libxext, - libxfixes, - libxrandr, - libgbm, - cairo, - libudev-zero, - libxkbcommon, - nspr, - nss, - libcupsfilters, - pango, - qt5, - alsa-lib, - atk, - at-spi2-core, - at-spi2-atk, -}: - -stdenv.mkDerivation rec { - name = "Helium"; - version = "0.8.4.1"; - - src = fetchurl { - url = "https://github.com/imputnet/helium-linux/releases/download/${version}/helium-${version}-x86_64_linux.tar.xz"; - sha256 = "sha256-M/1wGewl500vJsoYfhbgXHQ4vlI6d0PRGGGGsRol6sc="; - }; - - nativeBuildInputs = [ - unzip - autoPatchelfHook - ]; - - autoPatchelfIgnoreMissingDeps = [ - "libQt6Core.so.6" - "libQt6Gui.so.6" - "libQt6Widgets.so.6" - ]; - - runtimeDependencies = [ ]; - buildInputs = [ - unzip - libxcb - libx11 - libxcomposite - libxdamage - libxext - libxfixes - libxrandr - libgbm - cairo - pango - libudev-zero - libxkbcommon - nspr - nss - libcupsfilters - alsa-lib - atk - at-spi2-core - at-spi2-atk - qt5.qtbase - qt5.qttools - qt5.qtx11extras - qt5.wrapQtAppsHook - ]; - - installPhase = '' - runHook preInstall - mkdir -p $out/bin - mv * $out/bin/ - mv $out/bin/helium $out/bin/${name} - mkdir -p $out/share/applications - - cat < $out/share/applications/${name}.desktop - [Desktop Entry] - Name=${name} - GenericName=Web Browser - Terminal=false - Icon=$out/bin/product_logo_256.png - Exec=$out/bin/${name} - Type=Application - Categories=Network;WebBrowser; - INI - ''; - - meta = with lib; { - homepage = "https://github.com/imputnet/helium-linux"; - description = "A description of your application"; - platforms = platforms.linux; - }; -} diff --git a/result b/result new file mode 120000 index 0000000..a24c01d --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/azqhlhavafg5fq8skwkq40ibjxhr5ld8-kanagawa-icon-theme-0-unstable-2023-07-03 \ No newline at end of file