2021-10-17 14:04:19 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
2022-04-23 09:36:20 +00:00
|
|
|
base16 = {
|
|
|
|
url = "github:SenchoPens/base16.nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2021-10-17 14:04:19 +00:00
|
|
|
utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
2022-04-23 09:36:20 +00:00
|
|
|
outputs = { nixpkgs, base16, utils, self, ... }:
|
2021-10-17 15:17:28 +00:00
|
|
|
(utils.lib.eachSystem [ "aarch64-linux" "i686-linux" "x86_64-linux" ]
|
|
|
|
(system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
2021-10-17 14:04:19 +00:00
|
|
|
|
2021-12-16 20:03:07 +00:00
|
|
|
ghc = pkgs.haskellPackages.ghcWithPackages (haskellPackages:
|
|
|
|
with haskellPackages; [
|
|
|
|
json
|
|
|
|
JuicyPixels
|
|
|
|
random
|
|
|
|
]);
|
2021-10-17 14:04:19 +00:00
|
|
|
|
2021-10-17 15:17:28 +00:00
|
|
|
palette-generator = pkgs.stdenvNoCC.mkDerivation {
|
|
|
|
name = "palette-generator";
|
|
|
|
src = ./palette-generator;
|
|
|
|
buildInputs = [ ghc ];
|
2021-12-16 20:08:35 +00:00
|
|
|
buildPhase =
|
|
|
|
"ghc -O -threaded -Wall -Wno-type-defaults Stylix/Main.hs";
|
2021-10-18 15:40:18 +00:00
|
|
|
installPhase = "install -D Stylix/Main $out/bin/palette-generator";
|
2021-10-17 15:17:28 +00:00
|
|
|
};
|
2021-10-17 14:04:19 +00:00
|
|
|
|
2021-10-17 15:17:28 +00:00
|
|
|
palette-generator-app = utils.lib.mkApp {
|
|
|
|
drv = palette-generator;
|
|
|
|
name = "palette-generator";
|
|
|
|
};
|
2021-10-17 14:04:19 +00:00
|
|
|
|
2021-10-17 15:17:28 +00:00
|
|
|
in {
|
|
|
|
packages.palette-generator = palette-generator;
|
|
|
|
apps.palette-generator = palette-generator-app;
|
|
|
|
})) // {
|
2022-04-23 09:36:20 +00:00
|
|
|
nixosModules.stylix = { pkgs, ... }@args: {
|
2021-10-17 15:17:28 +00:00
|
|
|
imports = [
|
|
|
|
./modules/console.nix
|
|
|
|
./modules/dunst.nix
|
|
|
|
./modules/feh.nix
|
|
|
|
./modules/fish.nix
|
|
|
|
./modules/grub.nix
|
|
|
|
./modules/gtk.nix
|
2022-04-04 09:39:29 +00:00
|
|
|
./modules/helix.nix
|
2021-10-17 15:17:28 +00:00
|
|
|
./modules/kitty.nix
|
|
|
|
./modules/lightdm.nix
|
|
|
|
./modules/plymouth
|
|
|
|
./modules/qutebrowser.nix
|
|
|
|
./modules/sway.nix
|
|
|
|
./modules/vim.nix
|
2022-04-23 09:36:20 +00:00
|
|
|
(import ./stylix/palette.nix {
|
|
|
|
inherit (self.packages.${pkgs.system}) palette-generator;
|
|
|
|
base16 = base16.lib args;
|
|
|
|
})
|
2021-10-17 15:17:28 +00:00
|
|
|
./stylix/fonts.nix
|
|
|
|
./stylix/pixel.nix
|
|
|
|
];
|
|
|
|
};
|
2021-10-17 14:04:19 +00:00
|
|
|
};
|
|
|
|
}
|