Reduce build size via config restriction

This commit is contained in:
soraefir
2026-06-21 22:51:54 +02:00
parent 798c222bd6
commit 473b290258
11 changed files with 35 additions and 31 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ let
logoColor1 = p.base07;
logoColor2 = p.base07;
# ─────────────────────────────────────────────────────────────────────────
in {
in lib.mkIf config.syscfg.make.gui {
home.packages = with pkgs; [ fastfetch ];
xdg.configFile."neofetch/config.conf".source = ./config.conf;
xdg.configFile."fastfetch/logo.txt".source = ./logo.txt;
+2 -2
View File
@@ -1,5 +1,5 @@
{ config, ... }: {
programs.kitty = {
{ config, lib, ... }: {
programs.kitty = lib.mkIf config.syscfg.make.gui {
enable = true;
settings = {
foreground = "#${config.colorScheme.palette.base07}";
+3 -3
View File
@@ -1,16 +1,16 @@
{ pkgs, ... }: {
{ config, lib, pkgs, ... }: {
home.packages = with pkgs; [
ripgrep
unzip
socat
appimage-run
cbonsai
pipes-rs
cmatrix
#cava
sl
] ++ lib.optionals (config.syscfg.make.gui || config.syscfg.make.develop) [
pkgs.appimage-run
];
}
+1 -3
View File
@@ -6,13 +6,11 @@ in{
config = lib.mkIf (config.syscfg.make.gui) {
programs.mpv = {
enable = true;
scripts = with pkgs.mpvScripts; [ mpris modernz ];
scripts = with pkgs.mpvScripts; [ mpris ];
config = {
hwdec ="auto";
profile ="high-quality";
ytdl-format = "bestvideo+bestaudio";
osc ="no";
};
bindings =
+2 -2
View File
@@ -1,6 +1,6 @@
{ pkgs, ... }: {
{ config, lib, pkgs, ... }: {
fonts = {
fonts = lib.mkIf (config.syscfg.make.gui || config.syscfg.make.serverExtras) {
enableDefaultPackages = false;
fontDir.enable = true;
+3 -3
View File
@@ -1,5 +1,5 @@
{ lib, ... }: {
services.fwupd.enable = true;
{ config, lib, ... }: {
services.fwupd.enable = lib.mkDefault (config.syscfg.make.gui || config.syscfg.make.power);
hardware.enableAllFirmware = false;
services.power-profiles-daemon.enable = lib.mkDefault true;
services.power-profiles-daemon.enable = lib.mkDefault config.syscfg.make.gui;
}
+6 -3
View File
@@ -1,6 +1,9 @@
{ pkgs, ... }: {
{ config, lib, pkgs, ... }:
let
hasNfsFileSystems = lib.any (fs: fs.fsType == "nfs" || fs.fsType == "nfs4") (lib.attrValues config.fileSystems);
in {
services.fstrim.enable = true; # Improves SSD life
services.gvfs.enable = true; # User Mounted FS
services.gvfs.enable = config.syscfg.make.gui; # User Mounted FS
environment.systemPackages = with pkgs; [ nfs-utils ];
environment.systemPackages = lib.optionals hasNfsFileSystems [ pkgs.nfs-utils ];
}
+3 -3
View File
@@ -1,4 +1,4 @@
{ ... }: {
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
{ config, ... }: {
hardware.graphics.enable = config.syscfg.make.gui || config.syscfg.make.serverExtras || config.syscfg.make.game;
hardware.graphics.enable32Bit = config.syscfg.make.game;
}
@@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ config, lib, pkgs, ... }: {
config = lib.mkIf config.syscfg.make.gui {
security.polkit.enable = true;
security.pam.services.hyprlock = { #swaylock
text = ''
@@ -6,5 +7,6 @@
'';
};
environment.systemPackages = with pkgs; [ polkit_gnome ];
environment.systemPackages = [ pkgs.polkit_gnome ];
};
}
+2 -2
View File
@@ -1,5 +1,5 @@
{ pkgs, ... }: {
{ config, lib, pkgs, ... }: {
imports = [ ./debug ./develop ./telegraf ];
environment.systemPackages = with pkgs; [ pkgs.engrampa ];
environment.systemPackages = lib.optionals config.syscfg.make.gui [ pkgs.engrampa ];
}
+1
View File
@@ -2,6 +2,7 @@
with lib; {
cli = mkOption { type = types.bool; default = true; };
gui = mkOption { type = types.bool; default = false; };
serverExtras = mkOption { type = types.bool; default = false; };
virt = mkOption { type = types.bool; default = false; };
power = mkOption { type = types.bool; default = false; };
game = mkOption { type = types.bool; default = false; };