I try to redo setup using flake-parts, as wiki does not mention how to enable lock flattening with default flakes and in general favors this way of installation. i have something like that:
inputs:
let
system = "x86_64-linux";
username = "maksym";
nixDir = "/home/${username}/nixos";
pkgsConfig = {
allowUnfree = true;
};
in
{
imports = [ ./inputs.nix ];
systems = [ system ];
flake = {
nixosConfigurations.nixos = inputs.nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit
inputs
username
pkgsConfig
nixDir
;
inherit (inputs) self;
};
modules = [
(inputs.import-tree ./host)
(inputs.import-tree ./modules)
(inputs.import-tree ./secrets)
];
};
};
}
And, when i try to run this i get error: attribute 'nixpkgs' missing for nixosConfigurations.nixos = inputs.nixpkgs.lib.nixosSystem.
part of inputs.nix:
{
flake-file.inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
}
Maybe I am not smart enough, but in general documentation omits too much as an exercise to the reader. For example, no templates actually show usage of inputs you added
I try to redo setup using flake-parts, as wiki does not mention how to enable lock flattening with default flakes and in general favors this way of installation. i have something like that:
And, when i try to run this i get
error: attribute 'nixpkgs' missingfornixosConfigurations.nixos = inputs.nixpkgs.lib.nixosSystem.part of inputs.nix:
Maybe I am not smart enough, but in general documentation omits too much as an exercise to the reader. For example, no templates actually show usage of inputs you added