diff options
Diffstat (limited to 'Biz')
-rw-r--r-- | Biz/Bild/Deps.nix | 21 | ||||
-rw-r--r-- | Biz/Bild/Sources.json | 7 | ||||
-rw-r--r-- | Biz/Dev.nix | 1 | ||||
-rw-r--r-- | Biz/Dev/Guix.nix | 47 |
4 files changed, 76 insertions, 0 deletions
diff --git a/Biz/Bild/Deps.nix b/Biz/Bild/Deps.nix index 790011c..946a834 100644 --- a/Biz/Bild/Deps.nix +++ b/Biz/Bild/Deps.nix @@ -57,4 +57,25 @@ in rec guile-opengl = super.callPackage ./Deps/guile-opengl.nix {}; # The libfive build is broken... #inspekt3d = super.callPackage ./Deps/inspekt3d.nix {}; + guix = super.pkgs.stdenv.mkDerivation rec { + pname = "guix"; + name = "${pname}-${version}"; + version = super.sources.guix.version; + src = super.sources.guix; + buildInputs = with super.pkgs; [ + guile + # guile-gcrypt + # guile-sql + # guile-zlib + # guile-lzlib + # guile-avahi + # guile-git + # guile-json + gnutls + gnumake + sqlite + libgcrypt + gcc + ]; + }; } diff --git a/Biz/Bild/Sources.json b/Biz/Bild/Sources.json index b313748..452d81b 100644 --- a/Biz/Bild/Sources.json +++ b/Biz/Bild/Sources.json @@ -63,6 +63,13 @@ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz", "version": "18f31dec5d9eae1ef35ff8bbf163394942efd227" }, + "guix": { + "branch": "master", + "repo": "https://git.savannah.gnu.org/git/guix.git", + "rev": "a25e0518954b48753ff44ad116d0a6fb47dfb6cb", + "type": "git", + "version": "2021-06-14-unstable" + }, "inspekt3d": { "branch": "master", "sha256": "0lan6930g5a9z4ack9jj0zdd0mb2s6q2xzpiwcjdc3pvl9b1nbw4", diff --git a/Biz/Dev.nix b/Biz/Dev.nix index cee87a3..837ffaf 100644 --- a/Biz/Dev.nix +++ b/Biz/Dev.nix @@ -11,6 +11,7 @@ bild.os { ./Dev/Hardware.nix ./Dev/Hoogle.nix ./Devalloc.nix + # ./Dev/Guix.nix # I need to package a bunch of guile libs first ]; networking.hostName = "lithium"; networking.domain = "dev.simatime.com"; diff --git a/Biz/Dev/Guix.nix b/Biz/Dev/Guix.nix new file mode 100644 index 0000000..8ee55d4 --- /dev/null +++ b/Biz/Dev/Guix.nix @@ -0,0 +1,47 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.services.guix; + + +in { + + options.services.guix = { + enable = mkEnableOption "GNU Guix package manager"; + }; + + config = mkIf cfg.enable { + systemd.services.guix-daemon = { + description = "Build daemon for GNU Guix"; + + wantedBy = [ "multi-user.target" ]; + + serviceConfig = { + Restart = "always"; + ExecStart = "${pkgs.guix}/bin/guix-daemon --build-users-group=guixbuild"; + Environment = null; + RemainAfterExit = "yes"; + StandardOutput = "syslog"; + StandardError = "syslog"; + TaskMax = "8192"; + }; + }; + users = { + extraUsers = lib.attrs.genAttrs + (lib.lists.range 1 10) + (n: { + name = "guixbuilder${n}"; + isSystemUser = true; + extraGroups = ["guixbuild"]; + group = "guixbuild"; + description = "Guix build user ${n}"; + }); + extraGroups = { + "guixbuild" = {}; + }; + }; + }; +} |