/ modules / flake / activate-home.nix
activate-home.nix
 1  {
 2    perSystem =
 3      {
 4        self',
 5        pkgs,
 6        lib,
 7        ...
 8      }:
 9      {
10        # Enables 'nix run' to activate home-manager config.
11        apps.default = {
12          inherit (self'.packages.activate) meta;
13          program = pkgs.writeShellApplication {
14            name = "activate-home";
15            text = ''
16              set -x
17              ${lib.getExe self'.packages.activate} "$(id -un)"@"$(hostname)"
18            '';
19          };
20        };
21      };
22  }