~ruther/nixos-config

ref: 509b41049b045885bde71c8eb68e4d665f7c00e8 nixos-config/hosts/default.nix -rw-r--r-- 1.6 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
#
#  These are the different profiles that can be used when building NixOS.
#
#  flake.nix
#   └─ ./hosts
#       ├─ default.nix *
#       ├─ configuration.nix
#       ├─ home.nix
#       └─ ./desktop OR ./laptop OR ./work OR ./vm
#            ├─ ./default.nix
#            └─ ./home.nix
#

{ lib, inputs, ...}:

{
  laptop-iapetus = lib.nixosSystem {                                # Laptop profile
    # Ideapad S540
    specialArgs = {
      inherit inputs;
    };
    modules = [
      inputs.nixos-hardware.nixosModules.common-cpu-intel
      inputs.nixos-hardware.nixosModules.common-gpu-intel
      inputs.nixos-hardware.nixosModules.common-pc-laptop
      inputs.nixos-hardware.nixosModules.common-pc-laptop-acpi_call
      inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
      ./laptop-iapetus
      ./configuration.nix
    ];
  };

  laptop-phobos = lib.nixosSystem {                                # Laptop profile
    # Thinkpad T14s
    specialArgs = {
      inherit inputs;
    };
    modules = [
      inputs.lanzaboote.nixosModules.lanzaboote
      inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14s-amd-gen1
      ./laptop-phobos
      ./configuration.nix
    ];
  };

  desktop-clotho = lib.nixosSystem {                               # Desktop profile
    specialArgs = {
      inherit inputs;
    };
    modules = [
      ./desktop-clotho
      ./configuration.nix
    ];
  };

  vm = lib.nixosSystem {                                    # VM profile
    specialArgs = {
      inherit inputs;
    };
    modules = [
      ./vm
      ./configuration.nix
    ];
  };
}
Do not follow this link