From 099d4133d3d4d74c2c5f2ba9933f1b1f6e6d67a5 Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Tue, 13 Jun 2023 23:04:43 +0200 Subject: [PATCH] Add NixNG container for `ds3os` Signed-off-by: Magic_RB --- flake.nix | 1 + nixng/containers/ds3os/default.nix | 31 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 nixng/containers/ds3os/default.nix diff --git a/flake.nix b/flake.nix index f003b34..99f9812 100644 --- a/flake.nix +++ b/flake.nix @@ -47,6 +47,7 @@ nixos/systems/liveusb nixos/systems/blowhole + nixng/containers/ds3os overlays/udp-over-tcp.nix overlays/emacsclient-remote overlays/magic-screenshot diff --git a/nixng/containers/ds3os/default.nix b/nixng/containers/ds3os/default.nix new file mode 100644 index 0000000..47eb493 --- /dev/null +++ b/nixng/containers/ds3os/default.nix @@ -0,0 +1,31 @@ +{ inputs, config, ... }: +{ + flake.nixngConfigurations.ds3os = inputs.nixng.nglib.makeSystem { + system = "x86_64-linux"; + name = "ds3os"; + inherit (inputs) nixpkgs; + config = + { pkgs, ... }: + { + config = { + dumb-init = { + enable = true; + type.services = { }; + }; + + init.services.ds3os = { + enabled = true; + shutdownOnExit = true; + script = + let + pkgs' = pkgs.appendOverlays [ config.flake.overlays.ds3os ]; + in + pkgs.writeShellScript "ds3os" + '' + exec ${pkgs'.ds3os}/bin/ds3os + ''; + }; + }; + }; + }; +}