-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
132 lines (129 loc) · 3.86 KB
/
Copy pathflake.nix
File metadata and controls
132 lines (129 loc) · 3.86 KB
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
{
description = "My NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
# nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix/release-26.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nixgl = {
url = "github:guibou/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay.url = "github:nix-community/emacs-overlay";
dpom.url = "git+https://github.com/dpom/mynixpkgs";
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
solaar = {
url = "https://flakehub.com/f/Svenum/Solaar-Flake/*.tar.gz"; # For latest stable version
#url = "https://flakehub.com/f/Svenum/Solaar-Flake/0.1.1.tar.gz"; # uncomment line for solaar version 1.1.13
# url = "github:Svenum/Solaar-Flake/main"; # Uncomment line for latest unstable version
inputs.nixpkgs.follows = "nixpkgs";
};
cute-sway-recorder = {
url = "github:it-is-wednesday/cute-sway-recorder";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-ld = {
url = "github:Mic92/nix-ld";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-hermes.url = "github:0xrsydn/nix-hermes-agent";
};
outputs = { self,
emacs-overlay,
home-manager,
nix-hermes,
nixgl,
nixpkgs,
stylix,
systems,
sops-nix,
... } @ inputs:
let
inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib;
forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system});
pkgsFor = lib.genAttrs (import systems) (
system:
import nixpkgs {
inherit system;
config = {
allowUnfree = true;
pulseaudio = true;
};
overlays = [
nixgl.overlay
emacs-overlay.overlays.default
(final: prev: {
openspec = prev.openspec.overrideAttrs (old: {
postInstall = (old.postInstall or "") + ''
substituteInPlace $out/lib/openspec/dist/commands/config.js \
--replace-fail "'npx openspec" "'openspec"
'';
});
})
];
}
);
in {
inherit lib;
nixosConfigurations = {
mary = lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
};
modules = [
./vars.nix
./sops.nix
./hosts/mary/nixos.nix
# nix-ld.nixosModules { programs.nix-ld.dev.enable = true; }
];
};
bob = lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
};
modules = [
./vars.nix
./sops.nix
./hosts/bob/nixos.nix
];
};
};
homeConfigurations = {
"dan@mary" = lib.homeManagerConfiguration {
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
emacsPackage = pkgsFor.x86_64-linux.emacs-pgtk;
};
modules = [
./vars.nix
./sops.nix
./hosts/mary/home.nix
];
};
"dan@bob" = lib.homeManagerConfiguration {
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
emacsPackage = pkgsFor.x86_64-linux.emacs;
};
modules = [
./vars.nix
./sops.nix
./hosts/bob/home.nix
];
};
};
};
}