From e045ee33ee1cc7a874398657f712580e41f1c17d Mon Sep 17 00:00:00 2001 From: Kat Huang Date: Fri, 10 Jul 2020 12:32:43 -0700 Subject: [PATCH 1/7] [NixOS] Add katboon --- dotfiles/xkb/keymap/katboon | 7 ++++++ nixos/machines/katboon.nix | 43 +++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 dotfiles/xkb/keymap/katboon create mode 100644 nixos/machines/katboon.nix diff --git a/dotfiles/xkb/keymap/katboon b/dotfiles/xkb/keymap/katboon new file mode 100644 index 00000000..e4458964 --- /dev/null +++ b/dotfiles/xkb/keymap/katboon @@ -0,0 +1,7 @@ +xkb_keymap { + xkb_keycodes { include "evdev+aliases(qwerty)" }; + xkb_types { include "complete" }; + xkb_compat { include "complete" }; + xkb_symbols { include "pc+us+inet(evdev)+altwin(swap_lalt_lwin)+imalison(ralt_as_hyper)+capslock(ctrl_modifier)" }; + xkb_geometry { include "pc(pc105)" }; +}; diff --git a/nixos/machines/katboon.nix b/nixos/machines/katboon.nix new file mode 100644 index 00000000..aa01f228 --- /dev/null +++ b/nixos/machines/katboon.nix @@ -0,0 +1,43 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, ... }: + +{ + imports = + [ + ../configuration.nix + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + services.xserver.libinput.enable = true; + services.xserver.videoDrivers = [ "nvidia" ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/bfe4586b-2538-4aae-ad2f-b1277378de4a"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/5C09-F06F"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + networking.hostName = "katboon"; + + nix.maxJobs = lib.mkDefault 12; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + + hardware.opengl.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ]; + hardware.opengl.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ]; + +} From f072eb4b18ceaf5bed8219e885a28bd0ab84b7c8 Mon Sep 17 00:00:00 2001 From: Kat Huang Date: Fri, 10 Jul 2020 12:33:10 -0700 Subject: [PATCH 2/7] [NixOS] Tweaks for kat --- nixos/configuration.nix | 38 +++----------------------------------- nixos/machines/katboon.nix | 2 ++ 2 files changed, 5 insertions(+), 35 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 1e94d270..041c237b 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -25,7 +25,6 @@ in { nixpkgs.overlays = [ (import ./overlays.nix) - (import ../dotfiles/config/taffybar/taffybar/environment.nix) ]; # Allow all the things @@ -141,14 +140,6 @@ in plasma5.breeze-gtk plasma5.breeze-qt5 - # Haskell Desktop - (import ../dotfiles/config/taffybar/default.nix) - (import ../dotfiles/config/xmonad/default.nix) - # notifications-tray-icon - haskellPackages.status-notifier-item - haskellPackages.xmonad - haskellPackages.dbus-hslogger - # Desktop autorandr betterlockscreen @@ -156,6 +147,7 @@ in clipit feh gnome3.gpaste + gnome3.gnome-tweaks kdeconnect libnotify lxqt.lxqt-powermanagement @@ -334,36 +326,14 @@ in desktopManager = { plasma5.enable = true; }; - windowManager = { - session = [ - { - name = "xmonad"; - start = '' - /usr/bin/env imalison-xmonad & - waitPID=$! - ''; - } - { - name = "waymonad"; - start = '' - /usr/bin/env waymonad - waitPID=$! - ''; - } - ]; - }; displayManager = { - sddm = { - enable = true; - }; + sddm.enable = true; sessionCommands = '' systemctl --user import-environment GDK_PIXBUF_MODULE_FILE DBUS_SESSION_BUS_ADDRESS PATH ''; }; }; - virtualisation.docker.enable = true; - users.extraUsers = let extraGroups = [ "audio" @@ -385,16 +355,14 @@ in in { imalison = userDefaults // { name = "imalison"; - uid = 1000; home = "/home/imalison"; shell = pkgs.zsh; }; kat = userDefaults // { name = "kat"; - uid = 1001; home = "/home/kat"; shell = pkgs.zsh; }; }; - nix.trustedUsers = ["imalison"]; + nix.trustedUsers = ["imalison" "kat"]; } diff --git a/nixos/machines/katboon.nix b/nixos/machines/katboon.nix index aa01f228..fef906ea 100644 --- a/nixos/machines/katboon.nix +++ b/nixos/machines/katboon.nix @@ -9,6 +9,8 @@ ../configuration.nix ]; + system.stateVersion = "20.03"; + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; From a79cd89c2fcad07bef315f6d6f28a1510eeb37b0 Mon Sep 17 00:00:00 2001 From: Kat Huang Date: Fri, 10 Jul 2020 12:34:00 -0700 Subject: [PATCH 3/7] [Emacs] Remove git-timemachine --- dotfiles/emacs.d/README.org | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index febbbcf6..11cf976f 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -3880,11 +3880,6 @@ I've disabled magithub because it causes magit to be super slow (progn (add-hook 'magit-mode-hook 'turn-on-magit-gitflow))) #+END_SRC -** git-timemachine -#+BEGIN_SRC emacs-lisp -(use-package git-timemachine - :commands git-timemachine) -#+END_SRC ** git-gutter #+BEGIN_SRC emacs-lisp (use-package git-gutter From 49062cab45598b905644bc6468cedcffddcecfab Mon Sep 17 00:00:00 2001 From: Kat Huang Date: Tue, 14 Jul 2020 12:13:16 -0700 Subject: [PATCH 4/7] [NixOS] katboon -> adele --- nixos/machines/{katboon.nix => adele.nix} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename nixos/machines/{katboon.nix => adele.nix} (100%) diff --git a/nixos/machines/katboon.nix b/nixos/machines/adele.nix similarity index 100% rename from nixos/machines/katboon.nix rename to nixos/machines/adele.nix From e905b105b79e3acf2abd404c6190be9d320510ec Mon Sep 17 00:00:00 2001 From: Kat Huang Date: Tue, 14 Jul 2020 12:13:34 -0700 Subject: [PATCH 5/7] [NixOS] Don't use NVIDIA drivers for adele --- nixos/machines/adele.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nixos/machines/adele.nix b/nixos/machines/adele.nix index fef906ea..c811d964 100644 --- a/nixos/machines/adele.nix +++ b/nixos/machines/adele.nix @@ -20,7 +20,6 @@ boot.loader.efi.canTouchEfiVariables = true; services.xserver.libinput.enable = true; - services.xserver.videoDrivers = [ "nvidia" ]; fileSystems."/" = { device = "/dev/disk/by-uuid/bfe4586b-2538-4aae-ad2f-b1277378de4a"; @@ -34,12 +33,9 @@ swapDevices = [ ]; - networking.hostName = "katboon"; + networking.hostName = "adele"; nix.maxJobs = lib.mkDefault 12; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.opengl.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ]; - hardware.opengl.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ]; - } From 90ff57dd93cdffdbbc45fd6d31f28ab092b4cac6 Mon Sep 17 00:00:00 2001 From: Kat Huang Date: Tue, 1 Dec 2020 22:34:34 -0800 Subject: [PATCH 6/7] [NixOS] Use latest kernel on adele --- nixos/machines/adele.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/machines/adele.nix b/nixos/machines/adele.nix index c811d964..f18fac28 100644 --- a/nixos/machines/adele.nix +++ b/nixos/machines/adele.nix @@ -12,6 +12,7 @@ system.stateVersion = "20.03"; boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.kernelPackages = pkgs.linuxPackages_latest; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; From b69847060eebb9341b87f3abf828dac029325bf3 Mon Sep 17 00:00:00 2001 From: Kat Huang Date: Tue, 1 Dec 2020 22:35:27 -0800 Subject: [PATCH 7/7] [NixOS] Enable redshift on adele --- nixos/machines/adele.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/machines/adele.nix b/nixos/machines/adele.nix index f18fac28..5596457f 100644 --- a/nixos/machines/adele.nix +++ b/nixos/machines/adele.nix @@ -39,4 +39,10 @@ nix.maxJobs = lib.mkDefault 12; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + services.redshift.enable = true; + + location = { + latitude = 37.8104601; + longitude = -122.2572529; + }; }