-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
136 lines (131 loc) · 3.66 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{
description = "Home Flake";
inputs = {
neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs-stable.url = "nixpkgs/23.11";
flake-utils.url = "github:numtide/flake-utils";
hardware.url = "github:nixos/nixos-hardware";
impermanence.url = "github:nix-community/impermanence";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-colors.url = "github:misterio77/nix-colors";
nnn-plugins = {
url = "github:jarun/nnn/v4.5";
flake = false;
};
wezterm-main = {
url = "github:wez/wezterm?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-contrib = {
url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "nixpkgs";
};
neorg-overlay = {
url = "github:nvim-neorg/nixpkgs-neorg-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
nixd.url = "github:nix-community/nixd";
# Cursosrs and Themes
rose-pine-hyprcursor.url = "github:ndom91/rose-pine-hyprcursor";
diniamo-pkgs.url = "github:diniamo/niqspkgs";
};
outputs =
{
self,
nixpkgs,
nixd,
...
}@inputs:
let
inherit (self) outputs;
local-overlays = import ./overlays;
overlays = [
inputs.neovim-nightly-overlay.overlays.default
inputs.neorg-overlay.overlays.default
local-overlays
];
supportedSystems = [ "x86_64-linux" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgs = forAllSystems (
system:
import nixpkgs {
inherit system overlays;
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
}
);
mkNixos =
system: modules:
nixpkgs.lib.nixosSystem {
inherit system modules;
specialArgs = {
inherit inputs outputs;
};
};
homeManagerModules = import ./modules/hm;
nixosModules = import ./modules/nixos;
in
{
inherit overlays homeManagerModules nixosModules;
nixosConfigurations = {
vega = mkNixos "x86_64-linux" (
[
./hosts/vega
{
nixpkgs = {
inherit overlays;
config.allowUnfree = true;
config.allowUnfreePredicate = _: true;
};
home-manager.useGlobalPkgs = true;
}
]
++ (builtins.attrValues nixosModules)
);
};
devShells = forAllSystems (
system:
let
ps = pkgs.${system};
in
with ps;
{
default = mkShell {
buildInputs = [
coreutils
findutils
gnumake
nixpkgs-fmt
nixVersions.latest
nixd.packages.${system}.default
];
};
haskell = import ./shells/haskell.nix { pkgs = ps; };
rust = import ./shells/rust.nix { pkgs = ps; };
golang = import ./shells/golang.nix { pkgs = ps; };
}
);
};
}