feat(installer): implement single-input flake architecture

- Refactor generated flake.nix to use the Appliance Model.
- Downstream flake now only defines the 'nomarchy' input.
- Dependencies (nixpkgs, home-manager) are inherited from nomarchy.inputs to ensure maximum stability and version alignment with upstream.
This commit is contained in:
Bernardo Magri
2026-05-01 16:51:53 +01:00
parent 3b977f181d
commit 0306dff092

View File

@@ -1369,13 +1369,7 @@ generate_flake_config() {
description = "My Nomarchy Configuration"; description = "My Nomarchy Configuration";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nomarchy.url = "$nomarchy_url"; nomarchy.url = "$nomarchy_url";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
# Two-track Nomarchy workflow: # Two-track Nomarchy workflow:
@@ -1384,8 +1378,9 @@ generate_flake_config() {
# #
# Both consume the same \`pkgs\` below so overlays and allowUnfree stay in # Both consume the same \`pkgs\` below so overlays and allowUnfree stay in
# sync across the two paths. # sync across the two paths.
outputs = { self, nixpkgs, nomarchy, home-manager, nixos-hardware, ... }@inputs: outputs = { self, nomarchy, ... }@inputs:
let let
inherit (nomarchy.inputs) nixpkgs home-manager;
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
@@ -1396,7 +1391,7 @@ generate_flake_config() {
{ {
nixosConfigurations.$HOSTNAME = nixpkgs.lib.nixosSystem { nixosConfigurations.$HOSTNAME = nixpkgs.lib.nixosSystem {
inherit pkgs; inherit pkgs;
specialArgs = { inputs = nomarchy.inputs // inputs; }; specialArgs = { inputs = nomarchy.inputs; };
modules = [ modules = [
./hardware-configuration.nix ./hardware-configuration.nix
./hardware-selection.nix ./hardware-selection.nix
@@ -1410,7 +1405,7 @@ generate_flake_config() {
# NixOS config so dotfile/theme iterations don't rebuild the system. # NixOS config so dotfile/theme iterations don't rebuild the system.
homeConfigurations.$USERNAME = home-manager.lib.homeManagerConfiguration { homeConfigurations.$USERNAME = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
extraSpecialArgs = { inputs = nomarchy.inputs // inputs; }; extraSpecialArgs = { inputs = nomarchy.inputs; };
modules = [ modules = [
nomarchy.nixosModules.home nomarchy.nixosModules.home
./home.nix ./home.nix