-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
76 lines (70 loc) · 2.19 KB
/
flake.nix
File metadata and controls
76 lines (70 loc) · 2.19 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
{
description = "myme's NixOS configuration with flakes";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-wsl.url = "github:nix-community/NixOS-WSL";
flake-utils.url = "github:numtide/flake-utils";
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
doomemacs = {
url = "github:doomemacs/doomemacs";
flake = false;
};
i3ws.url = "github:myme/i3ws";
annodate.url = "github:myme/annodate";
nixon.url = "github:myme/nixon";
wallpapers = {
url = "gitlab:myme/wallpapers";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, home-manager, ... }@inputs:
let
system = "x86_64-linux";
overlays = [
inputs.agenix.overlay
inputs.i3ws.overlay
inputs.annodate.overlay
inputs.nixon.overlay
self.overlay
];
lib = nixpkgs.lib.extend (final: prev:
import ./lib {
inherit home-manager;
lib = final;
});
in {
overlay = import ./overlay.nix {
inherit lib home-manager;
inherit (inputs) doomemacs wallpapers;
};
# NixOS machines
nixosConfigurations = lib.myme.allProfiles ./machines (name: file:
lib.myme.makeNixOS name file { inherit inputs system overlays; });
# Non-NixOS machines (Fedora, WSL, ++)
homeConfigurations = lib.myme.nixos2hm {
inherit (self) nixosConfigurations;
inherit overlays system;
};
} // flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system overlays; };
in {
# All packages under pkgs.myme.apps from the overlay
packages = pkgs.myme.apps;
devShells = {
# Default dev shell (used by direnv)
default = pkgs.mkShell { buildInputs = with pkgs; [ agenix ]; };
# For hacking on XMonad
xmonad = pkgs.mkShell {
buildInputs = with pkgs;
[ (ghc.withPackages (ps: with ps; [ xmonad xmonad-contrib ])) ];
};
};
});
}