Skip to content

Commit

Permalink
feat: minor config improvments
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed Aug 26, 2024
1 parent d68e544 commit f87d53b
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 12 deletions.
20 changes: 13 additions & 7 deletions system/core/bootloader.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
pkgs,
lib,
inputs,
...
}: let
inherit (lib) mkDefault;
Expand All @@ -11,18 +10,25 @@ in {
pkgs.sbctl
];
boot = {
binfmt.emulatedSystems = ["aarch64-linux"];
binfmt.emulatedSystems = ["aarch64-linux" "riscv64-linux"];
tmp = {
cleanOnBoot = true;
useTmpfs = false;
useTmpfs = true;
};
# some kernel parameters, i dont remember what half of this shit does but who cares
initrd.verbose = false;
kernelPackages = mkDefault pkgs.linuxPackages_latest;
initrd = {
verbose = false;
systemd.enable = true;
};
kernelPackages = mkDefault pkgs.linuxPackages_xanmod_latest;

bootspec.enable = mkDefault true;
loader = {
systemd-boot.enable = mkDefault true;
systemd-boot = {
enable = mkDefault true;
memtest86.enable = true;
configurationLimit = 10;
editor = false;
};
# spam space to get to boot menu
timeout = 0;
};
Expand Down
3 changes: 1 addition & 2 deletions system/core/network.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ in {
dns = mkIf dnscrypt "none";
wifi = {
macAddress = "random";
backend = "iwd";
powersave = true;
};
};
firewall = {
enable = true;
allowPing = false;
# for chromecast
allowedUDPPorts = [10008];
logReversePathDrops = true;
};
};
Expand Down
12 changes: 12 additions & 0 deletions system/core/nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@
defaultPackages = [];
};

# WE DONT WANT TO BUILD STUFF ON TMPFS
# ITS NOT A GOOD IDEA
systemd.services.nix-daemon = {
environment.TMPDIR = "/var/tmp";
};

# this makes rebuilds little faster
system.switch = {
enable = false;
enableNg = true;
};

nixpkgs = {
config = {
# Wolność kocham i rozumiem
Expand Down
1 change: 0 additions & 1 deletion system/core/schizo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
hibernate = false;
};
};
dbus.packages = [pkgs.seahorse];
networkd-dispatcher.enable = true;
};

Expand Down
1 change: 1 addition & 0 deletions system/core/secrets.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ in {
(forHost ["calypso"] ../../secrets/syncthing-calypso-cert.age "syncthing-calypso-cert" user)
# TODO: rework
(forHost ["calypso"] ../../secrets/radicale-pass.age "radicale-pass" user)
(forHost ["calypso"] ../../secrets/openai.age "openai" user)
(forHost ["prometheus"] ../../secrets/mailserver.age "mailserver" {mode = "400";})
(forHost ["prometheus"] ../../secrets/caldav.age "caldav" {mode = "400";})
(forHost ["prometheus"] ../../secrets/discordtoken.age "discordtoken" {mode = "400";})
Expand Down
6 changes: 5 additions & 1 deletion system/core/system.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
}: {
services = {
dbus = {
packages = with pkgs; [dconf gcr udisks2];
packages = with pkgs; [dconf gcr udisks2 seahorse];
implementation = "broker";
enable = true;
};
udev.packages = with pkgs; [gnome.gnome-settings-daemon android-udev-rules];
# "irqbalance(1) - distribute hardware interrupts across processors on a multiprocessor system"
irqbalance.enable = true;
fstrim.enable = true;
journald.extraConfig = ''
SystemMaxUse=50M
RuntimeMaxUse=10M
Expand Down
1 change: 0 additions & 1 deletion system/wayland/services.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,5 @@

udisks2.enable = true;
printing.enable = true;
fstrim.enable = true;
};
}

0 comments on commit f87d53b

Please sign in to comment.