♻️ refactor home-manager / dotfiles to use chezmoi
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./walkah.nix ];
|
||||
imports = [ ./walkah ];
|
||||
}
|
||||
|
@ -1,18 +1,23 @@
|
||||
{ pkgs, dotfiles, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.walkah = {
|
||||
isNormalUser = true;
|
||||
home = if pkgs.stdenv.isDarwin then "/Users/walkah" else "/home/walkah";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [ "wheel" "docker" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM8YMax7PGIrcPNIHkpuNRFgn3HJK6Wepm+ycZWO6jfR walkah@walkah-ipadpro11"
|
||||
];
|
||||
} // lib.optionalAttrs pkgs.stdenv.isLinux {
|
||||
extraGroups = [ "wheel" "docker" ];
|
||||
group = "walkah";
|
||||
isNormalUser = true;
|
||||
};
|
||||
users.groups.walkah = { };
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.walkah = import "${dotfiles}/home.nix";
|
||||
users.walkah = import ./home.nix;
|
||||
};
|
||||
}
|
22
nix/users/walkah/home.nix
Normal file
22
nix/users/walkah/home.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ lib, pkgs, ... }: {
|
||||
home = {
|
||||
username = "walkah";
|
||||
# homeDirectory = if pkgs.stdenv.isDarwin then "/Users/walkah" else "/home/walkah";
|
||||
|
||||
packages = with pkgs; [
|
||||
chezmoi
|
||||
direnv
|
||||
eza
|
||||
fzf
|
||||
git
|
||||
starship
|
||||
tmux
|
||||
];
|
||||
|
||||
activation.chezmoi = lib.hm.dag.entryAfter [ "installPackages" ] ''
|
||||
$DRY_RUN_CMD ${pkgs.chezmoi}/bin/chezmoi init --apply walkah/dotfiles
|
||||
'';
|
||||
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user