From b6d0456ee215008bede7f043124820da90556a09 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Thu, 12 Jun 2025 20:00:31 +0200 Subject: [PATCH 01/71] refactor: :art: add print service configuration module with cups support --- hosts/oak/default.nix | 7 ------ modules/system/common/default.nix | 1 + .../system/common/networks/print/print.nix | 23 +++++++++++++++++++ modules/system/hosts/oak/default.nix | 1 + 4 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 modules/system/common/networks/print/print.nix diff --git a/hosts/oak/default.nix b/hosts/oak/default.nix index a8f6700..b38d7c3 100644 --- a/hosts/oak/default.nix +++ b/hosts/oak/default.nix @@ -89,11 +89,4 @@ in ]; shell = pkgs.zsh; }; - - services = { - printing = { # CUPS - enable = true; - drivers = [ pkgs.cnijfilter2 ]; - }; - }; } diff --git a/modules/system/common/default.nix b/modules/system/common/default.nix index 42e1f77..c38f7ae 100644 --- a/modules/system/common/default.nix +++ b/modules/system/common/default.nix @@ -15,6 +15,7 @@ ./hardware/autologin.nix ./hardware/boot.nix + ./networks/print/print.nix ./networks/vpn/tailscale.nix ./security/antivirus.nix diff --git a/modules/system/common/networks/print/print.nix b/modules/system/common/networks/print/print.nix new file mode 100644 index 0000000..5e39a4b --- /dev/null +++ b/modules/system/common/networks/print/print.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.modules.networks.print; +in { + options.modules.networks.print = { + enable = mkEnableOption "Print services"; + cups.enable = mkOption { + type = types.bool; + default = true; + description = "Enable CUPS (Common Unix Printing System)"; + }; + }; + + config = mkIf cfg.enable { + services.printing = { + enable = cfg.cups.enable; + drivers = [ pkgs.cnijfilter2 ]; + }; + }; +} \ No newline at end of file diff --git a/modules/system/hosts/oak/default.nix b/modules/system/hosts/oak/default.nix index 50c0d89..3b63908 100644 --- a/modules/system/hosts/oak/default.nix +++ b/modules/system/hosts/oak/default.nix @@ -15,6 +15,7 @@ lutris.enable = true; }; networks = { + print.enable = true; vpn.tailscale.enable = true; }; virtualisation.docker.enable = true; From 364bdef4d90cf29f6b7672b7d21110a0e939064f Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Thu, 12 Jun 2025 20:07:27 +0200 Subject: [PATCH 02/71] refactor: :fire: remove okular documentation configuration from nix setup --- modules/hm/common/default.nix | 1 - modules/hm/common/documentation/okular.nix | 16 ---------------- 2 files changed, 17 deletions(-) delete mode 100644 modules/hm/common/documentation/okular.nix diff --git a/modules/hm/common/default.nix b/modules/hm/common/default.nix index ccd63b0..0863686 100644 --- a/modules/hm/common/default.nix +++ b/modules/hm/common/default.nix @@ -22,7 +22,6 @@ ./dev/rust.nix ./documentation/obsidian.nix - ./documentation/okular.nix ./documentation/onlyoffice.nix ./driver/chrome.nix diff --git a/modules/hm/common/documentation/okular.nix b/modules/hm/common/documentation/okular.nix deleted file mode 100644 index 1d60593..0000000 --- a/modules/hm/common/documentation/okular.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, lib, config, ... }: - -let - cfg = config.modules.common.documentation.okular; -in -{ - options.modules.common.documentation.okular = { - enable = lib.mkEnableOption "Enable Okular document viewer"; - }; - - config = lib.mkIf cfg.enable { - home.packages = (with pkgs; [ - okular - ]); - }; -} From b34e2990b1b44f31ced9ab691e0555ebea0461fd Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Thu, 12 Jun 2025 20:20:22 +0200 Subject: [PATCH 03/71] feat: :sparkles: add browser module with emulator and driver support --- modules/hm/common/browser/default.nix | 37 +++++++++++++++++++++++++++ modules/hm/common/default.nix | 4 +-- modules/hm/common/driver/chrome.nix | 16 ------------ modules/hm/hosts/oak/default.nix | 6 +++-- 4 files changed, 43 insertions(+), 20 deletions(-) create mode 100644 modules/hm/common/browser/default.nix delete mode 100644 modules/hm/common/driver/chrome.nix diff --git a/modules/hm/common/browser/default.nix b/modules/hm/common/browser/default.nix new file mode 100644 index 0000000..84709b9 --- /dev/null +++ b/modules/hm/common/browser/default.nix @@ -0,0 +1,37 @@ +{ pkgs, lib, config, ... }: + +let + cfg = config.modules.common.browser; +in +{ + options.modules.common.browser = { + enable = lib.mkEnableOption "Enable browser module"; + + emulators = lib.mkOption { + type = lib.types.listOf (lib.types.enum ["chromium" "chrome" "firefox" "brave" "vivaldi" "edge"]); + default = []; + }; + + driver.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable browser drivers for automation (e.g., Selenium, Puppeteer)"; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = with pkgs; ( + (lib.optionals (lib.elem "chromium" cfg.emulators) [chromium]) ++ + (lib.optionals (lib.elem "chrome" cfg.emulators) [google-chrome]) ++ + (lib.optionals (lib.elem "firefox" cfg.emulators) [firefox]) ++ + (lib.optionals (lib.elem "brave" cfg.emulators) [brave]) ++ + (lib.optionals (lib.elem "vivaldi" cfg.emulators) [vivaldi]) ++ + (lib.optionals (lib.elem "edge" cfg.emulators) [microsoft-edge]) ++ + + (lib.optionals (cfg.driver.enable && lib.elem "chromium" cfg.emulators) [chromedriver]) ++ + (lib.optionals (cfg.driver.enable && lib.elem "chrome" cfg.emulators) [chromedriver]) ++ + (lib.optionals (cfg.driver.enable && lib.elem "firefox" cfg.emulators) [geckodriver]) ++ + (lib.optionals (cfg.driver.enable && lib.elem "edge" cfg.emulators) [msedgedriver]) + ); + }; +} \ No newline at end of file diff --git a/modules/hm/common/default.nix b/modules/hm/common/default.nix index 0863686..ac88bea 100644 --- a/modules/hm/common/default.nix +++ b/modules/hm/common/default.nix @@ -3,6 +3,8 @@ }: { imports = [ + ./browser + ./communication/mail ./communication/teams.nix @@ -24,8 +26,6 @@ ./documentation/obsidian.nix ./documentation/onlyoffice.nix - ./driver/chrome.nix - ./emulator ./engine/engine.nix diff --git a/modules/hm/common/driver/chrome.nix b/modules/hm/common/driver/chrome.nix deleted file mode 100644 index 50db2ef..0000000 --- a/modules/hm/common/driver/chrome.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, lib, config, ... }: - -let - cfg = config.modules.common.driver.chrome; -in -{ - options.modules.common.driver.chrome = { - enable = lib.mkEnableOption "Enable Chrome WebDriver (chromedriver)"; - }; - - config = lib.mkIf cfg.enable { - home.packages = (with pkgs; [ - chromedriver - ]); - }; -} diff --git a/modules/hm/hosts/oak/default.nix b/modules/hm/hosts/oak/default.nix index 8f501c7..62d081b 100644 --- a/modules/hm/hosts/oak/default.nix +++ b/modules/hm/hosts/oak/default.nix @@ -28,8 +28,10 @@ gimp.enable = true; stremio.enable = true; }; - driver = { - chrome.enable = true; + browser = { + enable = true; + emulators = ["chromium" "firefox"]; + driver.enable = true; }; documentation = { obsidian = { From 1ac2695677cd75aa70daf81384b2b66672af45ee Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Thu, 12 Jun 2025 20:23:04 +0200 Subject: [PATCH 04/71] chore: :closed_lock_with_key: emulator name from 'chromium' to 'chrome' in browser config oak --- modules/hm/hosts/oak/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hm/hosts/oak/default.nix b/modules/hm/hosts/oak/default.nix index 62d081b..2469bd4 100644 --- a/modules/hm/hosts/oak/default.nix +++ b/modules/hm/hosts/oak/default.nix @@ -30,7 +30,7 @@ }; browser = { enable = true; - emulators = ["chromium" "firefox"]; + emulators = ["chrome" "firefox"]; driver.enable = true; }; documentation = { From 2785e34f37de35e5f40397945ab8cdbc18462699 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Thu, 12 Jun 2025 20:38:50 +0200 Subject: [PATCH 05/71] feat: :sparkles: add cli configuration for node.js deployments --- modules/hm/common/default.nix | 3 +-- modules/hm/common/dev/node/cli.nix | 23 +++++++++++++++++++++++ modules/hm/common/dev/node/graphite.nix | 16 ---------------- modules/hm/common/dev/node/vercel.nix | 16 ---------------- modules/hm/hosts/oak/default.nix | 6 ++++-- 5 files changed, 28 insertions(+), 36 deletions(-) create mode 100644 modules/hm/common/dev/node/cli.nix delete mode 100644 modules/hm/common/dev/node/graphite.nix delete mode 100644 modules/hm/common/dev/node/vercel.nix diff --git a/modules/hm/common/default.nix b/modules/hm/common/default.nix index ac88bea..4f5fc4f 100644 --- a/modules/hm/common/default.nix +++ b/modules/hm/common/default.nix @@ -14,11 +14,10 @@ ./dev/editor/android-studio.nix ./dev/global-tools/act-github.nix ./dev/global-tools/nix.nix - ./dev/node/graphite.nix ./dev/node/node.nix ./dev/node/pm2.nix ./dev/node/prisma.nix - ./dev/node/vercel.nix + ./dev/node/cli.nix ./dev/dotnet.nix ./dev/python.nix ./dev/rust.nix diff --git a/modules/hm/common/dev/node/cli.nix b/modules/hm/common/dev/node/cli.nix new file mode 100644 index 0000000..ae3947a --- /dev/null +++ b/modules/hm/common/dev/node/cli.nix @@ -0,0 +1,23 @@ +{ pkgs, lib, config, ... }: + +let + cfg = config.modules.common.dev.node.cli; +in +{ + options.modules.common.dev.node.cli = { + enable = lib.mkEnableOption "Enable CLI for Node.js deployments"; + + elements = lib.mkOption { + type = lib.types.listOf (lib.types.enum ["vercel" "graphite"]); + default = ["vercel"]; + description = "List of CLI tools to install for Node.js deployments"; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = (with pkgs; [ + (lib.optionals (lib.elem "vercel" cfg.elements) nodePackages.vercel) + (lib.optionals (lib.elem "graphite" cfg.elements) graphite-cli) + ]); + }; +} diff --git a/modules/hm/common/dev/node/graphite.nix b/modules/hm/common/dev/node/graphite.nix deleted file mode 100644 index f481051..0000000 --- a/modules/hm/common/dev/node/graphite.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, lib, config, ... }: - -let - cfg = config.modules.common.dev.node.graphite; -in -{ - options.modules.common.dev.node.graphite = { - enable = lib.mkEnableOption "Enable Graphite CLI for Node.js"; - }; - - config = lib.mkIf cfg.enable { - home.packages = (with pkgs; [ - graphite-cli - ]); - }; -} diff --git a/modules/hm/common/dev/node/vercel.nix b/modules/hm/common/dev/node/vercel.nix deleted file mode 100644 index 4876bf2..0000000 --- a/modules/hm/common/dev/node/vercel.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, lib, config, ... }: - -let - cfg = config.modules.common.dev.node.vercel; -in -{ - options.modules.common.dev.node.vercel = { - enable = lib.mkEnableOption "Enable Vercel CLI for Node.js deployments"; - }; - - config = lib.mkIf cfg.enable { - home.packages = (with pkgs; [ - nodePackages.vercel - ]); - }; -} diff --git a/modules/hm/hosts/oak/default.nix b/modules/hm/hosts/oak/default.nix index 2469bd4..8095c12 100644 --- a/modules/hm/hosts/oak/default.nix +++ b/modules/hm/hosts/oak/default.nix @@ -54,8 +54,10 @@ }; node = { enable = true; - graphite.enable = true; - vercel.enable = true; + cli = { + enable = true; + elements = ["vercel" "graphite"]; + }; prisma.enable = true; }; python = { From 0ad641c35ff64cbb9eebe111b03ce7c57599426c Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 10:30:09 +0200 Subject: [PATCH 06/71] feat: :sparkles: move cli configuration --- modules/hm/common/default.nix | 2 +- modules/hm/common/dev/{node => global-tools}/cli.nix | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename modules/hm/common/dev/{node => global-tools}/cli.nix (100%) diff --git a/modules/hm/common/default.nix b/modules/hm/common/default.nix index 4f5fc4f..1747780 100644 --- a/modules/hm/common/default.nix +++ b/modules/hm/common/default.nix @@ -14,10 +14,10 @@ ./dev/editor/android-studio.nix ./dev/global-tools/act-github.nix ./dev/global-tools/nix.nix + ./dev/global-tools/cli.nix ./dev/node/node.nix ./dev/node/pm2.nix ./dev/node/prisma.nix - ./dev/node/cli.nix ./dev/dotnet.nix ./dev/python.nix ./dev/rust.nix diff --git a/modules/hm/common/dev/node/cli.nix b/modules/hm/common/dev/global-tools/cli.nix similarity index 100% rename from modules/hm/common/dev/node/cli.nix rename to modules/hm/common/dev/global-tools/cli.nix From 594cc91cb915bc9fa79124bb1f1b5e66e824a526 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 10:33:05 +0200 Subject: [PATCH 07/71] chore: :wheelchair: moved cli oak to reflect change to module cli --- modules/hm/hosts/oak/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/hm/hosts/oak/default.nix b/modules/hm/hosts/oak/default.nix index 8095c12..23863d8 100644 --- a/modules/hm/hosts/oak/default.nix +++ b/modules/hm/hosts/oak/default.nix @@ -51,13 +51,13 @@ global-tools = { act-github.enable = true; nix.enable = true; - }; - node = { - enable = true; cli = { enable = true; elements = ["vercel" "graphite"]; }; + }; + node = { + enable = true; prisma.enable = true; }; python = { From 2ad3f6f0296fa765f8f4d0c369bfa46cacbca998 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 10:35:55 +0200 Subject: [PATCH 08/71] chore: :pencil2: update commitlint configuration to enforce subject case --- .commitlintrc.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.commitlintrc.json b/.commitlintrc.json index 99a71b5..fd4b769 100644 --- a/.commitlintrc.json +++ b/.commitlintrc.json @@ -7,8 +7,7 @@ ], "subject-case": [ 2, - "always", - "lower-case" + "always" ], "scope-empty": [ 0, From b83538a22738fab3ef795513817826bbfafb5b7d Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 10:40:57 +0200 Subject: [PATCH 09/71] fix: :bug: update cli configuration to reflect global tools structure --- modules/hm/common/dev/global-tools/cli.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/hm/common/dev/global-tools/cli.nix b/modules/hm/common/dev/global-tools/cli.nix index ae3947a..8e7591f 100644 --- a/modules/hm/common/dev/global-tools/cli.nix +++ b/modules/hm/common/dev/global-tools/cli.nix @@ -1,16 +1,16 @@ { pkgs, lib, config, ... }: let - cfg = config.modules.common.dev.node.cli; + cfg = config.modules.common.dev.global-tools.cli; in { - options.modules.common.dev.node.cli = { - enable = lib.mkEnableOption "Enable CLI for Node.js deployments"; + options.modules.common.dev.global-tools.cli = { + enable = lib.mkEnableOption "Enable CLI"; elements = lib.mkOption { type = lib.types.listOf (lib.types.enum ["vercel" "graphite"]); default = ["vercel"]; - description = "List of CLI tools to install for Node.js deployments"; + description = "List of CLI tools to install"; }; }; From ed338a931a88cb6a912ac6673092cfe6538a9e82 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 10:50:47 +0200 Subject: [PATCH 10/71] refactor: :art: documentation configuration and remove onlyoffice module --- modules/hm/common/default.nix | 2 +- modules/hm/common/documentation/default.nix | 22 +++++++++++++++++++ .../hm/common/documentation/onlyoffice.nix | 16 -------------- modules/hm/hosts/oak/default.nix | 4 +++- 4 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 modules/hm/common/documentation/default.nix delete mode 100644 modules/hm/common/documentation/onlyoffice.nix diff --git a/modules/hm/common/default.nix b/modules/hm/common/default.nix index 1747780..4180aa1 100644 --- a/modules/hm/common/default.nix +++ b/modules/hm/common/default.nix @@ -23,7 +23,7 @@ ./dev/rust.nix ./documentation/obsidian.nix - ./documentation/onlyoffice.nix + ./documentation ./emulator diff --git a/modules/hm/common/documentation/default.nix b/modules/hm/common/documentation/default.nix new file mode 100644 index 0000000..071057e --- /dev/null +++ b/modules/hm/common/documentation/default.nix @@ -0,0 +1,22 @@ +{ pkgs, lib, config, ... }: + +let + cfg = config.modules.common.documentation; +in +{ + options.modules.common.documentation = { + enable = lib.mkEnableOption "Enable document editor"; + + editor = lib.mkOption { + type = lib.types.listOf (lib.types.enum ["onlyoffice"]); + default = []; + description = "List of document editors to install"; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = (with pkgs; [ + (lib.optionals (lib.elem "onlyoffice" cfg.editor) onlyoffice-bin) + ]); + }; +} diff --git a/modules/hm/common/documentation/onlyoffice.nix b/modules/hm/common/documentation/onlyoffice.nix deleted file mode 100644 index 80e4436..0000000 --- a/modules/hm/common/documentation/onlyoffice.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, lib, config, ... }: - -let - cfg = config.modules.common.documentation.onlyoffice; -in -{ - options.modules.common.documentation.onlyoffice = { - enable = lib.mkEnableOption "Enable OnlyOffice document editor"; - }; - - config = lib.mkIf cfg.enable { - home.packages = (with pkgs; [ - onlyoffice-bin - ]); - }; -} diff --git a/modules/hm/hosts/oak/default.nix b/modules/hm/hosts/oak/default.nix index 23863d8..352d0aa 100644 --- a/modules/hm/hosts/oak/default.nix +++ b/modules/hm/hosts/oak/default.nix @@ -34,11 +34,13 @@ driver.enable = true; }; documentation = { + enable = true; + editor = ["onlyoffice"]; + obsidian = { enable = true; backupMethod = "git-push-temp"; }; - onlyoffice.enable = true; }; dev = { editor = { From e8647f39c0356fe39b3628084bd3675de621edc6 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:46:15 +0200 Subject: [PATCH 11/71] feat: :sparkles: integrate deploy-rs and update flake configuration --- flake.lock | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++--- flake.nix | 67 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 140 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 526374f..7ba0bdb 100755 --- a/flake.lock +++ b/flake.lock @@ -9,17 +9,39 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1737459777, - "narHash": "sha256-IlydxBpzH13HyDXq8YM3y9gz/SkN0pDpWeMXNt/+EyE=", + "lastModified": 1749757487, + "narHash": "sha256-yPxNQ2wo4Iiv/QiacFcL4gPC/uansnY6FmPvW53fUhg=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "18c577a2a160453f4a6b4050fb0eac7d28b92ead", + "rev": "12314126ea2c78758055c1f413182fbea617801c", "type": "github" }, "original": { "owner": "chaotic-cx", + "ref": "nyxpkgs-unstable", "repo": "nyx", - "rev": "18c577a2a160453f4a6b4050fb0eac7d28b92ead", + "type": "github" + } + }, + "deploy-rs": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1749105467, + "narHash": "sha256-hXh76y/wDl15almBcqvjryB50B0BaiXJKk20f314RoE=", + "owner": "serokell", + "repo": "deploy-rs", + "rev": "6bc76b872374845ba9d645a2f012b764fecd765f", + "type": "github" + }, + "original": { + "owner": "serokell", + "repo": "deploy-rs", "type": "github" } }, @@ -45,6 +67,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -337,6 +375,7 @@ "root": { "inputs": { "chaotic": "chaotic", + "deploy-rs": "deploy-rs", "hydenix": "hydenix", "nix-gaming": "nix-gaming", "nix-index-database": "nix-index-database", @@ -360,6 +399,39 @@ "repo": "rust-analyzer", "type": "github" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index ef6fc0d..1399f48 100755 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "template for hydenix"; inputs = { - chaotic.url = "github:chaotic-cx/nyx/18c577a2a160453f4a6b4050fb0eac7d28b92ead"; + chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; # User's nixpkgs - for user packages nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; @@ -24,6 +24,11 @@ url = "github:nix-community/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; }; + + deploy-rs = { + url = "github:serokell/deploy-rs"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = @@ -61,20 +66,76 @@ hydenix-inputs = inputs.hydenix.inputs // inputs.hydenix.lib // inputs.hydenix; flake = inputs.self.outPath; }; + + # All below is for deploy-rs + system = inputs.hydenix.lib.system; + pkgs = import inputs.nixpkgs { + inherit system; + overlays = [ inputs.deploy-rs.overlays.default ]; + }; + + mkDeployNode = hostname: { + hostname = hostname; + profiles.system = { + # Change from root to your user + user = "${vars.user}"; + path = inputs.deploy-rs.lib.${system}.activate.nixos inputs.self.nixosConfigurations.${hostname}; + sshUser = "${vars.user}"; + interactiveSudo = true; + sshOpts = [ + "-p" + "22" + ]; + magicRollback = true; + confirmTimeout = 300; + }; + }; in { nixosConfigurations = { fern = mkHost "fern"; oak = mkHost "oak"; - # TODO: temp host for rebuild iso - nixos = mkHost "oak"; + "fern.local" = mkHost "fern"; + "oak.local" = mkHost "oak"; + }; + + deploy.nodes = { + fern = mkDeployNode "fern.local"; + oak = mkDeployNode "oak.local"; }; packages.${inputs.hydenix.lib.system} = { fern-vm = mkVm "fern"; oak-vm = mkVm "oak"; + build-iso = isoConfig.build-iso; burn-iso = isoConfig.burn-iso; + + rb = pkgs.writeShellScriptBin "rb" '' + host=$1 + case "$host" in + "oak") + ${pkgs.deploy-rs.deploy-rs}/bin/deploy --skip-checks .#oak ;; + "fern") + ${pkgs.deploy-rs.deploy-rs}/bin/deploy --skip-checks .#fern ;; + "all") + ${pkgs.deploy-rs.deploy-rs}/bin/deploy --skip-checks .#oak + ${pkgs.deploy-rs.deploy-rs}/bin/deploy --skip-checks .#fern + ;; + *) echo "Usage: rb [oak|fern|all]" ;; + esac + ''; + + + # Only check the specific deployment node + checks.${system} = { + oak-check = inputs.deploy-rs.lib.${system}.deployChecks { + nodes.oak = inputs.self.deploy.nodes.oak; + }; + fern-check = inputs.deploy-rs.lib.${system}.deployChecks { + nodes.fern = inputs.self.deploy.nodes.fern; + }; + }; }; }; } From b7eac3691337b2e587cecaab8d9cc16eb4934bfe Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:46:39 +0200 Subject: [PATCH 12/71] fix: :bug: update system.stateversion to 25.05 in default.nix --- hosts/fern/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/fern/default.nix b/hosts/fern/default.nix index 3589f60..2d66d74 100644 --- a/hosts/fern/default.nix +++ b/hosts/fern/default.nix @@ -69,4 +69,6 @@ in ]; shell = pkgs.zsh; }; + + system.stateVersion = "25.05"; } From 342ee35667f0d205a42dfe9547741e637b188f39 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:47:05 +0200 Subject: [PATCH 13/71] refactor: :art: remove enable option from cli configuration --- modules/hm/common/dev/global-tools/cli.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/hm/common/dev/global-tools/cli.nix b/modules/hm/common/dev/global-tools/cli.nix index 8e7591f..7af2767 100644 --- a/modules/hm/common/dev/global-tools/cli.nix +++ b/modules/hm/common/dev/global-tools/cli.nix @@ -5,7 +5,6 @@ let in { options.modules.common.dev.global-tools.cli = { - enable = lib.mkEnableOption "Enable CLI"; elements = lib.mkOption { type = lib.types.listOf (lib.types.enum ["vercel" "graphite"]); @@ -14,7 +13,7 @@ in }; }; - config = lib.mkIf cfg.enable { + config = { home.packages = (with pkgs; [ (lib.optionals (lib.elem "vercel" cfg.elements) nodePackages.vercel) (lib.optionals (lib.elem "graphite" cfg.elements) graphite-cli) From fe574df47411b71d195794c7885480595ee4fa90 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:47:24 +0200 Subject: [PATCH 14/71] refactor: :art: remove enable option from browser module configuration --- modules/hm/common/browser/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/hm/common/browser/default.nix b/modules/hm/common/browser/default.nix index 84709b9..e3549e3 100644 --- a/modules/hm/common/browser/default.nix +++ b/modules/hm/common/browser/default.nix @@ -5,8 +5,6 @@ let in { options.modules.common.browser = { - enable = lib.mkEnableOption "Enable browser module"; - emulators = lib.mkOption { type = lib.types.listOf (lib.types.enum ["chromium" "chrome" "firefox" "brave" "vivaldi" "edge"]); default = []; @@ -19,7 +17,7 @@ in }; }; - config = lib.mkIf cfg.enable { + config = { home.packages = with pkgs; ( (lib.optionals (lib.elem "chromium" cfg.emulators) [chromium]) ++ (lib.optionals (lib.elem "chrome" cfg.emulators) [google-chrome]) ++ From 8a80117caf776050729002c5e1f057c7fe6b7d29 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:48:32 +0200 Subject: [PATCH 15/71] refactor: :art: remove enable option from mail --- modules/hm/common/communication/mail/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/hm/common/communication/mail/default.nix b/modules/hm/common/communication/mail/default.nix index d0ab8ab..76964df 100644 --- a/modules/hm/common/communication/mail/default.nix +++ b/modules/hm/common/communication/mail/default.nix @@ -17,8 +17,6 @@ let in { options.modules.common.communication.mail = { - enable = lib.mkEnableOption "Enable mail communication tools"; - services = lib.mkOption { type = lib.types.listOf (lib.types.enum ["thunderbird" "bluemail"]); default = ["thunderbird"]; @@ -26,7 +24,7 @@ in }; }; - config = lib.mkIf cfg.enable { + config = { home.packages = packagesToInstall; }; } \ No newline at end of file From 5d4e3303728139df66d22171b5033a6fe8033e02 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:48:45 +0200 Subject: [PATCH 16/71] refactor: :art: remove enable option from documentation configuration --- modules/hm/common/documentation/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/hm/common/documentation/default.nix b/modules/hm/common/documentation/default.nix index 071057e..42f2c7b 100644 --- a/modules/hm/common/documentation/default.nix +++ b/modules/hm/common/documentation/default.nix @@ -5,8 +5,6 @@ let in { options.modules.common.documentation = { - enable = lib.mkEnableOption "Enable document editor"; - editor = lib.mkOption { type = lib.types.listOf (lib.types.enum ["onlyoffice"]); default = []; @@ -14,7 +12,7 @@ in }; }; - config = lib.mkIf cfg.enable { + config = { home.packages = (with pkgs; [ (lib.optionals (lib.elem "onlyoffice" cfg.editor) onlyoffice-bin) ]); From 096bd2a15ed9e73434b45aab61b4af77fd64e054 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:49:05 +0200 Subject: [PATCH 17/71] feat: :sparkles: add configuration for game engine installation --- modules/hm/common/engine/default.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 modules/hm/common/engine/default.nix diff --git a/modules/hm/common/engine/default.nix b/modules/hm/common/engine/default.nix new file mode 100644 index 0000000..10f705e --- /dev/null +++ b/modules/hm/common/engine/default.nix @@ -0,0 +1,20 @@ +{ pkgs, lib, config, vars, ... }: + +let + cfg = config.modules.common; +in +{ + options.modules.common = { + engine = lib.mkOption { + type = lib.types.listOf (lib.types.enum ["unity"]); + default = []; + description = "List of game engines to install"; + }; + }; + + config = { + home.packages = with pkgs; ( + (lib.optionals (lib.elem "unity" cfg.engine) [unityhub]) + ); + }; +} From d7297befad6e395231dbb7f43cc3942e67a3bd6d Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:49:23 +0200 Subject: [PATCH 18/71] refactor: :art: remove unity hub engine configuration --- modules/hm/common/engine/engine.nix | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 modules/hm/common/engine/engine.nix diff --git a/modules/hm/common/engine/engine.nix b/modules/hm/common/engine/engine.nix deleted file mode 100644 index 5c64a07..0000000 --- a/modules/hm/common/engine/engine.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, lib, config, vars, ... }: - -let - cfg = config.modules.common.engine.unity; -in -{ - options.modules.common.engine.unity = { - enable = lib.mkEnableOption "Enable Unity Hub for managing Unity installations"; - }; - - config = lib.mkIf cfg.enable { - home.packages = (with pkgs; [ - unityhub - ]); - }; -} From 3853dc8e03d05208fe32437c02dd6d46567520b1 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:49:34 +0200 Subject: [PATCH 19/71] refactor: :art: remove easyeffects audio processing module configuration --- modules/hm/common/multimedia/easyeffects.nix | 41 -------------------- 1 file changed, 41 deletions(-) delete mode 100755 modules/hm/common/multimedia/easyeffects.nix diff --git a/modules/hm/common/multimedia/easyeffects.nix b/modules/hm/common/multimedia/easyeffects.nix deleted file mode 100755 index 976d3f2..0000000 --- a/modules/hm/common/multimedia/easyeffects.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: - -let - cfg = config.modules.common.multimedia.easyeffects; - # Common presets from the community - perfectEq = builtins.fetchurl { - url = "https://raw.githubusercontent.com/JackHack96/EasyEffects-Presets/master/Perfect%20EQ.json"; - name = "perfect-eq.json"; - sha256 = "sha256:0cppf5kcpp2spz7y38n0xwj83i4jkgvcbp06p1l005p2vs7xs59f"; - }; -in -{ - options.modules.common.multimedia.easyeffects = { - enable = lib.mkEnableOption "Enable EasyEffects audio processing tool"; - }; - - config = lib.mkIf cfg.enable { - # Install EasyEffects - home.packages = with pkgs; [ - easyeffects - calf # Additional audio plugins - lsp-plugins # More audio plugins - ]; - - # Enable EasyEffects service - services.easyeffects = { - enable = true; - preset = "Perfect EQ"; # Default to Perfect EQ preset - }; - - # Install community presets - xdg.configFile = { - "easyeffects/output/Perfect EQ.json".source = perfectEq; - }; - }; -} From 42b66ea70b26cd1a9244c31b9332b9791199ba34 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:49:57 +0200 Subject: [PATCH 20/71] refactor: :art: remove enable option from disk usage --- modules/hm/common/shell/disk-usage.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/hm/common/shell/disk-usage.nix b/modules/hm/common/shell/disk-usage.nix index be6e8b1..7718d4c 100644 --- a/modules/hm/common/shell/disk-usage.nix +++ b/modules/hm/common/shell/disk-usage.nix @@ -6,11 +6,9 @@ let in { options.modules.common.shell.disk-usage = { - enable = lib.mkEnableOption "Enable Disk Usage Analyzers"; - tools = lib.mkOption { type = lib.types.listOf (lib.types.enum validTools); - default = [ "squirreldisk" ]; + default = []; description = "List of disk usage analyzers to install."; }; }; From 502fcaa8dc07591d7f4372b454f0811f40677180 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:50:16 +0200 Subject: [PATCH 21/71] refactor: :art: remove gitlkraken utility configuration --- modules/hm/common/utilities/gitkraken.nix | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 modules/hm/common/utilities/gitkraken.nix diff --git a/modules/hm/common/utilities/gitkraken.nix b/modules/hm/common/utilities/gitkraken.nix deleted file mode 100644 index fa557e2..0000000 --- a/modules/hm/common/utilities/gitkraken.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, lib, config, ... }: - -let - cfg = config.modules.common.utilities.gitkraken; -in -{ - options.modules.common.utilities.gitkraken = { - enable = lib.mkEnableOption "Enable GitKraken (Git GUI client)"; - }; - - config = lib.mkIf cfg.enable { - home.packages = (with pkgs; [ - gitkraken - ]); - }; -} From daa35aa13e26be3032002a8179564583055f6cb3 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:50:47 +0200 Subject: [PATCH 22/71] docs: :memo: update monitor comments to include features --- modules/hm/desktops/hydenix.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/hm/desktops/hydenix.nix b/modules/hm/desktops/hydenix.nix index 5229e3b..0376510 100644 --- a/modules/hm/desktops/hydenix.nix +++ b/modules/hm/desktops/hydenix.nix @@ -93,7 +93,8 @@ in # Example monitor configuration # Replace names like HDMI-A-1, DP-1, etc. with the actual names of your monitors (use `hyprctl monitors` to list) - # monitor=,@,x, + # monitor = ,,,,, + # Features can include: "primary", "no-vrr", "no-hdr", "no-gamma", "vrr", etc. # Main display # monitor=HDMI-A-1,auto,0x0,1 From b782297d947524f07d403158d8f1e86b3ee22125 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:51:53 +0200 Subject: [PATCH 23/71] refactor: :truck: support for chaotic and automatic garbage collection in nix --- modules/system/common/{ => nix}/linux-cachyos.nix | 1 + modules/system/common/{ => nix}/nix-garbage.nix | 0 2 files changed, 1 insertion(+) rename modules/system/common/{ => nix}/linux-cachyos.nix (94%) rename modules/system/common/{ => nix}/nix-garbage.nix (100%) diff --git a/modules/system/common/linux-cachyos.nix b/modules/system/common/nix/linux-cachyos.nix similarity index 94% rename from modules/system/common/linux-cachyos.nix rename to modules/system/common/nix/linux-cachyos.nix index d8ccc13..05e6da1 100755 --- a/modules/system/common/linux-cachyos.nix +++ b/modules/system/common/nix/linux-cachyos.nix @@ -18,6 +18,7 @@ in config = lib.mkIf cfg.enable { boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos; + services.scx.enable = true; nix.settings = { substituters = [ "https://chaotic-nyx.cachix.org" diff --git a/modules/system/common/nix-garbage.nix b/modules/system/common/nix/nix-garbage.nix similarity index 100% rename from modules/system/common/nix-garbage.nix rename to modules/system/common/nix/nix-garbage.nix From 4fcfc20a92517063890ea1d9a7b30d2bca450b24 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:52:08 +0200 Subject: [PATCH 24/71] refactor: :art: remove amd gpu support configuration --- modules/system/common/hardware/gpu/amd.nix | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 modules/system/common/hardware/gpu/amd.nix diff --git a/modules/system/common/hardware/gpu/amd.nix b/modules/system/common/hardware/gpu/amd.nix deleted file mode 100644 index b4db025..0000000 --- a/modules/system/common/hardware/gpu/amd.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ pkgs, config, lib, ... }: - -let - cfg = config.modules.hardware.gpu.amd; -in -{ - options.modules.hardware.gpu.amd = { - enable = lib.mkEnableOption "Enable AMD GPU support with Vulkan tools"; - }; - - config = lib.mkIf cfg.enable { - - environment.systemPackages = (with pkgs; [ - vulkan-tools - ]); - }; -} From c195606d4842ea0efc0d679b62fedfac32d66ef6 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:52:23 +0200 Subject: [PATCH 25/71] refactor: :art: streamline container engine configuration in nix --- .../virtualisation/containers/containers.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/system/common/virtualisation/containers/containers.nix b/modules/system/common/virtualisation/containers/containers.nix index 5c265a6..f370664 100644 --- a/modules/system/common/virtualisation/containers/containers.nix +++ b/modules/system/common/virtualisation/containers/containers.nix @@ -7,26 +7,25 @@ }: let - cfg = config.modules.virtualisation; + cfg = config.modules.virtualisation.containers; in { - options.modules.virtualisation = { - docker = { - enable = lib.mkEnableOption "Enable Docker support"; - }; - podman = { - enable = lib.mkEnableOption "Enable podman"; + options.modules.virtualisation.containers = { + engine = lib.mkOption { + type = lib.types.listOf (lib.types.enum ["docker" "podman"]); + default = []; + description = "List of container engines to enable"; }; }; config = lib.mkMerge [ - (lib.mkIf cfg.docker.enable { + (lib.mkIf (lib.elem "docker" cfg.engine) { users.groups.docker.members = [ "${vars.user}" ]; virtualisation.docker.enable = true; environment.systemPackages = [ pkgs.docker pkgs.docker-compose ]; }) - (lib.mkIf cfg.podman.enable { + (lib.mkIf (lib.elem "podman" cfg.engine) { virtualisation.podman.enable = true; environment.systemPackages = [ pkgs.podman pkgs.podman-compose ]; From 160fc96ed3155b96e70265756853ac59cdde3547 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:53:01 +0200 Subject: [PATCH 26/71] refactor: :art: enhance gamemode, additional settings and optimizations --- modules/system/common/games/games.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/system/common/games/games.nix b/modules/system/common/games/games.nix index 2d01f95..5554fd4 100755 --- a/modules/system/common/games/games.nix +++ b/modules/system/common/games/games.nix @@ -32,7 +32,24 @@ in programs = lib.mkMerge [ (lib.mkIf cfg.steam.enable { - gamemode.enable = true; + gamemode = { + enable = true; + enableRenice = true; + settings = { + general = { + inhibit_screensaver = 1; + }; + + gpu = { + apply_gpu_optimisations = "accept-responsibility"; + }; + + custom = { + start = "notify-send 'GameMode started'"; + end = "notify-send 'GameMode ended'"; + }; + }; + }; gamescope = { enable = true; capSysNice = true; From 391b76bcba0206f63654998af5ce42b5f111135b Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:53:16 +0200 Subject: [PATCH 27/71] refactor: :art: remove unnecessary node.js dependencies from dev.nix --- modules/system/common/dev/dev.nix | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/modules/system/common/dev/dev.nix b/modules/system/common/dev/dev.nix index d5060ad..5d4231f 100755 --- a/modules/system/common/dev/dev.nix +++ b/modules/system/common/dev/dev.nix @@ -30,16 +30,6 @@ in libunwind libuuid zlib - # Add any other libraries you might need - - # Node.js dependencies - nodejs_20 - nodePackages.pnpm - # Common runtime dependencies - stdenv.cc.cc - openssl - zlib - pnpm ]; }; }; From 4501679a5f5bfe0ef30a72407cb7bb7b76854fc7 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:53:30 +0200 Subject: [PATCH 28/71] refactor: :art: remove google-chrome dependency from flutter.nix --- modules/system/common/dev/flutter.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/system/common/dev/flutter.nix b/modules/system/common/dev/flutter.nix index 81c1d81..9135ce6 100755 --- a/modules/system/common/dev/flutter.nix +++ b/modules/system/common/dev/flutter.nix @@ -50,8 +50,6 @@ in [ pkgs.flutter cfg.jdkPackage - # TODO: move to its own module - pkgs.google-chrome ] ++ lib.optional cfg.withAndroid androidSdk; @@ -59,7 +57,6 @@ in environment.variables = lib.mkMerge [ { JAVA_HOME = "${cfg.jdkPackage}"; } { STUDIO_JDK = "${cfg.jdkPackage}"; } - { CHROME_EXECUTABLE = "${pkgs.google-chrome}/bin/google-chrome-stable"; } (lib.mkIf cfg.withAndroid { ANDROID_HOME = "${androidSdk}/libexec/android-sdk"; }) From 0f9c4968bfe3e1980f73bd2e03c9a456b4541b5f Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:54:05 +0200 Subject: [PATCH 29/71] refactor: :art: remove php option hm & sys --- modules/system/common/dev/php.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/system/common/dev/php.nix b/modules/system/common/dev/php.nix index f5330d6..0216333 100644 --- a/modules/system/common/dev/php.nix +++ b/modules/system/common/dev/php.nix @@ -6,16 +6,10 @@ in { options.modules.dev.php = { enable = lib.mkEnableOption "Enable PHP development environment"; - - installMethod = lib.mkOption { - type = lib.types.enum [ "hm" "sys" ]; - default = "sys"; - description = "Choose whether to install php via home-manager or directly in the environment."; - }; }; config = lib.mkIf cfg.enable { - environment.systemPackages = lib.mkIf (cfg.installMethod == "sys") (with pkgs; [ + environment.systemPackages = (with pkgs; [ php83Extensions.xdebug php83Extensions.sqlsrv php83 From 1cf325b02d3c47dd8ca7e385fb01121471ce9760 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:54:37 +0200 Subject: [PATCH 30/71] feat: :sparkles: add yubikey support and password manager backend --- .../common/security/password-manager.nix | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 modules/system/common/security/password-manager.nix diff --git a/modules/system/common/security/password-manager.nix b/modules/system/common/security/password-manager.nix new file mode 100644 index 0000000..f59b1ab --- /dev/null +++ b/modules/system/common/security/password-manager.nix @@ -0,0 +1,44 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.modules.security; +in { + options.modules.security = { + yubikey.enable = mkEnableOption "Enable YubiKey support for password management"; + + passwordManager = { + backend = mkOption { + type = types.listOf (types.enum ["keepassxc" "bitwarden"]); + default = ["keepassxc"]; + description = "Select the password manager backend(s) to use."; + }; + }; + }; + + config = { + services.pcscd.enable = cfg.yubikey.enable; + + services.udev.packages = lib.optionals cfg.yubikey.enable [ + pkgs.yubikey-personalization + ]; + + environment.systemPackages = + (lib.optionals cfg.yubikey.enable [ + pkgs.yubikey-manager + pkgs.yubikey-personalization + pkgs.yubioath-flutter + pkgs.yubikey-touch-detector + pkgs.age + pkgs.age-plugin-yubikey + pkgs.pam_u2f + ]) ++ + (lib.optionals (lib.elem "keepassxc" cfg.passwordManager.backend) [ + pkgs.keepassxc + ]) ++ + (lib.optionals (lib.elem "bitwarden" cfg.passwordManager.backend) [ + pkgs.bitwarden + ]); + }; +} \ No newline at end of file From 98e6ecb63cde44bacb1a779662dfa0bb6e1d429d Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:54:58 +0200 Subject: [PATCH 31/71] feat: :sparkles: add power saving module with battery health --- modules/system/common/hardware/powersave.nix | 164 +++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 modules/system/common/hardware/powersave.nix diff --git a/modules/system/common/hardware/powersave.nix b/modules/system/common/hardware/powersave.nix new file mode 100644 index 0000000..d53e1a3 --- /dev/null +++ b/modules/system/common/hardware/powersave.nix @@ -0,0 +1,164 @@ +{ config, lib, pkgs, vars, ... }: + +let + cfg = config.modules.hardware.powersave; +in { + options.modules.hardware.powersave = { + enable = lib.mkEnableOption "Enable power saving configuration"; + + architecture = lib.mkOption { + type = lib.types.enum [ "intel" "amd" ]; + default = "amd"; + description = "Select the architecture for power saving optimizations"; + }; + + batteryHealth = { + enable = lib.mkEnableOption "Enable battery health preservation features"; + chargeThresholds = { + start = lib.mkOption { + type = lib.types.int; + default = 75; + description = "Start charging when battery falls below this percentage"; + }; + stop = lib.mkOption { + type = lib.types.int; + default = 80; + description = "Stop charging when battery reaches this percentage"; + }; + }; + }; + + disk = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = []; + description = "List of disks for power management"; + }; + + managePowerProfiles = lib.mkOption { + type = lib.types.bool; + default = true; + description = '' + Enable basic power profile management through kernel parameters. + Note: For advanced control (fan curves, lighting, etc.) use asusctl instead. + ''; + }; + + asus = { + enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable ASUS hardware support for power management."; + }; + }; + }; + + config = lib.mkIf cfg.enable { + # Add required packages + environment.systemPackages = with pkgs; [ + powertop + acpi + ] ++ lib.optional (cfg.architecture == "amd") amdctl + ++ lib.optionals cfg.asus.enable [ asusctl supergfxctl ]; + + # Enable power management + powerManagement = { + enable = true; + cpuFreqGovernor = lib.mkDefault "powersave"; + powertop.enable = true; + }; + + # Enable TLP for advanced power management + services.tlp = { + enable = true; + settings = let + disks = lib.concatStringsSep " " cfg.disk; + diskSettings = lib.concatStringsSep " " (lib.genList (_: "128") (lib.length cfg.disk)); + in { + # CPU settings + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + CPU_BOOST_ON_BAT = 0; + + # Architecture specific settings + CPU_HWP_ON_BAT = if cfg.architecture == "amd" then "power" else "balance_performance"; + PLATFORM_PROFILE_ON_BAT = "low-power"; + + # PCIe power management + PCIE_ASPM_ON_BAT = "powersupersave"; + + # WiFi power saving + WIFI_PWR_ON_BAT = "on"; + + # Audio power saving + SOUND_POWER_SAVE_ON_BAT = 1; + + # USB autosuspend + USB_AUTOSUSPEND = 1; + USB_BLACKLIST_BTUSB = 1; + + # Disk power management + DISK_DEVICES = disks; + DISK_APM_LEVEL_ON_BAT = diskSettings; + DISK_SPINDOWN_TIMEOUT_ON_BAT = diskSettings; + + # Runtime power management + RUNTIME_PM_ON_BAT = "auto"; + + # Battery charge thresholds (for battery health) + START_CHARGE_THRESH_BAT1 = cfg.batteryHealth.chargeThresholds.start; + STOP_CHARGE_THRESH_BAT1 = cfg.batteryHealth.chargeThresholds.stop; + + # Ensure TLP applies these thresholds + RESTORE_THRESHOLDS_ON_BAT = 1; + }; + }; + + # Enable auto-cpufreq for dynamic CPU frequency scaling + services.auto-cpufreq = { + enable = true; + settings = { + battery = { + governor = "powersave"; + turbo = "never"; + }; + charger = { + governor = if cfg.architecture == "amd" then "ondemand" else "performance"; + turbo = "auto"; + }; + }; + }; + + # Kernel parameters + boot.kernelParams = + (if cfg.managePowerProfiles then [ + "mem_sleep_default=deep" + "power_supply.wakeup=disabled" + "usbcore.autosuspend=-1" + "libata.force=noncq" + "pcie_aspm=force" + ] else []) ++ + (if cfg.architecture == "amd" then [ + "amd_pstate=active" + "amd_pstate.shared_mem=1" + ] else [ + "intel_idle.max_cstate=4" + "processor.max_cstate=5" + ]); + + # Services configuration + services = { + thermald.enable = lib.mkDefault (cfg.architecture == "intel"); + power-profiles-daemon.enable = lib.mkForce (!(cfg.batteryHealth.enable || cfg.managePowerProfiles)); + upower.enable = true; + + # ASUS control services + asusd = lib.mkIf cfg.asus.enable { + enable = true; + enableUserService = true; + }; + supergfxd = lib.mkIf cfg.asus.enable { + enable = true; + }; + }; + }; +} \ No newline at end of file From 895d1c6a0f8894371ecd14be9fd1ea063d2a923e Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:55:38 +0200 Subject: [PATCH 32/71] refactor: :art: streamline module paths and remove obsolete entries --- modules/hm/common/default.nix | 5 ++--- modules/system/common/default.nix | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/hm/common/default.nix b/modules/hm/common/default.nix index 4180aa1..1e4fd3f 100644 --- a/modules/hm/common/default.nix +++ b/modules/hm/common/default.nix @@ -27,7 +27,7 @@ ./emulator - ./engine/engine.nix + ./engine #./extra/ignore-file-retriever.nix @@ -38,7 +38,6 @@ ./games/star-citizen.nix ./games/northstar.nix - ./multimedia/easyeffects.nix ./multimedia/gimp.nix ./multimedia/mpv.nix ./multimedia/obs.nix @@ -56,7 +55,7 @@ ./shell/tools.nix ./utilities/filezilla.nix - ./utilities/gitkraken.nix + ./utilities/kde-connect.nix ./utilities/scalar.nix ./utilities/stacer.nix ]; diff --git a/modules/system/common/default.nix b/modules/system/common/default.nix index c38f7ae..af2d7f3 100644 --- a/modules/system/common/default.nix +++ b/modules/system/common/default.nix @@ -11,20 +11,20 @@ ./games/gamescope.nix ./games/games.nix - ./hardware/gpu/amd.nix ./hardware/autologin.nix ./hardware/boot.nix + ./hardware/powersave.nix ./networks/print/print.nix ./networks/vpn/tailscale.nix + ./nix/linux-cachyos.nix + ./nix/nix-garbage.nix + ./security/antivirus.nix + ./security/password-manager.nix ./virtualisation/containers/containers.nix - - ./linux-cachyos.nix - - ./nix-garbage.nix ]; # TODO: move this somewhere? From 064f4d8ed41db5660e2a57465add18a8f8570959 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:56:41 +0200 Subject: [PATCH 33/71] feat: :sparkles: add kde connect utility module --- modules/hm/common/utilities/kde-connect.nix | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 modules/hm/common/utilities/kde-connect.nix diff --git a/modules/hm/common/utilities/kde-connect.nix b/modules/hm/common/utilities/kde-connect.nix new file mode 100644 index 0000000..6a2dbca --- /dev/null +++ b/modules/hm/common/utilities/kde-connect.nix @@ -0,0 +1,25 @@ + + + +{ + config, + lib, + pkgs, + ... +}: + +with lib; + +let + cfg = config.modules.common.utilities.kdeconnect; +in +{ + options.modules.common.utilities.kdeconnect = { + enable = mkEnableOption "KDE Connect"; + }; + + config = mkIf cfg.enable { + services.kdeconnect.enable = true; + services.kdeconnect.indicator = true; + }; +} \ No newline at end of file From bcf4756fb69d9fd8a3108e566ae0d6ddf926e68b Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 15:57:10 +0200 Subject: [PATCH 34/71] refactor: :art: enable configuration for utilities and security modules --- modules/hm/hosts/oak/default.nix | 10 ++++------ modules/system/hosts/oak/default.nix | 21 ++++++++++++++++----- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/modules/hm/hosts/oak/default.nix b/modules/hm/hosts/oak/default.nix index 352d0aa..1c8bc9c 100644 --- a/modules/hm/hosts/oak/default.nix +++ b/modules/hm/hosts/oak/default.nix @@ -29,14 +29,11 @@ stremio.enable = true; }; browser = { - enable = true; emulators = ["chrome" "firefox"]; driver.enable = true; }; documentation = { - enable = true; editor = ["onlyoffice"]; - obsidian = { enable = true; backupMethod = "git-push-temp"; @@ -54,7 +51,6 @@ act-github.enable = true; nix.enable = true; cli = { - enable = true; elements = ["vercel" "graphite"]; }; }; @@ -70,7 +66,6 @@ communication = { teams.enable = true; mail = { - enable = true; services = ["thunderbird"]; }; }; @@ -82,7 +77,10 @@ port = 3000; }; }; - utilities.scalar.enable = true; + utilities = { + scalar.enable = true; + kdeconnect.enable = true; + }; #extra = { #ignore-file-retriever = { #enable = true; diff --git a/modules/system/hosts/oak/default.nix b/modules/system/hosts/oak/default.nix index 3b63908..763f8d2 100644 --- a/modules/system/hosts/oak/default.nix +++ b/modules/system/hosts/oak/default.nix @@ -18,16 +18,19 @@ print.enable = true; vpn.tailscale.enable = true; }; - virtualisation.docker.enable = true; + virtualisation.containers.engine = ["docker"]; backup.syncthing = { enable = true; dirSync = "/home/${vars.user}"; subDir = "Documents"; }; - security.antivirus = { - enable = true; - engine = "clamav"; - gui.enable = true; + security = { + antivirus = { + enable = true; + engine = "clamav"; + gui.enable = true; + }; + passwordManager.backend = ["bitwarden"]; }; dev = { php.enable = true; @@ -36,5 +39,13 @@ withAndroid = true; }; }; + hardware.powersave = { + enable = true; + architecture = "amd"; + batteryHealth.enable = true; + managePowerProfiles = false; + disk = [ "nvme0n1" ]; + asus.enable = true; + }; }; } From 14096d15df60267d794f4240ef162d541b3ee686 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:24:50 +0200 Subject: [PATCH 35/71] refactor: :art: update module paths for linux-cachyos and nix-garbage --- modules/system/common/nix/linux-cachyos.nix | 4 ++-- modules/system/common/nix/nix-garbage.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/system/common/nix/linux-cachyos.nix b/modules/system/common/nix/linux-cachyos.nix index 05e6da1..8895cb9 100755 --- a/modules/system/common/nix/linux-cachyos.nix +++ b/modules/system/common/nix/linux-cachyos.nix @@ -7,11 +7,11 @@ }: let - cfg = config.modules.linux-cachyos; + cfg = config.modules.nix.linux-cachyos; in { imports = [ inputs.chaotic.nixosModules.default ]; - options.modules.linux-cachyos = { + options.modules.nix.linux-cachyos = { enable = lib.mkEnableOption "Enable Chaotic-AUR (CachyOS) support"; }; diff --git a/modules/system/common/nix/nix-garbage.nix b/modules/system/common/nix/nix-garbage.nix index 8c06729..5689556 100644 --- a/modules/system/common/nix/nix-garbage.nix +++ b/modules/system/common/nix/nix-garbage.nix @@ -1,10 +1,10 @@ { lib, pkgs, inputs, config, ... }: let - cfg = config.modules.nix-garbage; + cfg = config.modules.nix.nix-garbage; in { - options.modules.nix-garbage = { + options.modules.nix.nix-garbage = { enable = lib.mkEnableOption "Enable automatic garbage collection for Nix"; dates = lib.mkOption { From f196f9f988c366c19a5752cbeb5557ca02d0c444 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:24:58 +0200 Subject: [PATCH 36/71] feat: :sparkles: add polkit configuration for udisks2 permissions --- modules/system/common/nix/polkit.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 modules/system/common/nix/polkit.nix diff --git a/modules/system/common/nix/polkit.nix b/modules/system/common/nix/polkit.nix new file mode 100644 index 0000000..f7b1b29 --- /dev/null +++ b/modules/system/common/nix/polkit.nix @@ -0,0 +1,22 @@ +{ lib, pkgs, inputs, config, ... }: + +let + cfg = config.modules.nix.polkit; +in +{ + options.modules.nix.polkit = { + enable = lib.mkEnableOption "Enable polkit configuration"; + }; + + config = lib.mkIf cfg.enable { + # For dolphin udisks2 permission for click mounting disks + security.polkit.extraConfig = '' + polkit.addRule(function(action, subject) { + if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && + subject.isInGroup("users")) { + return polkit.Result.YES; + } + }); + ''; + }; +} From 5a982fca8f8355620ae954929aaa6dfce38078d6 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:25:24 +0200 Subject: [PATCH 37/71] refactor: :art: obsolete polkit configuration for udisks2 permissions --- modules/system/common/default.nix | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/modules/system/common/default.nix b/modules/system/common/default.nix index af2d7f3..b0448df 100644 --- a/modules/system/common/default.nix +++ b/modules/system/common/default.nix @@ -20,21 +20,11 @@ ./nix/linux-cachyos.nix ./nix/nix-garbage.nix + ./nix/polkit.nix ./security/antivirus.nix ./security/password-manager.nix ./virtualisation/containers/containers.nix ]; - - # TODO: move this somewhere? - # For dolphin udisks2 permission for click mounting disks - security.polkit.extraConfig = '' - polkit.addRule(function(action, subject) { - if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && - subject.isInGroup("users")) { - return polkit.Result.YES; - } - }); - ''; } From 028fc8ea86b6094c30a3bd057b95c0c13a1a865d Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:25:37 +0200 Subject: [PATCH 38/71] refactor: :art: restructure nix module configurations for clarity --- modules/system/hosts/fern/default.nix | 6 ++++-- modules/system/hosts/oak/default.nix | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/system/hosts/fern/default.nix b/modules/system/hosts/fern/default.nix index 19b4cb5..61a72c8 100644 --- a/modules/system/hosts/fern/default.nix +++ b/modules/system/hosts/fern/default.nix @@ -11,8 +11,10 @@ ]; modules = { - hardware.autologin.enable = false; - hardware.boot.enable = true; + hardware = { + autologin.enable = false; + boot.enable = true; + }; games.steam.enable = true; # fern specific modules diff --git a/modules/system/hosts/oak/default.nix b/modules/system/hosts/oak/default.nix index 763f8d2..82dcac8 100644 --- a/modules/system/hosts/oak/default.nix +++ b/modules/system/hosts/oak/default.nix @@ -5,9 +5,12 @@ ]; modules = { - nix-garbage = { - enable = true; - autoOptimiseStore = true; + nix = { + nix-garbage = { + enable = true; + autoOptimiseStore = true; + }; + polkit.enable = true; }; games = { enable = true; From 5f967ddc816a72dd83ae8c562d9a1292b4e39a87 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:32:54 +0200 Subject: [PATCH 39/71] refactor: :art: correct naming convention for kde-connect module --- modules/hm/common/utilities/kde-connect.nix | 4 ++-- modules/hm/hosts/oak/default.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/hm/common/utilities/kde-connect.nix b/modules/hm/common/utilities/kde-connect.nix index 6a2dbca..0a76779 100644 --- a/modules/hm/common/utilities/kde-connect.nix +++ b/modules/hm/common/utilities/kde-connect.nix @@ -11,10 +11,10 @@ with lib; let - cfg = config.modules.common.utilities.kdeconnect; + cfg = config.modules.common.utilities.kde-connect; in { - options.modules.common.utilities.kdeconnect = { + options.modules.common.utilities.kde-connect = { enable = mkEnableOption "KDE Connect"; }; diff --git a/modules/hm/hosts/oak/default.nix b/modules/hm/hosts/oak/default.nix index 1c8bc9c..cd9dbd2 100644 --- a/modules/hm/hosts/oak/default.nix +++ b/modules/hm/hosts/oak/default.nix @@ -79,7 +79,7 @@ }; utilities = { scalar.enable = true; - kdeconnect.enable = true; + kde-connect.enable = true; }; #extra = { #ignore-file-retriever = { From b1e72b26fe0abb6f35c1f5b5315ab626babb6606 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:33:43 +0200 Subject: [PATCH 40/71] refactor: :art: update commitlint to enforce lower-case subject case --- .commitlintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.commitlintrc.json b/.commitlintrc.json index fd4b769..99a71b5 100644 --- a/.commitlintrc.json +++ b/.commitlintrc.json @@ -7,7 +7,8 @@ ], "subject-case": [ 2, - "always" + "always", + "lower-case" ], "scope-empty": [ 0, From b1bc89b0addde2242c62b9b99661a47495ce61b0 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:35:16 +0200 Subject: [PATCH 41/71] feat: :sparkles: add support for okular document editor in configuration --- modules/hm/common/documentation/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/hm/common/documentation/default.nix b/modules/hm/common/documentation/default.nix index 42f2c7b..755ce85 100644 --- a/modules/hm/common/documentation/default.nix +++ b/modules/hm/common/documentation/default.nix @@ -6,7 +6,7 @@ in { options.modules.common.documentation = { editor = lib.mkOption { - type = lib.types.listOf (lib.types.enum ["onlyoffice"]); + type = lib.types.listOf (lib.types.enum ["onlyoffice" "okular"]); default = []; description = "List of document editors to install"; }; @@ -15,6 +15,7 @@ in config = { home.packages = (with pkgs; [ (lib.optionals (lib.elem "onlyoffice" cfg.editor) onlyoffice-bin) + (lib.optionals (lib.elem "okular" cfg.editor) okular) ]); }; } From 3a1e25b9dea14d7128e5f0a6b0d23a23ecf4761b Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:35:27 +0200 Subject: [PATCH 42/71] refactor: :art: simplify chromium driver condition in browser --- modules/hm/common/browser/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/hm/common/browser/default.nix b/modules/hm/common/browser/default.nix index e3549e3..c831d60 100644 --- a/modules/hm/common/browser/default.nix +++ b/modules/hm/common/browser/default.nix @@ -26,8 +26,7 @@ in (lib.optionals (lib.elem "vivaldi" cfg.emulators) [vivaldi]) ++ (lib.optionals (lib.elem "edge" cfg.emulators) [microsoft-edge]) ++ - (lib.optionals (cfg.driver.enable && lib.elem "chromium" cfg.emulators) [chromedriver]) ++ - (lib.optionals (cfg.driver.enable && lib.elem "chrome" cfg.emulators) [chromedriver]) ++ + (lib.optionals (cfg.driver.enable && (lib.elem "chromium" cfg.emulators || lib.elem "chrome" cfg.emulators)) [chromedriver]) ++ (lib.optionals (cfg.driver.enable && lib.elem "firefox" cfg.emulators) [geckodriver]) ++ (lib.optionals (cfg.driver.enable && lib.elem "edge" cfg.emulators) [msedgedriver]) ); From 5cc243d9934a3d89b72610661d1e0e343e4643b2 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:37:00 +0200 Subject: [PATCH 43/71] refactor: :art: remove unused pkgs'parameter from polkit module --- modules/system/common/nix/polkit.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/common/nix/polkit.nix b/modules/system/common/nix/polkit.nix index f7b1b29..d17ffad 100644 --- a/modules/system/common/nix/polkit.nix +++ b/modules/system/common/nix/polkit.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, inputs, config, ... }: +{ lib, inputs, config, ... }: let cfg = config.modules.nix.polkit; From 97e3304e2426d2f526ad9b9fa1956914234613d1 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:38:11 +0200 Subject: [PATCH 44/71] feat: :sparkles: add option to conditionally enable scx service --- modules/system/common/nix/linux-cachyos.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/system/common/nix/linux-cachyos.nix b/modules/system/common/nix/linux-cachyos.nix index 8895cb9..559ad8b 100755 --- a/modules/system/common/nix/linux-cachyos.nix +++ b/modules/system/common/nix/linux-cachyos.nix @@ -13,12 +13,13 @@ in imports = [ inputs.chaotic.nixosModules.default ]; options.modules.nix.linux-cachyos = { enable = lib.mkEnableOption "Enable Chaotic-AUR (CachyOS) support"; + enableSCX = lib.mkEnableOption "Enable SCX service when using Chaotic-AUR (CachyOS)"; }; config = lib.mkIf cfg.enable { boot.kernelPackages = lib.mkForce pkgs.linuxPackages_cachyos; - services.scx.enable = true; + nix.settings = { substituters = [ "https://chaotic-nyx.cachix.org" @@ -27,5 +28,8 @@ in "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" ]; }; + + # Conditionally enable services.scx + services.scx.enable = lib.mkIf cfg.enableSCX true; }; } From 8b32bc5aea300e31fd1a0e360d35eaa7ac5089de Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:39:21 +0200 Subject: [PATCH 45/71] fix: :bug: correct placement of scalar.enable in oak configuration --- modules/hm/hosts/oak/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hm/hosts/oak/default.nix b/modules/hm/hosts/oak/default.nix index cd9dbd2..fe4e633 100644 --- a/modules/hm/hosts/oak/default.nix +++ b/modules/hm/hosts/oak/default.nix @@ -78,8 +78,8 @@ }; }; utilities = { - scalar.enable = true; kde-connect.enable = true; + scalar.enable = true; }; #extra = { #ignore-file-retriever = { From ad207e71e0dd3e8286807d3d7d504309660ce46a Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:41:09 +0200 Subject: [PATCH 46/71] feat: :sparkles: extend chromium driver to include vivaldi and brave --- modules/hm/common/browser/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hm/common/browser/default.nix b/modules/hm/common/browser/default.nix index c831d60..48a7fe8 100644 --- a/modules/hm/common/browser/default.nix +++ b/modules/hm/common/browser/default.nix @@ -26,7 +26,7 @@ in (lib.optionals (lib.elem "vivaldi" cfg.emulators) [vivaldi]) ++ (lib.optionals (lib.elem "edge" cfg.emulators) [microsoft-edge]) ++ - (lib.optionals (cfg.driver.enable && (lib.elem "chromium" cfg.emulators || lib.elem "chrome" cfg.emulators)) [chromedriver]) ++ + (lib.optionals (cfg.driver.enable && (lib.elem "chromium" cfg.emulators || lib.elem "chrome" cfg.emulators || lib.elem "vivaldi" cfg.emulators || lib.elem "brave" cfg.emulators)) [chromedriver]) ++ (lib.optionals (cfg.driver.enable && lib.elem "firefox" cfg.emulators) [geckodriver]) ++ (lib.optionals (cfg.driver.enable && lib.elem "edge" cfg.emulators) [msedgedriver]) ); From cc755d3e3941f98ae6a376a712c00140aa46808d Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:42:55 +0200 Subject: [PATCH 47/71] fix: :bug: correct deployment command for deploy-rs in flake.nix --- flake.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 1399f48..4b2ea57 100755 --- a/flake.nix +++ b/flake.nix @@ -115,12 +115,12 @@ host=$1 case "$host" in "oak") - ${pkgs.deploy-rs.deploy-rs}/bin/deploy --skip-checks .#oak ;; + ${pkgs.deploy-rs}/bin/deploy --skip-checks .#oak ;; "fern") - ${pkgs.deploy-rs.deploy-rs}/bin/deploy --skip-checks .#fern ;; + ${pkgs.deploy-rs}/bin/deploy --skip-checks .#fern ;; "all") - ${pkgs.deploy-rs.deploy-rs}/bin/deploy --skip-checks .#oak - ${pkgs.deploy-rs.deploy-rs}/bin/deploy --skip-checks .#fern + ${pkgs.deploy-rs}/bin/deploy --skip-checks .#oak + ${pkgs.deploy-rs}/bin/deploy --skip-checks .#fern ;; *) echo "Usage: rb [oak|fern|all]" ;; esac From c0db603e7dda9ab24d378be8f15b3b4f01aab29d Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:44:15 +0200 Subject: [PATCH 48/71] fix: :bug: remove usbcore.autosuspend from powersave configuration --- modules/system/common/hardware/powersave.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/system/common/hardware/powersave.nix b/modules/system/common/hardware/powersave.nix index d53e1a3..61f4673 100644 --- a/modules/system/common/hardware/powersave.nix +++ b/modules/system/common/hardware/powersave.nix @@ -133,7 +133,6 @@ in { (if cfg.managePowerProfiles then [ "mem_sleep_default=deep" "power_supply.wakeup=disabled" - "usbcore.autosuspend=-1" "libata.force=noncq" "pcie_aspm=force" ] else []) ++ From 5a9172382e8b63449d04bc42ed8645a578e8af7a Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:47:08 +0200 Subject: [PATCH 49/71] fix: :bug: update imports to reference hydenix and remove default.nix --- hosts/fern/default.nix | 2 +- hosts/oak/default.nix | 2 +- modules/hm/desktops/default.nix | 8 -------- 3 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 modules/hm/desktops/default.nix diff --git a/hosts/fern/default.nix b/hosts/fern/default.nix index 2d66d74..72b2d61 100644 --- a/hosts/fern/default.nix +++ b/hosts/fern/default.nix @@ -42,7 +42,7 @@ in { # hm import imports = [ - ../../modules/hm/desktops + ../../modules/hm/desktops/hydenix.nix ]; desktops.hydenix = { diff --git a/hosts/oak/default.nix b/hosts/oak/default.nix index b38d7c3..8e019dc 100644 --- a/hosts/oak/default.nix +++ b/hosts/oak/default.nix @@ -59,7 +59,7 @@ in { # hm import imports = [ - ../../modules/hm/desktops + ../../modules/hm/desktops/hydenix.nix ../../modules/hm/hosts/oak ]; diff --git a/modules/hm/desktops/default.nix b/modules/hm/desktops/default.nix deleted file mode 100644 index 3916cf8..0000000 --- a/modules/hm/desktops/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./hydenix.nix - ]; -} From ee22861fad4548472564e08f57da187f0940df77 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:47:14 +0200 Subject: [PATCH 50/71] fix: :bug: clean up formatting in flake.nix for deployment checks --- flake.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index 4b2ea57..fb31316 100755 --- a/flake.nix +++ b/flake.nix @@ -125,16 +125,15 @@ *) echo "Usage: rb [oak|fern|all]" ;; esac ''; + }; - - # Only check the specific deployment node - checks.${system} = { - oak-check = inputs.deploy-rs.lib.${system}.deployChecks { - nodes.oak = inputs.self.deploy.nodes.oak; - }; - fern-check = inputs.deploy-rs.lib.${system}.deployChecks { - nodes.fern = inputs.self.deploy.nodes.fern; - }; + # Only check the specific deployment node + checks.${system} = { + oak-check = inputs.deploy-rs.lib.${system}.deployChecks { + nodes.oak = inputs.self.deploy.nodes.oak; + }; + fern-check = inputs.deploy-rs.lib.${system}.deployChecks { + nodes.fern = inputs.self.deploy.nodes.fern; }; }; }; From 40051dba3ed398164481d22cf6c612e4c6f35b0f Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:49:10 +0200 Subject: [PATCH 51/71] feat: :sparkles: gamemode support with customizable settings --- modules/system/common/games/games.nix | 59 +++++++++++++++++++-------- 1 file changed, 42 insertions(+), 17 deletions(-) diff --git a/modules/system/common/games/games.nix b/modules/system/common/games/games.nix index 5554fd4..120b978 100755 --- a/modules/system/common/games/games.nix +++ b/modules/system/common/games/games.nix @@ -9,15 +9,46 @@ in steam = { compatToolsPath = lib.mkOption { - type = lib.types.str; - default = "$HOME/.steam/root/compatibilitytools.d"; - description = "Path for Steam compatibility tools"; + type = lib.types.str; + default = "$HOME/.steam/root/compatibilitytools.d"; + description = "Path for Steam compatibility tools"; }; enable = lib.mkEnableOption "Enable Steam support"; }; lutris.enable = lib.mkEnableOption "Enable Lutris support"; heroic.enable = lib.mkEnableOption "Enable Heroic support"; + + gamemode = { + enable = lib.mkEnableOption "Enable GameMode support"; + enableRenice = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable renice support in GameMode"; + }; + notificationCommands = lib.mkOption { + type = lib.types.attrsOf lib.types.str; + default = { + start = "notify-send 'GameMode started'"; + end = "notify-send 'GameMode ended'"; + }; + description = "Custom notification commands for GameMode start and end events"; + }; + generalSettings = lib.mkOption { + type = lib.types.attrsOf lib.types.int; + default = { + inhibit_screensaver = 1; + }; + description = "General GameMode settings"; + }; + gpuSettings = lib.mkOption { + type = lib.types.attrsOf lib.types.str; + default = { + apply_gpu_optimisations = "accept-responsibility"; + }; + description = "GPU-related GameMode settings"; + }; + }; }; config = lib.mkIf cfg.enable { @@ -31,25 +62,19 @@ in }; programs = lib.mkMerge [ - (lib.mkIf cfg.steam.enable { + (lib.mkIf cfg.gamemode.enable { gamemode = { enable = true; - enableRenice = true; + enableRenice = cfg.gamemode.enableRenice; settings = { - general = { - inhibit_screensaver = 1; - }; - - gpu = { - apply_gpu_optimisations = "accept-responsibility"; - }; - - custom = { - start = "notify-send 'GameMode started'"; - end = "notify-send 'GameMode ended'"; - }; + general = cfg.gamemode.generalSettings; + gpu = cfg.gamemode.gpuSettings; + custom = cfg.gamemode.notificationCommands; }; }; + }) + + (lib.mkIf cfg.steam.enable { gamescope = { enable = true; capSysNice = true; From b6cc41bc68352022dd1f20f488b328677bf78f74 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:50:05 +0200 Subject: [PATCH 52/71] fix: :bug: remove unused variable 'vars' from default.nix --- modules/hm/common/engine/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hm/common/engine/default.nix b/modules/hm/common/engine/default.nix index 10f705e..135a702 100644 --- a/modules/hm/common/engine/default.nix +++ b/modules/hm/common/engine/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, config, vars, ... }: +{ pkgs, lib, config, ... }: let cfg = config.modules.common; From d22b05b00f0e1da3038b2cf406339dc7572ad187 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:52:12 +0200 Subject: [PATCH 53/71] feat: :sparkles: add customizable printer driver options --- modules/system/common/networks/print/print.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/system/common/networks/print/print.nix b/modules/system/common/networks/print/print.nix index 5e39a4b..21e2a0f 100644 --- a/modules/system/common/networks/print/print.nix +++ b/modules/system/common/networks/print/print.nix @@ -12,12 +12,20 @@ in { default = true; description = "Enable CUPS (Common Unix Printing System)"; }; + drivers = mkOption { + type = types.listOf types.package; + default = [ pkgs.cnijfilter2 ]; + description = '' + List of printer drivers to use. Defaults to [ pkgs.cnijfilter2 ], which + is an unfree package for Canon printers. + ''; + }; }; config = mkIf cfg.enable { services.printing = { enable = cfg.cups.enable; - drivers = [ pkgs.cnijfilter2 ]; + drivers = cfg.drivers; }; }; } \ No newline at end of file From 2240ca9d1e754e8dbeee40edde74bd5f7123897a Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:52:30 +0200 Subject: [PATCH 54/71] fix: :bug: refactor home.packages to use concatenation --- modules/hm/common/dev/global-tools/cli.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/hm/common/dev/global-tools/cli.nix b/modules/hm/common/dev/global-tools/cli.nix index 7af2767..2a1dda8 100644 --- a/modules/hm/common/dev/global-tools/cli.nix +++ b/modules/hm/common/dev/global-tools/cli.nix @@ -14,9 +14,9 @@ in }; config = { - home.packages = (with pkgs; [ - (lib.optionals (lib.elem "vercel" cfg.elements) nodePackages.vercel) - (lib.optionals (lib.elem "graphite" cfg.elements) graphite-cli) - ]); + home.packages = (with pkgs; + lib.optional (lib.elem "vercel" cfg.elements) nodePackages.vercel ++ + lib.optional (lib.elem "graphite" cfg.elements) graphite-cli + ); }; } From fa000df5e96441e313eac32f0890af36e82ee449 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:54:18 +0200 Subject: [PATCH 55/71] fix: :bug: update default mail services to an empty list --- modules/hm/common/communication/mail/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hm/common/communication/mail/default.nix b/modules/hm/common/communication/mail/default.nix index 76964df..f0f18b4 100644 --- a/modules/hm/common/communication/mail/default.nix +++ b/modules/hm/common/communication/mail/default.nix @@ -19,7 +19,7 @@ in options.modules.common.communication.mail = { services = lib.mkOption { type = lib.types.listOf (lib.types.enum ["thunderbird" "bluemail"]); - default = ["thunderbird"]; + default = []; description = "List of mail services to enable"; }; }; From d709dbf2b7f5a0d95cffbe7db86011a05ff7de4d Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:54:22 +0200 Subject: [PATCH 56/71] fix: :bug: simplify cli and mail service configurations in default.nix --- modules/hm/hosts/oak/default.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/hm/hosts/oak/default.nix b/modules/hm/hosts/oak/default.nix index fe4e633..9aca276 100644 --- a/modules/hm/hosts/oak/default.nix +++ b/modules/hm/hosts/oak/default.nix @@ -50,9 +50,7 @@ global-tools = { act-github.enable = true; nix.enable = true; - cli = { - elements = ["vercel" "graphite"]; - }; + cli.elements = ["vercel" "graphite"]; }; node = { enable = true; @@ -65,9 +63,7 @@ }; communication = { teams.enable = true; - mail = { - services = ["thunderbird"]; - }; + mail.services = ["thunderbird"]; }; network.tunnel = { enable = true; From 63d27079505df6ccade2650241fefee62e02faa0 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:55:33 +0200 Subject: [PATCH 57/71] fix: :bug: refactor packages to use optional concatenation --- modules/hm/common/documentation/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/hm/common/documentation/default.nix b/modules/hm/common/documentation/default.nix index 755ce85..51b3872 100644 --- a/modules/hm/common/documentation/default.nix +++ b/modules/hm/common/documentation/default.nix @@ -14,8 +14,8 @@ in config = { home.packages = (with pkgs; [ - (lib.optionals (lib.elem "onlyoffice" cfg.editor) onlyoffice-bin) - (lib.optionals (lib.elem "okular" cfg.editor) okular) + (lib.optional (lib.elem "onlyoffice" cfg.editor) onlyoffice-bin) ++ + (lib.optional (lib.elem "okular" cfg.editor) okular) ]); }; } From e1faf672ab39c1706c0bf5e09a8976af022ebb96 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 16:57:57 +0200 Subject: [PATCH 58/71] fix: :bug: update password manager to enable u2f support --- modules/system/common/security/password-manager.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/system/common/security/password-manager.nix b/modules/system/common/security/password-manager.nix index f59b1ab..cd7762d 100644 --- a/modules/system/common/security/password-manager.nix +++ b/modules/system/common/security/password-manager.nix @@ -18,11 +18,16 @@ in { }; config = { - services.pcscd.enable = cfg.yubikey.enable; + security.pam.u2f.enable = cfg.yubikey.enable; - services.udev.packages = lib.optionals cfg.yubikey.enable [ - pkgs.yubikey-personalization - ]; + services = { + pcscd.enable = cfg.yubikey.enable; + + udev.packages = lib.optionals cfg.yubikey.enable [ + pkgs.yubikey-personalization + pkgs.yubikey-manager + ]; + }; environment.systemPackages = (lib.optionals cfg.yubikey.enable [ From 6702754d19fe30e5e4f80cb7ef0db3a66860fab4 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:00:53 +0200 Subject: [PATCH 59/71] fix: :bug: refactor home.packages to use proper concatenation syntax --- modules/hm/common/documentation/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/hm/common/documentation/default.nix b/modules/hm/common/documentation/default.nix index 51b3872..d27afca 100644 --- a/modules/hm/common/documentation/default.nix +++ b/modules/hm/common/documentation/default.nix @@ -13,9 +13,9 @@ in }; config = { - home.packages = (with pkgs; [ + home.packages = with pkgs; ( (lib.optional (lib.elem "onlyoffice" cfg.editor) onlyoffice-bin) ++ (lib.optional (lib.elem "okular" cfg.editor) okular) - ]); + ); }; } From 6923e7f25b139e992f8089e96b1c8746f3d75a89 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:12:31 +0200 Subject: [PATCH 60/71] fix: :bug: add option to enable/disable KDE Connect tray indicator --- modules/hm/common/utilities/kde-connect.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/modules/hm/common/utilities/kde-connect.nix b/modules/hm/common/utilities/kde-connect.nix index 0a76779..465c9d1 100644 --- a/modules/hm/common/utilities/kde-connect.nix +++ b/modules/hm/common/utilities/kde-connect.nix @@ -1,12 +1,4 @@ - - - -{ - config, - lib, - pkgs, - ... -}: +{ config, lib, pkgs, ... }: with lib; @@ -16,10 +8,15 @@ in { options.modules.common.utilities.kde-connect = { enable = mkEnableOption "KDE Connect"; + indicator = mkOption { + type = types.bool; + default = true; + description = "Enable the KDE Connect tray indicator."; + }; }; config = mkIf cfg.enable { services.kdeconnect.enable = true; - services.kdeconnect.indicator = true; + services.kdeconnect.indicator = cfg.indicator; }; } \ No newline at end of file From 5f2a69ac6b28d4b3ae041f5bc15d10bf95433f69 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:13:03 +0200 Subject: [PATCH 61/71] fix: :bug: update steam compatibility tools path type --- modules/system/common/games/games.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/system/common/games/games.nix b/modules/system/common/games/games.nix index 120b978..8e9fe8c 100755 --- a/modules/system/common/games/games.nix +++ b/modules/system/common/games/games.nix @@ -9,8 +9,8 @@ in steam = { compatToolsPath = lib.mkOption { - type = lib.types.str; - default = "$HOME/.steam/root/compatibilitytools.d"; + type = lib.types.path; + default = "${config.users.users.${config.primaryUser}.home}/.steam/root/compatibilitytools.d"; description = "Path for Steam compatibility tools"; }; enable = lib.mkEnableOption "Enable Steam support"; @@ -35,7 +35,7 @@ in description = "Custom notification commands for GameMode start and end events"; }; generalSettings = lib.mkOption { - type = lib.types.attrsOf lib.types.int; + type = lib.types.attrsOf (lib.types.oneOf [ lib.types.int lib.types.bool lib.types.str ]); default = { inhibit_screensaver = 1; }; From c4aad166bcbc4173e1f55eb96df7dc480340ac16 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:13:16 +0200 Subject: [PATCH 62/71] fix: :bug: remove unused pkgs parameter from kde-connect module --- modules/hm/common/utilities/kde-connect.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hm/common/utilities/kde-connect.nix b/modules/hm/common/utilities/kde-connect.nix index 465c9d1..68dd37b 100644 --- a/modules/hm/common/utilities/kde-connect.nix +++ b/modules/hm/common/utilities/kde-connect.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: with lib; From 2f7b6dc5a0f805a3fbb0020b0b62178dec310fe8 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:13:58 +0200 Subject: [PATCH 63/71] fix: :bug: change default value of cli tools list to empty --- modules/hm/common/dev/global-tools/cli.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hm/common/dev/global-tools/cli.nix b/modules/hm/common/dev/global-tools/cli.nix index 2a1dda8..0141a82 100644 --- a/modules/hm/common/dev/global-tools/cli.nix +++ b/modules/hm/common/dev/global-tools/cli.nix @@ -8,7 +8,7 @@ in elements = lib.mkOption { type = lib.types.listOf (lib.types.enum ["vercel" "graphite"]); - default = ["vercel"]; + default = []; description = "List of CLI tools to install"; }; }; From 107989546897ff1e8beae1b022ae48ce288e2674 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:15:16 +0200 Subject: [PATCH 64/71] fix: :bug: simplify printing service configuration in print.nix --- modules/system/common/networks/print/print.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/system/common/networks/print/print.nix b/modules/system/common/networks/print/print.nix index 21e2a0f..fc91d37 100644 --- a/modules/system/common/networks/print/print.nix +++ b/modules/system/common/networks/print/print.nix @@ -23,9 +23,7 @@ in { }; config = mkIf cfg.enable { - services.printing = { - enable = cfg.cups.enable; - drivers = cfg.drivers; - }; + services.printing.enable = cfg.cups.enable; + services.printing.drivers = lib.mkIf cfg.cups.enable cfg.drivers; }; } \ No newline at end of file From e482931834bb58b9f80579ec52c4f6083bef8a65 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:16:01 +0200 Subject: [PATCH 65/71] fix: :bug: remove unused inputs parameter from polkit module --- modules/system/common/nix/polkit.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/common/nix/polkit.nix b/modules/system/common/nix/polkit.nix index d17ffad..8ea0d5c 100644 --- a/modules/system/common/nix/polkit.nix +++ b/modules/system/common/nix/polkit.nix @@ -1,4 +1,4 @@ -{ lib, inputs, config, ... }: +{ lib, config, ... }: let cfg = config.modules.nix.polkit; From fe068d0876b36f71aabcb72f62ceca0505e900d5 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:16:37 +0200 Subject: [PATCH 66/71] fix: :bug: scx service enablement condition in linux-cachyos.nix --- modules/system/common/nix/linux-cachyos.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/system/common/nix/linux-cachyos.nix b/modules/system/common/nix/linux-cachyos.nix index 559ad8b..f9074ad 100755 --- a/modules/system/common/nix/linux-cachyos.nix +++ b/modules/system/common/nix/linux-cachyos.nix @@ -29,7 +29,6 @@ in ]; }; - # Conditionally enable services.scx - services.scx.enable = lib.mkIf cfg.enableSCX true; + services.scx.enable = cfg.enableSCX; }; } From 353f2b4dc77fca74817b3e11957340a3240291a9 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:18:48 +0200 Subject: [PATCH 67/71] fix: :bug: update bitwarden package to bitwarden-desktop --- modules/system/common/security/password-manager.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/common/security/password-manager.nix b/modules/system/common/security/password-manager.nix index cd7762d..adc2b98 100644 --- a/modules/system/common/security/password-manager.nix +++ b/modules/system/common/security/password-manager.nix @@ -43,7 +43,7 @@ in { pkgs.keepassxc ]) ++ (lib.optionals (lib.elem "bitwarden" cfg.passwordManager.backend) [ - pkgs.bitwarden + pkgs.bitwarden-desktop ]); }; } \ No newline at end of file From 29746e8e893485a9c4e9062beb3b7d4e421943fa Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:20:58 +0200 Subject: [PATCH 68/71] fix: :bug: improve error handling in rb script & set default host value --- flake.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index fb31316..2e70758 100755 --- a/flake.nix +++ b/flake.nix @@ -112,7 +112,8 @@ burn-iso = isoConfig.burn-iso; rb = pkgs.writeShellScriptBin "rb" '' - host=$1 + set -euo pipefail + host=${1:-} case "$host" in "oak") ${pkgs.deploy-rs}/bin/deploy --skip-checks .#oak ;; @@ -122,7 +123,7 @@ ${pkgs.deploy-rs}/bin/deploy --skip-checks .#oak ${pkgs.deploy-rs}/bin/deploy --skip-checks .#fern ;; - *) echo "Usage: rb [oak|fern|all]" ;; + *) echo "Usage: rb [oak|fern|all]" >&2; exit 1 ;; esac ''; }; From dbc65d5e0b940fa4b994933f8874fe6936a0475e Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:23:56 +0200 Subject: [PATCH 69/71] fix: :bug: correct variable assignment syntax in rb script --- flake.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 2e70758..9a4820c 100755 --- a/flake.nix +++ b/flake.nix @@ -113,17 +113,17 @@ rb = pkgs.writeShellScriptBin "rb" '' set -euo pipefail - host=${1:-} + host=$1 case "$host" in - "oak") - ${pkgs.deploy-rs}/bin/deploy --skip-checks .#oak ;; - "fern") - ${pkgs.deploy-rs}/bin/deploy --skip-checks .#fern ;; - "all") - ${pkgs.deploy-rs}/bin/deploy --skip-checks .#oak - ${pkgs.deploy-rs}/bin/deploy --skip-checks .#fern - ;; - *) echo "Usage: rb [oak|fern|all]" >&2; exit 1 ;; + "oak") + ${pkgs.deploy-rs}/bin/deploy --skip-checks .#oak ;; + "fern") + ${pkgs.deploy-rs}/bin/deploy --skip-checks .#fern ;; + "all") + ${pkgs.deploy-rs}/bin/deploy --skip-checks .#oak + ${pkgs.deploy-rs}/bin/deploy --skip-checks .#fern + ;; + *) echo "Usage: rb [oak|fern|all]" >&2; exit 1 ;; esac ''; }; From 6fc4ed9bca6db71a3b4983d417c6c194f269d337 Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:33:29 +0200 Subject: [PATCH 70/71] fix: :bug: update default path for Steam compatibility tools --- modules/system/common/games/games.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/system/common/games/games.nix b/modules/system/common/games/games.nix index 8e9fe8c..8dfa9a9 100755 --- a/modules/system/common/games/games.nix +++ b/modules/system/common/games/games.nix @@ -10,7 +10,7 @@ in steam = { compatToolsPath = lib.mkOption { type = lib.types.path; - default = "${config.users.users.${config.primaryUser}.home}/.steam/root/compatibilitytools.d"; + default = "${builtins.getEnv "HOME"}/.steam/root/compatibilitytools.d"; description = "Path for Steam compatibility tools"; }; enable = lib.mkEnableOption "Enable Steam support"; From 02558e069b90256ad0e2fada884b4253c5c0c71f Mon Sep 17 00:00:00 2001 From: mirage <119869686+ClementBobin@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:33:50 +0200 Subject: [PATCH 71/71] fix: :bug: refactor packages configuration for improved driver handling --- modules/hm/common/browser/default.nix | 28 +++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/modules/hm/common/browser/default.nix b/modules/hm/common/browser/default.nix index 48a7fe8..f83c5ac 100644 --- a/modules/hm/common/browser/default.nix +++ b/modules/hm/common/browser/default.nix @@ -18,17 +18,21 @@ in }; config = { - home.packages = with pkgs; ( - (lib.optionals (lib.elem "chromium" cfg.emulators) [chromium]) ++ - (lib.optionals (lib.elem "chrome" cfg.emulators) [google-chrome]) ++ - (lib.optionals (lib.elem "firefox" cfg.emulators) [firefox]) ++ - (lib.optionals (lib.elem "brave" cfg.emulators) [brave]) ++ - (lib.optionals (lib.elem "vivaldi" cfg.emulators) [vivaldi]) ++ - (lib.optionals (lib.elem "edge" cfg.emulators) [microsoft-edge]) ++ - - (lib.optionals (cfg.driver.enable && (lib.elem "chromium" cfg.emulators || lib.elem "chrome" cfg.emulators || lib.elem "vivaldi" cfg.emulators || lib.elem "brave" cfg.emulators)) [chromedriver]) ++ - (lib.optionals (cfg.driver.enable && lib.elem "firefox" cfg.emulators) [geckodriver]) ++ - (lib.optionals (cfg.driver.enable && lib.elem "edge" cfg.emulators) [msedgedriver]) - ); + home.packages = with pkgs; + lib.unique ( + (lib.optionals (lib.elem "chromium" cfg.emulators) [chromium]) ++ + (lib.optionals (lib.elem "chrome" cfg.emulators) [google-chrome]) ++ + (lib.optionals (lib.elem "firefox" cfg.emulators) [firefox]) ++ + (lib.optionals (lib.elem "brave" cfg.emulators) [brave]) ++ + (lib.optionals (lib.elem "vivaldi" cfg.emulators) [vivaldi]) ++ + (lib.optionals (lib.elem "edge" cfg.emulators) [microsoft-edge]) ++ + (lib.optionals + (cfg.driver.enable && + (lib.any (browser: lib.elem browser cfg.emulators) + [ "chromium" "chrome" "vivaldi" "brave" ])) + [chromedriver]) ++ + (lib.optionals (cfg.driver.enable && lib.elem "firefox" cfg.emulators) [geckodriver]) ++ + (lib.optionals (cfg.driver.enable && lib.elem "edge" cfg.emulators) [msedgedriver]) + ); }; } \ No newline at end of file