2022-06-03 17:47:16 +02:00
|
|
|
{
|
|
|
|
description = "NixOS configuration";
|
|
|
|
inputs = {
|
2024-11-07 23:55:28 +01:00
|
|
|
# nix.url = "github:NixOS/nix";
|
2024-11-22 20:30:26 +01:00
|
|
|
nixpkgs.url = "nixpkgs/nixos-24.11";
|
2022-06-03 17:47:16 +02:00
|
|
|
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
|
|
|
|
2022-12-25 12:03:56 +01:00
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
2022-11-10 20:23:50 +01:00
|
|
|
|
2024-04-24 18:07:35 +02:00
|
|
|
git-hooks = {
|
|
|
|
url = "github:cachix/git-hooks.nix";
|
2022-11-23 22:57:09 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-07-30 15:00:18 +02:00
|
|
|
|
2022-06-03 17:47:16 +02:00
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
2022-06-03 23:33:25 +02:00
|
|
|
|
2024-12-14 13:34:21 +01:00
|
|
|
nixinate = {
|
|
|
|
url = "github:matthewcroughan/nixinate";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-06-03 23:33:25 +02:00
|
|
|
|
2022-11-10 20:23:50 +01:00
|
|
|
sops-nix = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-06-26 18:15:03 +02:00
|
|
|
|
2023-03-10 21:41:41 +01:00
|
|
|
nixos-generators = {
|
|
|
|
url = "github:nix-community/nixos-generators";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2023-03-18 16:58:18 +01:00
|
|
|
disko = {
|
|
|
|
url = "github:nix-community/disko";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2025-05-04 20:20:28 +02:00
|
|
|
framework-plymouth = {
|
|
|
|
url = "github:j-pap/framework-plymouth";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2023-03-10 21:41:41 +01:00
|
|
|
# own flakes
|
2022-06-26 18:15:03 +02:00
|
|
|
stunkymonkey = {
|
|
|
|
url = "github:Stunkymonkey/stunkymonkey.de";
|
2022-11-10 20:23:50 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
passworts = {
|
2022-11-23 22:57:09 +01:00
|
|
|
url = "github:Stunkymonkey/passworts";
|
2022-11-10 20:23:50 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2022-06-26 18:15:03 +02:00
|
|
|
};
|
2022-06-03 17:47:16 +02:00
|
|
|
};
|
2022-11-10 20:23:50 +01:00
|
|
|
|
2024-07-28 21:08:02 +02:00
|
|
|
outputs =
|
|
|
|
inputs@{
|
|
|
|
self,
|
|
|
|
flake-parts,
|
|
|
|
nixinate,
|
|
|
|
...
|
|
|
|
}:
|
2022-12-25 12:03:56 +01:00
|
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
2022-11-23 22:57:09 +01:00
|
|
|
|
2022-07-24 17:37:30 +02:00
|
|
|
imports = [
|
2022-12-05 20:32:39 +01:00
|
|
|
./machines/configurations.nix
|
2023-03-12 18:50:22 +01:00
|
|
|
./images/flake-module.nix
|
2024-04-24 18:07:35 +02:00
|
|
|
inputs.git-hooks.flakeModule
|
2022-07-24 17:37:30 +02:00
|
|
|
];
|
2022-11-23 22:57:09 +01:00
|
|
|
|
2024-07-28 21:08:02 +02:00
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
];
|
2022-11-23 22:57:09 +01:00
|
|
|
|
2024-07-28 21:08:02 +02:00
|
|
|
perSystem =
|
|
|
|
{
|
|
|
|
inputs',
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
system,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
|
|
|
# make pkgs available to all `perSystem` functions
|
2025-05-04 20:20:28 +02:00
|
|
|
_module.args.pkgs = import inputs.nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
};
|
2022-11-23 22:57:09 +01:00
|
|
|
|
2024-07-28 21:08:02 +02:00
|
|
|
# enable pre-commit checks
|
|
|
|
pre-commit.settings = {
|
|
|
|
hooks = {
|
|
|
|
deadnix = {
|
|
|
|
enable = true;
|
|
|
|
settings.noLambdaPatternNames = true;
|
|
|
|
};
|
2025-05-04 13:00:24 +02:00
|
|
|
flake-checker.enable = true;
|
2024-07-28 21:08:02 +02:00
|
|
|
markdownlint.enable = true;
|
2024-09-10 20:31:28 +02:00
|
|
|
nixfmt-rfc-style.enable = true;
|
2024-07-28 21:08:02 +02:00
|
|
|
shellcheck.enable = true;
|
|
|
|
statix.enable = true;
|
|
|
|
typos = {
|
|
|
|
enable = true;
|
|
|
|
excludes = [
|
|
|
|
"secrets\\.yaml"
|
|
|
|
"\\.sops\\.yaml"
|
|
|
|
];
|
2024-08-11 14:34:37 +02:00
|
|
|
settings.ignored-words = [
|
|
|
|
"flate"
|
|
|
|
"hda"
|
|
|
|
];
|
2024-07-28 21:08:02 +02:00
|
|
|
};
|
|
|
|
yamllint = {
|
|
|
|
enable = true;
|
|
|
|
excludes = [ "secrets\\.yaml" ];
|
|
|
|
};
|
2023-07-30 12:51:21 +02:00
|
|
|
};
|
2022-11-23 22:57:09 +01:00
|
|
|
};
|
|
|
|
|
2024-07-28 21:08:02 +02:00
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
inputsFrom = [ config.pre-commit.devShell ];
|
|
|
|
nativeBuildInputs = with pkgs; [
|
2024-11-07 23:55:28 +01:00
|
|
|
# inputs'.nix.packages.nix
|
2024-07-28 21:08:02 +02:00
|
|
|
inputs'.sops-nix.packages.sops-import-keys-hook
|
|
|
|
inputs'.disko.packages.disko
|
|
|
|
];
|
|
|
|
};
|
2024-11-08 00:19:17 +01:00
|
|
|
# workaround for https://github.com/MatthewCroughan/nixinate/issues/12
|
|
|
|
apps = (nixinate.nixinate.${system} self).nixinate;
|
2022-11-23 22:57:09 +01:00
|
|
|
};
|
2022-07-24 17:37:30 +02:00
|
|
|
};
|
2022-06-03 17:47:16 +02:00
|
|
|
}
|