-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
124 lines (114 loc) · 3.28 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
{
#ref: https://github.com/yasunori0418/dotfiles/blob/485eee2794c2e5217823b7bba5201e9f9fe16d1e/flake.nix#L2
description = "My dotfiles, all my effort, my sword.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
mozilla-overlay.url = "github:mozilla/nixpkgs-mozilla";
catppuccin.url = "github:catppuccin/nix";
treefmt-nix.url = "github:numtide/treefmt-nix";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
emacs-overlay.url = "github:nix-community/emacs-overlay";
emacs.url = "github:cmacrae/emacs";
nak.url = "github:comamoca/flake-nak";
nur-packages.url = "github:Comamoca/nur-packages";
disko = {
url = "github:nix-community/disko/latest";
inputs.nixpkgs.follows = "nixpkgs";
};
xremap.url = "github:xremap/nix-flake";
};
outputs =
{
self,
nixpkgs,
nixos-hardware,
home-manager,
treefmt-nix,
catppuccin,
neovim-nightly-overlay,
emacs-overlay,
emacs,
nak,
mozilla-overlay,
nur-packages,
disko,
xremap,
}@inputs:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
overlays = [
neovim-nightly-overlay.overlays.default
(import emacs-overlay)
nak.overlays.default
# (import emacs.overlay)
mozilla-overlay.overlays.firefox
];
in
# code = _: s: s;
{
formatter.x86_64-linux = treefmtEval.config.build.wrapper;
checks.x86_64-linux = {
format = treefmtEval.config.build.wrapper;
};
nixosConfigurations = {
NixOS = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
inputs.catppuccin.nixosModules.catppuccin
home-manager.nixosModules.home-manager
./configuration.nix
xremap.nixosModules.default
# disko.nixosModules.disko
# ({ config, ... }: {
# # system.stateVersion = config.system.stateVersion;
# disko.devices.disk.main.imageSize = "10G";
# })
];
specialArgs = {
inherit inputs;
};
};
};
homeConfigurations = {
Home = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import inputs.nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
extraSpecialArgs = {
inherit inputs;
};
modules = [
./home.nix
inputs.catppuccin.homeManagerModules.catppuccin
{
nixpkgs.overlays = overlays ++ [
(final: prev: {
# nak = inputs.nak.packages.x86_64-linux.default;
})
];
}
];
};
};
devShells.x86_64-linux.default = pkgs.mkShell {
packages = with pkgs; [
lua-language-server
stylua
nil
];
inputsFrom =
[
];
# shellHook = ''
# export DEBUG=1
# '';
};
};
}