-
-
Notifications
You must be signed in to change notification settings - Fork 19.7k
Add GNOME3 ISO, Don't run graphical installer ISOs as root #66313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
4f82426
6c5dd0b
3ea0206
d181cc6
70e6869
64b666a
da25ab2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,30 @@ with lib; | |
| { | ||
| imports = [ ./installation-cd-base.nix ]; | ||
|
|
||
| users.extraUsers.live = { | ||
| isNormalUser = true; | ||
| uid = 1000; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We probably shouldn't use UIDs in the |
||
| extraGroups = [ "wheel" "networkmanager" "video" ]; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure. I think I'd have an issue on my own installation if I didn't use this. I've received guidance that this should be done, but I've yet to verify this. I will find out 👍
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried this in a vm and it caused it to require authentication to initiate a connection with networkmanager. Not sure about |
||
| # Allow the graphical user to login without password | ||
| initialHashedPassword = ""; | ||
| }; | ||
|
|
||
| # Allow passwordless sudo from live user | ||
| security.sudo = { | ||
| enable = lib.mkForce true; | ||
| wheelNeedsPassword = lib.mkForce false; | ||
| }; | ||
|
|
||
| # Whitelist wheel users to do anything | ||
| # This is useful for things like pkexec | ||
| security.polkit.extraConfig = '' | ||
| polkit.addRule(function(action, subject) { | ||
| if (subject.isInGroup("wheel")) { | ||
| return polkit.Result.YES; | ||
| } | ||
| }); | ||
| ''; | ||
|
|
||
| services.xserver = { | ||
| enable = true; | ||
|
|
||
|
|
@@ -17,7 +41,7 @@ with lib; | |
| # Automatically login as root. | ||
| displayManager.slim = { | ||
| enable = true; | ||
| defaultUser = "root"; | ||
| defaultUser = "live"; | ||
| autoLogin = true; | ||
| }; | ||
|
|
||
|
|
@@ -33,7 +57,6 @@ with lib; | |
|
|
||
| # Enable sound in graphical iso's. | ||
| hardware.pulseaudio.enable = true; | ||
| hardware.pulseaudio.systemWide = true; # Needed since we run plasma as root. | ||
|
|
||
| environment.systemPackages = [ | ||
| # Include gparted for partitioning disks. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { pkgs, ... }: | ||
|
|
||
| { | ||
| imports = [ ./installation-cd-graphical-kde.nix ]; | ||
| imports = [ ./installation-cd-graphical-plasma5.nix ]; | ||
|
|
||
| boot.kernelPackages = pkgs.linuxPackages_latest; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| # This module defines a NixOS installation CD that contains X11 and | ||
| # Plasma5. | ||
| # KDE 5. | ||
|
worldofpeace marked this conversation as resolved.
Outdated
|
||
|
|
||
| { config, lib, pkgs, ... }: | ||
|
|
||
|
|
@@ -30,15 +30,27 @@ with lib; | |
| Version=1.0 | ||
| Type=Application | ||
| Name=NixOS Manual | ||
| Exec=firefox ${config.system.build.manual.manualHTMLIndex} | ||
| Exec=firefox ${config.system.build.manual.manual}/share/doc/nixos/index.html | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did the Thought on the side: maybe this should be extracted into the nixos manual module… |
||
| Icon=text-html | ||
| ''; | ||
|
|
||
| # Replace default gparted desktop file with one that does "sudo gparted" | ||
| gpartedDesktopFile = pkgs.runCommand "gparted.desktop" {} '' | ||
| mkdir -p $out | ||
| cp ${pkgs.gparted}/share/applications/gparted.desktop $out/gparted.desktop | ||
| substituteInPlace $out/gparted.desktop --replace "Exec=" "Exec=sudo " | ||
| ''; | ||
|
|
||
| desktopDir = "/home/live/Desktop/"; | ||
|
|
||
| in '' | ||
| mkdir -p /root/Desktop | ||
| ln -sfT ${manualDesktopFile} /root/Desktop/nixos-manual.desktop | ||
| ln -sfT ${pkgs.konsole}/share/applications/org.kde.konsole.desktop /root/Desktop/org.kde.konsole.desktop | ||
| ln -sfT ${pkgs.gparted}/share/applications/gparted.desktop /root/Desktop/gparted.desktop | ||
| mkdir -p ${desktopDir} | ||
| chown live /home/live ${desktopDir} | ||
|
|
||
| ln -sfT ${manualDesktopFile} ${desktopDir + "nixos-manual.desktop"} | ||
| ln -sfT ${gpartedDesktopFile}/gparted.desktop ${desktopDir + "gparted.desktop"} | ||
|
|
||
| ln -sfT ${pkgs.konsole}/share/applications/org.kde.konsole.desktop ${desktopDir + "org.kde.konsole.desktop"} | ||
| ''; | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -149,9 +149,15 @@ in rec { | |
| inherit system; | ||
| }); | ||
|
|
||
| iso_graphical = forMatchingSystems [ "x86_64-linux" ] (system: makeIso { | ||
| module = ./modules/installer/cd-dvd/installation-cd-graphical-kde.nix; | ||
| type = "graphical"; | ||
| iso_graphical_plasma5 = forMatchingSystems [ "x86_64-linux" ] (system: makeIso { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that renaming |
||
| module = ./modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix; | ||
| type = "graphical-plasma5"; | ||
| inherit system; | ||
| }); | ||
|
|
||
| iso_graphical_gnome3 = forMatchingSystems [ "x86_64-linux" ] (system: makeIso { | ||
| module = ./modules/installer/cd-dvd/installation-cd-graphical-gnome.nix; | ||
| type = "graphical-gnome3"; | ||
| inherit system; | ||
| }); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.