diff --git a/flake.lock b/flake.lock index f29ce278..b5e30f77 100644 --- a/flake.lock +++ b/flake.lock @@ -39,23 +39,7 @@ "root": { "inputs": { "base16": "base16", - "nixpkgs": "nixpkgs", - "utils": "utils" - } - }, - "utils": { - "locked": { - "lastModified": 1631561581, - "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index 33ef8c8f..554b0947 100644 --- a/flake.nix +++ b/flake.nix @@ -5,76 +5,70 @@ url = "github:SenchoPens/base16.nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - utils.url = "github:numtide/flake-utils"; }; - outputs = { nixpkgs, base16, utils, self, ... }: - (utils.lib.eachSystem [ "aarch64-linux" "i686-linux" "x86_64-linux" ] - (system: + outputs = + { nixpkgs, base16, self, ... }: + with nixpkgs.lib; + { + packages = genAttrs [ "aarch64-linux" "i686-linux" "x86_64-linux" ] ( + system: let pkgs = nixpkgs.legacyPackages.${system}; - ghc = pkgs.haskellPackages.ghcWithPackages (haskellPackages: - with haskellPackages; [ - json - JuicyPixels - random - ]); + ghc = + pkgs.haskellPackages.ghcWithPackages + (ps: with ps; [ json JuicyPixels random ]); + in { palette-generator = pkgs.stdenvNoCC.mkDerivation { name = "palette-generator"; src = ./palette-generator; buildInputs = [ ghc ]; - buildPhase = - "ghc -O -threaded -Wall -Wno-type-defaults Stylix/Main.hs"; - installPhase = "install -D Stylix/Main $out/bin/palette-generator"; + buildPhase = '' + ghc -O -threaded -Wall -Wno-type-defaults Stylix/Main.hs + ''; + installPhase = '' + install -D Stylix/Main $out/bin/palette-generator + ''; }; - # Internal documentation palette-generator-haddock = pkgs.stdenvNoCC.mkDerivation { name = "palette-generator-haddock"; src = ./palette-generator; buildInputs = [ ghc ]; - buildPhase = - "haddock $src/**/*.hs --html --ignore-all-exports --odir $out"; + buildPhase = '' + haddock $src/**/*.hs --html --ignore-all-exports --odir $out + ''; dontInstall = true; dontFixup = true; }; + } + ); - palette-generator-app = utils.lib.mkApp { - drv = palette-generator; - name = "palette-generator"; - }; - - in { - packages = { - inherit palette-generator palette-generator-haddock; - }; - apps.palette-generator = palette-generator-app; - })) // { - nixosModules.stylix = { pkgs, ... }@args: { - imports = [ - ./modules/alacritty.nix - ./modules/console.nix - ./modules/dunst.nix - ./modules/feh.nix - ./modules/fish.nix - ./modules/grub.nix - ./modules/gtk.nix - ./modules/helix.nix - ./modules/kitty.nix - ./modules/lightdm.nix - ./modules/plymouth - ./modules/qutebrowser.nix - ./modules/sway.nix - ./modules/vim.nix - (import ./stylix/palette.nix { - inherit (self.packages.${pkgs.system}) palette-generator; - base16 = base16.lib args; - }) - ./stylix/fonts.nix - ./stylix/pixel.nix - ]; - }; - }; + nixosModules.stylix = { pkgs, ... }@args: { + imports = [ + ./modules/alacritty.nix + ./modules/console.nix + ./modules/dunst.nix + ./modules/feh.nix + ./modules/fish.nix + ./modules/grub.nix + ./modules/gtk.nix + ./modules/helix.nix + ./modules/kitty.nix + ./modules/lightdm.nix + ./modules/plymouth + ./modules/qutebrowser.nix + ./modules/sway.nix + ./modules/vim.nix + (import ./stylix/palette.nix { + inherit (self.packages.${pkgs.system}) palette-generator; + base16 = base16.lib args; + }) + ./stylix/fonts.nix + ./stylix/pixel.nix + ]; + }; + }; }