diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index 29bf7ed..da69746 100644 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -50,14 +50,6 @@ in my.gaming.enable = true; my.nix-ld.enable = true; - systemd.slices."system" = { - enable = true; - sliceConfig = { - # 50% maximum usage accross 8 cores - CPUQuota = "${toString (8 * 50)}%"; - }; - }; - boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; boot.initrd.kernelModules = [ "amdgpu" ]; diff --git a/hosts/monolith/monolith-gitlab-runner.nix b/hosts/monolith/monolith-gitlab-runner.nix index 8de40bc..b8eb3df 100644 --- a/hosts/monolith/monolith-gitlab-runner.nix +++ b/hosts/monolith/monolith-gitlab-runner.nix @@ -15,7 +15,7 @@ in virtualisation.docker.enable = true; services.gitlab-runner = { enable = true; - settings.concurrent = 8; + settings.concurrent = 3; services = { # runner for building in docker via host's nix-daemon # nix store will be readable in runner, might be insecure diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index 5351726..79972d0 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -82,6 +82,19 @@ max-jobs = 1; }; + system.autoUpgrade = { + enable = true; + dates = "04:40"; + operation = "switch"; + flags = [ + "--update-input" + "nixpkgs" + "--no-write-lock-file" + "--print-build-logs" + ]; + flake = "git+https://git.lelgenio.com/lelgenio/nixos-config#phantom"; + }; + networking.firewall.allowedTCPPorts = [ 8745 ]; system.stateVersion = "23.05"; # Never change this diff --git a/pkgs/factorio-headless/default.nix b/pkgs/factorio-headless/default.nix index 77dcec8..4711275 100644 --- a/pkgs/factorio-headless/default.nix +++ b/pkgs/factorio-headless/default.nix @@ -1,10 +1,10 @@ { factorio-headless, pkgs }: factorio-headless.overrideAttrs (_: rec { - version = "2.0.73"; + version = "2.0.72"; src = pkgs.fetchurl { name = "factorio_headless_x64-${version}.tar.xz"; url = "https://www.factorio.com/get-download/${version}/headless/linux64"; - hash = "sha256-dSAl+BtewSKZGe3IafnIdz20u1SKkNNw+Fk4I2yFfZo="; + hash = "sha256-zzBXNA28nYK9UWGUmuPnuPrZEux8oHuKMVHgQkpVaM0="; }; }) diff --git a/scripts/default.nix b/scripts/default.nix index 3ebf1dd..dca8862 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -48,11 +48,6 @@ _diffr ]; kak-man-pager = [ kak-pager ]; - kubectl-rsh = [ - bash - kubectl - rsync - ]; helix-pager = [ fish _diffr diff --git a/scripts/kubectl-rsh b/scripts/kubectl-rsh deleted file mode 100755 index 6a0e84f..0000000 --- a/scripts/kubectl-rsh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -set -exu -set -o pipefail - -namespace='' -container='' -pod=$1 -shift - -# rsync calls us with "-l pod namespace" if we use pod@namespace -if [ "X$pod" = "X-l" ]; then - pod=$1 - shift - namespace="-n $1" - shift -fi - -# pod is "pod.container" -if [[ "$pod" == *"."* ]]; then - container="-c ${pod#*.}" - pod="${pod%.*}" -fi - -# pod is "type#name" -if [[ "$pod" == *"#"* ]]; then - pod="${pod//#/\/}" -fi - -exec kubectl $namespace exec -i $container $pod -- "$@" diff --git a/scripts/wpass b/scripts/wpass index 90a9d44..2b6240e 100755 --- a/scripts/wpass +++ b/scripts/wpass @@ -18,13 +18,6 @@ print_actions_for_entry() { if test -n "$otp"; then echo "OTP" fi - - echo "$entry_content" | \ - rg '^(\w+): .*$' --replace '$1' | \ - sed \ - -e '/login/d' \ - -e '/user/d' \ - -e '/email/d' } main() { @@ -36,9 +29,8 @@ main() { test -n "$entry" || exit 0 - entry_content="$(pass show "$entry" 2>/dev/null)" || true - username=`echo "$entry_content" | rg -m1 '(login|user|email): (.*)' -r '$2'` || true - password=`echo "$entry_content" | head -n 1` || true + username=`pass show "$entry" 2>/dev/null | rg -m1 '(login|user|email): (.*)' -r '$2'` || true + password=`pass show "$entry" 2>/dev/null | head -n 1` || true otp=`pass otp "$entry" 2>/dev/null` || true action="$(print_actions_for_entry | wdmenu -p Action)" @@ -53,10 +45,6 @@ main() { printf '%s' "$password" | wl-copy;; OTP) pass otp "$entry" | wl-copy;; - *) - key="$action" - printf '%s\n' "$entry_content" | rg -m1 "^$key: (.*)" -r '$1' | wl-copy -n - ;; esac } diff --git a/user/firefox.nix b/user/firefox.nix index 2cf2e43..1dd599c 100644 --- a/user/firefox.nix +++ b/user/firefox.nix @@ -49,12 +49,6 @@ in hash = "sha256-yt6yRiLTuaK4K/QwgkL9gCVGsSa7ndFOHqZvKqIGZ5U="; }) - (pkgs.fetchFirefoxAddon { - name = "gnome_shell_integration"; - url = "https://addons.mozilla.org/firefox/downloads/file/4591252/gnome_shell_integration-12.1.xpi"; - hash = "sha256-gVv8CKKnjKenp9WcVASiBmu6xhcxE8GfHq46a3qDnbU="; - }) - (pkgs.fetchFirefoxAddon { name = "vimium_ff"; url = "https://addons.mozilla.org/firefox/downloads/file/4191523/vimium_ff-2.0.6.xpi"; diff --git a/user/fish/fish_prompt.fish b/user/fish/fish_prompt.fish index 337c469..ec7774e 100644 --- a/user/fish/fish_prompt.fish +++ b/user/fish/fish_prompt.fish @@ -63,21 +63,6 @@ function _fish_prompt_git_unpushed_branches string split ', ' end -function _fish_prompt_git_remote_deleted -a git_branch - set -l git_remote (git config --get "branch.$git_branch.remote" 2> /dev/null) - set -l git_merge_ref (git config --get "branch.$git_branch.merge" 2> /dev/null) - - test -n "$git_remote" - and test -n "$git_merge_ref" - or return 1 - - set -l git_remote_ref "refs/remotes/$git_remote/"(string replace -r '^refs/heads/' '' "$git_merge_ref") - git show-ref --verify --quiet "$git_remote_ref" - and return 1 - - return 0 -end - function fish_git_prompt command -qs git or return @@ -96,7 +81,6 @@ function fish_git_prompt set -l git_branch (git branch --show-current 2> /dev/null);or return set -l git_detach (_fish_prompt_git_detached) set -l git_remote_branch (git rev-parse --abbrev-ref (git branch --show-current)@{u} 2> /dev/null) - set -l git_remote_deleted (_fish_prompt_git_remote_deleted "$git_branch"; and echo "1") set -l git_status_s (timeout 5s git status -s | string collect) set -l git_log_unpushed (_fish_prompt_git_unpushed_branches) @@ -116,33 +100,26 @@ function fish_git_prompt _fish_prompt_warn "$git_detach" else if test -n "$git_branch" _fish_prompt_accent "$git_branch" - if test -n "$git_remote_deleted" - _fish_prompt_warn "X" - end else _fish_prompt_warn "init" end # if we have at least one commit if git rev-parse HEAD -- &>/dev/null - # Only compare ahead/behind when upstream exists and resolves correctly. - if test -n "$git_remote_branch" - and git rev-parse --verify "$git_remote_branch" &>/dev/null - # print a "↑" if ahead of origin - test 0 -ne (git log --oneline "$git_remote_branch"..HEAD -- | wc -l) - and set -f _git_sync_ahead '↑' + # print a "↑" if ahead of origin + test 0 -ne (git log --oneline "$git_remote_branch"..HEAD -- | wc -l) + and set -f _git_sync_ahead '↑' - # print a "↓" if behind of origin - test 0 -lt (git log --oneline HEAD.."$git_remote_branch" -- | wc -l) - and set -l _git_sync_behind '↓' + # print a "↓" if behind of origin + test 0 -lt (git log --oneline HEAD.."$git_remote_branch" -- | wc -l) + and set -l _git_sync_behind '↓' - if set -q _git_sync_ahead _git_sync_behind - _fish_prompt_normal '⇅' - else if set -q _git_sync_ahead - _fish_prompt_normal '↑' - else if set -q _git_sync_behind - _fish_prompt_normal '↓' - end + if set -q _git_sync_ahead _git_sync_behind + _fish_prompt_normal '⇅' + else if set -q _git_sync_ahead + _fish_prompt_normal '↑' + else if set -q _git_sync_behind + _fish_prompt_normal '↓' end if test -n "$git_log_unpushed" diff --git a/user/home.nix b/user/home.nix index f6cc1e8..1a3d1c3 100644 --- a/user/home.nix +++ b/user/home.nix @@ -121,10 +121,6 @@ docker-compose mariadb - kubectl - kustomize - kubectl-rsh - nodePackages.intelephense nodePackages.typescript-language-server flow # js lsp server