feat: add flake support

This commit is contained in:
Louis Dalibard 2024-07-10 14:51:39 +02:00
parent cf23eb92bf
commit bd63b0983c

View File

@ -6,29 +6,34 @@
}; };
outputs = outputs =
inputs@{ inputs@{ self, nixpkgs, ... }:
self,
nixpkgs,
...
}:
let let
adam-gui-libs = with pkgs; [ adam-gui-libs = with pkgs; [
libGL pkg-config xorg.libX11.dev xorg.libXcursor xorg.libXi xorg.libXinerama xorg.libXrandr xorg.libXxf86vm libGL
];
kon-libs = with pkgs; [
pkg-config pkg-config
xorg.libX11.dev
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXxf86vm
]; ];
kon-libs = with pkgs; [ pkg-config ];
pkgs = import nixpkgs { pkgs = import nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
overlays = [ self.overlays.default ]; overlays = [ self.overlays.default ];
}; };
in { in
nixosModules.default = ({config, pkgs, ...}: { nixpkgs.overlays = [ self.overlays.default ]; }); {
nixosModules.default = (
{ config, pkgs, ... }:
{
nixpkgs.overlays = [ self.overlays.default ];
}
);
packages.x86_64-linux = rec { packages.x86_64-linux = rec {
inherit (pkgs) inherit (pkgs) kon adam-gui;
kon
adam-gui;
}; };
overlays.default = final: prev: { overlays.default = final: prev: {
kon = kon =
@ -40,7 +45,7 @@
buildInputs = [ buildInputs = [
gcc gcc
go go
] ++ adam-gui-libs; ] ++ kon-libs;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
pkg-config pkg-config
@ -83,7 +88,7 @@
buildInputs = [ buildInputs = [
gcc gcc
go go
] ++ kon-libs; ] ++ adam-gui-libs;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
pkg-config pkg-config