re-structure package configuration. fully modularize everything

This commit is contained in:
Fabian Montero 2024-11-29 01:37:41 -06:00
parent 9418588fed
commit 6a51c08183
8 changed files with 111 additions and 94 deletions

View file

@ -17,6 +17,7 @@ in {
packages = with pkgs; [
calc
file
gcc
htop
killall
man-pages

View file

@ -8,11 +8,12 @@
./terminal
./neovim.nix
./baseline.nix
./steam
./gaming
./yubikey.nix
./browsers.nix
./gui
./zsh
./gpg.nix
./defaultDesktopPack.nix
];
}

View file

@ -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
];
};
}

View file

@ -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
];
};
}

View file

@ -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
];
};
}

View file

@ -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
];
}

View file

@ -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;
}