1
0
Fork 0
puter/flake.nix

106 lines
2.6 KiB
Nix
Raw Normal View History

2024-02-04 21:51:11 +01:00
{
description = "My NixOS configuration";
inputs = {
2024-03-08 22:46:46 +01:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
2025-05-30 22:59:10 +02:00
hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
treefmt = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-03-23 22:48:46 +01:00
agenix.url = "github:ryantm/agenix";
2025-05-30 22:59:10 +02:00
hardware.url = "github:NixOS/nixos-hardware";
2025-03-09 16:37:21 +01:00
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
2025-05-30 22:59:10 +02:00
nixpkgs.follows = "nixos-cosmic/nixpkgs";
2025-03-23 22:48:46 +01:00
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-05-11 22:49:04 +02:00
musicomp.url = "git+https://codeberg.org/helvetica/musicomp.git";
hxwrap.url = "git+https://codeberg.org/helvetica/hxwrap.git";
myphps.url = "git+https://codeberg.org/helvetica/myphps.git";
forgesync.url = "git+https://codeberg.org/helvetica/forgesync.git";
2025-05-18 01:08:10 +02:00
nini.url = "git+https://codeberg.org/helvetica/nini.git";
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.2";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-03-30 15:03:46 +00:00
};
2025-05-11 22:49:04 +02:00
outputs =
{
self,
nixpkgs,
flake-parts,
2025-05-30 22:59:10 +02:00
hooks,
treefmt,
2025-05-11 22:49:04 +02:00
...
}@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
2025-05-30 22:59:10 +02:00
imports = [
hooks.flakeModule
treefmt.flakeModule
2024-12-01 16:43:53 +00:00
];
2025-05-30 22:59:10 +02:00
systems = nixpkgs.lib.systems.flakeExposed;
2024-02-04 21:51:11 +01:00
2025-05-11 22:49:04 +02:00
perSystem =
{
2025-05-30 22:59:10 +02:00
config,
2025-05-11 22:49:04 +02:00
pkgs,
inputs',
...
}:
{
2025-05-30 22:59:10 +02:00
treefmt = {
projectRootFile = "flake.nix";
2025-05-30 23:22:03 +02:00
settings.global.excludes = [
"LICENSE"
"*.age"
".envrc"
];
programs = {
nixfmt = {
enable = true;
package = pkgs.nixfmt-rfc-style;
};
shfmt = {
enable = true;
indent_size = 2;
};
mdformat.enable = true;
2025-05-30 22:59:10 +02:00
};
};
pre-commit.settings.hooks = {
treefmt.enable = true;
};
2025-05-11 22:49:04 +02:00
devShells.default = pkgs.mkShellNoCC {
packages = [
inputs'.agenix.packages.default
];
2024-04-21 19:55:29 +02:00
2025-05-30 22:59:10 +02:00
shellHook = ''
${config.pre-commit.installationScript}
'';
2025-04-11 14:24:41 +02:00
};
2025-05-11 22:49:04 +02:00
};
2025-05-30 22:59:10 +02:00
flake = {
lib = nixpkgs.lib.extend (import ./lib.nix);
nixosConfigurations = self.lib.genNixosConfigurations inputs;
};
2024-03-08 22:46:46 +01:00
};
2024-02-04 21:51:11 +01:00
}