diff options
| author | adikro <adikro@disroot.org> | 2025-12-20 15:25:38 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2025-12-20 15:25:38 +0100 |
| commit | c1d9af57156f3c95590d9a12c394ee064df9696e (patch) | |
| tree | 7e515761590c510c30329ef8548c7d84a8e95aaa | |
| parent | 791bc419b6dac7c70951981ef6b34cdf85828470 (diff) | |
added disko config for laptop, added storage and memory modules
65 files changed, 557 insertions, 292 deletions
@@ -318,11 +318,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1766191534, - "narHash": "sha256-qCW0niZEYnkJunetteb/OW2DQj50cX0jWGxe/9RUhQY=", + "lastModified": 1766234797, + "narHash": "sha256-yzj51A2eAhYMGo5TLcDqSHZXSUT7kHFRh9o8IE/lNow=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "3630951ee49443f0301ddc432ddee1bfe62b9740", + "rev": "bf13a0db31466a2e78b31d82de270d833c8fda4c", "type": "github" }, "original": { @@ -351,11 +351,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1766085543, - "narHash": "sha256-96X+37m2HH8IG3BzXEN3d4eHeUbiu9g1Q+KJQRX/Jpw=", + "lastModified": 1766229062, + "narHash": "sha256-8iBPfiM3w0m7Qrs3PyFyiN+I96ba4owEaSZ9ahgPdqM=", "owner": "YaLTeR", "repo": "niri", - "rev": "c4462d0c7fddfc11c9e98d43e3ef68a5b3c844ca", + "rev": "19e55a2df095d14f9490b79e38193ad4b4e87bb9", "type": "github" }, "original": { @@ -396,11 +396,11 @@ ] }, "locked": { - "lastModified": 1766190493, - "narHash": "sha256-UJEA2RLhXzcKFiTPDRJttLL522HfS0V27v16q4Bk2FI=", + "lastModified": 1766217792, + "narHash": "sha256-P0fdP50vb4Rc5SxH2CUcGH4/O9LtK60a5ohxe1nms1M=", "owner": "KaylorBen", "repo": "nixcord", - "rev": "d72b2c0fc75af068da3f3ac2d14011c4f7f0bd43", + "rev": "85b08b91a4f807d58b57d6057c4044efd18642ad", "type": "github" }, "original": { diff --git a/hm/conf/clip.nix b/hm/conf/clip.nix index 82de671..4db661b 100644 --- a/hm/conf/clip.nix +++ b/hm/conf/clip.nix @@ -1,9 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.hm.conf.clipboard; + cfg = config.hm.conf.clip; in { - options.szpont.hm.conf.clipboard = { + options.hm.conf.clip = { enable = lib.mkEnableOption "cliphist clipboard history"; backend = lib.mkOption { @@ -12,7 +12,6 @@ in description = "which clipboard backend tools to install"; }; }; - config = lib.mkIf cfg.enable { services.cliphist = { enable = true; diff --git a/hm/conf/conf.nix b/hm/conf/conf.nix index c05c5c3..6c54d8a 100644 --- a/hm/conf/conf.nix +++ b/hm/conf/conf.nix @@ -3,7 +3,6 @@ imports = [ ./clip.nix ./git.nix - ./ssh.nix ./xdg-dirs.nix ]; } diff --git a/hm/conf/git.nix b/hm/conf/git.nix index f6a7267..8797a52 100644 --- a/hm/conf/git.nix +++ b/hm/conf/git.nix @@ -1,10 +1,9 @@ { config, lib, ... }: let - cfg = config.szpont.hm.conf.git; + cfg = config.hm.conf.git; in { - options.szpont.hm.conf.git.enable = lib.mkEnableOption "enables git vcs"; - + options.hm.conf.git.enable = lib.mkEnableOption "enables git vcs"; config = lib.mkIf cfg.enable { programs.git = { enable = true; diff --git a/hm/conf/ssh.nix b/hm/conf/ssh.nix deleted file mode 100644 index 4587751..0000000 --- a/hm/conf/ssh.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, lib, ... }: -let - cfg = config.szpont.hm.conf.ssh; -in -{ - options.szpont.hm.conf.ssh.enable = lib.mkEnableOption "enables ssh support"; - - config = lib.mkIf cfg.enable { - - }; -} diff --git a/hm/conf/xdg-dirs.nix b/hm/conf/xdg-dirs.nix index 2bd9e64..c6cf03b 100644 --- a/hm/conf/xdg-dirs.nix +++ b/hm/conf/xdg-dirs.nix @@ -1,9 +1,9 @@ { config, lib, ... }: let - cfg = config.szpont.hm.conf.xdg-dirs; + cfg = config.hm.conf.xdg-dirs; in { - options.szpont.hm.conf.xdg-dirs = { + options.hm.conf.xdg-dirs = { enable = lib.mkEnableOption "enables xdg dirs"; mediaPath = lib.mkOption { @@ -12,7 +12,6 @@ in description = "base path for media"; }; }; - config = lib.mkIf cfg.enable { xdg.userDirs = { enable = true; @@ -46,6 +45,5 @@ in XDG_CLIPS_DIR = "${toString cfg.mediaPath}/vids/clips"; XDG_ARCHIVE_DIR = "${toString cfg.mediaPath}/archive"; }; - }; } diff --git a/hm/editors/helix.nix b/hm/editors/helix.nix index 05412a8..d20db0e 100644 --- a/hm/editors/helix.nix +++ b/hm/editors/helix.nix @@ -1,10 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.hm.editors.helix; + cfg = config.hm.editors.helix; in { - options.szpont.hm.editors.helix.enable = lib.mkEnableOption "enables helix editor"; - + options.hm.editors.helix.enable = lib.mkEnableOption "enables helix editor"; config = lib.mkIf cfg.enable { programs.helix = { enable = true; diff --git a/hm/editors/nixvim.nix b/hm/editors/nixvim.nix index a80a674..b4d24a7 100644 --- a/hm/editors/nixvim.nix +++ b/hm/editors/nixvim.nix @@ -1,14 +1,12 @@ { inputs, config, lib, pkgs, ... }: let - cfg = config.szpont.hm.editors.nixvim; + cfg = config.hm.editors.nixvim; in { imports = [ inputs.nixvim.homeModules.nixvim ]; - options.szpont.hm.editors.nixvim.enable = lib.mkEnableOption "enables nixvim config framework"; - + options.hm.editors.nixvim.enable = lib.mkEnableOption "enables nixvim config framework"; config = lib.mkIf cfg.enable { - programs.nixvim = { enable = true; package = inputs.neovim-nightly-overlay.packages.${pkgs.stdenv.hostPlatform.system}.default; diff --git a/hm/editors/nvf.nix b/hm/editors/nvf.nix index 91348a9..6da28fe 100644 --- a/hm/editors/nvf.nix +++ b/hm/editors/nvf.nix @@ -1,10 +1,9 @@ { inputs, config, lib, pkgs, ... }: let - cfg = config.szpont.hm.editors.nvf; + cfg = config.hm.editors.nvf; in { - options.szpont.hm.editors.nvf.enable = lib.mkEnableOption "enables nvf configuration framework"; - + options.hm.editors.nvf.enable = lib.mkEnableOption "enables nvf configuration framework"; config = lib.mkIf cfg.enable { programs.nvf = { enable = true; diff --git a/hm/soft/awww.nix b/hm/env/awww.nix index e807c9d..d666742 100644 --- a/hm/soft/awww.nix +++ b/hm/env/awww.nix @@ -1,10 +1,9 @@ { config, lib, pkgs, inputs, ... }: let - cfg = config.szpont.hm.soft.awww; + cfg = config.hm.env.awww; in { - options.szpont.hm.soft.awww.enable = lib.mkEnableOption "enables awww"; - + options.hm.env.awww.enable = lib.mkEnableOption "enables awww"; config = lib.mkIf cfg.enable { services.swww = { enable = true; diff --git a/hm/env/env.nix b/hm/env/env.nix index 1c2c6d2..2f0fab1 100644 --- a/hm/env/env.nix +++ b/hm/env/env.nix @@ -3,6 +3,11 @@ imports = [ ./niri/niri.nix + ./awww.nix + ./fuzzel.nix + ./screenshot.nix + ./swayidle.nix + ./swaylock.nix ./theme.nix ./waybar.nix ]; diff --git a/hm/soft/fuzzel.nix b/hm/env/fuzzel.nix index 234aff7..8d4462f 100644 --- a/hm/soft/fuzzel.nix +++ b/hm/env/fuzzel.nix @@ -1,10 +1,9 @@ { config, lib, ... }: let - cfg = config.szpont.hm.soft.fuzzel; + cfg = config.hm.env.fuzzel; in { - options.szpont.hm.soft.fuzzel.enable = lib.mkEnableOption "enables fuzzel"; - + options.hm.env.fuzzel.enable = lib.mkEnableOption "enables fuzzel"; config = lib.mkIf cfg.enable { programs.fuzzel = { enable = true; diff --git a/hm/env/niri/niri.nix b/hm/env/niri/niri.nix index fddfcac..eb073e7 100644 --- a/hm/env/niri/niri.nix +++ b/hm/env/niri/niri.nix @@ -1,15 +1,14 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.hm.env.niri; + cfg = config.hm.env.niri; in { - options.szpont.hm.env.niri.enable = lib.mkEnableOption "niri hm"; + options.hm.env.niri.enable = lib.mkEnableOption "niri hm"; config = lib.mkIf cfg.enable { - - szpont.hm.soft = { + hm.env = { awww.enable = true; fuzzel.enable = true; - satty.enable = true; + screenshot.enable = true; swayidle.enable = true; swaylock.enable = true; }; @@ -87,8 +86,6 @@ in }; home.packages = with pkgs; [ qalculate-gtk - grim - slurp ]; }; } diff --git a/hm/env/screenshot.nix b/hm/env/screenshot.nix new file mode 100644 index 0000000..e61e3de --- /dev/null +++ b/hm/env/screenshot.nix @@ -0,0 +1,16 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.hm.env.screenshot; +in +{ + options.hm.env.screenshot.enable = lib.mkEnableOption "enables screenshot utilities"; + config = lib.mkIf cfg.enable { + programs.satty = { + enable = true; + }; + home.packages = with pkgs; [ + grim + slurp + ]; + }; +} diff --git a/hm/soft/swayidle.nix b/hm/env/swayidle.nix index d06c74a..41f64a2 100644 --- a/hm/soft/swayidle.nix +++ b/hm/env/swayidle.nix @@ -1,10 +1,9 @@ { config, lib, ... }: let - cfg = config.szpont.hm.soft.swayidle; + cfg = config.hm.env.swayidle; in { - options.szpont.hm.soft.swayidle.enable = lib.mkEnableOption "enables swayidle"; - + options.hm.env.swayidle.enable = lib.mkEnableOption "enables swayidle"; config = lib.mkIf cfg.enable { services.swayidle = { enable = true; diff --git a/hm/soft/swaylock.nix b/hm/env/swaylock.nix index a303e48..afde020 100644 --- a/hm/soft/swaylock.nix +++ b/hm/env/swaylock.nix @@ -1,10 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.hm.soft.swaylock; + cfg = config.hm.env.swaylock; in { - options.szpont.hm.soft.swaylock.enable = lib.mkEnableOption "enables swaylock"; - + options.hm.env.swaylock.enable = lib.mkEnableOption "enables swaylock"; config = lib.mkIf cfg.enable { programs.swaylock = { enable = true; diff --git a/hm/env/theme.nix b/hm/env/theme.nix index 54dd00b..761e394 100644 --- a/hm/env/theme.nix +++ b/hm/env/theme.nix @@ -1,14 +1,13 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.hm.env.themes; + cfg = config.hm.env.themes; in { - options.szpont.hm.env.themes = { + options.hm.env.themes = { enable = lib.mkEnableOption "enables global theming"; gtk.enable = lib.mkEnableOption "GTK theming"; qt.enable = lib.mkEnableOption "QT theming"; }; - config = lib.mkIf cfg.enable (lib.mkMerge [ (lib.mkIf cfg.gtk.enable { gtk = { diff --git a/hm/env/waybar.nix b/hm/env/waybar.nix index 84ccea9..182a4fb 100644 --- a/hm/env/waybar.nix +++ b/hm/env/waybar.nix @@ -1,10 +1,9 @@ { config, lib, ... }: let - cfg = config.szpont.hm.env.waybar; + cfg = config.hm.env.waybar; in { - options.szpont.hm.env.waybar.enable = lib.mkEnableOption "enables waybar"; - + options.hm.env.waybar.enable = lib.mkEnableOption "enables waybar"; config = lib.mkIf cfg.enable { programs.waybar = { enable = true; diff --git a/hm/shell/cli.nix b/hm/shell/cli.nix index 222b002..60e78db 100644 --- a/hm/shell/cli.nix +++ b/hm/shell/cli.nix @@ -1,10 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.hm.shell.cli; + cfg = config.hm.shell.cli; in { - options.szpont.hm.shell.cli.enable = lib.mkEnableOption "modern cli tools"; - + options.hm.shell.cli.enable = lib.mkEnableOption "modern cli tools"; config = lib.mkIf cfg.enable { programs.zoxide.enable = true; programs.zoxide.options = [ "--cmd cd" ]; @@ -24,7 +23,6 @@ in programs.fastfetch.enable = true; home.packages = with pkgs; [ - gdu file mediainfo chafa diff --git a/hm/shell/fish.nix b/hm/shell/fish.nix index 644eadc..b2e349a 100644 --- a/hm/shell/fish.nix +++ b/hm/shell/fish.nix @@ -1,10 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.hm.shell.fish; + cfg = config.hm.shell.fish; in { - options.szpont.hm.shell.fish.enable = lib.mkEnableOption "enables fish shell"; - + options.hm.shell.fish.enable = lib.mkEnableOption "enables fish shell"; config = lib.mkIf cfg.enable { programs.fish = { enable = true; diff --git a/hm/shell/foot.nix b/hm/shell/foot.nix index 9847399..ecd345a 100644 --- a/hm/shell/foot.nix +++ b/hm/shell/foot.nix @@ -1,6 +1,6 @@ { pkgs, lib, config, ... }: let - cfg = config.szpont.hm.shell.foot; + cfg = config.hm.shell.foot; footTheme = pkgs.fetchurl { url = "https://codeberg.org/dnkl/foot/raw/branch/master/themes/gruvbox-dark"; @@ -8,7 +8,7 @@ let }; in { - options.szpont.hm.shell.foot = { + options.hm.shell.foot = { enable = lib.mkEnableOption "foot terminal emulator"; fontSize = lib.mkOption { type = lib.types.int; @@ -16,7 +16,6 @@ in description = "Font size for the foot terminal"; }; }; - config = lib.mkIf cfg.enable { programs.foot = { enable = true; diff --git a/hm/shell/starship.nix b/hm/shell/starship.nix index 4996bdc..657ff5c 100644 --- a/hm/shell/starship.nix +++ b/hm/shell/starship.nix @@ -1,10 +1,9 @@ { config, lib, ... }: let - cfg = config.szpont.hm.shell.starship; + cfg = config.hm.shell.starship; in { - options.szpont.hm.shell.starship.enable = lib.mkEnableOption "Starship prompt"; - + options.hm.shell.starship.enable = lib.mkEnableOption "Starship prompt"; config = lib.mkIf cfg.enable { programs.starship = { enable = true; diff --git a/hm/soft/browser.nix b/hm/soft/browser.nix new file mode 100644 index 0000000..023dce8 --- /dev/null +++ b/hm/soft/browser.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.hm.soft.browser; +in +{ + options.hm.soft.browser = { + enable = lib.mkEnableOption "browser configs"; + + librewolf.enable = lib.mkEnableOption "LibreWolf browser"; + firefox.enable = lib.mkEnableOption "Firefox browser"; + brave.enable = lib.mkEnableOption "Brave browser"; + }; + config = lib.mkIf cfg.enable (lib.mkMerge [ + (lib.mkIf cfg.librewolf.enable { + programs.librewolf.enable = true; + }) + + (lib.mkIf cfg.firefox.enable { + programs.firefox.enable = true; + }) + + (lib.mkIf cfg.brave.enable { + home.packages = [ pkgs.brave ]; + }) + ]); +} diff --git a/hm/soft/easyeffects.nix b/hm/soft/easyeffects.nix index beb9ad6..ab16736 100644 --- a/hm/soft/easyeffects.nix +++ b/hm/soft/easyeffects.nix @@ -1,10 +1,9 @@ { config, lib, ... }: let - cfg = config.szpont.hm.soft.easyeffects; + cfg = config.hm.soft.easyeffects; in { - options.szpont.hm.soft.easyeffects.enable = lib.mkEnableOption "EasyEffects audio equalizer"; - + options.hm.soft.easyeffects.enable = lib.mkEnableOption "EasyEffects audio equalizer"; config = lib.mkIf cfg.enable { services.easyeffects = { enable = true; diff --git a/hm/soft/email.nix b/hm/soft/email.nix new file mode 100644 index 0000000..d7ec9ea --- /dev/null +++ b/hm/soft/email.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.hm.soft.email; +in +{ + options.hm.soft.email = { + enable = lib.mkEnableOption "email configs"; + + thunderbird.enable = lib.mkEnableOption "thunderbird config"; + evolution.enable = lib.mkEnableOption "evolution config"; + }; + config = lib.mkIf cfg.enable (lib.mkMerge [ + (lib.mkIf cfg.thunderbird.enable { + programs.librewolf.enable = true; + }) + + (lib.mkIf cfg.evolution.enable { + home.packages = [ pkgs.evolution ]; + }) + ]); +} diff --git a/hm/soft/kdeconnect.nix b/hm/soft/kdeconnect.nix new file mode 100644 index 0000000..07a5d9e --- /dev/null +++ b/hm/soft/kdeconnect.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.hm.soft.kdeconnect; +in +{ + options.hm.soft.kdeconnect.enable = lib.mkEnableOption "enables kde connect integration and dolphin"; + + config = lib.mkIf cfg.enable { + services.kdeconnect.enable = true; + + home.packages = [ + pkgs.kdePackages.dolphin + ]; + }; +} diff --git a/hm/soft/kdenlive.nix b/hm/soft/kdenlive.nix new file mode 100644 index 0000000..f2ca560 --- /dev/null +++ b/hm/soft/kdenlive.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.hm.soft.kdenlive; +in +{ + options.hm.soft.kdenlive.enable = lib.mkEnableOption "enables kdenlive editing"; + config = lib.mkIf cfg.enable { + home.packages = [ pkgs.kdePackages.kdenlive ]; + }; +} diff --git a/hm/soft/gaming.nix b/hm/soft/mangohud.nix index 5fc7095..eae15d5 100644 --- a/hm/soft/gaming.nix +++ b/hm/soft/mangohud.nix @@ -1,9 +1,9 @@ { config, lib, ... }: let - cfg = config.szpont.hm.soft.gaming; + cfg = config.hm.soft.mangohud; in { - options.szpont.hm.soft.gaming.enable = lib.mkEnableOption "gaming hm config"; + options.hm.soft.mangohud.enable = lib.mkEnableOption "mangohud hm config"; config = lib.mkIf cfg.enable { programs.mangohud = { enable = true; diff --git a/hm/soft/media.nix b/hm/soft/media.nix index 0184957..abf3dff 100644 --- a/hm/soft/media.nix +++ b/hm/soft/media.nix @@ -1,10 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.hm.soft.media; + cfg = config.hm.soft.media; in { - options.szpont.hm.soft.media.enable = lib.mkEnableOption "media playback and processing tools"; - + options.hm.soft.media.enable = lib.mkEnableOption "media playback and processing tools"; config = lib.mkIf cfg.enable { programs.mpv = { enable = true; @@ -18,7 +17,6 @@ in }; home.packages = with pkgs; [ - # syncplay syncplay-nogui ffmpeg imagemagick diff --git a/hm/soft/nixcord.nix b/hm/soft/nixcord.nix index 4da3466..b0e3396 100644 --- a/hm/soft/nixcord.nix +++ b/hm/soft/nixcord.nix @@ -1,12 +1,11 @@ { inputs, config, lib, pkgs, ... }: let - cfg = config.szpont.hm.soft.nixcord; + cfg = config.hm.soft.nixcord; in { imports = [ inputs.nixcord.homeModules.nixcord ]; - options.szpont.hm.soft.nixcord.enable = lib.mkEnableOption "nixcord configuration"; - + options.hm.soft.nixcord.enable = lib.mkEnableOption "nixcord configuration"; config = lib.mkIf cfg.enable { programs.nixcord = { enable = true; diff --git a/hm/soft/obs.nix b/hm/soft/obs.nix new file mode 100644 index 0000000..f0ae054 --- /dev/null +++ b/hm/soft/obs.nix @@ -0,0 +1,12 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.hm.soft.obs; +in +{ + options.hm.soft.obs.enable = lib.mkEnableOption "enables obs video recording and clipping"; + config = lib.mkIf cfg.enable { + programs.obs-studio = { + enable = true; + }; + }; +} diff --git a/hm/soft/obsidian.nix b/hm/soft/obsidian.nix new file mode 100644 index 0000000..a840726 --- /dev/null +++ b/hm/soft/obsidian.nix @@ -0,0 +1,12 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.hm.soft.obsidian; +in +{ + options.hm.soft.obsidian.enable = lib.mkEnableOption "enables obsidian notetaking"; + config = lib.mkIf cfg.enable { + programs.obsidian = { + enable = true; + }; + }; +} diff --git a/hm/soft/onlyoffice.nix b/hm/soft/onlyoffice.nix new file mode 100644 index 0000000..db7ad66 --- /dev/null +++ b/hm/soft/onlyoffice.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: +let + cfg = config.hm.soft.onlyoffice; +in +{ + options.hm.soft.onlyoffice.enable = lib.mkEnableOption "onlyoffice suite"; + config = lib.mkIf cfg.enable { + programs.onlyoffice = { + enable = true; + }; + }; +} diff --git a/hm/soft/satty.nix b/hm/soft/satty.nix deleted file mode 100644 index d3964a7..0000000 --- a/hm/soft/satty.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, lib, ... }: -let - cfg = config.szpont.hm.soft.satty; -in -{ - options.szpont.hm.soft.satty.enable = lib.mkEnableOption "enables satty image editor"; - - config = lib.mkIf cfg.enable { - programs.satty = { - enable = true; - }; - }; -} diff --git a/hm/soft/soft.nix b/hm/soft/soft.nix index eb975ea..191ada7 100644 --- a/hm/soft/soft.nix +++ b/hm/soft/soft.nix @@ -1,15 +1,19 @@ { ... }: { imports = [ - ./awww.nix + ./browser.nix ./easyeffects.nix - ./fuzzel.nix - ./gaming.nix + ./email.nix + ./kdeconnect.nix + ./kdenlive.nix + ./mangohud.nix ./media.nix ./nixcord.nix - ./satty.nix + ./obs.nix + ./obsidian.nix + ./onlyoffice.nix ./spicetify.nix - ./swayidle.nix - ./swaylock.nix + ./torrent.nix + ./vpn.nix ]; } diff --git a/hm/soft/spicetify.nix b/hm/soft/spicetify.nix index 96c4d0d..59ed287 100644 --- a/hm/soft/spicetify.nix +++ b/hm/soft/spicetify.nix @@ -1,13 +1,12 @@ { inputs, pkgs, config, lib, ... }: let - cfg = config.szpont.hm.soft.spicetify; + cfg = config.hm.soft.spicetify; spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system}; in { imports = [ inputs.spicetify-nix.homeManagerModules.default ]; - options.szpont.hm.soft.spicetify.enable = lib.mkEnableOption "spicetify config"; - + options.hm.soft.spicetify.enable = lib.mkEnableOption "spicetify config"; config = lib.mkIf cfg.enable { programs.spicetify = { enable = true; diff --git a/hm/soft/torrent.nix b/hm/soft/torrent.nix new file mode 100644 index 0000000..63150c2 --- /dev/null +++ b/hm/soft/torrent.nix @@ -0,0 +1,12 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.hm.soft.torrent; +in +{ + options.hm.soft.torrent.enable = lib.mkEnableOption "torrenting software / qbittorrent"; + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + qbittorrent-enhanced + ]; + }; +} diff --git a/hm/soft/vpn.nix b/hm/soft/vpn.nix new file mode 100644 index 0000000..7b83d57 --- /dev/null +++ b/hm/soft/vpn.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.hm.soft.vpn; +in +{ + options.hm.soft.vpn = { + enable = lib.mkEnableOption "enables vpn clients"; + + protonvpn.enable = lib.mkEnableOption "protonvpn"; + mullvad.enable = lib.mkEnableOption "mullvad vpn"; + }; + config = lib.mkIf cfg.enable (lib.mkMerge [ + (lib.mkIf cfg.mullvad.enable { + programs.mullvad-vpn = { + enable = true; + }; + }) + (lib.mkIf cfg.protonvpn.enable { + home.packages = [ pkgs.protonvpn-gui ]; + }) + ]); +} diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 4dbf3bb..21fe566 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -1,14 +1,18 @@ -{ pkgs, ... }: +{ username, ... }: { - nixpkgs.config.allowUnfree = true; + system.stateVersion = "25.05"; imports = [ ./hardware-configuration.nix ../../sys/default.nix ]; - szpont.sys = { + sys = { core = { + allowUnfree.enable = true; + flatpak.enable = true; + hardwareTools.enable = true; + audio.enable = true; bootloader = "systemd-boot"; drivers = { @@ -20,11 +24,19 @@ greet.enable = true; home-manager = { enable = true; - users.adam.path = ./home.nix; + users.${username}.path = ./home.nix; }; locale.enable = true; network.enable = true; + memory = { + zram.enable = true; + zram.percent = 25; + swapfile.enable = true; + swapfile.size = 32; + }; security.enable = true; + storage.enable = true; + users.enable = true; }; srv = { files = { @@ -44,24 +56,4 @@ niri.enable = true; }; }; - - programs.kdeconnect.enable = true; - - services.flatpak.enable = true; - - programs.fish.enable = true; - - users.users.adam = { - isNormalUser = true; - extraGroups = [ "wheel" ]; - home = "/home/adam"; - shell = pkgs.fish; - }; - - environment.systemPackages = with pkgs; [ - nautilus - rivalcfg - ]; - - system.stateVersion = "25.05"; } diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index 08140dd..ea33837 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -1,21 +1,20 @@ -{ pkgs, ... }: +{ username, ... }: { - imports = [ - ../../hm/default.nix -]; + imports = [ ../../hm/default.nix ]; - home.username = "adam"; - home.homeDirectory = "/home/adam"; - home.stateVersion = "25.05"; + home = { + username = "${username}"; + homeDirectory = "/home/${username}"; + stateVersion = "25.05"; + }; - szpont.hm = { + hm = { conf = { - clipboard = { + clip = { enable = true; backend = "wayland"; }; git.enable = true; - ssh.enable = true; xdg-dirs = { enable = true; mediaPath = /media; @@ -25,12 +24,14 @@ nixvim.enable = true; }; env = { + niri.enable = true; + + waybar.enable = true; themes = { enable = true; gtk.enable = true; qt.enable = true; }; - waybar.enable = true; }; shell = { cli.enable = true; @@ -39,26 +40,30 @@ starship.enable = true; }; soft = { - easyeffects.enable = true; + browser = { + enable = true; + librewolf.enable = true; + brave.enable = true; + }; + email = { + enable = true; + thunderbird.enable = false; + evolution.enable = true; + }; + kdeconnect.enable = true; + kdenlive.enable = true; media.enable = true; nixcord.enable = true; + obs.enable = true; + obsidian.enable = true; + onlyoffice.enable = false; spicetify.enable = true; + torrent.enable = true; + vpn = { + enable = true; + protonvpn.enable = true; + mullvad.enable = false; + }; }; }; - - home.packages = with pkgs; [ - protonvpn-gui - evolution - kdePackages.kdenlive - veracrypt - brave - qbittorrent-enhanced - bitwarden-desktop - thunderbird - ]; - - programs.obsidian.enable = true; - programs.onlyoffice.enable = true; - programs.librewolf.enable = true; - # programs.thunderbird.enable = true; } diff --git a/hosts/laptop/disko.nix b/hosts/laptop/disko.nix index e69de29..87c7e82 100644 --- a/hosts/laptop/disko.nix +++ b/hosts/laptop/disko.nix @@ -0,0 +1,51 @@ +{ + disko.devices = { + main = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + fedora = { + + }; + root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/" = { + mountpoint = "/"; + mountOptions = [ "noatime" ]; + }; + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "/home" = { + mountpoint = "/home"; + mountOptions = [ "noatime" ]; + }; + "/swap" = { + mountpoint = "/.swapvol/swapfile"; + swap.swapfile.size = "8G"; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/sys/core/audio.nix b/sys/core/audio.nix index f855ad0..234b6bd 100644 --- a/sys/core/audio.nix +++ b/sys/core/audio.nix @@ -1,10 +1,9 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, username, ... }: let - cfg = config.szpont.sys.core.audio; + cfg = config.sys.core.audio; in { - options.szpont.sys.core.audio.enable = lib.mkEnableOption "audio support"; - + options.sys.core.audio.enable = lib.mkEnableOption "audio support"; config = lib.mkIf cfg.enable { services = { pipewire = { @@ -27,5 +26,7 @@ in helvum alsa-utils ]; + + home-manager.users.${username}.hm.soft.easyeffects.enable = true; }; } diff --git a/sys/core/bootloader.nix b/sys/core/bootloader.nix index 292679e..7293ffc 100644 --- a/sys/core/bootloader.nix +++ b/sys/core/bootloader.nix @@ -1,14 +1,13 @@ { config, lib, ... }: let - cfg = config.szpont.sys.core.bootloader; + cfg = config.sys.core.bootloader; in { - options.szpont.sys.core.bootloader = lib.mkOption { + options.sys.core.bootloader = lib.mkOption { type = lib.types.enum [ "systemd-boot" "grub" "none" ]; default = "systemd-boot"; - description = "Which bootloader to use"; + description = "which bootloader to use"; }; - config = lib.mkMerge [ { boot.loader.efi.canTouchEfiVariables = true; diff --git a/sys/core/core.nix b/sys/core/core.nix index da8f277..ba38eb9 100644 --- a/sys/core/core.nix +++ b/sys/core/core.nix @@ -1,4 +1,7 @@ -{ ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.sys.core; +in { imports = [ ./audio.nix @@ -8,7 +11,35 @@ ./greet.nix ./home-manager.nix ./localization.nix + ./memory.nix ./networking.nix ./security.nix + ./storage.nix + ./users.nix + ]; + + options.sys.core = { + allowUnfree.enable = lib.mkEnableOption "unfree software"; + + flatpak.enable = lib.mkEnableOption "Flatpak support"; + + hardwareTools = { + enable = lib.mkEnableOption "peripheral and thermal tools"; + }; + }; + + config = lib.mkMerge [ + (lib.mkIf cfg.allowUnfree.enable { + nixpkgs.config.allowUnfree = true; + }) + + (lib.mkIf cfg.flatpak.enable { + services.flatpak.enable = true; + }) + + (lib.mkIf cfg.hardwareTools.enable { + programs.coolercontrol.enable = true; + environment.systemPackages = [ pkgs.rivalcfg ]; + }) ]; } diff --git a/sys/core/drivers.nix b/sys/core/drivers.nix index de7dcb5..a01bb54 100644 --- a/sys/core/drivers.nix +++ b/sys/core/drivers.nix @@ -1,9 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.sys.core.drivers; + cfg = config.sys.core.drivers; in { - options.szpont.sys.core.drivers = { + options.sys.core.drivers = { enable = lib.mkEnableOption "enables hardware drivers"; amd.enable = lib.mkEnableOption "AMD specific drivers and microcode"; stability = lib.mkOption { @@ -11,38 +11,37 @@ in default = "stable"; }; }; + config = lib.mkIf cfg.enable (lib.mkMerge [ + { + services.smartd.enable = true; + hardware.sensor.iio.enable = true; + hardware.enableAllFirmware = true; + hardware.graphics = { + enable = true; + enable32Bit = true; + }; + } - config = lib.mkIf cfg.enable { - services.smartd.enable = true; - hardware.sensor.iio.enable = true; - hardware.enableRedistributableFirmware = true; - hardware.graphics = { - enable = true; - enable32Bit = true; - }; + (lib.mkIf cfg.amd.enable { + services.xserver.videoDrivers = [ "amdgpu" ]; + hardware.cpu.amd.updateMicrocode = true; + hardware.amdgpu = { + initrd.enable = true; + overdrive.enable = true; + }; + }) - programs.coolercontrol.enable = true; - environment.systemPackages = with pkgs; [ linux-firmware ]; + (lib.mkIf (cfg.amd.enable && cfg.stability == "unstable") { + services.lact.enable = true; + boot.kernelPackages = pkgs.linuxPackages_cachyos-lto-znver4; + chaotic.mesa-git = { + enable = true; + extraPackages = [ pkgs.mesa_git.opencl ]; + }; + }) - } // (lib.mkIf cfg.amd.enable (lib.mkMerge [ - { - services.xserver.videoDrivers = [ "amdgpu" ]; - hardware.cpu.amd.updateMicrocode = true; - hardware.amdgpu = { - initrd.enable = true; - overdrive.enable = true; - }; - } - (lib.mkIf (cfg.stability == "unstable") { - services.lact.enable = true; - boot.kernelPackages = pkgs.linuxPackages_cachyos-lto-znver4; - chaotic.mesa-git = { - enable = true; - extraPackages = [ pkgs.mesa_git.opencl ]; - }; - }) - (lib.mkIf (cfg.stability == "stable") { - boot.kernelPackages = pkgs.linuxPackages_latest; - }) - ])); + (lib.mkIf (cfg.amd.enable && cfg.stability == "stable") { + boot.kernelPackages = pkgs.linuxPackages_latest; + }) + ]); } diff --git a/sys/core/fonts.nix b/sys/core/fonts.nix index 5bdf751..1173439 100644 --- a/sys/core/fonts.nix +++ b/sys/core/fonts.nix @@ -1,11 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.sys.core.fonts; + cfg = config.sys.core.fonts; in { - options.szpont.sys.core.fonts = { - enable = lib.mkEnableOption "system-wide fonts and console configuration"; - }; + options.sys.core.fonts.enable = lib.mkEnableOption "system-wide font and console configuration"; config = lib.mkIf cfg.enable { console = { diff --git a/sys/core/greet.nix b/sys/core/greet.nix index c5e3c5c..95603e8 100644 --- a/sys/core/greet.nix +++ b/sys/core/greet.nix @@ -1,10 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.sys.core.greet; + cfg = config.sys.core.greet; in { - options.szpont.sys.core.greet.enable = lib.mkEnableOption "enables greetd daemon with tuigreet"; - + options.sys.core.greet.enable = lib.mkEnableOption "enables greetd daemon with tuigreet"; config = lib.mkIf cfg.enable { services.greetd = { enable = true; diff --git a/sys/core/home-manager.nix b/sys/core/home-manager.nix index df9a518..7bc4b18 100644 --- a/sys/core/home-manager.nix +++ b/sys/core/home-manager.nix @@ -1,34 +1,36 @@ -{ inputs, config, lib,... }: +{ inputs, config, lib, username, ... }: let - cfg = config.szpont.sys.core.home-manager; + cfg = config.sys.core.home-manager; in { imports = [ inputs.home-manager.nixosModules.home-manager ]; - options.szpont.sys.core.home-manager = { + + options.sys.core.home-manager = { enable = lib.mkEnableOption "home Manager configuration"; users = lib.mkOption { default = {}; - description = "attribute set of users and their home-manager configurations"; + description = "Attribute set of users and their home-manager configurations"; type = lib.types.attrsOf (lib.types.submodule { options = { path = lib.mkOption { type = lib.types.path; - description = "path to the user's home.nix file"; + description = "Path to the user's home.nix file"; }; }; }); }; }; - config = lib.mkIf cfg.enable { home-manager = { - extraSpecialArgs = { inherit inputs; }; + extraSpecialArgs = { inherit inputs username; }; useGlobalPkgs = true; useUserPackages = true; backupFileExtension = "bak"; - users = lib.mapAttrs (name: user: import user.path) cfg.users; + users = lib.mapAttrs (name: userCfg: { + imports = [ userCfg.path ]; + }) cfg.users; }; }; } diff --git a/sys/core/localization.nix b/sys/core/localization.nix index 0b046d4..4d45b75 100644 --- a/sys/core/localization.nix +++ b/sys/core/localization.nix @@ -1,9 +1,9 @@ { config, lib, ... }: let - cfg = config.szpont.sys.core.locale; + cfg = config.sys.core.locale; in { - options.szpont.sys.core.locale = { + options.sys.core.locale = { enable = lib.mkEnableOption "system localization (timezone and language)"; timeZone = lib.mkOption { @@ -18,7 +18,6 @@ in description = "the locale used for numbers, time, and measurements."; }; }; - config = lib.mkIf cfg.enable { time.timeZone = cfg.timeZone; diff --git a/sys/core/memory.nix b/sys/core/memory.nix new file mode 100644 index 0000000..cdf71e8 --- /dev/null +++ b/sys/core/memory.nix @@ -0,0 +1,46 @@ +{ config, lib, ... }: +let + cfg = config.sys.core.memory; +in +{ + options.sys.core.memory = { + enable = lib.mkEnableOption "memory management"; + + zram = { + enable = lib.mkEnableOption "enables zram compression"; + percent = lib.mkOption { + type = lib.types.int; + default = 25; + description = "Percentage of total RAM to use for zram"; + }; + }; + + swapfile = { + enable = lib.mkEnableOption "enables a swapfile"; + size = lib.mkOption { + type = lib.types.int; + default = 8192; + description = "Size of the swapfile in gigabytes"; + }; + }; + }; + + config = lib.mkIf cfg.enable (lib.mkMerge [ + (lib.mkIf cfg.zram.enable { + zramSwap = { + enable = true; + algorithm = "zstd"; + memoryPercent = cfg.zram.percent; + priority = 100; + }; + }) + + (lib.mkIf cfg.swapfile.enable { + swapDevices = [ { + device = "/.swapvol/swapfile"; + size = cfg.swapfile.size * 1024; + priority = 0; + } ]; + }) + ]); +} diff --git a/sys/core/networking.nix b/sys/core/networking.nix index aa8e606..314feb7 100644 --- a/sys/core/networking.nix +++ b/sys/core/networking.nix @@ -1,10 +1,9 @@ { config, lib, ... }: let - cfg = config.szpont.sys.core.network; + cfg = config.sys.core.network; in { - options.szpont.sys.core.network.enable = lib.mkEnableOption "system-wide networking setup"; - + options.sys.core.network.enable = lib.mkEnableOption "system-wide networking setup"; config = lib.mkIf cfg.enable { networking = { networkmanager = { diff --git a/sys/core/security.nix b/sys/core/security.nix index 2c34662..bf43577 100644 --- a/sys/core/security.nix +++ b/sys/core/security.nix @@ -1,10 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.sys.core.security; + cfg = config.sys.core.security; in { - options.szpont.sys.core.security.enable = lib.mkEnableOption "core security services"; - + options.sys.core.security.enable = lib.mkEnableOption "core security services"; config = lib.mkIf cfg.enable { services.gnome.gnome-keyring.enable = true; @@ -30,5 +29,11 @@ in TimeoutStopSec = 10; }; }; + + environment.systemPackages = with pkgs; [ + veracrypt + bitwarden-desktop + hello + ]; }; } diff --git a/sys/core/storage.nix b/sys/core/storage.nix new file mode 100644 index 0000000..6e2dab8 --- /dev/null +++ b/sys/core/storage.nix @@ -0,0 +1,10 @@ +{ config, lib, ... }: +let + cfg = config.sys.core.storage; +in +{ + options.sys.core.storage.enable = lib.mkEnableOption "enables storage management"; + config = lib.mkIf cfg.enable { + nix.settings.auto-optimise-store = true; + }; +} diff --git a/sys/core/users.nix b/sys/core/users.nix new file mode 100644 index 0000000..fb4e7f0 --- /dev/null +++ b/sys/core/users.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, username, ... }: +let + cfg = config.sys.core.users; +in +{ + options.sys.core.users.enable = lib.mkEnableOption "enables user accounts"; + config = lib.mkIf cfg.enable { + programs.fish.enable = true; + users.users.${username} = { + isNormalUser = true; + shell = pkgs.fish; + + extraGroups = lib.mkMerge [ + [ "wheel" ] + + (lib.mkIf (config.sys.core.drivers.amd.enable or false) [ "video" "render" ]) + (lib.mkIf (config.sys.core.network.enable or false) [ "networkmanager" ]) + (lib.mkIf (config.sys.srv.kvm.enable or false) [ "libvirtd" ]) + (lib.mkIf (config.sys.srv.docker.enable or false) [ "docker" ]) + ]; + }; + }; +} diff --git a/sys/default.nix b/sys/default.nix index ede6c62..225c08f 100644 --- a/sys/default.nix +++ b/sys/default.nix @@ -2,7 +2,6 @@ { imports = [ ./core/core.nix - ./pkgs/pkgs.nix ./srv/srv.nix ./wm/wm.nix ]; diff --git a/sys/pkgs/pkgs.nix b/sys/pkgs/pkgs.nix deleted file mode 100644 index facb35d..0000000 --- a/sys/pkgs/pkgs.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ ... }: -{ - -} diff --git a/sys/srv/compat.nix b/sys/srv/compat.nix index 5c08a9b..ab9560f 100644 --- a/sys/srv/compat.nix +++ b/sys/srv/compat.nix @@ -1,10 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.sys.srv.compat; + cfg = config.sys.srv.compat; in { - options.szpont.sys.srv.compat.enable = lib.mkEnableOption "enables compatibility with windows & x11"; - + options.sys.srv.compat.enable = lib.mkEnableOption "enables compatibility with windows & x11"; config = lib.mkIf cfg.enable { programs.xwayland = { enable = true; @@ -14,6 +13,7 @@ in environment.sessionVariables = { NIXOS_OZONE_WL = "1"; ELECTRON_ENABLE_WAYLAND = "1"; + WINE_RT_PRIO = "1"; }; environment.systemPackages = with pkgs; [ diff --git a/sys/srv/docker.nix b/sys/srv/docker.nix index 3baa689..0ed1541 100644 --- a/sys/srv/docker.nix +++ b/sys/srv/docker.nix @@ -1,15 +1,14 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, username, ... }: let - cfg = config.szpont.sys.srv.docker; + cfg = config.sys.srv.docker; in { - options.szpont.sys.srv.docker.enable = lib.mkEnableOption "docker container engine"; - + options.sys.srv.docker.enable = lib.mkEnableOption "enables the docker container engine"; config = lib.mkIf cfg.enable { virtualisation.docker.enable = true; environment.systemPackages = [ pkgs.docker-compose ]; - users.users.adam.extraGroups = [ "docker" ]; + users.users.${username}.extraGroups = [ "docker" ]; }; } diff --git a/sys/srv/files.nix b/sys/srv/files.nix index bbd6ca8..9b5759e 100644 --- a/sys/srv/files.nix +++ b/sys/srv/files.nix @@ -1,16 +1,15 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.sys.srv.files; + cfg = config.sys.srv.files; in { - options.szpont.sys.srv.files = { - thunar.enable = lib.mkEnableOption "thunar file manager"; - utils.enable = lib.mkEnableOption "compression and trash utilities"; + options.sys.srv.files = { + thunar.enable = lib.mkEnableOption "enables the thunar file manager"; + utils.enable = lib.mkEnableOption "enables compression and trash utilities"; }; - config = lib.mkMerge [ { - szpont.sys.srv.files.utils.enable = lib.mkDefault cfg.thunar.enable; + sys.srv.files.utils.enable = lib.mkDefault cfg.thunar.enable; } (lib.mkIf cfg.thunar.enable { @@ -22,7 +21,10 @@ in thunar-vcs-plugin ]; }; - services.gnome.gnome-keyring.enable = true; + services = { + tumbler.enable = true; + gnome.gnome-keyring.enable = true; + }; environment.systemPackages = with pkgs; [ file-roller ]; }) diff --git a/sys/srv/gaming.nix b/sys/srv/gaming.nix index 1eb5472..ee7f608 100644 --- a/sys/srv/gaming.nix +++ b/sys/srv/gaming.nix @@ -1,17 +1,15 @@ { config, lib, pkgs, username, ... }: let - cfg = config.szpont.sys.srv.gaming; + cfg = config.sys.srv.gaming; in { - options.szpont.sys.srv.gaming = { - enable = lib.mkEnableOption "enables gaming stuff"; - steam.enable = lib.mkEnableOption "enables steam stuff"; + options.sys.srv.gaming = { + enable = lib.mkEnableOption "enables gaming utilities"; + steam.enable = lib.mkEnableOption "enables steam utilities"; vr.enable = lib.mkEnableOption "enables vr support"; }; - config = lib.mkMerge [ (lib.mkIf cfg.enable { - home-manager.users.${username}.szpont.hm.soft.gaming.enable = true; programs.gamescope.enable = true; programs.gamemode = { @@ -23,6 +21,8 @@ in heroic prismlauncher ]; + + home-manager.users.${username}.hm.soft.mangohud.enable = true; }) (lib.mkIf cfg.steam.enable { diff --git a/sys/srv/kvm.nix b/sys/srv/kvm.nix index 08c8578..2cf8c26 100644 --- a/sys/srv/kvm.nix +++ b/sys/srv/kvm.nix @@ -1,10 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.sys.srv.kvm; + cfg = config.sys.srv.kvm; in { - options.szpont.sys.srv.kvm.enable = lib.mkEnableOption "KVM/QEMU virtualization with Virt-Manager"; - + options.sys.srv.kvm.enable = lib.mkEnableOption "KVM/QEMU virtualization with Virt-Manager"; config = lib.mkIf cfg.enable { virtualisation.libvirtd = { enable = true; @@ -14,8 +13,6 @@ in programs.virt-manager.enable = true; - users.users.adam.extraGroups = [ "libvirtd" ]; - - boot.initrd.kernelModules = [ "kvm-amd" ]; + boot.initrd.kernelModules = lib.optional (config.sys.core.drivers.amd.enable or false) "kvm-amd"; }; } diff --git a/sys/srv/nix-helper.nix b/sys/srv/nix-helper.nix index fc81ddb..5eb3353 100644 --- a/sys/srv/nix-helper.nix +++ b/sys/srv/nix-helper.nix @@ -1,10 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.sys.srv.nix-helper; + cfg = config.sys.srv.nix-helper; in { - options.szpont.sys.srv.nix-helper.enable = lib.mkEnableOption "enables nix-helper"; - + options.sys.srv.nix-helper.enable = lib.mkEnableOption "enables nix-helper"; config = lib.mkIf cfg.enable { nix.settings = { trusted-users = [ "root" "adam" ]; diff --git a/sys/srv/ollama.nix b/sys/srv/ollama.nix index 7cb90bf..11babd6 100644 --- a/sys/srv/ollama.nix +++ b/sys/srv/ollama.nix @@ -1,18 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.szpont.sys.srv.ollama; + cfg = config.sys.srv.ollama; in { - options.szpont.sys.srv.ollama = { - enable = lib.mkEnableOption "Ollama AI service"; - - useRocm = lib.mkOption { - type = lib.types.bool; - default = true; - description = "whether to use ollama with ROCm support."; - }; - }; - + options.sys.srv.ollama.enable = lib.mkEnableOption "Ollama AI service"; config = lib.mkIf cfg.enable { fileSystems."/models" = { device = "/home/ollama"; @@ -22,7 +13,7 @@ in services.ollama = { enable = true; - package = if cfg.useRocm then pkgs.ollama-rocm else pkgs.ollama; + package = pkgs.ollama-rocm; user = "ollama"; models = "/models"; diff --git a/sys/wm/niri.nix b/sys/wm/niri.nix index 96a08ca..c92b068 100644 --- a/sys/wm/niri.nix +++ b/sys/wm/niri.nix @@ -1,11 +1,11 @@ { inputs, config, lib, pkgs, username, ... }: let - cfg = config.szpont.sys.wm.niri; + cfg = config.sys.wm.niri; in { imports = [ inputs.niri.nixosModules.niri ]; - options.szpont.sys.wm.niri.enable = lib.mkEnableOption "Niri"; + options.sys.wm.niri.enable = lib.mkEnableOption "Niri"; config = lib.mkIf cfg.enable { nixpkgs.overlays = [ inputs.niri.overlays.niri ]; @@ -15,16 +15,7 @@ in package = pkgs.niri-unstable; }; - xdg.portal = { - enable = true; - extraPortals = [ - pkgs.xdg-desktop-portal-gtk - ]; - }; - - services.dbus.enable = true; - - szpont.sys.srv.compat.enable = true; - home-manager.users.${username}.szpont.hm.env.niri.enable = true; + sys.srv.compat.enable = true; + home-manager.users.${username}.hm.env.niri.enable = true; }; } diff --git a/sys/wm/wm.nix b/sys/wm/wm.nix index 48df857..10780e0 100644 --- a/sys/wm/wm.nix +++ b/sys/wm/wm.nix @@ -1,6 +1,23 @@ -{ ... }: +{ config, lib, pkgs, ... }: +let + cfg = config.sys.wm; +in { imports = [ ./niri.nix ]; + + options.sys.wm.enable = lib.mkEnableOption "enables shared wm features"; + + config = lib.mkIf (cfg.enable || cfg.niri.enable or false) { + services.dbus.enable = true; + + xdg.portal = { + enable = true; + wlr.enable = true; + xdgOpenUsePortal = true; + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + config.common.default = [ "gtk" ]; + }; + }; } |
