diff --git a/.config/oh-my-posh/config.toml b/.config/oh-my-posh/config.toml index c5e8346..ba26f57 100644 --- a/.config/oh-my-posh/config.toml +++ b/.config/oh-my-posh/config.toml @@ -1,153 +1,6 @@ -version = 2 -final_space = true console_title_template = '{{ .Shell }} in {{ .Folder }}' - -[[blocks]] - type = 'prompt' - alignment = 'left' - - [[blocks.segments]] - type = 'session' - style = 'diamond' - leading_diamond = '' - trailing_diamond = '' - template = ' {{ if .SSHSession }} {{ end }}{{ .UserName }} ' - background = 'p:yellow' - foreground = 'p:black' - - [[blocks.segments]] - type = 'path' - style = 'powerline' - powerline_symbol = '' - template = '  {{ path .Path .Location }} ' - background = 'p:orange' - foreground = 'p:white' - - [blocks.segments.properties] - style = 'folder' - - [[blocks.segments]] - type = 'git' - style = 'powerline' - powerline_symbol = '' - foreground_templates = ['{{ if or (.Working.Changed) (.Staging.Changed) }}p:black{{ end }}', '{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:white{{ end }}', '{{ if gt .Ahead 0 }}p:white{{ end }}'] - background_templates = ['{{ if or (.Working.Changed) (.Staging.Changed) }}p:yellow{{ end }}', '{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:red{{ end }}', '{{ if gt .Ahead 0 }}#49416D{{ end }}', '{{ if gt .Behind 0 }}#7A306C{{ end }}'] - template = ' {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }} ' - background = 'p:green' - foreground = 'p:black' - - [blocks.segments.properties] - branch_max_length = 25 - fetch_status = true - fetch_upstream_icon = true - - [[blocks.segments]] - type = 'root' - style = 'powerline' - powerline_symbol = '' - template = '  ' - background = 'p:yellow' - foreground = 'p:white' - - [[blocks.segments]] - type = 'status' - style = 'diamond' - background_templates = ['{{ if gt .Code 0 }}p:red{{ end }}'] - leading_diamond = '' - trailing_diamond = '' - template = ' {{ if gt .Code 0 }}{{ else }}{{ end }} ' - background = 'p:blue' - foreground = 'p:white' - - [blocks.segments.properties] - always_enabled = true - -[[blocks]] - type = 'rprompt' - - [[blocks.segments]] - type = 'node' - style = 'plain' - template = ' ' - background = 'transparent' - foreground = 'p:green' - - [blocks.segments.properties] - display_mode = 'files' - fetch_package_manager = false - home_enabled = false - - [[blocks.segments]] - type = 'go' - style = 'plain' - template = ' ' - background = 'transparent' - foreground = 'p:blue' - - [blocks.segments.properties] - fetch_version = false - - [[blocks.segments]] - type = 'python' - style = 'plain' - template = ' ' - background = 'transparent' - foreground = 'p:yellow' - - [blocks.segments.properties] - display_mode = 'files' - fetch_version = false - fetch_virtual_env = false - - [[blocks.segments]] - type = 'shell' - style = 'plain' - template = 'in {{ .Name }} ' - background = 'transparent' - foreground = 'p:white' - - [[blocks.segments]] - type = 'time' - style = 'plain' - template = 'at {{ .CurrentDate | date "15:04:05" }}' - background = 'transparent' - foreground = 'p:white' - -[[tooltips]] - type = 'aws' - tips = ['aws'] - style = 'diamond' - leading_diamond = '' - trailing_diamond = '' - template = '  {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ' - background = 'p:orange' - foreground = 'p:white' - - [tooltips.properties] - display_default = true - -[[tooltips]] - type = 'az' - tips = ['az'] - style = 'diamond' - leading_diamond = '' - trailing_diamond = '' - template = '  {{ .Name }} ' - background = 'p:blue' - foreground = 'p:white' - - [tooltips.properties] - display_default = true - -[transient_prompt] - template = '<,p:yellow> {{ .Folder }}  ' - background = 'transparent' - foreground = 'p:black' - -[secondary_prompt] - template = '<,p:yellow> >  ' - background = 'transparent' - foreground = 'p:black' +version = 3 +final_space = true [palette] black = '#262B44' @@ -157,3 +10,174 @@ console_title_template = '{{ .Shell }} in {{ .Folder }}' red = '#D81E5B' white = '#E0DEF4' yellow = '#F3AE35' + +[secondary_prompt] + template = '<,p:yellow> >  ' + foreground = 'p:black' + background = 'transparent' + +[transient_prompt] + template = '<,p:yellow> {{ .Folder }}  ' + foreground = 'p:black' + background = 'transparent' + +[upgrade] + source = 'cdn' + interval = '168h' + auto = false + notice = false + +[[blocks]] + type = 'prompt' + alignment = 'left' + + [[blocks.segments]] + leading_diamond = '' + trailing_diamond = '' + template = ' {{ if .SSHSession }} {{ end }}{{ .UserName }} ' + foreground = 'p:black' + background = 'p:yellow' + type = 'session' + style = 'diamond' + + [blocks.segments.properties] + cache_duration = 'none' + + [[blocks.segments]] + template = '  {{ path .Path .Location }} ' + foreground = 'p:white' + powerline_symbol = '' + background = 'p:orange' + type = 'path' + style = 'powerline' + + [blocks.segments.properties] + cache_duration = 'none' + style = 'folder' + + [[blocks.segments]] + template = ' {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }} ' + foreground = 'p:black' + powerline_symbol = '' + background = 'p:green' + type = 'git' + style = 'powerline' + foreground_templates = ['{{ if or (.Working.Changed) (.Staging.Changed) }}p:black{{ end }}', '{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:white{{ end }}', '{{ if gt .Ahead 0 }}p:white{{ end }}'] + background_templates = ['{{ if or (.Working.Changed) (.Staging.Changed) }}p:yellow{{ end }}', '{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:red{{ end }}', '{{ if gt .Ahead 0 }}#49416D{{ end }}', '{{ if gt .Behind 0 }}#7A306C{{ end }}'] + + [blocks.segments.properties] + branch_max_length = 25 + cache_duration = 'none' + fetch_status = true + fetch_upstream_icon = true + + [[blocks.segments]] + template = '  ' + foreground = 'p:white' + powerline_symbol = '' + background = 'p:yellow' + type = 'root' + style = 'powerline' + + [blocks.segments.properties] + cache_duration = 'none' + + [[blocks.segments]] + leading_diamond = '' + trailing_diamond = '' + template = ' {{ if gt .Code 0 }}{{ else }}{{ end }} ' + foreground = 'p:white' + background = 'p:blue' + type = 'status' + style = 'diamond' + background_templates = ['{{ if gt .Code 0 }}p:red{{ end }}'] + + [blocks.segments.properties] + always_enabled = true + cache_duration = 'none' + +[[blocks]] + type = 'rprompt' + + [[blocks.segments]] + template = ' ' + foreground = 'p:green' + background = 'transparent' + type = 'node' + style = 'plain' + + [blocks.segments.properties] + cache_duration = 'none' + display_mode = 'files' + fetch_package_manager = false + home_enabled = false + + [[blocks.segments]] + template = ' ' + foreground = 'p:blue' + background = 'transparent' + type = 'go' + style = 'plain' + + [blocks.segments.properties] + cache_duration = 'none' + fetch_version = false + + [[blocks.segments]] + template = ' ' + foreground = 'p:yellow' + background = 'transparent' + type = 'python' + style = 'plain' + + [blocks.segments.properties] + cache_duration = 'none' + display_mode = 'files' + fetch_version = false + fetch_virtual_env = false + + [[blocks.segments]] + template = 'in {{ .Name }} ' + foreground = 'p:white' + background = 'transparent' + type = 'shell' + style = 'plain' + + [blocks.segments.properties] + cache_duration = 'none' + + [[blocks.segments]] + template = 'at {{ .CurrentDate | date "15:04:05" }}' + foreground = 'p:white' + background = 'transparent' + type = 'time' + style = 'plain' + + [blocks.segments.properties] + cache_duration = 'none' + +[[tooltips]] + leading_diamond = '' + trailing_diamond = '' + template = '  {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ' + foreground = 'p:white' + background = 'p:orange' + type = 'aws' + style = 'diamond' + tips = ['aws'] + + [tooltips.properties] + display_default = true + +[[tooltips]] + leading_diamond = '' + trailing_diamond = '' + template = '  {{ .Name }} ' + foreground = 'p:white' + background = 'p:blue' + type = 'az' + style = 'diamond' + tips = ['az'] + + [tooltips.properties] + display_default = true diff --git a/.oh-my-posh.nu b/.oh-my-posh.nu index 15550ca..65a8e5f 100755 --- a/.oh-my-posh.nu +++ b/.oh-my-posh.nu @@ -4,11 +4,15 @@ if ($env.config? | is-not-empty) { } $env.POWERLINE_COMMAND = 'oh-my-posh' -$env.POSH_THEME = '/home/dan/.config/oh-my-posh/powerlevel10k_rainbow.omp.json' $env.PROMPT_INDICATOR = "" -$env.POSH_SESSION_ID = (echo "ed3af1b9-5277-4c80-9fbe-daaaf73eabb3") +$env.POSH_SESSION_ID = "b6c2131d-3745-4432-850c-1bcf19d1b8a0" +$env.POSH_SHELL = "nu" $env.POSH_SHELL_VERSION = (version | get version) +# disable all known python virtual environment prompts +$env.VIRTUAL_ENV_DISABLE_PROMPT = 1 +$env.PYENV_VIRTUALENV_DISABLE_PROMPT = 1 + let _omp_executable: string = (which oh-my-posh | first | get path) # PROMPTS @@ -35,6 +39,7 @@ def --wrapped _omp_get_prompt [ $"--no-status=($no_status)" $"--execution-time=($execution_time)" $"--terminal-width=((term size).columns)" + $"--job-count=(job list | length)" ...$args ) } diff --git a/configuration.nix b/configuration.nix index 195d25e..026a353 100644 --- a/configuration.nix +++ b/configuration.nix @@ -168,7 +168,7 @@ in users.users.dan = { isNormalUser = true; description = "John"; - extraGroups = [ "networkmanager" "wheel" "docker" "fuse" "video" "wireshark" "gamemode" "scanner" "lp" "kvm" "adbusers"]; + extraGroups = [ "networkmanager" "wheel" "docker" "fuse" "video" "wireshark" "gamemode" "scanner" "lp" "kvm" "adbusers" "dialout"]; shell = pkgs.fish; packages = with pkgs; [ kdePackages.kate @@ -241,7 +241,7 @@ in enableOnBoot = false; # enableNvidia = true; }; - hardware.nvidia-container-toolkit.enable = true; + # hardware.nvidia-container-toolkit.enable = true; services.avahi.enable = true; boot = { @@ -268,6 +268,7 @@ in kernelParams = [ # attempt to fix nvidia perf "nvidia_drm.fbdev=1" "nvidia_drm.modeset=1" "module_blacklist=i915" + "delayacct" "initcall_blacklist=sysfb_init" "quiet" "splash" @@ -386,9 +387,9 @@ in boot.kernelModules = ["amdgpu" "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" "lenovo-legion-module"]; hardware.nvidia = { open = false; - modesetting.enable = true; - powerManagement.enable = true; - nvidiaSettings = true; + # modesetting.enable = true; + # powerManagement.enable = true; + # nvidiaSettings = true; prime = { # hardware specific, beware! amdgpuBusId = lib.mkForce "PCI:06:00:0"; diff --git a/flake.lock b/flake.lock index 87d49ef..c4d8cd1 100644 --- a/flake.lock +++ b/flake.lock @@ -65,11 +65,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1758414992, - "narHash": "sha256-CGszMLp7zVJoxc1CXJujJKM+ZVZYjHDHUSQGSN9bDNQ=", + "lastModified": 1759098182, + "narHash": "sha256-5+jWxVFWS9i6FQjdmKMWQZqN57W3Tb1cF1IqKqjind4=", "owner": "9001", "repo": "copyparty", - "rev": "260da2f45c0501a5ef6a59f8f515dffab6e21bfc", + "rev": "d08e872062f0ed2ef28d1e5d3d5a32bac840a723", "type": "github" }, "original": { @@ -206,11 +206,11 @@ ] }, "locked": { - "lastModified": 1758375677, - "narHash": "sha256-BLtD+6qWz7fQjPk2wpwyXQLGI0E30Ikgf2ppn2nVadI=", + "lastModified": 1759106866, + "narHash": "sha256-GjLvAl7qxGxKtop6ghasxjQ1biTT7pA+WU45byzMl/4=", "owner": "nix-community", "repo": "home-manager", - "rev": "edc7468e12be92e926847cb02418e649b02b59dd", + "rev": "619ae569293b6427d23cce4854eb4f3c33af3eec", "type": "github" }, "original": { @@ -291,11 +291,11 @@ ] }, "locked": { - "lastModified": 1755678602, - "narHash": "sha256-uEC5O/NIUNs1zmc1aH1+G3GRACbODjk2iS0ET5hXtuk=", + "lastModified": 1758192433, + "narHash": "sha256-CR6RnqEJSTiFgA6KQY4TTLUWbZ8RBnb+hxQqesuQNzQ=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "157cc52065a104fc3b8fa542ae648b992421d1c7", + "rev": "c44e749dd611521dee940d00f7c444ee0ae4cfb7", "type": "github" }, "original": { @@ -320,11 +320,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1756372920, - "narHash": "sha256-kUTDPrbBksfu/xbwyD8NAMUcu/D5jWwiCEfANgxCnG4=", + "lastModified": 1758293956, + "narHash": "sha256-+UCEuPcCsWkyQh73KouiVZmcsW6ljVKHUUXDcJNI41w=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "4b2bfbd85f1ea77a165d9ba92d62016cdf3abfcd", + "rev": "88326075743a677e76645ff163b392490419d4de", "type": "github" }, "original": { @@ -346,11 +346,11 @@ ] }, "locked": { - "lastModified": 1758382384, - "narHash": "sha256-tF9YAZlU8WrtLhEeB7p/TEwZrUM5P6JQ1q4giLh8YZ8=", + "lastModified": 1758895089, + "narHash": "sha256-HOIITlSwB5iuVEVLmWNGu8bvI83Y2IbN8SzJQmBDwvg=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "c8b2be350290e77e5cb8d482cde6b4c7e7f62099", + "rev": "4d940a10aff16b240533c9b6527a14ff91e5e5ae", "type": "github" }, "original": { @@ -448,11 +448,11 @@ ] }, "locked": { - "lastModified": 1753819801, - "narHash": "sha256-tHe6XeNeVeKapkNM3tcjW4RuD+tB2iwwoogWJOtsqTI=", + "lastModified": 1757694755, + "narHash": "sha256-j+w5QUUr2QT/jkxgVKecGYV8J7fpzXCMgzEEr6LG9ug=", "owner": "hyprwm", "repo": "hyprland-qtutils", - "rev": "b308a818b9dcaa7ab8ccab891c1b84ebde2152bc", + "rev": "5ffdfc13ed03df1dae5084468d935f0a3f2c9a4c", "type": "github" }, "original": { @@ -480,11 +480,11 @@ ] }, "locked": { - "lastModified": 1753622892, - "narHash": "sha256-0K+A+gmOI8IklSg5It1nyRNv0kCNL51duwnhUO/B8JA=", + "lastModified": 1756810301, + "narHash": "sha256-wgZ3VW4VVtjK5dr0EiK9zKdJ/SOqGIBXVG85C3LVxQA=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "23f0debd2003f17bd65f851cd3f930cff8a8c809", + "rev": "3d63fb4a42c819f198deabd18c0c2c1ded1de931", "type": "github" }, "original": { @@ -553,11 +553,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1758420014, - "narHash": "sha256-a7IGWXPRppgXMRpBosBl2Afr5DICt21ogeZL45uVkX0=", + "lastModified": 1759110900, + "narHash": "sha256-fcu/r0ijvaYT2VHGkZGr0wq9uBMNFkiftVBy43/2oig=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "cd931e08409954b2e3595b1532039f8052dd8198", + "rev": "2ac6a49266e9159ccb001b4c8cb1f50f67d502ae", "type": "github" }, "original": { @@ -594,11 +594,11 @@ ] }, "locked": { - "lastModified": 1758427679, - "narHash": "sha256-xwjWRJTKDCjQ0iwfh7WhDhgcS0Wt3d1Yscg83mKBCn4=", + "lastModified": 1759032422, + "narHash": "sha256-WZf+FhebP2/1pK2np5xj/NuDjD6fXK2BHnq/tPUN18o=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "fd2569ca2ef7d69f244cd9ffcb66a0540772ff85", + "rev": "ec7a78cb0e098832d8acac091a4df393259c4839", "type": "github" }, "original": { @@ -609,11 +609,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1757943327, - "narHash": "sha256-w6cDExPBqbq7fTLo4dZ1ozDGeq3yV6dSN4n/sAaS6OM=", + "lastModified": 1758663926, + "narHash": "sha256-6CFdj7Xs616t1W4jLDH7IohAAvl5Dyib3qEv/Uqw1rk=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "67a709cfe5d0643dafd798b0b613ed579de8be05", + "rev": "170ff93c860b2a9868ed1e1102d4e52cb3d934e1", "type": "github" }, "original": { @@ -655,11 +655,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1758277210, - "narHash": "sha256-iCGWf/LTy+aY0zFu8q12lK8KuZp7yvdhStehhyX1v8w=", + "lastModified": 1758690382, + "narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8eaee110344796db060382e15d3af0a9fc396e0e", + "rev": "e643668fd71b949c53f8626614b21ff71a07379d", "type": "github" }, "original": { @@ -701,11 +701,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1756266583, - "narHash": "sha256-cr748nSmpfvnhqSXPiCfUPxRz2FJnvf/RjJGvFfaCsM=", + "lastModified": 1758198701, + "narHash": "sha256-7To75JlpekfUmdkUZewnT6MoBANS0XVypW6kjUOXQwc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8a6d5427d99ec71c64f0b93d45778c889005d9c2", + "rev": "0147c2f1d54b30b5dd6d4a8c8542e8d7edf93b5d", "type": "github" }, "original": { @@ -717,11 +717,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1758262103, - "narHash": "sha256-aBGl3XEOsjWw6W3AHiKibN7FeoG73dutQQEqnd/etR8=", + "lastModified": 1758976413, + "narHash": "sha256-hEIDTaIqvW1NMfaNgz6pjhZPZKTmACJmXxGr/H6isIg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "12bd230118a1901a4a5d393f9f56b6ad7e571d01", + "rev": "e3a3b32cc234f1683258d36c6232f150d57df015", "type": "github" }, "original": { @@ -733,11 +733,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1758277210, - "narHash": "sha256-iCGWf/LTy+aY0zFu8q12lK8KuZp7yvdhStehhyX1v8w=", + "lastModified": 1758690382, + "narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8eaee110344796db060382e15d3af0a9fc396e0e", + "rev": "e643668fd71b949c53f8626614b21ff71a07379d", "type": "github" }, "original": { @@ -774,11 +774,11 @@ ] }, "locked": { - "lastModified": 1755960406, - "narHash": "sha256-RF7j6C1TmSTK9tYWO6CdEMtg6XZaUKcvZwOCD2SICZs=", + "lastModified": 1758108966, + "narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "e891a93b193fcaf2fc8012d890dc7f0befe86ec2", + "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b", "type": "github" }, "original": { @@ -886,11 +886,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1758428547, - "narHash": "sha256-4xIo6I+XDmLFh7ydADO5bZLh9J4/YXUrWjXQEQRnGl0=", + "lastModified": 1759072580, + "narHash": "sha256-03GJ6F5jXuxEgazHE2A3WB/kEyHO/rF1VPA9qYodq0E=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "c043b46b7a35397127153beecf0088bba14ac31c", + "rev": "c1908c990449e0d2b37766fbd95bc23e04d0b3a9", "type": "github" }, "original": { diff --git a/home.nix b/home.nix index 446d78d..4e0f9c3 100644 --- a/home.nix +++ b/home.nix @@ -18,6 +18,10 @@ in stateVersion = "24.05"; packages = with pkgs; [ + font-awesome + arduino-ide + xorg.libxkbfile + # dioxus-cli cosmic-files cosmic-player