Merge branch 'main' of github.com:jroeger23/.hive

This commit is contained in:
2025-06-30 23:07:58 +02:00
13 changed files with 211 additions and 87 deletions

View File

@@ -22,6 +22,7 @@
./hardware/sound.nix
./hardware/yubikey.nix
./networking/wireguard
./programs/creative.nix
./programs/games.nix
./services/borg-server.nix
./services/kdeconnect.nix

View File

@@ -11,9 +11,5 @@ in {
enable = true;
wayland.enable = true;
};
environment.systemPackages = with pkgs; [
kdePackages.kwallet
kdePackages.kwalletmanager
];
};
}

View File

@@ -1,15 +1,28 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.hive.sound;
in {
options = {
hive.sound.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable sound with pipewire.";
hive.sound = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable sound with pipewire.";
};
noisetorch = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable Noisetorch for noise cancellation.";
};
noisetorch-threshold = lib.mkOption {
type = lib.types.int;
default = -1;
description = "Set the noise cancellation threshold for Noisetorch.";
};
};
};
config = lib.mkIf cfg.enable {
@@ -28,5 +41,35 @@ in {
# no need to redefine it in your config for now)
#media-session.enable = true;
};
programs.noisetorch.enable = cfg.noisetorch;
systemd.user.services.noisetorch-autoload = lib.mkIf cfg.noisetorch {
description = "Automatically load Noisetorch on user login";
after = ["pipewire.service"];
requires = ["pipewire.service"];
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.writeShellScript "load-noisetorch" ''
set -euo pipefail
NOISETORCH="${pkgs.noisetorch}/bin/noisetorch"
WPCTL="${pkgs.wireplumber}/bin/wpctl"
GREP="${pkgs.gnugrep}/bin/grep"
AWK="${pkgs.gawk}/bin/awk"
HEAD="${pkgs.coreutils}/bin/head"
sleep 2
$NOISETORCH -i -t ${toString cfg.noisetorch-threshold};
sleep 2
FILTER_ID=$($WPCTL status | $GREP NoiseTorch | $AWK 'match($0, /[0-9]+(\.[0-9]+)?/) { print substr($0, RSTART, RLENGTH) }' | head -n1)
if [ -n "$FILTER_ID" ]; then
$WPCTL set-default $FILTER_ID
else
echo "Noisetorch filter not found, skipping setting default source."
fi
''}";
ExecStop = "${pkgs.noisetorch}/bin/noisetorch -u";
RemainAfterExit = true;
};
wantedBy = ["default.target"];
};
};
}

View File

@@ -1,6 +1,7 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.hive.nextcloud;
@@ -12,6 +13,7 @@ in {
services.nextcloud-client = {
enable = true;
startInBackground = true;
package = pkgs.nextcloud-client;
};
};
}

View File

@@ -20,7 +20,7 @@ in {
pkgs.tela-circle-icon-theme
];
qt.enable = true;
qt.enable = false;
qt.style.name = "kvantum";
qt.style.package = pkgs.kdePackages.qtstyleplugin-kvantum;
qt.platformTheme.name = "gtk";

View File

@@ -61,8 +61,8 @@ in {
git
htop
killall
neofetch
nh
nix-output-monitor
nix-search-cli
nix-tree
nixpkgs-fmt

View File

@@ -0,0 +1,60 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.hive.programs.creative;
in {
options.hive.programs.creative = {
enable = lib.mkEnableOption "Enable creative programs (video/image editing, etc.)";
image-management = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Enable image management tools.
'';
};
image-editing = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Enable image editing tools.
'';
};
image-raw-processing = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Enable Darktable for raw processing.
'';
};
video-editing-light = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Enable light video editing tools.
'';
};
video-editing-heavy = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Enable heavy video editing tools.
'';
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs;
lib.optionals cfg.image-editing [gimp krita drawio]
++ lib.optional cfg.image-management digikam
++ lib.optionals cfg.image-raw-processing [darktable hdrmerge]
++ lib.optionals cfg.video-editing-light [ffmpeg losslesscut-bin]
++ lib.optionals cfg.video-editing-heavy [
davinci-resolve
hive.transcode-davinci-resolve
kdePackages.kdenlive
];
};
}

View File

@@ -1,5 +1,6 @@
{
config,
inputs,
lib,
pkgs,
...
@@ -15,6 +16,13 @@ in {
Enable Steam support.
'';
};
dayz = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Enable DayZ tools.
'';
};
lutris = lib.mkOption {
type = lib.types.bool;
default = false;
@@ -48,10 +56,15 @@ in {
];
})
++ lib.optional cfg.r2modman pkgs.r2modman
++ lib.optionals cfg.dayz [
pkgs.hive.crossover
inputs.dzgui-nix.packages.${pkgs.stdenv.system}.default
]
++ lib.optionals cfg.wine [
pkgs.wine
pkgs.winetricks
];
]
++ lib.optional (cfg.steam && cfg.wine) pkgs.proton-caller;
programs.steam = lib.mkIf cfg.steam {
enable = true;