From 6a51c08183fe959c98902e5b5c3acfc0a914d2fc Mon Sep 17 00:00:00 2001 From: Fabian Montero Date: Fri, 29 Nov 2024 01:37:41 -0600 Subject: [PATCH] re-structure package configuration. fully modularize everything --- home/modules/baseline.nix | 1 + home/modules/default.nix | 3 +- home/modules/defaultDesktopPack.nix | 34 +++++++++ home/modules/gaming/default.nix | 28 +++++++ home/modules/{steam => gaming}/package.nix | 0 home/modules/steam/default.nix | 21 ------ home/platforms/fabian@posixlycorrect/apps.nix | 45 ------------ .../fabian@posixlycorrect/default.nix | 73 ++++++++++++------- 8 files changed, 111 insertions(+), 94 deletions(-) create mode 100644 home/modules/defaultDesktopPack.nix create mode 100644 home/modules/gaming/default.nix rename home/modules/{steam => gaming}/package.nix (100%) delete mode 100644 home/modules/steam/default.nix delete mode 100644 home/platforms/fabian@posixlycorrect/apps.nix diff --git a/home/modules/baseline.nix b/home/modules/baseline.nix index 02b2353..4f49f79 100644 --- a/home/modules/baseline.nix +++ b/home/modules/baseline.nix @@ -17,6 +17,7 @@ in { packages = with pkgs; [ calc file + gcc htop killall man-pages diff --git a/home/modules/default.nix b/home/modules/default.nix index 331f424..18f5fe6 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -8,11 +8,12 @@ ./terminal ./neovim.nix ./baseline.nix - ./steam + ./gaming ./yubikey.nix ./browsers.nix ./gui ./zsh ./gpg.nix + ./defaultDesktopPack.nix ]; } diff --git a/home/modules/defaultDesktopPack.nix b/home/modules/defaultDesktopPack.nix new file mode 100644 index 0000000..436a05e --- /dev/null +++ b/home/modules/defaultDesktopPack.nix @@ -0,0 +1,34 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.local.apps.defaultDesktopPack; +in { + options.local.apps.defaultDesktopPack = { + enable = mkEnableOption "common desktop apps"; + }; + config = mkIf cfg.enable { + home.packages = with pkgs; [ + calibre + discord + gwenview + libreoffice-fresh + mpv + obs-studio + pavucontrol + pdfarranger + qpdfview + runelite + spotify + tdesktop + usbutils + vpsfree-client + vscodium-fhs + zola + zoom-us + ]; + }; +} diff --git a/home/modules/gaming/default.nix b/home/modules/gaming/default.nix new file mode 100644 index 0000000..317d89f --- /dev/null +++ b/home/modules/gaming/default.nix @@ -0,0 +1,28 @@ +{ + pkgs, + lib, + config, + ... +}: +with lib; let + cfg = config.local.apps.gaming; +in { + options.local.apps.gaming = { + enable = mkEnableOption "gaming apps"; + }; + config = mkIf cfg.enable { + home.packages = [ + # Steam. todo: move to the steam module later + (pkgs.callPackage ./package.nix {}) + pkgs.protonup + pkgs.winetricks + pkgs.protontricks + ]; + + home.packages = with pkgs; [ + lutris + openrct2 + prismlauncher + ]; + }; +} diff --git a/home/modules/steam/package.nix b/home/modules/gaming/package.nix similarity index 100% rename from home/modules/steam/package.nix rename to home/modules/gaming/package.nix diff --git a/home/modules/steam/default.nix b/home/modules/steam/default.nix deleted file mode 100644 index 2360e6b..0000000 --- a/home/modules/steam/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -with lib; let - cfg = config.local.apps.steam; -in { - options.local.apps.steam = { - enable = mkEnableOption "Steam settings"; - }; - config = mkIf cfg.enable { - home.packages = [ - (pkgs.callPackage ./package.nix {}) - pkgs.protonup - pkgs.winetricks - pkgs.protontricks - ]; - }; -} diff --git a/home/platforms/fabian@posixlycorrect/apps.nix b/home/platforms/fabian@posixlycorrect/apps.nix deleted file mode 100644 index 7acf1d9..0000000 --- a/home/platforms/fabian@posixlycorrect/apps.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: { - local = { - baseline.enable = true; - apps = { - terminal.enable = true; - neovim.enable = true; - steam.enable = true; - yubikey.enable = true; - browsers.enable = true; - }; - }; - - home.packages = with pkgs; [ - calibre - darktable - deluge - discord - gcc - gwenview - kdenlive - libreoffice-fresh - lutris - mpv - obs-studio - openrct2 - pavucontrol - pdfarranger - prismlauncher - qpdfview - runelite - spotify - tdesktop - usbutils - virt-manager - vpsfree-client - vscodium-fhs - zola - zoom-us - ]; -} diff --git a/home/platforms/fabian@posixlycorrect/default.nix b/home/platforms/fabian@posixlycorrect/default.nix index 16f0302..a2f7c19 100644 --- a/home/platforms/fabian@posixlycorrect/default.nix +++ b/home/platforms/fabian@posixlycorrect/default.nix @@ -6,7 +6,6 @@ ... }: { imports = [ - ./apps.nix ./systemd ./isolation.nix ]; @@ -21,44 +20,64 @@ "unstable".flake = flakes.unstable; }; - local.gui = { - enable = true; - #? wallpaperPath = ""; place wallpaper in config? - monitors = { - DP-1 = { - primary = true; - position = "0x0"; - mode = "1920x1080"; - rate = "143.85"; - fingerprint = "00ffffffffffff003669a03bd4040000231e0104a5341d783bd005ac5048a627125054bfcf00814081809500714f81c0b30001010101023a801871382d40582c450009252100001e0882805070384d400820f80c09252100001a000000fd003090b4b422010a202020202020000000fc004d53492047323443340a20202001a2020320f14d010304131f120211900e0f1d1e230907078301000065030c001000866f80a0703840403020350009252100001a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e9"; - initialI3Workspace = 1; - }; - DP-2 = { - position = "1920x0"; - mode = "1920x1080"; - rate = "59.94"; - fingerprint = "00ffffffffffff0009d1e77845540000061f0104a5351e783a0565a756529c270f5054a56b80d1c0b300a9c08180810081c001010101023a801871382d40582c45000f282100001e000000ff0039324d30303033323031510a20000000fd00324c1e5311010a202020202020000000fc0042656e51204757323438300a20019b02031cf14f901f041303120211011406071516052309070783010000023a801871382d40582c45000f282100001f011d8018711c1620582c25000f282100009f011d007251d01e206e2855000f282100001e8c0ad08a20e02d10103e96000f28210000180000000000000000000000000000000000000000000000000000008d"; - initialI3Workspace = 10; + local = { + baseline.enable = true; + + services = { + zsh.enable = true; + accounts.enable = true; + gpg = { + enalbe = true; + defaultKey = "7AA277E604A4173916BBB4E91FFAC35E1798174F"; }; }; - }; - local.services = { - zsh.enable = true; - accounts.enable = true; - gpg = { - enalbe = true; - defaultKey = "7AA277E604A4173916BBB4E91FFAC35E1798174F"; + apps = { + terminal.enable = true; + neovim.enable = true; + gaming.enable = true; + yubikey.enable = true; + browsers.enable = true; + defaultDesktopPack.enable = true; + }; + + gui = { + enable = true; + monitors = { + DP-1 = { + primary = true; + position = "0x0"; + mode = "1920x1080"; + rate = "143.85"; + fingerprint = "00ffffffffffff003669a03bd4040000231e0104a5341d783bd005ac5048a627125054bfcf00814081809500714f81c0b30001010101023a801871382d40582c450009252100001e0882805070384d400820f80c09252100001a000000fd003090b4b422010a202020202020000000fc004d53492047323443340a20202001a2020320f14d010304131f120211900e0f1d1e230907078301000065030c001000866f80a0703840403020350009252100001a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e9"; + initialI3Workspace = 1; + }; + DP-2 = { + position = "1920x0"; + mode = "1920x1080"; + rate = "59.94"; + fingerprint = "00ffffffffffff0009d1e77845540000061f0104a5351e783a0565a756529c270f5054a56b80d1c0b300a9c08180810081c001010101023a801871382d40582c45000f282100001e000000ff0039324d30303033323031510a20000000fd00324c1e5311010a202020202020000000fc0042656e51204757323438300a20019b02031cf14f901f041303120211011406071516052309070783010000023a801871382d40582c45000f282100001f011d8018711c1620582c25000f282100009f011d007251d01e206e2855000f282100001e8c0ad08a20e02d10103e96000f28210000180000000000000000000000000000000000000000000000000000008d"; + initialI3Workspace = 10; + }; + }; }; }; home = { - stateVersion = "21.11"; # No tocar esto + packages = with pkgs; [ + darktable + deluge + kdenlive + virt-manager + ]; + + stateVersion = "21.11"; # DO NOT CHANGE username = "fabian"; homeDirectory = "/home/fabian"; sessionVariables = { "TERMINAL" = "kitty"; }; }; + programs.home-manager.enable = true; }