diff --git a/.bootstrap.sh b/.Bootstrap.sh similarity index 100% rename from .bootstrap.sh rename to .Bootstrap.sh diff --git a/.config/linux/system/module/common/Dotfile.nix b/.config/linux/system/module/common/Dotfile.nix index 6fac0a7..15660fc 100644 --- a/.config/linux/system/module/common/Dotfile.nix +++ b/.config/linux/system/module/common/Dotfile.nix @@ -1,12 +1,16 @@ -{ pkgs, ... }: { - systemd.user.services.dotfiles = { - description = "Install/update dotfiles in startup."; +{ pkgs, self, ... }: +let + mkDotfilesUnit = { + description = "Install/update dotfiles on startup."; wantedBy = [ "graphical-session-pre.target" ]; serviceConfig.Type = "oneshot"; script = '' cd ~ - ${pkgs.curl}/bin/curl https://git.voronind.com/voronind/linux/raw/branch/main/.bootstrap.sh | ${pkgs.bash}/bin/bash || true + 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 = mkDotfilesUnit; + systemd.services.dotfiles = mkDotfilesUnit; } diff --git a/.config/linux/system/user/Dasha.nix b/.config/linux/system/user/Dasha.nix index cbde2fd..ebdb938 100644 --- a/.config/linux/system/user/Dasha.nix +++ b/.config/linux/system/user/Dasha.nix @@ -1,6 +1,4 @@ -{ pkgs, ... }: - -{ +{ pkgs, ... }: { users.users.dasha = { hashedPassword = "$y$j9T$WGMPv/bRhGBUidcZLZ7CE/$raZhwFFdI/XvegVZVHLILJLMiBkOxSErc6gao/Cxt33"; # Use `mkpasswd`. uid = 1001; diff --git a/.config/linux/system/user/Voronind.nix b/.config/linux/system/user/Voronind.nix index 7dafc92..266cdb1 100644 --- a/.config/linux/system/user/Voronind.nix +++ b/.config/linux/system/user/Voronind.nix @@ -1,6 +1,4 @@ -{ pkgs, specialArgs, ... }: - -{ +{ pkgs, specialArgs, ... }: { users.users.voronind = { hashedPassword = specialArgs.const.hashedPassword; uid = 1000; diff --git a/.gitignore b/.gitignore index 920ac85..20da450 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ * # Bootstrap. -!/.bootstrap.sh +!/.Bootstrap.sh # Readme. !/.README.md