summary refs log tree commit diff
path: root/img/installer/configuration.nix
blob: e9a2865e0b8e13ae90051937c0b95655e0d2d793 (plain) (blame)
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
51
52
53
54
55
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>

{ modulesPath, pkgs, ... }:

let
  inherit (builtins) readFile;
in

{
  imports = [ (modulesPath + "/profiles/all-hardware.nix") ];

  boot.consoleLogLevel = 2;
  boot.kernelParams = [ "udev.log_priority=5" ];
  boot.initrd.verbose = false;

  boot.plymouth.enable = true;
  boot.plymouth.logo = pkgs.callPackage (
    { lib, runCommand, fetchurl, inkscape }:
    runCommand "spectrum-logo.png" {
      nativeBuildInputs = [ inkscape ];
      svg = fetchurl {
        url = "https://spectrum-os.org/git/www/plain/logo/logo_mesh.svg?id=5ac2d787b12e05a9ea91e94ca9373ced55d7371a";
        sha256 = "1k5025nc5mxdls7bw7wk1734inadvibqxvg8b8yg6arr3y9yy46k";
      };
    } ''
      inkscape -w 48 -h 48 -o "$out" "$svg"
    ''
  ) {};

  fileSystems."/" = { fsType = "tmpfs"; };

  services.cage.enable = true;
  services.cage.program = "gnome-image-installer";
  users.users.demo = { group = "demo"; isSystemUser = true; };
  users.groups.demo = {};
  security.polkit.extraConfig = readFile ./seat.rules;

  documentation.enable = false;
  networking.firewall.enable = false;
  networking.resolvconf.enable = false;
  nix.enable = false;
  services.timesyncd.enable = false;

  boot.loader.systemd-boot.enable = true;

  environment.systemPackages = with pkgs; [
    (callPackage ./app { })
    gnome.adwaita-icon-theme
  ];

  systemd.tmpfiles.rules = [
    "L+ /var/lib/eos-image-defaults/vendor-customer-support.ini - - - - ${app/vendor-customer-support.ini}"
  ];
}