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 ) . "
/* *
* This flake file defines the main inputs ( all except for some files/archives fetched by hardcoded hash ) and exports almost all usable results .
* 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 .
* /
) ; inputs = {
# To update »./flake.lock«: $ nix flake update
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
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 . 0 5 " ; } ;
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 = {
nixpkgs = [
2022-05-18 16:06:27 +02:00
# ./patches/nixpkgs-test.patch # after »nix build«, check »result/inputs/nixpkgs/patched!« to see that these patches were applied
# ./patches/nixpkgs-fix-systemd-boot-install.patch
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
2022-05-18 16:06:27 +02:00
systemsFlake = lib . wip . mkSystemsFlake ( rec {
2022-06-28 05:00:48 +02:00
#systems = { dir = "${self}/hosts"; exclude = [ ]; }; # (implicit)
2022-05-09 13:20:43 +02:00
inherit inputs ;
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
scripts = ( lib . attrValues lib . wip . setup-scripts ) ++ [ ./example/install.sh.md ] ;
2022-05-09 13:20:43 +02:00
} ) ;
in [ # Run »nix flake show --allow-import-from-derivation« to see what this merges to:
repo
( if true then systemsFlake else { } )
( 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 : {
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-05-09 13:20:43 +02:00
defaultPackage = systemsFlake . packages . ${ localSystem } . all-systems ;
} ) )
2022-06-28 05:00:48 +02:00
{ patches = ( lib . wip . importWrapped inputs " ${ self } / p a t c h e s " ) . result ; }
2022-05-09 13:20:43 +02:00
] ) ; }