mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-05-18 18:36:05 -07:00
optionally apply chezmoi dots with home-manager
This commit is contained in:
parent
db02ef369c
commit
bf6de61404
@ -35,6 +35,10 @@
|
|||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
kitty.enable = true;
|
kitty.enable = true;
|
||||||
|
chezmoi = {
|
||||||
|
enable = true;
|
||||||
|
apply = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
samba-client.enable = true;
|
samba-client.enable = true;
|
||||||
|
@ -54,6 +54,10 @@
|
|||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
kitty.enable = true;
|
kitty.enable = true;
|
||||||
|
chezmoi = {
|
||||||
|
enable = true;
|
||||||
|
apply = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
peripherals.enable = true;
|
peripherals.enable = true;
|
||||||
|
@ -37,6 +37,10 @@
|
|||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
kitty.enable = true;
|
kitty.enable = true;
|
||||||
|
chezmoi = {
|
||||||
|
enable = true;
|
||||||
|
apply = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
peripherals.enable = true;
|
peripherals.enable = true;
|
||||||
|
@ -96,6 +96,12 @@
|
|||||||
devel = {
|
devel = {
|
||||||
tooling.enable = true;
|
tooling.enable = true;
|
||||||
};
|
};
|
||||||
|
programs = {
|
||||||
|
chezmoi = {
|
||||||
|
enable = true;
|
||||||
|
apply = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
services = {
|
services = {
|
||||||
jellyfin.enable = true;
|
jellyfin.enable = true;
|
||||||
};
|
};
|
||||||
|
@ -50,6 +50,12 @@ in
|
|||||||
python.enable = true;
|
python.enable = true;
|
||||||
tooling.enable = true;
|
tooling.enable = true;
|
||||||
};
|
};
|
||||||
|
programs = {
|
||||||
|
chezmoi = {
|
||||||
|
enable = true;
|
||||||
|
apply = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
system = {
|
system = {
|
||||||
ssh.enable = true;
|
ssh.enable = true;
|
||||||
terminal.enable = true;
|
terminal.enable = true;
|
||||||
|
25
provision/modules/programs/chezmoi.nix
Normal file
25
provision/modules/programs/chezmoi.nix
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{ config, lib, pkgs, user, home-manager, ... }:
|
||||||
|
|
||||||
|
let cfg = config.modules.programs.chezmoi;
|
||||||
|
in {
|
||||||
|
options.modules.programs.chezmoi = with lib; {
|
||||||
|
enable = lib.mkEnableOption "chezmoi";
|
||||||
|
apply = lib.mkOption {
|
||||||
|
type = with types; bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
chezmoi # Manages your dotfiles across multiple machines, ensuring consistency and version control
|
||||||
|
];
|
||||||
|
|
||||||
|
# Optionally apply chezmoi dotfiles with home-manager activation
|
||||||
|
home-manager.users.${user} = lib.mkIf cfg.apply {
|
||||||
|
home.activation.chezmoi = home-manager.lib.hm.dag.entryAfter [ "installPackages" ] ''
|
||||||
|
run ${pkgs.chezmoi}/bin/chezmoi apply --force
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [ ./kitty.nix ];
|
imports = [ ./chezmoi.nix ./kitty.nix ];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user