brian/profiles #1
34
flake.nix
34
flake.nix
@@ -8,19 +8,29 @@
|
|||||||
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
|
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 {
|
darwinConfigurations."Brians-MacBook-Air" = nix-darwin.lib.darwinSystem {
|
||||||
modules = [
|
personal = mkDarwin { profile = "personal"; user = "briannelson"; };
|
||||||
./configuration.nix
|
work = mkDarwin { profile = "work"; user = "briannelson"; };
|
||||||
nix-homebrew.darwinModules.nix-homebrew
|
|
||||||
{
|
|
||||||
nix-homebrew = {
|
|
||||||
enable = true;
|
|
||||||
enableRosetta = true;
|
|
||||||
user = "briannelson";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
{ pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./cli-tools.nix
|
./cli-tools.nix
|
||||||
./mac-settings.nix
|
./mac-settings.nix
|
||||||
./pkg-installs.nix
|
./pkg-installs.nix
|
||||||
./archive-installs.nix
|
]
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||||
|
|
||||||
nix.settings.experimental-features = "nix-command flakes";
|
nix.settings.experimental-features = "nix-command flakes";
|
||||||
@@ -18,13 +17,8 @@
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
exif
|
exif
|
||||||
exiftool
|
exiftool
|
||||||
ffmpeg
|
|
||||||
flac
|
|
||||||
git
|
git
|
||||||
helix
|
helix
|
||||||
librewolf
|
|
||||||
tea
|
|
||||||
yt-dlp
|
|
||||||
];
|
];
|
||||||
|
|
||||||
homebrew = {
|
homebrew = {
|
||||||
@@ -38,22 +32,15 @@
|
|||||||
"bun"
|
"bun"
|
||||||
"defaultbrowser"
|
"defaultbrowser"
|
||||||
"harper"
|
"harper"
|
||||||
"nicotine-plus"
|
|
||||||
"rust"
|
"rust"
|
||||||
"ykman"
|
"ykman"
|
||||||
];
|
];
|
||||||
|
|
||||||
casks = [
|
casks = [
|
||||||
"bitwarden"
|
"bitwarden"
|
||||||
"cap"
|
|
||||||
"discord"
|
|
||||||
"docker-desktop"
|
|
||||||
"harper-desktop"
|
"harper-desktop"
|
||||||
"libreoffice"
|
|
||||||
"nextcloud"
|
"nextcloud"
|
||||||
"obsidian"
|
"obsidian"
|
||||||
"protonvpn"
|
|
||||||
"rustdesk"
|
|
||||||
"signal"
|
"signal"
|
||||||
"task-manager-tmog"
|
"task-manager-tmog"
|
||||||
"twingate"
|
"twingate"
|
||||||
@@ -62,4 +49,4 @@
|
|||||||
"firefox"
|
"firefox"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
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 = {
|
environment.shellAliases = {
|
||||||
yt = "yt-dlp";
|
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 = ''
|
environment.etc."yt-dlp.conf".text = ''
|
||||||
-o /Users/briannelson/Downloads/yt-dlp/%(title)s.%(ext)s
|
-o /Users/briannelson/Downloads/yt-dlp/%(title)s.%(ext)s
|
||||||
--no-mtime
|
--no-mtime
|
||||||
@@ -33,4 +20,4 @@
|
|||||||
sudo -u briannelson /opt/homebrew/bin/defaultbrowser librewolf || echo "could not set deffault browser, skipping"
|
sudo -u briannelson /opt/homebrew/bin/defaultbrowser librewolf || echo "could not set deffault browser, skipping"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
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