|
|
@@ -14,29 +14,31 @@
|
|
|
];
|
|
|
};
|
|
|
|
|
|
- systemd.user.services.setup-home-manager =
|
|
|
+ systemd.services.setup-home-manager =
|
|
|
let
|
|
|
git = lib.getExe' pkgs.git "git";
|
|
|
nix = lib.getExe' pkgs.nix "nix";
|
|
|
in
|
|
|
{
|
|
|
- description = "Setup home-manager configuration on boot";
|
|
|
+ description = "Setup home-manager configuration for thomas";
|
|
|
after = [ "network-online.target" ];
|
|
|
wants = [ "network-online.target" ];
|
|
|
- wantedBy = [ "default.target" ];
|
|
|
+ wantedBy = [ "multi-user.target" ];
|
|
|
|
|
|
serviceConfig = {
|
|
|
Type = "oneshot";
|
|
|
RemainAfterExit = true;
|
|
|
+ User = "thomas";
|
|
|
+ Group = "users";
|
|
|
};
|
|
|
|
|
|
path = [ pkgs.git pkgs.nix ];
|
|
|
|
|
|
script = ''
|
|
|
- if [ "$USER" = "thomas" ] && [ ! -d "$HOME/workspace/control/home" ]; then
|
|
|
+ if [ ! -d "/home/thomas/workspace/control/home" ]; then
|
|
|
echo "Setting up home environment..."
|
|
|
- mkdir -p "$HOME/workspace/control"
|
|
|
- cd "$HOME/workspace/control"
|
|
|
+ mkdir -p "/home/thomas/workspace/control"
|
|
|
+ cd "/home/thomas/workspace/control"
|
|
|
${git} clone https://codeberg.org/control/home.git
|
|
|
cd home
|
|
|
${nix} run github:nix-community/home-manager -- switch -b backup --flake .#thomas@odin
|