summaryrefslogtreecommitdiff
path: root/hosts/ades/iso.nix
blob: 63c48d98a3f77c91ac8aaddf349056b29f936874 (plain)
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
{ modulesPath, lib, config, pkgs, ... }:

let
  inherit (lib.attrsets)
    mergeAttrsList;
  inherit (builtins)
    map;

  shimmedPackages = [
    "wesnoth"
    "luanti"
    "supertuxkart"
    "mindustry"
    "shattered-pixel-dungeon"
    "bzflag"
    "xonotic-glx"
    "taisei"
    "unvanquished"
  ];

  mkThinShim = import ./thin-shim.nix pkgs;
in
rec {
  imports = [
    (modulesPath + "/profiles/all-hardware.nix")
    (modulesPath + "/installer/cd-dvd/iso-image.nix")
  ];

  isoImage = {
    makeBiosBootable = true;
    makeEfiBootable = true;
    makeUsbBootable = true;

    isoBaseName = lib.mkImageMediaOverride "nixos-styx";
  };

  swapDevices = lib.mkImageMediaOverride [];
  fileSystems = lib.mkImageMediaOverride config.lib.isoFileSystems;

  users.users.ades = {
    description = "Ades";
    isNormalUser = true;
    homeMode = "755";
    extraGroups = [
      "disk" "cdrom"
      "audio" "video"
      "lp" "networkmanager"
    ];
    initialPassword = "persephone";
  };
  users.users.root.initialPassword = "olympus";

  services.getty.autologinUser = "ades";
  services.getty.helpLine = ''
  As you can see, you are automatically logged in to the "ades" user.
  Run `startx' to obtain a graphical session.

  The password for the "ades" user is: ${users.users.ades.initialPassword}
  The password for the "root" user is: ${users.users.root.initialPassword}
  '';

  nixpkgs.overlays = [
    (final: prev:
      mergeAttrsList
        (map (pname: {
        "${pname}" = (mkThinShim prev.${pname} "nixpkgs#${pname}");
        })
          shimmedPackages))
  ];
}