From 38860e25ea17f81878efe496fccfd23de16dff56 Mon Sep 17 00:00:00 2001 From: uakci Date: Wed, 15 Sep 2021 01:32:27 +0200 Subject: preliminary nixos module --- flake.nix | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index de458af..04a714b 100644 --- a/flake.nix +++ b/flake.nix @@ -14,9 +14,7 @@ , serial-predicate-engine-upstream, flake-utils, ... }: { inherit (gomod2nix) devShell; - nixosModule = { config, system, ... }: { - config.fonts.fonts = [ self.packages.toaqScript.${system} ]; - }; + nixosModule = a: import ./module.nix (a // { inherit self; system = "x86_64-linux"; }); } // flake-utils.lib.eachDefaultSystem (system: let pkgs = (import nixpkgs { @@ -25,7 +23,8 @@ }).pkgs; in with pkgs; let - toaqScript = pkgs.writeTextDir "share/fonts/ToaqScript.ttf" ./ToaqScript.ttf; + toaqScript = + pkgs.writeTextDir "share/fonts/ToaqScript.ttf" ./ToaqScript.ttf; schemePkgs = lib.mapAttrs (name: { src, install, patches }: pkgs.stdenv.mkDerivation { @@ -53,22 +52,20 @@ ''; }; }; - nuogai = buildGoApplication { - vendorSha256 = null; - runVend = true; - name = "nuogai"; - src = ./.; - modules = ./gomod2nix.toml; - buildInputs = (builtins.attrValues schemePkgs) ++ [ - toaqScript - (imagemagick.overrideAttrs - (a: { buildInputs = a.buildInputs ++ [ pango ]; })) - ]; - }; + nuogai = buildGoApplication { + vendorSha256 = null; + runVend = true; + name = "nuogai"; + src = ./.; + modules = ./gomod2nix.toml; + buildInputs = (builtins.attrValues schemePkgs) ++ [ + toaqScript + (imagemagick.overrideAttrs + (a: { buildInputs = a.buildInputs ++ [ pango ]; })) + ]; + }; in { defaultPackage = nuogai; - packages = schemePkgs // { - inherit toaqScript nuogai; - }; + packages = schemePkgs // { inherit toaqScript nuogai; }; }); } -- cgit v1.2.3