1
0
Fork 0

Fix nixos update service

This commit is contained in:
Aires 2024-02-29 11:18:55 -05:00
parent eb9f037ed4
commit e3fbd5b7b5

View file

@ -39,8 +39,9 @@ with lib;
systemd.services = { systemd.services = {
"nixos-rebuild" = { "nixos-rebuild" = {
script = '' script = ''
nixos-rebuild build . --flake ${pkgs.nixos-rebuild}/bin/nixos-rebuild build --flake .
''; '';
path = [ "/run/current-system/sw" ];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
User = "${config.users.users.aires.name}"; User = "${config.users.users.aires.name}";
@ -50,8 +51,9 @@ with lib;
"nixos-activate" = { "nixos-activate" = {
script = '' script = ''
./result/switch-to-configuration switch ${config.users.users.aires.home}/Development/nix-configuration/result/bin/switch-to-configuration switch
''; '';
path = [ "/run/current-system/sw" ];
requires = [ "nixos-rebuild.service" ]; requires = [ "nixos-rebuild.service" ];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";