๐Ÿ“ฆ PeDro0210 / My-Nix-Flakes

๐Ÿ“„ flake.nix ยท 54 lines
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{
  description = "Pedro0210 NixOS Flake";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
    nix-flatpak.url = "github:gmodena/nix-flatpak";
    nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
    spicetify-nix.url = "github:Gerg-L/spicetify-nix";

  };

  outputs =
    {
      spicetify-nix,
      nix-flatpak,
      ...
    }@inputs:
    let

      mkSystem =
        pkgs: system: hostname:
        let
          pkgs-unstable = import inputs.nixpkgs-unstable { inherit system; };
        in
        pkgs.lib.nixosSystem {
          system = system;
          modules = [
            spicetify-nix.nixosModules.default
            nix-flatpak.nixosModules.nix-flatpak
            { networking.hostName = hostname; }
            # General configuration (users, networking, sound, etc)
            ./modules/configuration.nix

            (./. + "/hosts/${hostname}/hardware-configuration.nix")

          ];

          specialArgs = {
            inherit
              inputs
              pkgs-unstable
              spicetify-nix
              ;
          };
        };

    in
    {
      nixosConfigurations = {
        pedropc = mkSystem inputs.nixpkgs "x86_64-linux" "pedropc";
      };
    };
}