| 29 Dec 2024 |
ElvishJerricco | I wonder if the x-systemd.automount is messing with it somehow or something? | 16:34:51 |
gdamjan | I'm gonna contribute a systemd service unit file for an upstream project,
what would make it easier to use with NixOS?
I'm gonna use DynamicUser=true, StateDirectory= and CacheDirectory=
but there's one mandatory commandline argument to be specified and some optional environment variables that can configure the project | 19:52:30 |
gdamjan | [Service]
DynamicUser=true
StateDirectory=rqbit
CacheDirectory=rqbit
Environment=XDG_CACHE_HOME=/var/cache/rqbit
Environment=XDG_DATA_HOME=/var/lib/rqbit
# default DOWNLOAD_DIR, can be overriden in /etc/default/rqbit
Environment=DOWNLOAD_DIR=/var/tmp
EnvironmentFile=-/etc/default/rqbit
ExecStart=/usr/bin/rqbit server start $DOWNLOAD_DIR
| 19:53:04 |
dustee | * hi im getting an error while configuring a fileSystems.fsType = "sshfs". when i rebuild the nix host a second time i get a systemd error that doesnt go away until i reboot, commenting out the sshfs nix config doesnt help EDIT: i think the error only happened when the sshfs connection failed
restarting sysinit-reactivation.target
Error: Failed to open unit file /nix/store/0brwavnsjwyi9pgx7zl82cr0gqndl2a1-nixos-system-nixos-blazp-cloud-serv-01-25.05.20241219.d70bd19/etc/systemd/system/mnt-remote-10.100.200.50-sshfs-4tb\x2dsata-torrents.mount
Caused by:
No such file or directory (os error 2)
{
config,
domain,
...
}: let
remote = "torrents@10.100.200.50:/"; # sftpgo user
local = "/mnt/remote/10.100.200.50/sshfs/4tb-sata/torrents";
in {
systemd.tmpfiles.rules = ["d '${local}' 0755 root root - -"];
fileSystems = {
"${local}" = {
device = "${remote}";
fsType = "sshfs";
options = [
# this is what im trying to do but the error appeared even with the most basic options
# SSH options
"Port=2022" # specific port to connect to
"IdentityFile=/etc/ssh/ssh_host_ed25519_key" # private key auth
"ServerAliveInterval=15" # keep connections alive
"StrictHostKeyChecking=no" # accept host keys non-interactively, without setting up ssh host config
"UserKnownHostsFile=/dev/null" # prevent storing host keys in the known_hosts file
"reconnect" # handle connection drops
# Filesystem options
"allow_other" # for non-root access
"_netdev" # this is a network fs
"x-systemd.automount" # mount on demand
# Filesystem options - additional/optional
"noatime" # dont update access times for files, improves performance
"nodev" # prevent users from accessing raw block device files through the mounted filesystem
];
};
};
}
| 20:47:50 |
dustee | * hi im getting an error while configuring a fileSystems.fsType = "sshfs". when i rebuild the nix host a second time i get a systemd error that doesnt go away until i reboot, commenting out the sshfs nix config doesnt help EDIT: i think the error only happened when the sshfs connection failed, and i tried to rebuild with a changed sshfs nix config
restarting sysinit-reactivation.target
Error: Failed to open unit file /nix/store/0brwavnsjwyi9pgx7zl82cr0gqndl2a1-nixos-system-nixos-blazp-cloud-serv-01-25.05.20241219.d70bd19/etc/systemd/system/mnt-remote-10.100.200.50-sshfs-4tb\x2dsata-torrents.mount
Caused by:
No such file or directory (os error 2)
{
config,
domain,
...
}: let
remote = "torrents@10.100.200.50:/"; # sftpgo user
local = "/mnt/remote/10.100.200.50/sshfs/4tb-sata/torrents";
in {
systemd.tmpfiles.rules = ["d '${local}' 0755 root root - -"];
fileSystems = {
"${local}" = {
device = "${remote}";
fsType = "sshfs";
options = [
# this is what im trying to do but the error appeared even with the most basic options
# SSH options
"Port=2022" # specific port to connect to
"IdentityFile=/etc/ssh/ssh_host_ed25519_key" # private key auth
"ServerAliveInterval=15" # keep connections alive
"StrictHostKeyChecking=no" # accept host keys non-interactively, without setting up ssh host config
"UserKnownHostsFile=/dev/null" # prevent storing host keys in the known_hosts file
"reconnect" # handle connection drops
# Filesystem options
"allow_other" # for non-root access
"_netdev" # this is a network fs
"x-systemd.automount" # mount on demand
# Filesystem options - additional/optional
"noatime" # dont update access times for files, improves performance
"nodev" # prevent users from accessing raw block device files through the mounted filesystem
];
};
};
}
| 20:48:47 |
ElvishJerricco | gdamjan: do Environment and EnvironmentFile work like that? i.e. They can apply to the command line of an ExecStart? | 21:14:32 |
ElvishJerricco | if so, that's pretty useful | 21:14:38 |
gdamjan | yes, that works | 22:16:40 |
| 30 Dec 2024 |
| raitobezarius changed their display name from raitobezarius (DECT: 3538 / EPVPN 2681) to raitobezarius. | 16:29:51 |
| Tommy changed their display name from Tommy (3841) to Tommy. | 19:25:53 |
| 31 Dec 2024 |
| tilpner changed their display name from tilpner (38c3 3209) to tilpner. | 10:54:52 |
Arian | Why do we only install upstream wants for sysinit.target ?? | 17:35:20 |
Arian | e.g. sockets.target seems to be missing or am I blind | 17:35:30 |
Arian | (this is for the initrd ) | 17:36:02 |
| phaer changed their display name from phaer (8650 at 38c3) to phaer. | 19:24:25 |
ElvishJerricco | Arian: uh, good question :P | 19:34:19 |
ElvishJerricco | we should probably do that | 19:34:25 |
Arian | Do we have a good way for doing overrides for things in systemd.mounts ? | 21:55:47 |
Arian | it's a list. annoying | 21:55:50 |
Arian | why is it a list >:( | 21:56:10 |
ElvishJerricco | because at one point someone thought that the what field should be the sole determining factor for the unit name | 21:57:21 |
ElvishJerricco | because, that's technically correct | 21:57:27 |
Arian | but why not do | 21:57:43 |
ElvishJerricco | but like... could've just made the attrname irrelevant :P | 21:57:48 |
Arian | systemd.mounts."/nix/store".options = ["lol"] | 21:57:52 |
ElvishJerricco | * because at one point someone thought that the where field should be the sole determining factor for the unit name | 21:58:02 |
ElvishJerricco | yea there were better ways to do it | 21:58:19 |
Arian | can we fix this. I guess not | 21:58:30 |
ElvishJerricco | I bet we could change it with a coercedTo type | 21:59:14 |
ElvishJerricco | er, maybe not. There's an assert in coercedTo that says the old type can't have submodules | 22:00:39 |