From 85370176dff4fb95a64b509fd7e71370a380a5e8 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Tue, 27 Feb 2024 18:17:36 +0100 Subject: [PATCH 1/6] add avahi --- common.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common.nix b/common.nix index d109206..29b73ee 100644 --- a/common.nix +++ b/common.nix @@ -148,6 +148,10 @@ with builtins; { # keyboard.uhk.enable = true; }; + services.avahi = { + enable = true; + }; + security.rtkit.enable = true; users.users.jade = { From c49ee9aec0e00a97db6f48ff8b1d012aa64c7081 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Tue, 27 Feb 2024 18:18:08 +0100 Subject: [PATCH 2/6] opengl --- hosts/catbook-j/configuration.nix | 16 ++++++++++++++++ hosts/catbook-j/hardware-configuration.nix | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/hosts/catbook-j/configuration.nix b/hosts/catbook-j/configuration.nix index 64b4fa6..9379ded 100644 --- a/hosts/catbook-j/configuration.nix +++ b/hosts/catbook-j/configuration.nix @@ -43,6 +43,22 @@ systemd.services."ModemManager".wants = ["NetworkManager.service"]; systemd.services."ModemManager".wantedBy = ["multi-user.target"]; + environment.variables = { + VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); + }; + + hardware.opengl = { + enable = true; + extraPackages = with pkgs; [ + intel-ocl + intel-media-driver + intel-vaapi-driver + intel-compute-runtime + libvdpau-va-gl + mesa.drivers + ]; + }; + programs.wireshark.enable = true; boot.resumeDevice = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694"; diff --git a/hosts/catbook-j/hardware-configuration.nix b/hosts/catbook-j/hardware-configuration.nix index a692904..6430beb 100644 --- a/hosts/catbook-j/hardware-configuration.nix +++ b/hosts/catbook-j/hardware-configuration.nix @@ -13,7 +13,7 @@ ]; boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"]; - boot.initrd.kernelModules = []; + boot.initrd.kernelModules = ["i915"]; boot.kernelModules = ["kvm-intel"]; boot.extraModulePackages = []; From d80f184d7e6357fe3a195cf991d53a94638eec0e Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Tue, 27 Feb 2024 18:18:26 +0100 Subject: [PATCH 3/6] add fontforge --- modules/desktop/creative.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/desktop/creative.nix b/modules/desktop/creative.nix index efaec26..93cbfe5 100644 --- a/modules/desktop/creative.nix +++ b/modules/desktop/creative.nix @@ -24,6 +24,8 @@ fspy scribus + fontforge-gtk + libreoffice typst From ab508dbcb9240b96b3d74b3f82fa3a5e9118a3d4 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Tue, 27 Feb 2024 18:18:36 +0100 Subject: [PATCH 4/6] add firefox extensions --- modules/desktop/firefox.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/desktop/firefox.nix b/modules/desktop/firefox.nix index 586928b..826dc00 100644 --- a/modules/desktop/firefox.nix +++ b/modules/desktop/firefox.nix @@ -29,6 +29,8 @@ "darkreader" "sponsorblock" "youtube-mrbeastify" + "return-youtube-dislikes" + "multi-account-containers" ]; Extensions.Uninstall = [ "google@search.mozilla.org" From 6687b0ff4a6e5f50e173973a7e29216bb54bad24 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Tue, 27 Feb 2024 18:18:55 +0100 Subject: [PATCH 5/6] haskell things --- flake.nix | 8 +++++++- haskell/xmobar/xmobar.hs | 9 ++++++--- modules/desktop/xmonad.nix | 6 +++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 17b61dd..67768d8 100644 --- a/flake.nix +++ b/flake.nix @@ -36,7 +36,13 @@ devShells."x86_64-linux".default = pkgs.mkShell { buildInputs = [ (pkgs.haskellPackages.ghcWithPackages - (pkgs: with pkgs; [xmonad xmonad-contrib xmobar])) + (pkgs: + with pkgs; [ + xmonad + xmonad-contrib + xmobar + statgrab + ])) pkgs.haskell-language-server ]; }; diff --git a/haskell/xmobar/xmobar.hs b/haskell/xmobar/xmobar.hs index c9a01f1..51b6138 100644 --- a/haskell/xmobar/xmobar.hs +++ b/haskell/xmobar/xmobar.hs @@ -1,4 +1,5 @@ import Xmobar +import System.Statgrab -- TODOS: -- - custom cpu module @@ -10,12 +11,14 @@ import Xmobar -- - mail/message monitoring -- - if possible, different bars per workspace -data CustomCpu = CustomCpu +data CustomCpu = CustomCpu deriving (Read, Show) instance Exec CustomCpu where alias CustomCpu = "cpu" - run CustomCpu = return "meow" + run CustomCpu = do + -- return (show :: IO String (snapshot :: Stats CPUPercent)) + return "meow" fc code content = "" ++ content ++ "" @@ -31,7 +34,7 @@ config = bgColor = "#282828", fgColor = "#ebdbb2", commands = - [ Run $ Memory ["t", "Mem: %"] 10, + [ Run $ Xmobar.Memory ["t", "Mem: %"] 10, Run $ CustomCpu, Run $ Date (icon "\983277" ++ " %Y" ++ sep "-" ++ "%m" ++ sep "-" ++ "%d " ++ icon "\988236" ++ " %H" ++ sep ":" ++ "%M" ++ sep ":" ++ "%S ") "date" 10 ], diff --git a/modules/desktop/xmonad.nix b/modules/desktop/xmonad.nix index db504a5..9f806a3 100644 --- a/modules/desktop/xmonad.nix +++ b/modules/desktop/xmonad.nix @@ -8,7 +8,11 @@ pkgs, ... }: let - xmobarGhc = pkgs.haskellPackages.ghcWithPackages (pkgs: with pkgs; [xmobar]); + xmobarGhc = pkgs.haskellPackages.ghcWithPackages (pkgs: + with pkgs; [ + xmobar + statgrab + ]); in { home.packages = [xmobarGhc pkgs.xmonadctl]; programs.xmobar = { From bcd35b8be4157a0ce696603aae20406bdc542281 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Tue, 27 Feb 2024 18:19:11 +0100 Subject: [PATCH 6/6] fix one commnd and add some aliases --- other/config.nu | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/other/config.nu b/other/config.nu index c590b75..2903d1d 100644 --- a/other/config.nu +++ b/other/config.nu @@ -812,7 +812,7 @@ def ed [ ] { let ext = $file | path parse | get extension; match $ext { - "typ" => {|| zellij run --direction down -- typst watch $file --open ($cmdargs | str join ' ') } + "typ" => {|| zellij run --direction down -- typst watch $file ($cmdargs | prepend '--open' | str join ' ') } }; hx $file } @@ -829,3 +829,8 @@ alias gp = git push; alias gl = git pull; alias gs = git status; alias clip = xclip -selection c; + +alias cr = cargo run; +alias cl = cargo clippy; +alias cb = cargo build; +alias cch = cargo check;