From f9948a4d39a6fbdb6e6113d68fda53dfe67c2a82 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Mon, 1 Feb 2021 13:46:50 +0100 Subject: util/liveiso: Add NixOS configs for bootable live systems MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add NixOS configurations for bootable live systems containing a set of tools which might be useful for firmware development in general and for working on coreboot. There are two configurations provided. One for console-only and a graphical one, which is mostly the same as the console image but it comes with Gnome Shell as window manager and some graphical tools in addition. An image can be built using `build-console.sh`, respectively `build-graphical.sh`. The resulting iso image can be found in `result/iso/`. The console image results in ~700MB, while the graphical one results in ~2GB. Change-Id: Iaf49d198e99781434bd89d2a8a125a4988b77e1c Signed-off-by: Felix Singer Reviewed-on: https://review.coreboot.org/c/coreboot/+/50194 Tested-by: build bot (Jenkins) Reviewed-by: Michael Niewöhner --- util/liveiso/graphical.nix | 74 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 util/liveiso/graphical.nix (limited to 'util/liveiso/graphical.nix') diff --git a/util/liveiso/graphical.nix b/util/liveiso/graphical.nix new file mode 100644 index 0000000000..35909fb14f --- /dev/null +++ b/util/liveiso/graphical.nix @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: GPL-2.0-only + +{ pkgs, lib, ... }: + +{ + imports = [ + ./common.nix + ]; + + hardware.pulseaudio = { + enable = true; + package = pkgs.pulseaudioFull; + extraModules = with pkgs; [ pulseaudio-modules-bt ]; + }; + + security.polkit = { + enable = true; + extraConfig = '' + polkit.addRule(function(action, subject) { + if (subject.isInGroup("wheel")) { + return polkit.Result.YES; + } + }); + ''; + }; + + services.xserver = { + enable = true; + displayManager = { + gdm = { + enable = true; + autoSuspend = false; + }; + autoLogin = { + enable = true; + user = "user"; + }; + }; + desktopManager.gnome.enable = true; + }; + + users.users.user.extraGroups = [ "audio" "video" "input" ]; + + environment.systemPackages = with pkgs; [ + firefox + gparted + pavucontrol + ]; + + # Remove unnecessary stuff + services = { + gnome = { + evolution-data-server.enable = lib.mkForce false; + gnome-online-accounts.enable = lib.mkForce false; + gnome-online-miners.enable = lib.mkForce false; + gnome-initial-setup.enable = lib.mkForce false; + chrome-gnome-shell.enable = lib.mkForce false; + }; + telepathy.enable = lib.mkForce false; + dleyna-renderer.enable = lib.mkForce false; + dleyna-server.enable = lib.mkForce false; + }; + + programs.geary.enable = lib.mkForce false; + + environment.gnome.excludePackages = with pkgs; [ + gnome.gnome-weather + gnome.epiphany + gnome.gnome-contacts + gnome-photos + gnome.gnome-music + yelp + ]; +} -- cgit v1.2.3