-
-
Notifications
You must be signed in to change notification settings - Fork 8
default template includes routes.nix example and tests with namespaces and angle-brackets. #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,53 @@ | ||||||
| # This example implements an aspect "routing" pattern. | ||||||
| # | ||||||
| # Unlike `den.default` which is `parametric.atLeast` we use `parametric.exactly` here | ||||||
| # to be more strict and prevent multiple values inclusion. | ||||||
| # | ||||||
| # Be sure to read: https://vic.github.io/den/dependencies.html | ||||||
| # See usage at: defaults.nix, alice.nix, igloo.nix | ||||||
| # | ||||||
| { den, eg, ... }: | ||||||
| { | ||||||
| # Usage: `den.default.includes [ eg.routes ]` | ||||||
| eg.routes = | ||||||
| let | ||||||
| inherit (den.lib) parametric; | ||||||
|
|
||||||
| os-from-user = | ||||||
| { | ||||||
| user, | ||||||
| host, | ||||||
| # deadnix: skip | ||||||
| OS, | ||||||
| # deadnix: skip | ||||||
| fromUser, | ||||||
| }: | ||||||
| parametric { inherit user host; } (mutual user host); | ||||||
|
|
||||||
| hm-from-host = | ||||||
| { | ||||||
| user, | ||||||
| host, | ||||||
| # deadnix: skip | ||||||
| HM, | ||||||
| # deadnix: skip | ||||||
| fromHost, | ||||||
| }: | ||||||
| parametric { inherit user host; } (mutual host user); | ||||||
vic marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
|
||||||
| mutual = from: to: { | ||||||
| includes = [ | ||||||
| # eg, `<user>._.<host>` and `<host>._.<user>` | ||||||
vic marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| # eg, `<user>._.<host>` and `<host>._.<user>` | |
| # e.g., `<user>._.<host>` and `<host>._.<user>` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Some CI checks to ensure this template always works. | ||
| # Feel free to adapt or remove when this repo is yours. | ||
| { inputs, ... }: | ||
| { | ||
| perSystem = | ||
| { pkgs, self', ... }: | ||
| let | ||
| checkCond = name: cond: pkgs.runCommandLocal name { } (if cond then "touch $out" else ""); | ||
vic marked this conversation as resolved.
Show resolved
Hide resolved
vic marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| apple = inputs.self.darwinConfigurations.apple.config; | ||
| igloo = inputs.self.nixosConfigurations.igloo.config; | ||
| alice-at-igloo = igloo.home-manager.users.alice; | ||
| vmBuilds = !pkgs.stdenvNoCC.isLinux || builtins.pathExists (self'.packages.vm + "/bin/vm"); | ||
| iglooBuilds = !pkgs.stdenvNoCC.isLinux || builtins.pathExists (igloo.system.build.toplevel); | ||
| appleBuilds = !pkgs.stdenvNoCC.isDarwin || builtins.pathExists (apple.system.build.toplevel); | ||
| in | ||
| { | ||
| checks."igloo builds" = checkCond "igloo-builds" iglooBuilds; | ||
| checks."apple builds" = checkCond "apple-builds" appleBuilds; | ||
| checks."vm builds" = checkCond "vm-builds" vmBuilds; | ||
|
|
||
| checks."alice enabled igloo nh" = checkCond "alice.provides.igloo" igloo.programs.nh.enable; | ||
| checks."igloo enabled alice helix" = | ||
| checkCond "igloo.provides.alice" alice-at-igloo.programs.helix.enable; | ||
| }; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,5 @@ | ||
| User TODO: REMOVE this directory (or disable its import from den.nix) | ||
|
|
||
| It is used to implement tests for all den feature so we can validate at CI. | ||
| It is used to implement tests for all den features so we can validate at CI. | ||
|
|
||
| Use it as reference to see how den features are used, | ||
| however, be aware that this might not be the best practices for file/aspect | ||
| organization. | ||
|
|
||
| For a more "real-world" layout, see the `_profile` directory | ||
| which is somewhat inspired on the | ||
| dendritic implementation at [vic/vix](https://github.com/vic/vix/tree/8c8c7b8). | ||
|
|
||
| However, feel free to also not use any predefined layout, explore by yourself | ||
| and find out how things work for you. Be sure to share your insights with | ||
| the [community](https://github.com/vic/den/discussions) | ||
| Use it as reference to see how den features are used, however, be aware that this might not be the best practices for file/aspect organization. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { inputs, den, ... }: | ||
| { | ||
| imports = [ (inputs.den.namespace "eg" false) ]; | ||
| _module.args.__findFile = den.lib.__findFile; | ||
| } |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.