$ nix-instantiate --eval test.nix --strict
{ noOrder = [ "lumina" "gnome3" "plasma5" ]; order = [ "gnome3" "plasma5" "lumina" ]; }
Created
June 4, 2017 03:50
-
-
Save ericsagnes/10eb6421f9e5b994a43b18cee78b6514 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
lib = import <nixpkgs/lib>; | |
noOrder = import <nixpkgs/nixos/lib/eval-config.nix> { | |
modules = [ | |
{ | |
options.list = with lib; mkOption { | |
type = with types; listOf str; | |
description = ""; | |
default = []; | |
}; | |
} | |
{ | |
config.list = [ "plasma5" ]; | |
} | |
{ | |
config.list = [ "gnome3" ]; | |
} | |
{ | |
config.list = [ "lumina" ]; | |
} | |
]; | |
}; | |
order = import <nixpkgs/nixos/lib/eval-config.nix> { | |
modules = [ | |
{ | |
options.list = with lib; mkOption { | |
type = with types; listOf str; | |
description = ""; | |
default = []; | |
}; | |
} | |
{ | |
config.list = lib.mkOrder 910 [ "plasma5" ]; | |
} | |
{ | |
config.list = lib.mkOrder 900 [ "gnome3" ]; | |
} | |
{ | |
config.list = lib.mkOrder 920 [ "lumina" ]; | |
} | |
]; | |
}; | |
in { | |
noOrder = noOrder.config.list; | |
order = order.config.list; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment