-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
47 lines (45 loc) · 1.58 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
{
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
nixpkgs-new.url = github:NixOS/nixpkgs/nixos-unstable;
# nixpkgs-new.url = github:NixOS/nixpkgs/nixos-22.05;
home-manager.url = github:nix-community/home-manager;
home-manager-new.url = github:nix-community/home-manager/release-22.05;
nvim-nightly.url = github:nix-community/neovim-nightly-overlay;
nvim-nightly-new.url = github:nix-community/neovim-nightly-overlay;
spacelix.url = github:felix-lipski/spacelix;
auto-bg.url = github:felix-lipski/auto-bg;
};
outputs = { self, ... }@inputs:
{
nixosConfigurations = let
oldOverlay = final: prev: {
old = import inputs.nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
};
overlays = [
oldOverlay
# inputs.nvim-nightly-new.overlay
];
base = host: inputs.nixpkgs-new.lib.nixosSystem {
# base = host: nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
{ nixpkgs.overlays = overlays; }
(import (./. + "/machines/${host}.nix"))
(import ./config.nix)
inputs.home-manager-new.nixosModules.home-manager
inputs.spacelix.spacelix-module
];
};
in {
tp = base "tp";
dt = base "dt";
};
tp = self.nixosConfigurations.tp.config.system.build.toplevel;
dt = self.nixosConfigurations.dt.config.system.build.toplevel;
};
}