79 lines
1.8 KiB
Nix
79 lines
1.8 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nixpkgs-old-stable.url = "github:nixos/nixpkgs/nixos-25.05";
|
|
|
|
synix.url = "git+https://git.sid.ovh/sid/synix.git?ref=release-25.11";
|
|
synix.inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
...
|
|
}@inputs:
|
|
let
|
|
inherit (self) outputs;
|
|
|
|
systems = [
|
|
"x86_64-linux"
|
|
];
|
|
|
|
lib = nixpkgs.lib.extend (_final: _prev: inputs.synix.lib or { });
|
|
|
|
inherit (lib.helpers) mkPkgs;
|
|
|
|
forAllSystems =
|
|
function:
|
|
lib.genAttrs systems (
|
|
system:
|
|
function (mkPkgs {
|
|
inherit system;
|
|
})
|
|
);
|
|
|
|
mkNixosConfiguration =
|
|
system: modules:
|
|
nixpkgs.lib.nixosSystem {
|
|
inherit system modules;
|
|
specialArgs = {
|
|
inherit inputs outputs lib;
|
|
};
|
|
};
|
|
in
|
|
{
|
|
packages = forAllSystems (pkgs: import ./pkgs { inherit pkgs; });
|
|
|
|
overlays = import ./overlays { inherit inputs; };
|
|
|
|
nixosModules = import ./modules/nixos;
|
|
|
|
nixosConfigurations = {
|
|
HOSTNAME = mkNixosConfiguration "x86_64-linux" [ ./hosts/HOSTNAME ];
|
|
};
|
|
|
|
devShells = forAllSystems (
|
|
pkgs:
|
|
let
|
|
inherit (pkgs.stdenv.hostPlatform) system;
|
|
in
|
|
{
|
|
default = inputs.synix.devShells.${system}.nix-config;
|
|
}
|
|
);
|
|
|
|
checks = forAllSystems (
|
|
pkgs:
|
|
let
|
|
inherit (pkgs.stdenv.hostPlatform) system;
|
|
in
|
|
{
|
|
inherit (inputs.synix.checks.${system}) pre-commit-check build-additions build-modifications;
|
|
}
|
|
);
|
|
|
|
inherit (inputs.synix) formatter;
|
|
};
|
|
}
|