forked from zentralwerk/network
nix/nixos-modules -> nix/nixos-module
This commit is contained in:
parent
ce4bda8862
commit
1119f72162
|
@ -20,7 +20,7 @@
|
|||
);
|
||||
|
||||
nixosModule = { ... }: {
|
||||
imports = nixpkgs.lib.filesystem.listFilesRecursive ./nix/nixos-modules;
|
||||
imports = [ ./nix/nixos-module ];
|
||||
};
|
||||
|
||||
nixosConfigurations.test_vm =
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (config.networking) hostName;
|
||||
inherit (lib) optional;
|
||||
|
||||
startsWith = prefix: s:
|
||||
builtins.substr 0 (builtins.stringLength prefix) s == prefix;
|
||||
|
||||
isServer = startsWith "server" hostName;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./defaults.nix
|
||||
]
|
||||
++ optional isServer [
|
||||
./lxc-containers.nix
|
||||
]
|
||||
++ optional !isServer [
|
||||
./container.nix
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue