mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
134 lines
3.1 KiB
Nix
134 lines
3.1 KiB
Nix
{
|
|
inputs = {
|
|
#nixpkgs refs
|
|
master = {
|
|
type = "github";
|
|
owner = "NixOS";
|
|
repo = "nixpkgs";
|
|
ref = "master";
|
|
};
|
|
unstable = {
|
|
type = "github";
|
|
owner = "NixOS";
|
|
repo = "nixpkgs";
|
|
ref = "nixos-unstable";
|
|
};
|
|
stable = {
|
|
type = "github";
|
|
owner = "NixOS";
|
|
repo = "nixpkgs";
|
|
ref = "nixos-24.11";
|
|
};
|
|
#nix itself
|
|
nix = {
|
|
type = "github";
|
|
owner = "NixOS";
|
|
repo = "nix";
|
|
ref = "2cb0ddfe4eb216fab6d826c1056743c152722720";
|
|
inputs.nixpkgs.follows = "stable";
|
|
};
|
|
nixos-generators = {
|
|
type = "github";
|
|
owner = "nix-community";
|
|
repo = "nixos-generators";
|
|
inputs.nixpkgs.follows = "unstable";
|
|
};
|
|
sops-nix = {
|
|
type = "github";
|
|
owner = "mic92";
|
|
repo = "sops-nix";
|
|
inputs.nixpkgs.follows = "unstable";
|
|
};
|
|
disko = {
|
|
type = "github";
|
|
owner = "nix-community";
|
|
repo = "disko";
|
|
inputs.nixpkgs.follows = "unstable";
|
|
};
|
|
nix-index-database = {
|
|
type = "github";
|
|
owner = "nix-community";
|
|
repo = "nix-index-database";
|
|
inputs.nixpkgs.follows = "unstable";
|
|
};
|
|
lanzaboote = {
|
|
type = "github";
|
|
owner = "nix-community";
|
|
repo = "lanzaboote";
|
|
inputs.nixpkgs.follows = "unstable";
|
|
};
|
|
nix-janitor = {
|
|
type = "github";
|
|
owner = "Nobbz";
|
|
repo = "nix-janitor";
|
|
inputs.nixpkgs.follows = "unstable";
|
|
};
|
|
#my own packages
|
|
spicetify-nix = {
|
|
type = "github";
|
|
owner = "Gerg-L";
|
|
repo = "spicetify-nix";
|
|
inputs.nixpkgs.follows = "unstable";
|
|
};
|
|
suckless = {
|
|
type = "github";
|
|
owner = "Gerg-L";
|
|
repo = "suckless";
|
|
inputs.nixpkgs.follows = "unstable";
|
|
};
|
|
nvim-flake = {
|
|
type = "github";
|
|
owner = "Gerg-L";
|
|
repo = "nvim-flake";
|
|
inputs.nixpkgs.follows = "unstable";
|
|
};
|
|
fetch-rs = {
|
|
type = "github";
|
|
owner = "Gerg-L";
|
|
repo = "fetch-rs";
|
|
inputs.nixpkgs.follows = "unstable";
|
|
};
|
|
reboot-bot = {
|
|
type = "github";
|
|
owner = "Gerg-L";
|
|
repo = "reboot-bot";
|
|
inputs.nixpkgs.follows = "unstable";
|
|
};
|
|
systems = {
|
|
type = "github";
|
|
owner = "nix-systems";
|
|
repo = "default";
|
|
};
|
|
|
|
};
|
|
outputs =
|
|
inputs:
|
|
let
|
|
inherit (inputs.unstable) lib;
|
|
myLib = import (./. + /lib/_default.nix) inputs;
|
|
in
|
|
lib.pipe ./. [
|
|
builtins.readDir
|
|
(lib.filterAttrs (n: v: v == "directory" && !lib.hasPrefix "." n))
|
|
(lib.flip (
|
|
system:
|
|
(builtins.mapAttrs (
|
|
n: _:
|
|
let
|
|
imported = import (./. + "/${n}/_default.nix");
|
|
in
|
|
if myLib.needsSystem n then
|
|
{
|
|
${system} = imported {
|
|
inputs' = myLib.constructInputs' system inputs;
|
|
inherit system;
|
|
};
|
|
}
|
|
else
|
|
imported inputs
|
|
))
|
|
))
|
|
(lib.flip map (import inputs.systems))
|
|
(lib.foldAttrs (l: r: if myLib.needsSystem l then l else l // r) { })
|
|
];
|
|
}
|