This repository has been archived by the owner on Apr 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
93 lines (83 loc) · 3.27 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
description = "Leo's nixos config";
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
hardware.url = "github:nixos/nixos-hardware";
nur.url = "github:nix-community/NUR";
nix-alien.url = "github:thiagokokada/nix-alien";
nix-ld.url = "github:Mic92/nix-ld/main";
sops-nix.url = "github:Mic92/sops-nix";
utils.url = "github:numtide/flake-utils";
emacs-overlay.url = "github:nix-community/emacs-overlay/e9c4d10bbb4e810cbfe5e31248fe835e08efb35a";
hackpkgs = {
url = "github:applePrincess/hackpkgs";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "utils";
};
nixpkgs-wayland = { url = "github:nix-community/nixpkgs-wayland"; };
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Home manager
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-gaming.url = github:fufexan/nix-gaming;
# Shameless plug: looking for a way to nixify your themes and make
# everything match nicely? Try nix-colors!
# nix-colors.url = "github:misterio77/nix-colors";
};
outputs = { self, nixpkgs, home-manager, nur, sops-nix, utils, hackpkgs, nix-alien, fenix, nixpkgs-wayland, ...
}@inputs: rec {
# This instantiates nixpkgs for each system listed
# Allowing you to configure it (e.g. allowUnfree)
# Our configurations will use these instances
legacyPackages = nixpkgs.lib.genAttrs [ "x86_64-linux" "x86_64-darwin" ]
(system:
import inputs.nixpkgs {
inherit system;
overlays = [
(self: super: {
discord = super.discord.override { withOpenASAR = true; };
})
(self: super: {
wpa_supplicant = super.wpa_supplicant.overrideAttrs
(oldAttrs: rec {
patches = (oldAttrs.patches or [ ])
++ [ ./wpa_lower_security.patch ];
});
})
];
# NOTE: Using `nixpkgs.config` in your NixOS config won't work
# Instead, you should set nixpkgs configs here
# (https://nixos.org/manual/nixpkgs/stable/#idm140737322551056)
config.allowUnfree = true;
config.allowUnfreePredicate = (pkg: true);
config.android_sdk.accept_license = true;
});
nixosConfigurations = {
cattop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
# > Our main nixos configuration file <
modules = [
nur.nixosModules.nur
./nixos/configuration.nix
sops-nix.nixosModules.sops
];
};
overlays.default = import ./packages;
};
homeConfigurations = {
"leo@cattop" = home-manager.lib.homeManagerConfiguration {
pkgs = legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs;
}; # Pass flake inputs to our config
# > Our main home-manager configuration file <
modules = [ nur.nixosModules.nur ./home-manager/home.nix ];
};
};
};
}