diff --git a/configuration.nix b/configuration.nix index ace14f5..61c4758 100644 --- a/configuration.nix +++ b/configuration.nix @@ -13,7 +13,6 @@ # Include the results of the hardware scan. ./hardware-configuration.nix - ./roles/admin.nix ./roles/dev.nix ./roles/base.nix ./roles/desktop.nix diff --git a/dotfiles/starship.toml b/dotfiles/starship.toml deleted file mode 100644 index 192cb4b..0000000 --- a/dotfiles/starship.toml +++ /dev/null @@ -1,7 +0,0 @@ -add_newline = false - -[username] -show_always = true - -[hostname] -ssh_only = false diff --git a/roles/admin.nix b/roles/admin.nix deleted file mode 100644 index dfeb70d..0000000 --- a/roles/admin.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ pkgs, options, ...}: - -{ - environment.systemPackages = with pkgs; [ - kubectl - - # podman - conmon - fuse-overlayfs - podman - podman-compose - runc - slirp4netns - ]; - - users.users.stefan.subUidRanges = [{ startUid = 100000; count = 65536; }]; - users.users.stefan.subGidRanges = [{ startGid = 100000; count = 65536; }]; - - environment.etc."containers/policy.json" = { - mode="0644"; - text='' - { - "default": [ - { - "type": "insecureAcceptAnything" - } - ], - "transports": - { - "docker-daemon": - { - "": [{"type":"insecureAcceptAnything"}] - } - } - } - ''; - }; - - environment.etc."containers/registries.conf" = { - mode="0644"; - text='' - [registries.search] - registries = ['docker.io', 'quay.io'] - ''; - }; -} diff --git a/roles/base.nix b/roles/base.nix index b44a0de..4bd2dce 100644 --- a/roles/base.nix +++ b/roles/base.nix @@ -1,8 +1,9 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. { config, lib, pkgs, ... }: -let - unstable = import {}; -in { +{ environment.systemPackages = with pkgs; [ bash bat @@ -10,29 +11,17 @@ in { fd fzf git - gnupg htop jq - ncdu ripgrep z-lua - unstable.starship (import ../packages/neovim.nix) ]; - environment = { - etc = { - "starship.toml".source = ../dotfiles/starship.toml; - }; - }; programs.bash = { - promptInit = '' - . <(starship init bash) - ''; interactiveShellInit = '' export EDITOR=nvim - export STARSHIP_CONFIG=/etc/starship.toml if [ -z "$SSH_AUTH_SOCK" ]; then eval $(ssh-agent) @@ -54,6 +43,14 @@ in { fi } + git_branch(){ + branch=$(git branch 2> /dev/null) || exit 0 + branch=$(sed -n '/^*/ s/* \(.*\)/\1/p' <<< $branch) + status=$(git status 2> /dev/null \ + | grep -q "nothing to commit, working tree clean" || e cho -n '*') + echo "$branch$status " + } + . "$(fzf-share)/key-bindings.bash" . "$(fzf-share)/completion.bash" . <(z --init bash) diff --git a/roles/desktop.nix b/roles/desktop.nix index 4375e8d..3713972 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -43,11 +43,10 @@ in { environment.systemPackages = with pkgs; [ alacritty firefox - mumble + unstable.keepassxc neofetch pulseaudio pulsemixer - unstable.keepassxc ( pkgs.writeTextFile { name = "startsway"; diff --git a/roles/dev.nix b/roles/dev.nix index a42a09a..b975189 100644 --- a/roles/dev.nix +++ b/roles/dev.nix @@ -5,7 +5,7 @@ let unstable = import {}; - mozilla = import {}; + mozilla_overlay = import {}; in { environment.systemPackages = with pkgs; [ @@ -15,8 +15,6 @@ in { python37Packages.pyls-isort python37Packages.pyls-mypy rustup - sops - tig unstable.gopls unstable.rust-analyzer ];