global reformat with treefmt

This commit is contained in:
nyanloutre 2025-04-23 11:15:31 +02:00
parent 97f849e454
commit 393e92fe14
17 changed files with 979 additions and 726 deletions

View file

@ -21,15 +21,17 @@
}; };
}; };
outputs = { outputs =
{
self, self,
nixpkgs, nixpkgs,
nixpkgs-unstable, nixpkgs-unstable,
nixpkgs-4a3fc4cf7, nixpkgs-4a3fc4cf7,
simple-nixos-mailserver, simple-nixos-mailserver,
dogetipbot-telegram, dogetipbot-telegram,
ipmihddtemp ipmihddtemp,
}@inputs: { }@inputs:
{
packages.x86_64-linux = (import ./pkgs nixpkgs.legacyPackages.x86_64-linux); packages.x86_64-linux = (import ./pkgs nixpkgs.legacyPackages.x86_64-linux);
@ -40,7 +42,10 @@
{ {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix = { nix = {
settings.experimental-features = [ "nix-command" "flakes" ]; settings.experimental-features = [
"nix-command"
"flakes"
];
registry = { registry = {
nixpkgs.to = { nixpkgs.to = {
type = "path"; type = "path";
@ -68,7 +73,10 @@
ipmihddtemp.nixosModule ipmihddtemp.nixosModule
{ {
nix = { nix = {
settings.experimental-features = [ "nix-command" "flakes" ]; settings.experimental-features = [
"nix-command"
"flakes"
];
registry = { registry = {
nixpkgs.to = { nixpkgs.to = {
type = "path"; type = "path";
@ -98,4 +106,3 @@
}; };
} }

View file

@ -1,13 +1,14 @@
{ lib {
, pkgs lib,
, buildGoModule pkgs,
, fetchFromGitHub buildGoModule,
, buildNpmPackage fetchFromGitHub,
, nixosTests buildNpmPackage,
, caddy nixosTests,
, testers caddy,
, installShellFiles testers,
, stdenv installShellFiles,
stdenv,
}: }:
let let

View file

@ -5,8 +5,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = imports = [
[
../common-cli.nix ../common-cli.nix
../common-gui.nix ../common-gui.nix
./hardware-configuration.nix ./hardware-configuration.nix
@ -56,7 +55,12 @@
users.extraUsers.paul = { users.extraUsers.paul = {
isNormalUser = true; isNormalUser = true;
uid = 1000; uid = 1000;
extraGroups = [ "wheel" "networkmanager" "wireshark" "dialout" ]; extraGroups = [
"wheel"
"networkmanager"
"wireshark"
"dialout"
];
}; };
services.syncthing.enable = true; services.syncthing.enable = true;

View file

@ -1,14 +1,25 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
{ {
imports = imports = [
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usb_storage"
"sd_mod"
];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
@ -19,18 +30,18 @@
hardware.nvidia.optimus_prime.nvidiaBusId = "PCI:1:0:0"; hardware.nvidia.optimus_prime.nvidiaBusId = "PCI:1:0:0";
hardware.nvidia.optimus_prime.intelBusId = "PCI:0:2:0"; hardware.nvidia.optimus_prime.intelBusId = "PCI:0:2:0";
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/7bd3a09b-b188-4ce7-bdcc-d5c5087edc86"; device = "/dev/disk/by-uuid/7bd3a09b-b188-4ce7-bdcc-d5c5087edc86";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/A25A-1786"; device = "/dev/disk/by-uuid/A25A-1786";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-uuid/156cd5e8-715c-48a5-9df4-14565227a6c9"; } { device = "/dev/disk/by-uuid/156cd5e8-715c-48a5-9df4-14565227a6c9"; }
]; ];
nix.maxJobs = lib.mkDefault 8; nix.maxJobs = lib.mkDefault 8;

View file

@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }: {
config,
pkgs,
inputs,
...
}:
{ {
imports = [ imports = [
@ -9,7 +14,10 @@
./services.nix ./services.nix
]; ];
nix.settings.trusted-users = [ "root" "paul" ]; nix.settings.trusted-users = [
"root"
"paul"
];
boot = { boot = {
loader = { loader = {

View file

@ -1,125 +1,138 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
{ {
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; boot.initrd.availableKernelModules = [
"ahci"
"xhci_pci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
"sr_mod"
];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/fec13566-5528-4859-b185-ce37ac2665eb"; device = "/dev/disk/by-uuid/fec13566-5528-4859-b185-ce37ac2665eb";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/5306-AD9A"; device = "/dev/disk/by-uuid/5306-AD9A";
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/var/lib/acme" = fileSystems."/var/lib/acme" = {
{ device = "loutrepool/var/acme"; device = "loutrepool/var/acme";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/certs" = fileSystems."/var/certs" = {
{ device = "loutrepool/var/certs"; device = "loutrepool/var/certs";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/transmission" = fileSystems."/var/lib/transmission" = {
{ device = "loutrepool/var/transmission"; device = "loutrepool/var/transmission";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/matrix-synapse" = fileSystems."/var/lib/matrix-synapse" = {
{ device = "loutrepool/var/matrix-synapse"; device = "loutrepool/var/matrix-synapse";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/radarr" = fileSystems."/var/lib/radarr" = {
{ device = "loutrepool/var/radarr"; device = "loutrepool/var/radarr";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/grafana" = fileSystems."/var/lib/grafana" = {
{ device = "loutrepool/var/grafana"; device = "loutrepool/var/grafana";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/slimserver" = fileSystems."/var/lib/slimserver" = {
{ device = "loutrepool/var/slimserver"; device = "loutrepool/var/slimserver";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/db/influxdb" = fileSystems."/var/db/influxdb" = {
{ device = "loutrepool/var/influxdb"; device = "loutrepool/var/influxdb";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/postgresql" = fileSystems."/var/lib/postgresql" = {
{ device = "loutrepool/var/postgresql"; device = "loutrepool/var/postgresql";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/syncthing" = fileSystems."/var/lib/syncthing" = {
{ device = "loutrepool/var/syncthing"; device = "loutrepool/var/syncthing";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/mnt/medias/incomplete" = fileSystems."/mnt/medias/incomplete" = {
{ device = "loutrepool/torrent-dl"; device = "loutrepool/torrent-dl";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/mnt/medias" = fileSystems."/mnt/medias" = {
{ device = "loutrepool/medias"; device = "loutrepool/medias";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/sieve" = fileSystems."/var/sieve" = {
{ device = "loutrepool/var/sieve"; device = "loutrepool/var/sieve";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/vmail" = fileSystems."/var/vmail" = {
{ device = "loutrepool/var/vmail"; device = "loutrepool/var/vmail";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/sonarr" = fileSystems."/var/lib/sonarr" = {
{ device = "loutrepool/var/sonarr"; device = "loutrepool/var/sonarr";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/jackett" = fileSystems."/var/lib/jackett" = {
{ device = "loutrepool/var/jackett"; device = "loutrepool/var/jackett";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/gitea" = fileSystems."/var/lib/gitea" = {
{ device = "loutrepool/var/gitea"; device = "loutrepool/var/gitea";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/private/sdtdserver" = fileSystems."/var/lib/private/sdtdserver" = {
{ device = "loutrepool/var/sdtdserver"; device = "loutrepool/var/sdtdserver";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/private/factorio" = fileSystems."/var/lib/private/factorio" = {
{ device = "loutrepool/var/factorio"; device = "loutrepool/var/factorio";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/dkim" = fileSystems."/var/dkim" = {
{ device = "loutrepool/var/dkim"; device = "loutrepool/var/dkim";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/vsftpd" = fileSystems."/var/vsftpd" = {
{ device = "loutrepool/var/vsftpd"; device = "loutrepool/var/vsftpd";
fsType = "zfs"; fsType = "zfs";
}; };
@ -128,58 +141,57 @@
# fsType = "zfs"; # fsType = "zfs";
# }; # };
fileSystems."/mnt/backup_loutre" = fileSystems."/mnt/backup_loutre" = {
{ device = "loutrepool/backup"; device = "loutrepool/backup";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/mnt/secrets" = fileSystems."/mnt/secrets" = {
{ device = "loutrepool/secrets"; device = "loutrepool/secrets";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/minecraft" = fileSystems."/var/lib/minecraft" = {
{ device = "loutrepool/var/minecraft"; device = "loutrepool/var/minecraft";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/www" = fileSystems."/var/www" = {
{ device = "loutrepool/var/www"; device = "loutrepool/var/www";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/mastodon" = fileSystems."/var/lib/mastodon" = {
{ device = "loutrepool/var/mastodon"; device = "loutrepool/var/mastodon";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/hass" = fileSystems."/var/lib/hass" = {
{ device = "loutrepool/var/hass"; device = "loutrepool/var/hass";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/nextcloud" = fileSystems."/var/lib/nextcloud" = {
{ device = "loutrepool/var/nextcloud"; device = "loutrepool/var/nextcloud";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/var/lib/private/photoprism" = fileSystems."/var/lib/private/photoprism" = {
{ device = "loutrepool/var/photoprism"; device = "loutrepool/var/photoprism";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/mnt/paul-home" = fileSystems."/mnt/paul-home" = {
{ device = "loutrepool/zfs-replicate/paul-fixe/fastaf/home"; device = "loutrepool/zfs-replicate/paul-fixe/fastaf/home";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/mnt/webdav" = fileSystems."/mnt/webdav" = {
{ device = "loutrepool/webdav"; device = "loutrepool/webdav";
fsType = "zfs"; fsType = "zfs";
}; };
swapDevices = swapDevices = [
[
{ {
device = "/var/swapfile"; device = "/var/swapfile";
size = 8096; size = 8096;

View file

@ -1,4 +1,10 @@
{ config, lib, pkgs, pkgs-4a3fc4cf7, ... }: {
config,
lib,
pkgs,
pkgs-4a3fc4cf7,
...
}:
{ {
services = { services = {

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
domaine = "nyanlout.re"; domaine = "nyanlout.re";
@ -23,10 +28,21 @@ in
enable = true; enable = true;
extraConfig = { extraConfig = {
inputs = { inputs = {
zfs = { poolMetrics = true; }; zfs = {
net = { interfaces = [ "eno1" "eno2" "eno3" "eno4" ]; }; poolMetrics = true;
};
net = {
interfaces = [
"eno1"
"eno2"
"eno3"
"eno4"
];
};
netstat = { }; netstat = { };
cpu = { totalcpu = true; }; cpu = {
totalcpu = true;
};
kernel = { }; kernel = { };
mem = { }; mem = { };
processes = { }; processes = { };
@ -37,10 +53,15 @@ in
paths = [ paths = [
"/sys/fs/cgroup/system.slice/*" "/sys/fs/cgroup/system.slice/*"
]; ];
files = ["memory.current" "cpu.stat"]; files = [
"memory.current"
"cpu.stat"
];
} }
]; ];
ipmi_sensor = { path = "${pkgs.ipmitool}/bin/ipmitool"; }; ipmi_sensor = {
path = "${pkgs.ipmitool}/bin/ipmitool";
};
smart = { smart = {
path = "${pkgs.writeShellScriptBin "smartctl" "/run/wrappers/bin/sudo ${pkgs.smartmontools}/bin/smartctl $@"}/bin/smartctl"; path = "${pkgs.writeShellScriptBin "smartctl" "/run/wrappers/bin/sudo ${pkgs.smartmontools}/bin/smartctl $@"}/bin/smartctl";
}; };
@ -76,7 +97,10 @@ in
]; ];
}; };
outputs = { outputs = {
influxdb = { database = "telegraf"; urls = [ "http://localhost:8086" ]; }; influxdb = {
database = "telegraf";
urls = [ "http://localhost:8086" ];
};
}; };
}; };
}; };
@ -122,6 +146,14 @@ in
}; };
security.sudo.extraRules = [ security.sudo.extraRules = [
{ commands = [ { command = "${pkgs.smartmontools}/bin/smartctl"; options = [ "NOPASSWD" ]; } ]; users = [ "telegraf" ]; } {
commands = [
{
command = "${pkgs.smartmontools}/bin/smartctl";
options = [ "NOPASSWD" ];
}
];
users = [ "telegraf" ];
}
]; ];
} }

View file

@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }: {
config,
pkgs,
inputs,
...
}:
{ {
boot = { boot = {
@ -52,7 +57,10 @@
}; };
eno2 = { eno2 = {
ipv4.addresses = [ ipv4.addresses = [
{ address = "10.30.0.1"; prefixLength = 16; } {
address = "10.30.0.1";
prefixLength = 16;
}
]; ];
}; };
enp0s21u1.useDHCP = true; enp0s21u1.useDHCP = true;
@ -110,18 +118,31 @@
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ 80 443 ]; allowedTCPPorts = [
80
443
];
allowedUDPPorts = [ ]; allowedUDPPorts = [ ];
# Open ports on local netwok only # Open ports on local netwok only
interfaces.eno2 = { interfaces.eno2 = {
allowedTCPPorts = [ allowedTCPPorts = [
111 2049 4000 4001 4002 # NFS 111
3483 9000 9090 # Slimserver 2049
4000
4001
4002 # NFS
3483
9000
9090 # Slimserver
1935 # RTMP 1935 # RTMP
]; ];
allowedUDPPorts = [ allowedUDPPorts = [
111 2049 4000 4001 4002 # NFS 111
2049
4000
4001
4002 # NFS
3483 # Slimserver 3483 # Slimserver
67 # DHCP 67 # DHCP
]; ];
@ -162,13 +183,15 @@
# 51000: from all lookup fiber # first table encountered with a default route if fiber is up # 51000: from all lookup fiber # first table encountered with a default route if fiber is up
# 52000: from all lookup lte # first table encountered with a default route if fiber is down # 52000: from all lookup lte # first table encountered with a default route if fiber is down
systemd.network = let systemd.network =
let
routeTables = { routeTables = {
fiber = 1; fiber = 1;
lte = 2; lte = 2;
vpn = 3; vpn = 3;
}; };
in { in
{
enable = true; enable = true;
config = { config = {
@ -193,7 +216,10 @@
Endpoint = "89.234.141.83:8095"; Endpoint = "89.234.141.83:8095";
PublicKey = "t3+JkBfXI1uw8fa9P6JfxXJfTPm9cOHcgIN215UHg2g="; PublicKey = "t3+JkBfXI1uw8fa9P6JfxXJfTPm9cOHcgIN215UHg2g=";
PresharedKey = "@network.wireguard.preshared.wg0"; PresharedKey = "@network.wireguard.preshared.wg0";
AllowedIPs = ["0.0.0.0/0" "::/0"]; AllowedIPs = [
"0.0.0.0/0"
"::/0"
];
PersistentKeepalive = 15; PersistentKeepalive = 15;
} }
]; ];

View file

@ -1,11 +1,18 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
with lib; with lib;
let let
domaine = "nyanlout.re"; domaine = "nyanlout.re";
sendMail = to: subject: message: pkgs.writeShellScriptBin "mail.sh" '' sendMail =
to: subject: message:
pkgs.writeShellScriptBin "mail.sh" ''
${pkgs.system-sendmail}/bin/sendmail ${to} <<EOF ${pkgs.system-sendmail}/bin/sendmail ${to} <<EOF
From: root@nyanlout.re From: root@nyanlout.re
Subject: ${subject} Subject: ${subject}
@ -19,7 +26,9 @@ let
fi fi
''; '';
backup_mail_alert = sendMail "paul@nyanlout.re" "ERREUR: Sauvegarde Borg" "Impossible de terminer la sauvegarde. Merci de voir les logs"; backup_mail_alert =
sendMail "paul@nyanlout.re" "ERREUR: Sauvegarde Borg"
"Impossible de terminer la sauvegarde. Merci de voir les logs";
in in
{ {
@ -128,7 +137,9 @@ in
"/mnt/paul-home/paul/.cache" "/mnt/paul-home/paul/.cache"
]; ];
repo = "ssh://u306925@u306925.your-storagebox.de:23/./loutreos"; repo = "ssh://u306925@u306925.your-storagebox.de:23/./loutreos";
environment = { BORG_RSH = "ssh -i /mnt/secrets/hetzner_ssh_key"; }; environment = {
BORG_RSH = "ssh -i /mnt/secrets/hetzner_ssh_key";
};
encryption = { encryption = {
mode = "repokey-blake2"; mode = "repokey-blake2";
passCommand = "cat /mnt/secrets/borgbackup_loutre_encryption_pass"; passCommand = "cat /mnt/secrets/borgbackup_loutre_encryption_pass";
@ -154,12 +165,16 @@ in
borgbackup.repos = { borgbackup.repos = {
diskstation = { diskstation = {
authorizedKeys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDllbxON66dBju7sMnhX8/E0VRo3+PDYvDsHP0/FK+h8JHol4+pouLmI7KIDKYOJmSuom283OqnyZOMqk+RShTwWIFm9hOd2R9aj45Zrd9jPW2APOCec/Epgogj0bwBnc0l2v6qxkxaBMgL5DnAQ+E00uvL1UQpK8c8j4GGiPlkWJD6Kf+pxmnfH1TIm+J2XCwl0oeCkSK/Frd8eM+wCraMSzoaGiEcfMz2jK8hxDWjDxX7epU0ELF22BVCuyN8cYRoFTnV88E38PlaqsOqD5ePkxk425gDh7j/C06f8QKgnasVH2diixo92kYSd7i/RmfeXDDwAD5xqUvODczEuIdt root@DiskStation" ]; authorizedKeys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDllbxON66dBju7sMnhX8/E0VRo3+PDYvDsHP0/FK+h8JHol4+pouLmI7KIDKYOJmSuom283OqnyZOMqk+RShTwWIFm9hOd2R9aj45Zrd9jPW2APOCec/Epgogj0bwBnc0l2v6qxkxaBMgL5DnAQ+E00uvL1UQpK8c8j4GGiPlkWJD6Kf+pxmnfH1TIm+J2XCwl0oeCkSK/Frd8eM+wCraMSzoaGiEcfMz2jK8hxDWjDxX7epU0ELF22BVCuyN8cYRoFTnV88E38PlaqsOqD5ePkxk425gDh7j/C06f8QKgnasVH2diixo92kYSd7i/RmfeXDDwAD5xqUvODczEuIdt root@DiskStation"
];
path = "/mnt/backup_loutre/diskstation_borg"; path = "/mnt/backup_loutre/diskstation_borg";
user = "synology"; user = "synology";
}; };
minecraft-rezome = { minecraft-rezome = {
authorizedKeys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDc1nGsSesW96k0DPMSt/chjvCrYmfgPgHG1hdUYB5x0pZPdOJaVRIlETWdoFlO+ViviC518B3TF7Qc3oJXPZMchJQl684Nukbc312juf+j9z/KT3dqD8YvKX6o5ynx1Dyq52ftrfkBAEAvzE0OfRljUPbwGBOM0dGRD4R1jbiHquTXpITlbgGTZymbwr4Jr9W9atgf5kHMiX7xOqMZcasDtUE8g+AG4ysHdpjOrBOUM9QeRbVP1bxEFP8xjqOOoET5tbkwektP4B2jaf+EHBPUy2lkwjVEKT6MaSlkJx/wMvUWp25kG9mrXgwUw1bgfOeZIsK6ztcki3l92BJQD9ip shame@minecraft.rezom.eu" ]; authorizedKeys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDc1nGsSesW96k0DPMSt/chjvCrYmfgPgHG1hdUYB5x0pZPdOJaVRIlETWdoFlO+ViviC518B3TF7Qc3oJXPZMchJQl684Nukbc312juf+j9z/KT3dqD8YvKX6o5ynx1Dyq52ftrfkBAEAvzE0OfRljUPbwGBOM0dGRD4R1jbiHquTXpITlbgGTZymbwr4Jr9W9atgf5kHMiX7xOqMZcasDtUE8g+AG4ysHdpjOrBOUM9QeRbVP1bxEFP8xjqOOoET5tbkwektP4B2jaf+EHBPUy2lkwjVEKT6MaSlkJx/wMvUWp25kG9mrXgwUw1bgfOeZIsK6ztcki3l92BJQD9ip shame@minecraft.rezom.eu"
];
path = "/mnt/backup_loutre/minecraft_rezome"; path = "/mnt/backup_loutre/minecraft_rezome";
user = "rezome"; user = "rezome";
}; };
@ -314,7 +329,9 @@ in
users.groups.nginx.members = [ "matrix-synapse" ]; users.groups.nginx.members = [ "matrix-synapse" ];
security.pam.services.sshd.text = pkgs.lib.mkDefault( pkgs.lib.mkAfter "session optional ${pkgs.pam}/lib/security/pam_exec.so seteuid ${login_mail_alert}/bin/mail_alert.sh" ); security.pam.services.sshd.text = pkgs.lib.mkDefault (
pkgs.lib.mkAfter "session optional ${pkgs.pam}/lib/security/pam_exec.so seteuid ${login_mail_alert}/bin/mail_alert.sh"
);
networking = { networking = {
firewall.interfaces.eno2.allowedTCPPorts = [ firewall.interfaces.eno2.allowedTCPPorts = [
@ -322,11 +339,15 @@ in
]; ];
firewall.allowedTCPPorts = [ firewall.allowedTCPPorts = [
20 21 # FTP 20
21 # FTP
]; ];
firewall.allowedTCPPortRanges = [ firewall.allowedTCPPortRanges = [
{ from = 64000; to = 65535; } # FTP {
from = 64000;
to = 65535;
} # FTP
]; ];
}; };
} }

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }: {
lib,
config,
pkgs,
...
}:
{ {
users.users = { users.users = {
@ -6,7 +11,12 @@
uid = 1000; uid = 1000;
isNormalUser = true; isNormalUser = true;
description = "Paul TREHIOU"; description = "Paul TREHIOU";
extraGroups = [ "wheel" "medias" "transmission" "podman" ]; extraGroups = [
"wheel"
"medias"
"transmission"
"podman"
];
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAF7VlzHzgg70uFbRFtVTS34qNBke/RD36mRENAsa33RxztxrqMsIDscAD/d6CTe6HDy7MCGzJnWCJSXj5iOQFM4RRMvKNEgCKPHqfhmfVvO4YZuMjNB0ufVf6zhJL4Hy43STf7NIWrenGemUP+OvVSwN/ujgl2KKw4KJZt25/h/7JjlCgsZm4lWg4xcjoiKL701W2fbEoU73XKdbRTgTvKoeK1CGxdAPFefFDFcv/mtJ7d+wIxw9xODcLcA66Bu94WGMdpyEAJc4nF8IOy4pW8AzllDi0qNEZGCQ5+94upnLz0knG1ue9qU2ScAkW1/5rIJTHCVtBnmbLNSAOBAstaGQJuSL40TWZ1oPA5i1qUEhunNcJ+Sgtp6XP69qY34T/AeJvHRyw5M5LfN0g+4ka9k06NPBhbpHFASz4M8nabQ0iM63++xcapnw/8gk+EPhYVKW86SsyTa9ur+tt6oDWEKNaOhgscX44LexY7jKdeBRt3GaObtBJtVLBRx3Z2aRXgjgnKGqS40mGRiSkqb2DShspI1l8DV2RrPiuwdBzXVQjWRc0KXmJrcgXX9uoPSxihxwaUQyvmITOV1Y+NEuek4gRkVNOxjoG7RGnaYvYzxEQVoI5TwZC2/DCrAUgCv8DQawkcpEiWnBq7Q5VnpmFx5juVQ/I0G8byOkPXgRUOk9 openpgp:0xAB524BBC" "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAF7VlzHzgg70uFbRFtVTS34qNBke/RD36mRENAsa33RxztxrqMsIDscAD/d6CTe6HDy7MCGzJnWCJSXj5iOQFM4RRMvKNEgCKPHqfhmfVvO4YZuMjNB0ufVf6zhJL4Hy43STf7NIWrenGemUP+OvVSwN/ujgl2KKw4KJZt25/h/7JjlCgsZm4lWg4xcjoiKL701W2fbEoU73XKdbRTgTvKoeK1CGxdAPFefFDFcv/mtJ7d+wIxw9xODcLcA66Bu94WGMdpyEAJc4nF8IOy4pW8AzllDi0qNEZGCQ5+94upnLz0knG1ue9qU2ScAkW1/5rIJTHCVtBnmbLNSAOBAstaGQJuSL40TWZ1oPA5i1qUEhunNcJ+Sgtp6XP69qY34T/AeJvHRyw5M5LfN0g+4ka9k06NPBhbpHFASz4M8nabQ0iM63++xcapnw/8gk+EPhYVKW86SsyTa9ur+tt6oDWEKNaOhgscX44LexY7jKdeBRt3GaObtBJtVLBRx3Z2aRXgjgnKGqS40mGRiSkqb2DShspI1l8DV2RrPiuwdBzXVQjWRc0KXmJrcgXX9uoPSxihxwaUQyvmITOV1Y+NEuek4gRkVNOxjoG7RGnaYvYzxEQVoI5TwZC2/DCrAUgCv8DQawkcpEiWnBq7Q5VnpmFx5juVQ/I0G8byOkPXgRUOk9 openpgp:0xAB524BBC"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDCACVI2dL4AmOdcb7RSl3JZpfK33NhqrYFfWfXMYow5SPJ9VPteOp5kVvKUuSbGH3chjpttYC/ueQJJhFagiKmkeftQTslIw6C009wUExGpJwRotHqISXv2ctURGURKy2FF848whd7xZJzdj49ZJ6S+SCbRFZvVWfT2dP/JwTiWW1mbEaWKyOgrixH6wSKt9ECumjX9KjqSWGw+k3yLJxIhdqiZAjNv4soJs1mQYdIlFCXCuznzoZIQBexZPQCx0j9HjczPz1feMLWkrHzEMexNjsBE2uA6yXLbH1wa8xCJ4VOeD7u9JqVY579AsicD62G+qIgw0B2zmyz7xTrdPv+061zmYn6qYr8EXGTk4dVgedZp8M1XzZ1PVoeeftPFcClXC7zCGyCR2uzJbQLzlaTwZrdghAiS9UhMRuKpNgZy2zDWw4MqdojrF5bndPkoijlXWYrPYBFED5OU1mpwzpanYgldowJC/Ixjwi+Hmse2q4XgZ+egfuotBqPfqB+bWsCa5GNiJWGdLP69uBSsXubGnqLwvE0FAQ2GHb+SEoZKFy/QV9GzOLlVrGlgK5YFgKJD+Q1nn1QRycXt1oMVC/AtR/NshOGanhdvIRpPATGmaxLVXSY093vyAOW4MPrS00fPAXzAfJUwIuWcloFfLMo5Jitj5rpE1s6FX8xrl4upQ== paul@nyanlout.re" "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDCACVI2dL4AmOdcb7RSl3JZpfK33NhqrYFfWfXMYow5SPJ9VPteOp5kVvKUuSbGH3chjpttYC/ueQJJhFagiKmkeftQTslIw6C009wUExGpJwRotHqISXv2ctURGURKy2FF848whd7xZJzdj49ZJ6S+SCbRFZvVWfT2dP/JwTiWW1mbEaWKyOgrixH6wSKt9ECumjX9KjqSWGw+k3yLJxIhdqiZAjNv4soJs1mQYdIlFCXCuznzoZIQBexZPQCx0j9HjczPz1feMLWkrHzEMexNjsBE2uA6yXLbH1wa8xCJ4VOeD7u9JqVY579AsicD62G+qIgw0B2zmyz7xTrdPv+061zmYn6qYr8EXGTk4dVgedZp8M1XzZ1PVoeeftPFcClXC7zCGyCR2uzJbQLzlaTwZrdghAiS9UhMRuKpNgZy2zDWw4MqdojrF5bndPkoijlXWYrPYBFED5OU1mpwzpanYgldowJC/Ixjwi+Hmse2q4XgZ+egfuotBqPfqB+bWsCa5GNiJWGdLP69uBSsXubGnqLwvE0FAQ2GHb+SEoZKFy/QV9GzOLlVrGlgK5YFgKJD+Q1nn1QRycXt1oMVC/AtR/NshOGanhdvIRpPATGmaxLVXSY093vyAOW4MPrS00fPAXzAfJUwIuWcloFfLMo5Jitj5rpE1s6FX8xrl4upQ== paul@nyanlout.re"
@ -56,6 +66,12 @@
users.extraGroups.medias = { users.extraGroups.medias = {
gid = 498; gid = 498;
members = [ "slimserver" "radarr" "sonarr" "jellyfin" "transmission" ]; members = [
"slimserver"
"radarr"
"sonarr"
"jellyfin"
"transmission"
];
}; };
} }

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
with lib; with lib;
@ -83,7 +88,10 @@ in
nginx = { nginx = {
enable = true; enable = true;
package = pkgs.nginx.override { package = pkgs.nginx.override {
modules = with pkgs.nginxModules; [ dav moreheaders ]; modules = with pkgs.nginxModules; [
dav
moreheaders
];
}; };
recommendedGzipSettings = true; recommendedGzipSettings = true;
recommendedOptimisation = true; recommendedOptimisation = true;
@ -115,7 +123,12 @@ in
}; };
audit_log = { audit_log = {
targets = [ "fd://stdout" ]; targets = [ "fd://stdout" ];
events = [ "access_denied" "login_success" "login_failure" "logout" ]; events = [
"access_denied"
"login_success"
"login_failure"
"logout"
];
}; };
providers.simple = { providers.simple = {
enable_basic_auth = true; enable_basic_auth = true;
@ -129,14 +142,20 @@ in
acl = { acl = {
rule_sets = [ rule_sets = [
{ {
rules = [ { field = "x-host"; regexp = ".*"; } ]; rules = [
{
field = "x-host";
regexp = ".*";
}
];
allow = [ "@admins" ]; allow = [ "@admins" ];
} }
]; ];
}; };
}; };
}; };
virtualHosts = let virtualHosts =
let
base = locations: { base = locations: {
locations = locations // { locations = locations // {
"@maintenance" = { "@maintenance" = {
@ -152,12 +171,16 @@ in
error_page 500 502 503 504 = @maintenance; error_page 500 502 503 504 = @maintenance;
''; '';
}; };
simpleReverse = rport: base { simpleReverse =
rport:
base {
"/" = { "/" = {
proxyPass = "http://127.0.0.1:${toString (rport)}/"; proxyPass = "http://127.0.0.1:${toString (rport)}/";
}; };
}; };
authReverse = rport: zipAttrsWith (name: vs: if name == "extraConfig" then (concatStrings vs) else elemAt vs 0) [ authReverse =
rport:
zipAttrsWith (name: vs: if name == "extraConfig" then (concatStrings vs) else elemAt vs 0) [
(base { (base {
"/" = { "/" = {
proxyPass = "http://127.0.0.1:${toString (rport)}/"; proxyPass = "http://127.0.0.1:${toString (rport)}/";
@ -175,8 +198,10 @@ in
''; '';
} }
]; ];
in { in
"nyanlout.re" = base { {
"nyanlout.re" =
base {
"/" = { "/" = {
alias = "/var/www/site-perso/"; alias = "/var/www/site-perso/";
}; };
@ -189,7 +214,10 @@ in
add_header Access-Control-Allow-Origin * always; add_header Access-Control-Allow-Origin * always;
''; '';
}; };
} // { default = true; }; }
// {
default = true;
};
"musique-meyenheim.fr" = base { "musique-meyenheim.fr" = base {
"/" = { "/" = {
proxyPass = "http://unix:/run/site-musique.sock"; proxyPass = "http://unix:/run/site-musique.sock";
@ -225,17 +253,22 @@ in
proxyWebsockets = true; proxyWebsockets = true;
}; };
}; };
"zigbee.nyanlout.re" = recursiveUpdate (authReverse config.services.zigbee2mqtt.settings.frontend.port) { "zigbee.nyanlout.re" =
recursiveUpdate (authReverse config.services.zigbee2mqtt.settings.frontend.port)
{
locations."/" = { locations."/" = {
proxyWebsockets = true; proxyWebsockets = true;
}; };
}; };
"apart.nyanlout.re" = recursiveUpdate (simpleReverse config.services.home-assistant.config.http.server_port) { "apart.nyanlout.re" =
recursiveUpdate (simpleReverse config.services.home-assistant.config.http.server_port)
{
locations."/" = { locations."/" = {
proxyWebsockets = true; proxyWebsockets = true;
}; };
}; };
"drive.nyanlout.re" = base { "drive.nyanlout.re" =
base {
"/" = { "/" = {
extraConfig = '' extraConfig = ''
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
@ -250,10 +283,13 @@ in
proxy_request_buffering off; proxy_request_buffering off;
''; '';
}; };
} // { }
// {
root = "/mnt/webdav"; root = "/mnt/webdav";
}; };
"rspamd.nyanlout.re" = zipAttrsWith (name: vs: if name == "extraConfig" then (concatStrings vs) else elemAt vs 0) [ "rspamd.nyanlout.re" =
zipAttrsWith (name: vs: if name == "extraConfig" then (concatStrings vs) else elemAt vs 0)
[
(base { (base {
"/" = { "/" = {
proxyPass = "http://unix:/run/rspamd/worker-controller.sock"; proxyPass = "http://unix:/run/rspamd/worker-controller.sock";
@ -382,9 +418,20 @@ in
LoadCredential = "nextcloud_admin.pass:/mnt/secrets/nextcloud_admin.pass"; LoadCredential = "nextcloud_admin.pass:/mnt/secrets/nextcloud_admin.pass";
}; };
systemd.services.site-musique = let systemd.services.site-musique =
djangoEnv =(pkgs.python3.withPackages (ps: with ps; [ gunicorn django_4 pillow setuptools ])); let
in { djangoEnv = (
pkgs.python3.withPackages (
ps: with ps; [
gunicorn
django_4
pillow
setuptools
]
)
);
in
{
description = "Site Django de la musique de Meyenheim"; description = "Site Django de la musique de Meyenheim";
after = [ "network.target" ]; after = [ "network.target" ];
requires = [ "site-musique.socket" ]; requires = [ "site-musique.socket" ];
@ -401,9 +448,13 @@ in
Group = "nginx"; Group = "nginx";
StateDirectory = "site-musique"; StateDirectory = "site-musique";
WorkingDirectory = "/var/www/site-musique/"; WorkingDirectory = "/var/www/site-musique/";
ReadWritePaths = [ "/var/www/site-musique/staticfiles" "/var/www/site-musique/media" ]; ReadWritePaths = [
"/var/www/site-musique/staticfiles"
"/var/www/site-musique/media"
];
EnvironmentFile = "/mnt/secrets/site-musique.env"; EnvironmentFile = "/mnt/secrets/site-musique.env";
ExecStart = ''${djangoEnv}/bin/gunicorn \ ExecStart = ''
${djangoEnv}/bin/gunicorn \
--access-logfile - \ --access-logfile - \
--bind unix:/run/site-musique.sock \ --bind unix:/run/site-musique.sock \
site_musique.wsgi:application site_musique.wsgi:application

View file

@ -5,14 +5,16 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = imports = [
[
./hardware-configuration.nix ./hardware-configuration.nix
../common-cli.nix ../common-cli.nix
../common-gui.nix ../common-gui.nix
]; ];
nix.settings.trusted-users = [ "root" "paul" ]; nix.settings.trusted-users = [
"root"
"paul"
];
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub = { boot.loader.grub = {
@ -76,7 +78,10 @@
networking.hostId = "3a1f739e"; networking.hostId = "3a1f739e";
networking.hosts = { networking.hosts = {
"10.30.0.1" = ["emby.nyanlout.re" "nyanlout.re"]; "10.30.0.1" = [
"emby.nyanlout.re"
"nyanlout.re"
];
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -95,7 +100,15 @@
users.users.paul = { users.users.paul = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "wireshark" "input" "dialout" "libvirtd" "vboxusers" ]; extraGroups = [
"wheel"
"networkmanager"
"wireshark"
"input"
"dialout"
"libvirtd"
"vboxusers"
];
uid = 1000; uid = 1000;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDstFRwMoTEip5IBSYE4dUj3miO0LsKrnUKQJmp7d5QYo3VhXk43jU6VUU0tVAegkzWLlQ3ohoFns+8bZyf7hj7roftrDfoC9bbbx4ihhWrZTlF0gzoH4t52yetFO5eC/tV2sm/zFoa+3IWLokOEFmAoknAVag1MmVLXTQ6WPoTPD4UsX/D3lyE4dbSKxHpMOIjqIdqSEgO0BeTdnHe5afvGXXO1VYTvPsGDHT9w8EHwQV9JXIPn7KVOp3qin7OwvFFrrB3QbiEVTJvGiH2hrfxcARTN/+TxGtf+aOFeuQykURG9Wz/aBK60EWE0wGrzuIymxtNdOR1NhmnNrUZ976Tb9WdR7FC+yM6+/kdfICy+sGQmmn8TLsGvcJTT/pl4Pa9uRAKjRJuLIEgYY6W/ms9lCRyf484yRkDlq+V0BPuN9Jy6Eb7x+tmZNkpEtkqso7wfXD8sf5BIwv2K69SVMpfTswydHGmDwHZ0zaDKGlyCiyJ1QGqUhCTXqtYVq+kQ3AcjKcysMwVEmwx/ySu0XFuV8oUkl9XK/RUoc++sMEd0EbHcn8uwCmBARNX+GLQ03vxwyMW3HyneP8EAxoqtSepZXbTdVP/0i+l7EUUeA7zsaWfU2a82ktZWpVPFGfxkuo0l3zLF19EsXPKZNqlRfkOWjSgp+qWihAkQIQk3GoduQ== openpgp:0x75EE3375" "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDstFRwMoTEip5IBSYE4dUj3miO0LsKrnUKQJmp7d5QYo3VhXk43jU6VUU0tVAegkzWLlQ3ohoFns+8bZyf7hj7roftrDfoC9bbbx4ihhWrZTlF0gzoH4t52yetFO5eC/tV2sm/zFoa+3IWLokOEFmAoknAVag1MmVLXTQ6WPoTPD4UsX/D3lyE4dbSKxHpMOIjqIdqSEgO0BeTdnHe5afvGXXO1VYTvPsGDHT9w8EHwQV9JXIPn7KVOp3qin7OwvFFrrB3QbiEVTJvGiH2hrfxcARTN/+TxGtf+aOFeuQykURG9Wz/aBK60EWE0wGrzuIymxtNdOR1NhmnNrUZ976Tb9WdR7FC+yM6+/kdfICy+sGQmmn8TLsGvcJTT/pl4Pa9uRAKjRJuLIEgYY6W/ms9lCRyf484yRkDlq+V0BPuN9Jy6Eb7x+tmZNkpEtkqso7wfXD8sf5BIwv2K69SVMpfTswydHGmDwHZ0zaDKGlyCiyJ1QGqUhCTXqtYVq+kQ3AcjKcysMwVEmwx/ySu0XFuV8oUkl9XK/RUoc++sMEd0EbHcn8uwCmBARNX+GLQ03vxwyMW3HyneP8EAxoqtSepZXbTdVP/0i+l7EUUeA7zsaWfU2a82ktZWpVPFGfxkuo0l3zLF19EsXPKZNqlRfkOWjSgp+qWihAkQIQk3GoduQ== openpgp:0x75EE3375"

View file

@ -1,12 +1,28 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
{ {
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" "coretemp" "it87" ]; boot.kernelModules = [
"kvm-amd"
"coretemp"
"it87"
];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
@ -17,28 +33,28 @@
package = config.boot.kernelPackages.nvidiaPackages.latest; package = config.boot.kernelPackages.nvidiaPackages.latest;
}; };
fileSystems."/" = fileSystems."/" = {
{ device = "rpool/root/nixos"; device = "rpool/root/nixos";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/F4EC-57DF"; device = "/dev/disk/by-uuid/F4EC-57DF";
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "fastaf/home"; device = "fastaf/home";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/mnt/steam" = fileSystems."/mnt/steam" = {
{ device = "fastaf/steam"; device = "fastaf/steam";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/mnt/games" = fileSystems."/mnt/games" = {
{ device = "fastaf/games"; device = "fastaf/games";
fsType = "zfs"; fsType = "zfs";
}; };
@ -47,10 +63,13 @@
# fsType = "ext4"; # fsType = "ext4";
# }; # };
fileSystems."/mnt/medias" = fileSystems."/mnt/medias" = {
{ device = "10.30.0.1:/mnt/medias"; device = "10.30.0.1:/mnt/medias";
fsType = "nfs"; fsType = "nfs";
options = ["x-systemd.automount" "noauto"]; options = [
"x-systemd.automount"
"noauto"
];
}; };
swapDevices = [ ]; swapDevices = [ ];

View file

@ -21,8 +21,12 @@
''; '';
packages.myVimPackage = with pkgs.vimPlugins; { packages.myVimPackage = with pkgs.vimPlugins; {
start = [ start = [
vim-startify airline sensible vim-startify
polyglot ale fugitive airline
sensible
polyglot
ale
fugitive
]; ];
opt = [ ]; opt = [ ];
}; };
@ -73,6 +77,8 @@
# Développement # Développement
openssl openssl
treefmt
nixfmt-rfc-style
]; ];
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;
@ -93,7 +99,13 @@
''; '';
ohMyZsh = { ohMyZsh = {
enable = true; enable = true;
plugins = [ "git" "colored-man-pages" "command-not-found" "extract" "nix" ]; plugins = [
"git"
"colored-man-pages"
"command-not-found"
"extract"
"nix"
];
customPkgs = with pkgs; [ customPkgs = with pkgs; [
nix-zsh-completions nix-zsh-completions
]; ];
@ -107,13 +119,14 @@
git.enable = true; git.enable = true;
}; };
environment.variables = let environment.variables =
starshipConfToml = let
pkgs.writeText "starship.toml" '' starshipConfToml = pkgs.writeText "starship.toml" ''
[[battery.display]] [[battery.display]]
threshold = 50 threshold = 50
''; '';
in { in
{
EDITOR = "nvim"; EDITOR = "nvim";
STARSHIP_CONFIG = "${starshipConfToml}"; STARSHIP_CONFIG = "${starshipConfToml}";
}; };

View file

@ -45,7 +45,12 @@
kdePackages.kinfocenter kdePackages.kinfocenter
kile kile
(texlive.combine { (texlive.combine {
inherit (texlive) scheme-small titling collection-langfrench cm-super; inherit (texlive)
scheme-small
titling
collection-langfrench
cm-super
;
}) })
libsForQt5.breeze-gtk libsForQt5.breeze-gtk
@ -75,17 +80,22 @@
systemd.extraConfig = "DefaultLimitNOFILE=1048576"; systemd.extraConfig = "DefaultLimitNOFILE=1048576";
security = { security = {
pam.loginLimits = [{ pam.loginLimits = [
{
domain = "*"; domain = "*";
type = "hard"; type = "hard";
item = "nofile"; item = "nofile";
value = "1048576"; value = "1048576";
}]; }
];
rtkit.enable = true; rtkit.enable = true;
}; };
programs = { programs = {
gnupg.agent = { enable = true; enableSSHSupport = true; }; gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
browserpass.enable = true; browserpass.enable = true;
steam.enable = true; steam.enable = true;
firefox.enable = true; firefox.enable = true;

3
treefmt.toml Normal file
View file

@ -0,0 +1,3 @@
[formatter.nixfmt-rfc-style]
command = "nixfmt"
includes = ["*.nix"]