Update mac HM
This commit is contained in:
parent
ba1ccc492d
commit
53d64905ea
@ -39,7 +39,7 @@ function printUser {
|
|||||||
bimbobee)
|
bimbobee)
|
||||||
echo -n "%{$fg_bold[blue]%}"
|
echo -n "%{$fg_bold[blue]%}"
|
||||||
;;
|
;;
|
||||||
lcech-mac-veracode)
|
lcech-mac)
|
||||||
echo -n "%{$fg[cyan]%}"
|
echo -n "%{$fg[cyan]%}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -61,4 +61,4 @@ function printAwsVault {
|
|||||||
fi
|
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";
|
username = "lcech";
|
||||||
homedir = "/Users/${username}";
|
homedir = "/Users/${username}";
|
||||||
|
|
||||||
zshSourceCommon = ../.zsh/common;
|
zshSourceDirs = [
|
||||||
|
../.zsh/common
|
||||||
|
../.zsh/macos
|
||||||
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
@ -21,9 +24,12 @@ in
|
|||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
awscli2
|
awscli2
|
||||||
|
bat
|
||||||
k9s
|
k9s
|
||||||
|
keepassxc
|
||||||
kubectl
|
kubectl
|
||||||
nixd
|
nixd
|
||||||
|
watch
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.direnv = {
|
programs.direnv = {
|
||||||
@ -31,13 +37,6 @@ in
|
|||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.ghostty = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
installVimSyntax = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "Lukas Cech";
|
userName = "Lukas Cech";
|
||||||
@ -65,16 +64,29 @@ in
|
|||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
autocd = true;
|
||||||
|
|
||||||
|
shellAliases = {
|
||||||
|
cat = "bat --paging=never";
|
||||||
|
};
|
||||||
|
|
||||||
dirHashes = {
|
dirHashes = {
|
||||||
mac = "${homedir}/.macshare";
|
mac = "${homedir}/storage/.macshare";
|
||||||
nix = "${homedir}/.config/nix";
|
nix = "${homedir}/.config/nix";
|
||||||
};
|
};
|
||||||
|
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
for file in ${zshSourceCommon}/*.zsh; do
|
${builtins.concatStringsSep "\n"
|
||||||
source "$file"
|
(builtins.map (dir:
|
||||||
done
|
''
|
||||||
|
for file in ${dir}/*.zsh; do
|
||||||
|
source "$file"
|
||||||
|
done
|
||||||
|
''
|
||||||
|
) zshSourceDirs)
|
||||||
|
}
|
||||||
|
|
||||||
|
# ${pkgs.keepassxc}
|
||||||
autoload -U +X bashcompinit && bashcompinit
|
autoload -U +X bashcompinit && bashcompinit
|
||||||
|
|
||||||
source <(kubectl completion zsh)
|
source <(kubectl completion zsh)
|
||||||
@ -85,5 +97,6 @@ in
|
|||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "vim";
|
EDITOR = "vim";
|
||||||
GO111MODULE = "on";
|
GO111MODULE = "on";
|
||||||
|
TERMINAL = "ghostty";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
94
flake.lock
94
flake.lock
@ -1,6 +1,58 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"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": {
|
"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": {
|
"locked": {
|
||||||
"lastModified": 1659877975,
|
"lastModified": 1659877975,
|
||||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||||
@ -35,6 +87,30 @@
|
|||||||
"type": "github"
|
"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": {
|
"nix-darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@ -57,7 +133,7 @@
|
|||||||
},
|
},
|
||||||
"nixgl": {
|
"nixgl": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
@ -95,10 +171,26 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"mac-app-util": "mac-app-util",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
"nixgl": "nixgl",
|
"nixgl": "nixgl",
|
||||||
"nixpkgs": "nixpkgs"
|
"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",
|
"root": "root",
|
||||||
|
|||||||
39
flake.nix
39
flake.nix
@ -8,11 +8,20 @@
|
|||||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
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.url = "github:nix-community/nixGL";
|
||||||
nixgl.inputs.nixpkgs.follows = "nixpkgs";
|
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
|
let
|
||||||
darwin-common = { pkgs, ... }:
|
darwin-common = { pkgs, ... }:
|
||||||
let
|
let
|
||||||
@ -93,6 +102,16 @@
|
|||||||
experimental-features = "nix-command flakes";
|
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
|
in
|
||||||
{
|
{
|
||||||
@ -106,7 +125,7 @@
|
|||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in{
|
in {
|
||||||
# init with
|
# init with
|
||||||
# nix run home-manager/master -- switch --flake ~/.config/nix
|
# nix run home-manager/master -- switch --flake ~/.config/nix
|
||||||
# update with
|
# update with
|
||||||
@ -126,16 +145,28 @@
|
|||||||
# nix run nix-darwin -- switch --flake ~/.config/nix
|
# nix run nix-darwin -- switch --flake ~/.config/nix
|
||||||
# update with
|
# update with
|
||||||
# darwin-rebuild switch --flake ~/.config/nix
|
# darwin-rebuild switch --flake ~/.config/nix
|
||||||
lcech-mac-veracode.system = nix-darwin.lib.darwinSystem {
|
lcech-mac = nix-darwin.lib.darwinSystem {
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
modules = [
|
modules = [
|
||||||
|
mac-app-util.darwinModules.default
|
||||||
darwin-common
|
darwin-common
|
||||||
|
{
|
||||||
|
# brew install --cask
|
||||||
|
# these need to be updated manually
|
||||||
|
homebrew.casks = [
|
||||||
|
"ghostty"
|
||||||
|
"spotify"
|
||||||
|
];
|
||||||
|
}
|
||||||
home-manager.darwinModules.home-manager
|
home-manager.darwinModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = 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";
|
users.users.lcech.home = "/Users/lcech";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user