Update mac HM
This commit is contained in:
parent
ba1ccc492d
commit
53d64905ea
@ -39,7 +39,7 @@ function printUser {
|
||||
bimbobee)
|
||||
echo -n "%{$fg_bold[blue]%}"
|
||||
;;
|
||||
lcech-mac-veracode)
|
||||
lcech-mac)
|
||||
echo -n "%{$fg[cyan]%}"
|
||||
;;
|
||||
*)
|
||||
@ -61,4 +61,4 @@ function printAwsVault {
|
||||
fi
|
||||
}
|
||||
|
||||
PROMPT='${PR_BOLD_BLACK}%* $(printUser)$(printAwsVault)${PR_CYAN}%~%<< $(git_prompt_info)${PR_BOLD_WHITE}>%{${reset_color}%} '
|
||||
PROMPT='${PR_BOLD_WHITE}%* $(printUser)$(printAwsVault)${PR_CYAN}%~%<< $(git_prompt_info)${PR_BOLD_WHITE}>%{${reset_color}%} '
|
||||
|
||||
@ -7,7 +7,10 @@ let
|
||||
username = "lcech";
|
||||
homedir = "/Users/${username}";
|
||||
|
||||
zshSourceCommon = ../.zsh/common;
|
||||
zshSourceDirs = [
|
||||
../.zsh/common
|
||||
../.zsh/macos
|
||||
];
|
||||
in
|
||||
{
|
||||
# Let Home Manager install and manage itself.
|
||||
@ -21,9 +24,12 @@ in
|
||||
|
||||
home.packages = with pkgs; [
|
||||
awscli2
|
||||
bat
|
||||
k9s
|
||||
keepassxc
|
||||
kubectl
|
||||
nixd
|
||||
watch
|
||||
];
|
||||
|
||||
programs.direnv = {
|
||||
@ -31,13 +37,6 @@ in
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
|
||||
installVimSyntax = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Lukas Cech";
|
||||
@ -65,16 +64,29 @@ in
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
autocd = true;
|
||||
|
||||
shellAliases = {
|
||||
cat = "bat --paging=never";
|
||||
};
|
||||
|
||||
dirHashes = {
|
||||
mac = "${homedir}/.macshare";
|
||||
mac = "${homedir}/storage/.macshare";
|
||||
nix = "${homedir}/.config/nix";
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
for file in ${zshSourceCommon}/*.zsh; do
|
||||
${builtins.concatStringsSep "\n"
|
||||
(builtins.map (dir:
|
||||
''
|
||||
for file in ${dir}/*.zsh; do
|
||||
source "$file"
|
||||
done
|
||||
''
|
||||
) zshSourceDirs)
|
||||
}
|
||||
|
||||
# ${pkgs.keepassxc}
|
||||
autoload -U +X bashcompinit && bashcompinit
|
||||
|
||||
source <(kubectl completion zsh)
|
||||
@ -85,5 +97,6 @@ in
|
||||
home.sessionVariables = {
|
||||
EDITOR = "vim";
|
||||
GO111MODULE = "on";
|
||||
TERMINAL = "ghostty";
|
||||
};
|
||||
}
|
||||
|
||||
94
flake.lock
94
flake.lock
@ -1,6 +1,58 @@
|
||||
{
|
||||
"nodes": {
|
||||
"cl-nix-lite": {
|
||||
"locked": {
|
||||
"lastModified": 1728174978,
|
||||
"narHash": "sha256-Grqqg+xuicANB85j0gNEXxi9SBKY7bzGeTuyi95eGcY=",
|
||||
"owner": "hraban",
|
||||
"repo": "cl-nix-lite",
|
||||
"rev": "31cfe6275c341eb3120a99f4b1c8516c49a29d87",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hraban",
|
||||
"repo": "cl-nix-lite",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1730663653,
|
||||
"narHash": "sha256-kFCUWettiFHDIqxCWWQ9qY8pVh+Lj+XL0Giyy/kdomg=",
|
||||
"owner": "hraban",
|
||||
"repo": "flake-compat",
|
||||
"rev": "e5b16676185cb7548581c852f51ce7f3a49bba5e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hraban",
|
||||
"ref": "fixed-output",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": [
|
||||
"mac-app-util",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "flake-utils",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
@ -35,6 +87,30 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mac-app-util": {
|
||||
"inputs": {
|
||||
"cl-nix-lite": "cl-nix-lite",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732920695,
|
||||
"narHash": "sha256-1fxvJZUznwrmEtYqpPuWi2tPcL9kj6v7p1J7ZZncAPE=",
|
||||
"owner": "hraban",
|
||||
"repo": "mac-app-util",
|
||||
"rev": "548672d0cb661ce11d08ee8bde92b87d2a75c872",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hraban",
|
||||
"repo": "mac-app-util",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@ -57,7 +133,7 @@
|
||||
},
|
||||
"nixgl": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
@ -95,10 +171,26 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"mac-app-util": "mac-app-util",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixgl": "nixgl",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1689347925,
|
||||
"narHash": "sha256-ozenz5bFe1UUqOn7f60HRmgc01BgTGIKZ4Xl+HbocGQ=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-darwin",
|
||||
"rev": "2235d7e6cc29ae99878133c95e9fe5e157661ffb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
39
flake.nix
39
flake.nix
@ -8,11 +8,20 @@
|
||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
mac-app-util.url = "github:hraban/mac-app-util";
|
||||
mac-app-util.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixgl.url = "github:nix-community/nixGL";
|
||||
nixgl.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, nixgl }:
|
||||
outputs = inputs@{
|
||||
self,
|
||||
home-manager,
|
||||
mac-app-util,
|
||||
nix-darwin,
|
||||
nixgl,
|
||||
nixpkgs,
|
||||
}:
|
||||
let
|
||||
darwin-common = { pkgs, ... }:
|
||||
let
|
||||
@ -93,6 +102,16 @@
|
||||
experimental-features = "nix-command flakes";
|
||||
};
|
||||
};
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
onActivation = {
|
||||
autoUpdate = true;
|
||||
# 'zap': uninstalls all formulae(and related files) not listed here.
|
||||
cleanup = "zap";
|
||||
upgrade = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
@ -106,7 +125,7 @@
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
in{
|
||||
in {
|
||||
# init with
|
||||
# nix run home-manager/master -- switch --flake ~/.config/nix
|
||||
# update with
|
||||
@ -126,16 +145,28 @@
|
||||
# nix run nix-darwin -- switch --flake ~/.config/nix
|
||||
# update with
|
||||
# darwin-rebuild switch --flake ~/.config/nix
|
||||
lcech-mac-veracode.system = nix-darwin.lib.darwinSystem {
|
||||
lcech-mac = nix-darwin.lib.darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
modules = [
|
||||
mac-app-util.darwinModules.default
|
||||
darwin-common
|
||||
{
|
||||
# brew install --cask
|
||||
# these need to be updated manually
|
||||
homebrew.casks = [
|
||||
"ghostty"
|
||||
"spotify"
|
||||
];
|
||||
}
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.lcech = import ./devices/lcech-mac-veracode.nix;
|
||||
users.lcech.imports = [
|
||||
mac-app-util.homeManagerModules.default
|
||||
./devices/lcech-mac-veracode.nix
|
||||
];
|
||||
};
|
||||
users.users.lcech.home = "/Users/lcech";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user