!DBFhtjpqmJNENpLDOv:nixos.org

NixOS systemd

626 Members
NixOS ❤️ systemd171 Servers

Load older messages


SenderMessageTime
2 Oct 2021
@arianvp:matrix.orgArianDidn't know about nspawn.org19:30:38
@genofire:matrix.sum7.eugenofirewhich image?19:31:31
@arianvp:matrix.orgArianNixos containers are actually systemd-nspawm behind the scenes19:31:35
@arianvp:matrix.orgArian
In reply to @genofire:matrix.sum7.eu
which image?
I don't think we have a system tarball published on the website that works out of the box. Though I suppose you could probably boot the ISO with nspawn? S But we do use nspawn as a building block extensively
19:32:47
@arianvp:matrix.orgArian* I don't think we have a system tarball published on the website that works out of the box. Though I suppose you could probably boot the ISO with nspawn? S But we do use nspawn as a building block extensively for the Nixos containers functionality19:32:57
@arianvp:matrix.orgArianhttps://nixos.org/manual/nixos/stable/#ch-containers 19:33:58
@arianvp:matrix.orgArian(but those only work on Nixos not on arch.. so doesn't help you much in this case)19:34:14
@genofire:matrix.sum7.eugenofire6 years ago, there was one ;( - https://hydra.nixos.org/job/nixos/release-14.12/nixos.system_tarball_pc.x86_64-linux19:58:53
@moleksiak:matrix.orgmoleksiak joined the room.20:01:56
@arianvp:matrix.orgArianWouldn't be too hard to re-add20:03:59
@genofire:matrix.sum7.eugenofirejippie i got an old tar (17.09) which works20:13:43
@arianvp:matrix.orgArian Feel free to open an issue for that genofire btw 20:16:19
@genofire:matrix.sum7.eugenofiresorry, not yet - still exploring20:33:20
@genofire:matrix.sum7.eugenofirefound the image here in this issue: https://github.com/NixOS/nixpkgs/issues/988420:36:09
@genofire:matrix.sum7.eugenofireanother systemd offtopic question - has nixos dropin files like in systemd? (for easy manage by ansible e.g.)21:12:42
@genofire:matrix.sum7.eugenofire
Oct 02 23:13:58 arch systemd-nspawn[649984]: <<< NixOS Stage 2 >>>
Oct 02 23:13:58 arch systemd-nspawn[649984]:
Oct 02 23:13:58 arch systemd-nspawn[649984]: running activation script...
Oct 02 23:13:58 arch systemd-nspawn[649984]: setting up /etc...
Oct 02 23:13:58 arch systemd-nspawn[649984]: mount: /dev: permission denied.
Oct 02 23:13:58 arch systemd-nspawn[649984]: mount: /dev/pts: permission denied.
Oct 02 23:13:58 arch systemd-nspawn[649984]: mount: /dev/shm: permission denied.
Oct 02 23:13:58 arch systemd-nspawn[649984]: mount: /run: permission denied.
Oct 02 23:13:59 arch systemd-nspawn[649984]: Initializing machine ID from container UUID.
Oct 02 23:13:59 arch systemd-nspawn[649984]: error: remounting /nix/store writable: Operation not permitted
Oct 02 23:13:59 arch systemd-nspawn[649984]: error: remounting /nix/store writable: Operation not permitted
Oct 02 23:13:59 arch systemd-nspawn[649984]: unpacking the NixOS/Nixpkgs sources...
Oct 02 23:13:59 arch systemd-nspawn[649984]: error: remounting /nix/store writable: Operation not permitted
Oct 02 23:13:59 arch systemd-nspawn[649984]: starting systemd...
Oct 02 23:13:59 arch systemd-nspawn[649984]: systemd 234 running in system mode. (+PAM +AUDIT -SELINUX +IMA +APPARMOR -SMACK -SYSVINIT +UTMP -LIBCRYPTSETUP +GCRYPT -GNUTLS +AC>
Oct 02 23:13:59 arch systemd-nspawn[649984]: Detected virtualization systemd-nspawn.
Oct 02 23:13:59 arch systemd-nspawn[649984]: Detected architecture x86-64.
Oct 02 23:13:59 arch systemd-nspawn[649984]:
Oct 02 23:13:59 arch systemd-nspawn[649984]: Welcome to NixOS 17.09.1754.5d24760ed1 (Hummingbird)!

okay, nixos make his /nix/store readonly and is not possible to change it afterwards ;( - make it useless for running in container on other distros

21:17:07
@genofire:matrix.sum7.eugenofireso i believe it is not possible to run from other nspawn - so maybe i take another maschine and make a zfs send/recv for a nice migration21:18:48
@arianvp:matrix.orgArian
In reply to @genofire:matrix.sum7.eu
another systemd offtopic question - has nixos dropin files like in systemd? (for easy manage by ansible e.g.)
Drop in files youd manage with Nixos configuration syntax as opposed to ansible. Nixos manages files in /etc
21:21:05
@arianvp:matrix.orgArianYou can however put dropin in /run if you'd want21:21:24
@arianvp:matrix.orgArianBut I'd advise against writing unit files by hand. You ought to use the Nixos config language for this. Nixos will then place the unit files for you21:22:22
@arianvp:matrix.orgArian( Nixos is a competitor to ansible. It's a configuration management tool first and foremost)21:22:52
@genofire:matrix.sum7.eugenofirei do not like to write own unitfiles - i would like to extend existing unit file by a dropin21:23:19
@genofire:matrix.sum7.eugenofireor in systemd-networkd21:23:46
@genofire:matrix.sum7.eugenofiresorry, maybe i just misunderstand nixos on some points21:24:17
@arianvp:matrix.orgArian

you'd use the nixos config syntax for this.

e.g. you can extend the nginx service like this:

{
  systemd.services.nginx.serviceConfig.Environment = "MY_SECRET=3";
}

in your configuration.nix and nixos will then create a drop-in file that extends the nginx.service service for you

21:25:25
@genofire:matrix.sum7.eugenofirenice21:26:05
@genofire:matrix.sum7.eugenofirebut could i dropin into configuration.nix ? so i deploy my default one an on specifical machines - i add some things?21:26:45
@arianvp:matrix.orgArianfor sure21:27:05
@arianvp:matrix.orgArianNixOS will merge multiple config files into one if you import them21:27:26
@genofire:matrix.sum7.eugenofirecould i create a configuration.nix.d and put there nother .nix file into it?21:27:27

There are no newer messages yet.


Back to Room ListRoom Version: 6