update
This commit is contained in:
@@ -6,29 +6,34 @@
|
||||
enable = true;
|
||||
onActivation.cleanup = "uninstall";
|
||||
|
||||
taps = [];
|
||||
brews = [
|
||||
"cowsay"
|
||||
"argoproj/homebrew-tap/kubectl-argo-rollouts"
|
||||
"gh"
|
||||
"git"
|
||||
"k9s"
|
||||
"helm"
|
||||
"podman"
|
||||
"podman-compose"
|
||||
"k9s"
|
||||
"ansible"
|
||||
];
|
||||
casks = [
|
||||
"1password"
|
||||
"podman-desktop"
|
||||
"cursor"
|
||||
"elgato-wave-link"
|
||||
"ghostty"
|
||||
"joplin"
|
||||
"localsend"
|
||||
"logi-options+"
|
||||
"orbstack"
|
||||
"teleport-connect"
|
||||
"utm"
|
||||
"localsend"
|
||||
"joplin"
|
||||
"ghostty"
|
||||
"vivaldi"
|
||||
];
|
||||
masApps = {
|
||||
"1Password for Safari" = 1569813296;
|
||||
"pairvpn" = 1347012179;
|
||||
"tailscale" = 1475387142;
|
||||
"Windows App" = 1295203466;
|
||||
"wireguard" = 1451685025;
|
||||
"wipr" = 1320666476;
|
||||
"tailscale" = 1475387142;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,22 +2,6 @@
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
_1password-cli
|
||||
awscli
|
||||
azure-cli
|
||||
brave
|
||||
discord
|
||||
go
|
||||
google-cloud-sdk
|
||||
kubectl
|
||||
krew
|
||||
lens
|
||||
slack
|
||||
spotify
|
||||
starship
|
||||
teleport
|
||||
tenv
|
||||
vim
|
||||
vscode
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
{
|
||||
# Example: Tailscale, other system services
|
||||
services.nix-daemon.enable = true;
|
||||
# services.nix-daemon.enable = true;
|
||||
# services.tailscale.enable = false;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
# Enable TouchID for PAM auth: you could also place security/pam or other service configs here:
|
||||
security.pam.enableSudoTouchIdAuth = true;
|
||||
security.pam.services.sudo_local.touchIdAuth = true;
|
||||
|
||||
system.defaults.alf = {
|
||||
allowsignedenabled = 1; # Allows any signed Application to accept incoming requests. Default is true. 0 = disabled 1 = enabled
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ config, pkgs, lib, username, ... }:
|
||||
let
|
||||
homeDirectory = "/Users/${username}";
|
||||
in
|
||||
{
|
||||
# If you also want to do e.g. Dock preferences from the same user-level file:
|
||||
system.defaults.dock = {
|
||||
autohide = true;
|
||||
orientation = "bottom";
|
||||
persistent-apps = [
|
||||
/Applications/Safari.app
|
||||
/Applications/Ghostty.app
|
||||
"/${pkgs.vscode}/Applications/Visual Studio Code.app" # Use the nixpkgs path to the app for apps installed via nix. This will automatically use the latest nix store path.
|
||||
"/Applications/Zen Browser.app"
|
||||
"/Applications/Vivaldi.app"
|
||||
"/Applications/Ghostty.app"
|
||||
"/Applications/Cursor.app"
|
||||
# Use the nixpkgs path to the app for apps installed via nix. This will automatically use the latest nix store path.
|
||||
"/${pkgs.lens}/Applications/Lens.app"
|
||||
"/${pkgs.slack}/Applications/Slack.app"
|
||||
"/${pkgs.discord}/Applications/Discord.app"
|
||||
@@ -16,16 +21,16 @@
|
||||
# Add your persistent apps here
|
||||
];
|
||||
persistent-others = [
|
||||
"~/code"
|
||||
"~/Downloads"
|
||||
"${homeDirectory}/code"
|
||||
"${homeDirectory}/Downloads"
|
||||
"${homeDirectory}/Applications/Home Manager Apps"
|
||||
# Add your persistent others here
|
||||
];
|
||||
show-recents = false;
|
||||
tilesize = 36; # Set the icon size on the dock; default is 64
|
||||
};
|
||||
|
||||
|
||||
system.defaults.NSGlobalDomain = {
|
||||
system.defaults.NSGlobalDomain = {
|
||||
AppleInterfaceStyle = "Dark"; # "Dark" or "Light" - Darkmode all the things
|
||||
# Add more NSGlobalDomain settings here
|
||||
};
|
||||
@@ -34,5 +39,5 @@ system.defaults.NSGlobalDomain = {
|
||||
GuestEnabled = false; # Disable guest account
|
||||
LoginwindowText = "Super Awesome Mac"; # Set login window text
|
||||
# Add more loginwindow settings here
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
};
|
||||
|
||||
system.keyboard = {
|
||||
swapLeftCtrlAndFn = true; # Swap left control and function keys
|
||||
swapLeftCtrlAndFn = false; # Swap left control and function keys
|
||||
enableKeyMapping = true; # Enable key mapping
|
||||
# Set up your keyboard preferences here
|
||||
};
|
||||
|
||||
28
modules/home/stephen/default.nix
Normal file
28
modules/home/stephen/default.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./terminal/default.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
_1password-cli
|
||||
awscli2
|
||||
azure-cli
|
||||
brave
|
||||
discord
|
||||
go
|
||||
google-cloud-sdk
|
||||
kubectl
|
||||
krew
|
||||
lens
|
||||
ollama
|
||||
slack
|
||||
spotify
|
||||
teleport
|
||||
tenv
|
||||
vim
|
||||
vscode
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,148 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Some user-level dotfiles
|
||||
home.file = {
|
||||
".ssh/config".text = ''
|
||||
Host *
|
||||
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||
'';
|
||||
|
||||
".gitconfig".text = ''
|
||||
[user]
|
||||
name = swaphb
|
||||
email = s@swaphb.com
|
||||
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJx0WMlfx+AwcROXFO+/all/WkLvBKpEkjwRY15tjSiB
|
||||
|
||||
[gpg]
|
||||
format = ssh
|
||||
|
||||
[gpg "ssh"]
|
||||
program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
|
||||
|
||||
[commit]
|
||||
gpgSign = true
|
||||
'';
|
||||
|
||||
".config/starship.toml".text = ''
|
||||
add_newline = false
|
||||
scan_timeout = 10
|
||||
format = "$all"
|
||||
[character]
|
||||
success_symbol = "[>](bold green)"
|
||||
error_symbol = "[x](bold red)"
|
||||
vimcmd_symbol = "[<](bold green)"
|
||||
[git_commit]
|
||||
tag_symbol = " tag "
|
||||
[git_status]
|
||||
ahead = ">"
|
||||
behind = "<"
|
||||
diverged = "<>"
|
||||
renamed = "r"
|
||||
deleted = "x"
|
||||
[cmd_duration]
|
||||
min_time = 500
|
||||
format = "took [$duration](bold yellow)"
|
||||
[aws]
|
||||
symbol = "aws "
|
||||
[azure]
|
||||
symbol = "az "
|
||||
[bun]
|
||||
symbol = "bun "
|
||||
[cmake]
|
||||
symbol = "cmake "
|
||||
[deno]
|
||||
symbol = "deno "
|
||||
[directory]
|
||||
read_only = " ro"
|
||||
[docker_context]
|
||||
symbol = "docker "
|
||||
[git_branch]
|
||||
symbol = "git "
|
||||
[golang]
|
||||
symbol = "go "
|
||||
[hostname]
|
||||
ssh_only = false
|
||||
format = " on [$hostname](bold #FFA500)\n"
|
||||
disabled = false
|
||||
[lua]
|
||||
symbol = "lua "
|
||||
[nodejs]
|
||||
symbol = "nodejs "
|
||||
[memory_usage]
|
||||
symbol = "memory "
|
||||
[nim]
|
||||
symbol = "nim "
|
||||
[nix_shell]
|
||||
symbol = "nix "
|
||||
[os.symbols]
|
||||
Alpaquita = "alq "
|
||||
Alpine = "alp "
|
||||
Amazon = "amz "
|
||||
Android = "andr "
|
||||
Arch = "rch "
|
||||
Artix = "atx "
|
||||
CentOS = "cent "
|
||||
Debian = "deb "
|
||||
DragonFly = "dfbsd "
|
||||
Emscripten = "emsc "
|
||||
EndeavourOS = "ndev "
|
||||
Fedora = "fed "
|
||||
FreeBSD = "fbsd "
|
||||
Garuda = "garu "
|
||||
Gentoo = "gent "
|
||||
HardenedBSD = "hbsd "
|
||||
Illumos = "lum "
|
||||
Linux = "lnx "
|
||||
Mabox = "mbox "
|
||||
Macos = "mac "
|
||||
Manjaro = "mjo "
|
||||
Mariner = "mrn "
|
||||
MidnightBSD = "mid "
|
||||
Mint = "mint "
|
||||
NetBSD = "nbsd "
|
||||
NixOS = "nix "
|
||||
OpenBSD = "obsd "
|
||||
OpenCloudOS = "ocos "
|
||||
openEuler = "oeul "
|
||||
openSUSE = "osuse "
|
||||
OracleLinux = "orac "
|
||||
Pop = "pop "
|
||||
Raspbian = "rasp "
|
||||
Redhat = "rhl "
|
||||
RedHatEnterprise = "rhel "
|
||||
Redox = "redox "
|
||||
Solus = "sol "
|
||||
SUSE = "suse "
|
||||
Ubuntu = "ubnt "
|
||||
Unknown = "unk "
|
||||
Windows = "win "
|
||||
[package]
|
||||
symbol = "pkg "
|
||||
[purescript]
|
||||
symbol = "purs "
|
||||
[python]
|
||||
symbol = "py "
|
||||
[rust]
|
||||
symbol = "rs "
|
||||
[status]
|
||||
symbol = "[x](bold red) "
|
||||
[sudo]
|
||||
symbol = "sudo "
|
||||
[terraform]
|
||||
symbol = "terraform "
|
||||
[username]
|
||||
style_user = "blue bold"
|
||||
style_root = "orange bold"
|
||||
format = "[$user]($style)"
|
||||
disabled = false
|
||||
show_always = true
|
||||
[zig]
|
||||
symbol = "zig "
|
||||
'';
|
||||
|
||||
".zshrc".text = ''
|
||||
eval "$(starship init zsh)"
|
||||
'';
|
||||
};
|
||||
}
|
||||
68
modules/home/stephen/terminal/default.nix
Normal file
68
modules/home/stephen/terminal/default.nix
Normal file
@@ -0,0 +1,68 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
./starship/default.nix
|
||||
];
|
||||
|
||||
# Some user-level dotfiles
|
||||
home.file = {
|
||||
# Configure ssh
|
||||
".ssh/config".text = ''
|
||||
Host *
|
||||
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||
'';
|
||||
|
||||
# Configure git
|
||||
".gitconfig".text = ''
|
||||
[user]
|
||||
name = swaphb
|
||||
email = s@swaphb.com
|
||||
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJx0WMlfx+AwcROXFO+/all/WkLvBKpEkjwRY15tjSiB
|
||||
|
||||
[gpg]
|
||||
format = ssh
|
||||
|
||||
[gpg "ssh"]
|
||||
program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
|
||||
|
||||
[commit]
|
||||
gpgSign = true
|
||||
'';
|
||||
|
||||
# Configure 1password agent.toml
|
||||
".config/1Password/ssh/agent.toml".text = ''
|
||||
# Examples can be found here:
|
||||
# https://developer.1password.com/docs/ssh/agent/config
|
||||
|
||||
[[ssh-keys]]
|
||||
item = "github-auth-key"
|
||||
vault = "Private"
|
||||
|
||||
[[ssh-keys]]
|
||||
item = "github-sign-key"
|
||||
vault = "Private"
|
||||
|
||||
[[ssh-keys]]
|
||||
item = "Github-swaphb"
|
||||
vault = "Private"
|
||||
|
||||
[[ssh-keys]]
|
||||
vault = "Employee"
|
||||
'';
|
||||
|
||||
# Configure zsh
|
||||
".zshrc".text = ''
|
||||
eval "$(starship init zsh)"
|
||||
export PATH="''${KREW_ROOT:-/Users/${config.home.username}/.krew}/bin:$PATH"
|
||||
'';
|
||||
|
||||
# Configure ghostty
|
||||
".config/ghostty/config".text = ''
|
||||
background-opacity = 0.9
|
||||
theme = "dracula"
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
||||
185
modules/home/stephen/terminal/starship/default.nix
Normal file
185
modules/home/stephen/terminal/starship/default.nix
Normal file
@@ -0,0 +1,185 @@
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
scan_timeout = 10;
|
||||
format = "$all";
|
||||
|
||||
character = {
|
||||
success_symbol = "[>](bold green)";
|
||||
error_symbol = "[x](bold red)";
|
||||
vimcmd_symbol = "[<](bold green)";
|
||||
};
|
||||
|
||||
cmd_duration = {
|
||||
min_time = 500;
|
||||
format = "took [$duration](bold yellow)";
|
||||
};
|
||||
|
||||
git_commit = {
|
||||
tag_symbol = " tag ";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
ahead = ">";
|
||||
behind = "<";
|
||||
diverged = "<>";
|
||||
renamed = "r";
|
||||
deleted = "x";
|
||||
};
|
||||
|
||||
aws = {
|
||||
symbol = "aws ";
|
||||
};
|
||||
|
||||
azure = {
|
||||
symbol = "az ";
|
||||
};
|
||||
|
||||
bun = {
|
||||
symbol = "bun ";
|
||||
};
|
||||
|
||||
cmake = {
|
||||
symbol = "cmake ";
|
||||
};
|
||||
|
||||
deno = {
|
||||
symbol = "deno ";
|
||||
};
|
||||
|
||||
directory = {
|
||||
read_only = " ro";
|
||||
};
|
||||
|
||||
docker_context = {
|
||||
symbol = "docker ";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
symbol = "git ";
|
||||
};
|
||||
|
||||
golang = {
|
||||
symbol = "go ";
|
||||
};
|
||||
|
||||
hostname = {
|
||||
ssh_only = false;
|
||||
format = " on [$hostname](bold #FFA500)\n";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
lua = {
|
||||
symbol = "lua ";
|
||||
};
|
||||
|
||||
nodejs = {
|
||||
symbol = "nodejs ";
|
||||
};
|
||||
|
||||
memory_usage = {
|
||||
symbol = "memory ";
|
||||
};
|
||||
|
||||
nim = {
|
||||
symbol = "nim ";
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
symbol = "nix ";
|
||||
};
|
||||
|
||||
os = {
|
||||
format = "[$symbol]($style) "; # Display the OS symbol
|
||||
disabled = false; # Enable the OS module
|
||||
style = "bold green"; # Style for the OS symbol
|
||||
};
|
||||
|
||||
os.symbols = {
|
||||
Alpaquita = "alq ";
|
||||
Alpine = "alp ";
|
||||
Amazon = "amz ";
|
||||
Android = "andr ";
|
||||
Arch = "rch ";
|
||||
Artix = "atx ";
|
||||
CentOS = "cent ";
|
||||
Debian = "deb ";
|
||||
DragonFly = "dfbsd ";
|
||||
Emscripten = "emsc ";
|
||||
EndeavourOS = "ndev ";
|
||||
Fedora = "fed ";
|
||||
FreeBSD = "fbsd ";
|
||||
Garuda = "garu ";
|
||||
Gentoo = "gent ";
|
||||
HardenedBSD = "hbsd ";
|
||||
Illumos = "lum ";
|
||||
Linux = "lnx ";
|
||||
Mabox = "mbox ";
|
||||
Macos = " ";
|
||||
Manjaro = "mjo ";
|
||||
Mariner = "mrn ";
|
||||
MidnightBSD = "mid ";
|
||||
Mint = "mint ";
|
||||
NetBSD = "nbsd ";
|
||||
NixOS = "nix ";
|
||||
OpenBSD = "obsd ";
|
||||
OpenCloudOS = "ocos ";
|
||||
openEuler = "oeul ";
|
||||
openSUSE = "osuse ";
|
||||
OracleLinux = "orac ";
|
||||
Pop = "pop ";
|
||||
Raspbian = "rasp ";
|
||||
Redhat = "rhl ";
|
||||
RedHatEnterprise = "rhel ";
|
||||
Redox = "redox ";
|
||||
Solus = "sol ";
|
||||
SUSE = "suse ";
|
||||
Ubuntu = "ubnt ";
|
||||
Unknown = "unk ";
|
||||
Windows = "win ";
|
||||
};
|
||||
|
||||
package = {
|
||||
symbol = "pkg ";
|
||||
};
|
||||
|
||||
purescript = {
|
||||
symbol = "purs ";
|
||||
};
|
||||
|
||||
python = {
|
||||
symbol = "py ";
|
||||
};
|
||||
|
||||
rust = {
|
||||
symbol = "rs ";
|
||||
};
|
||||
|
||||
status = {
|
||||
symbol = "[x](bold red) ";
|
||||
};
|
||||
|
||||
sudo = {
|
||||
symbol = "sudo ";
|
||||
};
|
||||
|
||||
terraform = {
|
||||
symbol = "terraform ";
|
||||
};
|
||||
|
||||
username = {
|
||||
style_user = "blue bold";
|
||||
style_root = "orange bold";
|
||||
format = "[$user]($style)";
|
||||
disabled = false;
|
||||
show_always = true;
|
||||
};
|
||||
|
||||
zig = {
|
||||
symbol = "zig ";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ config, pkgs, lib, username, ... }:
|
||||
|
||||
{
|
||||
home.file.".gitconfig".text = ''
|
||||
@@ -10,4 +10,15 @@
|
||||
home.file.".zshrc".text = ''
|
||||
# userA's custom zsh config
|
||||
'';
|
||||
}
|
||||
|
||||
imports = [
|
||||
# User B's imports
|
||||
];
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
# User B's packages
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user