nixos-configs/flake.nix

169 lines
4.7 KiB
Nix
Raw Normal View History

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
2025-05-01 22:19:50 +02:00
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-11-24 18:10:44 +01:00
#keep-sorted start block=yes
flake-parts = {
url = "github:hercules-ci/flake-parts";
#inputs.nixpkgs.follows = "nixpkgs";
};
2025-11-15 14:13:00 +01:00
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.3";
inputs.nixpkgs.follows = "nixpkgs";
};
naersk = {
url = "github:nix-community/naersk";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-03-16 10:25:59 +01:00
niri = {
url = "github:sodiboo/niri-flake";
inputs = {
nixpkgs.follows = "nixpkgs";
nixpkgs-stable.follows = "nixpkgs";
};
2025-03-16 10:25:59 +01:00
};
nix-filter.url = "github:numtide/nix-filter";
2025-10-12 15:16:44 +02:00
nix-vscode-extensions = {
url = "github:nix-community/nix-vscode-extensions";
inputs.nixpkgs.follows = "nixpkgs";
};
2026-01-03 18:45:55 +01:00
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
2026-04-26 19:07:12 +02:00
nixos-raspberrypi = {
url = "github:nvmd/nixos-raspberrypi/main";
};
nova-shell = {
url = "git+https://git.berlin.ccc.de/vinzenz/nova-shell";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
nur = {
url = "github:nix-community/NUR";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
};
};
2025-05-10 13:24:08 +02:00
servicepoint-cli = {
url = "git+https://git.berlin.ccc.de/servicepoint/servicepoint-cli.git";
inputs = {
nixpkgs.follows = "nixpkgs";
naersk.follows = "naersk";
nix-filter.follows = "nix-filter";
treefmt-nix.follows = "treefmt-nix";
};
2025-05-10 13:24:08 +02:00
};
servicepoint-simulator = {
url = "git+https://git.berlin.ccc.de/servicepoint/servicepoint-simulator.git";
inputs = {
# TODO: update flake to 25.11
# nixpkgs.follows = "nixpkgs";
naersk.follows = "naersk";
nix-filter.follows = "nix-filter";
};
2025-05-10 13:24:08 +02:00
};
2025-10-12 15:16:44 +02:00
servicepoint-tanks = {
url = "git+https://git.berlin.ccc.de/vinzenz/servicepoint-tanks.git?ref=service-improvements";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:nix-community/stylix/release-25.11";
inputs = {
nixpkgs.follows = "nixpkgs";
nur.follows = "nur";
flake-parts.follows = "flake-parts";
};
};
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
zerforschen-plus = {
url = "git+https://git.berlin.ccc.de/vinzenz/zerforschen.plus";
inputs.nixpkgs.follows = "nixpkgs";
};
#keep-sorted end
};
2024-10-27 12:33:35 +01:00
outputs =
2025-12-11 22:13:32 +01:00
inputs@{
2025-03-17 19:17:16 +01:00
self,
2024-10-27 12:33:35 +01:00
nixpkgs,
# keep-sorted start
2025-03-16 10:25:59 +01:00
niri,
2025-10-12 15:16:44 +02:00
nix-vscode-extensions,
nixpkgs-unstable,
treefmt-nix,
# keep-sorted end
...
2024-10-27 12:33:35 +01:00
}:
let
inherit (nixpkgs) lib;
2026-05-01 23:20:46 +02:00
nixosConfigurations = import ./nixosConfigurations.nix { inherit inputs lib; };
supported-systems = lib.unique (lib.mapAttrsToList (_: v: v.pkgs.system) nixosConfigurations);
treefmt-config = {
projectRootFile = "flake.nix";
programs = {
nixfmt.enable = true;
jsonfmt.enable = true;
prettier.enable = true;
keep-sorted.enable = true;
};
};
forAllSystems =
f:
2025-09-13 17:49:17 +02:00
lib.genAttrs supported-systems (
system:
f rec {
inherit system;
pkgs = nixpkgs.legacyPackages.${system};
treefmt-eval = treefmt-nix.lib.evalModule pkgs treefmt-config;
}
);
2025-09-15 23:30:28 +02:00
importModuleDir =
directory:
nixpkgs.lib.packagesFromDirectoryRecursive {
inherit directory;
callPackage = path: _args: path;
};
in
2025-09-14 12:37:29 +02:00
{
overlays = {
unstable = final: prev: {
unstable = import nixpkgs-unstable {
2026-04-13 10:21:13 +02:00
localSystem = prev.stdenv.hostPlatform;
inherit (prev) config;
};
};
vscodeExtensions = nix-vscode-extensions.overlays.default;
niri = niri.overlays.niri;
};
nixosModules = importModuleDir ./nixosModules;
2025-09-15 23:30:28 +02:00
homeModules = importModuleDir ./homeModules;
homeConfigurations = {
2026-02-01 12:23:07 +01:00
muede = ./homeConfigurations/muede;
2025-09-15 23:30:28 +02:00
ronja = ./homeConfigurations/ronja;
};
2026-05-01 23:20:46 +02:00
inherit nixosConfigurations;
formatter = forAllSystems ({ treefmt-eval, ... }: treefmt-eval.config.build.wrapper);
checks = forAllSystems (
{ treefmt-eval, ... }:
{
formatting = treefmt-eval.config.build.check self;
}
);
};
}