From 3a335817cbbc20957f31e0d2fe03abce7b46d959 Mon Sep 17 00:00:00 2001 From: foosinn Date: Sat, 29 Aug 2020 16:49:58 +0200 Subject: [PATCH 1/6] use latest linux kernel (for new amd cpus) --- configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/configuration.nix b/configuration.nix index c3aa043..4d60bf5 100644 --- a/configuration.nix +++ b/configuration.nix @@ -23,6 +23,7 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + boot.kernelPackages = pkgs.linuxPackages_latest; networking.hostName = "raven"; networking.hostId = "e3a397c5"; From f434cfa3e059079adebfbdb08633099634d4d7e7 Mon Sep 17 00:00:00 2001 From: foosinn Date: Sat, 29 Aug 2020 16:51:01 +0200 Subject: [PATCH 2/6] adapt for new hardware --- configuration.nix | 7 ++----- dotfiles/sway/status.toml | 13 +++++-------- hardware-configuration.nix | 29 +++++++++++------------------ 3 files changed, 18 insertions(+), 31 deletions(-) diff --git a/configuration.nix b/configuration.nix index 4d60bf5..eae589f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -7,9 +7,6 @@ { imports = [ - - - # Include the results of the hardware scan. ./hardware-configuration.nix @@ -29,8 +26,8 @@ networking.hostId = "e3a397c5"; networking.useDHCP = false; - networking.interfaces.enp0s25.useDHCP = true; - networking.interfaces.wlp3s0.useDHCP = true; + networking.interfaces.wlo1.useDHCP = true; + networking.resolvconf.useLocalResolver = true; i18n.defaultLocale = "en_US.UTF-8"; time.timeZone = "Europe/Berlin"; diff --git a/dotfiles/sway/status.toml b/dotfiles/sway/status.toml index e0a3a6a..40b527a 100644 --- a/dotfiles/sway/status.toml +++ b/dotfiles/sway/status.toml @@ -54,7 +54,7 @@ hide_missing = true [[block]] block = "net" -device = "wlp3s0" +device = "wlo1" ip = true ssid = true speed_up = false @@ -63,11 +63,8 @@ hide_inactive = true hide_missing = true [[block]] -block = "temperature" -collapsed = false -interval = 10 -chip = "coretemp-isa-0000" -format = "{min}..{max}°" +block = "custom" +command = '''echo " $(cat /sys/class/thermal/thermal_zone0/temp | head -c 2) °C"''' [[block]] block = "disk_space" @@ -99,9 +96,9 @@ block = "backlight" [[block]] block = "battery" -device = "BAT0" +device = "BAT1" interval = 10 -format = "{percentage}%" +format = "{percentage}% {time}" [[block]] block = "time" diff --git a/hardware-configuration.nix b/hardware-configuration.nix index e9bda5f..1eeab35 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -4,21 +4,17 @@ { config, lib, pkgs, ... }: { - imports = - [ - ]; + imports = [ + + + + + ]; - boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - - boot.initrd.luks.devices = { - swap = { - device = "/dev/disk/by-uuid/fe87a31c-7d0b-4073-98fc-fa825de77181"; - allowDiscards = true; - }; - }; fileSystems."/" = { device = "tank/root/nixos"; @@ -31,14 +27,11 @@ }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/0C2D-2799"; + { device = "/dev/disk/by-uuid/B048-FBC8"; fsType = "vfat"; }; - swapDevices = - [ { device = "/dev/disk/by-uuid/2ac33f61-0db5-4f94-8148-93f2166b2f29"; } - ]; + swapDevices = [ ]; - nix.maxJobs = lib.mkDefault 4; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + nix.maxJobs = lib.mkDefault 8; } From 527948d8458070f1e57a38a2f1a786579611dec0 Mon Sep 17 00:00:00 2001 From: foosinn Date: Sat, 29 Aug 2020 16:51:24 +0200 Subject: [PATCH 3/6] background and keyboard config --- dotfiles/sway/config | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dotfiles/sway/config b/dotfiles/sway/config index 3944eb2..9425048 100644 --- a/dotfiles/sway/config +++ b/dotfiles/sway/config @@ -7,8 +7,10 @@ set $right l set $term alacritty set $menu bemenu-run -output * bg /home/stefan/Sync/wall/nasa-yZygONrUBe8-unsplash.jpg fill -output eDP-1 scale 1.3 +input "1:1:AT_Translated_Set_2_keyboard" xkb_layout de + +output * bg /home/stefan/Downloads/bg.jpg fill +#output * bg /home/stefan/Sync/wall/nasa-yZygONrUBe8-unsplash.jpg fill output DP-1 res 5120x1440 # user keybinds From f4984704f9067ef5e3a307a75c9297c94df5b9f0 Mon Sep 17 00:00:00 2001 From: foosinn Date: Sat, 29 Aug 2020 16:51:58 +0200 Subject: [PATCH 4/6] direnv --- roles/base.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/base.nix b/roles/base.nix index 835d042..29779da 100644 --- a/roles/base.nix +++ b/roles/base.nix @@ -7,6 +7,7 @@ in { bash bat emacs-nox + direnv fd fzf git @@ -64,6 +65,7 @@ precmd_user_func = "title" . "$(fzf-share)/key-bindings.bash" . "$(fzf-share)/completion.bash" . <(z --init bash) + . <(direnv hook bash) ''; shellAliases = { @@ -87,4 +89,5 @@ precmd_user_func = "title" ''; services.resolved.enable = true; + services.lorri.enable = true; } From b1376304b711f1d2d45a33303e25264a5e9e3f23 Mon Sep 17 00:00:00 2001 From: foosinn Date: Sat, 29 Aug 2020 16:52:59 +0200 Subject: [PATCH 5/6] new software --- roles/base.nix | 1 - roles/desktop.nix | 10 +++++++++- roles/dev.nix | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/roles/base.nix b/roles/base.nix index 29779da..3eccdfb 100644 --- a/roles/base.nix +++ b/roles/base.nix @@ -6,7 +6,6 @@ in { environment.systemPackages = with pkgs; [ bash bat - emacs-nox direnv fd fzf diff --git a/roles/desktop.nix b/roles/desktop.nix index 1219757..b5a63d8 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -17,6 +17,7 @@ in { slurp swayidle swaylock + xwayland ]; }; @@ -41,14 +42,21 @@ in { ]; environment.systemPackages = with pkgs; [ + librsvg + unstable.mypaint + unstable.mypaint-brushes + + hicolor-icon-theme + numix-icon-theme alacritty firefox mumble neofetch + inkscape pulseaudio pulsemixer - wl-clipboard unstable.keepassxc + wl-clipboard ( pkgs.writeTextFile { name = "startsway"; diff --git a/roles/dev.nix b/roles/dev.nix index a42a09a..c132318 100644 --- a/roles/dev.nix +++ b/roles/dev.nix @@ -9,6 +9,7 @@ let in { environment.systemPackages = with pkgs; [ + emacs go python37 python37Packages.pyls-black From 7984da51d3b9778aaafd34e57eb99dd5bd5f5e85 Mon Sep 17 00:00:00 2001 From: foosinn Date: Sat, 29 Aug 2020 16:53:14 +0200 Subject: [PATCH 6/6] firefox with video acceleration --- roles/desktop.nix | 34 ++++++++++++++++++++++++++-------- roles/dev.nix | 2 -- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/roles/desktop.nix b/roles/desktop.nix index b5a63d8..f4f8786 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -4,8 +4,9 @@ { config, lib, pkgs, ... }: let - unstable = import {}; + unstable = import { config.allowUnfree = true; }; in { + programs.sway = { enable = true; extraPackages = with pkgs; [ @@ -42,14 +43,26 @@ in { ]; environment.systemPackages = with pkgs; [ + # firefox also needs: + # + # gfx.webrenderer.enabled = true + # widget.wayland-dmabuf-vaapi.enabled = true + # + # check in `about:support` that + # * Composing -> Webrenderer + unstable.firefox-bin + libva + libva-utils + mesa + librsvg unstable.mypaint unstable.mypaint-brushes hicolor-icon-theme numix-icon-theme + alacritty - firefox mumble neofetch inkscape @@ -64,12 +77,13 @@ in { executable = true; text = '' #! ${pkgs.bash}/bin/bash - - export MOZ_ENABLE_WAYLAND=1 - export QT_QPA_PLATFORM=wayland-egl - export QT_WAYLAND_FORCE_DPI=physical - export SDL_VIDEODRIVER=wayland - export _JAVA_AWT_WM_NOREPARENTING=1 + + export _JAVA_AWT_WM_NOREPARENTING=1 + export MOZ_ENABLE_WAYLAND=1 + export QT_AUTO_SCREEN_SCALE_FACTOR=0 + export QT_WAYLAND_FORCE_DPI=96 + export QT_QPA_PLATFORM=wayland-egl + export SDL_VIDEODRIVER=wayland exec ${pkgs.dbus}/bin/dbus-run-session ${pkgs.sway}/bin/sway ''; } @@ -85,4 +99,8 @@ in { }; services.printing.enable = true; + + hardware.opengl = { + enable = true; + }; } diff --git a/roles/dev.nix b/roles/dev.nix index c132318..2710627 100644 --- a/roles/dev.nix +++ b/roles/dev.nix @@ -5,8 +5,6 @@ let unstable = import {}; - mozilla = import {}; - in { environment.systemPackages = with pkgs; [ emacs