about summary refs log tree commit diff
path: root/flake.nix
blob: 2accd12902f8401b8a901353c4680536e91d17cf (plain) (blame)
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
{
  description = "personal NixOS configurations";

  inputs = {
    # Nixpkgs, NixOS's official repo
    nixpkgs.url = "github:nixos/nixpkgs/release-21.11";

    # We use the unstable nixpkgs repo for some packages.
    nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";

    home-manager = {
      url = "github:nix-community/home-manager/release-21.11";
      # We want home-manager to use the same set of nixpkgs as our system.
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  # Output config, or config for NixOS system
  outputs = { self, nixpkgs, home-manager, ... }@inputs: {
    nixosConfigurations = {
      # desktop
      carmel = nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        modules = [
          ./hosts/carmel/configuration.nix
          ./users/fcuny
          ./modules/systems
          ./modules/desktop
          home-manager.nixosModules.home-manager {
            home-manager.useGlobalPkgs = true;
            home-manager.useUserPackages = true;
            home-manager.users.fcuny = {
              imports = [
                ./users/fcuny/home-manager.nix
              ];
            };
          }
        ];
      };
    };
  };
}