adjustments to plasma and some small parts of the hardware on syl

This commit is contained in:
Chris Cochrun 2022-07-06 14:11:20 -05:00
parent 57ec05b532
commit c5458865a0
6 changed files with 134 additions and 50 deletions

View file

@ -146,12 +146,24 @@ services.xserver = {
enable = true; enable = true;
package = pkgs.myAwesome; package = pkgs.myAwesome;
}; };
displayManager.sddm.enable = true; displayManager.sddm = {
desktopManager.plasma5.enable = true; enable = true;
enableHidpi = true;
};
desktopManager.plasma5 = {
enable = true;
runUsingSystemd = true;
};
# desktopManager.gnome.enable = true; # desktopManager.gnome.enable = true;
}; };
#+end_src #+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. To use pipewire there are some specific setup pieces that I like to have.
#+NAME: pipewire #+NAME: pipewire
#+begin_src nix #+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 # Apparently this is bad because a lot of nix relies on bash
# environment.binsh = "${pkgs.dash}/bin/dash"; # 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"; EDITOR = "emacsclient -t -a";
VISUAL = "emacsclient -c -a"; VISUAL = "emacsclient -c -a";
# Fixing Qt apps in other environments # Fixing Qt apps in other environments
# Thought I needed this but apparently they are working fine without it. # Thought I needed this but apparently they are working fine without it.
# QT_XCB_GL_INTEGRATION = "xcb_egl"; # QT_XCB_GL_INTEGRATION = "xcb_egl";
# QT_QPA_PLATFORM_PLUGIN_PATH = "${pkgs.qt5.qtbase.bin}/lib/qt-${pkgs.qt5.qtbase.qtCompatVersion}/plugins/platforms"; # 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 #+end_src
#+NAME: samba #+NAME: samba
@ -430,7 +444,7 @@ Emacs service
#+begin_src nix #+begin_src nix
services.emacs = { services.emacs = {
enable = true; 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 #+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. 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. 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 #+begin_src nix :tangle system/syl/configuration.nix :noweb yes
{ config, pkgs, callPackage, ... }: { lib, config, pkgs, callPackage, ... }:
{ {
<<hardware>> <<hardware>>
@ -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.kernelPackages = pkgs.linuxPackages_zen;
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.kernelModules = [ "i915" ];
nixpkgs.config.allowUnfree = true; 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.hostName = "syl"; # Define your hostname.
networking.networkmanager.enable = true; 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; [ extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD intel-media-driver # LIBVA_DRIVER_NAME=iHD
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
vaapiVdpau
libvdpau-va-gl 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
<<shell>> <<shell>>
environment.variables = {
<<env>>
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. # Define a user account. Don't forget to set a password with passwd.
users.users.chris = { users.users.chris = {
isNormalUser = true; 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 #+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. 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 #+begin_src nix :tangle system/syl/hardware-configuration.nix
{ config, lib, pkgs, modulesPath, ... }: { 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
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. 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 #+begin_src nix :tangle system/kaladin/configuration.nix :noweb yes
{ config, pkgs, ... }: { config, pkgs, ... }:
@ -735,6 +764,10 @@ Kaladin is my desktop machine. A powerhouse for the most part with a recent i7 a
<<shell>> <<shell>>
environment.variables = {
<<env>>
};
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.chris = { users.users.chris = {
isNormalUser = true; isNormalUser = true;
@ -1232,9 +1265,24 @@ I also use home-manager for managing dotfiles. This means that everything is con
}; };
# programs.qutebrowser.enable = true; # programs.qutebrowser.enable = true;
home.file.".config/qutebrowser" = { home.file.".config/qutebrowser/config.py" = {
source = ../qutebrowser; source = ../qutebrowser/config.py;
recursive = true; };
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" = { home.file.".config/mpv" = {

View file

@ -183,7 +183,7 @@
(awful.key [ modkey shift ] "w" (fn [] (awful.spawn "libreoffice --writer")) (awful.key [ modkey shift ] "w" (fn [] (awful.spawn "libreoffice --writer"))
{:description "Open Writer" :group "apps" }) {:description "Open Writer" :group "apps" })
;;ff ;;ff
(awful.key [modkey] "b" (fn [] (awful.spawn "fflof")) (awful.key [modkey] "b" (fn [] (awful.spawn "qblof"))
{:description "launch browser" :group "apps"}) {:description "launch browser" :group "apps"})
;; rofi ;; rofi
(awful.key [] "Menu" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh")) (awful.key [] "Menu" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh"))

View file

@ -12,7 +12,7 @@ if [ $(pgrep -c qutebrowser) -gt 0 ]; then
# echo $emacsrg # echo $emacsrg
if [ -z $qbrg ]; then if [ -z $qbrg ]; then
exec qutebrowser exec env QT_QPA_PLATFORMTHEME="" qutebrowser
exit exit
else else
exec wmctrl -ia $qbrg exec wmctrl -ia $qbrg
@ -35,5 +35,5 @@ if [ $(pgrep -c qutebrowser) -gt 0 ]; then
fi fi
fi fi
else else
exec qutebrowser exec env QT_QPA_PLATFORMTHEME="" qutebrowser
fi fi

View file

@ -65,8 +65,14 @@
enable = true; enable = true;
package = pkgs.myAwesome; package = pkgs.myAwesome;
}; };
displayManager.sddm.enable = true; displayManager.sddm = {
desktopManager.plasma5.enable = true; enable = true;
enableHidpi = true;
};
desktopManager.plasma5 = {
enable = true;
runUsingSystemd = true;
};
# desktopManager.gnome.enable = true; # desktopManager.gnome.enable = true;
}; };
@ -101,19 +107,19 @@
# Apparently this is bad because a lot of nix relies on bash # Apparently this is bad because a lot of nix relies on bash
# environment.binsh = "${pkgs.dash}/bin/dash"; # 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; environment.homeBinInPath = true;
programs.fish.enable = true; programs.fish.enable = true;
programs.zsh.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. # Define a user account. Don't forget to set a password with passwd.
users.users.chris = { users.users.chris = {
isNormalUser = true; isNormalUser = true;
@ -337,7 +343,7 @@
services.emacs = { services.emacs = {
enable = true; 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-wsdd.enable = true;
services.samba = { services.samba = {

View file

@ -1,4 +1,4 @@
{ config, pkgs, callPackage, ... }: { lib, config, pkgs, callPackage, ... }:
{ {
imports = imports =
@ -14,10 +14,19 @@
boot.kernelPackages = pkgs.linuxPackages_zen; boot.kernelPackages = pkgs.linuxPackages_zen;
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.kernelModules = [ "i915" ];
nixpkgs.config.allowUnfree = true; 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.hostName = "syl"; # Define your hostname.
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -49,7 +58,6 @@
extraPackages = with pkgs; [ extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD intel-media-driver # LIBVA_DRIVER_NAME=iHD
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
vaapiVdpau
libvdpau-va-gl libvdpau-va-gl
]; ];
}; };
@ -60,8 +68,14 @@
enable = true; enable = true;
package = pkgs.myAwesome; package = pkgs.myAwesome;
}; };
displayManager.sddm.enable = true; displayManager.sddm = {
desktopManager.plasma5.enable = true; enable = true;
enableHidpi = true;
};
desktopManager.plasma5 = {
enable = true;
runUsingSystemd = true;
};
# desktopManager.gnome.enable = true; # desktopManager.gnome.enable = true;
}; };
@ -75,7 +89,7 @@
# Enable fingerprint # Enable fingerprint
services.fprintd.enable = true; services.fprintd.enable = true;
#programs.qt5ct.enable = true; programs.qt5ct.enable = true;
# Enable sound. # Enable sound.
security.rtkit.enable = true; security.rtkit.enable = true;
@ -122,19 +136,20 @@
# Apparently this is bad because a lot of nix relies on bash # Apparently this is bad because a lot of nix relies on bash
# environment.binsh = "${pkgs.dash}/bin/dash"; # 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; environment.homeBinInPath = true;
programs.fish.enable = true; programs.fish.enable = true;
programs.zsh.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. # Define a user account. Don't forget to set a password with passwd.
users.users.chris = { users.users.chris = {
isNormalUser = true; isNormalUser = true;
@ -348,7 +363,7 @@
services.emacs = { services.emacs = {
enable = true; 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-wsdd.enable = true;
services.samba = { services.samba = {

View file

@ -341,9 +341,24 @@
}; };
# programs.qutebrowser.enable = true; # programs.qutebrowser.enable = true;
home.file.".config/qutebrowser" = { home.file.".config/qutebrowser/config.py" = {
source = ../qutebrowser; source = ../qutebrowser/config.py;
recursive = true; };
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" = { home.file.".config/mpv" = {