-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
88 lines (85 loc) · 2.88 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
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager-unstable = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
nix-colors.url = "github:misterio77/nix-colors";
emacs-overlay.url = "github:nix-community/emacs-overlay";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
sops-nix.url = "github:Mic92/sops-nix";
xremap.url = "github:xremap/nix-flake";
waybar.url = "github:alexays/waybar";
nix-std.url = "github:chessai/nix-std";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
};
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager
, home-manager-unstable, nix-std, ... }@inputs:
let
lib = nixpkgs-unstable.lib;
system = "x86_64-linux";
pkgs = import nixpkgs-unstable {
system = "x86_64-linux";
config = { allowUnfree = true; };
};
pkgs-stable = import nixpkgs {
system = "x86_64-linux";
config = { allowUnfree = true; };
};
std = nix-std.lib;
active-profile = import ./active-profile.nix;
in {
nix.nixPath = [ "nixpkgs=${nixpkgs-unstable}" ];
nixosConfigurations = {
ammars-pc = lib.nixosSystem {
inherit system;
modules = [ ./hosts/desktop/configuration.nix ];
specialArgs = { inherit pkgs-stable; };
};
work-laptop = lib.nixosSystem {
inherit system;
modules = [ ./hosts/work-laptop/configuration.nix ];
specialArgs = { inherit pkgs-stable; };
};
surface-go = lib.nixosSystem {
inherit system;
modules = [ ./hosts/surface-go/configuration.nix ];
specialArgs = { inherit pkgs-stable; };
};
framework13 = lib.nixosSystem {
inherit system;
modules = [
./hosts/framework13/configuration.nix
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
];
specialArgs = { inherit pkgs-stable; };
};
iso = lib.nixosSystem {
inherit system;
modules = [ ./hosts/iso/configuration.nix ];
specialArgs = { inherit pkgs-stable; };
};
};
homeConfigurations = {
ammar = home-manager-unstable.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
{
nixpkgs.overlays = [
inputs.emacs-overlay.overlay
inputs.nix-vscode-extensions.overlays.default
];
}
(./hosts + ("/" + active-profile) + "/home.nix")
];
extraSpecialArgs = { inherit inputs std pkgs-stable; };
};
};
};
}