pogrupowanie konfiguracji oraz dodanie serwerów dns i DNS-over-TLS

This commit is contained in:
installer
2024-11-01 00:47:21 +01:00
parent 3224ea75aa
commit 8730e8637b
2 changed files with 113 additions and 77 deletions

View File

@@ -31,8 +31,10 @@ in {
"vm.max_map_count" = 2147483642; "vm.max_map_count" = 2147483642;
}; };
# Bootloader. # Bootloader.
loader.systemd-boot.enable = true; loader = {
loader.efi.canTouchEfiVariables = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
# Make /tmp a tmpfs # Make /tmp a tmpfs
tmp = { tmp = {
useTmpfs = false; useTmpfs = false;
@@ -74,9 +76,11 @@ in {
# }; # };
polarity = "dark"; polarity = "dark";
opacity.terminal = 0.8; opacity.terminal = 0.8;
cursor.package = pkgs.bibata-cursors; cursor = {
cursor.name = "Bibata-Modern-Ice"; package = pkgs.bibata-cursors;
cursor.size = 24; name = "Bibata-Modern-Ice";
size = 24;
};
fonts = { fonts = {
monospace = { monospace = {
package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
@@ -100,21 +104,39 @@ in {
}; };
# Extra Module Options # Extra Module Options
drivers.amdgpu.enable = true; drivers = {
drivers.nvidia.enable = false; amdgpu.enable = true;
drivers.nvidia-prime = { nvidia.enable = false;
enable = false; nvidia-prime = {
intelBusID = ""; enable = false;
nvidiaBusID = ""; intelBusID = "";
nvidiaBusID = "";
};
intel.enable = false;
}; };
drivers.intel.enable = false;
vm.guest-services.enable = false; vm.guest-services.enable = false;
local.hardware-clock.enable = false; local.hardware-clock.enable = false;
services.resolved = {
enable = true;
dnssec = "true";
domains = ["~."]; # "use as default interface for all requests"
# (see man resolved.conf)
# let Avahi handle mDNS publication
extraConfig = ''
DNSOverTLS=opportunistic
MulticastDNS=resolve
'';
llmnr = "true";
};
# Enable networking # Enable networking
networking.networkmanager.enable = true; networking = {
networking.hostName = host; nameservers = ["176.9.1.117" "213.196.191.96" "2a01:4f8:151:34aa::198"];
networking.timeServers = options.networking.timeServers.default ++ ["pool.ntp.org"]; networkmanager.enable = true;
hostName = host;
timeServers = options.networking.timeServers.default ++ ["pool.ntp.org"];
};
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Warsaw"; time.timeZone = "Europe/Warsaw";
@@ -408,38 +430,49 @@ in {
disabledDefaultBackends = ["escl"]; disabledDefaultBackends = ["escl"];
}; };
# Extra Logitech Support hardware = {
hardware.logitech.wireless.enable = false; logitech = {
hardware.logitech.wireless.enableGraphical = false; wireless = {
enable = false;
# Bluetooth Support enableGraphical = false;
hardware.bluetooth.enable = true; };
hardware.bluetooth.powerOnBoot = true; };
bluetooth = {
enable = true;
powerOnBoot = true;
};
pulseaudio = {
enable = false;
};
graphics = {
enable = true;
enable32Bit = true;
};
};
services.blueman.enable = true; services.blueman.enable = true;
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
# Security / Polkit # Security / Polkit
security = { security = {
rtkit.enable = true; rtkit.enable = true;
polkit.enable = true; polkit = {
polkit.extraConfig = '' enable = true;
polkit.addRule(function(action, subject) { extraConfig = ''
if ( polkit.addRule(function(action, subject) {
subject.isInGroup("users") if (
&& ( subject.isInGroup("users")
action.id == "org.freedesktop.login1.reboot" || && (
action.id == "org.freedesktop.login1.reboot-multiple-sessions" || action.id == "org.freedesktop.login1.reboot" ||
action.id == "org.freedesktop.login1.power-off" || action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
action.id == "org.freedesktop.login1.power-off-multiple-sessions" action.id == "org.freedesktop.login1.power-off" ||
action.id == "org.freedesktop.login1.power-off-multiple-sessions"
)
) )
) {
{ return polkit.Result.YES;
return polkit.Result.YES; }
} })
}) '';
''; };
pam.services.swaylock = { pam.services.swaylock = {
text = '' text = ''
auth include login auth include login
@@ -469,22 +502,17 @@ in {
dates = "weekly"; dates = "weekly";
options = "--delete-older-than 7d"; options = "--delete-older-than 7d";
}; };
nixPath = ["nixpkgs=${inputs.nixpkgs}"]; nixPath = ["nixpkgs=${inputs.nixpkgs}"];
}; };
# Virtualization / Containers # Virtualization / Containers
virtualisation.libvirtd.enable = true; virtualisation = {
virtualisation.podman = { libvirtd.enable = true;
enable = true; podman = {
dockerCompat = true; enable = true;
defaultNetwork.settings.dns_enabled = true; dockerCompat = true;
}; defaultNetwork.settings.dns_enabled = true;
};
# OpenGL
hardware.graphics = {
enable = true;
enable32Bit = true;
}; };
console.keyMap = "${keyboardLayout}"; console.keyMap = "${keyboardLayout}";

View File

@@ -27,28 +27,26 @@ in {
]; ];
# Place Files Inside Home Directory # Place Files Inside Home Directory
home.file."Pictures/Wallpapers" = { home.file = {
source = ../../config/wallpapers; "Pictures/Wallpapers".source = ../../config/wallpapers;
recursive = true; "Pictures/Wallpapers".recursive = true;
".config/wlogout/icons".source = ../../config/wlogout;
".config/wlogout/icons".recursive = true;
".face.icon".source = ../../config/face.jpg;
".config/face.jpg".source = ../../config/face.jpg;
".config/swappy/config".text = ''
[Default]
save_dir=/home/${username}/Pictures/Screenshots
save_filename_format=swappy-%Y%m%d-%H%M%S.png
show_panel=false
line_size=5
text_size=20
text_font=Ubuntu
paint_mode=brush
early_exit=true
fill_shape=false
'';
}; };
home.file.".config/wlogout/icons" = {
source = ../../config/wlogout;
recursive = true;
};
home.file.".face.icon".source = ../../config/face.jpg;
home.file.".config/face.jpg".source = ../../config/face.jpg;
home.file.".config/swappy/config".text = ''
[Default]
save_dir=/home/${username}/Pictures/Screenshots
save_filename_format=swappy-%Y%m%d-%H%M%S.png
show_panel=false
line_size=5
text_size=20
text_font=Ubuntu
paint_mode=brush
early_exit=true
fill_shape=false
'';
# Install & Configure Git # Install & Configure Git
programs.git = { programs.git = {
@@ -73,9 +71,19 @@ in {
}; };
# Styling Options # Styling Options
stylix.targets.waybar.enable = false; stylix = {
stylix.targets.rofi.enable = false; targets = {
stylix.targets.hyprland.enable = false; waybar = {
enable = false;
};
rofi = {
enable = false;
};
hyprland = {
enable = false;
};
};
};
gtk = { gtk = {
iconTheme = { iconTheme = {
name = "Papirus-Dark"; name = "Papirus-Dark";