diff --git a/hosts/h002/configuration.nix b/hosts/h002/configuration.nix index 12ff7ed..cfeee85 100644 --- a/hosts/h002/configuration.nix +++ b/hosts/h002/configuration.nix @@ -17,6 +17,8 @@ # Users this machine has (settings.usersDir + "/root/configuration.nix") (settings.usersDir + "/luser/configuration.nix") + +(settings.hostsDir + "/h002/nixserver.nix") ]; boot.loader.grub = { diff --git a/hosts/h002/nixserver.nix b/hosts/h002/nixserver.nix new file mode 100644 index 0000000..6563d08 --- /dev/null +++ b/hosts/h002/nixserver.nix @@ -0,0 +1,27 @@ +{ settings, pkgs, ... }: +{ + # [Unit] + # Description=Nixserver Agent + # After=network.target + + # [Service] + # ExecStart=/usr/local/bin/nixserver agent run + # Restart=always + # User=luser + # Group=luser + + # [Install] + # WantedBy=multi-user.target + + systemd.services.nixserver_agent = { + description = "Nixserver Agent"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + Environment = "PATH=/run/wrappers/bin:/home/luser/.nix-profile/bin:/nix/profile/bin:/home/luser/.local/state/nix/profile/bin:/etc/profiles/per-user/luser/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"; + ExecStart = "/usr/local/bin/nixserver agent run"; + Restart = "always"; + User = "luser"; + }; + }; +}