mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-11 09:16:20 +02:00
Compare commits
4 commits
1c2f5c95e6
...
1a4cbd560e
Author | SHA1 | Date | |
---|---|---|---|
1a4cbd560e | |||
c776c72286 | |||
a8d2ace6ab | |||
a16bc598a4 |
9 changed files with 104 additions and 75 deletions
|
@ -5,6 +5,7 @@
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./modules/backup
|
./modules/backup
|
||||||
|
./modules/logging
|
||||||
./modules/dns
|
./modules/dns
|
||||||
./modules/fail2ban
|
./modules/fail2ban
|
||||||
./modules/mail
|
./modules/mail
|
||||||
|
|
36
hosts/falkenstein/modules/logging/default.nix
Normal file
36
hosts/falkenstein/modules/logging/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.rsyslogd = {
|
||||||
|
enable = true;
|
||||||
|
defaultConfig = ''
|
||||||
|
:programname, isequal, "postfix" /var/log/postfix.log
|
||||||
|
|
||||||
|
auth.* -/var/log/auth.log
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
services.logrotate.configFile = pkgs.writeText "logrotate.conf" ''
|
||||||
|
weekly
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
rotate 4
|
||||||
|
"/var/log/postfix.log" {
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
weekly
|
||||||
|
rotate 156
|
||||||
|
dateext
|
||||||
|
dateformat .%Y-%m-%d
|
||||||
|
extension log
|
||||||
|
}
|
||||||
|
"/var/log/nginx/*.log" {
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
weekly
|
||||||
|
postrotate
|
||||||
|
[ ! -f /var/run/nginx/nginx.pid ] || kill -USR1 `cat /var/run/nginx/nginx.pid`
|
||||||
|
endscript
|
||||||
|
rotate 26
|
||||||
|
su nginx nginx
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
}
|
|
@ -24,13 +24,13 @@
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot = {
|
boot = {
|
||||||
kernelModules = [ "v4l2loopback" ];
|
kernelModules = [ "v4l2loopback" ];
|
||||||
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
extraModulePackages = [
|
# extraModulePackages = [
|
||||||
config.boot.kernelPackages.v4l2loopback
|
# config.boot.kernelPackages.v4l2loopback
|
||||||
];
|
# ];
|
||||||
extraModprobeConfig = ''
|
# extraModprobeConfig = ''
|
||||||
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
|
# options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
|
||||||
'';
|
# '';
|
||||||
tmp.useTmpfs = true;
|
tmp.useTmpfs = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
devmon.enable = true; # automount stuff
|
devmon.enable = true; # automount stuff
|
||||||
upower.enable = true;
|
upower.enable = true;
|
||||||
fwupd.enable = true; # firmware updates
|
fwupd.enable = true; # firmware updates
|
||||||
zfs.autoScrub.enable = true;
|
btrfs.autoScrub.enable = true;
|
||||||
};
|
};
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -35,39 +35,47 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
fileSystems."/nix" =
|
# fileSystems."/" =
|
||||||
{
|
# { device = "/dev/disk/by-uuid/43e42607-bc44-45de-a2c1-a09a4e34daf1";
|
||||||
device = "rpool/nixos/nix";
|
# fsType = "btrfs";
|
||||||
fsType = "zfs";
|
# options = [ "subvol=root" ];
|
||||||
|
# };
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "/dev/disk/by-uuid/43e42607-bc44-45de-a2c1-a09a4e34daf1";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=home" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var/lib" =
|
fileSystems."/nix" =
|
||||||
{
|
{ device = "/dev/disk/by-uuid/43e42607-bc44-45de-a2c1-a09a4e34daf1";
|
||||||
device = "rpool/nixos/var/lib";
|
fsType = "btrfs";
|
||||||
fsType = "zfs";
|
options = [ "subvol=nix" "compress=zstd" "noatime"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var/log" =
|
fileSystems."/var/log" =
|
||||||
{
|
{ device = "/dev/disk/by-uuid/43e42607-bc44-45de-a2c1-a09a4e34daf1";
|
||||||
device = "rpool/nixos/var/log";
|
fsType = "btrfs";
|
||||||
fsType = "zfs";
|
options = [ "subvol=log" "compress=zstd" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/var/lib" =
|
||||||
{
|
{ device = "/dev/disk/by-uuid/43e42607-bc44-45de-a2c1-a09a4e34daf1";
|
||||||
device = "rpool/nixos/home";
|
fsType = "btrfs";
|
||||||
fsType = "zfs";
|
options = [ "subvol=lib" "compress=zstd" ];
|
||||||
};
|
|
||||||
fileSystems."/" =
|
|
||||||
{
|
|
||||||
device = "tmpfs";
|
|
||||||
fsType = "tmpfs";
|
|
||||||
options = [ "mode=755" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{
|
||||||
|
device = "tmpfs";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
options = [ "mode=755" ];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{
|
{
|
||||||
device = "/dev/disk/by-uuid/DF86-7611";
|
device = "/dev/disk/by-uuid/12CE-A600";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
docker.enable = true;
|
docker = {
|
||||||
|
enable = true;
|
||||||
|
extraOptions = "--iptables=false";
|
||||||
|
};
|
||||||
libvirtd = {
|
libvirtd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
qemu = {
|
qemu = {
|
||||||
|
@ -15,7 +18,7 @@
|
||||||
spiceUSBRedirection.enable = true;
|
spiceUSBRedirection.enable = true;
|
||||||
};
|
};
|
||||||
# allow libvirts internal network stuff
|
# allow libvirts internal network stuff
|
||||||
networking.firewall.trustedInterfaces = [ "virbr0" "br0" ];
|
networking.firewall.trustedInterfaces = [ "virbr0" "br0" "docker0" ];
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
virt-viewer
|
virt-viewer
|
||||||
|
|
|
@ -15,6 +15,30 @@ in
|
||||||
# freeimage is broken
|
# freeimage is broken
|
||||||
withBackends = [ "libtiff" "libjpeg" "libpng" "librsvg" "libheif" ];
|
withBackends = [ "libtiff" "libjpeg" "libpng" "librsvg" "libheif" ];
|
||||||
};
|
};
|
||||||
|
# don't compile the bloat
|
||||||
|
rsyslog = prev.rsyslog.override {
|
||||||
|
withMysql = false;
|
||||||
|
withJemalloc = false;
|
||||||
|
withPostgres = false;
|
||||||
|
withUuid = false;
|
||||||
|
withCurl = false;
|
||||||
|
withDbi = false;
|
||||||
|
withNetSnmp = false;
|
||||||
|
withGnutls = false;
|
||||||
|
withGcrypt = false;
|
||||||
|
withLognorm = false;
|
||||||
|
withMaxminddb = false;
|
||||||
|
withOpenssl = false;
|
||||||
|
withRelp = false;
|
||||||
|
withKsi = false;
|
||||||
|
withLogging = false;
|
||||||
|
withHadoop = false;
|
||||||
|
withRdkafka = false;
|
||||||
|
withMongo = false;
|
||||||
|
withCzmq = false;
|
||||||
|
withRabbitmq = false;
|
||||||
|
withHiredis = false;
|
||||||
|
};
|
||||||
|
|
||||||
gnome-break-timer = callPackage ../pkgs/gnome-break-timer { };
|
gnome-break-timer = callPackage ../pkgs/gnome-break-timer { };
|
||||||
jmri = callPackage ../pkgs/jmri { };
|
jmri = callPackage ../pkgs/jmri { };
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
./helix
|
./helix
|
||||||
./wayland
|
./wayland
|
||||||
./mpv
|
./mpv
|
||||||
./qutebrowser
|
|
||||||
./ssh
|
./ssh
|
||||||
./theme
|
./theme
|
||||||
./tex
|
./tex
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
# messaging
|
# messaging
|
||||||
tdesktop
|
tdesktop
|
||||||
gajim
|
|
||||||
gomuks
|
gomuks
|
||||||
profanity
|
profanity
|
||||||
fractal
|
fractal
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.qutebrowser = {
|
|
||||||
enable = true;
|
|
||||||
searchEngines = {
|
|
||||||
DEFAULT = "https://duckduckgo.com/?q={}";
|
|
||||||
aw = "https://wiki.archlinux.org/?search={}";
|
|
||||||
nw = "https://nixos.wiki/index.php?search={}";
|
|
||||||
ns = "https://search.nixos.org/packages?query={}";
|
|
||||||
nso = "https://search.nixos.org/options?query={}";
|
|
||||||
wp = "https://en.wikipedia.org/wiki/Special:Search?search={}";
|
|
||||||
y = "http://localhost:8090/yacysearch.html?query={}";
|
|
||||||
yt = "https://www.youtube.com/results?search_query={}";
|
|
||||||
g = "https://www.google.com/search?hl=en&q={}";
|
|
||||||
};
|
|
||||||
quickmarks = {
|
|
||||||
nix-search = "https://search.nixos.org/options?";
|
|
||||||
home-search = "https://mipmip.github.io/home-manager-option-search/";
|
|
||||||
jexam = "https://jexam.inf.tu-dresden.de";
|
|
||||||
opal = "https://bildungsportal.sachsen.de/opal/home?2";
|
|
||||||
fruitbasket = "https://github.com/fsr/fruitbasket";
|
|
||||||
};
|
|
||||||
keyBindings = {
|
|
||||||
normal = {
|
|
||||||
"<Ctrl-m>" = "hint links spawn mpv {hint-url}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
settings = {
|
|
||||||
colors.webpage = {
|
|
||||||
darkmode.enabled = false;
|
|
||||||
preferred_color_scheme = "dark";
|
|
||||||
};
|
|
||||||
content.blocking = {
|
|
||||||
enabled = true;
|
|
||||||
method = "both";
|
|
||||||
};
|
|
||||||
statusbar.show = "in-mode";
|
|
||||||
tabs.show = "switching";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue