Compare commits
10 Commits
200cb8b026
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d0e3681cb | ||
|
|
b246c9c1ec | ||
|
|
3cfc99ad2d | ||
|
|
cbc4564289 | ||
|
|
084387246a | ||
|
|
534752a1c3 | ||
|
|
6c7a17035e | ||
|
|
7f86e790c2 | ||
|
|
88067e2f8c | ||
|
|
b723becbba |
8
flake.lock
generated
8
flake.lock
generated
@@ -365,11 +365,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1761488530,
|
||||
"narHash": "sha256-ooXnvS3ffmqZ91Gl81CZzCj65rdAjVEc8oR/9CsGZ2Y=",
|
||||
"lastModified": 1761508816,
|
||||
"narHash": "sha256-adV/lyxcmuopyuzZ49v46Yt0gft+ioEL4yl1S+vUbus=",
|
||||
"ref": "master",
|
||||
"rev": "95bb44fae3187e5d8c007e80fa30addffe154544",
|
||||
"revCount": 221,
|
||||
"rev": "ab10bf50cb6b023a1b99f91c7e8d550231135eef",
|
||||
"revCount": 223,
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@git.ppp.pm:1122/alex/whib-react.git"
|
||||
},
|
||||
|
||||
@@ -149,6 +149,39 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
disk3 = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/ata-TOSHIBA_MG10ACA20TE_85K2A0UCF4MJ";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
zfs = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "storage";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
disk4 = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/ata-TOSHIBA_MG10ACA20TE_85K2A0V6F4MJ";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
zfs = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "storage";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
zpool = {
|
||||
@@ -166,6 +199,13 @@
|
||||
"disk2"
|
||||
];
|
||||
}
|
||||
{
|
||||
mode = "mirror";
|
||||
members = [
|
||||
"disk3"
|
||||
"disk4"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -20,6 +20,7 @@ in
|
||||
audiobookshelf.enable = true;
|
||||
jellyfin.enable = true;
|
||||
immich.enable = true;
|
||||
navidrome.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
33
hosts/manatee/modules/navidrome/default.nix
Normal file
33
hosts/manatee/modules/navidrome/default.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
navidromeEnabled = config.mod.navidrome.enable;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
mod.navidrome = {
|
||||
enable = lib.mkEnableOption "Enable navidrome module";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
services = lib.mkIf navidromeEnabled {
|
||||
navidrome = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
||||
user = "navidrome";
|
||||
group = "storage";
|
||||
settings = {
|
||||
Port = 4533;
|
||||
Address = "0.0.0.0";
|
||||
MusicFolder = "/mnt/media/public/music";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -33,6 +33,7 @@ in
|
||||
rust.enable = true;
|
||||
scala.enable = true;
|
||||
python.enable = true;
|
||||
gleam.enable = true;
|
||||
|
||||
keyboard.enable = true;
|
||||
containers = {
|
||||
|
||||
@@ -479,7 +479,34 @@ Setup prefix for keybindings.
|
||||
|
||||
* Flycheck
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package flycheck)
|
||||
(use-package flycheck
|
||||
:preface
|
||||
(defun mp-flycheck-eldoc (callback &rest _ignored)
|
||||
"Print flycheck messages at point by calling CALLBACK."
|
||||
(when-let ((flycheck-errors (and flycheck-mode (flycheck-overlay-errors-at (point)))))
|
||||
(mapc
|
||||
(lambda (err)
|
||||
(funcall callback
|
||||
(format "%s: %s"
|
||||
(let ((level (flycheck-error-level err)))
|
||||
(pcase level
|
||||
('info (propertize "I" 'face 'flycheck-error-list-info))
|
||||
('error (propertize "E" 'face 'flycheck-error-list-error))
|
||||
('warning (propertize "W" 'face 'flycheck-error-list-warning))
|
||||
(_ level)))
|
||||
(flycheck-error-message err))
|
||||
:thing (or (flycheck-error-id err)
|
||||
(flycheck-error-group err))
|
||||
:face 'font-lock-doc-face))
|
||||
flycheck-errors)))
|
||||
|
||||
(defun mp-flycheck-prefer-eldoc ()
|
||||
(add-hook 'eldoc-documentation-functions #'mp-flycheck-eldoc nil t)
|
||||
(setq eldoc-documentation-strategy 'eldoc-documentation-compose-eagerly)
|
||||
(setq flycheck-display-errors-function nil)
|
||||
(setq flycheck-help-echo-function nil))
|
||||
|
||||
:hook ((flycheck-mode . mp-flycheck-prefer-eldoc)))
|
||||
|
||||
(use-package flycheck-eglot
|
||||
:after (flycheck eglot)
|
||||
@@ -503,6 +530,12 @@ Setup prefix for keybindings.
|
||||
(add-hook 'before-save-hook #'eglot-format-buffer -10 t))))
|
||||
|
||||
(use-package eglot
|
||||
:preface
|
||||
(defun mp-eglot-eldoc ()
|
||||
(setq eldoc-echo-area-use-multiline-p nil)
|
||||
(setq eldoc-documentation-strategy
|
||||
'eldoc-documentation-compose-eagerly))
|
||||
|
||||
:config
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(scala-mode .
|
||||
@@ -511,6 +544,9 @@ Setup prefix for keybindings.
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(nix-mode . ("nixd")))
|
||||
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(gleam-ts-mode . ("gleam" "lsp")))
|
||||
|
||||
(setq-default eglot-workspace-configuration
|
||||
'(
|
||||
:metals (
|
||||
@@ -520,6 +556,7 @@ Setup prefix for keybindings.
|
||||
)
|
||||
|
||||
:hook (
|
||||
(eglot-managed-mode . mp-eglot-eldoc)
|
||||
(go-mode . eglot-ensure)
|
||||
(go-mode . alex/organize-imports-on-save)
|
||||
(go-mode . alex/format-on-save)
|
||||
@@ -529,6 +566,9 @@ Setup prefix for keybindings.
|
||||
(nix-mode . eglot-ensure)
|
||||
(nix-mode . alex/format-on-save)
|
||||
|
||||
(gleam-ts-mode . eglot-ensure)
|
||||
(gleam-ts-mode . alex/format-on-save)
|
||||
|
||||
(python-mode . eglot-ensure)
|
||||
(javascript-mode . eglot-ensure)
|
||||
(js-mode . eglot-ensure)
|
||||
@@ -549,13 +589,6 @@ Setup prefix for keybindings.
|
||||
:after eglot
|
||||
:config (eglot-booster-mode))
|
||||
#+END_SRC
|
||||
** Eldoc-box
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package eldoc-box
|
||||
:after eglot
|
||||
:bind (:map eglot-mode-map
|
||||
("M-h" . eldoc-box-help-at-point)))
|
||||
#+END_SRC
|
||||
** Go
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package go-mode
|
||||
@@ -573,6 +606,12 @@ Setup prefix for keybindings.
|
||||
)
|
||||
)
|
||||
#+END_SRC
|
||||
** Gleam
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package gleam-ts-mode
|
||||
:mode "\\.gleam\\'"
|
||||
)
|
||||
#+END_SRC
|
||||
** YAML
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package yaml-mode
|
||||
|
||||
25
hosts/pinwheel/modules/gleam/default.nix
Normal file
25
hosts/pinwheel/modules/gleam/default.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
enabled = config.mod.gleam.enable;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
mod.gleam = {
|
||||
enable = lib.mkEnableOption "enable gleam module";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf enabled {
|
||||
home-manager.users.alex = {
|
||||
home.packages = [
|
||||
pkgs.gleam
|
||||
pkgs.erlang
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -21,7 +21,7 @@ in
|
||||
|
||||
package = pkgs.go;
|
||||
env = {
|
||||
GOPATH = "code/go";
|
||||
GOPATH = "/home/alex/code/go";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -19,12 +19,6 @@
|
||||
port = 1122;
|
||||
};
|
||||
|
||||
"andromeda" = {
|
||||
hostname = "andromeda.a2x.se";
|
||||
user = "alex";
|
||||
identityFile = "/home/alex/.ssh/alex.pinwheel-andromeda";
|
||||
};
|
||||
|
||||
"tadpole" = {
|
||||
hostname = "65.21.106.222";
|
||||
user = "alex";
|
||||
@@ -118,19 +112,6 @@
|
||||
group = "users";
|
||||
};
|
||||
|
||||
"alex.pinwheel-andromeda" = {
|
||||
file = ../../../../secrets/pinwheel/alex.pinwheel-andromeda.age;
|
||||
path = "/home/alex/.ssh/alex.pinwheel-andromeda";
|
||||
owner = "alex";
|
||||
group = "users";
|
||||
};
|
||||
"alex.pinwheel-andromeda.pub" = {
|
||||
file = ../../../../secrets/pinwheel/alex.pinwheel-andromeda.pub.age;
|
||||
path = "/home/alex/.ssh/alex.pinwheel-andromeda.pub";
|
||||
owner = "alex";
|
||||
group = "users";
|
||||
};
|
||||
|
||||
"alex.pinwheel-tadpole" = {
|
||||
file = ../../../../secrets/pinwheel/alex.pinwheel-tadpole.age;
|
||||
path = "/home/alex/.ssh/alex.pinwheel-tadpole";
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
virtualisation.vmVariant = {
|
||||
# following configuration is added only when building VM with build-vm
|
||||
# following configuration is added only when building VM the *first* time with `build-vm`
|
||||
virtualisation = {
|
||||
diskSize = 4096;
|
||||
diskSize = 8192;
|
||||
memorySize = 2048;
|
||||
cores = 3;
|
||||
graphics = false;
|
||||
|
||||
@@ -17,8 +17,6 @@ in {
|
||||
"pinwheel/alex.pinwheel-tadpole.pub.age".publicKeys = [ pinwheel tadpole alex ];
|
||||
"pinwheel/alex.pinwheel-github.com.age".publicKeys = [ pinwheel alex ];
|
||||
"pinwheel/alex.pinwheel-github.com.pub.age".publicKeys = [ pinwheel alex ];
|
||||
"pinwheel/alex.pinwheel-andromeda.age".publicKeys = [ pinwheel alex ];
|
||||
"pinwheel/alex.pinwheel-andromeda.pub.age".publicKeys = [ pinwheel alex ];
|
||||
"pinwheel/alex.pinwheel-codeberg.org.age".publicKeys = [ pinwheel alex ];
|
||||
"pinwheel/alex.pinwheel-codeberg.org.pub.age".publicKeys = [ pinwheel alex ];
|
||||
"pinwheel/alex.pinwheel-git.ppp.pm.age".publicKeys = [ pinwheel alex ];
|
||||
|
||||
Reference in New Issue
Block a user