From e7fdb3737774b4d7a5549d6d282944b6f468ab55 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 18 Oct 2024 23:23:56 +0200 Subject: feat(modules/atuin): Init --- modules/by-name/at/atuin/module.nix | 92 ++++++++++++++++++++++ .../by-name/at/atuin/secrets/encryption_key.age | 42 ++++++++++ 2 files changed, 134 insertions(+) create mode 100644 modules/by-name/at/atuin/module.nix create mode 100644 modules/by-name/at/atuin/secrets/encryption_key.age (limited to 'modules/by-name/at') diff --git a/modules/by-name/at/atuin/module.nix b/modules/by-name/at/atuin/module.nix new file mode 100644 index 00000000..7adc34e1 --- /dev/null +++ b/modules/by-name/at/atuin/module.nix @@ -0,0 +1,92 @@ +{ + config, + lib, + ... +}: let + cfg = config.soispha.programs.atuin; +in { + options.soispha.programs.atuin = { + enable = lib.mkEnableOption "atuin"; + }; + + config = lib.mkIf cfg.enable { + age.secrets.atuin_encryption_key = { + file = ./secrets/encryption_key.age; + mode = "700"; + owner = "soispha"; + group = "users"; + }; + + home-manager.users.soispha = { + programs.atuin = { + enable = true; + enableZshIntegration = config.soispha.programs.zsh.enable; + settings = { + key_path = "${config.age.secrets.atuin_encryption_key.path}"; + + # TODO: Setup a self-hosted sync server. <2024-10-18> + session_path = ""; + auto_sync = false; + sync_address = ""; + + # Use the rather reasonable syntax of `skim` to search. + search_mode = "skim"; + + # Filter by files in a git directory, when in one. + # The filtermode can still be changed with `` later. + workspaces = true; + + # Save some space, by setting the mode to 'compact' and the height to 1 (meaning + # `atuin` may only use 1 line in the terminal). + style = "compact"; + inline_height = 1; + + # 'k' and 'j' to move up and down. + keymap_mode = "vim-normal"; + keymap_cursor = { + emacs = "blink-underline"; + vim_insert = "blink-block"; + vim_normal = "blink-bar"; + }; + + # Who wants software, that automatically calls home?! + update_check = false; + + stats = { + # Commands with subcommands + # This list contains the defaults plus `nix` + common_subcommands = [ + "apt" + "cargo" + "composer" + "dnf" + "docker" + "git" + "go" + "ip" + "kubectl" + "nix" + "nix" + "nmcli" + "npm" + "pecl" + "pnpm" + "podman" + "port" + "systemctl" + "tmux" + "yarn" + ]; + + # This overrides the default value. + ignored_commands = []; + }; + + # I currently don't want a sync deamon or a dotfiles manager running. + deamon.enable = false; + dotfiles.enable = false; + }; + }; + }; + }; +} diff --git a/modules/by-name/at/atuin/secrets/encryption_key.age b/modules/by-name/at/atuin/secrets/encryption_key.age new file mode 100644 index 00000000..d801b0e0 --- /dev/null +++ b/modules/by-name/at/atuin/secrets/encryption_key.age @@ -0,0 +1,42 @@ +-----BEGIN AGE ENCRYPTED FILE----- +YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBY3djUkVkbUhTZjFWS29F +MFV5NkdCa3kxZTRjTFQ0N2cwekt4TVVhVTNZClN1ZE9ZSTdhaUtXWDZ2bjhEeVhZ +V3RPRTAybU8zeWJZdW9VTFdWSVlWYUEKLT4gc3NoLWVkMjU1MTkgelpFb25nIHlH +N2ZraXp0UGZFNFkzVVdiQTNnQ2RsSmsyWmJheFd3TC82R2RESmEzSFkKY2JEMzV2 +a05hYlJzU3lqbi9zbXR1SFp2VXhKTnhoSFFMTmR3Y0E4Q2VpawotPiBzc2gtZWQy +NTUxOSA3SGZGVXcgdEtLd08ydks0SGdUWTA1ZlBqeWo5ZWt3dHZ0cXBoMHFzVW10 +ZHZ3cHdWawp2dnpERHV1RU9TUTBuSnJ0TTdXVEVZOFEyblgzKzFEV2txTUZwODNv +dFlNCi0+IFItZ3JlYXNlIH1fSmMoMlFUIHB0OVR1egpObzZ1MWRIU2tNQ1lBV28K +LS0tICtJd3hZUVNFdHVlYXpkdUdHZE43YXFpdlZmMmZONVp5d3hKMUdoTVdaNXcK +YaR4U/tPURDQy/YZzs0KDV74OT5A/6AsSthrrOEf3wyKqf1kzQ2r1DghEwwy7kZD +oKvgGNV9QgjwqI+yFbH7dHoeQJ/vOouDiC1buwqHGfr0f923VLWphLyAhtOgw6B5 +hDwEY5Kl5rXRbYqv00CFSMjkm8hBd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