Nix fmt rfc style (more or less)
This commit is contained in:
parent
e7496c447a
commit
515f098644
146 changed files with 2607 additions and 906 deletions
|
|
@ -1,14 +1,24 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
hosts = import ../../hosts.nix;
|
||||
in
|
||||
{
|
||||
|
||||
age.secrets = {
|
||||
ntfy-freya = { file = ../../secrets/ntfy-freya.age; owner = "bertof"; };
|
||||
ntfy-freya = {
|
||||
file = ../../secrets/ntfy-freya.age;
|
||||
owner = "bertof";
|
||||
};
|
||||
};
|
||||
|
||||
console = { font = "Lat2-Terminus16"; keyMap = "it"; };
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "it";
|
||||
};
|
||||
|
||||
environment = {
|
||||
pathsToLink = [ "/share/zsh" ];
|
||||
|
|
@ -20,7 +30,10 @@ in
|
|||
enable = true;
|
||||
# package = pkgs.bluezFull;
|
||||
};
|
||||
opengl = { enable = true; driSupport = true; };
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
};
|
||||
raspberry-pi."4" = {
|
||||
# audio.enable = true; # AUDIO
|
||||
fkms-3d.enable = true; # GPU
|
||||
|
|
@ -52,7 +65,10 @@ in
|
|||
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
gnupg.agent = { enable = true; enableSSHSupport = true; };
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
zsh.enable = true;
|
||||
};
|
||||
|
||||
|
|
@ -77,14 +93,24 @@ in
|
|||
blueman.enable = true;
|
||||
dbus.packages = [ pkgs.dconf ];
|
||||
gnome.gnome-keyring.enable = true;
|
||||
openssh = { enable = true; openFirewall = true; };
|
||||
openssh = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
# xserver = {
|
||||
# enable = true;
|
||||
# desktopManager.retroarch = { enable = true; package = pkgs.retroarchFull; };
|
||||
# };
|
||||
|
||||
fail2ban = { enable = true; bantime-increment.enable = true; };
|
||||
plex = { enable = true; openFirewall = true; group = "users"; };
|
||||
fail2ban = {
|
||||
enable = true;
|
||||
bantime-increment.enable = true;
|
||||
};
|
||||
plex = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
group = "users";
|
||||
};
|
||||
# jellyfin = { enable = true; openFirewall = true; group = "users"; };
|
||||
|
||||
home-assistant = {
|
||||
|
|
@ -246,11 +272,13 @@ in
|
|||
# "!secret famiglia_t_chat_id"
|
||||
# ];
|
||||
# }];
|
||||
tts = [{
|
||||
platform = "google_translate";
|
||||
language = "it";
|
||||
# tld = "it";
|
||||
}];
|
||||
tts = [
|
||||
{
|
||||
platform = "google_translate";
|
||||
language = "it";
|
||||
# tld = "it";
|
||||
}
|
||||
];
|
||||
};
|
||||
configDir = "/var/lib/hass";
|
||||
configWritable = true;
|
||||
|
|
@ -336,12 +364,18 @@ in
|
|||
prometheus = {
|
||||
enable = true;
|
||||
exporters = {
|
||||
node = { enable = true; enabledCollectors = [ "systemd" ]; };
|
||||
node = {
|
||||
enable = true;
|
||||
enabledCollectors = [ "systemd" ];
|
||||
};
|
||||
process = {
|
||||
enable = true;
|
||||
settings.process_names = [
|
||||
# Remove nix store path from process name
|
||||
{ name = "{{.Matches.Wrapped}} {{ .Matches.Args }}"; cmdline = [ "^/nix/store[^ ]*/(?P<Wrapped>[^ /]*) (?P<Args>.*)" ]; }
|
||||
{
|
||||
name = "{{.Matches.Wrapped}} {{ .Matches.Args }}";
|
||||
cmdline = [ "^/nix/store[^ ]*/(?P<Wrapped>[^ /]*) (?P<Args>.*)" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
systemd.enable = true;
|
||||
|
|
@ -352,15 +386,21 @@ in
|
|||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "node";
|
||||
static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }];
|
||||
static_configs = [
|
||||
{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "process";
|
||||
static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.process.port}" ]; }];
|
||||
static_configs = [
|
||||
{ targets = [ "localhost:${toString config.services.prometheus.exporters.process.port}" ]; }
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "systemd";
|
||||
static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ]; }];
|
||||
static_configs = [
|
||||
{ targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ]; }
|
||||
];
|
||||
}
|
||||
];
|
||||
retentionTime = "15d";
|
||||
|
|
@ -368,16 +408,30 @@ in
|
|||
|
||||
snapper.configs =
|
||||
let
|
||||
common = { TIMELINE_CREATE = true; TIMELINE_CLEANUP = true; };
|
||||
common = {
|
||||
TIMELINE_CREATE = true;
|
||||
TIMELINE_CLEANUP = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
bertof = lib.recursiveUpdate common { SUBVOLUME = "/mnt/raid/bertof/"; ALLOW_USERS = [ "bertof" ]; };
|
||||
tiziano = lib.recursiveUpdate common { SUBVOLUME = "/mnt/raid/tiziano/"; ALLOW_USERS = [ "tiziano" ]; };
|
||||
condiviso = lib.recursiveUpdate common { SUBVOLUME = "/mnt/raid/condiviso"; ALLOW_USERS = [ "bertof" "tiziano" ]; };
|
||||
bertof = lib.recursiveUpdate common {
|
||||
SUBVOLUME = "/mnt/raid/bertof/";
|
||||
ALLOW_USERS = [ "bertof" ];
|
||||
};
|
||||
tiziano = lib.recursiveUpdate common {
|
||||
SUBVOLUME = "/mnt/raid/tiziano/";
|
||||
ALLOW_USERS = [ "tiziano" ];
|
||||
};
|
||||
condiviso = lib.recursiveUpdate common {
|
||||
SUBVOLUME = "/mnt/raid/condiviso";
|
||||
ALLOW_USERS = [
|
||||
"bertof"
|
||||
"tiziano"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
time.timeZone = "Europe/Rome";
|
||||
|
||||
users.users = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue