Compare commits
22 commits
28e99df608
...
e7ab8483ce
Author | SHA1 | Date | |
---|---|---|---|
e7ab8483ce | |||
b30e0740ae | |||
d74ce15b9b | |||
08083a7bc7 | |||
6ff1d74b7b | |||
25b8b4ff5b | |||
919825f721 | |||
469f9e2b35 | |||
dd9108be8b | |||
86d99c9095 | |||
34b5e5f21b | |||
a5abfc14fc | |||
1581f450d2 | |||
2e45caeed8 | |||
84cdade10e | |||
469868a5f2 | |||
c5a83f0943 | |||
06ec14e84f | |||
604bd6bd66 | |||
1bf4712e21 | |||
e79c591a42 | |||
1faadca3d5 |
16 changed files with 171 additions and 215 deletions
84
flake.lock
84
flake.lock
|
@ -54,11 +54,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714980683,
|
||||
"narHash": "sha256-+1/Hyq4PHEM8CX7TsSaUiODsv82IYjfu0wFZ+J9H0hU=",
|
||||
"lastModified": 1715820685,
|
||||
"narHash": "sha256-FiqOiHmr4a9IIWjbDd88Lt6Do78TKEbMbNYPlyBcfSY=",
|
||||
"owner": "atuinsh",
|
||||
"repo": "atuin",
|
||||
"rev": "eebfd048797d2faffd0a9c6633580c5e3077d688",
|
||||
"rev": "2e35af1c86dc3ddb02dbababf909c7f5248368c3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -195,11 +195,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714959124,
|
||||
"narHash": "sha256-oYmauPDpSgWjY9hvzwd815igGfP8Ds5Bk6bTo5JrBRk=",
|
||||
"lastModified": 1715822638,
|
||||
"narHash": "sha256-Z4ZoyK8jYRmBZwMaEZLEmAilrfdpekwwwohliqC14/E=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "e1b3ae2b4ebc3c7b83154b9361e3d154e64e362d",
|
||||
"rev": "476eef8d85aa09389ae7baf6e6b60357f6a01432",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -219,11 +219,11 @@
|
|||
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714960145,
|
||||
"narHash": "sha256-BlGVcAhjkPqTAbUlGjs0PVYYY54AGEq2kwiL97VwOZ8=",
|
||||
"lastModified": 1715850300,
|
||||
"narHash": "sha256-cmwhFzasd7P09YU798FSlLkLCCbHAeu9x2kut7gPDAU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "03e77b28d0e617a9961762986a9645e8fd21a8d2",
|
||||
"rev": "799871438560ec035b58b44199971a8ac13037d0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -243,11 +243,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714904084,
|
||||
"narHash": "sha256-12ywI/J3YCvZz6BlcW7OEMVwFT5qwLW5VLYPzKyA7s0=",
|
||||
"lastModified": 1714997157,
|
||||
"narHash": "sha256-deabn4fdNmJsDxkT6bgCbwB354sUHvkuq+DcdWBU6B8=",
|
||||
"owner": "elkowar",
|
||||
"repo": "eww",
|
||||
"rev": "a4da192d629cc43ef3da984b6f9197579a22afe1",
|
||||
"rev": "d1fde927d2799211f791e7ea01cffb667c4f2b60",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -563,11 +563,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714976273,
|
||||
"narHash": "sha256-IbYND3kbkN/GmV8pK8mglViHbdUgIJ1H48HiRPq2w3E=",
|
||||
"lastModified": 1715486357,
|
||||
"narHash": "sha256-4pRuzsHZOW5W4CsXI9uhKtiJeQSUoe1d2M9mWU98HC4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "2b87a11125f988a9f67ee63eeaa3682bc841d9b5",
|
||||
"rev": "44677a1c96810a8e8c4ffaeaad10c842402647c1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -587,11 +587,11 @@
|
|||
"spectrum": "spectrum"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714764302,
|
||||
"narHash": "sha256-MmIZR67wOP3Nr9b3XpsvHSZSTDcTmd9cQn2Z8pW1/Hw=",
|
||||
"lastModified": 1715787097,
|
||||
"narHash": "sha256-TPp2j0ttvBvkk4oXidvo8Y071zEab0BtcNsC3ZEkluI=",
|
||||
"owner": "astro",
|
||||
"repo": "microvm.nix",
|
||||
"rev": "e9977efbe34b554c3e393dc9a18509905a4080e5",
|
||||
"rev": "fa673bf8656fe6f28253b83971a36999bc9995d2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -655,11 +655,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714906042,
|
||||
"narHash": "sha256-nAxkLyytuPCqAuQfgxygtyECuKv+YUSlpfstawwF7vk=",
|
||||
"lastModified": 1714987925,
|
||||
"narHash": "sha256-8gG1yIsha3bOUNs2cyOrC1I2E30G3R7bGoHsGO5bhkY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-ld-rs",
|
||||
"rev": "0b9c80d1f1a210eaf7ad5b066172801f3d0eda24",
|
||||
"rev": "57342044b03b7faa4c949d492c80527ad693194c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -670,11 +670,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1714979072,
|
||||
"narHash": "sha256-OfShHRR4QmVwEof1EWuZUygw/SFnmxfHogtCKc4vNRM=",
|
||||
"lastModified": 1715148395,
|
||||
"narHash": "sha256-lRxjTxY3103LGMjWdVqntKZHhlmMX12QUjeFrQMmGaE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "8a4adfe48b68b50ef62e9a299898093436269b6d",
|
||||
"rev": "a4e2b7909fc1bdf30c30ef21d388fde0b5cdde4a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -729,11 +729,11 @@
|
|||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1714782413,
|
||||
"narHash": "sha256-tbg0MEuKaPcUrnmGCu4xiY5F+7LW2+ECPKVAJd2HLwM=",
|
||||
"lastModified": 1715668745,
|
||||
"narHash": "sha256-xp62OkRkbUDNUc6VSqH02jB0FbOS+MsfMb7wL1RJOfA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "651b4702e27a388f0f18e1b970534162dec09aff",
|
||||
"rev": "9ddcaffecdf098822d944d4147dd8da30b4e6843",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -761,11 +761,11 @@
|
|||
},
|
||||
"nixpkgs-stable_4": {
|
||||
"locked": {
|
||||
"lastModified": 1714858427,
|
||||
"narHash": "sha256-tCxeDP4C1pWe2rYY3IIhdA40Ujz32Ufd4tcrHPSKx2M=",
|
||||
"lastModified": 1715458492,
|
||||
"narHash": "sha256-q0OFeZqKQaik2U8wwGDsELEkgoZMK7gvfF6tTXkpsqE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b980b91038fc4b09067ef97bbe5ad07eecca1e76",
|
||||
"rev": "8e47858badee5594292921c2668c11004c3b0142",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -777,11 +777,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1714906307,
|
||||
"narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=",
|
||||
"lastModified": 1715787315,
|
||||
"narHash": "sha256-cYApT0NXJfqBkKcci7D9Kr4CBYZKOQKDYA23q8XNuWg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588",
|
||||
"rev": "33d1e753c82ffc557b4a585c77de43d4c922ebb5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -832,11 +832,11 @@
|
|||
"nixpkgs-stable": "nixpkgs-stable_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714478972,
|
||||
"narHash": "sha256-q//cgb52vv81uOuwz1LaXElp3XAe1TqrABXODAEF6Sk=",
|
||||
"lastModified": 1715850717,
|
||||
"narHash": "sha256-HGY8w2Glb5xe4/l69Auv6R1kxbAQehB1vWFGnvzvSR8=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "2849da033884f54822af194400f8dff435ada242",
|
||||
"rev": "963646978438e31c0925e16c4eca089fda69bac2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -908,11 +908,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714961776,
|
||||
"narHash": "sha256-LiIxWRKbm1DZ+7l1a6FMmIO8leQx5yrRLIApCMai1DY=",
|
||||
"lastModified": 1715825775,
|
||||
"narHash": "sha256-7np2/EEr5Xm8IuKWQ43q8AA1Lb6Us2BW6rYMxGrInIg=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "f3b20ea4131408ea585bddb1f41f91c4de9499cf",
|
||||
"rev": "55f468b3d49c5d3321e85f2f9b1158476a2a90fb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -929,11 +929,11 @@
|
|||
"nixpkgs-stable": "nixpkgs-stable_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714878026,
|
||||
"narHash": "sha256-YJ1k/jyd6vKqmVgGkkAb4n+ZfPPAt8+L5a73eAThqFU=",
|
||||
"lastModified": 1715482972,
|
||||
"narHash": "sha256-y1uMzXNlrVOWYj1YNcsGYLm4TOC2aJrwoUY1NjQs9fM=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "10dc39496d5b027912038bde8d68c836576ad0bc",
|
||||
"rev": "b6cb5de2ce57acb10ecdaaf9bbd62a5ff24fa02e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -295,6 +295,7 @@
|
|||
config.packages.git-repo-go
|
||||
inputs'.colmena.packages.colmena
|
||||
just
|
||||
libxkbcommon
|
||||
lswt
|
||||
multimarkdown
|
||||
nix-diff
|
||||
|
|
|
@ -133,34 +133,6 @@ By default packages should always be installed from the package manager. This is
|
|||
(setq use-package-always-ensure t)
|
||||
#+end_src
|
||||
|
||||
** Bootstrap straight.el and use-package [DISABLED]
|
||||
|
||||
[[https://github.com/radian-software/straight.el][straight.el]] is a pure functional package manager and installs packages from git instead of downloading tars
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(defvar bootstrap-version)
|
||||
;; Workaround for flycheck. See https://github.com/radian-software/straight.el/issues/508 for more info
|
||||
(setq straight-fix-flycheck t)
|
||||
(let ((bootstrap-file
|
||||
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
||||
(bootstrap-version 6))
|
||||
(unless (file-exists-p bootstrap-file)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
|
||||
'silent 'inhibit-cookies)
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
(load bootstrap-file nil 'nomessage))
|
||||
#+end_src
|
||||
|
||||
Install =use-package= and make it use =straight.el= by default.
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(straight-use-package 'use-package)
|
||||
(setq straight-use-package-by-default t)
|
||||
#+end_src
|
||||
|
||||
** general.el
|
||||
|
||||
[[https://github.com/noctuid/general.el][general.el]] provides a more convenient way for binding keys in emacs. It also integrates with =use-package= with the =:general= keyword.
|
||||
|
@ -180,27 +152,6 @@ Install =use-package= and make it use =straight.el= by default.
|
|||
|
||||
#+end_src
|
||||
|
||||
** Setup asdf [DISABLED]
|
||||
|
||||
[[https://asdf-vm.com][asdf]] is a tool to install and use multiple versions of development tools and programming languages.
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(when (executable-find "asdf")
|
||||
(use-package asdf-vm
|
||||
:straight (:host github :repo "delonnewman/asdf-vm.el")
|
||||
;; :load-path "~/.config/emacs/elisp/asdf-vm.el/"
|
||||
:config
|
||||
(asdf-vm-init)))
|
||||
#+end_src
|
||||
|
||||
** Set custom settings to load in temp file [DISABLED]
|
||||
|
||||
Setting =custom-file= stops emacs from adding customised settings to =init.el=. I prefer to specify everything in this file, so this creates a temporary file where the customisations are stored. This effectively localises customisations to a session
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(setq custom-file (make-temp-file "emacs-custom"))
|
||||
#+end_src
|
||||
|
||||
** Disable the customize interface
|
||||
|
||||
The =customize= functionality is annoying and messes up regularly. Stuff it has done so far:
|
||||
|
@ -987,6 +938,15 @@ Show inline git-blame with [[https://github.com/Artawower/blamer.el][blamer.el]]
|
|||
(global-flycheck-mode))
|
||||
#+end_src
|
||||
|
||||
Add eglot support for flycheck-mode
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package flycheck-eglot
|
||||
:after (flycheck eglot)
|
||||
:config
|
||||
(global-flycheck-eglot-mode 1))
|
||||
#+end_src
|
||||
|
||||
*** Tree-sitter
|
||||
|
||||
[[https://tree-sitter.github.io/][tree-sitter]] is a new development in parsing and syntax highlighting. It has been merged into Emacs 29, but until that's released we're using the [[https://emacs-tree-sitter.github.io/][emacs-tree-sitter]] package while on Emacs 28.
|
||||
|
@ -1016,99 +976,6 @@ Automatically use the =<lang>-ts-mode= when it is available
|
|||
(global-treesit-auto-mode))
|
||||
#+end_src
|
||||
|
||||
*** lsp-mode
|
||||
|
||||
[[https://emacs-lsp.github.io/lsp-mode][lsp-mode]] adds Language Server Protocol support to emacs.
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(use-package lsp-mode
|
||||
:init
|
||||
(setq lsp-keymap-prefix "C-c l"
|
||||
lsp-use-plists nil)
|
||||
(defun eb/lsp-mode-setup-completion ()
|
||||
(setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults))
|
||||
'(orderless)))
|
||||
:hook ((conf-toml-mode
|
||||
python-mode
|
||||
sh-mode) . lsp-deferred)
|
||||
(lsp-mode . lsp-enable-which-key-integration)
|
||||
(lsp-completion-mode . eb/lsp-mode-setup-completion)
|
||||
:commands
|
||||
(lsp lsp-deferred)
|
||||
:custom
|
||||
(lsp-completion-provider :none) ;; I'm using corfu
|
||||
:config
|
||||
(setq lsp-typescript-surveys-enabled nil
|
||||
lsp-completion-enable t
|
||||
lsp-enable-suggest-server-download nil))
|
||||
#+end_src
|
||||
|
||||
[[https://emacs-lsp.github.io/lsp-ui/][lsp-ui]] provides higher level UI elements for =lsp-mode=, like code lenses and flycheck support.
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(use-package lsp-ui
|
||||
:ghook 'lsp-mode-hook
|
||||
:config
|
||||
(setq lsp-ui-doc-enable t
|
||||
lsp-ui-peek-enable t
|
||||
lsp-ui-sideline-enable t
|
||||
lsp-ui-imenu-enable t)
|
||||
:custom
|
||||
(lsp-ui-doc-position 'bottom))
|
||||
#+end_src
|
||||
|
||||
[[https://github.com/emacs-lsp/lsp-ivy][lsp-ivy]] integrates =ivy= into =lsp-mode=
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(use-package lsp-ivy
|
||||
:commands lsp-ivy-workspace-symbol)
|
||||
#+end_src
|
||||
|
||||
[[https://github.com/gagbo/consult-lsp][consult-lsp]] integrates =consult= into =lsp-mode=
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(use-package consult-lsp)
|
||||
#+end_src
|
||||
|
||||
[[https://github.com/emacs-lsp/lsp-treemacs][lsp-treemacs]] provides an integration between =lsp-mode= and [[https://github.com/Alexander-Miller/treemacs][treemacs]].
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(use-package lsp-treemacs
|
||||
:commands lsp-treemacs-errors-list)
|
||||
#+end_src
|
||||
|
||||
*** dap-mode
|
||||
|
||||
[[http://emacs-lsp.github.io/dap-mode][dap-mode]] provides debugging facilities using the [[https://microsoft.github.io/debug-adapter-protocol/][Debug Adapter Protocol]]
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(use-package dap-mode
|
||||
:defer t
|
||||
:custom
|
||||
(dap-auto-configure-mode t)
|
||||
(dap-auto-configure-features '(sessions locals breakpoints expressions tooltip))
|
||||
:config
|
||||
(require 'dap-lldb)
|
||||
(require 'dap-cpptools)
|
||||
(setq dap-lldb-debugged-program-function (lambda () (read-file-name "Select program executable to debug")))
|
||||
|
||||
(dap-register-debug-template "C++ LLDB"
|
||||
(list :type "lldb-vscode"
|
||||
:dap-server-path (executable-find "lldb-vscode")
|
||||
:cwd nil
|
||||
:args nil
|
||||
:request "launch"
|
||||
:program nil))
|
||||
(defun dap-debug-create-or-edit-json-template ()
|
||||
"Edit C++ debugging configuration or create and edit if none exists"
|
||||
(interactive)
|
||||
(let ((filename (concat (lsp-workspace-root) "/launch.json"))
|
||||
(default (concat user-emacs-directory "/default-launch.json")))
|
||||
(unless (file-exists-p filename)
|
||||
(copy-file default filename))
|
||||
(find-file-existing filename))))
|
||||
#+end_src
|
||||
|
||||
*** eglot
|
||||
|
||||
[[https://joaotavora.github.io/eglot/][eglot]] is an alternative to =lsp-mode= that is builtin with emacs >= 29
|
||||
|
|
|
@ -20,6 +20,7 @@ let
|
|||
"browser.tabs.crashReporting.sendReport" = false;
|
||||
"browser.translations.enable" = false;
|
||||
"browser.urlbar.trimURLs" = false;
|
||||
"dom.event.contextmenu.enabled" = false;
|
||||
"devtools.theme" = "dark";
|
||||
"experiments.activeExperiment" = false;
|
||||
"experiments.enabled" = false;
|
||||
|
|
|
@ -89,7 +89,8 @@ in
|
|||
hide-cursor = "when-typing enabled";
|
||||
set-cursor-warp = "on-output-change";
|
||||
|
||||
keyboard-layout-file = toString ./keyboard-layout;
|
||||
# keyboard-layout-file = toString ./keyboard-layout;
|
||||
keyboard-layout = "-variant kyria us";
|
||||
|
||||
map = {
|
||||
normal =
|
||||
|
@ -119,7 +120,7 @@ in
|
|||
"${mod} t" = "toggle-fullscreen";
|
||||
|
||||
# Scratchpad
|
||||
"${mod}+Shift minus" = "toggle-view-tags ${toString (bit 20)}";
|
||||
"${mod}+Shift minus" = "set-view-tags ${toString (bit 20)}";
|
||||
"${mod} minus" = "toggle-focused-tags ${toString (bit 20)}";
|
||||
|
||||
"${mod} Print" = "spawn '${pkgs.grim}/bin/grim'";
|
||||
|
@ -210,8 +211,12 @@ in
|
|||
};
|
||||
|
||||
extraConfig = ''
|
||||
${cfg.package}/bin/rivertile -view-padding 10 -outer-padding 5 &
|
||||
${cfg.package}/bin/rivertile -view-padding 5 -outer-padding 5 &
|
||||
'';
|
||||
};
|
||||
|
||||
home.file.".xkb/symbols/us" = {
|
||||
source = ./keyboard-layout.xkb;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
// mode: c-ts-mode
|
||||
|
||||
default partial alphanumeric_keys;
|
||||
|
||||
xkb_symbols "basic" {
|
||||
include "us(altgr-intl)";
|
||||
include "eurosign(5)";
|
||||
name[Group1] = "English (US, international with AltGr and Euro sign)";
|
||||
};
|
4
home-manager/modules/river/keyboard-layout.xkb
Normal file
4
home-manager/modules/river/keyboard-layout.xkb
Normal file
|
@ -0,0 +1,4 @@
|
|||
xkb_symbols "kyria" {
|
||||
include "us(altgr-intl)"
|
||||
include "eurosign(5)"
|
||||
};
|
|
@ -87,6 +87,7 @@ in
|
|||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
package = cfg.package;
|
||||
checkConfig = false; # Why is this even here?
|
||||
|
||||
config = {
|
||||
modifier = mod;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
groups = {
|
||||
default = [ "127.0.0.1:5335" ];
|
||||
"100.64.0.0/10" = [ "127.0.0.1:5454" ];
|
||||
"fd7a:115c:a1e0::/96" = [ "127.0.0.1:5454" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -29,7 +30,6 @@
|
|||
|
||||
customDNS = {
|
||||
mapping = {
|
||||
"ci.datarift.nl" = "10.0.0.251";
|
||||
"home.datarift.nl" = "10.0.0.251";
|
||||
"frigate.datarift.nl" = "10.0.0.251";
|
||||
"git.datarift.nl" = "10.0.0.203";
|
||||
|
@ -39,7 +39,6 @@
|
|||
"mqtt.datarift.nl" = "10.0.0.254";
|
||||
"nix-cache.datarift.nl" = "10.0.0.209";
|
||||
"saga.datarift.nl" = "10.0.0.251";
|
||||
"track.datarift.nl" = "10.0.0.254";
|
||||
"vidz.datarift.nl" = "10.0.0.211";
|
||||
|
||||
# Horus
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
./blocky
|
||||
./coredns
|
||||
./kea
|
||||
./promtail
|
||||
./unbound
|
||||
];
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
version = "750df081a3cc63f325ecfde6c30a974dc0e4bf56";
|
||||
}
|
||||
];
|
||||
vendorHash = "sha256-tuHr5oYmx3HNmsO6ZOO14vORArk8YHZBsodCiydf6k8=";
|
||||
vendorHash = "sha256-X4PSkXURIJxt7ouf5jQ7j3kJegsPsk8cqXEt6kyVnVY=";
|
||||
};
|
||||
|
||||
config = ''
|
||||
|
|
67
machines/valkyrie/promtail/default.nix
Normal file
67
machines/valkyrie/promtail/default.nix
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
services.promtail = {
|
||||
enable = true;
|
||||
configuration = {
|
||||
clients = [ { url = "http://saga:3100/loki/api/v1/push"; } ];
|
||||
positions = {
|
||||
filename = "/tmp/positions.yaml";
|
||||
};
|
||||
|
||||
scrape_configs = [
|
||||
{
|
||||
job_name = "journal";
|
||||
journal = {
|
||||
labels = {
|
||||
host = "valkyrie";
|
||||
job = "systemd-journal";
|
||||
};
|
||||
max_age = "24h";
|
||||
};
|
||||
relabel_configs = [
|
||||
{
|
||||
source_labels = [ "__journal__systemd_unit" ];
|
||||
target_label = "unit";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "unbound";
|
||||
static_configs = [
|
||||
{
|
||||
labels = {
|
||||
job = "unbound";
|
||||
__path__ = "/var/lib/unbound/unbound.log";
|
||||
};
|
||||
}
|
||||
];
|
||||
pipeline_stages = [
|
||||
{ labeldrop = [ "filename" ]; }
|
||||
{
|
||||
match = {
|
||||
selector = ''{job="unbound"} |~ " start | stopped |.*in-addr.arpa."'';
|
||||
action = "drop";
|
||||
};
|
||||
}
|
||||
{
|
||||
match = {
|
||||
selector = ''{job="unbound"} |= "reply:"'';
|
||||
stages = [ { static_labels.dns = "reply"; } ];
|
||||
};
|
||||
}
|
||||
{
|
||||
match = {
|
||||
selector = ''{job="unbound"} |~ "redirect |always_null|always_nxdomain"'';
|
||||
stages = [ { static_labels.dns = "block"; } ];
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
server = {
|
||||
grpc_listen_port = 0;
|
||||
http_listen_port = 28183;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
coredns-env: ENC[AES256_GCM,data:1tkYhD2VHExWMt2y3G/eSkP5aISkPgqY5soNE6nNfCiewVWYBATqvs/GyBVM6GyXBYudl1myYU11MHheQ3w2T2kRj8PDDr31Ygs=,iv:1JeXTP8OYP990U8ctbZFxmjt92AxKoHLBmdC6P/osV4=,tag:+pN8MrjQTgkcStfwnlSU6A==,type:str]
|
||||
coredns-env: ENC[AES256_GCM,data:RIudDPucGYo1UXMnzR8Xwz+X4WKEXVTvhv6teiPFgQYdJuh3anV3tDisi1ouTschu4OgNUgrqxQvPJh2D4z3Io4yFepTmRuZ7SE=,iv:Zwgz2CDtpqZV6VQPn7lxCJT+1VbekP9YZJ3Gp3NMJKs=,tag:zT+YuThW0UMguDEL1aUqwA==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
|
@ -32,8 +32,8 @@ sops:
|
|||
MmRsQU43UDUyQ2ZVbWxvRWdBajYwWlEKDNaV/6gjIszP31b8kT+JZxiTWILqbQdR
|
||||
OKdTbC3XIiFBGpslr5QKJzj26dKsgYvmzEHuHgglZdvuX5EDmzTf5w==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-04-22T15:38:55Z"
|
||||
mac: ENC[AES256_GCM,data:M1N8u+mFB3SsQ1PxIoLjVUPyoBoziEX35YDI93MLN81iWT/1IcwR3xmggsYHfoIoFvAQ1yp8Cwp8FSyOT+uvafVJ70npxPJKPZ4PdcxAJWcySIItu0L/PRV2wOvkfeWbfBetCAjl9u+EDZrbJjaKodOkbee5fVakFN6/3q5tseM=,iv:TneZgE0AtEzijzAfSTXg2J2yXUA78OdHrmf4dVRAHUA=,tag:FcmDIvOzDJx3g91/tdYdTw==,type:str]
|
||||
lastmodified: "2024-05-08T16:31:24Z"
|
||||
mac: ENC[AES256_GCM,data:LL+pM7yuj7/3efaFJ3BzlJqZmgTvWwYilyqCZO5dmhs4OtEwhu7s0PVnZiikD46FrJ/OY6CzFzc88vBnBs48Scp6UtzujAJZkWECNKj0R/ECqUiGudt9osnYvKCCsTMj8zlnJ2xd8ncRGsVthSj9tKbORd4jCLQMeUZudLxYiIs=,iv:0UR5bWuqZZf3aNxyM1qCNRxRi0pJV4QsiwDHT19BLwA=,tag:njCNGVDXcKgMx8rbJ1LbWw==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.8.1
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
services = {
|
||||
unbound = {
|
||||
|
@ -7,7 +8,11 @@
|
|||
server = {
|
||||
# Setting logfile to an empty string outputs to stderr
|
||||
log-queries = false;
|
||||
verbosity = 1;
|
||||
log-replies = true;
|
||||
log-tag-queryreply = true;
|
||||
log-local-actions = true;
|
||||
logfile = "/var/log/unbound/unbound.log";
|
||||
verbosity = 0;
|
||||
|
||||
port = 5335;
|
||||
do-ip4 = true;
|
||||
|
@ -93,5 +98,21 @@
|
|||
unbound.host = "unix:///run/unbound/unbound.ctl";
|
||||
};
|
||||
};
|
||||
|
||||
logrotate = {
|
||||
settings = {
|
||||
unbound = {
|
||||
files = [ "/var/log/unbound/unbound.log" ];
|
||||
frequency = "daily";
|
||||
rotate = 7;
|
||||
compress = true;
|
||||
delaycompress = true;
|
||||
notifempty = true;
|
||||
postrotate = ''
|
||||
${config.services.unbound.package}/bin/unbound-control log_reopen
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -22,11 +22,18 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
cloudflare-tls = ''
|
||||
tls {
|
||||
dns cloudflare {env.CF_API_TOKEN}
|
||||
resolvers 1.1.1.1
|
||||
}
|
||||
'';
|
||||
|
||||
mkProxyHost = target: {
|
||||
extraConfig = ''
|
||||
reverse_proxy ${target}
|
||||
|
||||
import cloudflare-tls
|
||||
${cloudflare-tls}
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -42,7 +49,7 @@ let
|
|||
error "Nope." 403
|
||||
}
|
||||
|
||||
import cloudflare-tls
|
||||
${cloudflare-tls}
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
@ -65,15 +72,6 @@ in
|
|||
|
||||
acmeCA = "https://acme-v02.api.letsencrypt.org/directory";
|
||||
|
||||
extraConfig = ''
|
||||
(cloudflare-tls) {
|
||||
tls {
|
||||
dns cloudflare {env.CF_API_TOKEN}
|
||||
propagation_timeout -1
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
virtualHosts = builtins.listToAttrs (
|
||||
map (
|
||||
host:
|
||||
|
|
|
@ -333,7 +333,7 @@ in
|
|||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Catppuccin-Mocha-Compact-Dark";
|
||||
name = "Catppuccin-Mocha-Compact-Blue-Dark";
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
size = "compact";
|
||||
tweaks = [
|
||||
|
|
Loading…
Reference in a new issue