-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
67 lines (55 loc) · 1.83 KB
/
flake.nix
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
{
inputs = {
# use nixpkgs-unstable as our package repository
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
# use home-manager for configuring our home-environments
home-manager = {
url = "github:nix-community/home-manager";
# configure home-manager to follow our imported nixpkgs version rather than their own.
inputs.nixpkgs.follows = "nixpkgs";
};
nixGL = {
url = "github:guibou/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
};
outputs = { ... } @inputs:
let
pkgs = (import inputs.nixpkgs {
# allow unfree packages, we're not Richard Stallman
config = {
allowUnfree = true;
permittedInsecurePackages = [
"openssl-1.1.1w"
];
};
# set pkgs system to x86 linux. Sadly home-manager
# doesn't follow the flake standard of "baseoutput.${system}.username",
# it would make it easier to use flake-utils or flake-parts properly.
system = "x86_64-linux";
# https://nixos.wiki/wiki/Overlays
# Overlay is basically used as a way to patch the pkgs with whatever we put in the overlays list.
overlays = [
inputs.nur.overlay
inputs.nixGL.overlay
];
});
makeHome = pkgs: modules:
inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
};
inherit modules;
};
makeHomeWithPackages = makeHome pkgs;
in
{
homeConfigurations = {
jonas = makeHomeWithPackages [ ./jonas ./jonas/desktop ./jonas/terminal ];
jonas-server = makeHomeWithPackages [ ./jonas ./jonas/terminal ];
};
formatter."x86_64-linux" = pkgs.nixpkgs-fmt;
};
}