-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
81 lines (75 loc) · 2.33 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 config";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
terminal-config = {
url = "github:iancleary/terminal-config";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ self
, flake-utils
, nixpkgs
, nixpkgs-unstable
, home-manager
, terminal-config
, ...
}@inputs:
let
inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs flake-utils.lib.defaultSystems;
in
rec {
overlays = {
unstable = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
};
neovimPlugins = terminal-config.overlays.default;
};
legacyPackages = forAllSystems (system:
import inputs.nixpkgs {
inherit system;
overlays = builtins.attrValues overlays;
config.allowUnfree = true;
}
);
devShells = forAllSystems (system: {
default = nixpkgs.legacyPackages.${system}.callPackage ./shell.nix { };
lint = nixpkgs.legacyPackages.${system}.callPackage ./shells/lint.nix { };
});
formatter = forAllSystems (system: nixpkgs.legacyPackages."${system}".nixpkgs-fmt);
homeConfigurations =
let
defaultHomeManagerModules = [
./modules/home-manager
terminal-config.homeManagerModules.default
];
specialArgs = { inherit inputs outputs; };
in
{
# Ubuntu WSL at home
windows-tower = home-manager.lib.homeManagerConfiguration {
pkgs = legacyPackages.x86_64-linux;
extraSpecialArgs = specialArgs;
modules = defaultHomeManagerModules ++ [
./wsl/windows-tower/default.nix
];
};
# Ubuntu WSL at home
framework = home-manager.lib.homeManagerConfiguration {
pkgs = legacyPackages.x86_64-linux;
extraSpecialArgs = specialArgs;
modules = defaultHomeManagerModules ++ [
./wsl/windows-tower/default.nix
];
};
};
};
}