Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
114 lines (104 loc) · 2.86 KB
/
Copy pathflake.nix
File metadata and controls
114 lines (104 loc) · 2.86 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
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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-voicevox.url = "github:NixOS/nixpkgs/24e8d730ef4adac7727652e666cbf9dce4d21d03";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
herdr = {
url = "github:ogulcancelik/herdr";
inputs.nixpkgs.follows = "nixpkgs";
};
split-monitor-workspaces = {
url = "github:zjeffer/split-monitor-workspaces";
flake = false;
};
llm-agents.url = "github:numtide/llm-agents.nix";
treefmt-nix.url = "github:numtide/treefmt-nix";
rudesktop = {
url = "github:yutadev31/rudesktop";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{
self,
nixpkgs,
nixpkgs-voicevox,
home-manager,
rust-overlay,
nixvim,
treefmt-nix,
...
}:
let
system = "x86_64-linux";
lib = nixpkgs.lib;
pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
};
pkgs-voicevox = import nixpkgs-voicevox {
inherit system;
config.allowUnfree = true;
};
hostNames = [
"laptop2"
];
mkConfigurations = builder: lib.genAttrs hostNames (hostName: builder hostName);
buildHomeConfiguration =
hostName:
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
inherit hostName;
inherit pkgs-voicevox;
};
modules = [
(./. + "/nix/hosts/${hostName}/home.nix")
nixvim.homeModules.nixvim
];
};
treefmtEval = treefmt-nix.lib.evalModule pkgs {
projectRootFile = "flake.nix";
programs.nixfmt.enable = true;
programs.shfmt.enable = true;
programs.stylua.enable = true;
settings.global.excludes = [
"result/**"
];
};
devPackages = with pkgs; [
bash-language-server
lua-language-server
vscode-langservers-extracted
tombi
nixd
nixfmt
typos-lsp
shfmt
stylua
];
in
{
nixosConfigurations = mkConfigurations (
hostName: nixpkgs.lib.nixosSystem { modules = [ (./. + "/nix/hosts/${hostName}") ]; }
);
homeConfigurations = mkConfigurations buildHomeConfiguration;
formatter.${system} = treefmtEval.config.build.wrapper;
checks.${system}.formatting = treefmtEval.config.build.check self;
devShells.${system}.default = pkgs.mkShell {
packages = devPackages;
};
};
}