From 718c3bff85d45e77dac34c6816e692ed438607a7 Mon Sep 17 00:00:00 2001 From: Daniel Ziltener Date: Mon, 20 Nov 2023 00:29:24 +0100 Subject: [PATCH] "." --- Makefile | 5 +- emacs/init.el | 63 +++++++++++------------- flake.lock | 18 +++---- home.nix | 131 +++++++++++++++++++++----------------------------- 4 files changed, 97 insertions(+), 120 deletions(-) diff --git a/Makefile b/Makefile index c1a439e..fba5d4f 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,9 @@ disko: disko-config.nix --mode disko \ ./disko-config.nix +build-iso: iso.nix + nix-build '' -A config.system.build.isoImage -I nixos-config=iso.nix + install-system: configuration.nix sed -i "s|.*DEVICE_HOSTNAME| networking.hostName = \"$(HOST)\"; # DEVICE_HOSTNAME|g" configuration.nix nixos-generate-config --no-filesystems --root /mnt @@ -27,6 +30,6 @@ install-system: configuration.nix nixos-install install: - env NIXPKGS_ALLOW_BROKEN=1 nixos-rebuild switch --flake . --impure + env NIXPKGS_ALLOW_BROKEN=1 nixos-rebuild switch --flake . --impure --show-trace # end diff --git a/emacs/init.el b/emacs/init.el index 04cdb32..f55df49 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -305,55 +305,48 @@ ("g;" . 'goto-last-change-reverse))) ;;;; Lisp Navigation and Editing +;;;;; Helper Functions +(defun cc/move-sexp-backward () + "Move balanced expression (sexp) to the right of point backward one sexp. +Point must be at the beginning of balanced expression (sexp)." + (interactive) + (transpose-sexps 1) + (forward-sexp -2)) + +(defun cc/move-sexp-forward () + "Move balanced expression (sexp) to the right of point forward one sexp. +Point must be at the beginning of balanced expression (sexp)." + (interactive) + (forward-sexp 1) + (transpose-sexps 1) + (forward-sexp -1)) + ;;;;; Basic (use-package smartparens :hook (smartparens-mode . show-smartparens-mode) (smartparens-mode . smartparens-strict-mode) + clojure-ts-mode + emacs-lisp-mode + scheme-mode :config (evil-define-key 'insert smartparens-mode-map (kbd "r") (conditional-keybind (lambda () (looking-at "(")) #'sp-raise-sexp) + (kbd "w") (conditional-keybind (lambda () (looking-at "(")) + #'cc/move-sexp-backward) + (kbd "s") (conditional-keybind (lambda () (looking-at "(")) + #'cc/move-sexp-forward) + (kbd "c") (conditional-keybind (lambda () (looking-at "(")) + #'sp-clone-sexp) (kbd ">") (conditional-keybind (lambda () (thing-at-point-looking-at ")")) - #'sp-forward-slurp-sexp))) + #'sp-forward-slurp-sexp) + (kbd "<") (conditional-keybind (lambda () (thing-at-point-looking-at ")")) + #'sp-backward-slurp-sexp))) (use-package evil-cleverparens :after smartparens :hook smartparens) -;; (use-package lispy -;; :custom -;; (lispy-close-quotes-at-end-p t) -;; (lispy-compat '("cider" "edebug" "magit-blame-mode")) -;; (lispy-visit-method #'consult-find) -;; (lispy-occur-backend #'consult-line) -;; :hook -;; emacs-lisp-mode -;; scheme-mode -;; :config -;; (evil-define-key 'insert 'clojure-ts-mode-map -;; "(" #'lispy-parens -;; "{" #'lispy-braces -;; "}" #'lispy-brackets -;; ")" #'lispy-right-nostring -;; "\"" #'lispy-quotes -;; (kbd "") #'lispy-delete-backward -;; ">" #'special-lispy-slurp -;; "<" #'special-lispy-barf -;; "c" #'special-lispy-clone -;; "q" #'special-lispy-ace-paren -;; "w" #'special-lispy-move-up -;; "s" #'special-lispy-move-down -;; "r" #'special-lispy-raise -;; "e" #'special-lispy-eval)) - -;; (use-package lispyville -;; :bind -;; (:map evil-normal-state-map -;; ("," . 'lispyville-comment-or-uncomment) -;; ("." . 'lispyville-comment-and-clone-dwim) -;; ("ci" . 'lispyville-comment-or-uncomment-line)) -;; :hook -;; (lispy-mode . lispyville-mode)) ;;;;; Visual Aid ;; (use-package rainbow-delimiters diff --git a/flake.lock b/flake.lock index 16f2b41..cdfac44 100644 --- a/flake.lock +++ b/flake.lock @@ -27,11 +27,11 @@ ] }, "locked": { - "lastModified": 1700261679, - "narHash": "sha256-jpQq/rJnjhkUHXz/KOQxk6fSfF7H0vV9PjFvfgTFHG8=", + "lastModified": 1700419052, + "narHash": "sha256-U6a5f9ynbzcp8PMIHULbHPkbwp7YfPKOYmTcLqlalD4=", "owner": "nix-community", "repo": "home-manager", - "rev": "3feeb7715584fd45ed1389cec8fb15f6930e8dab", + "rev": "993fb02d20760067b8ee19c713d94cee07037759", "type": "github" }, "original": { @@ -50,11 +50,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1700259892, - "narHash": "sha256-y8yf3HnOghCcruknda0htkZNFe2SE3dIE34mFJ/3nd0=", + "lastModified": 1700397206, + "narHash": "sha256-ityVJcy3I/E8soXctwWveg58+cXOSQXhDIcU6YR2gjI=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "395985f81533417d74e1168ac7ea7a9a84c81d21", + "rev": "646f4bc63861e03b01fed3833bb65d1d014e1bf3", "type": "github" }, "original": { @@ -138,11 +138,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1699963925, - "narHash": "sha256-LE7OV/SwkIBsCpAlIPiFhch/J+jBDGEZjNfdnzCnCrY=", + "lastModified": 1700204040, + "narHash": "sha256-xSVcS5HBYnD3LTer7Y2K8ZQCDCXMa3QUD1MzRjHzuhI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bf744fe90419885eefced41b3e5ae442d732712d", + "rev": "c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad", "type": "github" }, "original": { diff --git a/home.nix b/home.nix index 9a505f3..d929f78 100644 --- a/home.nix +++ b/home.nix @@ -74,8 +74,10 @@ args@{ config, pkgs, hyprland, split-monitor-workspaces, flatpaks, ... }: zoom-us ]; - imports = [ ./hyprland/hyprland.nix ./waybar/settings.nix ./emacs/emacs.nix - ./chicken/chicken.nix ]; + imports = [ ./hyprland/hyprland.nix + ./waybar/settings.nix + ./emacs/emacs.nix + ./chicken/chicken.nix ]; home.stateVersion = "23.11"; programs.home-manager.enable = true; @@ -97,49 +99,49 @@ args@{ config, pkgs, hyprland, split-monitor-workspaces, flatpaks, ... }: }; accounts = { - calendar = { - basePath = "${config.home.homeDirectory}/calendars"; - accounts = { - nextcloud = { - primary = true; - remote = { - type = "caldav"; - url = "https://nextcloud.lyrion.ch/remote.php/dav/calendars/zilti"; - userName = "dziltener@lyrion.ch"; - passwordCommand = [ "pass" "Privat/Nextcloud" ]; - }; - vdirsyncer = { - enable = true; - auth = "guess"; - itemTypes = "caldav"; - }; - khal = { - enable = true; - type = "discover"; - }; - }; - }; - }; - contact = { - basePath = "${config.home.homeDirectory}/contacts"; - accounts = { - nextcloud = { - remote = { - type = "carddav"; - url = - "https://nextcloud.lyrion.ch/rempte.php/dav/addressbooks/users/zilti"; - userName = "dziltener@lyrion.ch"; - passwordCommand = [ "pass" "Privat/Nextcloud" ]; - }; - vdirsyncer = { - enable = false; - auth = "digest"; - }; - khal = { enable = true; }; - khard = { enable = true; }; - }; - }; - }; + # calendar = { + # basePath = "${config.home.homeDirectory}/calendars"; + # accounts = { + # nextcloud = { + # primary = true; + # remote = { + # type = "caldav"; + # url = "https://nextcloud.lyrion.ch/remote.php/dav/calendars/zilti"; + # userName = "dziltener@lyrion.ch"; + # passwordCommand = [ "pass" "Privat/Nextcloud" ]; + # }; + # vdirsyncer = { + # enable = false; + # auth = "guess"; + # itemTypes = "caldav"; + # }; + # khal = { + # enable = true; + # type = "discover"; + # }; + # }; + # }; + # }; + # contact = { + # basePath = "${config.home.homeDirectory}/contacts"; + # accounts = { + # nextcloud = { + # remote = { + # type = "carddav"; + # url = + # "https://nextcloud.lyrion.ch/rempte.php/dav/addressbooks/users/zilti"; + # userName = "dziltener@lyrion.ch"; + # passwordCommand = [ "pass" "Privat/Nextcloud" ]; + # }; + # vdirsyncer = { + # enable = false; + # auth = "digest"; + # }; + # khal = { enable = true; }; + # khard = { enable = true; }; + # }; + # }; + # }; email = { accounts = { LMail = { @@ -260,18 +262,8 @@ args@{ config, pkgs, hyprland, split-monitor-workspaces, flatpaks, ... }: programs.gpg = { enable = true; }; - # services.gpg-agent = { - # enable = true; - # pinentryFlavor = "qt"; - # extraConfig = '' - # allow-emacs-pinentry - # allow-loopback-pinentry - # ''; - # }; - - home.file.gpg-agent-conf = { + home.file.".gnupg/gpg-agent.conf" = { enable = true; - target = ".gnupg/gpg-agent.conf"; text = '' grab pinentry-program ${pkgs.pinentry-qt}/bin/pinentry-qt @@ -357,8 +349,6 @@ args@{ config, pkgs, hyprland, split-monitor-workspaces, flatpaks, ... }: # enable = true; # }; - services.vdirsyncer = { enable = true; }; - # programs.khal = { # enable = true; # }; @@ -367,10 +357,10 @@ args@{ config, pkgs, hyprland, split-monitor-workspaces, flatpaks, ... }: # enable = true; # }; - programs.aerc = { - enable = true; - extraConfig = { general = { unsafe-accounts-conf = true; }; }; - }; + # programs.aerc = { + # enable = true; + # extraConfig = { general = { unsafe-accounts-conf = true; }; }; + # }; services.kdeconnect = { enable = true; @@ -396,8 +386,6 @@ args@{ config, pkgs, hyprland, split-monitor-workspaces, flatpaks, ... }: }; }; - # services.ssh-agent.enable = true; - services.nextcloud-client = { enable = true; startInBackground = true; @@ -440,13 +428,6 @@ args@{ config, pkgs, hyprland, split-monitor-workspaces, flatpaks, ... }: }; }; - # programs.waybar = { - # enable = true; - # systemd.enable = true; - # style = builtins.readFile ./waybar/style.css; - # settings = import ./waybar/settings.nix; - # }; - programs.wlogout = { enable = true; }; programs.fuzzel = { @@ -481,10 +462,10 @@ args@{ config, pkgs, hyprland, split-monitor-workspaces, flatpaks, ... }: } + /catppuccin-latte)); }; - qt = { - enable = true; - style.name = "breeze"; - }; + # qt = { + # enable = true; + # style.name = "breeze"; + # }; programs.firefox = { enable = true;