From 93ad85f8dd9b482639a0d3ae5eb7eb50924613a8 Mon Sep 17 00:00:00 2001 From: kenny Date: Wed, 30 Jul 2025 17:20:45 +0300 Subject: [PATCH] Added extra hosts defs for smooth name res --- flake.lock | 6 ++-- hosts/puter/hardware-configuration.nix | 41 +++++++++++++------------- modules/common/networking.nix | 10 +++++-- 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/flake.lock b/flake.lock index 9f53bb3..8a9da88 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1753549186, - "narHash": "sha256-Znl7rzuxKg/Mdm6AhimcKynM7V3YeNDIcLjBuoBcmNs=", + "lastModified": 1753694789, + "narHash": "sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "17f6bd177404d6d43017595c5264756764444ab8", + "rev": "dc9637876d0dcc8c9e5e22986b857632effeb727", "type": "github" }, "original": { diff --git a/hosts/puter/hardware-configuration.nix b/hosts/puter/hardware-configuration.nix index dd76775..8306ddf 100644 --- a/hosts/puter/hardware-configuration.nix +++ b/hosts/puter/hardware-configuration.nix @@ -1,31 +1,34 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" "wl" ]; - boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel" "wl"]; + boot.extraModulePackages = [config.boot.kernelPackages.broadcom_sta]; fileSystems."/" = { device = "/dev/disk/by-uuid/19a0aa4c-8d49-4545-9ed6-cd4a952f9353"; fsType = "ext4"; }; - boot.initrd.luks.devices."luks-08992355-1404-44dc-9bb4-fd32f1d0b62d".device = - "/dev/disk/by-uuid/08992355-1404-44dc-9bb4-fd32f1d0b62d"; + boot.initrd.luks.devices."luks-08992355-1404-44dc-9bb4-fd32f1d0b62d".device = "/dev/disk/by-uuid/08992355-1404-44dc-9bb4-fd32f1d0b62d"; fileSystems."/boot" = { device = "/dev/disk/by-uuid/F54E-7011"; fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; + options = ["fmask=0022" "dmask=0022"]; }; - swapDevices = - [{ device = "/dev/disk/by-uuid/c9b7b195-d072-4574-8e39-a5e4f90ca84d"; }]; + swapDevices = [{device = "/dev/disk/by-uuid/c9b7b195-d072-4574-8e39-a5e4f90ca84d";}]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -40,12 +43,11 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - boot.initrd.luks.devices."luks-d27fc6c5-7edd-4c18-ab70-3ca02a28abcc".device = - "/dev/disk/by-uuid/d27fc6c5-7edd-4c18-ab70-3ca02a28abcc"; + boot.initrd.luks.devices."luks-d27fc6c5-7edd-4c18-ab70-3ca02a28abcc".device = "/dev/disk/by-uuid/d27fc6c5-7edd-4c18-ab70-3ca02a28abcc"; nixpkgs.config.packageOverrides = pkgs: { intel-vaapi-driver = - pkgs.intel-vaapi-driver.override { enableHybridCodec = true; }; + pkgs.intel-vaapi-driver.override {enableHybridCodec = true;}; }; hardware.opengl = { @@ -57,7 +59,7 @@ ]; }; - environment.sessionVariables = { LIBVA_DRIVER_NAME = "i965"; }; + environment.sessionVariables = {LIBVA_DRIVER_NAME = "i965";}; hardware.facetimehd = { enable = true; @@ -74,10 +76,9 @@ ''; # This goes in the extraConfig section IdleAction=ignore }; - environment.systemPackages = with pkgs; [ mbpfan thermald ]; + environment.systemPackages = with pkgs; [mbpfan thermald]; - boot.blacklistedKernelModules = [ "b43" "ssb" "brcmfmac" "brcmsmac" "bcma" ]; + boot.blacklistedKernelModules = ["b43" "ssb" "brcmfmac" "brcmsmac" "bcma"]; - nixpkgs.config.permittedInsecurePackages = - [ "broadcom-sta-6.30.223.271-57-6.12.40" "python-2.7.18.8" ]; + nixpkgs.config.permittedInsecurePackages = ["broadcom-sta-6.30.223.271-57-6.12.40" "python-2.7.18.8"]; } diff --git a/modules/common/networking.nix b/modules/common/networking.nix index f8b8c64..bf2e365 100644 --- a/modules/common/networking.nix +++ b/modules/common/networking.nix @@ -19,9 +19,7 @@ LC_TIME = "ro_RO.UTF-8"; }; - environment.systemPackages = with pkgs; [ - torsocks - ]; + environment.systemPackages = with pkgs; [torsocks]; # 9050,9063,8118(HTTP) services.tor = { @@ -30,4 +28,10 @@ openFirewall = true; settings = {ControlPort = 9051;}; }; + + networking.extraHosts = '' + 192.168.0.131 bigbox.local + 192.168.0.101 box.local + 192.168.0.100 puter.local + ''; }