concatenation fixes

This commit is contained in:
Danilo Reyes 2025-05-31 15:52:30 -06:00
parent 6054385386
commit 4f0fbcc91e
4 changed files with 62 additions and 111 deletions

View File

@ -3,6 +3,17 @@
inputs, inputs,
... ...
}: }:
let
krita-thumbnailer = pkgs.writeTextFile {
name = "krita-thumbnailer";
destination = "/share/thumbnailers/kra.thumbnailer";
text = ''
[Thumbnailer Entry]
Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o"
MimeType=application/x-krita;
'';
};
in
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
@ -19,54 +30,18 @@
installBatSyntax = true; installBatSyntax = true;
installVimSyntax = true; installVimSyntax = true;
}; };
xdg.configFile."jellyfin-rpc/main.json".text = builtins.toJSON {
jellyfin = {
url = "https://flix.servidos.lat";
api_key = "abe7cdf35e5c453a9bceb004f4792b4a";
username = "jawz";
music = {
display = [
"year"
"album"
];
separator = "-";
};
};
discord = {
application_id = "1311453366978875392";
buttons = [
{
name = "dynamic";
url = "dynamic";
}
{
name = "dynamic";
url = "dynamic";
}
];
};
imgur = {
client_id = "1ca05dbfc674d39";
};
images = {
enable_images = true;
imgur_images = true;
};
};
}; };
networking = { networking = {
hostName = "workstation"; hostName = "workstation";
firewall = firewall =
let let
openPorts = [ kdeconnectPortRange = {
6674 # ns-usbloader from = 1714;
]; to = 1764;
openPortRanges = [ };
{ ns-usbloaderPort = 6674;
from = 1714; # kdeconnect openPorts = [ ns-usbloaderPort ];
to = 1764; # kdeconnect openPortRanges = [ kdeconnectPortRange ];
}
];
in in
{ {
allowedTCPPorts = openPorts; allowedTCPPorts = openPorts;
@ -79,7 +54,6 @@
cores = 8; cores = 8;
max-jobs = 8; max-jobs = 8;
}; };
nixpkgs.config.permittedInsecurePackages = [ ];
users = { users = {
groups.nixremote.gid = 555; groups.nixremote.gid = 555;
users = { users = {
@ -104,28 +78,17 @@
}; };
environment = { environment = {
pathsToLink = [ "share/thumbnailers" ]; pathsToLink = [ "share/thumbnailers" ];
systemPackages = systemPackages = builtins.attrValues {
builtins.attrValues { # thumbnail for heif files & videos
# thumbnail for heif files & videos inherit krita-thumbnailer;
inherit (pkgs) inherit (pkgs)
libheif libheif
ffmpegthumbnailer ffmpegthumbnailer
bign-handheld-thumbnailer bign-handheld-thumbnailer
gnome-epub-thumbnailer gnome-epub-thumbnailer
; ;
inherit (pkgs.libheif) out; inherit (pkgs.libheif) out;
} };
++ [
(pkgs.writeTextFile {
name = "krita-thumbnailer";
destination = "/share/thumbnailers/kra.thumbnailer";
text = ''
[Thumbnailer Entry]
Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o"
MimeType=application/x-krita;
'';
})
];
etc."wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = '' etc."wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
bluez_monitor.properties = { bluez_monitor.properties = {
["bluez5.enable-sbc-xq"] = true, ["bluez5.enable-sbc-xq"] = true,
@ -149,7 +112,6 @@
obs-vkcapture obs-vkcapture
obs-vaapi obs-vaapi
obs-tuna obs-tuna
# looking-glass-obs
input-overlay input-overlay
; ;
}; };

View File

@ -13,38 +13,32 @@ let
patches = (old.patches or [ ]) ++ [ ../../patches/libpng.patch ]; patches = (old.patches or [ ]) ++ [ ../../patches/libpng.patch ];
}); });
}; };
attrValuesIf = cond: attrs: if cond then builtins.attrValues attrs else [ ];
artPackages = attrValuesIf config.my.apps.art.enable {
inherit patched-krita; # art to your heart desire!
inherit (pkgs)
eyedropper # color picker
emulsion-palette # self explanatory
gimp # the coolest bestest art program to never exist
mypaint # not the best art program
mypaint-brushes # but it's got some
mypaint-brushes1 # nice damn brushes
blender # cgi animation and sculpting
drawpile # arty party with friends!!
pureref # create inspiration/reference boards
;
};
gameDevPackages = attrValuesIf config.my.dev.gameDev.enable {
inherit (pkgs)
godot_4 # game development
gdtoolkit_4 # gdscript language server
;
};
in in
{ {
options.my = { options.my = {
apps.art.enable = lib.mkEnableOption "enable"; apps.art.enable = lib.mkEnableOption "enable";
dev.gameDev.enable = lib.mkEnableOption "enable"; dev.gameDev.enable = lib.mkEnableOption "enable";
}; };
config = lib.mkIf config.my.apps.art.enable { config.users.users.jawz.packages = artPackages ++ gameDevPackages;
users.users.jawz.packages =
builtins.attrValues {
inherit patched-krita; # art to your heart desire!
inherit (pkgs)
eyedropper # color picker
emulsion-palette # self explanatory
gimp # the coolest bestest art program to never exist
mypaint # not the best art program
mypaint-brushes # but it's got some
mypaint-brushes1 # nice damn brushes
blender # cgi animation and sculpting
drawpile # arty party with friends!!
pureref # create inspiration/reference boards
;
}
++ (
if config.my.dev.gameDev.enable then
builtins.attrValues {
inherit (pkgs)
godot_4 # game development
gdtoolkit_4 # gdscript language server
;
}
else
[ ]
);
};
} }

View File

@ -46,6 +46,7 @@
}; };
services.emacs = { services.emacs = {
enable = true; enable = true;
defaultEditor = true;
package = pkgs.emacsWithDoom { package = pkgs.emacsWithDoom {
doomDir = ../../dotfiles/doom; doomDir = ../../dotfiles/doom;
doomLocalDir = "/home/jawz/.local/share/nix-doom"; doomLocalDir = "/home/jawz/.local/share/nix-doom";
@ -58,23 +59,17 @@
extraConfig extraConfig
; ;
extra = extraPackages epkgs; extra = extraPackages epkgs;
themes = lib.optional config.stylix.enable [
(epkgs.trivialBuild {
pname = "stylix-theme";
src = pkgs.writeText "stylix-theme.el" extraConfig;
version = "0.1.0";
packageRequires = extra;
})
];
in in
extra extra ++ themes;
++ (
if config.stylix.enable then
[
(epkgs.trivialBuild {
pname = "stylix-theme";
src = pkgs.writeText "stylix-theme.el" extraConfig;
version = "0.1.0";
packageRequires = extra;
})
]
else
[ ]
);
}; };
defaultEditor = true;
}; };
}; };
} }

View File

@ -27,7 +27,7 @@ in
networking.firewall.allowedTCPPorts = lib.mkIf (!cfg.isLocal) [ cfg.port ]; networking.firewall.allowedTCPPorts = lib.mkIf (!cfg.isLocal) [ cfg.port ];
environment = { environment = {
systemPackages = lib.mkIf cfg.enable ( systemPackages = lib.mkIf cfg.enable (
[ pkgs.jellyfin-ffmpeg ] ++ (if cfg.enableCron then sub-sync-path else [ ]) [ pkgs.jellyfin-ffmpeg ] ++ (lib.optional cfg.enableCron [ sub-sync-path ])
); );
}; };
services = { services = {