diff --git a/home/emacs/init.el b/home/emacs/init.el index 0deb395..4c660a6 100644 --- a/home/emacs/init.el +++ b/home/emacs/init.el @@ -11,6 +11,15 @@ (add-hook 'emacs-startup-hook #'chase/display-startup-time) +;; automatically create missing directories +;; source: https://emacsredux.com/blog/2022/06/12/auto-create-missing-directories/ +(defun er-auto-create-missing-dirs () + (let ((target-dir (file-name-directory buffer-file-name))) + (unless (file-exists-p target-dir) + (make-directory target-dir t)))) + +(add-to-list 'find-file-not-found-functions #'er-auto-create-missing-dirs) + ;; set repos and bootstrap use-package ;; (require 'package) @@ -396,7 +405,7 @@ (setq org-capture-templates '(("i" "Inbox" entry (file "gtd/inbox.org") "* TODO %?\n") - ("n" "Note" entry (file "~/org/inbox.org") + ("n" "Note" entry (file "gtd/inbox.org") "* %? :NOTE:\n"))) ;; TODO @@ -447,7 +456,8 @@ (use-package org-roam :after org :custom - (org-roam-directory "~/org/roam") + (org-roam-directory + (expand-file-name "roam/" org-directory)) :bind (("C-c n l" . org-roam-buffer-toggle) ("C-c n f" . org-roam-node-find) diff --git a/hosts/kuromi/configuration.nix b/hosts/kuromi/configuration.nix index d792a7f..7285cd6 100644 --- a/hosts/kuromi/configuration.nix +++ b/hosts/kuromi/configuration.nix @@ -1,17 +1,18 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, pkgs, ... }: - { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ../../nixos/desktop.nix - ]; + config, + pkgs, + ... +}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ../../nixos/desktop.nix + ]; networking.hostName = "kuromi"; - + system.stateVersion = "25.05"; } diff --git a/hosts/kuromi/hardware-configuration.nix b/hosts/kuromi/hardware-configuration.nix index 52ebffc..c462b2f 100644 --- a/hosts/kuromi/hardware-configuration.nix +++ b/hosts/kuromi/hardware-configuration.nix @@ -1,31 +1,35 @@ # 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, modulesPath, ... }: - { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; - fileSystems."/" = - { device = "/dev/disk/by-uuid/612f8704-c020-4188-85a7-27127e9b9ff2"; - fsType = "btrfs"; - options = [ "subvol=@" ]; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/612f8704-c020-4188-85a7-27127e9b9ff2"; + fsType = "btrfs"; + options = ["subvol=@"]; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/2211-57BE"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/2211-57BE"; + fsType = "vfat"; + options = ["fmask=0077" "dmask=0077"]; + }; - swapDevices = [ ]; + swapDevices = []; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's