~ruther/nixos-config

ref: 509b41049b045885bde71c8eb68e4d665f7c00e8 nixos-config/hosts/desktop-clotho/default.nix -rw-r--r-- 2.1 KiB
509b4104 — Frantisek Bohacek chore: remove unnecessary code, use modules instead of imports, split files 1 year, 3 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
#
#  Specific system configuration settings for desktop
#
#  flake.nix
#   ├─ ./hosts
#   │   └─ ./desktop
#   │        ├─ default.nix *
#   │        └─ hardware-configuration.nix
#   └─ ./modules
#       ├─ ./desktop
#       │   ├─ ./hyprland
#       │   │   └─ default.nix
#       │   └─ ./virtualisation
#       │       └─ default.nix
#       ├─ ./programs
#       │   └─ games.nix
#       └─ ./hardware
#           └─ default.nix
#

{ pkgs, ... }:

{
  imports = [
    ./hardware-configuration.nix
    ../../modules/desktop/dm/sddm.nix
    ../../modules/desktop/qtile/default.nix
    ../../modules/programs/games.nix
    ../../modules/desktop/virtualisation
    ../../modules/hardware
  ];

  networking.hostName = "desktop-clotho";

  boot = {                                      # Boot options
    kernelPackages = pkgs.linuxPackages_latest;
    supportedFilesystems = [ "ntfs" ];
    initrd.kernelModules = [ "amdgpu" ];        # Video drivers

    loader = {                                  # For legacy boot:
      systemd-boot = {
        enable = true;
        configurationLimit = 5;                 # Limit the amount of configurations
        editor = false;                         # Better security, disallows passing /bin/sh to start as root

        extraEntries = {
          "Windows.conf" = ''
            title "Windows 10"
            efi /EFI/Microsoft/Boot/bootmgfw.efi
          '';
        };
      };
      efi.canTouchEfiVariables = true;
      timeout = 1;                              # Grub auto select time
    };
  };

  hardware = {
    opengl = {
      enable = true;
      driSupport = true;
      driSupport32Bit = true;
    };
  };

  environment = {                               # Packages installed system wide
    systemPackages = with pkgs; [               # This is because some options need to be configured.
      wacomtablet
    ];
  };

  services = {
    xserver.videoDrivers = [ "amdgpu" ];
  };

  wg.ip = "192.168.32.21";

  services.nix-serve = {
    enable = true;
    secretKeyFile = "/var/cache-priv-key.pem";
    openFirewall = true;
  };
}
Do not follow this link