chore: cleanup code

This commit is contained in:
Swarsel 2024-07-19 00:22:09 +02:00
parent 38b7687b5c
commit 9dc9a1fe1b
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
7 changed files with 1517 additions and 1621 deletions

File diff suppressed because it is too large Load diff

1068
index.html

File diff suppressed because it is too large Load diff

View file

@ -15,17 +15,23 @@
}; };
# Bootloader # Bootloader
boot.loader.grub.enable = true; boot.loader.grub = {
boot.loader.grub.device = "/dev/sda"; # TEMPLATE - if only one disk, this will work enable = true;
boot.loader.grub.useOSProber = true; device = "/dev/sda"; # TEMPLATE - if only one disk, this will work
useOSProber = true;
};
# -------------------------------------- # --------------------------------------
# you might need a configuration like this instead: # you might need a configuration like this instead:
# Bootloader # Bootloader
# boot.loader.grub.enable = true; # boot = {
# boot.loader.grub.devices = ["nodev" ]; # kernelPackages = pkgs.linuxPackages_latest;
# boot.loader.grub.useOSProber = true; # loader.grub = {
# boot.kernelPackages = pkgs.linuxPackages_latest; # enable = true;
# devices = ["nodev" ];
# useOSProber = true;
# };
# };
# -------------------------------------- # --------------------------------------
networking.hostName = "TEMPLATE"; # Define your hostname. networking.hostName = "TEMPLATE"; # Define your hostname.

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, fetchFromGitHub , ... }: { config, pkgs, fetchFromGitHub , ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -4,7 +4,6 @@ in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
# (unstable + "/nixos/modules/services/matrix/mautrix-signal.nix") # no longer needed; mautrix-signal was added to nixpkgs
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

File diff suppressed because it is too large Load diff

View file

@ -247,6 +247,27 @@ create a new one."
(python-shell-send-region (region-beginning) (region-end)) (python-shell-send-region (region-beginning) (region-end))
(python-shell-switch-to-shell)) (python-shell-switch-to-shell))
(defun swarsel/prefix-block (start end)
(interactive "r")
(save-excursion
(goto-char start)
(setq start (line-beginning-position))
(goto-char end)
(setq end (line-end-position))
(let ((common-prefix (save-excursion
(goto-char start)
(if (re-search-forward "^\\([^.\n]+\\)\\." end t)
(match-string 1)
(error "No common prefix found")))))
(save-excursion
(goto-char start)
(insert common-prefix " = {\n")
(goto-char (+ end (length common-prefix) 6))
(insert "};\n")
(goto-char start)
(while (re-search-forward (concat "^" (regexp-quote common-prefix) "\\.") end t)
(replace-match ""))))))
;; Make ESC quit prompts ;; Make ESC quit prompts
(global-set-key (kbd "<escape>") 'keyboard-escape-quit) (global-set-key (kbd "<escape>") 'keyboard-escape-quit)
@ -475,6 +496,9 @@ create a new one."
(set-face-attribute 'highlight-indent-guides-stack-even-face nil :background "gray40") (set-face-attribute 'highlight-indent-guides-stack-even-face nil :background "gray40")
(set-face-attribute 'highlight-indent-guides-stack-odd-face nil :background "gray50")) (set-face-attribute 'highlight-indent-guides-stack-odd-face nil :background "gray50"))
(use-package aggressive-indent)
(global-aggressive-indent-mode 1)
(setq mouse-wheel-scroll-amount (setq mouse-wheel-scroll-amount
'(1 '(1
((shift) . 5) ((shift) . 5)