mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-06-18 10:29:13 +02:00
flake.nix: passthru machine config, pkgs and config.system.build
This shortens down the path needed to build both overlayed packages and all the other machine derivations. Here are some examples: ``` nix build .#machine.etc nix build '.#machine.units."nginx.service".unit' nix build .#machine.pkgs.overlayed-package nix build .#machine.config.services.nginx.package ```
This commit is contained in:
@@ -369,7 +369,12 @@
|
||||
//
|
||||
# Machines
|
||||
lib.genAttrs allMachines
|
||||
(machine: self.nixosConfigurations.${machine}.config.system.build.toplevel)
|
||||
(machine: self.nixosConfigurations.${machine}.config.system.build.toplevel.overrideAttrs (prev: {
|
||||
passthru =
|
||||
(prev.passthru or { })
|
||||
// self.nixosConfigurations.${machine}.config.system.build
|
||||
// { inherit (self.nixosConfigurations.${machine}) pkgs config; };
|
||||
}))
|
||||
//
|
||||
# Nix-topology
|
||||
(let
|
||||
|
||||
Reference in New Issue
Block a user