blob: c314f250af01252a8b581f3a6c284583a2f6fc57 (
plain)
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
{
description = "flake for multiple systems";
inputs = {
# default nix flake imports
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-25.05";
};
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
# custom flakes
## nix-flatpaks
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
};
outputs = inputs @ { nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
commonLibs = with pkgs; lib.makeLibraryPath [
acl
attr
bzip2
curl
stdenv.cc.cc
libsodium
libssh
libxml2
libz
musl
openssl
util-linux
xz
zlib
zstd
];
commonModules = [
home-manager.nixosModules.home-manager
{
home-manager = {
extraSpecialArgs = { inherit inputs; system = system; };
useGlobalPkgs = true;
useUserPackages = true;
users.aethrvmn = import ./home-manager;
backupFileExtension = "backup";
};
}
./modules/common
];
ClientModules = [
inputs.nix-flatpak.nixosModules.nix-flatpak
./modules/client
];
ServerModules = [
./modules/server
];
mkHost = { hostPath, extraModules }:
nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [ hostPath ] ++ extraModules;
};
in
{
nixosConfigurations = {
pad = mkHost {
hostPath = ./hosts/pad;
extraModules = commonModules ++ ClientModules;
};
station = mkHost {
hostPath = ./hosts/station;
extraModules = commonModules ++ ClientModules ++ ServerModules;
};
server = mkHost {
hostPath = ./hosts/server;
extraModules = commonModules ++ ServerModules;
};
};
# -------------- devShells -------------#
devShells.x86_64-linux = {
python = pkgs.mkShell {
name = "python";
packages = with pkgs; [
(python3.withPackages (py-pkgs: with py-pkgs; [
python-lsp-ruff
python-lsp-server
ruff
]))
(poetry.override { python3 = python313; })
];
shellHook = ''
echo "$(python --version)"
echo "$(poetry --version)"
'';
env.LD_LIBRARY_PATH = commonLibs;
};
nim = pkgs.mkShell {
name = "nim";
packages = with pkgs; [
musl
nim
nimble
nimlangserver
upx
];
shellHook = ''
echo "$(nim --version)"
echo "$(nimble --version)"
echo "nimlangserver $(nimlangserver --version)"
'';
env.LD_LIBRARY_PATH = commonLibs;
};
js = pkgs.mkShell {
name = "js";
packages = with pkgs; [
bun
];
shellHook = ''
echo "$(bun --version)"
'';
env.LD_LIBRARY_PATH = commonLibs;
};
};
};
}
|
; all rights regarding Text and Data Mining (TDM) are reserved.