!DBFhtjpqmJNENpLDOv:nixos.org

NixOS systemd

610 Members
NixOS ❤️ systemd165 Servers

Load older messages


SenderMessageTime
14 Jun 2021
@hpfr:matrix.orghpfrI recently upgraded my server and the borgmatic service I wrote broke seemingly due to systemd-inhibit https://0x0.st/-LI7.txt, so I want to remove the systemd-inhibit call and just run borgmatic directly. I did that but I'm still getting the same error. Is the override not working or something? here's systemd cat: https://0x0.st/-Llq.txt19:48:44
@hpfr:matrix.orghpfras you can see in the cat, most of the overrides are redundant because I wrote the service before I realized there was a nixos module providing it19:49:23
@hpfr:matrix.orghpfr

and this is the ExecStart override:

  #!/nix/store/a4yw1svqqk4d8lhwinn9xp847zz9gfma-bash-4.4-p23/bin/bash -e
  borgmatic --syslog-verbosity 1 --stats
  if [ -f /mnt/pool/borgmatic/lock.exclusive ]; then
    echo "Skipping rclone, lock exists"
  else
    rclone -v --config /root/.config/rclone/rclone.conf \
      sync /mnt/pool/borgmatic/ odrv:borgmatic
  fi
  if [ -f /mnt/pool/borgmatic-container/lock.exclusive ]; then
    echo "Skipping rclone, lock exists"
  else
    rclone -v --config /root/.config/rclone/rclone.conf \
      sync /mnt/pool/borgmatic-container/ odrv:borgmatic-container
  fi
19:50:55
@hpfr:matrix.orghpfrso I don't know how systemd-inhibit is still getting involved since I removed the call to it from ExecStart, anyone see anything in the cat paste that I don't understand?19:51:34
@hpfr:matrix.orghpfrand running borgmatic manually still works so I'm pretty sure it's something with NixOS and the systemd upgrade19:52:33
@hpfr:matrix.orghpfruh oh20:11:11
@hpfr:matrix.orghpfr
Note how ExecStart must be cleared before being re-assigned [1]. The same holds for every item that can be specified multiple times, e.g. OnCalendar for timers.
20:11:29
@hpfr:matrix.orghpfr Nix does not seem to do this, so overriding script will not work 20:11:59
@hpfr:matrix.orghpfr * Nix does not seem to do this, so overriding systemd.services.<name>.script will not work 20:12:30
@hpfr:matrix.orghpfr Arian: can I force Nix to override the whole unit rather than doing the conf stuff? 20:15:12
@arianvp:matrix.orgArianYou can as a workaround do: ``` serviceConfig.ExecStart = [ "" "new executable"] ; ```20:15:36
@arianvp:matrix.orgArian* You can as a workaround do: ``` yourService.serviceConfig.ExecStart = [ "" "new executable"] ; ```20:16:04
@hpfr:matrix.orghpfr I currently have a multiline script, what's a good way to reference that 20:16:52
@hpfr:matrix.orghpfr I basically reimplemented the script option to get that working. so the workaround finally works at least, but I'm still confused what's wrong with systemd-inhibit on NixOS. guess I'll open an issue 20:43:30
@arianvp:matrix.orgArianYes please!20:46:45
16 Jun 2021
@andreas.schraegle:helsinki-systems.deajs124

Any ideas what I could be doing wrong if this is my .network file:

[Match]
Name=einsatz-10

[Network]
Bridge=br0
LinkLocalAddressing=no

but ip a s einsatz-10 tells me ```
12: einsatz-10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1358 qdisc fq_codel master br0 state UNKNOWN group default qlen 1000
link/ether 76:1a:54:e8:b1:76 brd ff:ff:ff:ff:ff:ff
inet 169.254.118.54/16 brd 169.254.255.255 scope global noprefixroute einsatz-10
valid_lft forever preferred_lft forever
inet6 fe80::741a:54ff:fee8:b176/64 scope link
valid_lft forever preferred_lft forever

12:44:16
@andreas.schraegle:helsinki-systems.deajs124 *

Any ideas what I could be doing wrong if this is my .network file:

[Match]
Name=einsatz-10

[Network]
Bridge=br0
LinkLocalAddressing=no

but ip a s einsatz-10 tells me

12: einsatz-10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1358 qdisc fq_codel master br0 state UNKNOWN group default qlen 1000
link/ether 76:1a:54:e8:b1:76 brd ff:ff:ff:ff:ff:ff
inet 169.254.118.54/16 brd 169.254.255.255 scope global noprefixroute einsatz-10
valid_lft forever preferred_lft forever
inet6 fe80::741a:54ff:fee8:b176/64 scope link
valid_lft forever preferred_lft forever
12:44:22
@andreas.schraegle:helsinki-systems.deajs124 *

Any ideas what I could be doing wrong if this is my .network file:

[Match]
Name=einsatz-10

[Network]
Bridge=br0
LinkLocalAddressing=no

but ip a s einsatz-10 tells me

12: einsatz-10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1358 qdisc fq_codel master br0 state UNKNOWN group default qlen 1000
link/ether 76:1a:54:e8:b1:76 brd ff:ff:ff:ff:ff:ff
inet 169.254.118.54/16 brd 169.254.255.255 scope global noprefixroute einsatz-10
valid_lft forever preferred_lft forever
inet6 fe80::741a:54ff:fee8:b176/64 scope link
valid_lft forever preferred_lft forever
12:44:30
@andreas.schraegle:helsinki-systems.deajs124might be worth noting that this is a l2tp session configured with networkd, although it really shouldn't make a difference12:44:58
@kloenk:petabyte.devFinn BehrensWhat's the config of the bridge (br0)?12:45:25
@andreas.schraegle:helsinki-systems.deajs124
[Match]
Name=br0

[Network]
DHCP=no
LinkLocalAddressing=no
12:45:44
@andreas.schraegle:helsinki-systems.deajs124 Having an address on there probably doesn't hurt, but since this is a L2 tunnel, it really doesn't make much sense. Especially not a IPv4LL. 12:46:44
@hexa:lossy.networkhexado you have dhcpcd running?12:49:58
@andreas.schraegle:helsinki-systems.deajs124🤦‍♂️ yes. why would I though.12:50:32
@hexa:lossy.networkhexabecause 🤦‍♂️13:04:44
@hexa:lossy.networkhexaproblem solved?13:05:03
@andreas.schraegle:helsinki-systems.deajs124yep, thanks14:00:39
@joerg:bethselamin.deMic92 (Old)Redacted or Malformed Event19:53:08
17 Jun 2021
@gabthebab:mozilla.orgGabby joined the room.01:09:32
@gabthebab:mozilla.orgGabby changed their profile picture.02:59:43

Show newer messages


Back to Room ListRoom Version: 6