-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
96 lines (82 loc) · 3.47 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
{
description = "NixOS systems and tools by shayne";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
nix-formatter-pack.url = "github:Gerschtli/nix-formatter-pack";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
home-manager-unstable.url = "github:nix-community/home-manager/master";
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs";
plasma-manager.url = "github:pjones/plasma-manager";
plasma-manager.inputs.nixpkgs.follows = "nixpkgs";
nixos-wsl.url = "github:nix-community/NixOS-WSL";
nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";
nix-darwin.url = "github:LnL7/nix-darwin/nix-darwin-24.11";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
# Other packages
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
nixos-apple-silicon.url = "github:tpwrules/nixos-apple-silicon";
nixos-hardware.url = "github:nixos/nixos-hardware";
tailscale.url = "https://flakehub.com/f/tailscale/tailscale/*.tar.gz";
# 2024-01-01: add to fix "Module is unknown" issue
tailscale.inputs.nixpkgs.follows = "nixpkgs-unstable";
vscode-server.url = "github:Ten0/nixos-vscode-server";
hyprland-contrib = {
url = "github:shayne/hyprwm-contrib";
inputs.nixpkgs.follows = "nixpkgs";
};
# Non-flakes
nvim-conform.url = "github:stevearc/conform.nvim/v5.2.1";
nvim-conform.flake = false;
nvim-treesitter.url = "github:nvim-treesitter/nvim-treesitter/v0.9.1";
nvim-treesitter.flake = false;
vim-copilot.url = "github:github/copilot.vim/v1.41.0";
vim-copilot.flake = false;
};
outputs = { nixpkgs, ... }@inputs:
with inputs;
let
inherit (self) outputs;
user = "shayne";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
stateVersion = "23.11";
libx = import ./lib { inherit inputs outputs stateVersion user; };
inherit (nixpkgs) lib;
in
libx.loadSystems // {
# Devshell for bootstrapping; acessible via 'nix develop' or 'nix-shell' (legacy)
devShells = libx.forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in import ./shell.nix { inherit pkgs; }
);
# nix fmt
formatter = libx.forAllSystems (system:
nix-formatter-pack.lib.mkFormatter {
inherit nixpkgs system;
config = {
tools = {
alejandra.enable = false;
deadnix.enable = true;
nixpkgs-fmt.enable = true;
statix.enable = true;
};
};
}
);
# Custom packages and modifications, exported as overlays
overlays = import ./overlays { inherit inputs; };
# Custom packages; acessible via 'nix build', 'nix shell', etc
packages = libx.forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in import ./pkgs { inherit pkgs; inherit inputs; }
);
colmena = {
meta = {
nixpkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
nodeNixpkgs = builtins.mapAttrs (_name: value: value.pkgs) self.nixosConfigurations;
nodeSpecialArgs = builtins.mapAttrs (_name: value: value._module.specialArgs) self.nixosConfigurations;
};
} // builtins.mapAttrs (_name: value: { imports = value._module.args.modules; }) self.nixosConfigurations;
};
}