diff --git a/README.org b/README.org index 30dcbcb..061d10e 100644 --- a/README.org +++ b/README.org @@ -146,12 +146,24 @@ services.xserver = { enable = true; package = pkgs.myAwesome; }; - displayManager.sddm.enable = true; - desktopManager.plasma5.enable = true; + displayManager.sddm = { + enable = true; + enableHidpi = true; + }; + desktopManager.plasma5 = { + enable = true; + runUsingSystemd = true; + }; # desktopManager.gnome.enable = true; }; #+end_src +In order to make sure the kde xdg-portals are used we need this +#+NAME: xdg-portals +#+begin_src nix +xdg.portals.extraPortals = [ "xdg-desktop-portal-kde" ]; +#+end_src + To use pipewire there are some specific setup pieces that I like to have. #+NAME: pipewire #+begin_src nix @@ -176,18 +188,20 @@ To make sure certain things are setup properly I'll modify the shells a bit. # Apparently this is bad because a lot of nix relies on bash # environment.binsh = "${pkgs.dash}/bin/dash"; -environment.variables = { +environment.homeBinInPath = true; +programs.fish.enable = true; +programs.zsh.enable = true; +#+end_src + +And here are environment variables I need in all computers +#+NAME: env +#+begin_src nix EDITOR = "emacsclient -t -a"; VISUAL = "emacsclient -c -a"; - # Fixing Qt apps in other environments # Thought I needed this but apparently they are working fine without it. # QT_XCB_GL_INTEGRATION = "xcb_egl"; # QT_QPA_PLATFORM_PLUGIN_PATH = "${pkgs.qt5.qtbase.bin}/lib/qt-${pkgs.qt5.qtbase.qtCompatVersion}/plugins/platforms"; -}; -environment.homeBinInPath = true; -programs.fish.enable = true; -programs.zsh.enable = true; #+end_src #+NAME: samba @@ -430,7 +444,7 @@ Emacs service #+begin_src nix services.emacs = { enable = true; - package = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages (epkgs: [ epkgs.vterm epkgs.magit epkgs.pdf-tools pkgs.mu ])); + package = with pkgs; ((emacsPackagesFor emacsPgtkNativeComp).emacsWithPackages (epkgs: [ epkgs.vterm epkgs.magit epkgs.pdf-tools pkgs.mu ])); }; #+end_src @@ -438,8 +452,9 @@ services.emacs = { Syl is my laptop and has some configuration unique to that. In particular, it's a Framework Laptop. Honestly a great piece of tech. Love it. Notice how I am including all of my software here. It may be a big file, but having all of it in one place means I can easily grok through it and remove something. +*** Config #+begin_src nix :tangle system/syl/configuration.nix :noweb yes -{ config, pkgs, callPackage, ... }: +{ lib, config, pkgs, callPackage, ... }: { <> @@ -449,10 +464,19 @@ Notice how I am including all of my software here. It may be a big file, but hav boot.kernelPackages = pkgs.linuxPackages_zen; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + boot.initrd.kernelModules = [ "i915" ]; nixpkgs.config.allowUnfree = true; - boot.kernelParams = [ "mem_sleep_default=deep" ]; + boot.kernelParams = [ "mem_sleep_default=deep" "nvme.noacpi=1" ]; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; + + hardware.acpilight.enable = lib.mkDefault true; + + services.udev.extraRules = '' + SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa0e0", ATTR{power/control}="on" + ''; networking.hostName = "syl"; # Define your hostname. networking.networkmanager.enable = true; @@ -483,7 +507,6 @@ Notice how I am including all of my software here. It may be a big file, but hav extraPackages = with pkgs; [ intel-media-driver # LIBVA_DRIVER_NAME=iHD vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) - vaapiVdpau libvdpau-va-gl ]; }; @@ -534,6 +557,11 @@ Notice how I am including all of my software here. It may be a big file, but hav <> + environment.variables = { + <> + VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); + }; + # Define a user account. Don't forget to set a password with ‘passwd’. users.users.chris = { isNormalUser = true; @@ -613,6 +641,7 @@ Notice how I am including all of my software here. It may be a big file, but hav } #+end_src +*** Hardware Now in the =hardware-configuration.nix= file, I didn't change much because I wanted to keep it roughly the same in case things do get overwritten, but this is another nice feature of literate programming, should things change in the /etc folder, I'll have this readme as a backup of what it was before the changes. #+begin_src nix :tangle system/syl/hardware-configuration.nix { config, lib, pkgs, modulesPath, ... }: @@ -659,7 +688,7 @@ Now in the =hardware-configuration.nix= file, I didn't change much because I wan ** Kaladin Kaladin is my desktop machine. A powerhouse for the most part with a recent i7 and 64gb of memory and an Nvidia 1080. Basically I use this for video editing, animation, and some other things. Here is it's configuration. -*** config +*** Config #+begin_src nix :tangle system/kaladin/configuration.nix :noweb yes { config, pkgs, ... }: @@ -735,6 +764,10 @@ Kaladin is my desktop machine. A powerhouse for the most part with a recent i7 a <> + environment.variables = { + <> + }; + # Define a user account. Don't forget to set a password with ‘passwd’. users.users.chris = { isNormalUser = true; @@ -1232,9 +1265,24 @@ I also use home-manager for managing dotfiles. This means that everything is con }; # programs.qutebrowser.enable = true; - home.file.".config/qutebrowser" = { - source = ../qutebrowser; - recursive = true; + home.file.".config/qutebrowser/config.py" = { + source = ../qutebrowser/config.py; + }; + + home.file.".config/qutebrowser/bookmarks" = { + source = ../qutebrowser/bookmarks; + }; + + home.file.".config/qutebrowser/css" = { + source = ../qutebrowser/css; + }; + + home.file.".config/qutebrowser/quickmarks" = { + source = ../qutebrowser/quickmarks; + }; + + home.file.".config/qutebrowser/qsettings" = { + source = ../qutebrowser/qsettings; }; home.file.".config/mpv" = { diff --git a/awesome/keybindings.fnl b/awesome/keybindings.fnl index 0084ca5..54043ad 100644 --- a/awesome/keybindings.fnl +++ b/awesome/keybindings.fnl @@ -183,7 +183,7 @@ (awful.key [ modkey shift ] "w" (fn [] (awful.spawn "libreoffice --writer")) {:description "Open Writer" :group "apps" }) ;;ff - (awful.key [modkey] "b" (fn [] (awful.spawn "fflof")) + (awful.key [modkey] "b" (fn [] (awful.spawn "qblof")) {:description "launch browser" :group "apps"}) ;; rofi (awful.key [] "Menu" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh")) diff --git a/scripts/qblof b/scripts/qblof index 53546ea..28c071a 100755 --- a/scripts/qblof +++ b/scripts/qblof @@ -12,7 +12,7 @@ if [ $(pgrep -c qutebrowser) -gt 0 ]; then # echo $emacsrg if [ -z $qbrg ]; then - exec qutebrowser + exec env QT_QPA_PLATFORMTHEME="" qutebrowser exit else exec wmctrl -ia $qbrg @@ -35,5 +35,5 @@ if [ $(pgrep -c qutebrowser) -gt 0 ]; then fi fi else - exec qutebrowser + exec env QT_QPA_PLATFORMTHEME="" qutebrowser fi diff --git a/system/kaladin/configuration.nix b/system/kaladin/configuration.nix index 899644e..06f180b 100644 --- a/system/kaladin/configuration.nix +++ b/system/kaladin/configuration.nix @@ -65,8 +65,14 @@ enable = true; package = pkgs.myAwesome; }; - displayManager.sddm.enable = true; - desktopManager.plasma5.enable = true; + displayManager.sddm = { + enable = true; + enableHidpi = true; + }; + desktopManager.plasma5 = { + enable = true; + runUsingSystemd = true; + }; # desktopManager.gnome.enable = true; }; @@ -101,19 +107,19 @@ # Apparently this is bad because a lot of nix relies on bash # environment.binsh = "${pkgs.dash}/bin/dash"; - environment.variables = { - EDITOR = "emacsclient -t -a"; - VISUAL = "emacsclient -c -a"; - - # Fixing Qt apps in other environments - # Thought I needed this but apparently they are working fine without it. - # QT_XCB_GL_INTEGRATION = "xcb_egl"; - # QT_QPA_PLATFORM_PLUGIN_PATH = "${pkgs.qt5.qtbase.bin}/lib/qt-${pkgs.qt5.qtbase.qtCompatVersion}/plugins/platforms"; - }; environment.homeBinInPath = true; programs.fish.enable = true; programs.zsh.enable = true; + environment.variables = { + EDITOR = "emacsclient -t -a"; + VISUAL = "emacsclient -c -a"; + # Fixing Qt apps in other environments + # Thought I needed this but apparently they are working fine without it. + # QT_XCB_GL_INTEGRATION = "xcb_egl"; + # QT_QPA_PLATFORM_PLUGIN_PATH = "${pkgs.qt5.qtbase.bin}/lib/qt-${pkgs.qt5.qtbase.qtCompatVersion}/plugins/platforms"; + }; + # Define a user account. Don't forget to set a password with ‘passwd’. users.users.chris = { isNormalUser = true; @@ -337,7 +343,7 @@ services.emacs = { enable = true; - package = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages (epkgs: [ epkgs.vterm epkgs.magit epkgs.pdf-tools pkgs.mu ])); + package = with pkgs; ((emacsPackagesFor emacsPgtkNativeComp).emacsWithPackages (epkgs: [ epkgs.vterm epkgs.magit epkgs.pdf-tools pkgs.mu ])); }; services.samba-wsdd.enable = true; services.samba = { diff --git a/system/syl/configuration.nix b/system/syl/configuration.nix index 22cb3a8..0779f04 100644 --- a/system/syl/configuration.nix +++ b/system/syl/configuration.nix @@ -1,4 +1,4 @@ -{ config, pkgs, callPackage, ... }: +{ lib, config, pkgs, callPackage, ... }: { imports = @@ -14,10 +14,19 @@ boot.kernelPackages = pkgs.linuxPackages_zen; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + boot.initrd.kernelModules = [ "i915" ]; nixpkgs.config.allowUnfree = true; - boot.kernelParams = [ "mem_sleep_default=deep" ]; + boot.kernelParams = [ "mem_sleep_default=deep" "nvme.noacpi=1" ]; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; + + hardware.acpilight.enable = lib.mkDefault true; + + services.udev.extraRules = '' + SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa0e0", ATTR{power/control}="on" + ''; networking.hostName = "syl"; # Define your hostname. networking.networkmanager.enable = true; @@ -49,7 +58,6 @@ extraPackages = with pkgs; [ intel-media-driver # LIBVA_DRIVER_NAME=iHD vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) - vaapiVdpau libvdpau-va-gl ]; }; @@ -60,8 +68,14 @@ enable = true; package = pkgs.myAwesome; }; - displayManager.sddm.enable = true; - desktopManager.plasma5.enable = true; + displayManager.sddm = { + enable = true; + enableHidpi = true; + }; + desktopManager.plasma5 = { + enable = true; + runUsingSystemd = true; + }; # desktopManager.gnome.enable = true; }; @@ -75,7 +89,7 @@ # Enable fingerprint services.fprintd.enable = true; - #programs.qt5ct.enable = true; + programs.qt5ct.enable = true; # Enable sound. security.rtkit.enable = true; @@ -122,19 +136,20 @@ # Apparently this is bad because a lot of nix relies on bash # environment.binsh = "${pkgs.dash}/bin/dash"; - environment.variables = { - EDITOR = "emacsclient -t -a"; - VISUAL = "emacsclient -c -a"; - - # Fixing Qt apps in other environments - # Thought I needed this but apparently they are working fine without it. - # QT_XCB_GL_INTEGRATION = "xcb_egl"; - # QT_QPA_PLATFORM_PLUGIN_PATH = "${pkgs.qt5.qtbase.bin}/lib/qt-${pkgs.qt5.qtbase.qtCompatVersion}/plugins/platforms"; - }; environment.homeBinInPath = true; programs.fish.enable = true; programs.zsh.enable = true; + environment.variables = { + EDITOR = "emacsclient -t -a"; + VISUAL = "emacsclient -c -a"; + # Fixing Qt apps in other environments + # Thought I needed this but apparently they are working fine without it. + # QT_XCB_GL_INTEGRATION = "xcb_egl"; + # QT_QPA_PLATFORM_PLUGIN_PATH = "${pkgs.qt5.qtbase.bin}/lib/qt-${pkgs.qt5.qtbase.qtCompatVersion}/plugins/platforms"; + VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); + }; + # Define a user account. Don't forget to set a password with ‘passwd’. users.users.chris = { isNormalUser = true; @@ -348,7 +363,7 @@ services.emacs = { enable = true; - package = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages (epkgs: [ epkgs.vterm epkgs.magit epkgs.pdf-tools pkgs.mu ])); + package = with pkgs; ((emacsPackagesFor emacsPgtkNativeComp).emacsWithPackages (epkgs: [ epkgs.vterm epkgs.magit epkgs.pdf-tools pkgs.mu ])); }; services.samba-wsdd.enable = true; services.samba = { diff --git a/user/home.nix b/user/home.nix index d840b11..ee308cc 100644 --- a/user/home.nix +++ b/user/home.nix @@ -341,9 +341,24 @@ }; # programs.qutebrowser.enable = true; - home.file.".config/qutebrowser" = { - source = ../qutebrowser; - recursive = true; + home.file.".config/qutebrowser/config.py" = { + source = ../qutebrowser/config.py; + }; + + home.file.".config/qutebrowser/bookmarks" = { + source = ../qutebrowser/bookmarks; + }; + + home.file.".config/qutebrowser/css" = { + source = ../qutebrowser/css; + }; + + home.file.".config/qutebrowser/quickmarks" = { + source = ../qutebrowser/quickmarks; + }; + + home.file.".config/qutebrowser/qsettings" = { + source = ../qutebrowser/qsettings; }; home.file.".config/mpv" = {