2024-10-26 00:04:27 +02:00
|
|
|
{
|
|
|
|
|
inputs = {
|
2025-12-01 17:30:51 +01:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
2025-05-01 22:19:50 +02:00
|
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
|
|
2024-10-26 00:04:27 +02:00
|
|
|
home-manager = {
|
2025-12-01 17:30:51 +01:00
|
|
|
url = "github:nix-community/home-manager/release-25.11";
|
2024-10-26 00:04:27 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2024-11-24 18:10:44 +01:00
|
|
|
|
2025-11-11 13:15:22 +01:00
|
|
|
#keep-sorted start block=yes
|
2026-04-26 19:07:12 +02:00
|
|
|
|
2025-11-11 13:15:22 +01:00
|
|
|
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";
|
|
|
|
|
};
|
2025-11-11 13:15:22 +01:00
|
|
|
naersk = {
|
|
|
|
|
url = "github:nix-community/naersk";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2025-03-16 10:25:59 +01:00
|
|
|
niri = {
|
|
|
|
|
url = "github:sodiboo/niri-flake";
|
2026-04-12 11:33:12 +02:00
|
|
|
inputs = {
|
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
|
nixpkgs-stable.follows = "nixpkgs";
|
|
|
|
|
};
|
2025-03-16 10:25:59 +01:00
|
|
|
};
|
2025-11-11 13:15:22 +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";
|
|
|
|
|
};
|
2026-04-12 11:33:12 +02:00
|
|
|
nova-shell = {
|
|
|
|
|
url = "git+https://git.berlin.ccc.de/vinzenz/nova-shell";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
|
};
|
2025-11-11 13:15:22 +01:00
|
|
|
nur = {
|
|
|
|
|
url = "github:nix-community/NUR";
|
|
|
|
|
inputs = {
|
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
|
flake-parts.follows = "flake-parts";
|
|
|
|
|
};
|
2025-04-07 19:43:41 +02:00
|
|
|
};
|
2025-05-10 13:24:08 +02:00
|
|
|
servicepoint-cli = {
|
|
|
|
|
url = "git+https://git.berlin.ccc.de/servicepoint/servicepoint-cli.git";
|
2025-11-11 13:15:22 +01:00
|
|
|
inputs = {
|
2025-12-08 19:47:58 +01:00
|
|
|
nixpkgs.follows = "nixpkgs";
|
2025-11-11 13:15:22 +01:00
|
|
|
naersk.follows = "naersk";
|
|
|
|
|
nix-filter.follows = "nix-filter";
|
2025-12-08 19:47:58 +01:00
|
|
|
treefmt-nix.follows = "treefmt-nix";
|
2025-11-11 13:15:22 +01:00
|
|
|
};
|
2025-05-10 13:24:08 +02:00
|
|
|
};
|
|
|
|
|
servicepoint-simulator = {
|
|
|
|
|
url = "git+https://git.berlin.ccc.de/servicepoint/servicepoint-simulator.git";
|
2025-11-11 13:15:22 +01:00
|
|
|
inputs = {
|
2025-12-01 17:30:51 +01:00
|
|
|
# TODO: update flake to 25.11
|
|
|
|
|
# nixpkgs.follows = "nixpkgs";
|
2025-11-11 13:15:22 +01:00
|
|
|
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 = {
|
2025-10-23 20:15:48 +02:00
|
|
|
url = "git+https://git.berlin.ccc.de/vinzenz/servicepoint-tanks.git?ref=service-improvements";
|
2025-09-16 19:50:41 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2025-06-28 09:46:08 +02:00
|
|
|
};
|
2025-11-11 13:15:22 +01:00
|
|
|
stylix = {
|
2025-12-01 17:30:51 +01:00
|
|
|
url = "github:nix-community/stylix/release-25.11";
|
2025-11-11 13:15:22 +01:00
|
|
|
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-26 00:04:27 +02:00
|
|
|
};
|
|
|
|
|
|
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,
|
|
|
|
|
home-manager,
|
2025-11-11 13:15:22 +01:00
|
|
|
# keep-sorted start
|
2025-11-15 14:13:00 +01:00
|
|
|
lanzaboote,
|
2025-03-16 10:25:59 +01:00
|
|
|
niri,
|
2025-10-12 15:16:44 +02:00
|
|
|
nix-vscode-extensions,
|
2026-01-03 18:45:55 +01:00
|
|
|
nixos-generators,
|
2026-04-26 19:07:12 +02:00
|
|
|
nixos-raspberrypi,
|
2025-11-11 13:15:22 +01:00
|
|
|
nixpkgs-unstable,
|
2025-05-10 13:24:08 +02:00
|
|
|
servicepoint-cli,
|
|
|
|
|
servicepoint-simulator,
|
2025-10-12 15:16:44 +02:00
|
|
|
servicepoint-tanks,
|
2025-11-11 13:15:22 +01:00
|
|
|
stylix,
|
|
|
|
|
treefmt-nix,
|
|
|
|
|
zerforschen-plus,
|
|
|
|
|
# keep-sorted end
|
|
|
|
|
...
|
2024-10-27 12:33:35 +01:00
|
|
|
}:
|
2025-03-15 11:03:03 +01:00
|
|
|
let
|
2026-05-01 22:04:11 +02:00
|
|
|
devices = import ./devices.nix { inherit self; };
|
2025-09-15 19:40:49 +02:00
|
|
|
inherit (nixpkgs) lib;
|
2025-09-15 19:01:30 +02:00
|
|
|
forDevice = f: lib.mapAttrs (device: value: f (value // { inherit device; })) devices;
|
|
|
|
|
supported-systems = lib.attrsets.mapAttrsToList (k: v: v.system) devices;
|
2025-11-09 14:47:03 +01:00
|
|
|
treefmt-config = {
|
|
|
|
|
projectRootFile = "flake.nix";
|
|
|
|
|
programs = {
|
|
|
|
|
nixfmt.enable = true;
|
|
|
|
|
jsonfmt.enable = true;
|
|
|
|
|
prettier.enable = true;
|
2025-11-11 12:08:04 +01:00
|
|
|
keep-sorted.enable = true;
|
2025-11-09 14:47:03 +01:00
|
|
|
};
|
|
|
|
|
};
|
2025-09-12 23:51:00 +02:00
|
|
|
forAllSystems =
|
|
|
|
|
f:
|
2025-09-13 17:49:17 +02:00
|
|
|
lib.genAttrs supported-systems (
|
2025-09-12 23:51:00 +02:00
|
|
|
system:
|
|
|
|
|
f rec {
|
|
|
|
|
inherit system;
|
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
2025-11-09 14:47:03 +01:00
|
|
|
treefmt-eval = treefmt-nix.lib.evalModule pkgs treefmt-config;
|
2025-09-12 23:51:00 +02:00
|
|
|
}
|
|
|
|
|
);
|
2025-09-15 23:30:28 +02:00
|
|
|
importModuleDir =
|
|
|
|
|
directory:
|
|
|
|
|
nixpkgs.lib.packagesFromDirectoryRecursive {
|
|
|
|
|
inherit directory;
|
|
|
|
|
callPackage = path: _args: path;
|
|
|
|
|
};
|
2025-03-15 11:03:03 +01:00
|
|
|
in
|
2025-09-14 12:37:29 +02:00
|
|
|
{
|
2025-09-15 19:40:49 +02:00
|
|
|
overlays = {
|
|
|
|
|
unstable-packages = final: prev: {
|
|
|
|
|
unstable = import nixpkgs-unstable {
|
2026-04-13 10:21:13 +02:00
|
|
|
localSystem = prev.stdenv.hostPlatform;
|
|
|
|
|
inherit (prev) config;
|
2025-09-15 19:40:49 +02:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-15 23:30:28 +02:00
|
|
|
nixosModules = (importModuleDir ./nixosModules) // {
|
2025-11-02 01:19:27 +01:00
|
|
|
niri =
|
|
|
|
|
{ pkgs, ... }:
|
|
|
|
|
{
|
|
|
|
|
imports = [ niri.nixosModules.niri ];
|
|
|
|
|
nixpkgs.overlays = [ niri.overlays.niri ];
|
|
|
|
|
|
|
|
|
|
programs.niri = {
|
|
|
|
|
enable = true;
|
|
|
|
|
#package = pkgs.niri-stable;
|
|
|
|
|
};
|
|
|
|
|
};
|
2025-09-15 19:40:49 +02:00
|
|
|
pkgs-unstable = {
|
|
|
|
|
nixpkgs.overlays = [ self.overlays.unstable-packages ];
|
|
|
|
|
};
|
|
|
|
|
pkgs-vscode-extensions = {
|
|
|
|
|
nixpkgs.overlays = [ nix-vscode-extensions.overlays.default ];
|
|
|
|
|
};
|
|
|
|
|
# required modules to use other modules, should not do anything on their own
|
|
|
|
|
default = {
|
|
|
|
|
imports = [ self.nixosModules.allowed-unfree-list ];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
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;
|
|
|
|
|
};
|
2025-09-15 19:40:49 +02:00
|
|
|
|
2025-03-15 11:03:03 +01:00
|
|
|
nixosConfigurations = forDevice (
|
2025-09-15 19:01:30 +02:00
|
|
|
{
|
|
|
|
|
device,
|
|
|
|
|
system,
|
|
|
|
|
home-manager-users ? { },
|
2026-04-29 23:58:15 +02:00
|
|
|
nixosSystem ? nixpkgs.lib.nixosSystem,
|
2026-05-01 21:17:51 +02:00
|
|
|
...
|
2025-09-15 19:01:30 +02:00
|
|
|
}:
|
2025-05-10 13:24:08 +02:00
|
|
|
let
|
2025-12-11 22:13:32 +01:00
|
|
|
specialArgs = inputs // {
|
2026-05-01 21:17:51 +02:00
|
|
|
inherit device home-manager-users devices;
|
2025-05-10 13:24:08 +02:00
|
|
|
};
|
|
|
|
|
in
|
2026-04-26 19:07:12 +02:00
|
|
|
nixosSystem {
|
2026-04-13 10:21:13 +02:00
|
|
|
inherit specialArgs;
|
2025-09-06 19:16:13 +02:00
|
|
|
modules = [
|
2025-09-13 15:25:54 +02:00
|
|
|
{
|
2025-12-11 22:13:32 +01:00
|
|
|
imports = [
|
2026-04-29 23:58:15 +02:00
|
|
|
./nixosConfigurations/${device}
|
2025-12-11 22:13:32 +01:00
|
|
|
self.nixosModules.global-settings
|
|
|
|
|
]
|
|
|
|
|
++ (lib.optionals (home-manager-users != { }) [
|
|
|
|
|
self.nixosModules.global-settings-desktop
|
|
|
|
|
]);
|
|
|
|
|
|
2025-09-14 14:01:42 +02:00
|
|
|
nixpkgs = {
|
|
|
|
|
hostPlatform = lib.mkDefault system;
|
|
|
|
|
};
|
2025-09-13 15:25:54 +02:00
|
|
|
}
|
2025-12-11 22:13:32 +01:00
|
|
|
];
|
2025-03-15 11:03:03 +01:00
|
|
|
}
|
|
|
|
|
);
|
2025-11-09 14:47:03 +01:00
|
|
|
|
|
|
|
|
formatter = forAllSystems ({ treefmt-eval, ... }: treefmt-eval.config.build.wrapper);
|
|
|
|
|
|
|
|
|
|
checks = forAllSystems (
|
|
|
|
|
{ treefmt-eval, ... }:
|
|
|
|
|
{
|
|
|
|
|
formatting = treefmt-eval.config.build.check self;
|
|
|
|
|
}
|
|
|
|
|
);
|
2024-10-26 00:04:27 +02:00
|
|
|
};
|
|
|
|
|
}
|