summaryrefslogtreecommitdiff
path: root/hosts/ades/iso.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/ades/iso.nix')
-rw-r--r--hosts/ades/iso.nix70
1 files changed, 70 insertions, 0 deletions
diff --git a/hosts/ades/iso.nix b/hosts/ades/iso.nix
new file mode 100644
index 0000000..63c48d9
--- /dev/null
+++ b/hosts/ades/iso.nix
@@ -0,0 +1,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))
+ ];
+}