added atuin shell history

This commit is contained in:
Nickiel12 2024-01-09 18:47:47 -08:00
parent 2d95844588
commit 5382c0dc61
6 changed files with 70 additions and 5 deletions

View file

@ -14,6 +14,7 @@
}; };
kmonad.url = "github:kmonad/kmonad?dir=nix"; kmonad.url = "github:kmonad/kmonad?dir=nix";
atuin.url = "github:atuinsh/atuin";
headscale = { headscale = {
# url = "github:kradalby/headscale/bbb4c357268998fd02780b7f8f2013f76e3ab80a"; # url = "github:kradalby/headscale/bbb4c357268998fd02780b7f8f2013f76e3ab80a";
url = "github:juanfont/headscale/6049ec758ca46b5c6ee7abba4f3d472fb1e2ffa6"; url = "github:juanfont/headscale/6049ec758ca46b5c6ee7abba4f3d472fb1e2ffa6";
@ -39,6 +40,7 @@
home-manager, home-manager,
ewwtilities, ewwtilities,
kmonad, kmonad,
atuin
... ...
}: }:
let let
@ -58,7 +60,7 @@
Alaska = lib.nixosSystem { Alaska = lib.nixosSystem {
inherit system; inherit system;
specialArgs = { specialArgs = {
inherit user headscale; inherit user headscale atuin;
}; };
modules = [ modules = [
@ -137,7 +139,7 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { extraSpecialArgs = {
inherit user ewwtilities pkgs-stable; inherit user ewwtilities atuin pkgs-stable;
}; };
users.${user} = { users.${user} = {
imports = [ imports = [

View file

@ -1,5 +1,5 @@
{ inputs, config, osConfig, pkgs, pkgs-stable, ewwtilities, user, ... }: { inputs, config, osConfig, pkgs, pkgs-stable, ewwtilities, atuin, user, ... }:
let let
moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz); moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
@ -18,6 +18,7 @@ let
install_packages = with pkgs; [ install_packages = with pkgs; [
# (pkgs.callPackage ./modules/minecraft-bedrock/minecraft-bedrock-server.nix {}) # the possible minecraft-bedrock-server package for testing # (pkgs.callPackage ./modules/minecraft-bedrock/minecraft-bedrock-server.nix {}) # the possible minecraft-bedrock-server package for testing
# utilities # utilities
atuin.packages.${pkgs.system}.atuin
bat # cat with wings (better cat) bat # cat with wings (better cat)
bottom # system monitor bottom # system monitor
du-dust # directory disk-space analyzer du-dust # directory disk-space analyzer

View file

@ -0,0 +1,32 @@
{ config, ...}:
let
in
{
services.atuin = {
enable = true;
openFirewall = true;
port = 8910;
host = "127.0.0.1";
openRegistration = true;
database = {
createLocally = true;
};
};
services.nginx.virtualHosts = {
"atuin.nickiel.net" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${builtins.toString config.services.atuin.port}";
proxyWebsockets = true;
extraConfig = ''
allow 100.64.0.0/16;
allow 127.0.0.1;
deny all;
'';
};
};
};
}

View file

@ -19,4 +19,9 @@
type = "A"; type = "A";
value = "100.64.0.1"; value = "100.64.0.1";
} }
{
name = "atuin.nickiel.net";
type = "A";
value = "100.64.0.1";
}
] ]

View file

@ -1,4 +1,4 @@
{ config, headscale, ... }: { config, pkgs, headscale, ... }:
let let
tailscale_dns_entries = import ./dns.nix; tailscale_dns_entries = import ./dns.nix;
@ -16,7 +16,7 @@ in {
# https://carjorvaz.com/posts/setting-up-headscale-on-nixos/ # https://carjorvaz.com/posts/setting-up-headscale-on-nixos/
services.headscale = { services.headscale = {
package = headscale.packages."x86_64-linux".headscale; package = headscale.packages.${pkgs.system}.headscale;
enable = true; enable = true;
address = "0.0.0.0"; address = "0.0.0.0";
port = 8082; port = 8082;

25
modules/atuin.nix Normal file
View file

@ -0,0 +1,25 @@
{config, pkgs, atuin, ...}:
let
in
{
programs.atuin = {
enable = true;
package = atuin.packages.${pkgs.system}.atuin;
enableZshIntegration = true;
flags = [
];
settings = {
auto_sync = true;
sync_frequency = "20m";
sync_address = "https://atuin.nickiel.net";
# filter_mode = "global" | "host" | "session" | "directory"
inline_height = 40;
show_preview = true;
show_help = true;
exit_mode = "return-query";
secrets_filter = true;
};
};
}