-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
52 lines (49 loc) · 1.5 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
{
description = "A flake that encapsulates all my dotfiles from other repositories";
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
# flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = (import nixpkgs) { inherit system; };
src = {
# universal
inherit (inputs) dot-tmux;
inherit (inputs) dot-astro-nvim;
inherit (inputs) dot-squirrel;
};
cfg = builtins.mapAttrs
(module: src:
pkgs.stdenv.mkDerivation {
name = module;
inherit src;
installPhase = ''
cp -r . $out/
'';
}
)
src;
in
{
# define output packages
packages = {
# universal
inherit (cfg) dot-tmux;
inherit (cfg) dot-astro-nvim;
inherit (cfg) dot-squirrel;
};
# dev environment
devShells.default = with pkgs; mkShell {
packages = [ vim ];
};
});
inputs = {
# nix and flake
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
# universal configs
dot-tmux = { url = "github:shelken/dot-tmux"; flake = false; };
dot-astro-nvim = { url = "github:shelken/dot-astro-nvim"; flake = false; };
dot-squirrel = { url = "github:shelken/rime-auto-deploy"; flake = false; };
# host-specific
};
}