2022-05-09 13:20:43 +02:00
{ description = (
" W o r k I n P r o g r e s s : a c o l l e c t i o n o f N i x t h i n g s t h a t a r e u s e d i n m o r e t h a n o n e p r o j e c t , b u t a r e n ' t r e f i n e d e n o u g h t o b e s t a n d a l o n e l i b r a r i e s / m o d u l e s / . . . ( y e t ) . "
2022-07-29 12:49:55 +02:00
# This flake file defines the inputs (other than except some files/archives fetched by hardcoded hash) and exports all results produced by this repository.
# It should always pass »nix flake check« and »nix flake show --allow-import-from-derivation«, which means inputs and outputs comply with the flake convention.
2022-05-09 13:20:43 +02:00
) ; inputs = {
# To update »./flake.lock«: $ nix flake update
2022-12-27 15:37:27 +01:00
nixpkgs = { url = " g i t h u b : N i x O S / n i x p k g s / n i x o s - 2 2 . 1 1 " ; } ;
2022-11-30 13:41:21 +01:00
nixos-hardware = { url = " g i t h u b : N i x O S / n i x o s - h a r d w a r e / m a s t e r " ; } ;
improve installation, add support for:
ZFS, encryption (keys, keystore, LUKS), bootFS, ephemeral root (tmpfs, ZFS, F2FS, ...), testing in qemu, options & debugging, ... and many small things
2022-05-31 03:41:28 +02:00
config = { type = " g i t h u b " ; owner = " N i k l a s G o l l e n s t e d e " ; repo = " n i x - w i p l i b " ; dir = " e x a m p l e / d e f a u l t C o n f i g " ; rev = " 5 e 9 c c 7 c e 3 4 4 0 b e 9 c e 6 a e e a e d c c 7 0 d b 9 c 8 0 4 8 9 c 5 f " ; } ; # Use some previous commit's »./example/defaultConfig/flake.nix« as the default config for this flake.
2022-05-09 13:20:43 +02:00
} ; outputs = inputs : let patches = {
2022-07-29 12:49:55 +02:00
nixpkgs = [ # Can define a list of patches for each input here:
# { url = "https://github.com/NixOS/nixpkgs/pull/###.diff"; sha256 = inputs.nixpkgs.lib.fakeSha256; } # Path from URL.
# ./patches/nixpkgs-fix-systemd-boot-install.patch # Local path file. (use long native / direct path to ensure it only changes if the content does)
# ./patches/nixpkgs-test.patch # After »nix build«, check »result/inputs/nixpkgs/patched!« to see that these patches were applied.
2022-05-09 13:20:43 +02:00
] ;
2022-06-28 05:00:48 +02:00
} ; in ( import " ${ ./. } / l i b / f l a k e s . n i x " " ${ ./. } / l i b " inputs ) . patchFlakeInputsAndImportRepo inputs patches ./. ( inputs @ { self , nixpkgs , . . . }: repo @ { overlays , lib , . . . }: let
2022-05-09 13:20:43 +02:00
in [ # Run »nix flake show --allow-import-from-derivation« to see what this merges to:
2022-07-29 12:49:55 +02:00
repo # lib.* nixosModules.* overlays.*
2022-12-27 15:37:27 +01:00
( lib . wip . mkSystemsFlake { inherit inputs ; } ) # nixosConfigurations.* apps.*-linux.* devShells.*-linux.* packages.*-linux.all-systems
2022-07-29 12:49:55 +02:00
( lib . wip . forEachSystem [ " a a r c h 6 4 - l i n u x " " x 8 6 _ 6 4 - l i n u x " ] ( localSystem : { # packages.*-linux.* defaultPackage.*-linux
2022-06-28 05:00:48 +02:00
packages = builtins . removeAttrs ( lib . wip . getModifiedPackages ( lib . wip . importPkgs inputs { system = localSystem ; } ) overlays ) [ " l i b b l o c k d e v " ] ;
2022-07-29 12:49:55 +02:00
defaultPackage = self . packages . ${ localSystem } . all-systems ;
2022-05-09 13:20:43 +02:00
} ) )
2022-07-29 12:49:55 +02:00
{ patches = ( lib . wip . importWrapped inputs " ${ self } / p a t c h e s " ) . result ; } # patches.*
2022-05-09 13:20:43 +02:00
] ) ; }