summaryrefslogtreecommitdiffstats
path: root/lass/1systems/aergia/config.nix
blob: 618938ce8a84fe5856e38134fe9be384deef2d2c (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
{ config, lib, pkgs, ... }:

{
  imports = [
    <stockholm/lass>

    <stockholm/lass/2configs/retiolum.nix>
    <stockholm/lass/2configs/exim-retiolum.nix>
    <stockholm/lass/2configs/baseX.nix>
    <stockholm/lass/2configs/pipewire.nix>
    <stockholm/lass/2configs/browsers.nix>
    <stockholm/lass/2configs/programs.nix>
    <stockholm/lass/2configs/network-manager.nix>
    <stockholm/lass/2configs/syncthing.nix>
    <stockholm/lass/2configs/sync/sync.nix>
    <stockholm/lass/2configs/games.nix>
    <stockholm/lass/2configs/steam.nix>
    <stockholm/lass/2configs/wine.nix>
    <stockholm/lass/2configs/fetchWallpaper.nix>
    <stockholm/lass/2configs/yellow-mounts/samba.nix>
    <stockholm/lass/2configs/pass.nix>
    <stockholm/lass/2configs/mail.nix>
    <stockholm/lass/2configs/bitcoin.nix>
    # <stockholm/lass/2configs/xonsh.nix>
    <stockholm/lass/2configs/review.nix>
    <stockholm/lass/2configs/dunst.nix>
    <stockholm/lass/2configs/print.nix>
    <stockholm/lass/2configs/br.nix>
    <stockholm/lass/2configs/c-base.nix>
    # steam-deck like experience https://github.com/Jovian-Experiments/Jovian-NixOS
    {
      imports = [
        "${builtins.fetchTarball "https://github.com/Jovian-Experiments/Jovian-NixOS/archive/master.tar.gz"}/modules"
      ];
      jovian.steam.enable = true;
    }
    { # autorandrs
      services.autorandr = {
        enable = true;
        hooks.postswitch.reset_usb = ''
          echo 0 > /sys/bus/usb/devices/usb9/authorized; echo 1 > /sys/bus/usb/devices/usb9/authorized
          ${pkgs.xorg.xmodmap}/bin/xmodmap -e 'keycode 96 = F12 Insert F12 F12' # rebind shift + F12 to shift + insert
        '';
        profiles = {
          default = {
            fingerprint = {
              eDP = "00ffffffffffff00288931000100000016200104805932780a0dc9a05747982712484c0000000101010101010101010101010101010108700088a1401360c820a300d9870000001ead4a0088a1401360c820a30020c23100001e000000fd0016480f5a1e000a202020202020000000fc0047504431303031480a2020202000cf";
            };
            config = {
              eDP = {
                enable = true;
                primary = true;
                position = "0x0";
                mode = "2560x1600";
                rate = "60.01";
                transform = [
                  [ 0.750000 0.000000 0.000000 ]
                  [ 0.000000 0.750000 0.000000 ]
                  [ 0.000000 0.000000 1.000000 ]
                ];
                # scale = {
                #   x = 0.599991;
                #   y = 0.599991;
                # };
              };
            };
          };
          docked2 = {
            fingerprint = {
              eDP = config.services.autorandr.profiles.default.fingerprint.eDP;
              DisplayPort-8 = "00ffffffffffff0010ac39d14c3346300f200104b5462878fb26f5af4f46a5240f5054a54b00714f8140818081c081009500b300d1c0565e00a0a0a0295030203500b9882100001a000000ff00444342375847330a2020202020000000fc0044454c4c204733323233440a20000000fd0030a5fafa41010a2020202020200181020332f149030212110490131f3f2309070783010000e200eae305c000e606050162622c6d1a0000020b30a50007622c622c5a8780a070384d4030203500b9882100001af4fb0050a0a0285008206800b9882100001a40e7006aa0a0675008209804b9882100001a6fc200a0a0a0555030203500b9882100001a000000000009";
              DisplayPort-7 = "00ffffffffffff0020a32f00010000000c190103807341780acf74a3574cb02309484c21080081c0814081800101010101010101010104740030f2705a80b0588a00501d7400001e023a801871382d40582c4500501d7400001e000000fc00484953454e53450a2020202020000000fd00324b0f451e000a2020202020200172020333714f5f5e5d01020400101113001f2021222909070715075057070083010000e200f96d030c002000183c200060010203662150b051001b304070360056005300001e011d8018711c1620582c2500c48e2100009e011d007251d01e206e285500c48e2100001800000000000000000000000000000000000000000000ea";
            };
            config = {
              DisplayPort-7 = {
                enable = true;
                position = "2560x0";
                mode = "1920x1080";
                rate = "60.00";
              };
              DisplayPort-8 = config.services.autorandr.profiles.docked1.config.DisplayPort-1;
              eDP = config.services.autorandr.profiles.docked1.config.eDP;
            };
          };
          docked1 = {
            fingerprint = {
              eDP = config.services.autorandr.profiles.default.fingerprint.eDP;
              DisplayPort-1 = "00ffffffffffff0010ac39d14c3346300f200104b5462878fb26f5af4f46a5240f5054a54b00714f8140818081c081009500b300d1c0565e00a0a0a0295030203500b9882100001a000000ff00444342375847330a2020202020000000fc0044454c4c204733323233440a20000000fd0030a5fafa41010a2020202020200181020332f149030212110490131f3f2309070783010000e200eae305c000e606050162622c6d1a0000020b30a50007622c622c000000000000000000000000000000000000f4fb0050a0a0285008206800b9882100001a40e7006aa0a0675008209804b9882100001a6fc200a0a0a0555030203500b9882100001a000000000040";
            };
            config = {
              DisplayPort-1 = {
                enable = true;
                primary = true;
                position = "0x0";
                mode = "2560x1440";
                rate = "165.08";
              };
              eDP = config.services.autorandr.profiles.default.config.eDP // {
                primary = false;
                position = "640x1440";
              };
            };
          };
        };
      };
    }
  ];

  system.stateVersion = "22.11";

  krebs.build.host = config.krebs.hosts.aergia;

  environment.systemPackages = with pkgs; [
    brain
    bank
    l-gen-secrets
    generate-secrets
    nixpkgs-review
    pipenv
  ];

  programs.adb.enable = true;

  hardware.bluetooth = {
    enable = true;
    powerOnBoot = true;
  };
  hardware.pulseaudio.package = pkgs.pulseaudioFull;

  nix.trustedUsers = [ "root" "lass" ];

  # nix.extraOptions = ''
  #   extra-experimental-features = nix-command flakes
  # '';

  services.tor = {
    enable = true;
    client.enable = true;
  };

  documentation.nixos.enable = true;
  boot.binfmt.emulatedSystems = [
    "aarch64-linux"
  ];

  boot.cleanTmpDir = true;
  programs.noisetorch.enable = true;
}