This repository has been archived by the owner on Jun 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
74 lines (72 loc) · 2.13 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
{
description = "Home Manager configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
nixneovimplugins.url = "github:jooooscha/nixpkgs-vim-extra-plugins";
};
outputs = { nixpkgs, flake-utils, home-manager, ... } @ inputs:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
inputs.nixneovimplugins.overlays.default
];
};
makeHomeConfig = modulesOrPaths:
let
modules = builtins.map
(x: if (builtins.isPath x) then (import x) else x)
modulesOrPaths;
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = modules ++ [
(import ./modules/default.nix)
inputs.nixvim.homeManagerModules.nixvim
];
};
importPaths = paths:
builtins.map (x: (import x)) paths;
in
{
packages.homeConfigurations = {
"cheina@pc079" = makeHomeConfig [
(import ./traits/base.nix { stateVersion = "23.05"; username = "cheina"; })
./traits/cheina.nix
./traits/non-nixos.nix
];
"lpchaim@laptop" = makeHomeConfig [
(import ./traits/base.nix { stateVersion = "23.11"; username = "lpchaim"; })
./traits/gnome.nix
./traits/gui.nix
];
lpchaim = makeHomeConfig [ ];
lupec = makeHomeConfig [ ];
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [
nil
nixd
nixpkgs-fmt
pre-commit
rustup
rnix-lsp
];
shellHook = ''
export LC_ALL="C.UTF-8"
pre-commit install
'';
};
}
);
}