Compare commits
1 Commits
main
...
ad6e1504db
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad6e1504db |
8
flake.lock
generated
8
flake.lock
generated
@@ -365,11 +365,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761508816,
|
"lastModified": 1761488530,
|
||||||
"narHash": "sha256-adV/lyxcmuopyuzZ49v46Yt0gft+ioEL4yl1S+vUbus=",
|
"narHash": "sha256-ooXnvS3ffmqZ91Gl81CZzCj65rdAjVEc8oR/9CsGZ2Y=",
|
||||||
"ref": "master",
|
"ref": "master",
|
||||||
"rev": "ab10bf50cb6b023a1b99f91c7e8d550231135eef",
|
"rev": "95bb44fae3187e5d8c007e80fa30addffe154544",
|
||||||
"revCount": 223,
|
"revCount": 221,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://gitea@git.ppp.pm:1122/alex/whib-react.git"
|
"url": "ssh://gitea@git.ppp.pm:1122/alex/whib-react.git"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -110,7 +110,6 @@
|
|||||||
./hosts/tadpole/configuration.nix
|
./hosts/tadpole/configuration.nix
|
||||||
./hosts/tadpole/home.nix
|
./hosts/tadpole/home.nix
|
||||||
inputs.whib-backend.nixosModules.${system}.default
|
inputs.whib-backend.nixosModules.${system}.default
|
||||||
inputs.whib-frontend.nixosModules.${system}.default
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -149,39 +149,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
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 = {
|
zpool = {
|
||||||
@@ -199,13 +166,6 @@
|
|||||||
"disk2"
|
"disk2"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
|
||||||
mode = "mirror";
|
|
||||||
members = [
|
|
||||||
"disk3"
|
|
||||||
"disk4"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ in
|
|||||||
audiobookshelf.enable = true;
|
audiobookshelf.enable = true;
|
||||||
jellyfin.enable = true;
|
jellyfin.enable = true;
|
||||||
immich.enable = true;
|
immich.enable = true;
|
||||||
navidrome.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
{
|
|
||||||
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,7 +33,6 @@ in
|
|||||||
rust.enable = true;
|
rust.enable = true;
|
||||||
scala.enable = true;
|
scala.enable = true;
|
||||||
python.enable = true;
|
python.enable = true;
|
||||||
gleam.enable = true;
|
|
||||||
|
|
||||||
keyboard.enable = true;
|
keyboard.enable = true;
|
||||||
containers = {
|
containers = {
|
||||||
|
|||||||
@@ -479,34 +479,7 @@ Setup prefix for keybindings.
|
|||||||
|
|
||||||
* Flycheck
|
* Flycheck
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+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
|
(use-package flycheck-eglot
|
||||||
:after (flycheck eglot)
|
:after (flycheck eglot)
|
||||||
@@ -530,12 +503,6 @@ Setup prefix for keybindings.
|
|||||||
(add-hook 'before-save-hook #'eglot-format-buffer -10 t))))
|
(add-hook 'before-save-hook #'eglot-format-buffer -10 t))))
|
||||||
|
|
||||||
(use-package eglot
|
(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
|
:config
|
||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
'(scala-mode .
|
'(scala-mode .
|
||||||
@@ -544,9 +511,6 @@ Setup prefix for keybindings.
|
|||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
'(nix-mode . ("nixd")))
|
'(nix-mode . ("nixd")))
|
||||||
|
|
||||||
(add-to-list 'eglot-server-programs
|
|
||||||
'(gleam-ts-mode . ("gleam" "lsp")))
|
|
||||||
|
|
||||||
(setq-default eglot-workspace-configuration
|
(setq-default eglot-workspace-configuration
|
||||||
'(
|
'(
|
||||||
:metals (
|
:metals (
|
||||||
@@ -556,7 +520,6 @@ Setup prefix for keybindings.
|
|||||||
)
|
)
|
||||||
|
|
||||||
:hook (
|
:hook (
|
||||||
(eglot-managed-mode . mp-eglot-eldoc)
|
|
||||||
(go-mode . eglot-ensure)
|
(go-mode . eglot-ensure)
|
||||||
(go-mode . alex/organize-imports-on-save)
|
(go-mode . alex/organize-imports-on-save)
|
||||||
(go-mode . alex/format-on-save)
|
(go-mode . alex/format-on-save)
|
||||||
@@ -566,9 +529,6 @@ Setup prefix for keybindings.
|
|||||||
(nix-mode . eglot-ensure)
|
(nix-mode . eglot-ensure)
|
||||||
(nix-mode . alex/format-on-save)
|
(nix-mode . alex/format-on-save)
|
||||||
|
|
||||||
(gleam-ts-mode . eglot-ensure)
|
|
||||||
(gleam-ts-mode . alex/format-on-save)
|
|
||||||
|
|
||||||
(python-mode . eglot-ensure)
|
(python-mode . eglot-ensure)
|
||||||
(javascript-mode . eglot-ensure)
|
(javascript-mode . eglot-ensure)
|
||||||
(js-mode . eglot-ensure)
|
(js-mode . eglot-ensure)
|
||||||
@@ -589,6 +549,13 @@ Setup prefix for keybindings.
|
|||||||
:after eglot
|
:after eglot
|
||||||
:config (eglot-booster-mode))
|
:config (eglot-booster-mode))
|
||||||
#+END_SRC
|
#+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
|
** Go
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package go-mode
|
(use-package go-mode
|
||||||
@@ -606,12 +573,6 @@ Setup prefix for keybindings.
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Gleam
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package gleam-ts-mode
|
|
||||||
:mode "\\.gleam\\'"
|
|
||||||
)
|
|
||||||
#+END_SRC
|
|
||||||
** YAML
|
** YAML
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package yaml-mode
|
(use-package yaml-mode
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
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;
|
package = pkgs.go;
|
||||||
env = {
|
env = {
|
||||||
GOPATH = "/home/alex/code/go";
|
GOPATH = "code/go";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,12 @@
|
|||||||
port = 1122;
|
port = 1122;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"andromeda" = {
|
||||||
|
hostname = "andromeda.a2x.se";
|
||||||
|
user = "alex";
|
||||||
|
identityFile = "/home/alex/.ssh/alex.pinwheel-andromeda";
|
||||||
|
};
|
||||||
|
|
||||||
"tadpole" = {
|
"tadpole" = {
|
||||||
hostname = "65.21.106.222";
|
hostname = "65.21.106.222";
|
||||||
user = "alex";
|
user = "alex";
|
||||||
@@ -112,6 +118,19 @@
|
|||||||
group = "users";
|
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" = {
|
"alex.pinwheel-tadpole" = {
|
||||||
file = ../../../../secrets/pinwheel/alex.pinwheel-tadpole.age;
|
file = ../../../../secrets/pinwheel/alex.pinwheel-tadpole.age;
|
||||||
path = "/home/alex/.ssh/alex.pinwheel-tadpole";
|
path = "/home/alex/.ssh/alex.pinwheel-tadpole";
|
||||||
|
|||||||
@@ -18,11 +18,6 @@
|
|||||||
group = "nginx";
|
group = "nginx";
|
||||||
};
|
};
|
||||||
|
|
||||||
"whib.ppp.pm" = {
|
|
||||||
webroot = "/var/lib/acme/acme-challenge/";
|
|
||||||
group = "nginx";
|
|
||||||
};
|
|
||||||
|
|
||||||
"api.whib.ppp.pm" = {
|
"api.whib.ppp.pm" = {
|
||||||
webroot = "/var/lib/acme/acme-challenge/";
|
webroot = "/var/lib/acme/acme-challenge/";
|
||||||
group = "nginx";
|
group = "nginx";
|
||||||
|
|||||||
@@ -19,15 +19,14 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
assertions = [
|
assertions = lib.mkIf backendEnabled [
|
||||||
{
|
{
|
||||||
assertion = backendEnabled && config.services.nginx.enable;
|
assertion = config.services.nginx.enable;
|
||||||
message = "Option 'config.services.nginx' must be enabled";
|
message = "Option 'config.services.nginx' must be enabled";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
services = {
|
services.whib-backend = lib.mkIf backendEnabled {
|
||||||
whib-backend = lib.mkIf backendEnabled {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
backend = {
|
backend = {
|
||||||
@@ -56,13 +55,12 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
whib-frontend = lib.mkIf frontendEnabled {
|
services.whib-frontend = lib.mkIf frontendEnabled {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
domain = "whib.ppp.pm";
|
domain = "whib.ppp.pm";
|
||||||
useACMEHost = "whib.ppp.pm";
|
useACMEHost = "whib.ppp.pm";
|
||||||
backendHost = "https://api.whib.ppp.pm";
|
backendHost = "api.whib.ppp.pm";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
|
|||||||
@@ -26,9 +26,9 @@
|
|||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
virtualisation.vmVariant = {
|
virtualisation.vmVariant = {
|
||||||
# following configuration is added only when building VM the *first* time with `build-vm`
|
# following configuration is added only when building VM with build-vm
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
diskSize = 8192;
|
diskSize = 4096;
|
||||||
memorySize = 2048;
|
memorySize = 2048;
|
||||||
cores = 3;
|
cores = 3;
|
||||||
graphics = false;
|
graphics = false;
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ in {
|
|||||||
"pinwheel/alex.pinwheel-tadpole.pub.age".publicKeys = [ pinwheel tadpole alex ];
|
"pinwheel/alex.pinwheel-tadpole.pub.age".publicKeys = [ pinwheel tadpole alex ];
|
||||||
"pinwheel/alex.pinwheel-github.com.age".publicKeys = [ pinwheel alex ];
|
"pinwheel/alex.pinwheel-github.com.age".publicKeys = [ pinwheel alex ];
|
||||||
"pinwheel/alex.pinwheel-github.com.pub.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.age".publicKeys = [ pinwheel alex ];
|
||||||
"pinwheel/alex.pinwheel-codeberg.org.pub.age".publicKeys = [ pinwheel alex ];
|
"pinwheel/alex.pinwheel-codeberg.org.pub.age".publicKeys = [ pinwheel alex ];
|
||||||
"pinwheel/alex.pinwheel-git.ppp.pm.age".publicKeys = [ pinwheel alex ];
|
"pinwheel/alex.pinwheel-git.ppp.pm.age".publicKeys = [ pinwheel alex ];
|
||||||
|
|||||||
Reference in New Issue
Block a user