From ef4551ff79bea3fb64333058d5d82894b68ff2b7 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Wed, 8 Jan 2025 10:43:21 +0100 Subject: [PATCH] move nvidia to specialisation, add dns entries, maybe fix hypridle --- flake.nix | 10 --- home-manager/hyprland/hyprland-settings.nix | 2 +- home-manager/hyprland/hyprlock.nix | 1 + home-manager/hyprland/waybar.nix | 2 +- modules/services/adguard.nix | 18 ++++- systems/laptop/configuration.nix | 78 +++++++++++++-------- 6 files changed, 68 insertions(+), 43 deletions(-) diff --git a/flake.nix b/flake.nix index 6994f40..74fd39b 100644 --- a/flake.nix +++ b/flake.nix @@ -161,16 +161,6 @@ ./users/kopatz ./systems/laptop/configuration.nix ./modules/collections/laptop.nix - ./modules/ecryptfs.nix - #./modules/fh/scanning.nix - ./modules/support/ntfs.nix - ./modules/thunderbolt.nix - #./modules/vmware-host.nix - #./modules/fh/forensik.nix - #./modules/no-sleep-lid-closed.nix - #./modules/static-ip.nix - #./modules/wake-on-lan.nix - nixos-hardware.nixosModules.dell-xps-15-7590-nvidia ]; }; "mini-pc" = mkStableServer { diff --git a/home-manager/hyprland/hyprland-settings.nix b/home-manager/hyprland/hyprland-settings.nix index 63cae0c..37a0b66 100644 --- a/home-manager/hyprland/hyprland-settings.nix +++ b/home-manager/hyprland/hyprland-settings.nix @@ -286,7 +286,7 @@ in { "${pkgs.networkmanagerapplet}/bin/nm-applet --indicator &" "${pkgs.hyprshade}/bin/hyprshade auto" "dex --autostart --environment Hyprland" - "hypridle &" + "${pkgs.hypridle}/bin/hypridle &" "sleep 3 && ${pkgs.waybar}/bin/waybar &" #"${pkgs.dunst}/bin/dunst &" ] ++ lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [ diff --git a/home-manager/hyprland/hyprlock.nix b/home-manager/hyprland/hyprlock.nix index 2f890f4..63bee38 100644 --- a/home-manager/hyprland/hyprlock.nix +++ b/home-manager/hyprland/hyprlock.nix @@ -59,6 +59,7 @@ in { # don't autostart systemd.user.services.hypridle.Service.ExecStart = lib.mkForce "true"; + systemd.user.services.hypridle.Service.Restart = lib.mkForce "no"; services.hypridle.enable = true; services.hypridle.settings = { general = { diff --git a/home-manager/hyprland/waybar.nix b/home-manager/hyprland/waybar.nix index bf8753b..ef111c7 100644 --- a/home-manager/hyprland/waybar.nix +++ b/home-manager/hyprland/waybar.nix @@ -34,7 +34,7 @@ in { modules-right = [ "group/stats" "group/other" ]; "group/stats" = { "orientation" = "horizontal"; - "modules" = [ "network" "cpu" "memory" "disk" "temperature" "custom/nvidia" ]; + "modules" = [ "network" "cpu" "memory" "disk" "temperature" ] ++ lib.optionals (osConfig.networking.hostName != "nix-laptop") [ "custom/nvidia" ] ; }; "group/other" = { "orientation" = "horizontal"; diff --git a/modules/services/adguard.nix b/modules/services/adguard.nix index a4dfe03..f8a65db 100644 --- a/modules/services/adguard.nix +++ b/modules/services/adguard.nix @@ -147,10 +147,26 @@ in { "domain" = "turnserver.home.arpa"; "answer" = wireguardIp; } + { + "domain" = "powerline.home.arpa"; + "answer" = "192.168.0.2"; + } + { + "domain" = "3neo.home.arpa"; + "answer" = "192.168.0.4"; + } + { + "domain" = "alcatel.home.arpa"; + "answer" = "192.168.0.5"; + } + { + "domain" = "extender.home.arpa"; + "answer" = "192.168.0.8"; + } { "domain" = "inverter.home.arpa"; "answer" = "192.168.0.9"; - } + } ]; }; }; diff --git a/systems/laptop/configuration.nix b/systems/laptop/configuration.nix index 99b0c09..843b4aa 100644 --- a/systems/laptop/configuration.nix +++ b/systems/laptop/configuration.nix @@ -1,23 +1,41 @@ -{ config, pkgs, inputs, ... }: -{ - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ./modules/battery.nix - #./modules/wireguard.nix - ## -- set in flake.nix - # - # - ]; +{ config, pkgs, inputs, ... }: { + imports = [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ./modules/battery.nix + ../../modules/ecryptfs.nix + #../../modules/fh/scanning.nix + ../../modules/support/ntfs.nix + ../../modules/thunderbolt.nix + #../../modules/vmware-host.nix + #../../modules/fh/forensik.nix + #../../modules/no-sleep-lid-closed.nix + #../../modules/static-ip.nix + #../../modules/wake-on-lan.nix + #./modules/wireguard.nix + ## -- set in flake.nix + # + # + inputs.nixos-hardware.nixosModules.dell-xps-15-7590 + ]; - hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production; + specialisation.nvidia = { + configuration = { + + imports = [ inputs.nixos-hardware.nixosModules.dell-xps-15-7590-nvidia ]; + hardware.nvidia.package = + config.boot.kernelPackages.nvidiaPackages.production; + hardware.nvidia.open = false; + }; + }; services.blueman.enable = true; hardware.bluetooth.enable = true; # enables support for Bluetooth - hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot + hardware.bluetooth.powerOnBoot = + true; # powers up the default Bluetooth controller on boot - age.identityPaths = [ "/home/kopatz/.ssh/id_ed25519" "/etc/ssh/ssh_host_ed25519_key" ]; + age.identityPaths = + [ "/home/kopatz/.ssh/id_ed25519" "/etc/ssh/ssh_host_ed25519_key" ]; mainUser.layout = "at"; mainUser.variant = ""; # Bootloader. @@ -31,10 +49,10 @@ networking.networkmanager.enable = true; boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; - networking.extraHosts = - '' - 82.218.12.28 kopatz.ddns.net - ''; + #networking.extraHosts = + #'' + # 82.218.12.28 kopatz.ddns.net + #''; # Set your time zone. time.timeZone = "Europe/Vienna"; @@ -68,18 +86,18 @@ # "d /docker-data 0755 kopatz users" #]; - security.pki.certificates = [ '' ------BEGIN CERTIFICATE----- -MIIBjTCCATKgAwIBAgIRAMVH2+JHZ3wm2fLUlKjTYDswCgYIKoZIzj0EAwIwJDEM -MAoGA1UEChMDS29wMRQwEgYDVQQDEwtLb3AgUm9vdCBDQTAeFw0yMzEyMDgxNDUx -MTZaFw0zMzEyMDUxNDUxMTZaMCQxDDAKBgNVBAoTA0tvcDEUMBIGA1UEAxMLS29w -IFJvb3QgQ0EwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATdZBOkNynShXipzhuX -f6dUByD3chNupNWsagYC5AlPRJT9fAeHEIK/bxWkFwRtLBDopWvBu9lHahBgpHc7 -y7rTo0UwQzAOBgNVHQ8BAf8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBATAdBgNV -HQ4EFgQU9AVtwipW5HDBLfZRH1KZCnIKCfowCgYIKoZIzj0EAwIDSQAwRgIhAMHj -AipNdhQKIYPvMt/h1uW4xP3NTkitnmshM09+rIasAiEAlSalGddXDkqJBHhPD+Fr -gpuVkfVkA8gQCXNs5F9TnxA= ------END CERTIFICATE----- + security.pki.certificates = ['' + -----BEGIN CERTIFICATE----- + MIIBjTCCATKgAwIBAgIRAMVH2+JHZ3wm2fLUlKjTYDswCgYIKoZIzj0EAwIwJDEM + MAoGA1UEChMDS29wMRQwEgYDVQQDEwtLb3AgUm9vdCBDQTAeFw0yMzEyMDgxNDUx + MTZaFw0zMzEyMDUxNDUxMTZaMCQxDDAKBgNVBAoTA0tvcDEUMBIGA1UEAxMLS29w + IFJvb3QgQ0EwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATdZBOkNynShXipzhuX + f6dUByD3chNupNWsagYC5AlPRJT9fAeHEIK/bxWkFwRtLBDopWvBu9lHahBgpHc7 + y7rTo0UwQzAOBgNVHQ8BAf8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBATAdBgNV + HQ4EFgQU9AVtwipW5HDBLfZRH1KZCnIKCfowCgYIKoZIzj0EAwIDSQAwRgIhAMHj + AipNdhQKIYPvMt/h1uW4xP3NTkitnmshM09+rIasAiEAlSalGddXDkqJBHhPD+Fr + gpuVkfVkA8gQCXNs5F9TnxA= + -----END CERTIFICATE----- '']; system.stateVersion = "23.05"; # Did you read the comment?