Dotfiles : Load from nix store.
This commit is contained in:
parent
8f551f6213
commit
09e4b21909
|
@ -18,7 +18,7 @@
|
|||
nixosModules.common.imports = [
|
||||
./module/common/Bootloader.nix
|
||||
./module/common/Distrobox.nix
|
||||
./module/common/Dotfile.nix
|
||||
./module/common/Dotfiles.nix
|
||||
./module/common/Firewall.nix
|
||||
./module/common/Kernel.nix
|
||||
./module/common/Locale.nix
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
{ pkgs, ... }: let
|
||||
unit = {
|
||||
description = "Install/update dotfiles on startup.";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
cd ~
|
||||
test -d .git || { ${pkgs.curl}/bin/curl https://git.voronind.com/voronind/linux/raw/branch/main/.Bootstrap.sh | ${pkgs.bash}/bin/bash; }
|
||||
${pkgs.git}/bin/git pull
|
||||
'';
|
||||
};
|
||||
in {
|
||||
systemd.user.services.dotfiles = unit;
|
||||
systemd.services.dotfiles = unit;
|
||||
}
|
17
.config/linux/system/module/common/Dotfiles.nix
Normal file
17
.config/linux/system/module/common/Dotfiles.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, inputs, ... }: let
|
||||
unit = {
|
||||
description = "Install/update dotfiles on startup.";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
cd ~
|
||||
test -d .git || cp -r ${inputs.dotfiles}/{*,.*} .
|
||||
${pkgs.git}/bin/git pull
|
||||
'';
|
||||
};
|
||||
dotsSource = inputs.dotfiles;
|
||||
in {
|
||||
systemd.user.services.dotfiles = unit;
|
||||
systemd.services.dotfiles = unit;
|
||||
environment.etc.dotfiles.source = dotsSource;
|
||||
}
|
Reference in a new issue