aboutsummaryrefslogtreecommitdiff
path: root/nixos/laptop/configuration.nix
blob: 983e96661da95e15df65e2e20f43a406b0c1dd26 (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
61
62
63
64
65
66
67
68
{ inputs, outputs, pkgs, ... }: {
  # You can import other NixOS modules here
  imports = [
    # If you want to use modules your own flake exports (from modules/nixos):
    # outputs.nixosModules.example

    # Or modules from other flakes (such as nixos-hardware):
    # inputs.hardware.nixosModules.common-cpu-amd
    # inputs.hardware.nixosModules.common-ssd

    ../general.nix
    ./hardware-configuration.nix
    inputs.home-manager.nixosModules.home-manager
  ];


  time.timeZone = "Europe/Moscow";
  networking.hostName = "ltrr-mini";

  # virtualisation.libvirtd.enable = true;
  # programs.virt-manager.enable = true;
  
  services.xserver = {
    enable = false;
    displayManager.lightdm.enable = false;
  };

  environment.systemPackages = with pkgs; [
    joycond-cemuhook
  ];

  virtualisation.docker = {
    enable = true;
    liveRestore = true;
    daemon.settings = {
      bip = "172.20.0.1/16";
      default-address-pools = [{
        base = "172.20.0.0/8";
        size = 16;
      }];
    };
  };
  # services.postgresql.enable = true;
  
  programs.adb.enable = true;
  services.udev.packages = [
    pkgs.android-udev-rules
  ];

  services.joycond.enable = true;

  home-manager = {
    extraSpecialArgs = { inherit inputs outputs; };
    useGlobalPkgs = true;
    useUserPackages = true;
    users.jerpo = import ../../home-manager/laptop;
  };

  services.logind.extraConfig = ''
    HandlePowerKey=ignore
    HandleLidSwitch=suspend
    HandleLidSwitchExternalPower=suspend
  '';


  # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
  system.stateVersion = "23.05";
}