-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
91 lines (83 loc) · 2.79 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
{
description = "NixOS and Home Manager configuration of perlinm";
inputs = {
# nixos repositories
nixpkgs = { url = "github:nixos/nixpkgs/nixos-unstable"; };
nixpkgs-unstable = { url = "github:nixos/nixpkgs/nixpkgs-unstable"; };
nixpkgs-stable = { url = "github:nixos/nixpkgs/nixos-23.05"; };
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# common dependencies of external repositories
systems.url = "github:nix-systems/default";
naersk = {
url = "github:nix-community/naersk/master";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
# external repositories
trashy = {
url = "github:oberblastmeister/trashy";
inputs.nixpkgs.follows = "nixpkgs";
inputs.naersk.follows = "naersk";
inputs.flake-utils.follows = "flake-utils";
};
helix = {
url = "github:perlinm/helix/mika";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
simple-completion-language-server = {
url = "github:estin/simple-completion-language-server";
inputs.nixpkgs.follows = "nixpkgs";
inputs.naersk.follows = "naersk";
inputs.flake-utils.follows = "flake-utils";
};
nps = {
url = "github:OleMussmann/Nix-Package-Search";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
bibtex-tidy = {
url = "github:perlinm/bibtex-tidy/add-flake";
inputs.systems.follows = "systems";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs:
with inputs;
let
linux = "x86_64-linux";
pkgs = import nixpkgs {
system = linux;
overlays = [ pkgs_overlay ];
};
pkgs_overlay = final: prev: {
unfree = import nixpkgs {
system = prev.system;
config.allowUnfree = true;
};
unstable = import nixpkgs-unstable { system = prev.system; };
stable = import nixpkgs-stable { system = prev.system; };
external.trashy = trashy.defaultPackage.${prev.system};
external.helix = helix.packages.${prev.system}.default;
external.simple-completion-language-server =
simple-completion-language-server.defaultPackage.${prev.system};
external.nps = nps.defaultPackage.${prev.system};
};
in {
nixosConfigurations.map-work = nixpkgs.lib.nixosSystem {
inherit pkgs;
system = linux;
modules = [ ./nixos.nix home-manager.nixosModules.home-manager ];
};
homeConfigurations.perlinm = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
};
};
}