Browse Source

Update nvidia driver, create dotfiles/theme method

main
parent
commit
3df6521b05
Signed by: chris GPG Key ID: 3025DCBD46F81C0F
  1. 29
      README.org
  2. 12
      modules/nvidia.nix

29
README.org

@ -1236,6 +1236,9 @@ in {
Option "TripleBuffer" "on"
'';
# Fix graphical corruption on suspend.
hardware.nvidia.powerManagement.enable = true;
# Configure `offload-mode'.
hardware.nvidia.prime = {
offload.enable = true;
@ -1255,6 +1258,15 @@ in {
];
};
# Create an external display setup.
specialisation = {
external-display.configuration = {
system.nixos.tags = [ "external-display" ];
hardware.nvidia.prime.offload.enable = lib.mkForce false;
hardware.nvidia.powerManagement.enable = lib.mkForce false;
};
};
# Add user to video group.
users.users.chris = {
extraGroups = [ "video" ];
@ -2970,6 +2982,23 @@ epkgs.doom-themes
(load-theme 'doom-nord t)
(doom-modeline-mode +1)
;; Define a method for returning information about the current theme.
;; This is based off the function `org-roam-ui-get-theme'.
(defun dotfiles/theme ()
"Return information about the current theme."
(list `(bg . ,(face-background hl-line-face))
`(bg-alt . ,(face-background 'default))
`(fg . ,(face-foreground 'default))
`(fg-alt . ,(face-foreground font-lock-comment-face))
`(red . ,(face-foreground 'error))
`(orange . ,(face-foreground 'warning))
`(yellow . ,(face-foreground font-lock-builtin-face))
`(green . ,(face-foreground 'success))
`(cyan . ,(face-foreground font-lock-constant-face))
`(blue . ,(face-foreground font-lock-keyword-face))
`(violet . ,(face-foreground font-lock-constant-face))
`(magenta . ,(face-foreground font-lock-preprocessor-face))))
;; Load a new theme with <SPC> t t.
(dotfiles/leader
"tt" '(counsel-load-theme :which-key "Theme"))

12
modules/nvidia.nix

@ -31,6 +31,9 @@ in {
Option "TripleBuffer" "on"
'';
# Fix graphical corruption on suspend.
hardware.nvidia.powerManagement.enable = true;
# Configure `offload-mode'.
hardware.nvidia.prime = {
offload.enable = true;
@ -50,6 +53,15 @@ in {
];
};
# Create an external display setup.
specialisation = {
external-display.configuration = {
system.nixos.tags = [ "external-display" ];
hardware.nvidia.prime.offload.enable = lib.mkForce false;
hardware.nvidia.powerManagement.enable = lib.mkForce false;
};
};
# Add user to video group.
users.users.chris = {
extraGroups = [ "video" ];

Loading…
Cancel
Save