-
Notifications
You must be signed in to change notification settings - Fork 2
/
root.nix
33 lines (32 loc) · 1.17 KB
/
root.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
let
pkgs = import <nixpkgs> {};
callPackage = pkgs.newScope self;
self = rec {
termcolor = callPackage ./termcolor.nix {};
fusenar = callPackage ./default.nix {};
inputs = callPackage ./inputs.nix {};
data_files = callPackage ./datafiles.nix { files = [ inputs inputs.file tiny_container_bare.config.system.build.etc ]; };
do_test = callPackage ./test.nix {};
tiny_container_bare = (import <nixpkgs/nixos> {
configuration = { ... }:
{
boot.isContainer = true;
nix.readOnlyStore = false;
users.users.root.password = "root";
networking.hostName = "fuse-container";
};
});
tiny_container = tiny_container_bare.config.system.build.toplevel;
container_data = callPackage ./datafiles.nix { files = [ tiny_container ]; };
container = callPackage ./container.nix {};
guest = (import <nixpkgs/nixos> {
configuration = { ... }:
{
imports = [ <nixpkgs/nixos/modules/virtualisation/qemu-vm.nix> ];
environment.systemPackages = [ container ];
users.users.root.password = "root";
networking.hostName = "qemu-host";
};
}).config.system.build.vm;
};
in self