From d6157016cdec7fea14684861c0b04210a65715a1 Mon Sep 17 00:00:00 2001 From: Lukas Wurzinger Date: Tue, 27 Feb 2024 20:27:45 +0100 Subject: [PATCH] fixes --- common/atuin.nix | 5 +++++ common/default.nix | 2 ++ common/starship.nix | 9 +++++++++ flake.lock | 12 ++++++------ hosts/vessel/default.nix | 2 ++ scripts/home.sh | 14 +++++++------- 6 files changed, 31 insertions(+), 13 deletions(-) create mode 100644 common/atuin.nix create mode 100644 common/starship.nix diff --git a/common/atuin.nix b/common/atuin.nix new file mode 100644 index 0000000..a276d7f --- /dev/null +++ b/common/atuin.nix @@ -0,0 +1,5 @@ +{ + services.atuin = { + enable = true; + }; +} diff --git a/common/default.nix b/common/default.nix index b2a843f..363ad2a 100644 --- a/common/default.nix +++ b/common/default.nix @@ -1,5 +1,6 @@ { imports = [ + ./atuin.nix ./avahi.nix ./boot.nix ./cli.nix @@ -10,6 +11,7 @@ ./opengl.nix ./readline.nix ./ssh.nix + ./starship.nix ./sudo.nix ./swap.nix ./users.nix diff --git a/common/starship.nix b/common/starship.nix new file mode 100644 index 0000000..900e789 --- /dev/null +++ b/common/starship.nix @@ -0,0 +1,9 @@ +{ + programs.starship = { + enable = true; + interactiveOnly = true; + settings = { + format = "$all"; + }; + }; +} diff --git a/flake.lock b/flake.lock index db153d2..4c73cbb 100644 --- a/flake.lock +++ b/flake.lock @@ -113,11 +113,11 @@ }, "impermanence": { "locked": { - "lastModified": 1706639736, - "narHash": "sha256-CaG4j9+UwBDfinxxvJMo6yOonSmSo0ZgnbD7aj2Put0=", + "lastModified": 1708968331, + "narHash": "sha256-VUXLaPusCBvwM3zhGbRIJVeYluh2uWuqtj4WirQ1L9Y=", "owner": "nix-community", "repo": "impermanence", - "rev": "cd13c2917eaa68e4c49fea0ff9cada45440d7045", + "rev": "a33ef102a02ce77d3e39c25197664b7a636f9c30", "type": "github" }, "original": { @@ -212,11 +212,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1708799930, - "narHash": "sha256-iYxdinEfweRXcMq/ijt0qS1pRMCfqqUXDqERZ+AA/cw=", + "lastModified": 1709018681, + "narHash": "sha256-nJXhGOM5Sk1TjtGQjP1qfrq/dNyCakAjHINUF76VBhA=", "owner": "K900", "repo": "nixpkgs", - "rev": "1e3e89f6f837ebb2650634829c3d9e8384dc0867", + "rev": "d4a80ff23f9a4465a01a1aab462338e6837ea9be", "type": "github" }, "original": { diff --git a/hosts/vessel/default.nix b/hosts/vessel/default.nix index 2912ebc..81aeff3 100644 --- a/hosts/vessel/default.nix +++ b/hosts/vessel/default.nix @@ -24,4 +24,6 @@ system.stateVersion = "24.05"; powerManagement.cpuFreqGovernor = "powersave"; + + environment.persistence."/persist".directories = ["/srv/storage"]; } diff --git a/scripts/home.sh b/scripts/home.sh index 92d15ff..0e03343 100644 --- a/scripts/home.sh +++ b/scripts/home.sh @@ -27,13 +27,13 @@ choices=("$@") shift "$#" function chose() { - if [[ ''${#choices[@]} == 0 ]]; then + if [[ ${#choices[@]} == 0 ]]; then return 0 fi local arg for arg in "$@"; do local choice - for choice in "''${choices[@]}"; do + for choice in "${choices[@]}"; do if [[ "$arg" == "$choice" ]]; then return 0 fi @@ -43,7 +43,7 @@ function chose() { } if chose git; then - gitconfig=''${XDG_CONFIG_HOME:-$HOME/.config}/git/config + gitconfig=${XDG_CONFIG_HOME:-$HOME/.config}/git/config if [[ -n $name ]]; then GIT_CONFIG_GLOBAL=$gitconfig git config --global -- user.name "$name" @@ -52,7 +52,7 @@ if chose git; then GIT_CONFIG_GLOBAL=$gitconfig git config --global -- user.email "$email" fi - gitignore=$(GIT_CONFIG_GLOBAL=$gitconfig git config --global --get core.excludesFile 2>/dev/null || printf '%s\n' "''${XDG_CONFIG_HOME:-$HOME/.config}/git/ignore") + gitignore=$(GIT_CONFIG_GLOBAL=$gitconfig git config --global --get core.excludesFile 2>/dev/null || printf '%s\n' "${XDG_CONFIG_HOME:-$HOME/.config}/git/ignore") mkdir --parents -- "$(dirname -- "$gitignore")" cat <"$gitignore" .idea/ @@ -172,12 +172,12 @@ user_pref('toolkit.telemetry.bhrPing.enabled', false); user_pref('toolkit.telemetry.firstShutdownPing.enabled', false); user_pref('toolkit.telemetry.coverage.opt-out', true); user_pref('toolkit.coverage.opt-out', true); -user_pref('toolkit.coverage.endpoint.base', '''); +user_pref('toolkit.coverage.endpoint.base', ''); user_pref('browser.ping-centre.telemetry', false); user_pref('app.shield.optoutstudies.enabled', false); user_pref('app.normandy.enabled', false); -user_pref('app.normandy.api_url', '''); -user_pref('breakpad.reportURL', '''); +user_pref('app.normandy.api_url', ''); +user_pref('breakpad.reportURL', ''); user_pref('browser.tabs.crashReporting.sendReport', false); user_pref('browser.crashReports.unsubmittedCheck.autoSubmit2', false);