Compare commits

...

2 Commits

Author SHA1 Message Date
b8e37d3eeb flake: move old let block to config.flake scope 2025-02-07 02:11:24 +00:00
c7d841b3e8 flake.nix: move main flake into config block
grrr why do people always insist on dumping options into the main block
of the module
2025-02-07 02:01:20 +00:00
3 changed files with 440 additions and 414 deletions

View File

@ -1,3 +1,4 @@
# vim: set foldmethod=marker:
{ {
description = "NixOS Configuration"; description = "NixOS Configuration";
@ -109,11 +110,27 @@
flake-parts, flake-parts,
... ...
} @ inputs: } @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} ({ flake-parts.lib.mkFlake {inherit inputs;} (
{
inputs, inputs,
self, self,
config,
lib,
... ...
} @ flakeArgs: let } @ flakeArgs: {
# flake-parts imports
imports = [
./flake
];
config = {
# flake-parts systems (still uses nix-systems)
systems = import inputs.systems;
debug = lib.mkDefault true;
flake = let
# {{{
inherit (inputs) nixpkgs nixpkgs-unstable; inherit (inputs) nixpkgs nixpkgs-unstable;
inherit (self) outputs; inherit (self) outputs;
# inputs is already defined # inputs is already defined
@ -400,8 +417,8 @@
} }
// builtins.removeAttrs args // builtins.removeAttrs args
["system" "nixpkgs" "home-manager" "modules" "username" "homeDirectory" "stateVersion" "entrypoint" "config"]); ["system" "nixpkgs" "home-manager" "modules" "username" "homeDirectory" "stateVersion" "entrypoint" "config"]);
# }}}
in { in {
flake = {
# for repl debugging via :lf . # for repl debugging via :lf .
inherit inputs vars; inherit inputs vars;
@ -555,8 +572,9 @@
}; };
}; };
}; };
systems = (import inputs.systems); };
}); # end outputs }
); # end outputs
} }
# end flake # end flake

6
flake/default.nix Normal file
View File

@ -0,0 +1,6 @@
{ ... }:
{
imports = [
./packages.nix
];
}

2
flake/packages.nix Normal file
View File

@ -0,0 +1,2 @@
{ ... }: {
}