2023-11-07 23:46:02 +00:00
{ inputs , . . . }: {
2023-06-12 10:02:01 +00:00
# debug = true;
# We only define machines config in this flake yet, so we only include
# the module that builds these. This file might get fuller, if we need to
# build our own packages, that are not flakes.
2023-11-07 23:46:02 +00:00
imports = [
./nixos/flake-module.nix
inputs . pre-commit-hooks . flakeModule
# To import a flake module
# 1. Add foo to inputs
# 2. Add foo as a parameter to the outputs function
# 3. Add here: foo.flakeModule
2023-06-12 06:34:47 +00:00
] ;
2023-11-07 23:46:02 +00:00
systems = [ " x 8 6 _ 6 4 - l i n u x " ] ;
perSystem = {
config ,
pkgs ,
2024-09-27 16:33:58 +00:00
system ,
2023-11-07 23:46:02 +00:00
. . .
} : {
devShells . default = config . pre-commit . devShell ;
pre-commit = let
generatedFiles = [
" h a r d w a r e - c o n f i g u r a t i o n \\ . n i x "
] ;
in {
check . enable = true ;
settings = {
hooks = {
nil . enable = true ;
2024-04-20 10:28:29 +00:00
statix = {
enable = true ;
settings = {
format = " s t d e r r " ;
ignore = generatedFiles ;
} ;
} ;
2023-11-07 23:46:02 +00:00
deadnix = {
enable = true ;
excludes = generatedFiles ;
} ;
alejandra . enable = true ;
} ;
} ;
} ;
formatter = pkgs . alejandra ;
# Per-system attributes can be defined here. The self' and inputs'
# module parameters provide easy access to attributes of the same
# system.
2024-09-27 16:33:58 +00:00
_module . args . pkgs = import inputs . nixpkgs {
inherit system ;
config . permittedInsecurePackages = [ " j i t s i - m e e t - 1 . 0 . 8 0 4 3 " ] ;
2024-07-10 20:56:46 +00:00
overlays = [
( _ : _ : {
alias-to-sieve = inputs . alias-to-sieve . packages . x86_64-linux . default ; # add custom package to convert alias files to sieve scripts on the stalwart machine
} )
] ;
2024-09-27 16:33:58 +00:00
} ;
2023-11-07 23:46:02 +00:00
} ;
2023-06-12 06:34:47 +00:00
# Equivalent to inputs'.nixpkgs.legacyPackages.hello;
2023-11-07 23:46:02 +00:00
# flake = {
# The usual flake attributes can be defined here, including system-
# agnostic ones like nixosModule and system-enumerating ones, although
# those are more easily expressed in perSystem.
2023-06-12 06:34:47 +00:00
2023-11-07 23:46:02 +00:00
# };
2023-06-12 06:34:47 +00:00
}