brian/profiles #1

Merged
brian merged 5 commits from brian/profiles into main 2026-11-09 18:16:34 -05:00
15 changed files with 200 additions and 115 deletions
Showing only changes of commit 0a9ede2ba8 - Show all commits

42
modules/apps.nix Normal file
View File

@@ -0,0 +1,42 @@
{ ... }:
{
# This file installs these apps on all configurations
pkgInstalls = [
{
name = "cupsadmin";
url = "https://github.com/kfattic/cupsadmin/releases/download/v1.4.1/cupsadmin-1.4.1.pkg";
hash = "sha256-DyIyDYSjAlcU7ivyfldMapIZw5nczEBXfnLicnK6k7Y=";
}
];
archiveApps = [];
environment.systemPackages = with pkgs; [
exif
exiftool
git
helix
];
homebrew.brews = [
"bun"
"defaultbrowser"
"harper"
"rust"
"ykman"
];
homebrew.casks = [
"bitwarden"
"harper-desktop"
"nextcloud"
"obsidian"
"signal"
"task-manager-tmog"
"twingate"
"vlc"
"vscodium"
"firefox"
];
}

View File

@@ -1,17 +1,9 @@
{ pkgs, lib, ... }:
let
cfg = config.archiveApps;
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; };
@@ -38,8 +30,12 @@ let
'';
in
{
optiosn.archiveApps = lib.mkOption {
type = lib.types.typesOf (lib.types.attrsOf lib.types.str);
default = [ ];
description = "Apps distributed as .zip archives to install into /Applications";
}
system.activationScripts.postActivation.text =
lib.concatStringsSep "\n" (
(map appScript apps)
);
lib.concatMapStringsSep "\n" appScript cfg;
}

View File

@@ -8,39 +8,11 @@
system.stateVersion = 6;
system.primaryUser = "briannelson";
environment.systemPackages = with pkgs; [
exif
exiftool
git
helix
];
homebrew = {
enable = true;
onActivation = {
autoUpdate = true;
cleanup = "none";
};
brews = [
"bun"
"defaultbrowser"
"harper"
"rust"
"ykman"
];
casks = [
"bitwarden"
"harper-desktop"
"nextcloud"
"obsidian"
"signal"
"task-manager-tmog"
"twingate"
"vlc"
"vscodium"
"firefox"
];
};
}

View File

@@ -3,8 +3,10 @@
{
imports = [
./base.nix
./apps.nix
./cli-tools.nix
./mac-settings.nix
./pkg-installs.nix
./archive-installs.nix
];
}

View File

@@ -1,15 +1,7 @@
{ pkgs, lib, ... }:
{ pkgs, lib, config, ... }:
let
# Add one entry per program you want to install from a .pkg file
pkgInstalls = [
{
name = "cupsadmin";
url = "https://github.com/kfattic/cupsadmin/releases/download/v1.4.1/cupsadmin-1.4.1.pkg";
hash = "sha256-DyIyDYSjAlcU7ivyfldMapIZw5nczEBXfnLicnK6k7Y=";
}
];
cfg = config.pkgInstalls;
installScript = p:
let
src = pkgs.fetchurl { inherit (p) url hash; };
@@ -28,6 +20,12 @@ let
'';
in
{
options.pkgInstalls = lib.mkOption {
type = lib.types.listOf (lib.types.attrsOf lib.types.str);
default = [ ];'
description = "PKG files to install on activation";
};
system.activationScripts.postActivation.text =
lib.concatMapStringsSep "\n" installScript pkgInstalls;
lib.concatMapStringsSep "\n" installScript cfg;
}

View File

@@ -1,6 +1,15 @@
{ pkgs, ... }:
{
archiveApps = [
{
name = "removemacai-app";
app = "RemoveMacAI.app";
url = "https://github.com/omlahore/RemoveMacAI/releases/download/v1.1.4/RemoveMacAI.zip";
sha256 = "2063d4dc7e0b41b15cebcd9e1b9807b04615b96e3e23db35cbd1196be3c96bee";
}
];
environment.systemPackages = with pkgs; [
ffmpeg
flac