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

107 lines
2.1 KiB
Nix
Raw Normal View History

2023-10-01 15:34:28 +00:00
{ pkgs, lib, config, ... }:
2021-12-06 22:35:29 +00:00
{
imports = [
2023-11-28 16:09:38 +00:00
../config/fonts
2023-06-26 18:41:47 +00:00
2022-07-29 18:13:31 +00:00
../programs/fish.nix
2023-09-09 17:54:02 +00:00
../programs/nushell.nix
2023-02-27 16:51:39 +00:00
../programs/atuin.nix
2022-07-29 18:13:31 +00:00
../programs/direnv.nix
2023-09-09 17:54:02 +00:00
../programs/starship.nix
../programs/zoxide.nix
2022-12-19 21:02:48 +00:00
../programs/wezterm.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-12-20 16:46:51 +00:00
../programs/btop.nix
2023-05-05 14:46:54 +00:00
../programs/gallery-dl.nix
2022-12-25 21:12:54 +00:00
../programs/gpg.nix
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
];
2023-10-01 15:34:28 +00:00
disabledModules = [ "targets/darwin/linkapps.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
arp-scan
2023-03-31 10:05:34 +00:00
curlHTTP3
2022-02-14 14:22:49 +00:00
dasel
2023-06-10 18:48:07 +00:00
dig
2023-03-24 21:17:39 +00:00
exiftool
2021-12-06 22:35:29 +00:00
fd
ffmpeg
2022-01-28 21:45:50 +00:00
glow
2021-12-06 22:35:29 +00:00
hexyl
hyperfine
2023-07-31 08:31:27 +00:00
just
2022-02-12 22:13:47 +00:00
lnav
2022-06-18 23:39:54 +00:00
mtr
2023-07-07 17:57:55 +00:00
nix-tree
2023-01-10 16:28:50 +00:00
nurl
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
2023-10-17 22:01:50 +00:00
ssh-audit
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
];
2023-10-01 15:34:28 +00:00
activation.aliasApplications = lib.mkIf pkgs.stdenv.hostPlatform.isDarwin (
let
apps = pkgs.buildEnv {
name = "home-manager-applications";
paths = config.home.packages;
pathsToLink = "/Applications";
};
lastAppsFile = "${config.xdg.stateHome}/nix/.apps";
in
lib.hm.dag.entryAfter [ "writeBoundary" ] /* bash */ ''
2023-10-01 15:34:28 +00:00
last_apps=$(cat "${lastAppsFile}" 2>/dev/null || echo "")
next_apps=$(readlink -f ${apps}/Applications/* | sort)
if [ "$last_apps" != "$next_apps" ]; then
echo "Apps have changed. Updating macOS aliases..."
apps_path="$HOME/Applications/Home Manager Apps"
$DRY_RUN_CMD mkdir -p "$apps_path"
$DRY_RUN_CMD ${pkgs.fd}/bin/fd \
-t l -d 1 . ${apps}/Applications \
-x $DRY_RUN_CMD "${pkgs.mkalias}/bin/mkalias" \
-L {} "$apps_path/{/}"
[ -z "$DRY_RUN_CMD" ] && echo "$next_apps" > "${lastAppsFile}"
fi
''
);
2021-12-06 22:35:29 +00:00
};
}