-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
111 lines (98 loc) · 3.14 KB
/
Copy pathflake.nix
File metadata and controls
111 lines (98 loc) · 3.14 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
{
description = "pbar's Nix config";
inputs = {
systems.url = "github:nix-systems/default";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
darwin.url = "github:nix-darwin/nix-darwin";
# Modules and overlays
home-manager.url = "github:nix-community/home-manager";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
nixos-wsl.url = "github:nix-community/NixOS-WSL";
nixvim.url = "github:nix-community/nixvim";
# Follow nixpkgs to avoid multiple copies of it bloating the store
darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-vscode-extensions.inputs.nixpkgs.follows = "nixpkgs";
nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
# Neovim plugins
"nvim:dark-notify" = {
url = "github:cormacrelf/dark-notify";
flake = false;
};
};
outputs =
{
systems,
nixpkgs,
darwin,
...
}@inputs:
let
# Add custom packages to Nixpkgs
overlays = import ./overlays.nix inputs;
# Expose a flake output attribute for all supported systems
eachSystem = nixpkgs.lib.genAttrs (import systems);
# Instantiate Nixpkgs for a given system including our overlay packages
pkgsFor = system: import nixpkgs { inherit system overlays; };
in
{
formatter = eachSystem (system: (pkgsFor system).nixfmt-tree);
packages = eachSystem (
system:
{
nvim-pbar = (pkgsFor system).nvim-pbar;
}
// nixpkgs.lib.optionalAttrs (system == "aarch64-darwin") {
sbx = import ./pkgs/sbx.nix {
inherit inputs;
pkgs = import nixpkgs {
system = "aarch64-linux";
inherit overlays;
config.allowUnfree = true;
};
};
}
);
# Apply with: `task mac`
darwinConfigurations."bobbery" = darwin.lib.darwinSystem {
system = "aarch64-darwin";
specialArgs.inputs = inputs;
modules = [
inputs.home-manager.darwinModules.home-manager
./darwin
{
nixpkgs.overlays = overlays;
system.stateVersion = 4;
system.primaryUser = "pierce";
networking.hostName = "bobbery";
networking.computerName = "Bobbery";
home-manager.extraSpecialArgs.inputs = inputs;
home-manager.users."pierce".home.stateVersion = "22.05";
}
];
};
# Apply with: `task tec`
nixosConfigurations."tec" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
inputs.home-manager.nixosModules.home-manager
./nixos-tec
{
nixpkgs.overlays = overlays;
}
];
};
nixosConfigurations."nixos" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
inputs.nixos-wsl.nixosModules.default
{
system.stateVersion = "24.05";
wsl.enable = true;
wsl.defaultUser = "nixos";
}
];
};
};
}