examples/demo: Misc reorganization
@@ -95,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...
@@ -123,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 = {
