142 lines
4.4 KiB
Nix
142 lines
4.4 KiB
Nix
{
|
|
description = "Nixos configuration flake";
|
|
|
|
inputs = {
|
|
accentor = {
|
|
url = "github:accentor/flake";
|
|
inputs = {
|
|
api.follows = "accentor-api";
|
|
devshell.follows = "devshell";
|
|
flake-utils.follows = "flake-utils";
|
|
nixpkgs.follows = "nixpkgs";
|
|
web.follows = "accentor-web";
|
|
};
|
|
};
|
|
accentor-api = {
|
|
url = "github:accentor/api";
|
|
inputs = {
|
|
devshell.follows = "devshell";
|
|
flake-utils.follows = "flake-utils";
|
|
nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
accentor-web = {
|
|
url = "github:accentor/web";
|
|
inputs = {
|
|
devshell.follows = "devshell";
|
|
flake-utils.follows = "flake-utils";
|
|
nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
agenix = {
|
|
url = "github:ryantm/agenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
devshell = {
|
|
url = "github:chvp/devshell";
|
|
inputs = {
|
|
flake-utils.follows = "flake-utils";
|
|
nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
emacs-overlay = {
|
|
url = "github:nix-community/emacs-overlay";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
flake-utils.follows = "flake-utils";
|
|
};
|
|
};
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
utils.follows = "flake-utils";
|
|
};
|
|
};
|
|
nixos-mailserver = {
|
|
url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
utils.follows = "flake-utils";
|
|
};
|
|
};
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nix-index-database = {
|
|
url = "github:Mic92/nix-index-database";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nur.url = "github:nix-community/NUR";
|
|
tetris = {
|
|
url = "github:chvp/tetris";
|
|
inputs = {
|
|
devshell.follows = "devshell";
|
|
flake-utils.follows = "flake-utils";
|
|
nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
utils = {
|
|
url = "github:gytis-ivaskevicius/flake-utils-plus";
|
|
inputs = {
|
|
flake-utils.follows = "flake-utils";
|
|
};
|
|
};
|
|
www-chvp-be = {
|
|
url = "gitlab:chvp/www.chvp.be?host=git.chvp.be";
|
|
inputs = {
|
|
devshell.follows = "devshell";
|
|
flake-utils.follows = "flake-utils";
|
|
nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
};
|
|
|
|
outputs = inputs@{ self, nixpkgs, accentor, accentor-api, accentor-web, agenix, devshell, emacs-overlay, flake-utils, home-manager, nix-index-database, nixos-mailserver, nur, tetris, utils, www-chvp-be }:
|
|
utils.lib.mkFlake {
|
|
inherit self inputs;
|
|
channels.nixpkgs = {
|
|
input = nixpkgs;
|
|
patches = builtins.map (patch: ./patches + "/${patch}") (builtins.filter (x: x != ".keep") (builtins.attrNames (builtins.readDir ./patches)));
|
|
overlaysBuilder = _: [
|
|
agenix.overlays.default
|
|
accentor.overlays.default
|
|
devshell.overlays.default
|
|
emacs-overlay.overlay
|
|
(self: super: {
|
|
tetris = tetris.packages.${self.system}.default;
|
|
})
|
|
nur.overlay
|
|
www-chvp-be.overlays.default
|
|
];
|
|
};
|
|
hostDefaults = {
|
|
modules = [
|
|
{ nix.generateRegistryFromInputs = true; }
|
|
accentor.nixosModules.default
|
|
agenix.nixosModules.age
|
|
home-manager.nixosModule
|
|
nixos-mailserver.nixosModule
|
|
nix-index-database.nixosModules.nix-index
|
|
./modules
|
|
];
|
|
};
|
|
hosts = {
|
|
kharbranth.modules = [ ./machines/kharbranth ];
|
|
kholinar.modules = [ ./machines/kholinar ];
|
|
lasting-integrity.modules = [ ./machines/lasting-integrity ];
|
|
urithiru.modules = [ ./machines/urithiru ];
|
|
};
|
|
outputsBuilder = channels:
|
|
let pkgs = channels.nixpkgs; in
|
|
{
|
|
devShells =
|
|
let
|
|
ls = builtins.readDir ./shells;
|
|
files = builtins.filter (name: ls.${name} == "regular") (builtins.attrNames ls);
|
|
shellNames = builtins.map (filename: builtins.head (builtins.split "\\." filename)) files;
|
|
nameToValue = name: import (./shells + "/${name}.nix") { inherit pkgs inputs; };
|
|
in
|
|
builtins.listToAttrs (builtins.map (name: { inherit name; value = nameToValue name; }) shellNames);
|
|
};
|
|
};
|
|
}
|