diff --git a/.config/linux/system/flake.nix b/.config/linux/system/flake.nix index 7ee4ec9..82b007b 100644 --- a/.config/linux/system/flake.nix +++ b/.config/linux/system/flake.nix @@ -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 diff --git a/.config/linux/system/module/common/Dotfile.nix b/.config/linux/system/module/common/Dotfile.nix deleted file mode 100644 index 19b938c..0000000 --- a/.config/linux/system/module/common/Dotfile.nix +++ /dev/null @@ -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; -} diff --git a/.config/linux/system/module/common/Dotfiles.nix b/.config/linux/system/module/common/Dotfiles.nix new file mode 100644 index 0000000..4632330 --- /dev/null +++ b/.config/linux/system/module/common/Dotfiles.nix @@ -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; +}