blob: 55bca1e973bc3ae3a757e0c9247e2ac7021f9e9b (
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
|
{ config, lib, options, pkgs, ... }:
let
# from https://git.sourcephile.fr/sourcephile-nix.git/blob/c6c6c17dd3db0e10096f3da60e0bfe1ed2e91268:/modules.nix
findFiles = pattern:
with builtins;
let go = curr:
let dir = readDir curr; in
let files = lib.filterAttrs (name: type:
type == "regular" &&
match pattern name != null) dir; in
let dirs = lib.filterAttrs (name: type: type == "directory") dir; in
map (name: "${curr}/${name}") (attrNames files) ++
lib.concatMap (name: go "${curr}/${name}") (attrNames dirs);
in go;
in {
nix.useSandbox = true;
nixpkgs.overlays = import ../overlays.nix;
nix.nixPath =
options.nix.nixPath.default ++
[ "nixpkgs-overlays=/etc/nixos/overlays.nix" ];
imports = findFiles ".*\\.nix" ../modules ++ [
./hardened.nix
];
# less locales supported
i18n.supportedLocales = [ "en_US.UTF-8/UTF-8" ];
# Set your time zone.
time.timeZone = "Europe/Paris";
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
binutils
cryptsetup
file
git
gnupg
htop
kitty.terminfo
linuxPackages.bpftrace
linuxPackages.perf
lm_sensors
lynx
bc
lzop
mosh
multipath-tools
ncat
socat
nmap
ripgrep
rxvt_unicode.terminfo
screen
tmux
strace
sysstat
smartmontools
rsync
tcpdump
vim
wget
];
programs.bash.enableCompletion = true;
programs.mtr.enable = true;
services.sysstat = {
enable = true;
collect-args = "1 1 -S XDISK";
};
services.openssh.enable = true;
services.locate = {
enable = true;
interval = "Mon,Thu 03:30";
};
systemd.coredump.enable = true;
environment = {
variables = {
EDITOR = "vim";
PAGER = "less";
LESS = "-X -F -R";
};
etc."inputrc".text = lib.readFile ../files/inputrc;
etc."gitconfig".text = lib.readFile ../files/gitconfig;
etc."gitignores_global".text = lib.readFile ../files/gitignores_global;
};
}
|