124 lines
3.2 KiB
Nix
124 lines
3.2 KiB
Nix
{ pkgs, config, inputs, ... }:
|
|
|
|
{
|
|
imports = [
|
|
../../home-manager
|
|
../../home-manager/development
|
|
../../home-manager/gaming.nix
|
|
../../home-manager/streamlink.nix
|
|
];
|
|
|
|
terminal.nixUpdateLocation = "/home/worble/Projects/nixos/devices/tuxedo#tuxedo";
|
|
terminal.flakeUpdateLocation = "/home/worble/Projects/nixos/devices/tuxedo";
|
|
helix.fullInstall = true;
|
|
mpv.high-quality = true;
|
|
|
|
home.username = "worble";
|
|
home.homeDirectory = "/home/worble";
|
|
|
|
home.stateVersion = "24.05";
|
|
|
|
home.packages = with pkgs;[
|
|
# general
|
|
gimp-with-plugins
|
|
obsidian
|
|
|
|
# cmd line tools
|
|
rclone
|
|
inotify-tools
|
|
libnotify
|
|
ffmpeg-full
|
|
|
|
# comms
|
|
# 25.11 move to stable
|
|
inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".teams-for-linux
|
|
teamspeak6-client
|
|
|
|
# media
|
|
jellyfin-media-player
|
|
haruna
|
|
|
|
# misc
|
|
# TODO: uncomment when ecdsa is updated
|
|
# https://github.com/NixOS/nixpkgs/pull/456881
|
|
# electrum
|
|
dbeaver-bin
|
|
ruffle
|
|
popsicle
|
|
mkvtoolnix
|
|
|
|
# for headset tune
|
|
headsetcontrol
|
|
];
|
|
|
|
# Let Home Manager install and manage itself.
|
|
programs = {
|
|
firefox = {
|
|
profiles.work = (import ../../home-manager/firefox/firefox-profile.nix { tablet = config.firefox.tablet; }) // {
|
|
id = 1;
|
|
name = "work";
|
|
isDefault = false;
|
|
settings = {
|
|
# allow fonts
|
|
"browser.display.use_document_fonts" = 1;
|
|
# home page
|
|
"browser.startup.homepage" = "https://outlook.office.com|https://teams.microsoft.com/v2|https://dev.azure.com/binhsps/Connect/_boards/board/t/Development%20Team/Stories";
|
|
};
|
|
};
|
|
};
|
|
|
|
mpv = {
|
|
config = {
|
|
screenshot-directory = "/mnt/HDD2/Pictures/";
|
|
};
|
|
};
|
|
};
|
|
|
|
systemd.user = {
|
|
services = {
|
|
rclone-media = {
|
|
Unit = {
|
|
Description = "rclone-media /mnt/HDD2/Videos/";
|
|
After = [ "network.target" "mnt-HDD2.mount" ];
|
|
# Maybe? https://unix.stackexchange.com/questions/281650/systemd-unit-requiresmountsfor-vs-conditionpathisdirectory
|
|
# RequiresMountsFor = "/mnt/HDD2/Videos/";
|
|
};
|
|
|
|
Install = {
|
|
WantedBy = [ "default.target" ];
|
|
};
|
|
|
|
Service = {
|
|
RestartSec = 10;
|
|
Restart = "on-failure";
|
|
Type = "exec";
|
|
ExecStart = "${pkgs.writeShellApplication {
|
|
name = "rclone-media";
|
|
runtimeInputs = [ pkgs.inotify-tools pkgs.libnotify pkgs.rclone ];
|
|
text = ''
|
|
function rclonecopy {
|
|
file=$1
|
|
changed_rel=''${file#"/mnt/HDD2/Videos"}
|
|
notify-send -a "rclone-media" "rclone for $file triggered"
|
|
if rclone copyto "$file" media:"media-7gM2gcrxRjXqfj$changed_rel" ; then
|
|
notify-send -a "rclone-media" "rclone complete for $file"
|
|
else
|
|
notify-send -u critical -a "rclone-media" "rclone failed for $file"
|
|
fi
|
|
}
|
|
|
|
inotifywait -mr \
|
|
--format '%w%f' \
|
|
-e close_write \
|
|
/mnt/HDD2/Videos/ |
|
|
while read -r file; do
|
|
rclonecopy "$file"
|
|
done
|
|
'';
|
|
}}/bin/rclone-media";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|