mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 00:57:22 +01:00
feat: add atuin
This commit is contained in:
parent
91fc0227bf
commit
a21ff3228c
7 changed files with 165 additions and 16 deletions
|
|
@ -4702,6 +4702,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
|
||||||
firefly = lib.mkDefault true;
|
firefly = lib.mkDefault true;
|
||||||
koillection = lib.mkDefault true;
|
koillection = lib.mkDefault true;
|
||||||
radicale = lib.mkDefault true;
|
radicale = lib.mkDefault true;
|
||||||
|
atuin = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -4817,6 +4818,7 @@ This holds modules that are to be used on most hosts. These are also the most im
|
||||||
passwordstore = lib.mkDefault true;
|
passwordstore = lib.mkDefault true;
|
||||||
direnv = lib.mkDefault true;
|
direnv = lib.mkDefault true;
|
||||||
eza = lib.mkDefault true;
|
eza = lib.mkDefault true;
|
||||||
|
atuin = lib.mkDefault true;
|
||||||
git = lib.mkDefault true;
|
git = lib.mkDefault true;
|
||||||
fuzzel = lib.mkDefault true;
|
fuzzel = lib.mkDefault true;
|
||||||
starship = lib.mkDefault true;
|
starship = lib.mkDefault true;
|
||||||
|
|
@ -10613,6 +10615,62 @@ To get other URLs (token, etc.), use https://<kanidmDomain>/oauth2/openid/<clien
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
**** Atuin
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: h:27eac8b9-c202-4e45-9b80-42592f1e41c8
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_src nix :tangle modules/nixos/server/atuin.nix
|
||||||
|
{ lib, config, ... }:
|
||||||
|
let
|
||||||
|
serviceDomain = "shellhistory.swarsel.win";
|
||||||
|
servicePort = 8888;
|
||||||
|
serviceName = "atuin";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.server."${serviceName}" = lib.mkEnableOption "enable ${serviceName} on server";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.server."${serviceName}" {
|
||||||
|
|
||||||
|
topology.self.services.atuin.info = "https://${serviceDomain}";
|
||||||
|
|
||||||
|
services.atuin = {
|
||||||
|
enable = true;
|
||||||
|
host = "0.0.0.0";
|
||||||
|
port = servicePort;
|
||||||
|
openFirewall = true;
|
||||||
|
openRegistration = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
nodes.moonside.services.nginx = {
|
||||||
|
upstreams = {
|
||||||
|
"${serviceName}" = {
|
||||||
|
servers = {
|
||||||
|
"192.168.1.2:${builtins.toString servicePort}" = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
virtualHosts = {
|
||||||
|
"${serviceDomain}" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
acmeRoot = null;
|
||||||
|
locations = {
|
||||||
|
"/" = {
|
||||||
|
proxyPass = "http://${serviceName}";
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size 0;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
**** Radicale
|
**** Radicale
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: h:c1ca2d28-51d2-45bd-83b5-05007ae94ae6
|
:CUSTOM_ID: h:c1ca2d28-51d2-45bd-83b5-05007ae94ae6
|
||||||
|
|
@ -11900,6 +11958,7 @@ This holds packages that I can use as provided, or with small modifications (as
|
||||||
|
|
||||||
# local file sharing
|
# local file sharing
|
||||||
wormhole-rs
|
wormhole-rs
|
||||||
|
croc
|
||||||
|
|
||||||
# b2 backup @backblaze
|
# b2 backup @backblaze
|
||||||
restic
|
restic
|
||||||
|
|
@ -12546,6 +12605,29 @@ Eza provides me with a better =ls= command and some other useful aliases.
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
**** atuin
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: h:38f127f3-003b-418b-85ba-a3bcf44bf16c
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_src nix :tangle modules/home/common/atuin.nix
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.atuin = lib.mkEnableOption "atuin settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.atuin {
|
||||||
|
programs.atuin = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
settings = {
|
||||||
|
auto_sync = true;
|
||||||
|
sync_frequency = "5m";
|
||||||
|
sync_address = "https://shellhistory.swarsel.win";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
**** git
|
**** git
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: h:419675ec-3310-438e-80ae-9eaa798a319d
|
:CUSTOM_ID: h:419675ec-3310-438e-80ae-9eaa798a319d
|
||||||
|
|
@ -12822,7 +12904,7 @@ lib.mkMerge [ zshConfigEarlyInit zshConfig ];
|
||||||
Currently I only use it as before with =initExtra= though.
|
Currently I only use it as before with =initExtra= though.
|
||||||
|
|
||||||
#+begin_src nix :tangle modules/home/common/zsh.nix
|
#+begin_src nix :tangle modules/home/common/zsh.nix
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (config.swarselsystems) flakePath;
|
inherit (config.swarselsystems) flakePath;
|
||||||
in
|
in
|
||||||
|
|
@ -12857,9 +12939,7 @@ Currently I only use it as before with =initExtra= though.
|
||||||
passpush = "cd ~/.local/share/password-store; git add .; git commit -m 'pass file changes'; git push; cd -;";
|
passpush = "cd ~/.local/share/password-store; git add .; git commit -m 'pass file changes'; git push; cd -;";
|
||||||
passpull = "cd ~/.local/share/password-store; git pull; cd -;";
|
passpull = "cd ~/.local/share/password-store; git pull; cd -;";
|
||||||
hotspot = "nmcli connection up local; nmcli device wifi hotspot;";
|
hotspot = "nmcli connection up local; nmcli device wifi hotspot;";
|
||||||
cd = "z";
|
|
||||||
youtube-dl = "yt-dlp";
|
youtube-dl = "yt-dlp";
|
||||||
cd-orig = "cd";
|
|
||||||
cat-orig = "cat";
|
cat-orig = "cat";
|
||||||
cdr = "cd \"$( (find $DOCUMENT_DIR_WORK $DOCUMENT_DIR_PRIV -maxdepth 1 && echo $FLAKE) | fzf )\"";
|
cdr = "cd \"$( (find $DOCUMENT_DIR_WORK $DOCUMENT_DIR_PRIV -maxdepth 1 && echo $FLAKE) | fzf )\"";
|
||||||
nix-ldd-ldd = "LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH ldd";
|
nix-ldd-ldd = "LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH ldd";
|
||||||
|
|
@ -12898,10 +12978,10 @@ Currently I only use it as before with =initExtra= though.
|
||||||
searchUpKey = "^[OA";
|
searchUpKey = "^[OA";
|
||||||
};
|
};
|
||||||
plugins = [
|
plugins = [
|
||||||
{
|
# {
|
||||||
name = "fzf-tab";
|
# name = "fzf-tab";
|
||||||
src = pkgs.zsh-fzf-tab;
|
# src = pkgs.zsh-fzf-tab;
|
||||||
}
|
# }
|
||||||
];
|
];
|
||||||
initContent = ''
|
initContent = ''
|
||||||
my-forward-word() {
|
my-forward-word() {
|
||||||
|
|
|
||||||
15
modules/home/common/atuin.nix
Normal file
15
modules/home/common/atuin.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.atuin = lib.mkEnableOption "atuin settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.atuin {
|
||||||
|
programs.atuin = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
settings = {
|
||||||
|
auto_sync = true;
|
||||||
|
sync_frequency = "5m";
|
||||||
|
sync_address = "https://shellhistory.swarsel.win";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -18,8 +18,14 @@
|
||||||
jq.enable = true;
|
jq.enable = true;
|
||||||
ripgrep.enable = true;
|
ripgrep.enable = true;
|
||||||
pandoc.enable = true;
|
pandoc.enable = true;
|
||||||
fzf.enable = true;
|
# fzf.enable = true;
|
||||||
zoxide.enable = true;
|
zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
options = [
|
||||||
|
"--cmd cd"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (config.swarselsystems) flakePath;
|
inherit (config.swarselsystems) flakePath;
|
||||||
in
|
in
|
||||||
|
|
@ -33,9 +33,7 @@ in
|
||||||
passpush = "cd ~/.local/share/password-store; git add .; git commit -m 'pass file changes'; git push; cd -;";
|
passpush = "cd ~/.local/share/password-store; git add .; git commit -m 'pass file changes'; git push; cd -;";
|
||||||
passpull = "cd ~/.local/share/password-store; git pull; cd -;";
|
passpull = "cd ~/.local/share/password-store; git pull; cd -;";
|
||||||
hotspot = "nmcli connection up local; nmcli device wifi hotspot;";
|
hotspot = "nmcli connection up local; nmcli device wifi hotspot;";
|
||||||
cd = "z";
|
|
||||||
youtube-dl = "yt-dlp";
|
youtube-dl = "yt-dlp";
|
||||||
cd-orig = "cd";
|
|
||||||
cat-orig = "cat";
|
cat-orig = "cat";
|
||||||
cdr = "cd \"$( (find $DOCUMENT_DIR_WORK $DOCUMENT_DIR_PRIV -maxdepth 1 && echo $FLAKE) | fzf )\"";
|
cdr = "cd \"$( (find $DOCUMENT_DIR_WORK $DOCUMENT_DIR_PRIV -maxdepth 1 && echo $FLAKE) | fzf )\"";
|
||||||
nix-ldd-ldd = "LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH ldd";
|
nix-ldd-ldd = "LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH ldd";
|
||||||
|
|
@ -74,10 +72,10 @@ in
|
||||||
searchUpKey = "^[OA";
|
searchUpKey = "^[OA";
|
||||||
};
|
};
|
||||||
plugins = [
|
plugins = [
|
||||||
{
|
# {
|
||||||
name = "fzf-tab";
|
# name = "fzf-tab";
|
||||||
src = pkgs.zsh-fzf-tab;
|
# src = pkgs.zsh-fzf-tab;
|
||||||
}
|
# }
|
||||||
];
|
];
|
||||||
initContent = ''
|
initContent = ''
|
||||||
my-forward-word() {
|
my-forward-word() {
|
||||||
|
|
|
||||||
48
modules/nixos/server/atuin.nix
Normal file
48
modules/nixos/server/atuin.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
let
|
||||||
|
serviceDomain = "shellhistory.swarsel.win";
|
||||||
|
servicePort = 8888;
|
||||||
|
serviceName = "atuin";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.server."${serviceName}" = lib.mkEnableOption "enable ${serviceName} on server";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.server."${serviceName}" {
|
||||||
|
|
||||||
|
topology.self.services.atuin.info = "https://${serviceDomain}";
|
||||||
|
|
||||||
|
services.atuin = {
|
||||||
|
enable = true;
|
||||||
|
host = "0.0.0.0";
|
||||||
|
port = servicePort;
|
||||||
|
openFirewall = true;
|
||||||
|
openRegistration = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
nodes.moonside.services.nginx = {
|
||||||
|
upstreams = {
|
||||||
|
"${serviceName}" = {
|
||||||
|
servers = {
|
||||||
|
"192.168.1.2:${builtins.toString servicePort}" = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
virtualHosts = {
|
||||||
|
"${serviceDomain}" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
acmeRoot = null;
|
||||||
|
locations = {
|
||||||
|
"/" = {
|
||||||
|
proxyPass = "http://${serviceName}";
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size 0;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
passwordstore = lib.mkDefault true;
|
passwordstore = lib.mkDefault true;
|
||||||
direnv = lib.mkDefault true;
|
direnv = lib.mkDefault true;
|
||||||
eza = lib.mkDefault true;
|
eza = lib.mkDefault true;
|
||||||
|
atuin = lib.mkDefault true;
|
||||||
git = lib.mkDefault true;
|
git = lib.mkDefault true;
|
||||||
fuzzel = lib.mkDefault true;
|
fuzzel = lib.mkDefault true;
|
||||||
starship = lib.mkDefault true;
|
starship = lib.mkDefault true;
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@
|
||||||
firefly = lib.mkDefault true;
|
firefly = lib.mkDefault true;
|
||||||
koillection = lib.mkDefault true;
|
koillection = lib.mkDefault true;
|
||||||
radicale = lib.mkDefault true;
|
radicale = lib.mkDefault true;
|
||||||
|
atuin = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue