This repository has been archived by the owner on Aug 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnixini-config.nix
50 lines (43 loc) · 1.6 KB
/
nixini-config.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# System configuration for a Nixini container. This contains the cros
# guest tools which includes sommelier (Wayland compositor deferring
# to ChromeOS on the outside) and garcon (desktop integration daemon).
#
# Please see the documentation for Crostini for more information.
{ config, pkgs, lib, ... }:
let crosTools = builtins.fetchgit {
url = "https://chromium.googlesource.com/chromiumos/containers/cros-container-guest-tools";
rev = "376aeb69b6f4fe9c01d8ddab3d570987c92b0499";
};
in {
# Using the sandbox causes builds to be attempted in a chroot,
# which fails in the permission setup given to the LXC container
# inside the crosvm.
#
# As of NixOS 18.09 sandboxing is the default, hence it is
# disabled here.
nix.useSandbox = false;
# cros tools configuration
#
# crostini bind-mounts a set of tools and configuration files into
# the container, which are then normally run via systemd units
# contained in the `cros-container-guest-tools` repository.
#
# In NixOS, we instead configure these units via Nix configuration.
# cros-adapta
#
# TODO: bind-mounted GTK theme
# cros-apt-config: Not applicable to NixOS
# cros-garcon
#
# Garcon is the application bridge to Chromium OS, which provides
# features such as URL opening.
#
# TODO: add helper tools & figure out environment overrides
systemd.services.garcon = {
enable = true;
description = "Chromium OS Garcon Bridge";
after = [ "[email protected]" "[email protected]" ];
script = "/opt/google/cros-containers/bin/garcon --server";
wantedBy = [ "default.target" ];
};
}