From 18518fb9a5272030d9a21599b98635eb7a6caf95 Mon Sep 17 00:00:00 2001 From: tomoron Date: Mon, 18 Nov 2024 15:25:27 +0100 Subject: [PATCH 1/4] add ycontre glow plymouth theme (theme images not pushed to repo), add gpu passthrough capabilities --- configuration.nix | 5 +++- flake.lock | 61 ++++++++++++++++++++++++++++++--------- flake.nix | 8 +++-- homes/laptop/hyprland.nix | 9 ++++-- hosts/laptop.nix | 24 +++++++++++++-- hosts/modules/game.nix | 4 +++ modules/waybar.nix | 9 +++--- 7 files changed, 94 insertions(+), 26 deletions(-) diff --git a/configuration.nix b/configuration.nix index b521039..667522f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -30,7 +30,7 @@ users.users.tom = { isNormalUser = true; - extraGroups = [ "wheel" "docker"]; + extraGroups = [ "wheel" "docker" "libvirtd"]; initialPassword = "password"; }; @@ -51,6 +51,9 @@ ninja gdb valgrind + wget + cmake + usbutils ]; #Open ports in the firewall. diff --git a/flake.lock b/flake.lock index 0ed99c5..a323ae8 100644 --- a/flake.lock +++ b/flake.lock @@ -9,11 +9,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1729915395, - "narHash": "sha256-fD9q0wKTRyem5EYO7pt2FfgDUK/0bkR8Mitq2KaZxA0=", + "lastModified": 1730865784, + "narHash": "sha256-6kJYNjVCyf1tYgpqm7QOYcMkkD/RsaSfrsC2+ojmFAI=", "owner": "rycee", "repo": "nur-expressions", - "rev": "f4a24161dbb580dc91bc59dc54b2d81308a71610", + "rev": "b8d22442e09a02eb8b830d41726ac371be21b7cd", "type": "gitlab" }, "original": { @@ -45,11 +45,11 @@ ] }, "locked": { - "lastModified": 1729894599, - "narHash": "sha256-nL9nzNE5/re/P+zOv7NX6bRm5e+DeS1HIufQUJ01w20=", + "lastModified": 1730837930, + "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=", "owner": "nix-community", "repo": "home-manager", - "rev": "93435d27d250fa986bfec6b2ff263161ff8288cb", + "rev": "2f607e07f3ac7e53541120536708e824acccfaa8", "type": "github" }, "original": { @@ -60,11 +60,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1729742320, - "narHash": "sha256-u3Of8xRkN//me8PU+RucKA59/6RNy4B2jcGAF36P4jI=", + "lastModified": 1730886862, + "narHash": "sha256-wCZtRGM1NGxq6VG4+TMzfsa4cuG2VJVtowtYuWW5W3g=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "e8a2f6d5513fe7b7d15701b2d05404ffdc3b6dda", + "rev": "90642a0deae927fa911d49d4f7c5616257105141", "type": "github" }, "original": { @@ -76,11 +76,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1729665710, - "narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=", + "lastModified": 1730785428, + "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d", + "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", "type": "github" }, "original": { @@ -90,12 +90,47 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1731676054, + "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "plymouth-theme-ycontre-glow": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1731939263, + "narHash": "sha256-mLwLR5dEJTvtqJU/lvo9f8c3/xIFPOpXlPF3JsJtnHo=", + "ref": "refs/heads/master", + "rev": "702e7b014ef6cf748252e797724e4096bafcaafa", + "revCount": 1, + "type": "git", + "url": "file:///home/tom/Desktop/bordel/ycontre-glow" + }, + "original": { + "type": "git", + "url": "file:///home/tom/Desktop/bordel/ycontre-glow" + } + }, "root": { "inputs": { "firefox-addons": "firefox-addons", "home-manager": "home-manager", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "plymouth-theme-ycontre-glow": "plymouth-theme-ycontre-glow" } } }, diff --git a/flake.nix b/flake.nix index 3a5c5c8..f40b890 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2024/10/17 18:15:24 by tomoron #+# #+# # -# Updated: 2024/10/31 20:22:15 by tomoron ### ########.fr # +# Updated: 2024/11/18 15:13:57 by tomoron ### ########.fr # # # # **************************************************************************** # @@ -25,9 +25,13 @@ url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; }; + + plymouth-theme-ycontre-glow = { + url = "git+file:///home/tom/Desktop/bordel/ycontre-glow"; + }; }; - outputs = { self, nixpkgs, home-manager, nixos-hardware, ... }@inputs: + outputs = { self, nixpkgs, home-manager, nixos-hardware, plymouth-theme-ycontre-glow, ... }@inputs: let pkgs = import nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; }; username="tom"; diff --git a/homes/laptop/hyprland.nix b/homes/laptop/hyprland.nix index 64a33bc..f577e14 100644 --- a/homes/laptop/hyprland.nix +++ b/homes/laptop/hyprland.nix @@ -1,8 +1,11 @@ { config, lib, pkgs, ... }: { - wayland.windowManager.hyprland.settings.monitor = [ - "eDP-1, 1920x1080@120, 0x0, 1" + wayland.windowManager.hyprland.settings = { + monitor= [ + "eDP-1, 1920x1080@120, 0x0, 1" "HDMI-A-1, 1920x1080@60, auto, auto" - ]; + ]; + env = [ "AQ_DRM_DEVICES,/dev/dri/card1"]; + }; } diff --git a/hosts/laptop.nix b/hosts/laptop.nix index 0fca6e1..e871dfb 100644 --- a/hosts/laptop.nix +++ b/hosts/laptop.nix @@ -6,16 +6,26 @@ modules/nvidia.nix modules/vboxHost.nix ]; + + boot.kernelParams = [ "amd_iommu=on" "iommu=pt" "kvm_amd.npt=1" "kvm_amd.avic=1"]; + boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; +# boot.extraModulePackages = with config.boot.kernelPackages; [ kvmfr ]; + boot.kernelModules = [ "vfio" "vfio-pci"]; + + systemd.tmpfiles.rules = [ + "f /dev/shm/looking-glass 0660 tom libvirtd -" + ]; + virtualisation.libvirtd.qemu.vhostUserPackages = with pkgs; [ virtiofsd ]; + networking.hostName = "patate-douce"; networking.wireless.enable = true; networking.networkmanager.enable = false; - networking.firewall.allowedTCPPorts = [ 11470 12470 80 443 5000 ]; - networking.firewall.allowedUDPPorts = [ 11470 12470 80 443 5000 ]; - environment.systemPackages = with pkgs; [ acpi tlp + looking-glass-client + fprintd ]; hardware.nvidia.prime.offload = { @@ -28,4 +38,12 @@ services.libinput.touchpad.tapping = false; hardware.bluetooth.enable = true; + + boot.plymouth = { + enable = true; + theme = "ycontre-glow"; + themePackages = [ + inputs.plymouth-theme-ycontre-glow.defaultPackage.x86_64-linux + ]; + }; } diff --git a/hosts/modules/game.nix b/hosts/modules/game.nix index 94c8692..0f06699 100644 --- a/hosts/modules/game.nix +++ b/hosts/modules/game.nix @@ -3,4 +3,8 @@ { programs.steam.enable=true; programs.steam.protontricks.enable=true; + + environment.systemPackages = with pkgs; [ qemu quickemu]; + programs.virt-manager.enable = true; + virtualisation.libvirtd.enable = true; } diff --git a/modules/waybar.nix b/modules/waybar.nix index b57f8a4..8484726 100644 --- a/modules/waybar.nix +++ b/modules/waybar.nix @@ -60,7 +60,7 @@ margin-right = 5; modules-left = ["hyprland/workspaces" "custom/music"]; modules-center = ["hyprland/window"]; - modules-right = ["custom/fans" "custom/dgpu" "disk" "pulseaudio" "network" "cpu" "temperature" "custom/pipe" "memory" "battery" "clock"]; + modules-right = ["custom/fans" "custom/dgpu" "disk" "pulseaudio" "network" "custom/pipe" "cpu" "temperature" "custom/pipe" "memory" "battery" "clock"]; "hyprland/workspaces" = { disable-scroll = true; @@ -98,9 +98,9 @@ }; network = { - format-wifi = " {icon} {essid} |"; - format-ethernet = "  {ifname}: {ipaddr}/{cidr} |"; - format-disconnected = " ⚠ Disconnected |"; + format-wifi = " {icon} {essid} "; + format-ethernet = "  {ifname}: {ipaddr}/{cidr} "; + format-disconnected = " ⚠ Disconnected "; format-icons =["󰤟 " "󰤢 " "󰤥 " "󰤨 "]; }; @@ -131,6 +131,7 @@ disk = { format =" 󰋊 {percentage_used}% |"; }; + "custom/pipe" = { format = "|"; }; From e0dfe3ae802532a427357477c755515caf123842 Mon Sep 17 00:00:00 2001 From: tomoron Date: Mon, 18 Nov 2024 15:34:42 +0100 Subject: [PATCH 2/4] update packages --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index a323ae8..ad3b292 100644 --- a/flake.lock +++ b/flake.lock @@ -9,11 +9,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1730865784, - "narHash": "sha256-6kJYNjVCyf1tYgpqm7QOYcMkkD/RsaSfrsC2+ojmFAI=", + "lastModified": 1731902594, + "narHash": "sha256-uSkuDGR4nPtA2ObotrF2G2fmHDEHVG7bKVb0ZLr4Cew=", "owner": "rycee", "repo": "nur-expressions", - "rev": "b8d22442e09a02eb8b830d41726ac371be21b7cd", + "rev": "41a1d21207361f9369670da9d01c88fcdbfb25c3", "type": "gitlab" }, "original": { @@ -45,11 +45,11 @@ ] }, "locked": { - "lastModified": 1730837930, - "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=", + "lastModified": 1731887066, + "narHash": "sha256-uw7K/RsYioJicV79Nl39yjtfhdfTDU2aRxnBgvFhkZ8=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f607e07f3ac7e53541120536708e824acccfaa8", + "rev": "f3a2ff69586f3a54b461526e5702b1a2f81e740a", "type": "github" }, "original": { @@ -60,11 +60,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1730886862, - "narHash": "sha256-wCZtRGM1NGxq6VG4+TMzfsa4cuG2VJVtowtYuWW5W3g=", + "lastModified": 1731797098, + "narHash": "sha256-UhWmEZhwJZmVZ1jfHZFzCg+ZLO9Tb/v3Y6LC0UNyeTo=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "90642a0deae927fa911d49d4f7c5616257105141", + "rev": "672ac2ac86f7dff2f6f3406405bddecf960e0db6", "type": "github" }, "original": { @@ -76,11 +76,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1730785428, - "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", + "lastModified": 1731676054, + "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", + "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", "type": "github" }, "original": { From 10ddb3abdc13d613bbf72a6b8cb71f3031feb6b0 Mon Sep 17 00:00:00 2001 From: tomoron Date: Mon, 18 Nov 2024 23:32:05 +0100 Subject: [PATCH 3/4] fix hyprland config to work with latest update --- modules/hyprland.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/hyprland.nix b/modules/hyprland.nix index 0ec282b..10fc04d 100644 --- a/modules/hyprland.nix +++ b/modules/hyprland.nix @@ -122,10 +122,12 @@ decoration = { rounding = 10; - drop_shadow = true; - shadow_range = 4; - shadow_render_power = 3; - "col.shadow" = "rgba(1a1a1aee)"; + shadow = { + enabled = true; + range = 4; + render_power = 3; + color = "rgba(1a1a1aee)"; + }; blur = { enabled = true; From 9bbcd7308b080399e19aae2013a9011f2bd20ca8 Mon Sep 17 00:00:00 2001 From: tomoron Date: Tue, 19 Nov 2024 18:25:54 +0100 Subject: [PATCH 4/4] add screenshots --- home.nix | 5 ++++- modules/hyprland.nix | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/home.nix b/home.nix index fa978be..5e66b3f 100644 --- a/home.nix +++ b/home.nix @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2024/10/17 18:15:38 by tomoron #+# #+# # -# Updated: 2024/11/04 17:43:28 by tomoron ### ########.fr # +# Updated: 2024/11/19 18:22:41 by tomoron ### ########.fr # # # # **************************************************************************** # @@ -50,6 +50,9 @@ hyprlock python3 vlc + + grim + slurp ]; home.file = { diff --git a/modules/hyprland.nix b/modules/hyprland.nix index 10fc04d..87f9cc2 100644 --- a/modules/hyprland.nix +++ b/modules/hyprland.nix @@ -6,6 +6,7 @@ wayland.windowManager.hyprland.settings = { "$mainMod" = "SUPER"; bind = [ + " , Print, exec, grim -t jpeg -g \"$(slurp)\" ~/screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg" "$mainMod, Return, exec, alacritty" "CTRL_ALT, Q, killactive," "SUPER_ALT, Q, exit,"