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

109 lines
2.3 KiB
Nix
Raw Normal View History

2022-08-11 19:00:49 +00:00
args@{ pkgs, config, lib, ... }:
2021-12-06 22:35:29 +00:00
2022-08-09 16:30:54 +00:00
let
secret = import ../../secret/hosts/Styx.nix;
in
2021-12-06 22:35:29 +00:00
{
imports = [
2022-07-29 18:13:31 +00:00
../programs/fish.nix
../programs/starship.nix
../programs/direnv.nix
../programs/kitty.nix
2021-12-06 22:35:29 +00:00
2022-07-29 18:13:31 +00:00
../programs/nvim
2021-12-06 22:35:29 +00:00
2022-07-29 18:13:31 +00:00
../programs/git.nix
2021-12-06 22:35:29 +00:00
2022-07-29 18:13:31 +00:00
../programs/bat.nix
2021-12-06 22:35:29 +00:00
2022-08-09 16:30:54 +00:00
(import ../programs/custom-nix-cache.nix (args // { inherit secret; }))
2022-07-29 18:13:31 +00:00
../programs/fzf.nix
2022-06-13 14:57:21 +00:00
2022-07-29 18:13:31 +00:00
../programs/jq.nix
2021-12-06 22:35:29 +00:00
2022-07-29 18:13:31 +00:00
../programs/texlive.nix
../programs/pandoc.nix
2022-07-15 13:07:52 +00:00
2022-07-29 18:13:31 +00:00
../programs/podman.nix
2022-06-27 19:38:03 +00:00
2022-07-29 18:13:31 +00:00
../programs/scripts.nix
2022-01-05 09:52:59 +00:00
2022-08-08 21:43:47 +00:00
../programs/ssh/Styx.nix
2022-01-10 21:41:52 +00:00
2022-08-01 10:24:30 +00:00
../programs/streamlink.nix
2022-07-29 18:13:31 +00:00
../programs/yt-dlp.nix
2021-12-06 22:35:29 +00:00
];
home = {
2022-07-31 18:33:19 +00:00
stateVersion = "22.11";
2022-02-03 22:35:52 +00:00
2021-12-06 22:35:29 +00:00
packages = with pkgs; [
2022-03-19 21:54:55 +00:00
agilebits-op
2021-12-06 22:35:29 +00:00
aria2
arp-scan
cachix
2022-01-31 23:07:13 +00:00
curlFull
2022-02-14 14:22:49 +00:00
dasel
2021-12-06 22:35:29 +00:00
exa
fd
ffmpeg
gallery-dl
2022-01-28 21:45:50 +00:00
glow
2021-12-06 22:35:29 +00:00
hexyl
hyperfine
2022-02-12 22:13:47 +00:00
lnav
2022-06-18 23:39:54 +00:00
mtr
2022-04-20 20:47:01 +00:00
nix-prefetch
2021-12-06 22:35:29 +00:00
parallel
2022-06-12 21:06:57 +00:00
q
2021-12-06 22:35:29 +00:00
ripgrep
2022-04-27 20:16:44 +00:00
socat
2021-12-06 22:35:29 +00:00
tokei
2022-06-25 18:27:42 +00:00
viddy
2021-12-12 23:01:54 +00:00
wget
xxHash
2021-12-28 18:48:27 +00:00
xz
2021-12-06 22:35:29 +00:00
];
};
programs = {
zoxide.enable = true;
};
2022-08-11 19:00:49 +00: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 19:00:49 +00:00
for appFile in ${apps}/Applications/*; do
appFileChecksum="$(find "$appFile/Contents/MacOS" -type f -exec md5 -q {} \; | md5 -q)"
2022-08-11 19:00:49 +00: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 19:00:49 +00:00
done
'';
2021-12-06 22:35:29 +00:00
}