add vault and atuin

This commit is contained in:
Ingolf Wagner 2023-12-23 00:11:26 +01:00
parent ab7d500fab
commit 585f95a247
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
14 changed files with 132 additions and 55 deletions

View file

@ -1185,16 +1185,18 @@
}, },
"private_assets": { "private_assets": {
"locked": { "locked": {
"dirtyRev": "ee1b2c870d19e0ed1fe15f8501499e4561ec55b2-dirty", "lastModified": 1702625488,
"dirtyShortRev": "ee1b2c8-dirty",
"lastModified": 1699629396,
"narHash": "sha256-IPSyCKFKk6y/lEpzZKd5YiQuzZRqZKBqDS8/EyJXdHU=", "narHash": "sha256-IPSyCKFKk6y/lEpzZKd5YiQuzZRqZKBqDS8/EyJXdHU=",
"ref": "main",
"rev": "a80acb46535c5efa69a0aa982d92e2efd1f1f377",
"revCount": 18,
"type": "git", "type": "git",
"url": "file:///home/palo/dev/nixos/nixos-private-assets" "url": "ssh://gitea@git.ingolf-wagner.de/palo/nixos-private-assets.git"
}, },
"original": { "original": {
"ref": "main",
"type": "git", "type": "git",
"url": "file:///home/palo/dev/nixos/nixos-private-assets" "url": "ssh://gitea@git.ingolf-wagner.de/palo/nixos-private-assets.git"
} }
}, },
"retiolum": { "retiolum": {

View file

@ -42,8 +42,8 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
private_assets = { private_assets = {
url = "git+file:///home/palo/dev/nixos/nixos-private-assets"; #url = "git+file:///home/palo/dev/nixos/nixos-private-assets";
#url = "git+ssh://gitea@git.ingolf-wagner.de/palo/nixos-private-assets.git?ref=main"; url = "git+ssh://gitea@git.ingolf-wagner.de/palo/nixos-private-assets.git?ref=main";
flake = true; flake = true;
}; };
retiolum = { retiolum = {

View file

@ -8,46 +8,6 @@ with lib;
config = mkIf (config.components.terminal.zsh.enable) { config = mkIf (config.components.terminal.zsh.enable) {
home-manager.sharedModules = [
{
programs.zsh = {
enable = true;
defaultKeymap = "viins";
};
# a better cat
programs.bat = {
enable = true;
config.theme = "gruvbox-light";
};
home.shellAliases.cat = "${pkgs.bat}/bin/bat --theme='gruvbox-light'";
# a better ls
# todo what's the new shit?
#programs.eza = {
# enable = true;
# enableAliases = true;
#};
home.shellAliases.llt = "${pkgs.eza}/bin/exa -a --tree";
# use z instead of cd
# use zi to fuzzy search through all registered directories
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
# provide better `Ctrl+r` command in terminal
programs.mcfly = {
enable = true;
keyScheme = "vim";
fuzzySearchFactor = 3;
enableZshIntegration = true;
enableBashIntegration = true;
};
}
];
programs.zsh = { programs.zsh = {
enable = true; enable = true;

View file

@ -0,0 +1,45 @@
From b75e6fd3159896966dce2cf3af5b5be7e286ce1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Mon, 6 Nov 2023 15:56:26 +0100
Subject: [PATCH] make atuin on zfs fast again
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
---
atuin-client/src/database.rs | 3 ++-
atuin-client/src/record/sqlite_store.rs | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/atuin-client/src/database.rs b/atuin-client/src/database.rs
index c4b45302..29006d59 100644
--- a/atuin-client/src/database.rs
+++ b/atuin-client/src/database.rs
@@ -130,7 +130,8 @@ pub async fn new(path: impl AsRef<Path>) -> Result<Self> {
}
let opts = SqliteConnectOptions::from_str(path.as_os_str().to_str().unwrap())?
- .journal_mode(SqliteJournalMode::Wal)
+ .journal_mode(SqliteJournalMode::Memory)
+ .synchronous(sqlx::sqlite::SqliteSynchronous::Off)
.create_if_missing(true);
let pool = SqlitePoolOptions::new().connect_with(opts).await?;
diff --git a/atuin-client/src/record/sqlite_store.rs b/atuin-client/src/record/sqlite_store.rs
index db709f20..eaed6f7a 100644
--- a/atuin-client/src/record/sqlite_store.rs
+++ b/atuin-client/src/record/sqlite_store.rs
@@ -37,7 +37,8 @@ pub async fn new(path: impl AsRef<Path>) -> Result<Self> {
}
let opts = SqliteConnectOptions::from_str(path.as_os_str().to_str().unwrap())?
- .journal_mode(SqliteJournalMode::Wal)
+ .journal_mode(SqliteJournalMode::Memory)
+ .synchronous(sqlx::sqlite::SqliteSynchronous::Off)
.create_if_missing(true);
let pool = SqlitePoolOptions::new().connect_with(opts).await?;
--
2.42.0

View file

@ -5,5 +5,6 @@
./nextcloud.nix ./nextcloud.nix
./social.nix ./social.nix
./packages.nix ./packages.nix
./terminal.nix
]; ];
} }

View file

@ -126,6 +126,8 @@ with lib;
gum gum
yq-go yq-go
gojq gojq
jq
ijq
# nomad # nomad
nomad nomad

View file

@ -5,6 +5,8 @@ with lib;
config = mkIf config.gui.enable { config = mkIf config.gui.enable {
# ¯\_(ツ)_/¯ # ¯\_(ツ)_/¯
home.packages = [ home.packages = [

View file

@ -0,0 +1,57 @@
{ pkgs, ... }:
{
programs.zsh = {
enable = true;
defaultKeymap = "viins";
};
programs.bash = {
enable = true;
bashrcExtra = ''
set -o vi
'';
};
# a better cat
programs.bat = {
enable = true;
config.theme = "gruvbox-light";
};
home.shellAliases.cat = "${pkgs.bat}/bin/bat --theme='gruvbox-light'";
home.shellAliases.llt = "${pkgs.eza}/bin/exa -a --tree";
# use z instead of cd
# use zi to fuzzy search through all registered directories
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
# provide better `Ctrl+r` command in terminal
#programs.mcfly = {
# enable = true;
# keyScheme = "vim";
# fuzzySearchFactor = 3;
# enableZshIntegration = true;
# enableBashIntegration = true;
#};
# provide better `Ctrl+r` command in terminal
programs.atuin = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
package = pkgs.atuin.overrideAttrs (_old: {
# as cursed as doing mitigations=off in the kernel command line
patches = [ ./0001-make-atuin-on-zfs-fast-again.patch ];
});
settings = {
auto_sync = true;
sync_frequency = "5m";
sync_address = "http://chungus.private";
#search_mode = "prefix";
};
};
}

View file

@ -1,7 +1,7 @@
{ config, ... }: { { config, ... }: {
services.atuin = { services.atuin = {
enable = true; enable = true;
host = config.tinc.private.ipv4; host = "${config.networking.hostName}.private";
maxHistoryLength = 999999; maxHistoryLength = 999999;
openRegistration = true; openRegistration = true;
}; };

View file

@ -2,10 +2,10 @@
imports = [ imports = [
../../system/server
../../components ../../components
./hardware-configuration.nix ./hardware-configuration.nix
../../system/server
./disko-config.nix ./disko-config.nix
./disko-syncoid.nix ./disko-syncoid.nix
./packages.nix ./packages.nix
@ -26,7 +26,6 @@
./media-share.nix ./media-share.nix
./media-audiobookshelf.nix ./media-audiobookshelf.nix
#./media-tdarr.nix
./media-jellyfin.nix ./media-jellyfin.nix
./media-youtube.nix ./media-youtube.nix
./media-castget.nix ./media-castget.nix
@ -52,10 +51,12 @@
#./kiosk.nix #./kiosk.nix
./trilium.nix ./trilium.nix
./gitea.nix ./gitea.nix
#./atuin.nix ./atuin.nix
./cache.nix ./cache.nix
./vault.nix
]; ];
components.gui.enable = false; components.gui.enable = false;
@ -117,6 +118,7 @@
# balance = false; # balance = false;
#}; #};
system.stateVersion = "23.11";
} }

View file

@ -26,7 +26,7 @@ in
config = { config, pkgs, lib, ... }: { config = { config, pkgs, lib, ... }: {
system.stateVersion = "22.11"; system.stateVersion = "23.11";
services.journald.extraConfig = "SystemMaxUse=1G"; services.journald.extraConfig = "SystemMaxUse=1G";
services.transmission = { services.transmission = {

View file

@ -0,0 +1,6 @@
{
services.vault = {
enable = true;
#adress = "chungus.private:8200";
};
}

View file

@ -8,8 +8,8 @@
./defaults.nix ./defaults.nix
./grub.nix ./grub.nix
./nginx-landingpage.nix #./nginx-landingpage.nix
./nginx.nix #./nginx.nix
./packages.nix ./packages.nix
./borg-jobs.nix ./borg-jobs.nix
./borg-scripts.nix ./borg-scripts.nix
@ -31,6 +31,6 @@
# compatible, in order to avoid breaking some software such as database # compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you # servers. You should change this only after NixOS release notes say you
# should. # should.
system.stateVersion = lib.mkDefault "19.03"; # Did you read the comment? #system.stateVersion = lib.mkDefault "19.03"; # Did you read the comment?
} }