Compare commits

...

3 commits

Author SHA1 Message Date
cca3ba7d09 hosts/default.nix: cleanup 2025-04-20 20:14:09 +02:00
2f33765b57 flake.lock: bump inputs 2025-04-20 20:14:09 +02:00
11cfbf696f networking/module.nix: networking improvements 2025-04-20 20:14:09 +02:00
3 changed files with 25 additions and 6 deletions

6
flake.lock generated
View file

@ -594,11 +594,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1744098102, "lastModified": 1744932701,
"narHash": "sha256-tzCdyIJj9AjysC3OuKA+tMD/kDEDAF9mICPDU7ix0JA=", "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c8cd81426f45942bb2906d5ed2fe21d2f19d95b7", "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -27,17 +27,17 @@ inputs: let
modules = concatLists [ modules = concatLists [
# This is used to pre-emptively set the hostPlatform for nixpkgs. # This is used to pre-emptively set the hostPlatform for nixpkgs.
# Also, we set the system hostname here. # Also, we set the system hostname here.
[
# self.nixosModules.user
]
(singleton { (singleton {
networking.hostName = hostname; networking.hostName = hostname;
nixpkgs.hostPlatform = system; nixpkgs.hostPlatform = system;
}) })
(flatten ( (flatten (
concatLists [ concatLists [
# configuration for the host, passed as an argument.
(singleton ./${hostname}/default.nix) (singleton ./${hostname}/default.nix)
# common configuration, which all hosts share.
(singleton ./common.nix) (singleton ./common.nix)
# Import all files called module.nix from my modules directory.
( (
filter (hasSuffix "module.nix") ( filter (hasSuffix "module.nix") (
map toString (listFilesRecursive ../modules) map toString (listFilesRecursive ../modules)

View file

@ -6,6 +6,17 @@ in {
]; ];
networking = { networking = {
enableIPv6 = true; enableIPv6 = true;
# INFO: This disables wpa_supplicant,
# I use nenetworkmanager instead.
wireless.enable = false;
dhcpcd = {
# faster boot times
wait = "background";
extraConfig = "noarp";
};
nameservers = [ nameservers = [
# quad9 DNS # quad9 DNS
"9.9.9.9" "9.9.9.9"
@ -14,8 +25,16 @@ in {
}; };
services.resolved = { services.resolved = {
enable = true; enable = true;
dnssec = "false";
# quad9 dns # quad9 dns
fallbackDns = ["9.9.9.9" "2620::fe::fe"]; fallbackDns = ["9.9.9.9" "2620::fe::fe"];
}; };
users.users.${username}.extraGroups = ["networkmanager"]; users.users.${username}.extraGroups = ["networkmanager"];
systemd = {
network = {
enable = true;
wait-online.anyInterface = true;
};
};
} }