-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
executable file
·120 lines (102 loc) · 2.92 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{
description = "My Home NixOS configuration flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
systems.url = "github:nix-systems/default-linux";
nixos-hardware.url = "github:nixos/nixos-hardware/master";
nixgl.url = "github:guibou/nixGL";
sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
nil-ls.url = "github:oxalica/nil";
catppuccin = {
url = "github:catppuccin/nix";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/Hyprland";
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
denix = {
url = "github:yunfachi/denix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
};
outputs =
inputs@{
self,
denix,
nixpkgs,
...
}:
let
lib = nixpkgs.lib;
system = "x86_64-linux";
pkgs = mkPkgs nixpkgs ((lib.attrValues self.overlays));
unstable = mkPkgs inputs.nixpkgs-unstable [ ];
overlay =
final: prev:
{
inherit unstable;
hyprFlake = inputs.hyprland.packages.${system};
hyprPluginsFlake = inputs.hyprland-plugins.packages.${system};
firefoxAddons = inputs.firefox-addons.packages.${system};
local = self.packages."${system}";
}
// (import ./overlays) final prev;
mkPkgs =
pkgs: overlays:
import pkgs {
inherit system;
config.allowUnfree = true;
config.permittedInsecurePackages = [
"archiver-3.5.1"
];
overlays = overlays;
};
mkConfigurations =
isHomeManager:
denix.lib.configurations rec {
homeManagerNixpkgs = nixpkgs;
homeManagerUser = "zonni";
inherit isHomeManager;
paths = [
./hosts
./rices
./modules
];
specialArgs = {
inherit
inputs
isHomeManager
homeManagerUser
pkgs
system
;
};
};
in
{
overlays.default = overlay;
packages."${system}" = builtins.listToAttrs (
map (path: {
name = baseNameOf (dirOf path);
value = pkgs.callPackage path { inherit inputs; };
}) (denix.lib.umport { path = ./packages; })
);
nixosConfigurations = mkConfigurations false;
homeConfigurations = mkConfigurations true;
};
}