DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

ref: b59eb2682c9b63c2452ad88969a7013dc929a1ab nix-arta/modules/hosts/ws/w/default.nix -rw-r--r-- 7.6 KiB
b59eb268Jonni Liljamo flake: update hyprland and hy3 to 0.53.* 15 days ago
                                                                                
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
{inputs, ...}: let
  channel = "unstable";
  system = "x86_64-linux";
  hostName = "w";
in {
  flake.nixosConfigurations.${hostName} = inputs."nixpkgs-${channel}".lib.nixosSystem {
    inherit system;
    specialArgs = {
      inherit inputs;
      lib = inputs."nixpkgs-${channel}".lib.extend (
        final: prev:
          import ../../../../lib {
            inherit inputs;
            lib = final;
          }
      );
    };
    modules = [
      {
        networking.hostName = hostName;
      }

      ./_nixos

      inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x13-amd
      inputs.lanzaboote.nixosModules.lanzaboote
      inputs."home-manager-${channel}".nixosModules.home-manager

      ({
        config,
        lib,
        ...
      }: let
        user = "j";
      in {
        imports = with inputs.self.modules.nixos;
          [
            core
            amdgpu
            audio
            nvim
            nix
            tailscale
            lazygit
            gnupg
            tlp
            tidal
            ssh-agent
            displaylink

            home-manager
            {
              home-manager.users.${user} = {
                imports = with inputs.self.modules.homeManager;
                  [
                    git
                  ]
                  ++ [
                    {
                      home.stateVersion = config.system.stateVersion;

                      programs.iamb = {
                        enable = true;
                        settings = {
                          default_profile = "liljamo";
                          profiles = {
                            liljamo.user_id = "@liljamo:lothlorien.social";
                            skye.user_id = "@skye:lothlorien.social";
                          };
                          settings = {
                            message_shortcode_display = true;
                            reaction_shortcode_display = true;
                            notifications.enabled = true;
                            image_preview.protocol.type = "sixel";
                          };
                        };
                      };

                      services.wpaperd = {
                        enable = true;
                        settings = {
                          "any" = {
                            path = "/home/j/dev/wallhaven-zmeqyg.jpg";
                          };
                        };
                      };

                      services.kanshi = {
                        enable = true;
                        systemdTarget = "graphical-session.target";
                        settings = let
                          internal = {
                            criteria = "eDP-1";
                            mode = "1920x1200@60Hz";
                            scale = 1.0;
                          };
                        in [
                          {
                            profile.name = "standalone";
                            profile.outputs = [
                              internal
                            ];
                          }
                          {
                            profile.name = "work";
                            profile.outputs = [
                              (
                                internal
                                // {
                                  position = "0,0";
                                }
                              )
                              {
                                criteria = "Samsung Electric Company LF24T450F HK2RA01018";
                                mode = "1920x1080@60Hz";
                                position = "1920,0";
                              }
                              {
                                criteria = "Samsung Electric Company LF24T450F HK2R904582";
                                mode = "1920x1080@60Hz";
                                position = "3840,0";
                              }
                            ];
                          }
                          {
                            profile.name = "naruska";
                            profile.outputs = [
                              (
                                internal
                                // {
                                  position = "760,0";
                                }
                              )
                              {
                                criteria = "Samsung Electric Company S34CG50 HNBX800050";
                                mode = "3440x1440@100Hz";
                                position = "0,-1440";
                              }
                            ];
                          }
                        ];
                      };
                    }

                    # TODO: see alice
                    {
                      arta.git = {
                        email = "jonni@liljamo.com";
                        name = "Jonni Liljamo";
                      };

                      arta.hyprland.extraConfig = {
                        exec-once = [
                          "waybar"
                        ];

                        monitor = [
                          "desc:Samsung Electric Company S34CG50 HNBX800050,preferred,auto,1,bitdepth,10,cm,auto,sdrbrightness,1.0,sdrsaturation,1.0"
                        ];

                        workspace = [
                          "1,monitor:eDP-1,default:true"
                          "8,monitor:eDP-1"
                          "9,monitor:eDP-1"
                        ];

                        experimental = {
                          xx_color_management_v4 = true;
                        };
                      };

                      arta.hyprlock.extraConfig = {
                        auth = {
                          fingerprint = {
                            enabled = true;
                          };
                        };
                      };

                      arta.waybar.extraConfig = {
                        output = ["eDP-1"];

                        modules-left = ["hyprland/workspaces"];
                        modules-right = [
                          "bluetooth"
                          "custom/sep"
                          "backlight"
                          "custom/sep"
                          "battery"
                          "custom/sep"
                          "wireplumber"
                          "custom/sep"
                          "disk"
                          "custom/sep"
                          "network"
                          "custom/sep"
                          "clock"
                          "custom/sep"
                          "hyprland/language"
                          "tray"
                        ];

                        "network".interface = "wlp1s0";
                      };

                      programs.git.includes = [
                        {
                          condition = "gitdir:~/dev/work/";
                          contents.user.email = "jonni.liljamo@sensorfleet.com";
                        }
                      ];
                    }
                  ];
              };
            }
          ]
          ++ [
            inputs.self.modules.nixos.${user}
            {
              users.users.${user}.extraGroups = ["video" "wireshark" "docker"];
            }
          ]
          ++ lib.flatten [
            (lib.arta.importBoth "hyprland" user)
            (lib.arta.importBoth "shell" user)
            (lib.arta.importBoth "passmenu" user)
            (lib.arta.importBoth "bluetooth" user)
          ];
      })
    ];
  };
}