dot

vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks

54 lines1865 bytesNix
1# The desktop: ASUS TUF B850-PLUS, Ryzen 7 9850X3D, RTX 3080 Ti.
2{ inputs, ... }:
3let
4 # The MacBook's public SSH key (its ~/.ssh/id_ed25519.pub), see below.
5 macKeys = [
6 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEn6xiiRol1fdQzd/2GFkkhZVpkqT9/cTCqhfchJJth9"
7 ];
8in
9{
10 imports = [
11 ./hardware-configuration.nix
12 ./disko.nix
13 inputs.disko.nixosModules.disko
14 ../../modules/nixos
15 inputs.home-manager.nixosModules.home-manager
16 ];
17
18 networking.hostName = "desktop";
19
20 # The wired port has a fixed address, set by systemd-networkd rather than
21 # handed out by the router. NetworkManager keeps Wi-Fi and leaves eno1 alone.
22 networking.networkmanager.unmanaged = [ "eno1" ];
23 systemd.network = {
24 enable = true;
25 networks."10-eno1" = {
26 matchConfig.Name = "eno1";
27 address = [ "10.0.0.40/24" ];
28 gateway = [ "10.0.0.1" ];
29 dns = [ "10.0.0.1" ];
30 domains = [ "granstrm.com" ];
31 };
32 };
33
34 # The MacBook, which installs this machine with nixos-anywhere and can log in
35 # before the home folder (and its ~/.ssh/authorized_keys) is restored. Root
36 # too: a fresh install has no passwords, so that is how yours gets set.
37 users.users.vizie.openssh.authorizedKeys.keys = macKeys;
38 users.users.root.openssh.authorizedKeys.keys = macKeys;
39
40 home-manager = {
41 useGlobalPkgs = true;
42 useUserPackages = true;
43 extraSpecialArgs = { inherit inputs; };
44 # A file already in the way of one Home Manager wants to place is moved
45 # aside with this suffix rather than overwritten.
46 backupFileExtension = "pre-nixos";
47 users.vizie = import ../../modules/home;
48 };
49
50 # Leave this at the release the machine was installed with, even after
51 # upgrading: it only controls the defaults of stateful things such as
52 # database formats. It is not the NixOS version you run.
53 system.stateVersion = "26.05";
54}