Option: added niksos.desktop.apps option, that disables most heavier apps

This commit is contained in:
Jurn Wubben 2025-07-09 00:33:25 +02:00
parent 678c3cb4f7
commit d233e18593
6 changed files with 19 additions and 43 deletions

View file

@ -7,6 +7,6 @@
extraConfig.push.autoSetupRemote = true;
lfs.enable = true;
};
git-credential-oauth.enable = true;
git-credential-oauth.enable = true; #FIXME: need to relogin for each push for some reason.
};
}

View file

@ -7,13 +7,15 @@
}: let
inherit (lib) optionals;
inherit (osConfig.niksos.hardware) bluetooth portable;
inherit (osConfig.niksos.desktop) apps;
in {
home.packages =
[
pkgs.ripgrep
pkgs.fzf
pkgs.p7zip
pkgs.dua
pkgs.ffmpeg
pkgs.usbutils
pkgs.pciutils
@ -21,6 +23,12 @@ in {
pkgs.aria2
pkgs.file
]
++ optionals apps [
# Kinda don't need to include these on more minimal installs.
pkgs.ffmpeg
pkgs.imagemagick
pkgs.ghostscript
]
++ optionals bluetooth [
pkgs.ear2ctl
]

View file

@ -1,37 +0,0 @@
{
pkgs,
osConfig,
...
}: {
home.packages = [
(pkgs.writeShellScriptBin "transfer" ''
PASSWORD=$(sed 's/.*="\(.*\)"/\1/' ${osConfig.age.secrets.transferSh.path})
if [ -z "$PASSWORD" ]; then
echo "Error: Password not found."
return 1
fi
file_path="$1"
if [ -z "$file_path" ]; then
echo "Usage: transfer <file>"
return 1
fi
response=$(curl -sD - --user "jsw:$PASSWORD" --progress-bar --upload-file "$file_path" "https://share.jsw.tf/$(basename "$file_path")")
if [ $? -eq 0 ]; then
DELETE=$(echo "$response" | grep x-url-delete | sed "s/.*\///")
URL=$(echo "$response" | tail -n1)
echo "Delete code: $DELETE"
echo "URL: $URL"
else
echo "Upload failed."
return 1
fi
echo
'')
];
}