summaryrefslogtreecommitdiff
path: root/hosts/carrot/default.nix
blob: bbe1370cce33dfcb57bbcdc4d128f6d542898b15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{ inputs, lib, pkgs, ... }:

let inherit (inputs) mobile-nixos;
in
{
  imports = [
    (import "${mobile-nixos}/lib/configuration.nix" {
      device = "pine64-pinephone";
    })
  ];

  this.locales.default = "us";

  time.timeZone = "America/Chicago";

  this.pc.enable = true;

  this.users.enabled = ["simon"];

  this.sets = {
    cli.tools.full = true;
    de.utils = true;
    media.tools.full = true;
    net.tools.minimal = true;
    script.utils = true;
    sound.tools = true;
    sync.tools = true;
    sys.tools = true;
    www.browser = true;
  };

  services.xserver = {
    enable = true;
    desktopManager.plasma5.mobile.enable = true;
    displayManager.lightdm = {
      enable = true;
      # Workaround for autologin only working at first launch.
      # A logout or session crashing will show the login screen otherwise.
      extraSeatDefaults = ''
        session-cleanup-script=${pkgs.procps}/bin/pkill -P1 -fx ${pkgs.lightdm}/sbin/lightdm
      '';
    };
  };

  hardware.bluetooth.enable = true;
  powerManagement.enable = true;
  services.libinput.enable = true;
  services.displayManager.defaultSession = "plasma-mobile";
  services.displayManager.autoLogin.enable = true;
  services.displayManager.autoLogin.user = "simon";

  # Ensures any rndis config from stage-1 is not clobbered by NetworkManager
  networking.networkmanager.unmanaged = [ "rndis0" "usb0" ];

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

  nixpkgs.hostPlatform = "aarch64-linux";
  system.stateVersion = "24.11";
}