patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob a2f068b5ec9bb543cafd91231ba9201c5ad7a8e3 1927 bytes (raw)
name: pkgs/os-specific/linux/spectrum/vm/comp/default.nix 	 # note: path name is non-authoritative(*)

 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
 
{ lib, makeRootfs, runCommand, writeScript, writeText
, busybox, emacs-nox, execline, gcc, linux_vm, s6, sommelier, source-code-pro
, wayfire, westonLite, zsh
}:

runCommand "vm-comp" rec {
  linux = linux_vm;

  path = [
    busybox emacs-nox execline gcc s6 sommelier wayfire westonLite zsh
  ];

  login = writeScript "login" ''
    #! ${execline}/bin/execlineb -s0
    unexport !
    ${busybox}/bin/login -p -f root $@
  '';

  # This can't be /etc/wayfire/defaults.ini because autostart entries
  # from that file aren't applied.
  wayfireConfig = writeText "wayfire-config" ''
    [core]
    xwayland = false

    [input]
    xkb_layout = us
    xkb_variant = dvorak

    [autostart]
    terminal = weston-terminal --shell $(command -v zsh)
  '';

  rootfs = makeRootfs {
    services.getty.run = writeScript "getty-run" ''
      #! ${execline}/bin/execlineb -P
      ${busybox}/bin/getty -i -n -l ${login} 38400 ttyS0
    '';

    rcServices.ok-all = {
      type = writeText "ok-all-type" ''
        bundle
      '';
      contents = writeText "ok-all-contents" ''
        wayfire
      '';
    };

    rcServices.wayfire = {
      type = writeText "wayfire-type" ''
        longrun
      '';
      run = writeScript "wayfire-run" ''
        #! ${execline}/bin/execlineb -S0

        s6-applyuidgid -u 1000 -g 1000

        export HOME /
        export PATH ${lib.makeBinPath path}
        export XDG_RUNTIME_DIR /run/user/1000

        ${sommelier}/bin/sommelier
        wayfire -c ${wayfireConfig}
      '';
      dependencies = writeText "wayfire-dependencies" ''
        wl0
      '';
    };

    rcServices.wl0 = {
      type = writeText "wl0-type" ''
        oneshot
      '';
      up = writeText "wl0-run" ''
        chown user /dev/wl0
      '';
    };

    fonts = [ source-code-pro ];
  };

  inherit (rootfs) squashfs;
} ''
  mkdir $out
  ln -s $linux/bzImage $out/kernel
  ln -s $squashfs $out/squashfs
''

debug log:

solving a2f068b5ec9 ...
found a2f068b5ec9 in https://inbox.spectrum-os.org/spectrum-devel/20210630092021.58387-3-hi@alyssa.is/
found 988fad5fba6 in https://inbox.spectrum-os.org/spectrum-devel/20210411115740.29615-13-hi@alyssa.is/

applying [1/2] https://inbox.spectrum-os.org/spectrum-devel/20210411115740.29615-13-hi@alyssa.is/
diff --git a/pkgs/os-specific/linux/spectrum/vm/comp/default.nix b/pkgs/os-specific/linux/spectrum/vm/comp/default.nix
new file mode 100644
index 00000000000..988fad5fba6


applying [2/2] https://inbox.spectrum-os.org/spectrum-devel/20210630092021.58387-3-hi@alyssa.is/
diff --git a/pkgs/os-specific/linux/spectrum/vm/comp/default.nix b/pkgs/os-specific/linux/spectrum/vm/comp/default.nix
index 988fad5fba6..a2f068b5ec9 100644

Checking patch pkgs/os-specific/linux/spectrum/vm/comp/default.nix...
Applied patch pkgs/os-specific/linux/spectrum/vm/comp/default.nix cleanly.
Checking patch pkgs/os-specific/linux/spectrum/vm/comp/default.nix...
Applied patch pkgs/os-specific/linux/spectrum/vm/comp/default.nix cleanly.

index at:
100644 a2f068b5ec9bb543cafd91231ba9201c5ad7a8e3	pkgs/os-specific/linux/spectrum/vm/comp/default.nix

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).