-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
110 lines (88 loc) · 3.02 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
{
description = "monadam's nice config";
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
my-nixpkgs.url = "path:/home/adam/projects/nix/nixpkgs/nixpkgs/";
nixos-hardware.url = "github:nixos/nixos-hardware";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# secrets
agenix.url = "github:ryantm/agenix";
nix-search.url = "github:diamondburned/nix-search";
# hyprland
hyprland.url =
"git+https://github.com/hyprwm/Hyprland?submodules=1&ref=refs/tags/v0.41.2";
hyprland-hy3.url = "github:outfoxxed/hy3?ref=hl0.41.2";
hyprland-hy3.inputs.hyprland.follows = "hyprland";
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins?ref=refs/tags/v0.41.2";
inputs.hyprland.follows = "hyprland";
};
hyprland-virtual-desktops = {
url = "github:levnikmyskin/hyprland-virtual-desktops";
inputs.hyprland.follows = "hyprland";
};
hyprlock.url = "github:hyprwm/hyprlock";
# emacs
emacs-overlay.url = "github:nix-community/emacs-overlay";
emacs-overlay.inputs.nixpkgs-stable.follows = "nixpkgs";
emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";
# vim
nixvim.url = "github:nix-community/nixvim/nixos-24.05";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, agenix, nixpkgs, home-manager, ... }@inputs:
let
pkgs = import nixpkgs { config.allowUnfree = true; };
lib = import ./lib {
inherit self;
inherit (nixpkgs) lib;
inherit pkgs;
};
supportedSystems = [ "x86_64-linux" ];
forEachSupportedSystem = f:
nixpkgs.lib.genAttrs supportedSystems
(system: f { pkgs = import nixpkgs { inherit system; }; });
system = "x86_64-linux";
in
{
nixosConfigurations = {
iron = nixpkgs.lib.nixosSystem rec {
inherit system;
specialArgs = {
inherit inputs;
inherit system;
inherit lib; # w custom libs
};
modules = (lib.mapModulesRec' ./modules lib.id) ++ [
./host/iron/default.nix
{ nixpkgs.config.allowUnfree = true; }
home-manager.nixosModules.home-manager
agenix.nixosModules.default
inputs.nixvim.nixosModules.nixvim
{
home-manager = {
extraSpecialArgs = { inherit inputs; };
backupFileExtension = "bak";
verbose = true;
useGlobalPkgs = true;
useUserPackages = true;
users.adam = import ./home/adam;
};
}
];
};
};
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
nixpkgs-fmt
agenix.packages.x86_64-linux.default
];
inherit system;
};
});
};
}