restructed modules for home and work, untested

This commit is contained in:
2026-11-09 10:58:31 -05:00
parent 10bac6ed32
commit b3f749f8bf
13 changed files with 116 additions and 44 deletions

View File

@@ -0,0 +1,24 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
ffmpeg
flac
librewolf
tea
yt-dlp
];
homebrew.brews = [
"nicotine-plus"
];
homebrew.casks = [
"cap"
"discord"
"docker-desktop"
"libreoffice"
"protonvpn"
"rustdesk"
]
}

View File

@@ -0,0 +1,45 @@
{ pkgs, lib, ... }:
let
stampDir = "/usr/local/share/nix-pkg-stamps";
apps = [
{
name = "removemacai-app";
app = "RemoveMacAI.app";
url = "https://github.com/omlahore/RemoveMacAI/releases/download/v1.1.4/RemoveMacAI.zip";
sha256 = "2063d4dc7e0b41b15cebcd9e1b9807b04615b96e3e23db35cbd1196be3c96bee";
}
];
appScript = a:
let
src = pkgs.fetchurl { inherit (a) url sha256; };
in ''
stamp="${stampDir}/${a.name}"
want="${src}"
if [ "$(cat "$stamp" 2>/dev/null)" != "$want" ]; then
echo "installing ${a.name}..."
tmp=$(mktemp -d)
if /usr/bin/unzip -q "$want" -d "$tmp"; then
if [ -d "$tmp/${a.app}" ]; then
rm -rf "/Applications/${a.app}"
/usr/bin/ditto "$tmp/${a.app}" "/Applications/${a.app}"
mkdir -p "${stampDir}"
echo "$want" > "$stamp"
else
echo "${a.name}: ${a.app} not found in zip, skipping"
fi
else
echo "${a.name}: could not unzip, skipping"
fi
rm -rf "$tmp"
fi
'';
in
{
system.activationScripts.postActivation.text =
lib.concatStringsSep "\n" (
(map appScript apps)
);
}

View File

@@ -0,0 +1,23 @@
{ ... }:
{
environment.shellAliases = {
yt = "yt-dlp";
};
environment.etc."yt-dlp.conf".text = ''
-o /Users/briannelson/Downloads/yt-dlp/%(title)s.%(ext)s
--no-mtime
--restrict-filenames
--embed-thumbnail
--embed-metadata
--format "bestvideo[height<=1080]+bestaudio/best[height<=1080]"
--merge-output-format mp4
'';
system.activationScripts.postActivation.text = ''
if [ -x /opt/homebrew/bin/defaultbrowser ]; then
sudo -u briannelson /opt/homebrew/bin/defaultbrowser librewolf || echo "could not set deffault browser, skipping"
fi
'';
}

View File

@@ -0,0 +1,9 @@
{ ... }:
{
imports = [
./cli-tools.nix
./apps.nix
./archive-installs.nix
]
}

9
profiles/work/apps.nix Normal file
View File

@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [];
homebrew.brews = [];
homebrew.casks = [];
}

View File

@@ -0,0 +1,9 @@
{ ... }:
{
system.activationScripts.postActivation.text = ''
if [ -x /opt/homebrew/bin/defaultbrowser ]; then
sudo -u briannelson /opt/homebrew/bin/defaultbrowser firefox || echo "could not set deffault browser, skipping"
fi
'';
}

View File

@@ -0,0 +1,8 @@
{ ... }:
{
imports = [
./apps.nix
./cli-tools.nix
]
}