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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
| | # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021-2023, 2025 Alyssa Ross <hi@alyssa.is>
{ lib, modulesPath, pkgs, ... }:
let
inherit (builtins) readFile;
in
{
imports = [ (modulesPath + "/profiles/all-hardware.nix") ];
boot.consoleLogLevel = lib.mkDefault 2;
# quiet keeps KERN_INFO boot chatter and the stage-1 script off the video
# console, and holds systemd status output to errors only.
boot.kernelParams = [ "udev.log_priority=5" "quiet" ];
boot.initrd.verbose = false;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.plymouth.enable = true;
boot.plymouth.logo = pkgs.callPackage (
{ 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 = lib.getExe (pkgs.callPackage ./app {});
services.udev.extraRules = ''
KERNEL=="card0", TAG+="systemd"
'';
systemd.services.cage-tty1.after = [ "dev-dri-card0.device" ];
systemd.services.cage-tty1.wants = [ "dev-dri-card0.device" ];
# Force eos-installer to stop artificially constraining its size.
systemd.services.cage-tty1.environment.GIS_SMALL_SCREEN = "1";
users.users.demo = { group = "demo"; isNormalUser = true; };
users.groups.demo = {};
security.polkit.extraConfig = readFile ./seat.rules;
services.udisks2.enable = true;
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; [ adwaita-icon-theme ];
systemd.tmpfiles.rules = [
"L+ /var/lib/eos-image-defaults/vendor-customer-support.ini - - - - ${app/vendor-customer-support.ini}"
];
system.stateVersion = lib.trivial.release;
}
|