Modular, context-aware and aspect-oriented dendritic Nix configurations. Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/ den.oeiuwq.com
configurations den dendritic nix aspect oriented

Only apply unfree to nixos/darwin/homeManager (#196)

Here's my example failing test demonstrating #195.

authored by

Oscar Marshall and committed by
GitHub
0aca7611 d04627c6

+23 -4
+12 -4
modules/aspects/provides/unfree/unfree.nix
··· 1 - { den, ... }: 2 1 let 3 2 description = '' 4 3 A class generic aspect that enables unfree packages by name. ··· 15 14 __functor = 16 15 _self: allowed-names: 17 16 { class, aspect-chain }: 18 - den.lib.take.unused aspect-chain { 19 - ${class}.unfree.packages = allowed-names; 20 - }; 17 + if 18 + (builtins.elem class [ 19 + "nixos" 20 + "darwin" 21 + "homeManager" 22 + ]) 23 + then 24 + { 25 + ${class}.unfree.packages = allowed-names; 26 + } 27 + else 28 + { }; 21 29 in 22 30 { 23 31 den.provides.unfree = {
+11
templates/ci/modules/features/batteries/unfree.nix
··· 24 24 } 25 25 ); 26 26 27 + test-user-class-works = denTest ( 28 + { den, igloo, ... }: 29 + { 30 + den.hosts.x86_64-linux.igloo.users.tux = { }; 31 + den.aspects.tux.includes = [ (den._.unfree [ "vscode" ]) ]; 32 + 33 + expr = !(igloo.users.users.tux ? unfree); 34 + expected = true; 35 + } 36 + ); 37 + 27 38 }; 28 39 }