Add flake-parts TODO, update comments
This commit is contained in:
parent
cb06c56f96
commit
0926aa6ff8
12
flake.nix
12
flake.nix
@ -242,9 +242,15 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO rewrite this so it follows the same wrapper pattern as mkHome
|
# TODO rewrite this so it follows the same wrapper pattern as
|
||||||
# This function produces a nixosSystem which imports configuration.nix and
|
# mkHome This function produces a nixosSystem which imports
|
||||||
# a Home Manager home.nix for the given user from ./hosts/${hostname}/
|
# configuration.nix and a Home Manager home.nix for the given user
|
||||||
|
# from ./hosts/${hostname}/
|
||||||
|
#
|
||||||
|
# nevermind i am migrating everything to flake-parts, i'm glad i
|
||||||
|
# never got around to this. i think the module system takes care of
|
||||||
|
# whatever the fuck godforsaken use-case i had for rewriting this
|
||||||
|
# (more ergonomic and/or default arguments or something).
|
||||||
mkSystemN = let
|
mkSystemN = let
|
||||||
_username = username;
|
_username = username;
|
||||||
_overlays = overlays;
|
_overlays = overlays;
|
||||||
|
31
flake/TODO.md
Normal file
31
flake/TODO.md
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# flake-parts TODO
|
||||||
|
|
||||||
|
- Move logic for generating system/home configs to module (most important,
|
||||||
|
reason i wanted to use flake-parts)
|
||||||
|
- Move common default args from the awful wrapper function to dedicated options:
|
||||||
|
- default module imports
|
||||||
|
- "common" module
|
||||||
|
- currently defines stateVersion, nixpkgs.config.allowUnfree, a few others
|
||||||
|
- make default module path configurable, but still default to
|
||||||
|
`./hosts/${hostname}/configuration.nix`
|
||||||
|
- make "entrypoint" (`./system`, `./home/standalone.nix`, etc) configurable
|
||||||
|
- make nixfiles home manager initialization a configurable option
|
||||||
|
- specialArgs (i want to deprecate this but one thing at a time)
|
||||||
|
- define system "types" and generate all of them internally using lazy
|
||||||
|
eval. export a specific one to the flake outputs.
|
||||||
|
- generate as something like `nixfiles.hosts.<name>.outputs`
|
||||||
|
- `flake.nixosConfigurations.<name>` is set from `nixfiles.hosts.<name>.output`
|
||||||
|
- default chosen by option like `nixfiles.hosts.<name>.type`
|
||||||
|
- types:
|
||||||
|
- normal
|
||||||
|
- WSL
|
||||||
|
- ISO image
|
||||||
|
- define deploy-rs outputs in same section as hosts
|
||||||
|
- make common, central interface for configuring overlays to be consumed by
|
||||||
|
various parts of flake, move hard-coded overlays out of common module
|
||||||
|
- literally just a list, maybe process it using lib.composeManyExtensions
|
||||||
|
- some top-level config is okay (e.g., defining hosts using nixfiles options).
|
||||||
|
hide away all of the internal logic into imported modules.
|
||||||
|
- move random functions into nixfiles lib
|
||||||
|
- move top-level universal configs (username, mobileTimeZone) into option
|
||||||
|
(honestly, this alone makes flake-parts worth it)
|
@ -1,4 +1,8 @@
|
|||||||
{ pkgs, config, lib, options, nixpkgs, home-manager, inputs, utils, ... }@args:
|
{ pkgs, config, lib, options, nixpkgs, home-manager, inputs, utils, ... }@args:
|
||||||
|
# ^ all these args are yucky and non-portable, replace them with a module
|
||||||
|
# called from the scope of the flake that brings relevant
|
||||||
|
# inputs/outputs/overlays/etc into scope. this might even make nixfiles
|
||||||
|
# portable (it still shouldn't be imported by other flakes probably)
|
||||||
let
|
let
|
||||||
cfg = config.nixfiles;
|
cfg = config.nixfiles;
|
||||||
flakeType = cfg.lib.types.flake;
|
flakeType = cfg.lib.types.flake;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user