1
0
Fork 0
dotfiles/home/hosts/Styx.nix

109 lines
2.3 KiB
Nix
Raw Normal View History

2022-08-11 21:00:49 +02:00
args@{ pkgs, config, lib, ... }:
2021-12-06 23:35:29 +01:00
2022-08-09 18:30:54 +02:00
let
secret = import ../../secret/hosts/Styx.nix;
in
2021-12-06 23:35:29 +01:00
{
imports = [
2022-07-29 20:13:31 +02:00
../programs/fish.nix
../programs/starship.nix
../programs/direnv.nix
../programs/kitty.nix
2021-12-06 23:35:29 +01:00
2022-07-29 20:13:31 +02:00
../programs/nvim
2021-12-06 23:35:29 +01:00
2022-07-29 20:13:31 +02:00
../programs/git.nix
2021-12-06 23:35:29 +01:00
2022-07-29 20:13:31 +02:00
../programs/bat.nix
2021-12-06 23:35:29 +01:00
2022-08-09 18:30:54 +02:00
(import ../programs/custom-nix-cache.nix (args // { inherit secret; }))
2022-07-29 20:13:31 +02:00
../programs/fzf.nix
2022-06-13 16:57:21 +02:00
2022-07-29 20:13:31 +02:00
../programs/jq.nix
2021-12-06 23:35:29 +01:00
2022-07-29 20:13:31 +02:00
../programs/texlive.nix
../programs/pandoc.nix
2022-07-15 15:07:52 +02:00
2022-07-29 20:13:31 +02:00
../programs/podman.nix
2022-06-27 21:38:03 +02:00
2022-07-29 20:13:31 +02:00
../programs/scripts.nix
2022-01-05 10:52:59 +01:00
2022-08-08 23:43:47 +02:00
../programs/ssh/Styx.nix
2022-01-10 22:41:52 +01:00
2022-08-01 12:24:30 +02:00
../programs/streamlink.nix
2022-07-29 20:13:31 +02:00
../programs/yt-dlp.nix
2021-12-06 23:35:29 +01:00
];
home = {
2022-07-31 20:33:19 +02:00
stateVersion = "22.11";
2022-02-03 23:35:52 +01:00
2021-12-06 23:35:29 +01:00
packages = with pkgs; [
2022-03-19 22:54:55 +01:00
agilebits-op
2021-12-06 23:35:29 +01:00
aria2
arp-scan
cachix
2022-02-01 00:07:13 +01:00
curlFull
2022-02-14 15:22:49 +01:00
dasel
2021-12-06 23:35:29 +01:00
exa
fd
ffmpeg
gallery-dl
2022-01-28 22:45:50 +01:00
glow
2021-12-06 23:35:29 +01:00
hexyl
hyperfine
2022-02-12 23:13:47 +01:00
lnav
2022-06-19 01:39:54 +02:00
mtr
2022-04-20 22:47:01 +02:00
nix-prefetch
2021-12-06 23:35:29 +01:00
parallel
2022-06-12 23:06:57 +02:00
q
2021-12-06 23:35:29 +01:00
ripgrep
2022-04-27 22:16:44 +02:00
socat
2021-12-06 23:35:29 +01:00
tokei
2022-06-25 20:27:42 +02:00
viddy
2021-12-13 00:01:54 +01:00
wget
xxHash
2021-12-28 19:48:27 +01:00
xz
2021-12-06 23:35:29 +01:00
];
};
programs = {
zoxide.enable = true;
};
2022-08-11 21:00:49 +02:00
# Source: https://github.com/nix-community/home-manager/issues/1341#issuecomment-1190875080
home.activation.copyApplications =
let
apps = pkgs.buildEnv {
name = "home-manager-applications";
paths = config.home.packages;
pathsToLink = "/Applications";
};
in
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
baseDir="$HOME/Applications/Home Manager Apps"
$DRY_RUN_CMD mkdir -p "$baseDir"
2022-08-11 21:00:49 +02:00
for appFile in ${apps}/Applications/*; do
appFileChecksum="$(find "$appFile/Contents/MacOS" -type f -exec md5 -q {} \; | md5 -q)"
2022-08-11 21:00:49 +02:00
target="$baseDir/$(basename "$appFile")"
if [ -d "$target" ]; then
targetChecksum="$(find "$target/Contents/MacOS" -type f -exec md5 -q {} \; | md5 -q)"
else
targetChecksum="0"
fi
if [ "$appFileChecksum" = "$targetChecksum" ]; then
echo "Application not changed: $(basename "$appFile")"
else
echo -n "Coyping application $(basename "$appFile"): "
$DRY_RUN_CMD rm -rf "$target"
$DRY_RUN_CMD cp ''${VERBOSE_ARG:+-v} -fHRL "$appFile" "$baseDir"
$DRY_RUN_CMD chmod ''${VERBOSE_ARG:+-v} -R +w "$target"
echo 'Done'
fi
2022-08-11 21:00:49 +02:00
done
'';
2021-12-06 23:35:29 +01:00
}