Skip to content
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

Misc. updates to the examples/demo system #229

Merged
merged 3 commits into from
Oct 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 35 additions & 20 deletions examples/demo/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,18 @@ in
# Automatically login as nixos.
displayManager.lightdm = {
enable = true;
autoLogin = {
enable = true;
user = "nixos";
};
};
displayManager.autoLogin = {
enable = true;
user = "nixos";
};

};
powerManagement.enable = true;
hardware.pulseaudio.enable = true;

environment.systemPackages = with pkgs; [
dtc
(writeShellScriptBin "firefox" ''
export MOZ_USE_XINPUT2=1
exec ${pkgs.firefox}/bin/firefox "$@"
Expand Down Expand Up @@ -94,21 +95,6 @@ in
ln -sfT ${minesDesktopFile} ${desktopDir + "mines.desktop"}
'';

# FIXME : Stop relying on initrd for `ssh` via USB.
networking.networkmanager.enable = true;
networking.networkmanager.unmanaged = [ "rndis0" "usb0" ];

services.blueman.enable = true;
hardware.bluetooth.enable = true;

# Setup USB gadget networking in initrd...
mobile.boot.stage-1.networking.enable = lib.mkDefault true;
#mobile.boot.stage-1.ssh.enable = true;

# Start SSH by default...
systemd.services.sshd.wantedBy = lib.mkOverride 10 [ "multi-user.target" ];
services.openssh.permitRootLogin = lib.mkForce "yes";

# Forcibly set a password on users...
# FIXME: highly insecure!
# FIXME: Figure out why this breaks...
Expand All @@ -122,6 +108,35 @@ in
systemd.services.systemd-udev-settle.enable = false;
}

# Networking, modem and misc.
{
users.extraUsers.nixos.extraGroups = [ "dialout" ];

# FIXME : Stop relying on initrd for `ssh` via USB.
networking.networkmanager.enable = true;
networking.networkmanager.unmanaged = [ "rndis0" "usb0" ];

# Setup USB gadget networking in initrd...
mobile.boot.stage-1.networking.enable = lib.mkDefault true;
}

# Bluetooth
{
services.blueman.enable = true;
hardware.bluetooth.enable = true;
}

# SSH
{
# Start SSH by default...
systemd.services.sshd.wantedBy = lib.mkOverride 10 [ "multi-user.target" ];
services.openssh.permitRootLogin = lib.mkForce "yes";

# Don't start it in stage-1 though.
# (Currently doesn't quit on switch root)
#mobile.boot.stage-1.ssh.enable = true;
}

# Customized XFCE environment
{
services.xserver = {
Expand Down Expand Up @@ -152,7 +167,7 @@ in
{
services.xserver = {
desktopManager.xfce.enableXfwm = false;
desktopManager.xfce.extraSessionCommands = ''
displayManager.sessionCommands = ''
awesome &
'';
};
Expand Down