2024-09-05 20:28:09 +02:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
|
|
|
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/release-24.05";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
nur.url = "github:nix-community/NUR";
|
|
|
|
impermanence.url = "github:nix-community/impermanence";
|
|
|
|
hm-isolation.url = "github:3442/hm-isolation";
|
|
|
|
nixGL.url = "github:guibou/nixGL";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2024-09-08 22:17:00 +02:00
|
|
|
vpsadminos.url = "github:vpsfreecz/vpsadminos";
|
|
|
|
|
|
|
|
homepage.url = "git+https://git.posixlycorrect.com/fabian/homepage.git?ref=master";
|
|
|
|
|
|
|
|
conduwuit = {
|
|
|
|
url = "github:girlbossceo/conduwuit?ref=v0.4.5";
|
|
|
|
#FIXME: Podrá volver a "nixpkgs" una vez que rocksdb.enableLiburing llegue a stable
|
|
|
|
inputs.nixpkgs.follows = "unstable";
|
|
|
|
};
|
|
|
|
|
|
|
|
authentik-nix = {
|
|
|
|
url = "github:nix-community/authentik-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
mediawikiSkinCitizen = {
|
|
|
|
url = "github:StarCitizenTools/mediawiki-skins-Citizen/v2.27.0";
|
|
|
|
flake = false;
|
|
|
|
};
|
2024-09-05 20:28:09 +02:00
|
|
|
};
|
|
|
|
|
2024-09-08 22:17:00 +02:00
|
|
|
outputs = flakes @ {
|
2024-09-05 20:28:09 +02:00
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
unstable,
|
|
|
|
home-manager,
|
|
|
|
nur,
|
2024-09-08 22:17:00 +02:00
|
|
|
impermanence,
|
2024-09-05 20:28:09 +02:00
|
|
|
hm-isolation,
|
|
|
|
nixGL,
|
2024-09-08 22:17:00 +02:00
|
|
|
flake-utils,
|
|
|
|
vpsadminos,
|
|
|
|
homepage,
|
|
|
|
conduwuit,
|
|
|
|
mediawikiSkinCitizen,
|
|
|
|
authentik-nix,
|
2024-09-05 20:28:09 +02:00
|
|
|
}: let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
2024-09-08 22:50:36 +02:00
|
|
|
importPkgs = flake:
|
|
|
|
import flake {
|
|
|
|
inherit system;
|
2024-09-08 22:17:00 +02:00
|
|
|
|
2024-09-08 22:50:36 +02:00
|
|
|
config = import ./pkgs/config nixpkgs.lib;
|
2024-09-08 23:23:22 +02:00
|
|
|
overlays = [
|
|
|
|
self.overlays.default
|
|
|
|
nur.overlay
|
|
|
|
nixGL.overlay
|
|
|
|
];
|
2024-09-08 22:50:36 +02:00
|
|
|
};
|
2024-09-05 20:28:09 +02:00
|
|
|
|
2024-09-08 22:17:00 +02:00
|
|
|
pkgs = importPkgs nixpkgs;
|
2024-09-05 20:28:09 +02:00
|
|
|
|
2024-09-08 22:17:00 +02:00
|
|
|
inherit (pkgs.local.lib) importAll;
|
2024-09-05 20:28:09 +02:00
|
|
|
|
2024-11-21 00:52:37 +01:00
|
|
|
local = final: prev: import ./pkgs {inherit final prev flakes;};
|
2024-09-08 22:17:00 +02:00
|
|
|
in
|
2024-09-08 22:50:36 +02:00
|
|
|
with pkgs.lib; {
|
|
|
|
formatter.${system} = pkgs.alejandra;
|
|
|
|
packages.${system} = pkgs.local;
|
2024-09-08 22:17:00 +02:00
|
|
|
|
2024-09-08 22:50:36 +02:00
|
|
|
overlays.default = final: prev: let
|
2024-09-08 22:17:00 +02:00
|
|
|
locals = local final prev;
|
|
|
|
in
|
2024-09-08 22:50:36 +02:00
|
|
|
locals.override
|
|
|
|
// {
|
|
|
|
local = locals;
|
|
|
|
unstable = importPkgs unstable;
|
2024-09-08 22:17:00 +02:00
|
|
|
};
|
2024-09-05 20:28:09 +02:00
|
|
|
|
2024-09-08 22:50:36 +02:00
|
|
|
nixosConfigurations = let
|
|
|
|
nixosSystem = {modules}:
|
|
|
|
makeOverridable nixpkgs.lib.nixosSystem {
|
|
|
|
inherit modules pkgs system;
|
|
|
|
|
|
|
|
specialArgs = {
|
|
|
|
inherit flakes;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
hostConfig = host:
|
|
|
|
nixosSystem {
|
|
|
|
modules = [
|
|
|
|
./sys
|
|
|
|
host
|
|
|
|
];
|
|
|
|
};
|
|
|
|
in
|
|
|
|
mapAttrs (_: hostConfig) (importAll {root = ./sys/platforms;});
|
|
|
|
|
|
|
|
homeConfigurations = let
|
|
|
|
registry = {...}: {
|
2024-09-08 23:23:22 +02:00
|
|
|
config.nix.registry =
|
|
|
|
mapAttrs (_: value: {
|
2024-09-08 22:50:36 +02:00
|
|
|
flake = value;
|
|
|
|
})
|
2024-09-08 23:23:22 +02:00
|
|
|
flakes;
|
2024-09-08 22:50:36 +02:00
|
|
|
};
|
2024-09-05 20:28:09 +02:00
|
|
|
|
2024-09-08 22:50:36 +02:00
|
|
|
home = platform:
|
|
|
|
home-manager.lib.homeManagerConfiguration {
|
|
|
|
inherit pkgs;
|
|
|
|
|
|
|
|
modules = [
|
|
|
|
./home
|
2024-09-08 23:23:22 +02:00
|
|
|
platform
|
2024-09-08 22:50:36 +02:00
|
|
|
registry
|
|
|
|
hm-isolation.homeManagerModule
|
|
|
|
];
|
2024-09-08 23:23:22 +02:00
|
|
|
|
|
|
|
extraSpecialArgs = {
|
|
|
|
inherit flakes;
|
|
|
|
};
|
2024-09-08 22:50:36 +02:00
|
|
|
};
|
|
|
|
|
2024-09-08 23:23:22 +02:00
|
|
|
platformHome = name: platform:
|
|
|
|
nameValuePair name (home platform);
|
2024-09-08 22:50:36 +02:00
|
|
|
in
|
2024-09-08 23:20:09 +02:00
|
|
|
mapAttrs' platformHome (importAll {root = ./home/platforms;});
|
2024-09-05 20:28:09 +02:00
|
|
|
};
|
|
|
|
}
|