-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
81 lines (74 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
{
description = "My personal Nix configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
flake-utils.url = "github:numtide/flake-utils";
# neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
xremap-flake.url = "github:xremap/nix-flake";
rustaceanvim.url = "github:mrcjkb/rustaceanvim";
# nixvim-config.url = "github:jdsee/nixvim-config";
nix-ld-rs = {
url = "github:nix-community/nix-ld-rs";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ { self, nixpkgs, home-manager, flake-utils, xremap-flake, ... }:
let
inherit (self) outputs;
forEachSystem = flake-utils.lib.eachDefaultSystem;
in
{
packages = forEachSystem (system: import ./pkgs nixpkgs.legacyPackages.${system});
formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.alejandra);
overlays = import ./overlays { inherit inputs; };
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux;
# nixos-rebuild switch --flake .#your-hostname
nixosConfigurations = {
cogitare = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [
./hosts/cogitare
xremap-flake.nixosModules.default
];
};
exodus = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [
./hosts/exodus
xremap-flake.nixosModules.default
];
};
};
# home-manager switch --flake .#your-username@your-hostname
homeConfigurations = {
"jdsee@connexum" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [ ./home/jdsee/connexum.nix ];
};
"jdsee@cogitare" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [ ./home/jdsee/cogitare.nix ];
};
"jdsee@exodus" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [ ./home/jdsee/cogitare.nix ];
};
"seelij@nuntius" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [ ./home/jdsee/nuntius.nix ];
};
};
};
}