summaryrefslogtreecommitdiff
path: root/home/nix/flake.nix
blob: 3e2afb1062252833c841d81d951f15bdbf47d526 (plain)
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
{
  description = "Freya Nix Flake";

  inputs = {
    # nixpkgs
    nixpkgs.url = "github:nixos/nixpkgs/88195a94f390381c6afcdaa933c2f6ff93959cb4";

    # home manager
    home-manager.url = "github:nix-community/home-manager/5f6aa268e419d053c3d5025da740e390b12ac936";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";

    # nixgl
    nixgl.url = "github:nix-community/nixGL/310f8e49a149e4c9ea52f1adf70cdc768ec53f8a";
    nixgl.inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = {
    nixpkgs,
    home-manager,
    nixgl,
    ...
  }:
  let
    system = "x86_64-linux";
    username = "freya";
  in {
    homeConfigurations.${username} =
      home-manager.lib.homeManagerConfiguration {
        pkgs = nixpkgs.legacyPackages.${system};
        modules = [
          ./home.nix
          ({
            _module.args = {
              inherit nixgl;
            };
            nixpkgs.overlays = [ nixgl.overlay ];
            home = {
              inherit username;
              homeDirectory = "/home/${username}";
              stateVersion = "25.05";
            };
          })
        ];
      };
  };
}