brian/profiles #1
34
flake.nix
34
flake.nix
@@ -8,19 +8,29 @@
|
||||
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nix-darwin, nixpkgs, nix-homebrew, ... }: {
|
||||
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 = [
|
||||
./modules
|
||||
./profiles/${profile}
|
||||
nix-homebrew.darwinModules.nix-homebrew
|
||||
{
|
||||
nix-homebrew = {
|
||||
enable = true;
|
||||
enableRosetta = true;
|
||||
user = "briannelson";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
darwinConfigurations."Brians-MacBook-Air" = nix-darwin.lib.darwinSystem {
|
||||
modules = [
|
||||
./configuration.nix
|
||||
nix-homebrew.darwinModules.nix-homebrew
|
||||
{
|
||||
nix-homebrew = {
|
||||
enable = true;
|
||||
enableRosetta = true;
|
||||
user = "briannelson";
|
||||
};
|
||||
}
|
||||
];
|
||||
personal = mkDarwin { profile = "personal"; user = "briannelson"; };
|
||||
work = mkDarwin { profile = "work"; user = "briannelson"; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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
19
modules/cli-tools.nix
Normal 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
10
modules/default.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./base.nix
|
||||
./cli-tools.nix
|
||||
./mac-settings.nix
|
||||
./pkg-installs.nix
|
||||
];
|
||||
}
|
||||
24
profiles/personal/apps.nix
Normal file
24
profiles/personal/apps.nix
Normal 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"
|
||||
]
|
||||
}
|
||||
@@ -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
|
||||
9
profiles/personal/default.nix
Normal file
9
profiles/personal/default.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./cli-tools.nix
|
||||
./apps.nix
|
||||
./archive-installs.nix
|
||||
]
|
||||
}
|
||||
9
profiles/work/apps.nix
Normal file
9
profiles/work/apps.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [];
|
||||
|
||||
homebrew.brews = [];
|
||||
|
||||
homebrew.casks = [];
|
||||
}
|
||||
9
profiles/work/cli-tools.nix
Normal file
9
profiles/work/cli-tools.nix
Normal 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
|
||||
'';
|
||||
}
|
||||
8
profiles/work/default.nix
Normal file
8
profiles/work/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./apps.nix
|
||||
./cli-tools.nix
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user