Initial commit

This commit is contained in:
demenik
2025-12-01 18:24:34 +01:00
commit fc68fa5ce9
142 changed files with 6273 additions and 0 deletions

62
home/services/bisync.nix Normal file
View File

@@ -0,0 +1,62 @@
{
config,
pkgs,
...
}: {
home.packages = with pkgs; [rclone];
systemd.user = let
mkBiSync = {
name,
ageName,
localDir,
remoteDir,
}: {
services."sync-${name}" = {
Unit = {
Description = "Rclone bi-directional ${name} syncing";
After = ["network-online.target"];
};
Service = {
EnvironmentFile = "%t/agenix/${ageName}";
ExecStart = ''
${pkgs.lib.getExe pkgs.rclone} bisync \
"${localDir}" \
"NEXTCLOUD:${remoteDir}" \
--resync \
--verbose
'';
};
};
paths."sync-${name}" = {
Unit.Description = "Rclone bi-directional ${name} syncing watch path";
Path = {
PathChanged = localDir;
PathModified = localDir;
};
Install.WantedBy = ["default.target"];
};
timers."sync-${name}" = {
Unit.Description = "Rclone bi-directional ${name} syncing timer";
Timer = {
OnBootSec = "5min";
OnUnitActiveSec = "1h";
Unit = "sync-${name}.service";
};
Install.WantedBy = ["timers.target"];
};
};
combine = builtins.foldl' (acc: set: acc // set) {};
in
combine [
(mkBiSync {
name = "music";
ageName = "nextcloud";
localDir = "${config.home.homeDirectory}/Music/";
remoteDir = "Musik";
})
];
}

60
home/services/kanshi.nix Normal file
View File

@@ -0,0 +1,60 @@
{
services.kanshi = {
enable = true;
settings = let
enableLaptopDock = false;
laptop = {
criteria = "eDP-1";
mode = "1920x1200@60";
scale = 1.25;
status = "enable";
};
laptopDock =
if enableLaptopDock
then laptop
else {
inherit (laptop) criteria;
status = "disable";
};
samsungDock = {
criteria = "Samsung Electric Company LC24RG50 HTHM300134";
mode = "1920x1080@144";
scale = 1.0;
status = "enable";
};
collegeDock = {
criteria = "Dell Inc. DELL U2515H 9X2VY54S0QNL";
mode = "1920x1080@60";
scale = 1.0;
status = "enable";
};
mkSensitivity = val: "hyprctl keyword input:sensitivity ${val}";
in [
{
profile = {
name = "laptop";
outputs = [laptop];
exec = [(mkSensitivity "0.0")];
};
}
{
profile = {
name = "dock@home";
outputs = [samsungDock laptopDock];
exec = [(mkSensitivity "-0.5")];
};
}
{
profile = {
name = "dock@college";
outputs = [collegeDock laptopDock];
exec = [(mkSensitivity "-0.5")];
};
}
];
};
}