brian/profiles #1

Merged
brian merged 5 commits from brian/profiles into main 2026-11-09 18:16:34 -05:00
13 changed files with 116 additions and 44 deletions
Showing only changes of commit b3f749f8bf - Show all commits

View File

@@ -8,10 +8,14 @@
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
};
outputs = inputs@{ self, nix-darwin, nixpkgs, nix-homebrew, ... }: {
darwinConfigurations."Brians-MacBook-Air" = nix-darwin.lib.darwinSystem {
outputs = inputs@{ self, nix-darwin, nixpkgs, nix-homebrew, ... }:
let
mkDarwin = { profile, user, system ? "aarch-64-dawin" }:
nix-darwin.lib.darwinSystem {
specialArgs = { inherit user system; };
modules = [
./configuration.nix
./modules
./profiles/${profile}
nix-homebrew.darwinModules.nix-homebrew
{
nix-homebrew = {
@@ -22,5 +26,11 @@
}
];
};
in
{
darwinConfigurations."Brians-MacBook-Air" = nix-darwin.lib.darwinSystem {
personal = mkDarwin { profile = "personal"; user = "briannelson"; };
work = mkDarwin { profile = "work"; user = "briannelson"; };
};
};
}

View File

@@ -1,12 +1,11 @@
{ pkgs, ... }:
{ ... }:
{
imports = [
./cli-tools.nix
./mac-settings.nix
./pkg-installs.nix
./archive-installs.nix
];
]
nixpkgs.hostPlatform = "aarch64-darwin";
@@ -18,13 +17,8 @@
environment.systemPackages = with pkgs; [
exif
exiftool
ffmpeg
flac
git
helix
librewolf
tea
yt-dlp
];
homebrew = {
@@ -38,22 +32,15 @@
"bun"
"defaultbrowser"
"harper"
"nicotine-plus"
"rust"
"ykman"
];
casks = [
"bitwarden"
"cap"
"discord"
"docker-desktop"
"harper-desktop"
"libreoffice"
"nextcloud"
"obsidian"
"protonvpn"
"rustdesk"
"signal"
"task-manager-tmog"
"twingate"

19
modules/cli-tools.nix Normal file
View File

@@ -0,0 +1,19 @@
{ ... }:
{
environment.shellAliases = {
ll = "ls -la";
};
environment.etc."gitconfig".text = ''
[user]
name = Brian Nelson
email = brian@briannelson.dev
[init]
defaultBranch = main
[credential]
helper = osxkeychain
'';
environment.variables.GIT_CONFIG_SYSTEM = "/etc/gitconfig";
}

10
modules/default.nix Normal file
View File

@@ -0,0 +1,10 @@
{ ... }:
{
imports = [
./base.nix
./cli-tools.nix
./mac-settings.nix
./pkg-installs.nix
];
}

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

@@ -1,23 +1,10 @@
{ pkgs, ... }:
{ ... }:
{
environment.shellAliases = {
yt = "yt-dlp";
ll = "ls -la";
};
environment.etc."gitconfig".text = ''
[user]
name = Brian Nelson
email = brian@briannelson.dev
[init]
defaultBranch = main
[credential]
helper = osxkeychain
'';
environment.variables.GIT_CONFIG_SYSTEM = "/etc/gitconfig";
environment.etc."yt-dlp.conf".text = ''
-o /Users/briannelson/Downloads/yt-dlp/%(title)s.%(ext)s
--no-mtime

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
]
}