diff --git a/.sops.yaml b/.sops.yaml deleted file mode 100644 index bbd20611..00000000 --- a/.sops.yaml +++ /dev/null @@ -1,15 +0,0 @@ -keys: - - &chn age19ax6vm3pv8rph5tq3mmehd9sy9jk823tw8svsd790r0lkslycquqvlwz9m - - &chn-PC age1ffvr5pqd2lfj24e3fh53s92z6h76fda3du4y4k6r3yjumdwvpfgqzj033a - - &chn-nixos-test age1thf94z6z4835nxsx56upa3s32vfqq2s6d67rpg7weawj2lrk25asw8smhh -creation_rules: - - path_regex: secrets/chn-PC\.yaml$ - key_groups: - - age: - - *chn - - *chn-PC - - path_regex: secrets/chn-nixos-test\.yaml$ - key_groups: - - age: - - *chn - - *chn-nixos-test diff --git a/flake.lock b/flake.lock index 87f9264c..68d3a4c1 100644 --- a/flake.lock +++ b/flake.lock @@ -1,427 +1,24 @@ { "nodes": { - "aagl": { - "inputs": { - "flake-compat": [ - "flake-compat" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1689026468, - "narHash": "sha256-WRCDX7XjPHJjc7V3EST+fBh8tdE9nbjDnO8bgOeYp90=", - "owner": "ezKEa", - "repo": "aagl-gtk-on-nix", - "rev": "b1fbfb677d402ed1223995ba07980d98a0e8b1c9", - "type": "github" - }, - "original": { - "owner": "ezKEa", - "repo": "aagl-gtk-on-nix", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils-plus": { - "inputs": { - "flake-utils": [ - "flake-utils" - ] - }, - "locked": { - "lastModified": 1657226504, - "narHash": "sha256-GIYNjuq4mJlFgqKsZ+YrgzWm0IpA4axA3MCrdKYj7gs=", - "owner": "gytis-ivaskevicius", - "repo": "flake-utils-plus", - "rev": "2bf0f91643c2e5ae38c1b26893ac2927ac9bd82a", - "type": "github" - }, - "original": { - "owner": "gytis-ivaskevicius", - "repo": "flake-utils-plus", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1688999869, - "narHash": "sha256-gLD2UI6+Nb9JV5Wh4FnLHAZwLMiY11RHYBKmBZCxLXc=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "a6d1d954b81caf4c9291b8ac35452fef842f289b", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "master", - "repo": "home-manager", - "type": "github" - } - }, - "impermanence": { - "locked": { - "lastModified": 1684264534, - "narHash": "sha256-K0zr+ry3FwIo3rN2U/VWAkCJSgBslBisvfRIPwMbuCQ=", - "owner": "nix-community", - "repo": "impermanence", - "rev": "89253fb1518063556edd5e54509c30ac3089d5e6", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "impermanence", - "type": "github" - } - }, - "nix-alien": { - "inputs": { - "flake-compat": [ - "flake-compat" - ], - "flake-utils": [ - "flake-utils" - ], - "nix-index-database": [ - "nix-index-database" - ], - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1688594900, - "narHash": "sha256-ipCs61DPHfmsaTN7LD/LMgqrsL4Tj/LswbkSc2X5Qtg=", - "owner": "thiagokokada", - "repo": "nix-alien", - "rev": "29b969f5a22d29dddd4da0917e9f18a8aacd85de", - "type": "github" - }, - "original": { - "owner": "thiagokokada", - "repo": "nix-alien", - "type": "github" - } - }, - "nix-index-database": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1688874465, - "narHash": "sha256-BUwl+tq40EjkufTZkqf3lWFzxOA/mYBTHz+p5uJtjaY=", - "owner": "Mic92", - "repo": "nix-index-database", - "rev": "757114749d4613cf71f3748e780a1be8a67a5d3c", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "nix-index-database", - "type": "github" - } - }, - "nix-vscode-extensions": { - "inputs": { - "flake-compat": [ - "flake-compat" - ], - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1689040077, - "narHash": "sha256-wjoCkXdnlUyzxJp7+lUlv/OIPUQGACnvcoIhc4Qrnfw=", - "owner": "nix-community", - "repo": "nix-vscode-extensions", - "rev": "4b46dd34c683a6d212e64bbcea6b8512f613c3f2", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-vscode-extensions", - "type": "github" - } - }, - "nixos-cn": { - "inputs": { - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1682818384, - "narHash": "sha256-l8jh9BQj6nfjPDYGyrZkZwX1GaOqBX+pBHU+7fFZU3w=", - "owner": "nixos-cn", - "repo": "flakes", - "rev": "2d475ec68cca251ef6c6c69a9224db5c264c5e5b", - "type": "github" - }, - "original": { - "owner": "nixos-cn", - "repo": "flakes", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1688403656, - "narHash": "sha256-zmNai3dKWUCKpKubPWsEJ1Q7od96KebWVDJNCnk+fr0=", + "lastModified": 1689192006, + "narHash": "sha256-QM0f0d8oPphOTYJebsHioR9+FzJcy1QNIzREyubB91U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "453da3c28f7a95374b73d1f3fd665dd40e6049e9", + "rev": "2de8efefb6ce7f5e4e75bdf57376a96555986841", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1688939073, - "narHash": "sha256-jYhYjeK5s6k8QS3i+ovq9VZqBJaWbxm7awTKNhHL9d0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "8df7a67abaf8aefc8a2839e0b48f92fdcf69a38b", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1689237360, - "narHash": "sha256-3mv2hXri9X3zEagLDaTWzfiHyd5mmstdSACgm+tt+gE=", - "owner": "CHN-beta", - "repo": "nixpkgs", - "rev": "8e22575b0c3288e7d76eec4aa6537925d0f006b8", - "type": "github" - }, - "original": { - "owner": "CHN-beta", - "ref": "next", - "repo": "nixpkgs", - "type": "github" - } - }, - "nur": { - "locked": { - "lastModified": 1689040992, - "narHash": "sha256-BbDqoza/8boSMc9BXfac9v5YYhmzqnHSMkhslOCWxas=", - "owner": "nix-community", - "repo": "NUR", - "rev": "4449587b5a1a8418ebe70c742ff78b0f6092148f", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, - "nur-xddxdd": { - "inputs": { - "flake-utils": [ - "flake-utils" - ], - "flake-utils-plus": [ - "flake-utils-plus" - ], - "nixpkgs": [ - "nixpkgs-stable" - ] - }, - "locked": { - "lastModified": 1688969029, - "narHash": "sha256-mnAhmE/iN1/NJo3slG3xvDuuaoidqPESIcfAeLUyBuE=", - "owner": "xddxdd", - "repo": "nur-packages", - "rev": "6a2a4dd0d470e33cfdc87faf887af9c3b2359fa1", - "type": "github" - }, - "original": { - "owner": "xddxdd", - "repo": "nur-packages", - "type": "github" - } - }, - "nvfetcher": { - "inputs": { - "flake-compat": [ - "flake-compat" - ], - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1687440270, - "narHash": "sha256-aOAXvfVn+MBSkU+xlQEiyoGpRaF6NvQdpWIhw5OH/Dc=", - "owner": "berberman", - "repo": "nvfetcher", - "rev": "44196458acc2c28c32e456c50277d6148e71e708", - "type": "github" - }, - "original": { - "owner": "berberman", - "repo": "nvfetcher", - "type": "github" - } - }, - "qchem": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1686741526, - "narHash": "sha256-1w8o+HXU9ubz1kRYR56g8jHz/dbJuckJGvXIDK4aw1M=", - "owner": "Nix-QChem", - "repo": "NixOS-QChem", - "rev": "2959232611d40f836daa79522c6fb5e96caea295", - "type": "github" - }, - "original": { - "owner": "Nix-QChem", - "repo": "NixOS-QChem", - "type": "github" - } - }, "root": { "inputs": { - "aagl": "aagl", - "flake-compat": "flake-compat", - "flake-utils": "flake-utils", - "flake-utils-plus": "flake-utils-plus", - "home-manager": "home-manager", - "impermanence": "impermanence", - "nix-alien": "nix-alien", - "nix-index-database": "nix-index-database", - "nix-vscode-extensions": "nix-vscode-extensions", - "nixos-cn": "nixos-cn", - "nixpkgs": "nixpkgs_2", - "nixpkgs-stable": "nixpkgs-stable", - "nur": "nur", - "nur-xddxdd": "nur-xddxdd", - "nvfetcher": "nvfetcher", - "qchem": "qchem", - "sops-nix": "sops-nix", - "touchix": "touchix" - } - }, - "sops-nix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": [ - "nixpkgs-stable" - ] - }, - "locked": { - "lastModified": 1688873469, - "narHash": "sha256-9TMSXvXmrr7bDYi+WeskWe/yho9UP01dGbV9vW5bRVc=", - "owner": "Mic92", - "repo": "sops-nix", - "rev": "b2047c8fc963407916ad3834165309007dc5a1f7", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "sops-nix", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "touchix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1685202181, - "narHash": "sha256-yRj9Vh3T1pL+cNxhiQCFyH67Ys1h7pcrOfSZM10Xb+g=", - "owner": "CHN-beta", - "repo": "touchix", - "rev": "9cedc2f3dc007875525af480976d91b2990847de", - "type": "github" - }, - "original": { - "owner": "CHN-beta", - "repo": "touchix", - "type": "github" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index a207352e..1069f3e8 100644 --- a/flake.nix +++ b/flake.nix @@ -1,191 +1,48 @@ { description = "CNH's NixOS Flake"; - inputs = - { - nixpkgs.url = "github:CHN-beta/nixpkgs/next"; - nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05"; - flake-utils.url = "github:numtide/flake-utils"; - flake-utils-plus = - { - url = "github:gytis-ivaskevicius/flake-utils-plus"; - inputs.flake-utils.follows = "flake-utils"; - }; - flake-compat = { url = "github:edolstra/flake-compat"; flake = false; }; - nvfetcher = - { - url = "github:berberman/nvfetcher"; - inputs = - { - nixpkgs.follows = "nixpkgs"; - flake-utils.follows = "flake-utils"; - flake-compat.follows = "flake-compat"; - }; - }; - home-manager = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; - sops-nix = - { - url = "github:Mic92/sops-nix"; - inputs = { nixpkgs.follows = "nixpkgs"; nixpkgs-stable.follows = "nixpkgs-stable"; }; - }; - touchix = { url = "github:CHN-beta/touchix"; inputs.nixpkgs.follows = "nixpkgs"; }; - aagl = - { - url = "github:ezKEa/aagl-gtk-on-nix"; - inputs = { nixpkgs.follows = "nixpkgs"; flake-compat.follows = "flake-compat"; }; - }; - nix-index-database = { url = "github:Mic92/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; }; - nur.url = "github:nix-community/NUR"; - nixos-cn = - { - url = "github:nixos-cn/flakes"; - inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; - }; - nur-xddxdd = - { - url = "github:xddxdd/nur-packages"; - inputs = - { - flake-utils.follows = "flake-utils"; - nixpkgs.follows = "nixpkgs-stable"; - flake-utils-plus.follows = "flake-utils-plus"; - }; - }; - nix-vscode-extensions = - { - url = "github:nix-community/nix-vscode-extensions"; - inputs = - { - nixpkgs.follows = "nixpkgs"; - flake-utils.follows = "flake-utils"; - flake-compat.follows = "flake-compat"; - }; - }; - nix-alien = - { - url = "github:thiagokokada/nix-alien"; - inputs = - { - flake-compat.follows = "flake-compat"; - flake-utils.follows = "flake-utils"; - nix-index-database.follows = "nix-index-database"; - }; - }; - impermanence.url = "github:nix-community/impermanence"; - qchem = - { - url = "github:Nix-QChem/NixOS-QChem"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; outputs = inputs: - let - local = import ./local; - in + { + nixosConfigurations = { - nixosConfigurations = + "good-config" = inputs.nixpkgs.lib.nixosSystem { - "chn-PC" = inputs.nixpkgs.lib.nixosSystem - { - system = "x86_64-linux"; - specialArgs = { topInputs = inputs; localLib = local.lib; }; - modules = - [ - inputs.home-manager.nixosModules.home-manager - inputs.sops-nix.nixosModules.sops - inputs.touchix.nixosModules.v2ray-forwarder - inputs.aagl.nixosModules.default - inputs.nix-index-database.nixosModules.nix-index - inputs.nur.nixosModules.nur - inputs.nur-xddxdd.nixosModules.setupOverlay - inputs.impermanence.nixosModules.impermanence - (args: { - config.nixpkgs = - { - overlays = - [ - ( - final: prev: - { - touchix = inputs.touchix.packages."${prev.system}"; - nix-vscode-extensions = inputs.nix-vscode-extensions.extensions."${prev.system}"; - localPackages = local.pkgs { pkgs = prev; }; - } - ) - inputs.qchem.overlays.default - ( - final: prev: { nur-xddxdd = - (inputs.nur-xddxdd.overlays.custom args.config.boot.kernelPackages.nvidia_x11) final prev; } - ) - ]; - config.allowUnfree = true; - }; - }) - ( - local.lib.mkModules - [ - ./modules/boot/fileSystems.nix - (inputs: { config.nixos = - { - fileSystems = - { - mount = - { - vfat."/dev/disk/by-uuid/3F57-0EBE" = "/boot/efi"; - btrfs = - { - "/dev/disk/by-uuid/02e426ec-cfa2-4a18-b3a5-57ef04d66614"."/" = "/boot"; - "/dev/mapper/root"."/nix" = "/nix"; - }; - }; - decrypt.auto = - { - "/dev/disk/by-uuid/55fdd19f-0f1d-4c37-bd4e-6df44fc31f26" = { mapper = "root"; ssd = true; }; - "/dev/md/swap" = { mapper = "swap"; ssd = true; }; - }; - mdadm = - "ARRAY /dev/md/swap metadata=1.2 name=chn-PC:swap UUID=2b546b8d:e38007c8:02990dd1:df9e23a4"; - swap = [ "/dev/mapper/swap" ]; - resume = "/dev/mapper/swap"; - }; - };} - ) - - [ ./modules/basic.nix { hostName = "chn-PC"; } ] - ./modules/fonts.nix - [ ./modules/i18n.nix { fcitx = true; } ] - ./modules/kde.nix - ./modules/sops.nix - ./modules/boot/chn-PC.nix - ./modules/hardware/bluetooth.nix - ./modules/hardware/joystick.nix - [ ./modules/hardware/nvidia-prime.nix { intelBusId = "PCI:0:2:0"; nvidiaBusId = "PCI:1:0:0"; } ] - ./modules/hardware/printer.nix - ./modules/hardware/sound.nix - ./modules/hardware/chn-PC.nix - ./modules/networking/basic.nix - ./modules/networking/samba.nix - ./modules/networking/ssh.nix - ./modules/networking/wall_client.nix - ./modules/networking/xmunet.nix - ./modules/networking/chn-PC.nix - ./modules/packages/terminal.nix - ./modules/packages/gui.nix - ./modules/packages/gaming.nix - ./modules/packages/hpc.nix - [ ./modules/users/root.nix {} ] - [ ./modules/users/chn.nix {} ] - ./modules/virtualisation/docker.nix - ./modules/virtualisation/kvm_guest.nix - ./modules/virtualisation/kvm_host.nix - ./modules/virtualisation/waydroid.nix - ./modules/home/root.nix - ./modules/home/chn.nix - ] - ) - ]; - }; + system = "x86_64-linux"; + modules = + [({ + nixpkgs.overlays = [(final: prev: + { + clang-hello = final.callPackage ({ llvmPackages }: llvmPackages.stdenv.mkDerivation + { + pname = "clang-hello"; + version = "0"; + phases = [ "installPhase" ]; + installPhase = "clang --version > $out"; + }) {}; + })]; + })]; + }; + "bad-config" = inputs.nixpkgs.lib.nixosSystem + { + system = "x86_64-linux"; + modules = + [({ + nixpkgs.overlays = [(final: prev: + { + clang-hello = final.callPackage ({ llvmPackages }: llvmPackages.stdenv.mkDerivation + { + pname = "clang-hello"; + version = "0"; + phases = [ "installPhase" ]; + installPhase = "clang --version > $out"; + }) {}; + })]; + programs.ccache.enable = true; + nixpkgs.config.replaceStdenv = { pkgs }: pkgs.ccacheStdenv; + })]; }; }; + }; } diff --git a/local/default.nix b/local/default.nix deleted file mode 100644 index 54825d77..00000000 --- a/local/default.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ - lib = import ./lib; - pkgs = import ./pkgs; -} diff --git a/local/lib/attrsToList.nix b/local/lib/attrsToList.nix deleted file mode 100644 index 9a737bb6..00000000 --- a/local/lib/attrsToList.nix +++ /dev/null @@ -1 +0,0 @@ -Attrs: builtins.map ( name: { inherit name; value = Attrs.${name}; } ) ( builtins.attrNames Attrs ) diff --git a/local/lib/default.nix b/local/lib/default.nix deleted file mode 100644 index 51804361..00000000 --- a/local/lib/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - mkModules = import ./mkModules.nix; - mkSystem = import ./mkSystems.nix; - mkInputs = import ./mkInputs.nix; - attrsToList = import ./attrsToList.nix; -} diff --git a/local/lib/mkModules.nix b/local/lib/mkModules.nix deleted file mode 100644 index f5b5dd9c..00000000 --- a/local/lib/mkModules.nix +++ /dev/null @@ -1,45 +0,0 @@ -# Behaviors of these two NixOS modules would be different: -# { pkgs, ... }@inputs: { environment.systemPackages = [ pkgs.hello ]; } -# inputs: { environment.systemPackages = [ pkgs.hello ]; } -# The second one would failed to evaluate because nixpkgs would not pass pkgs to it. -# So that we wrote a wrapper to make it always works like the first one. -# Input a list of modules, allowed types are: -# * attribute set -# * file containing attribute set -# * file containing lambda, which takes inputs as argument -# * lambda, which takes inputs as argument -# * list, first member is a lambda, -moduleList: { pkgs, ... }@inputs: -{ - imports = builtins.map - ( - let - handle = { module, customArgs }: - if ( builtins.typeOf module ) == "list" - then handle { module = builtins.elemAt module 0; customArgs = builtins.elemAt module 1; } - else if ( builtins.typeOf module ) == "path" - then handle { module = import module; inherit customArgs; } - else if ( builtins.typeOf module ) == "lambda" && customArgs != null # deprecated - then handle { module = module customArgs; customArgs = null; } - else if ( builtins.typeOf module ) == "lambda" then module inputs # deprecated - else module; - caller = module: handle { inherit module; customArgs = null; }; - in caller - ) moduleList; -} - -# Behaviors of these two NixOS modules would be different: -# { pkgs, ... }@inputs: { environment.systemPackages = [ pkgs.hello ]; } -# inputs: { environment.systemPackages = [ pkgs.hello ]; } -# The second one would failed to evaluate because nixpkgs would not pass pkgs to it. -# So that we wrote a wrapper to make it always works like the first one. -# moduleList: { pkgs, ... }@inputs: -# { -# imports = builtins.map -# ( -# handle = module: -# if ( builtins.typeOf module ) == "path" then handle import module -# else if ( builtins.typeOf module ) == "lambda" then module inputs -# else module; -# ) moduleList; -# } diff --git a/local/pkgs/clang-hello/default.nix b/local/pkgs/clang-hello/default.nix deleted file mode 100644 index f848f8c4..00000000 --- a/local/pkgs/clang-hello/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ lib, llvmPackages }: - -llvmPackages.stdenv.mkDerivation -{ - pname = "clang-hello"; - version = "0"; - - phases = [ "installPhase" ]; - - installPhase = - '' - clang --version > $out - ''; -} diff --git a/local/pkgs/default.nix b/local/pkgs/default.nix deleted file mode 100644 index 5b2a8512..00000000 --- a/local/pkgs/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ pkgs }: with pkgs; -{ - typora = callPackage ./typora {}; - upho = python3Packages.callPackage ./upho {}; - spectral = python3Packages.callPackage ./spectral {}; - vesta = callPackage ./vesta {}; - clang-hello = callPackage ./clang-hello {}; -} diff --git a/local/pkgs/spectral/default.nix b/local/pkgs/spectral/default.nix deleted file mode 100644 index 553d5735..00000000 --- a/local/pkgs/spectral/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - lib, fetchPypi, buildPythonPackage, - numpy, pillow, wxPython_4_2, matplotlib, ipython, pyopengl -}: buildPythonPackage rec -{ - pname = "spectral"; - version = "0.23.1"; - src = fetchPypi - { - inherit pname version; - sha256 = "sha256-4YIic1Je81g7J6lmIm1Vr+CefSmnI2z82LwN+x+Wj8I="; - }; - doCheck = false; - propagatedBuildInputs = [ numpy pillow wxPython_4_2 matplotlib ipython pyopengl ]; -} diff --git a/local/pkgs/typora/default.nix b/local/pkgs/typora/default.nix deleted file mode 100644 index c4bdae02..00000000 --- a/local/pkgs/typora/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ lib, stdenv, steam-run, fetchurl, writeShellScript }: -let - typora-dist = stdenv.mkDerivation rec - { - pname = "typora-dist"; - version = "1.6.6"; - src = fetchurl - { - url = "https://download.typora.io/linux/typora_${version}_amd64.deb"; - sha256 = "sha256-77mCgmsROLhfuOmOOyl2C5Ug2NfqEvcD+kMA3aiAQtA="; - }; - - dontFixup = true; - - unpackPhase = - '' - ar x ${src} - tar xf data.tar.xz - ''; - installPhase = - '' - mkdir -p $out - mv usr/share $out - ''; - }; -in stdenv.mkDerivation rec -{ - pname = "typora"; - inherit (typora-dist) version; - BuildInputs = [ typora-dist steam-run ]; - startScript = writeShellScript "typora" "${steam-run}/bin/steam-run ${typora-dist}/share/typora/Typora $@"; - phases = [ "installPhase" ]; - installPhase = - '' - mkdir -p $out/bin $out/share/applications - ln -s ${startScript} $out/bin/typora - cp ${typora-dist}/share/applications/typora.desktop $out/share/applications - sed -i "s|Exec=.*|Exec=${startScript} %U|g" $out/share/applications/typora.desktop - sed -i "s|Icon=.*|Icon=${typora-dist}/share/icons/hicolor/256x256/apps/typora.png|g" \ - $out/share/applications/typora.desktop - ''; -} diff --git a/local/pkgs/upho/default.nix b/local/pkgs/upho/default.nix deleted file mode 100644 index 95829e1a..00000000 --- a/local/pkgs/upho/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ lib, fetchFromGitHub, buildPythonPackage, numpy, h5py, phonopy }: buildPythonPackage rec -{ - pname = "upho"; - version = "0.6.6"; - src = fetchFromGitHub - { - owner = "CHN-beta"; - repo = "upho"; - rev = "0f27ac6918e8972c70692816438e4ac37ec6b348"; - sha256 = "sha256-NvoV+AUH9MmGT4ohrLAAvpLs8APP2DOKYlZVliHrVRM="; - }; - doCheck = false; - propagatedBuildInputs = [ numpy h5py phonopy ]; -} diff --git a/local/pkgs/vesta/default.nix b/local/pkgs/vesta/default.nix deleted file mode 100644 index b84d4d45..00000000 --- a/local/pkgs/vesta/default.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - lib, stdenv, fetchurl, autoPatchelfHook, wrapGAppsHook, - glib, gtk2, xorg, libGLU, gtk3, writeShellScript, gsettings-desktop-schemas, xdg-utils -}: - -stdenv.mkDerivation rec -{ - pname = "vesta"; - version = "3.5.5"; - src = fetchurl - { - url = "https://jp-minerals.org/vesta/archives/${version}/VESTA-gtk3.tar.bz2"; - sha256 = "sRzQNJA7+hsjLWmykqe6bH0p1/aGEB8hCuxCyPzxYHs="; - }; - desktopFile = fetchurl - { - url = "https://aur.archlinux.org/cgit/aur.git/plain/VESTA.desktop?h=vesta&id=4fae08afc37ee0fd88d14328cf0d6b308fea04d1"; - sha256 = "Tq4AzQgde2KIWKA1k6JlxvdphGG9JluHMZjVw0fBUeQ="; - }; - - nativeBuildInputs = [ glib autoPatchelfHook gtk2 xorg.libXxf86vm libGLU gtk3 xorg.libXtst wrapGAppsHook ]; - # buildInputs = [ makeWrapper ]; - - unpackPhase = "tar -xf ${src}"; - - installPhase = - # Note '<<-' here, it strips tabs before EOF. It doesn't work with spaces - '' - echo $out - mkdir -p $out/share/applications - cp ${desktopFile} $out/share/applications/vesta.desktop - sed -i "s|Exec=.*|Exec=$out/bin/vesta|" $out/share/applications/vesta.desktop - sed -i "s|Icon=.*|Icon=$out/opt/VESTA-gtk3/img/logo.png|" $out/share/applications/vesta.desktop - - mkdir -p $out/opt - cp -r VESTA-gtk3 $out/opt/VESTA-gtk3 - - mkdir -p $out/bin - tee $out/bin/vesta <<- EOF - #!${stdenv.shell} - export XDG_DATA_DIRS=$GSETTINGS_SCHEMAS_PATH\''${XDG_DATA_DIRS:+:}\$XDG_DATA_DIRS - export PATH="\$PATH\''${PATH:+:}${xdg-utils}/bin" - $out/opt/VESTA-gtk3/VESTA "\$@" - EOF - chmod +x $out/bin/vesta - - patchelf --remove-needed libjawt.so $out/opt/VESTA-gtk3/PowderPlot/libswt-awt-gtk-3346.so - ''; -} diff --git a/modules/basic.nix b/modules/basic.nix deleted file mode 100644 index 1606d765..00000000 --- a/modules/basic.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ hostName }: inputs: -{ - config = - { - nixpkgs.hostPlatform = inputs.lib.mkDefault "x86_64-linux"; - nix = - { - settings = - { - experimental-features = [ "nix-command" "flakes" ]; - keep-outputs = true; - system-features = [ "big-parallel" ]; - keep-failed = true; - auto-optimise-store = true; - }; - daemonIOSchedClass = "idle"; - daemonCPUSchedPolicy = "idle"; - registry = - { - nixpkgs.flake = inputs.topInputs.nixpkgs; - nixos-config.flake = inputs.topInputs.self; - }; - # nixPath = - # [ - # "nixpkgs=/etc/channels/nixpkgs" - # "nixos-config=/etc/nixos/configuration.nix" - # "/nix/var/nix/profiles/per-user/root/channels" - # ]; - }; - networking.hostName = hostName; - time.timeZone = "Asia/Shanghai"; - system = - { - stateVersion = "22.11"; - configurationRevision = inputs.topInputs.self.rev or "dirty"; - }; - nixpkgs.config.allowUnfree = true; - systemd = - { - extraConfig = - " - DefaultTimeoutStopSec=10s - DefaultLimitNOFILE=1048576:1048576 - "; - user.extraConfig = "DefaultTimeoutStopSec=10s"; - sleep.extraConfig = - " - SuspendState=freeze - HibernateMode=shutdown - "; - services.nix-daemon.serviceConfig = { Slice = "-.slice"; Nice = "19"; }; - }; - programs.nix-ld.enable = true; - boot = { supportedFilesystems = [ "ntfs" ]; consoleLogLevel = 7; }; - hardware.enableAllFirmware = true; - security.pam = - { - u2f = { enable = true; cue = true; authFile = ./u2f_keys; }; - services = builtins.listToAttrs (builtins.map (name: { inherit name; value = { u2fAuth = true; }; }) - [ "login" "sudo" "su" "kde" "polkit-1" ]); - }; - systemd.nspawn.arch = - { - execConfig.PrivateUsers = false; - networkConfig.VirtualEthernet = false; - }; - environment.etc."channels/nixpkgs".source = inputs.topInputs.nixpkgs.outPath; - # environment.pathsToLink = [ "/include" ]; - # environment.variables.CPATH = "/run/current-system/sw/include"; - # environment.variables.LIBRARY_PATH = "/run/current-system/sw/lib"; - }; -} diff --git a/modules/boot/chn-PC.nix b/modules/boot/chn-PC.nix deleted file mode 100644 index 5ed778f8..00000000 --- a/modules/boot/chn-PC.nix +++ /dev/null @@ -1,184 +0,0 @@ -inputs: -{ - config = - { - # filesystem mount - fileSystems."/" = - { - device = "/dev/mapper/root"; - fsType = "btrfs"; - options = [ "subvol=nix/rootfs/current" "compress-force=zstd" ]; - }; - # sudo btrfs fi mkswapfile --size 64g --uuid clear swap - # sudo btrfs inspect-internal map-swapfile -r swap - # sudo mdadm --create /dev/md/swap --level 0 --raid-devices 2 /dev/nvme1n1p5 /dev/nvme0n1p5 - # sudo mkswap --uuid clear /dev/md/swap - # sudo cryptsetup luksFormat /dev/md/swap - # sudo systemd-cryptenroll --fido2-device=auto /dev/md/swap - # sudo systemd-cryptenroll --wipe-slot=0 /dev/md/swap - # sudo $(dirname $(realpath $(which systemctl)))/../lib/systemd/systemd-cryptsetup \ - # attach swap /dev/md/swap - fido2-device=auto - # sudo mkswap --uuid clear /dev/mapper/swap - - # kernel, modules, ucode - boot.kernelPackages = inputs.pkgs.linuxPackages_xanmod_latest; - hardware.cpu.intel.updateMicrocode = true; - # modules auto loaded in stage2 - boot.kernelModules = [ "kvm-intel" "br_netfilter" ]; - # modules install but not auto loaded - # boot.extraModulePackages = [ yourmodulename ]; - boot.extraModprobeConfig = - '' - options kvm_intel nested=1 - options iwlmvm power_scheme=1 - options iwlwifi uapsd_disable=1 - ''; - boot.kernelParams = [ "delayacct" "acpi_osi=Linux" ]; - boot.kernelPatches = - [ - { name = "hdmi"; patch = ./hdmi.patch; } - { - name = "cjktty"; - patch = inputs.pkgs.fetchurl - { - url = "https://raw.githubusercontent.com/zhmars/cjktty-patches/master/v6.x/cjktty-6.3.patch"; - sha256 = "sha256-QnsWruzhtiZnqzTUXkPk9Hb19Iddr4VTWXyV4r+iLvE="; - }; - extraStructuredConfig = { FONT_CJK_16x16 = inputs.lib.kernel.yes; FONT_CJK_32x32 = inputs.lib.kernel.yes; }; - } - { - name = "custom config"; - patch = null; - extraStructuredConfig = - { - GENERIC_CPU = inputs.lib.kernel.no; - MALDERLAKE = inputs.lib.kernel.yes; - PREEMPT_VOLUNTARY = inputs.lib.mkForce inputs.lib.kernel.no; - PREEMPT = inputs.lib.mkForce inputs.lib.kernel.yes; - HZ_500 = inputs.lib.mkForce inputs.lib.kernel.no; - HZ_1000 = inputs.lib.mkForce inputs.lib.kernel.yes; - HZ = inputs.lib.mkForce (inputs.lib.kernel.freeform "1000"); - }; - } - ]; - - # grub - boot.loader = - { - timeout = 5; - efi = { canTouchEfiVariables = true; efiSysMountPoint = "/boot/efi"; }; - grub = - { - enable = true; - # for BIOS, set disk to install; for EFI, set nodev - device = "nodev"; - efiSupport = true; - useOSProber = false; - extraEntries = - '' - menuentry "Windows" { - insmod part_gpt - insmod fat - insmod search_fs_uuid - insmod chain - search --fs-uuid --set=root 7317-1DB6 - chainloader /EFI/Microsoft/Boot/bootmgfw.efi - } - menuentry "Windows for malware" { - insmod part_gpt - insmod fat - insmod search_fs_uuid - insmod chain - search --fs-uuid --set=root 7321-FA9C - chainloader /EFI/Microsoft/Boot/bootmgfw.efi - } - ''; - }; - }; - - # initrd, luks - boot.initrd = - { - systemd = - { - enable = true; - services.create-current-rootfs = - { - wantedBy = [ "local-fs-pre.target" ]; - after = [ "cryptsetup.target" ]; - before = [ "local-fs-pre.target" ]; - unitConfig.DefaultDependencies = false; - serviceConfig.Type = "oneshot"; - script = - '' - mount /dev/mapper/root /mnt -m - if [ -f /mnt/nix/rootfs/current/.timestamp ] - then - mv /mnt/nix/rootfs/current /mnt/nix/rootfs/$(cat /mnt/nix/rootfs/current/.timestamp) - fi - btrfs subvolume create /mnt/nix/rootfs/current - echo $(date '+%Y%m%d%H%M%S') > /mnt/nix/rootfs/current/.timestamp - umount /mnt - ''; - }; - }; - # modules in initrd - # modprobe --show-depends - availableKernelModules = - [ - "ahci" "bfq" "i915" "intel_cstate" "nls_cp437" "nls_iso8859-1" "nvidia" "nvidia_drm" "nvidia_modeset" - "nvidia_uvm" "nvme" "sr_mod" "usbhid" "usb_storage" "virtio_blk" "virtio_pci" "xhci_pci" - ] - # speed up luks decryption - ++ [ "aesni_intel" "cryptd" "crypto_simd" "libaes" ]; - }; - - # impermanence - environment.persistence."/nix/persistent" = - { - hideMounts = true; - directories = - [ - "/etc/NetworkManager/system-connections" - "/home" - "/root" - "/var" - ]; - files = - [ - "/etc/machine-id" - "/etc/ssh/ssh_host_ed25519_key.pub" - "/etc/ssh/ssh_host_ed25519_key" - "/etc/ssh/ssh_host_rsa_key.pub" - "/etc/ssh/ssh_host_rsa_key" - ]; - }; - - # services - systemd.services = - { - nix-daemon = { environment = { TMPDIR = "/var/cache/nix"; }; serviceConfig = { CacheDirectory = "nix"; }; }; - systemd-tmpfiles-setup = { environment = { SYSTEMD_TMPFILES_FORCE_SUBVOL = "0"; }; }; - }; - services = - { - snapper.configs.persistent = - { - SUBVOLUME = "/nix/persistent"; - TIMELINE_CREATE = true; - TIMELINE_CLEANUP = true; - TIMELINE_MIN_AGE = 1800; - TIMELINE_LIMIT_HOURLY = "10"; - TIMELINE_LIMIT_DAILY = "7"; - TIMELINE_LIMIT_WEEKLY = "1"; - TIMELINE_LIMIT_MONTHLY = "0"; - TIMELINE_LIMIT_YEARLY = "0"; - }; - udev.extraRules = - '' - ACTION=="add|change", KERNEL=="[sv]d[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="bfq" - ACTION=="add|change", KERNEL=="nvme[0-9]n[0-9]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="bfq" - ''; - }; - }; -} diff --git a/modules/boot/fileSystems.nix b/modules/boot/fileSystems.nix deleted file mode 100644 index fc3941f8..00000000 --- a/modules/boot/fileSystems.nix +++ /dev/null @@ -1,119 +0,0 @@ -inputs: -{ - options.nixos.fileSystems = let inherit (inputs.lib) mkOption types; in - { - mount = - { - # device = mountPoint; - vfat = mkOption { type = types.attrsOf types.nonEmptyStr; }; - # device.subvol = mountPoint; - btrfs = mkOption { type = types.attrsOf (types.attrsOf types.nonEmptyStr); }; - }; - decrypt.auto = mkOption { type = types.attrsOf (types.submodule { options = - { - mapper = mkOption { type = types.nonEmptyStr; }; - ssd = mkOption { type = types.bool; default = false; }; - }; }); }; - mdadm = mkOption { type = types.nullOr types.str; }; - swap = mkOption { type = types.listOf types.nonEmptyStr; }; - resume = mkOption { type = types.nullOr (types.str or (types.submodule { options = - { device = mkOption { type = types.nonEmptyStr; }; offset = mkOption { type = types.ints.unsigned; }; }; })); }; - # cleanRootfs = mkOption { type = types.nullOr - - # swap and resume - # swap != resume.device if swap is a file - # swap = mkOption { type = types.nullOr types.str; }; - # resume = - # { - # device = mkOption { type = types.nullOr types.str; }; - # # sudo btrfs fi mkswapfile --size 64g --uuid clear swap - # # sudo btrfs inspect-internal map-swapfile -r swap - # offset = mkOption { type = types.nullOr types.ints.unsigned; }; - # }; - }; - config = - { - fileSystems = - ( - builtins.listToAttrs (builtins.map - (device: { name = device.value; value = { device = device.name; fsType = "vfat"; }; }) - (inputs.localLib.attrsToList inputs.config.nixos.fileSystems.mount.vfat)) - ) - // ( - builtins.listToAttrs (builtins.concatLists (builtins.map - ( - device: builtins.map - ( - subvol: - { - name = subvol.value; - value = - { - device = device.name; - fsType = "btrfs"; - options = [ "compress-force=zstd:8" "subvol=${subvol.name}" ]; - }; - } - ) - (inputs.localLib.attrsToList device.value) - ) - (inputs.localLib.attrsToList inputs.config.nixos.fileSystems.mount.btrfs))) - ); - swapDevices = builtins.map (device: { device = device; }) inputs.config.nixos.fileSystems.swap; - boot = - { - initrd = {} - // ( - if inputs.config.nixos.fileSystems.decrypt.auto != null then - { - luks.devices = - ( - builtins.listToAttrs (builtins.map - ( - device: - { - name = device.value.mapper; - value = - { - device = device.name; - allowDiscards = device.value.ssd; - bypassWorkqueues = device.value.ssd; - crypttabExtraOpts = [ "fido2-device=auto" ]; - }; - } - ) - (inputs.localLib.attrsToList inputs.config.nixos.fileSystems.decrypt.auto)) - ); - } - else {} - ) - // ( - if inputs.config.nixos.fileSystems.mdadm != null then - { services.swraid = { enable = true; mdadmConf = inputs.config.nixos.fileSystems.mdadm; }; } - else {} - ); - } - // ( - if inputs.config.nixos.fileSystems.resume != null then - if builtins.typeOf inputs.config.nixos.fileSystems.resume == "string" then - { resumeDevice = inputs.config.nixos.fileSystems.resume; } - else - { - resumeDevice = inputs.config.nixos.fileSystems.resume.device; - kernelModules = [ "resume_offset=${inputs.config.nixos.fileSystems.resume.offset}" ]; - } - else {} - ); - }; -} - -# Disable CoW for VM image and database: -# sudo chattr +C images -# zstd:15 cause sound stuttering -# From btrfs wiki: 1-3 are real-time, 4-8 slower with improved compression, -# 9-15 try even harder though the resulting size may not be significantly improved. -# https://btrfs.readthedocs.io/en/latest/Compression.html -# sudo btrfs filesystem resize -50G /nix -# sudo cryptsetup status root -# sudo cryptsetup -b 3787456512 resize root -# sudo cfdisk /dev/nvme1n1p3 diff --git a/modules/boot/hdmi.patch b/modules/boot/hdmi.patch deleted file mode 100644 index 302d422f..00000000 --- a/modules/boot/hdmi.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c -index 55544d484318..d6f257f8fd14 100644 ---- a/drivers/gpu/drm/i915/display/intel_bios.c -+++ b/drivers/gpu/drm/i915/display/intel_bios.c -@@ -2708,7 +2708,7 @@ static void parse_ddi_port(struct intel_bios_encoder_data *devdata) - if (i915->display.vbt.ports[port]) { - drm_dbg_kms(&i915->drm, - "More than one child device for port %c in VBT, using the first.\n", - port_name(port)); -- return; -+ // return; - } - - sanitize_device_type(devdata, port); \ No newline at end of file diff --git a/modules/fonts.nix b/modules/fonts.nix deleted file mode 100644 index c71f2128..00000000 --- a/modules/fonts.nix +++ /dev/null @@ -1,16 +0,0 @@ -inputs: -{ - config.fonts = - { - fontDir.enable = true; - fonts = with inputs.pkgs; - [ noto-fonts source-han-sans source-han-serif source-code-pro hack-font jetbrains-mono nerdfonts ]; - fontconfig.defaultFonts = - { - emoji = [ "Noto Color Emoji" ]; - monospace = [ "Noto Sans Mono CJK SC" "Sarasa Mono SC" "DejaVu Sans Mono"]; - sansSerif = [ "Noto Sans CJK SC" "Source Han Sans SC" "DejaVu Sans" ]; - serif = [ "Noto Serif CJK SC" "Source Han Serif SC" "DejaVu Serif" ]; - }; - }; -} diff --git a/modules/hardware/bluetooth.nix b/modules/hardware/bluetooth.nix deleted file mode 100644 index db80e6fa..00000000 --- a/modules/hardware/bluetooth.nix +++ /dev/null @@ -1 +0,0 @@ -{ config.hardware.bluetooth.enable = true; } diff --git a/modules/hardware/chn-PC.nix b/modules/hardware/chn-PC.nix deleted file mode 100644 index b15e74e1..00000000 --- a/modules/hardware/chn-PC.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ pkgs, ... }@inputs: -{ - config = - { - nix.settings.system-features = [ "nixos-test" "benchmark" "kvm" "gccarch-alderlake" ]; - nixpkgs = - { - hostPlatform = { system = "x86_64-linux"; gcc = { arch = "alderlake"; tune = "alderlake"; }; }; - config.allowUnfree = true; - overlays = - [( - final: prev: - let - generic-pkgs = (inputs.topInputs.nixpkgs.lib.nixosSystem - { - system = "x86_64-linux"; - modules = [{ config.nixpkgs.config.allowUnfree = true; }]; - }).pkgs; - in - { - pandoc = generic-pkgs.pandoc; - fwupd = generic-pkgs.fwupd; - } - )]; - config.qchem-config.optArch = "alderlake"; - }; - services.dbus.implementation = "broker"; - programs.dconf.enable = true; - hardware.opengl.extraPackages = with inputs.pkgs; [ intel-media-driver intel-ocl ]; - systemd.services = - { - reload-iwlwifi-after-hibernate = - { - description = "reload iwlwifi after resume from hibernate"; - after = [ "systemd-hibernate.service" ]; - serviceConfig = - { - Type = "oneshot"; - ExecStart = let inherit (inputs.pkgs) kmod bash; in - [ - "${kmod}/bin/modprobe -r iwlwifi" "${kmod}/bin/modprobe iwlwifi" - "${bash}/bin/bash -c 'echo 0 /sys/devices/system/cpu/intel_pstate/no_turbo'" - ]; - }; - wantedBy = [ "systemd-hibernate.service" ]; - }; - lid-no-wakeup = - { - description = "lid no wake up"; - serviceConfig.ExecStart = let inherit (inputs.pkgs) bash coreutils gnugrep; in - "${bash}/bin/bash -c '" - + "if ${coreutils}/bin/cat /proc/acpi/wakeup | " - + "${gnugrep}/bin/grep LID0 | " - + "${gnugrep}/bin/grep -q enabled; then " - + "echo LID0 > /proc/acpi/wakeup; " - + "fi" - + "'"; - wantedBy = [ "multi-user.target" ]; - }; - }; - boot.kernel.sysctl = - { - "net.core.rmem_max" = 67108864; - "net.core.wmem_max" = 67108864; - "net.ipv4.tcp_rmem" = "4096 87380 67108864"; - "net.ipv4.tcp_wmem" = "4096 65536 67108864"; - "net.ipv4.tcp_mtu_probing" = true; - "net.ipv4.tcp_tw_reuse" = true; - "vm.swappiness" = 10; - "net.ipv4.tcp_max_syn_backlog" = 8388608; - "net.core.netdev_max_backlog" = 8388608; - "net.core.somaxconn" = 8388608; - "vm.oom_kill_allocating_task" = true; - "vm.oom_dump_tasks" = false; - "vm.overcommit_kbytes" = 22020096; - "dev.i915.perf_stream_paranoid" = false; - }; - }; -} diff --git a/modules/hardware/joystick.nix b/modules/hardware/joystick.nix deleted file mode 100644 index 068633cf..00000000 --- a/modules/hardware/joystick.nix +++ /dev/null @@ -1 +0,0 @@ -{ config.hardware = { xone.enable = true; xpadneo.enable = true; }; } diff --git a/modules/hardware/nvidia-prime.nix b/modules/hardware/nvidia-prime.nix deleted file mode 100644 index 4b8665da..00000000 --- a/modules/hardware/nvidia-prime.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ intelBusId, nvidiaBusId }: inputs: -{ - config = - { - services.xserver.videoDrivers = inputs.lib.mkBefore [ "intel" "nvidia" ]; - hardware.nvidia.prime = - { - offload.enable = true; - intelBusId = intelBusId; - nvidiaBusId = nvidiaBusId; - }; - environment.systemPackages = - [( - inputs.pkgs.writeShellScriptBin "nvidia-offload" - '' - export __NV_PRIME_RENDER_OFFLOAD=1 - export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 - export __GLX_VENDOR_LIBRARY_NAME=nvidia - export __VK_LAYER_NV_optimus=NVIDIA_only - exec "$@" - '' - )]; - }; -} diff --git a/modules/hardware/printer.nix b/modules/hardware/printer.nix deleted file mode 100644 index 7b05580f..00000000 --- a/modules/hardware/printer.nix +++ /dev/null @@ -1,8 +0,0 @@ -inputs: -{ - config.services = - { - printing = { enable = true; drivers = [ inputs.pkgs.cnijfilter2 ]; }; - avahi = { enable = true; nssmdns = true; openFirewall = true; }; - }; -} diff --git a/modules/hardware/sound.nix b/modules/hardware/sound.nix deleted file mode 100644 index da588868..00000000 --- a/modules/hardware/sound.nix +++ /dev/null @@ -1,19 +0,0 @@ -inputs: -{ - config = - { - sound = - { - enable = true; - extraConfig = "session.suspend-timeout-seconds 0"; - }; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = - { - enable = true; - alsa = { enable = true; support32Bit = true; }; - pulse.enable = true; - }; - }; -} diff --git a/modules/home/chn.nix b/modules/home/chn.nix deleted file mode 100644 index d634745b..00000000 --- a/modules/home/chn.nix +++ /dev/null @@ -1,13 +0,0 @@ -inputs: -{ - config = - { - home-manager.users.chn = { pkgs, ... }: - { - home.stateVersion = "22.11"; - programs.zsh = import ./zsh.nix { inherit pkgs; }; - programs.direnv.enable = true; - programs.direnv.nix-direnv.enable = true; - }; - }; -} diff --git a/modules/home/p10k-config/p10k.zsh b/modules/home/p10k-config/p10k.zsh deleted file mode 100644 index af0075c8..00000000 --- a/modules/home/p10k-config/p10k.zsh +++ /dev/null @@ -1,1706 +0,0 @@ -# Generated by Powerlevel10k configuration wizard on 2022-01-29 at 11:04 CST. -# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 25238. -# Wizard options: nerdfont-complete + powerline, small icons, rainbow, unicode, -# 24h time, angled separators, sharp heads, flat tails, 2 lines, dotted, full frame, -# lightest-ornaments, sparse, many icons, concise, instant_prompt=verbose. -# Type `p10k configure` to generate another config. -# -# Config for Powerlevel10k with powerline prompt style with colorful background. -# Type `p10k configure` to generate your own config based on it. -# -# Tip: Looking for a nice color? Here's a one-liner to print colormap. -# -# for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done - -# Temporarily change options. -'builtin' 'local' '-a' 'p10k_config_opts' -[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') -[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') -[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') -'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' - -() { - emulate -L zsh -o extended_glob - - # Unset all configuration options. This allows you to apply configuration changes without - # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. - unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' - - # Zsh >= 5.1 is required. - autoload -Uz is-at-least && is-at-least 5.1 || return - - # The list of segments shown on the left. Fill it with the most important segments. - typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( - # =========================[ Line #1 ]========================= - os_icon # os identifier - dir # current directory - # =========================[ Line #2 ]========================= - newline # \n - # prompt_char # prompt symbol - ) - - # The list of segments shown on the right. Fill it with less important segments. - # Right prompt on the last prompt line (where you are typing your commands) gets - # automatically hidden when the input line reaches it. Right prompt above the - # last prompt line gets hidden if it would overlap with left prompt. - typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( - # =========================[ Line #1 ]========================= - status # exit code of the last command - command_execution_time # duration of the last command - background_jobs # presence of background jobs - vcs # git status - direnv # direnv status (https://direnv.net/) - asdf # asdf version manager (https://github.com/asdf-vm/asdf) - virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) - anaconda # conda environment (https://conda.io/) - pyenv # python environment (https://github.com/pyenv/pyenv) - goenv # go environment (https://github.com/syndbg/goenv) - nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) - nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) - nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) - # node_version # node.js version - # go_version # go version (https://golang.org) - # rust_version # rustc version (https://www.rust-lang.org) - # dotnet_version # .NET version (https://dotnet.microsoft.com) - # php_version # php version (https://www.php.net/) - # laravel_version # laravel php framework version (https://laravel.com/) - # java_version # java version (https://www.java.com/) - # package # name@version from package.json (https://docs.npmjs.com/files/package.json) - rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) - rvm # ruby version from rvm (https://rvm.io) - fvm # flutter version management (https://github.com/leoafarias/fvm) - luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) - jenv # java version from jenv (https://github.com/jenv/jenv) - plenv # perl version from plenv (https://github.com/tokuhirom/plenv) - phpenv # php version from phpenv (https://github.com/phpenv/phpenv) - scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) - haskell_stack # haskell version from stack (https://haskellstack.org/) - kubecontext # current kubernetes context (https://kubernetes.io/) - terraform # terraform workspace (https://www.terraform.io) - aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) - aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) - azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) - gcloud # google cloud cli account and project (https://cloud.google.com/) - google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) - context # user@hostname - nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) - ranger # ranger shell (https://github.com/ranger/ranger) - nnn # nnn shell (https://github.com/jarun/nnn) - xplr # xplr shell (https://github.com/sayanarijit/xplr) - vim_shell # vim shell indicator (:sh) - midnight_commander # midnight commander shell (https://midnight-commander.org/) - nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) - vi_mode # vi mode (you don't need this if you've enabled prompt_char) - # vpn_ip # virtual private network indicator - # load # CPU load - # disk_usage # disk usage - # ram # free RAM - # swap # used swap - todo # todo items (https://github.com/todotxt/todo.txt-cli) - timewarrior # timewarrior tracking status (https://timewarrior.net/) - taskwarrior # taskwarrior task count (https://taskwarrior.org/) - time # current time - # =========================[ Line #2 ]========================= - newline - # ip # ip address and bandwidth usage for a specified network interface - # public_ip # public IP address - # proxy # system-wide http/https/ftp proxy - # battery # internal battery - # wifi # wifi speed - # example # example user-defined segment (see prompt_example function below) - ) - - # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. - typeset -g POWERLEVEL9K_MODE=nerdfont-complete - # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid - # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. - typeset -g POWERLEVEL9K_ICON_PADDING=none - - # When set to true, icons appear before content on both sides of the prompt. When set - # to false, icons go after content. If empty or not set, icons go before content in the left - # prompt and after content in the right prompt. - # - # You can also override it for a specific segment: - # - # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false - # - # Or for a specific segment in specific state: - # - # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false - typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT= - - # Add an empty line before each prompt. - typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true - - # Connect left prompt lines with these symbols. You'll probably want to use the same color - # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%244F╭─' - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%244F├─' - typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%244F╰─' - # Connect right prompt lines with these symbols. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%244F─╮' - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%244F─┤' - typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%244F─╯' - - # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or - # '─'. The last two make it easier to see the alignment between left and right prompt and to - # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false - # for more compact prompt if using using this option. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='·' - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND= - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND= - if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then - # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE - # ornaments defined above. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=244 - # Start filler from the edge of the screen if there are no left segments on the first line. - typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' - # End filler on the edge of the screen if there are no right segments on the first line. - typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' - fi - - # Separator between same-color segments on the left. - typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0B1' - # Separator between same-color segments on the right. - typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0B3' - # Separator between different-color segments on the left. - typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0' - # Separator between different-color segments on the right. - typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2' - # The right end of left prompt. - typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' - # The left end of right prompt. - typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2' - # The left end of left prompt. - typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='' - # The right end of right prompt. - typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='' - # Left prompt terminator for lines without any segments. - typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= - - #################################[ os_icon: os identifier ]################################## - # OS identifier color. - typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232 - typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7 - # Custom icon. - # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' - - ################################[ prompt_char: prompt symbol ]################################ - # Transparent background. - typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND= - # Green prompt symbol if the last command succeeded. - typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 - # Red prompt symbol if the last command failed. - typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 - # Default prompt symbol. - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' - # Prompt symbol in command vi mode. - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' - # Prompt symbol in visual vi mode. - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' - # Prompt symbol in overwrite vi mode. - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' - typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true - # No line terminator if prompt_char is the last segment. - typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= - # No line introducer if prompt_char is the first segment. - typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= - # No surrounding whitespace. - typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE= - - ##################################[ dir: current directory ]################################## - # Current directory background color. - typeset -g POWERLEVEL9K_DIR_BACKGROUND=4 - # Default current directory foreground color. - typeset -g POWERLEVEL9K_DIR_FOREGROUND=254 - # If directory is too long, shorten some of its segments to the shortest possible unique - # prefix. The shortened directory can be tab-completed to the original. - typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique - # Replace removed segment suffixes with this symbol. - typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= - # Color of the shortened directory segments. - typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=250 - # Color of the anchor directory segments. Anchor segments are never shortened. The first - # segment is always an anchor. - typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=255 - # Display anchor directory segments in bold. - typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true - # Don't shorten directories that contain any of these files. They are anchors. - local anchor_files=( - .bzr - .citc - .git - .hg - .node-version - .python-version - .go-version - .ruby-version - .lua-version - .java-version - .perl-version - .php-version - .tool-version - .shorten_folder_marker - .svn - .terraform - CVS - Cargo.toml - composer.json - go.mod - package.json - stack.yaml - ) - typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" - # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains - # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is - # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) - # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers - # and other directories don't. - # - # Optionally, "first" and "last" can be followed by ":" where is an integer. - # This moves the truncation point to the right (positive offset) or to the left (negative offset) - # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0" - # respectively. - typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false - # Don't shorten this many last directory segments. They are anchors. - typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 - # Shorten directory if it's longer than this even if there is space for it. The value can - # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, - # directory will be shortened only when prompt doesn't fit or when other parameters demand it - # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). - # If set to `0`, directory will always be shortened to its minimum length. - typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 - # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this - # many columns for typing commands. - typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 - # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least - # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. - typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 - # If set to true, embed a hyperlink into the directory. Useful for quickly - # opening a directory in the file manager simply by clicking the link. - # Can also be handy when the directory is shortened, as it allows you to see - # the full directory that was used in previous commands. - typeset -g POWERLEVEL9K_DIR_HYPERLINK=false - - # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON - # and POWERLEVEL9K_DIR_CLASSES below. - typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 - - # The default icon shown next to non-writable and non-existent directories when - # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3. - # typeset -g POWERLEVEL9K_LOCK_ICON='⭐' - - # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different - # directories. It must be an array with 3 * N elements. Each triplet consists of: - # - # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with - # extended_glob option enabled. - # 2. Directory class for the purpose of styling. - # 3. An empty string. - # - # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. - # - # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories - # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively. - # - # For example, given these settings: - # - # typeset -g POWERLEVEL9K_DIR_CLASSES=( - # '~/work(|/*)' WORK '' - # '~(|/*)' HOME '' - # '*' DEFAULT '') - # - # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one - # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or - # WORK_NON_EXISTENT. - # - # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an - # option to define custom colors and icons for different directory classes. - # - # # Styling for WORK. - # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_DIR_WORK_BACKGROUND=4 - # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=254 - # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=250 - # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=255 - # - # # Styling for WORK_NOT_WRITABLE. - # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_BACKGROUND=4 - # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=254 - # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=250 - # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=255 - # - # # Styling for WORK_NON_EXISTENT. - # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_BACKGROUND=4 - # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=254 - # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=250 - # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=255 - # - # If a styling parameter isn't explicitly defined for some class, it falls back to the classless - # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls - # back to POWERLEVEL9K_DIR_FOREGROUND. - # - # typeset -g POWERLEVEL9K_DIR_CLASSES=() - - # Custom prefix. - # typeset -g POWERLEVEL9K_DIR_PREFIX='in ' - - #####################################[ vcs: git status ]###################################### - # Version control system colors. - typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2 - typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=3 - typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=2 - typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=3 - typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8 - - # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon. - typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 ' - - # Untracked files icon. It's really a question mark, your font isn't broken. - # Change the value of this parameter to show a different icon. - typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' - - # Formatter for Git status. - # - # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. - # - # You can edit the function to customize how Git status looks. - # - # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: - # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. - function my_git_formatter() { - emulate -L zsh - - if [[ -n $P9K_CONTENT ]]; then - # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from - # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. - typeset -g my_git_format=$P9K_CONTENT - return - fi - - # Styling for different parts of Git status. - local meta='%7F' # white foreground - local clean='%0F' # black foreground - local modified='%0F' # black foreground - local untracked='%0F' # black foreground - local conflicted='%1F' # red foreground - - local res - - if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then - local branch=${(V)VCS_STATUS_LOCAL_BRANCH} - # If local branch name is at most 32 characters long, show it in full. - # Otherwise show the first 12 … the last 12. - # Tip: To always show local branch name in full without truncation, delete the next line. - (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line - res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}" - fi - - if [[ -n $VCS_STATUS_TAG - # Show tag only if not on a branch. - # Tip: To always show tag, delete the next line. - && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line - ]]; then - local tag=${(V)VCS_STATUS_TAG} - # If tag name is at most 32 characters long, show it in full. - # Otherwise show the first 12 … the last 12. - # Tip: To always show tag name in full without truncation, delete the next line. - (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line - res+="${meta}#${clean}${tag//\%/%%}" - fi - - # Display the current Git commit if there is no branch and no tag. - # Tip: To always display the current Git commit, delete the next line. - [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line - res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" - - # Show tracking branch name if it differs from local branch. - if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then - res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" - fi - - # Display "wip" if the latest commit's summary contains "wip" or "WIP". - if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then - res+=" ${modified}wip" - fi - - # ⇣42 if behind the remote. - (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" - # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. - (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " - (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" - # ⇠42 if behind the push remote. - (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" - (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " - # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. - (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" - # *42 if have stashes. - (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" - # 'merge' if the repo is in an unusual state. - [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" - # ~42 if have merge conflicts. - (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" - # +42 if have staged changes. - (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" - # !42 if have unstaged changes. - (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" - # ?42 if have untracked files. It's really a question mark, your font isn't broken. - # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. - # Remove the next line if you don't want to see untracked files at all. - (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" - # "─" if the number of unstaged files is unknown. This can happen due to - # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower - # than the number of files in the Git index, or due to bash.showDirtyState being set to false - # in the repository config. The number of staged and untracked files may also be unknown - # in this case. - (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" - - typeset -g my_git_format=$res - } - functions -M my_git_formatter 2>/dev/null - - # Don't count the number of unstaged, untracked and conflicted files in Git repositories with - # more than this many files in the index. Negative value means infinity. - # - # If you are working in Git repositories with tens of millions of files and seeing performance - # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output - # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's - # config: `git config bash.showDirtyState false`. - typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 - - # Don't show Git status in prompt for repositories whose workdir matches this pattern. - # For example, if set to '~', the Git repository at $HOME/.git will be ignored. - # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. - typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' - - # Disable the default Git status formatting. - typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true - # Install our own Git status formatter. - typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}' - # Enable counters for staged, unstaged, etc. - typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 - - # Custom icon. - # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐' - # Custom prefix. - # typeset -g POWERLEVEL9K_VCS_PREFIX='on ' - - # Show status of repositories of these types. You can add svn and/or hg if you are - # using them. If you do, your prompt may become slow even when your current directory - # isn't in an svn or hg reposotiry. - typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) - - ##########################[ status: exit code of the last command ]########################### - # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and - # style them independently from the regular OK and ERROR state. - typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true - - # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as - # it will signify success by turning green. - typeset -g POWERLEVEL9K_STATUS_OK=true - typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' - typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=2 - typeset -g POWERLEVEL9K_STATUS_OK_BACKGROUND=0 - - # Status when some part of a pipe command fails but the overall exit status is zero. It may look - # like this: 1|0. - typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true - typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' - typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=2 - typeset -g POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND=0 - - # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as - # it will signify error by turning red. - typeset -g POWERLEVEL9K_STATUS_ERROR=true - typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' - typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=3 - typeset -g POWERLEVEL9K_STATUS_ERROR_BACKGROUND=1 - - # Status when the last command was terminated by a signal. - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true - # Use terse signal names: "INT" instead of "SIGINT(2)". - typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=3 - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_BACKGROUND=1 - - # Status when some part of a pipe command fails and the overall exit status is also non-zero. - # It may look like this: 1|0. - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=3 - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_BACKGROUND=1 - - ###################[ command_execution_time: duration of the last command ]################### - # Execution time color. - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=0 - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=3 - # Show duration of the last command if takes at least this many seconds. - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 - # Show this many fractional digits. Zero means round to seconds. - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 - # Duration format: 1d 2h 3m 4s. - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' - # Custom icon. - # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' - # Custom prefix. - # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='took ' - - #######################[ background_jobs: presence of background jobs ]####################### - # Background jobs color. - typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=6 - typeset -g POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=0 - # Don't show the number of background jobs. - typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false - # Custom icon. - # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #######################[ direnv: direnv status (https://direnv.net/) ]######################## - # Direnv color. - typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=3 - typeset -g POWERLEVEL9K_DIRENV_BACKGROUND=0 - # Custom icon. - # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### - # Default asdf color. Only used to display tools for which there is no color override (see below). - # Tip: Override these parameters for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND and - # POWERLEVEL9K_ASDF_${TOOL}_BACKGROUND. - typeset -g POWERLEVEL9K_ASDF_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_BACKGROUND=7 - - # There are four parameters that can be used to hide asdf tools. Each parameter describes - # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at - # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to - # hide a tool, it gets shown. - # - # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and - # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: - # - # asdf local python 3.8.1 - # asdf global python 3.8.1 - # - # After running both commands the current python version is 3.8.1 and its source is "local" as - # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, - # it'll hide python version in this case because 3.8.1 is the same as the global version. - # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't - # contain "local". - - # Hide tool versions that don't come from one of these sources. - # - # Available sources: - # - # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" - # - local `asdf current` says "set by /some/not/home/directory/file" - # - global `asdf current` says "set by /home/username/file" - # - # Note: If this parameter is set to (shell local global), it won't hide tools. - # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. - typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) - - # If set to false, hide tool versions that are the same as global. - # - # Note: The name of this parameter doesn't reflect its meaning at all. - # Note: If this parameter is set to true, it won't hide tools. - # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. - typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false - - # If set to false, hide tool versions that are equal to "system". - # - # Note: If this parameter is set to true, it won't hide tools. - # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. - typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true - - # If set to non-empty value, hide tools unless there is a file matching the specified file pattern - # in the current directory, or its parent directory, or its grandparent directory, and so on. - # - # Note: If this parameter is set to empty value, it won't hide tools. - # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. - # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. - # - # Example: Hide nodejs version when there is no package.json and no *.js files in the current - # directory, in `..`, in `../..` and so on. - # - # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' - typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= - - # Ruby version from asdf. - typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_RUBY_BACKGROUND=1 - # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Python version from asdf. - typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_PYTHON_BACKGROUND=4 - # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Go version from asdf. - typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_GOLANG_BACKGROUND=4 - # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Node.js version from asdf. - typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_NODEJS_BACKGROUND=2 - # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Rust version from asdf. - typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_RUST_BACKGROUND=208 - # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' - - # .NET Core version from asdf. - typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_BACKGROUND=5 - # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Flutter version from asdf. - typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_FLUTTER_BACKGROUND=4 - # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Lua version from asdf. - typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_LUA_BACKGROUND=4 - # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Java version from asdf. - typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=1 - typeset -g POWERLEVEL9K_ASDF_JAVA_BACKGROUND=7 - # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Perl version from asdf. - typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_PERL_BACKGROUND=4 - # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Erlang version from asdf. - typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_ERLANG_BACKGROUND=1 - # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Elixir version from asdf. - typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_ELIXIR_BACKGROUND=5 - # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Postgres version from asdf. - typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_POSTGRES_BACKGROUND=6 - # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' - - # PHP version from asdf. - typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_PHP_BACKGROUND=5 - # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Haskell version from asdf. - typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_HASKELL_BACKGROUND=3 - # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Julia version from asdf. - typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_JULIA_BACKGROUND=2 - # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' - - ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### - # NordVPN connection indicator color. - typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=7 - typeset -g POWERLEVEL9K_NORDVPN_BACKGROUND=4 - # Hide NordVPN connection indicator when not connected. - typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= - typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= - # Custom icon. - # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## - # Ranger shell color. - typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3 - typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0 - # Custom icon. - # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### - # Nnn shell color. - typeset -g POWERLEVEL9K_NNN_FOREGROUND=0 - typeset -g POWERLEVEL9K_NNN_BACKGROUND=6 - # Custom icon. - # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]################## - # xplr shell color. - typeset -g POWERLEVEL9K_XPLR_FOREGROUND=0 - typeset -g POWERLEVEL9K_XPLR_BACKGROUND=6 - # Custom icon. - # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###########################[ vim_shell: vim shell indicator (:sh) ]########################### - # Vim shell indicator color. - typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0 - typeset -g POWERLEVEL9K_VIM_SHELL_BACKGROUND=2 - # Custom icon. - # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### - # Midnight Commander shell color. - typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=3 - typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_BACKGROUND=0 - # Custom icon. - # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## - # Nix shell color. - typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0 - typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4 - - # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. - # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= - - # Custom icon. - # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##################################[ disk_usage: disk usage ]################################## - # Colors for different levels of disk usage. - typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3 - typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_BACKGROUND=0 - typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=0 - typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_BACKGROUND=3 - typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=7 - typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_BACKGROUND=1 - # Thresholds for different levels of disk usage (percentage points). - typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 - typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 - # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. - typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false - # Custom icon. - # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]########### - # Foreground color. - typeset -g POWERLEVEL9K_VI_MODE_FOREGROUND=0 - # Text and color for normal (a.k.a. command) vi mode. - typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL - typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2 - # Text and color for visual vi mode. - typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL - typeset -g POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=4 - # Text and color for overtype (a.k.a. overwrite and replace) vi mode. - typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE - typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=3 - # Text and color for insert vi mode. - typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= - typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8 - - ######################################[ ram: free RAM ]####################################### - # RAM color. - typeset -g POWERLEVEL9K_RAM_FOREGROUND=0 - typeset -g POWERLEVEL9K_RAM_BACKGROUND=3 - # Custom icon. - # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #####################################[ swap: used swap ]###################################### - # Swap color. - typeset -g POWERLEVEL9K_SWAP_FOREGROUND=0 - typeset -g POWERLEVEL9K_SWAP_BACKGROUND=3 - # Custom icon. - # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ######################################[ load: CPU load ]###################################### - # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. - typeset -g POWERLEVEL9K_LOAD_WHICH=5 - # Load color when load is under 50%. - typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=0 - typeset -g POWERLEVEL9K_LOAD_NORMAL_BACKGROUND=2 - # Load color when load is between 50% and 70%. - typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=0 - typeset -g POWERLEVEL9K_LOAD_WARNING_BACKGROUND=3 - # Load color when load is over 70%. - typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=0 - typeset -g POWERLEVEL9K_LOAD_CRITICAL_BACKGROUND=1 - # Custom icon. - # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ - # Todo color. - typeset -g POWERLEVEL9K_TODO_FOREGROUND=0 - typeset -g POWERLEVEL9K_TODO_BACKGROUND=8 - # Hide todo when the total number of tasks is zero. - typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true - # Hide todo when the number of tasks after filtering is zero. - typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false - - # Todo format. The following parameters are available within the expansion. - # - # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. - # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. - # - # These variables correspond to the last line of the output of `todo.sh -p ls`: - # - # TODO: 24 of 42 tasks shown - # - # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. - # - # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' - - # Custom icon. - # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ - # Timewarrior color. - typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=255 - typeset -g POWERLEVEL9K_TIMEWARRIOR_BACKGROUND=8 - - # If the tracked task is longer than 24 characters, truncate and append "…". - # Tip: To always display tasks without truncation, delete the following parameter. - # Tip: To hide task names and display just the icon when time tracking is enabled, set the - # value of the following parameter to "". - typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' - - # Custom icon. - # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## - # Taskwarrior color. - typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=0 - typeset -g POWERLEVEL9K_TASKWARRIOR_BACKGROUND=6 - - # Taskwarrior segment format. The following parameters are available within the expansion. - # - # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. - # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. - # - # Zero values are represented as empty parameters. - # - # The default format: - # - # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' - # - # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' - - # Custom icon. - # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##################################[ context: user@hostname ]################################## - # Context color when running with privileges. - typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1 - typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=0 - # Context color in SSH without privileges. - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=3 - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_BACKGROUND=0 - # Default context color (no privileges, no SSH). - typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=3 - typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=0 - - # Context format when running with privileges: user@hostname. - typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%n@%m' - # Context format when in SSH without privileges: user@hostname. - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' - # Default context format (no privileges, no SSH): user@hostname. - typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' - - # Don't show context unless running with privileges or in SSH. - # Tip: Remove the next line to always show context. - typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= - - # Custom icon. - # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' - # Custom prefix. - # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='with ' - - ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### - # Python virtual environment color. - typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=0 - typeset -g POWERLEVEL9K_VIRTUALENV_BACKGROUND=4 - # Don't show Python version next to the virtual environment name. - typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false - # If set to "false", won't show virtualenv if pyenv is already shown. - # If set to "if-different", won't show virtualenv if it's the same as pyenv. - typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false - # Separate environment name from Python version only with a space. - typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= - # Custom icon. - # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #####################[ anaconda: conda environment (https://conda.io/) ]###################### - # Anaconda environment color. - typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=0 - typeset -g POWERLEVEL9K_ANACONDA_BACKGROUND=4 - - # Anaconda segment format. The following parameters are available within the expansion. - # - # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. - # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. - # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). - # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). - # - # CONDA_PROMPT_MODIFIER can be configured with the following command: - # - # conda config --set env_prompt '({default_env}) ' - # - # The last argument is a Python format string that can use the following variables: - # - # - prefix The same as CONDA_PREFIX. - # - default_env The same as CONDA_DEFAULT_ENV. - # - name The last segment of CONDA_PREFIX. - # - stacked_env Comma-separated list of names in the environment stack. The first element is - # always the same as default_env. - # - # Note: '({default_env}) ' is the default value of env_prompt. - # - # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER - # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former - # is empty. - typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' - - # Custom icon. - # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ - # Pyenv color. - typeset -g POWERLEVEL9K_PYENV_FOREGROUND=0 - typeset -g POWERLEVEL9K_PYENV_BACKGROUND=4 - # Hide python version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) - # If set to false, hide python version if it's the same as global: - # $(pyenv version-name) == $(pyenv global). - typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide python version if it's equal to "system". - typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true - - # Pyenv segment format. The following parameters are available within the expansion. - # - # - P9K_CONTENT Current pyenv environment (pyenv version-name). - # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). - # - # The default format has the following logic: - # - # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or - # starts with "$P9K_PYENV_PYTHON_VERSION/". - # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION". - typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}' - - # Custom icon. - # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ - # Goenv color. - typeset -g POWERLEVEL9K_GOENV_FOREGROUND=0 - typeset -g POWERLEVEL9K_GOENV_BACKGROUND=4 - # Hide go version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) - # If set to false, hide go version if it's the same as global: - # $(goenv version-name) == $(goenv global). - typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide go version if it's equal to "system". - typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## - # Nodenv color. - typeset -g POWERLEVEL9K_NODENV_FOREGROUND=2 - typeset -g POWERLEVEL9K_NODENV_BACKGROUND=0 - # Hide node version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) - # If set to false, hide node version if it's the same as global: - # $(nodenv version-name) == $(nodenv global). - typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide node version if it's equal to "system". - typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### - # Nvm color. - typeset -g POWERLEVEL9K_NVM_FOREGROUND=0 - typeset -g POWERLEVEL9K_NVM_BACKGROUND=5 - # Custom icon. - # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ - # Nodeenv color. - typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=2 - typeset -g POWERLEVEL9K_NODEENV_BACKGROUND=0 - # Don't show Node version next to the environment name. - typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false - # Separate environment name from Node version only with a space. - typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= - # Custom icon. - # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##############################[ node_version: node.js version ]############################### - # Node version color. - typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=7 - typeset -g POWERLEVEL9K_NODE_VERSION_BACKGROUND=2 - # Show node version only when in a directory tree containing package.json. - typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true - # Custom icon. - # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #######################[ go_version: go version (https://golang.org) ]######################## - # Go version color. - typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=255 - typeset -g POWERLEVEL9K_GO_VERSION_BACKGROUND=2 - # Show go version only when in a go project subdirectory. - typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true - # Custom icon. - # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## - # Rust version color. - typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=0 - typeset -g POWERLEVEL9K_RUST_VERSION_BACKGROUND=208 - # Show rust version only when in a rust project subdirectory. - typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true - # Custom icon. - # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ - # .NET version color. - typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=7 - typeset -g POWERLEVEL9K_DOTNET_VERSION_BACKGROUND=5 - # Show .NET version only when in a .NET project subdirectory. - typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true - # Custom icon. - # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #####################[ php_version: php version (https://www.php.net/) ]###################### - # PHP version color. - typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=0 - typeset -g POWERLEVEL9K_PHP_VERSION_BACKGROUND=5 - # Show PHP version only when in a PHP project subdirectory. - typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true - # Custom icon. - # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### - # Laravel version color. - typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=1 - typeset -g POWERLEVEL9K_LARAVEL_VERSION_BACKGROUND=7 - # Custom icon. - # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## - # Rbenv color. - typeset -g POWERLEVEL9K_RBENV_FOREGROUND=0 - typeset -g POWERLEVEL9K_RBENV_BACKGROUND=1 - # Hide ruby version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) - # If set to false, hide ruby version if it's the same as global: - # $(rbenv version-name) == $(rbenv global). - typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide ruby version if it's equal to "system". - typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ####################[ java_version: java version (https://www.java.com/) ]#################### - # Java version color. - typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=1 - typeset -g POWERLEVEL9K_JAVA_VERSION_BACKGROUND=7 - # Show java version only when in a java project subdirectory. - typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true - # Show brief version. - typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false - # Custom icon. - # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### - # Package color. - typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=0 - typeset -g POWERLEVEL9K_PACKAGE_BACKGROUND=6 - - # Package format. The following parameters are available within the expansion. - # - # - P9K_PACKAGE_NAME The value of `name` field in package.json. - # - P9K_PACKAGE_VERSION The value of `version` field in package.json. - # - # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' - - # Custom icon. - # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## - # Rvm color. - typeset -g POWERLEVEL9K_RVM_FOREGROUND=0 - typeset -g POWERLEVEL9K_RVM_BACKGROUND=240 - # Don't show @gemset at the end. - typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false - # Don't show ruby- at the front. - typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false - # Custom icon. - # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ - # Fvm color. - typeset -g POWERLEVEL9K_FVM_FOREGROUND=0 - typeset -g POWERLEVEL9K_FVM_BACKGROUND=4 - # Custom icon. - # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### - # Lua color. - typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=0 - typeset -g POWERLEVEL9K_LUAENV_BACKGROUND=4 - # Hide lua version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) - # If set to false, hide lua version if it's the same as global: - # $(luaenv version-name) == $(luaenv global). - typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide lua version if it's equal to "system". - typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ - # Java color. - typeset -g POWERLEVEL9K_JENV_FOREGROUND=1 - typeset -g POWERLEVEL9K_JENV_BACKGROUND=7 - # Hide java version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) - # If set to false, hide java version if it's the same as global: - # $(jenv version-name) == $(jenv global). - typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide java version if it's equal to "system". - typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ - # Perl color. - typeset -g POWERLEVEL9K_PLENV_FOREGROUND=0 - typeset -g POWERLEVEL9K_PLENV_BACKGROUND=4 - # Hide perl version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) - # If set to false, hide perl version if it's the same as global: - # $(plenv version-name) == $(plenv global). - typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide perl version if it's equal to "system". - typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ - # PHP color. - typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=0 - typeset -g POWERLEVEL9K_PHPENV_BACKGROUND=5 - # Hide php version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) - # If set to false, hide php version if it's the same as global: - # $(phpenv version-name) == $(phpenv global). - typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide PHP version if it's equal to "system". - typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### - # Scala color. - typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=0 - typeset -g POWERLEVEL9K_SCALAENV_BACKGROUND=1 - # Hide scala version if it doesn't come from one of these sources. - typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) - # If set to false, hide scala version if it's the same as global: - # $(scalaenv version-name) == $(scalaenv global). - typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false - # If set to false, hide scala version if it's equal to "system". - typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true - # Custom icon. - # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### - # Haskell color. - typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=0 - typeset -g POWERLEVEL9K_HASKELL_STACK_BACKGROUND=3 - - # Hide haskell version if it doesn't come from one of these sources. - # - # shell: version is set by STACK_YAML - # local: version is set by stack.yaml up the directory tree - # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) - typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) - # If set to false, hide haskell version if it's the same as in the implicit global project. - typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true - # Custom icon. - # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ################[ terraform: terraform workspace (https://www.terraform.io) ]################# - # Don't show terraform workspace if it's literally "default". - typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false - # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element - # in each pair defines a pattern against which the current terraform workspace gets matched. - # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) - # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, - # you'll see this value in your prompt. The second element of each pair in - # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The - # first match wins. - # - # For example, given these settings: - # - # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( - # '*prod*' PROD - # '*test*' TEST - # '*' OTHER) - # - # If your current terraform workspace is "project_test", its class is TEST because "project_test" - # doesn't match the pattern '*prod*' but does match '*test*'. - # - # You can define different colors, icons and content expansions for different classes: - # - # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=2 - # typeset -g POWERLEVEL9K_TERRAFORM_TEST_BACKGROUND=0 - # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' - typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( - # '*prod*' PROD # These values are examples that are unlikely - # '*test*' TEST # to match your needs. Customize them as needed. - '*' OTHER) - typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=4 - typeset -g POWERLEVEL9K_TERRAFORM_OTHER_BACKGROUND=0 - # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# - # Show kubecontext only when the the command you are typing invokes one of these tools. - # Tip: Remove the next line to always show kubecontext. - typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|fluxctl|stern' - - # Kubernetes context classes for the purpose of using different colors, icons and expansions with - # different contexts. - # - # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element - # in each pair defines a pattern against which the current kubernetes context gets matched. - # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) - # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, - # you'll see this value in your prompt. The second element of each pair in - # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The - # first match wins. - # - # For example, given these settings: - # - # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( - # '*prod*' PROD - # '*test*' TEST - # '*' DEFAULT) - # - # If your current kubernetes context is "deathray-testing/default", its class is TEST - # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. - # - # You can define different colors, icons and content expansions for different classes: - # - # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=0 - # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_BACKGROUND=2 - # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' - typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( - # '*prod*' PROD # These values are examples that are unlikely - # '*test*' TEST # to match your needs. Customize them as needed. - '*' DEFAULT) - typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=7 - typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_BACKGROUND=5 - # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' - - # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext - # segment. Parameter expansions are very flexible and fast, too. See reference: - # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. - # - # Within the expansion the following parameters are always available: - # - # - P9K_CONTENT The content that would've been displayed if there was no content - # expansion defined. - # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the - # output of `kubectl config get-contexts`. - # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the - # output of `kubectl config get-contexts`. - # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE - # in the output of `kubectl config get-contexts`. If there is no - # namespace, the parameter is set to "default". - # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the - # output of `kubectl config get-contexts`. - # - # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), - # the following extra parameters are available: - # - # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". - # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. - # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. - # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. - # - # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, - # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": - # - # - P9K_KUBECONTEXT_CLOUD_NAME=gke - # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account - # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a - # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 - # - # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": - # - # - P9K_KUBECONTEXT_CLOUD_NAME=eks - # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 - # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 - # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 - typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= - # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. - POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' - # Append the current context's namespace if it's not "default". - POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' - - # Custom prefix. - # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='at ' - - #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# - # Show aws only when the the command you are typing invokes one of these tools. - # Tip: Remove the next line to always show aws. - typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' - - # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element - # in each pair defines a pattern against which the current AWS profile gets matched. - # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) - # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, - # you'll see this value in your prompt. The second element of each pair in - # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The - # first match wins. - # - # For example, given these settings: - # - # typeset -g POWERLEVEL9K_AWS_CLASSES=( - # '*prod*' PROD - # '*test*' TEST - # '*' DEFAULT) - # - # If your current AWS profile is "company_test", its class is TEST - # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. - # - # You can define different colors, icons and content expansions for different classes: - # - # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 - # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' - typeset -g POWERLEVEL9K_AWS_CLASSES=( - # '*prod*' PROD # These values are examples that are unlikely - # '*test*' TEST # to match your needs. Customize them as needed. - '*' DEFAULT) - typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=7 - typeset -g POWERLEVEL9K_AWS_DEFAULT_BACKGROUND=1 - # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' - - # AWS segment format. The following parameters are available within the expansion. - # - # - P9K_AWS_PROFILE The name of the current AWS profile. - # - P9K_AWS_REGION The region associated with the current AWS profile. - typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}' - - #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# - # AWS Elastic Beanstalk environment color. - typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=2 - typeset -g POWERLEVEL9K_AWS_EB_ENV_BACKGROUND=0 - # Custom icon. - # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## - # Show azure only when the the command you are typing invokes one of these tools. - # Tip: Remove the next line to always show azure. - typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' - # Azure account name color. - typeset -g POWERLEVEL9K_AZURE_FOREGROUND=7 - typeset -g POWERLEVEL9K_AZURE_BACKGROUND=4 - # Custom icon. - # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### - # Show gcloud only when the the command you are typing invokes one of these tools. - # Tip: Remove the next line to always show gcloud. - typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs' - # Google cloud color. - typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=7 - typeset -g POWERLEVEL9K_GCLOUD_BACKGROUND=4 - - # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or - # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative - # enough. You can use the following parameters in the expansions. Each of them corresponds to the - # output of `gcloud` tool. - # - # Parameter | Source - # -------------------------|-------------------------------------------------------------------- - # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' - # P9K_GCLOUD_ACCOUNT | gcloud config get-value account - # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project - # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' - # - # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. - # - # Obtaining project name requires sending a request to Google servers. This can take a long time - # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud - # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets - # set and gcloud prompt segment transitions to state COMPLETE. - # - # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL - # and COMPLETE. You can also hide gcloud in state PARTIAL by setting - # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and - # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. - typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' - typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' - - # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name - # this often. Negative value disables periodic polling. In this mode project name is retrieved - # only when the current configuration, account or project id changes. - typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 - - # Custom icon. - # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# - # Show google_app_cred only when the the command you are typing invokes one of these tools. - # Tip: Remove the next line to always show google_app_cred. - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' - - # Google application credentials classes for the purpose of using different colors, icons and - # expansions with different credentials. - # - # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first - # element in each pair defines a pattern against which the current kubernetes context gets - # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion - # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION - # parameters, you'll see this value in your prompt. The second element of each pair in - # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. - # The first match wins. - # - # For example, given these settings: - # - # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( - # '*:*prod*:*' PROD - # '*:*test*:*' TEST - # '*' DEFAULT) - # - # If your current Google application credentials is "service_account deathray-testing x@y.com", - # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. - # - # You can define different colors, icons and content expansions for different classes: - # - # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 - # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( - # '*:*prod*:*' PROD # These values are examples that are unlikely - # '*:*test*:*' TEST # to match your needs. Customize them as needed. - '*' DEFAULT) - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=7 - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_BACKGROUND=4 - # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' - - # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by - # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: - # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. - # - # You can use the following parameters in the expansion. Each of them corresponds to one of the - # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. - # - # Parameter | JSON key file field - # ---------------------------------+--------------- - # P9K_GOOGLE_APP_CRED_TYPE | type - # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id - # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email - # - # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' - - ###############################[ public_ip: public IP address ]############################### - # Public IP color. - typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=7 - typeset -g POWERLEVEL9K_PUBLIC_IP_BACKGROUND=0 - # Custom icon. - # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ########################[ vpn_ip: virtual private network indicator ]######################### - # VPN IP color. - typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=0 - typeset -g POWERLEVEL9K_VPN_IP_BACKGROUND=6 - # When on VPN, show just an icon without the IP address. - # Tip: To display the private IP address when on VPN, remove the next line. - typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= - # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN - # to see the name of the interface. - typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*' - # If set to true, show one segment per matching network interface. If set to false, show only - # one segment corresponding to the first matching network interface. - # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. - typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false - # Custom icon. - # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### - # IP color. - typeset -g POWERLEVEL9K_IP_BACKGROUND=4 - typeset -g POWERLEVEL9K_IP_FOREGROUND=0 - # The following parameters are accessible within the expansion: - # - # Parameter | Meaning - # ----------------------+------------------------------------------- - # P9K_IP_IP | IP address - # P9K_IP_INTERFACE | network interface - # P9K_IP_RX_BYTES | total number of bytes received - # P9K_IP_TX_BYTES | total number of bytes sent - # P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt - # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt - # P9K_IP_RX_RATE | receive rate (since last prompt) - # P9K_IP_TX_RATE | send rate (since last prompt) - typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+⇡$P9K_IP_TX_RATE }$P9K_IP_IP' - # Show information for the first network interface whose name matches this regular expression. - # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. - typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*' - # Custom icon. - # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #########################[ proxy: system-wide http/https/ftp proxy ]########################## - # Proxy color. - typeset -g POWERLEVEL9K_PROXY_FOREGROUND=4 - typeset -g POWERLEVEL9K_PROXY_BACKGROUND=0 - # Custom icon. - # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ################################[ battery: internal battery ]################################# - # Show battery in red when it's below this level and not connected to power supply. - typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 - typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=1 - # Show battery in green when it's charging or fully charged. - typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=2 - # Show battery in yellow when it's discharging. - typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3 - # Battery pictograms going from low to high level of charge. - typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' - # Don't show the remaining time to charge/discharge. - typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false - typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=0 - - #####################################[ wifi: wifi speed ]##################################### - # WiFi color. - typeset -g POWERLEVEL9K_WIFI_FOREGROUND=0 - typeset -g POWERLEVEL9K_WIFI_BACKGROUND=4 - # Custom icon. - # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' - - # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). - # - # # Wifi colors and icons for different signal strength levels (low to high). - # typeset -g my_wifi_fg=(0 0 0 0 0) # <-- change these values - # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values - # - # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' - # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' - # - # The following parameters are accessible within the expansions: - # - # Parameter | Meaning - # ----------------------+--------------- - # P9K_WIFI_SSID | service set identifier, a.k.a. network name - # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown - # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second - # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 - # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 - # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) - - ####################################[ time: current time ]#################################### - # Current time color. - typeset -g POWERLEVEL9K_TIME_FOREGROUND=0 - typeset -g POWERLEVEL9K_TIME_BACKGROUND=7 - # Format for the current time: 09:51:02. See `man 3 strftime`. - typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' - # If set to true, time will update when you hit enter. This way prompts for the past - # commands will contain the start times of their commands as opposed to the default - # behavior where they contain the end times of their preceding commands. - typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false - # Custom icon. - # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' - # Custom prefix. - # typeset -g POWERLEVEL9K_TIME_PREFIX='at ' - - # Example of a user-defined prompt segment. Function prompt_example will be called on every - # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or - # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and yellow text on red background - # greeting the user. - # - # Type `p10k help segment` for documentation and a more sophisticated example. - function prompt_example() { - p10k segment -b 1 -f 3 -i '⭐' -t 'hello, %n' - } - - # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job - # is to generate the prompt segment for display in instant prompt. See - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. - # - # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function - # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k - # will replay these calls without actually calling instant_prompt_*. It is imperative that - # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this - # rule is not observed, the content of instant prompt will be incorrect. - # - # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If - # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. - function instant_prompt_example() { - # Since prompt_example always makes the same `p10k segment` calls, we can call it from - # instant_prompt_example. This will give us the same `example` prompt segment in the instant - # and regular prompts. - prompt_example - } - - # User-defined prompt segments can be customized the same way as built-in segments. - typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=3 - typeset -g POWERLEVEL9K_EXAMPLE_BACKGROUND=1 - # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' - - # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt - # when accepting a command line. Supported values: - # - # - off: Don't change prompt when accepting a command line. - # - always: Trim down prompt when accepting a command line. - # - same-dir: Trim down prompt when accepting a command line unless this is the first command - # typed after changing current working directory. - typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off - - # Instant prompt mode. - # - # - off: Disable instant prompt. Choose this if you've tried instant prompt and found - # it incompatible with your zsh configuration files. - # - quiet: Enable instant prompt and don't print warnings when detecting console output - # during zsh initialization. Choose this if you've read and understood - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. - # - verbose: Enable instant prompt and print a warning when detecting console output during - # zsh initialization. Choose this if you've never tried instant prompt, haven't - # seen the warning, or if you are unsure what this all means. - typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose - - # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. - # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload - # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you - # really need it. - typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true - - # If p10k is already loaded, reload configuration. - # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. - (( ! $+functions[p10k] )) || p10k reload -} - -# Tell `p10k configure` which file it should overwrite. -typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} - -(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} -'builtin' 'unset' 'p10k_config_opts' diff --git a/modules/home/root.nix b/modules/home/root.nix deleted file mode 100644 index c01fd947..00000000 --- a/modules/home/root.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - config.home-manager = - { - useGlobalPkgs = true; - useUserPackages = true; - users.root = { pkgs, ... }: - { - home.stateVersion = "22.11"; - programs.zsh = import ./zsh.nix { inherit pkgs; }; - programs.direnv.enable = true; - programs.direnv.nix-direnv.enable = true; - }; - }; -} diff --git a/modules/home/zsh.nix b/modules/home/zsh.nix deleted file mode 100644 index e9b0cb4e..00000000 --- a/modules/home/zsh.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ pkgs }: -{ - enable = true; - initExtraBeforeCompInit = - '' - # p10k instant prompt - P10K_INSTANT_PROMPT="$XDG_CACHE_HOME/p10k-instant-prompt-''${(%):-%n}.zsh" - [[ ! -r "$P10K_INSTANT_PROMPT" ]] || source "$P10K_INSTANT_PROMPT" - - HYPHEN_INSENSITIVE="true" - - export PATH=~/bin:$PATH - - function br - { - local cmd cmd_file code - cmd_file=$(mktemp) - if broot --outcmd "$cmd_file" "$@"; then - cmd=$(<"$cmd_file") - command rm -f "$cmd_file" - eval "$cmd" - else - code=$? - command rm -f "$cmd_file" - return "$code" - fi - } - ''; - plugins = - [ - { - file = "powerlevel10k.zsh-theme"; - name = "powerlevel10k"; - src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k"; - } - { - file = "p10k.zsh"; - name = "powerlevel10k-config"; - src = ./p10k-config; - } - { - name = "zsh-lsd"; - src = pkgs.fetchFromGitHub - { - owner = "z-shell"; - repo = "zsh-lsd"; - rev = "029a9cb0a9b39c9eb6c5b5100dd9182813332250"; - sha256 = "sha256-oWjWnhiimlGBMaZlZB+OM47jd9hporKlPNwCx6524Rk="; - }; - } - # { - # name = "zsh-exa"; - # src = pkgs.fetchFromGitHub - # { - # owner = "ptavares"; - # repo = "zsh-exa"; - # rev = "0.2.3"; - # sha256 = "0vn3iv9d3c1a4rigq2xm52x8zjaxlza1pd90bw9mbbkl9iq8766r"; - # }; - # } - ]; -} diff --git a/modules/i18n.nix b/modules/i18n.nix deleted file mode 100644 index a2d999f4..00000000 --- a/modules/i18n.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ fcitx }: inputs: -{ - config.i18n = - { - defaultLocale = "zh_CN.UTF-8"; - supportedLocales = ["zh_CN.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "C.UTF-8/UTF-8"]; - } - // - ( - if fcitx then - { - inputMethod = - { - enabled = "fcitx5"; - fcitx5.addons = with inputs.pkgs; [ fcitx5-rime fcitx5-chinese-addons fcitx5-mozc ]; - }; - } - else {} - ); -} diff --git a/modules/kde.nix b/modules/kde.nix deleted file mode 100644 index ae3f8b78..00000000 --- a/modules/kde.nix +++ /dev/null @@ -1,20 +0,0 @@ -inputs: -{ - config = - { - services.xserver = - { - enable = true; - displayManager.sddm.enable = true; - desktopManager.plasma5.enable = true; - }; - environment = - { - sessionVariables."GTK_USE_PORTAL" = "1"; - systemPackages = [ inputs.pkgs.libsForQt5.qtstyleplugin-kvantum ]; - }; - xdg.portal.extraPortals = with inputs.pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ]; - programs.xwayland.enable = true; - programs.kdeconnect.enable = true; - }; -} diff --git a/modules/networking/basic.nix b/modules/networking/basic.nix deleted file mode 100644 index 7239e618..00000000 --- a/modules/networking/basic.nix +++ /dev/null @@ -1 +0,0 @@ -{ config.networking.networkmanager.enable = true; } diff --git a/modules/networking/chn-PC.nix b/modules/networking/chn-PC.nix deleted file mode 100644 index 7ca9f3ff..00000000 --- a/modules/networking/chn-PC.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - config.services.dnsmasq.settings.address = - [ - "/mirism.one/216.24.188.24" - "/beta.mirism.one/216.24.188.24" - "/ng01.mirism.one/216.24.188.24" - "/debug.mirism.one/127.0.0.1" - ]; -} diff --git a/modules/networking/samba.nix b/modules/networking/samba.nix deleted file mode 100644 index 2a1111bd..00000000 --- a/modules/networking/samba.nix +++ /dev/null @@ -1,45 +0,0 @@ -inputs: -{ - config = - { - # make shares visible for windows 10 clients - services.samba-wsdd.enable = true; - # networking.firewall = { allowedTCPPorts = [ 5357 ]; allowedUDPPorts = [ 3702 ]; }; - - services.samba = - { - enable = true; - securityType = "user"; - extraConfig = - '' - workgroup = WORKGROUP - server string = Samba Server - server role = standalone server - hosts allow = 192.168. 127. - dns proxy = no - ''; - shares = builtins.listToAttrs (builtins.map - (config: { name = config.name; value = - { - comment = config.comment; - path = config.path; - browseable = true; - writeable = true; - "create mask" = "664"; - "force create mode" = "644"; - "security mask" = "644"; - "force security mode" = "644"; - "directory mask" = "2755"; - "force directory mode" = "2755"; - "directory security mask" = "2755"; - "force directory security mode" = "2755"; - }; }) - [ - { name = "media"; comment = "chn media"; path = "/run/media/chn"; } - { name = "home"; comment = "chn home"; path = "/home/chn"; } - { name = "mnt"; comment = "mnt"; path = "/mnt"; } - { name = "share"; comment = "chn share"; path = "/home/chn/share"; } - ]); - }; - }; -} diff --git a/modules/networking/ssh.nix b/modules/networking/ssh.nix deleted file mode 100644 index f19993ad..00000000 --- a/modules/networking/ssh.nix +++ /dev/null @@ -1 +0,0 @@ -{ config.services.openssh.enable = true; } \ No newline at end of file diff --git a/modules/networking/wall_client.nix b/modules/networking/wall_client.nix deleted file mode 100644 index 380e5006..00000000 --- a/modules/networking/wall_client.nix +++ /dev/null @@ -1,55 +0,0 @@ -inputs: -{ - config = - { - services = - { - dnsmasq = - { - enable = true; - settings = - { - no-poll = true; - server = [ "127.0.0.1#10853" ]; - listen-address = "127.0.0.1"; - bind-interfaces = true; - ipset = - [ - "/developer.download.nvidia.com/noproxy_net" - "/yuanshen.com/noproxy_net" - "/zoom.us/noproxy_net" - ]; - }; - }; - xray = { enable = true; settingsFile = inputs.config.sops.secrets."xray.json".path; }; - v2ray-forwarder = { enable = true; proxyPort = 10880; xmuPort = 10881; }; - }; - sops.secrets."xray.json" = - { mode = "0440"; owner = "v2ray"; group = "v2ray"; restartUnits = [ "xray.service" ]; }; - systemd.services.xray.serviceConfig = - { - DynamicUser = inputs.lib.mkForce false; - User = "v2ray"; - Group = "v2ray"; - CapabilityBoundingSet = "CAP_NET_ADMIN CAP_NET_BIND_SERVICE"; - AmbientCapabilities = "CAP_NET_ADMIN CAP_NET_BIND_SERVICE"; - LimitNPROC = 10000; - LimitNOFILE = 1000000; - }; - users = { users.v2ray = { isSystemUser = true; group = "v2ray"; }; groups.v2ray = {}; }; - boot.kernel.sysctl = - { - "net.ipv4.conf.all.route_localnet" = true; - "net.ipv4.conf.default.route_localnet" = true; - "net.ipv4.conf.all.accept_local" = true; - "net.ipv4.conf.default.accept_local" = true; - "net.ipv4.ip_forward" = true; - "net.ipv4.ip_nonlocal_bind" = true; - "net.bridge.bridge-nf-call-iptables" = false; - "net.bridge.bridge-nf-call-ip6tables" = false; - "net.bridge.bridge-nf-call-arptables" = false; - }; - environment.etc."resolv.conf".text = "nameserver 127.0.0.1"; - networking.firewall.trustedInterfaces = [ "docker0" "virbr0" ]; - }; -} diff --git a/modules/networking/xmunet.nix b/modules/networking/xmunet.nix deleted file mode 100644 index 020ba927..00000000 --- a/modules/networking/xmunet.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - config.nixpkgs.config.packageOverrides = pkgs: - { - wpa_supplicant = pkgs.wpa_supplicant.overrideAttrs ( attrs: - { patches = attrs.patches ++ [ ./xmunet.patch ]; }); - }; -} diff --git a/modules/networking/xmunet.patch b/modules/networking/xmunet.patch deleted file mode 100644 index ea87c0f7..00000000 --- a/modules/networking/xmunet.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- wpa_supplicant-2.10/src/crypto/tls_openssl.c 2022-01-16 15:51:29.000000000 -0500 -+++ src/crypto/tls_openssl.c.legacy 2022-09-29 10:10:02.999974141 -0400 -@@ -1048,7 +1048,7 @@ - - SSL_CTX_set_options(ssl, SSL_OP_NO_SSLv2); - SSL_CTX_set_options(ssl, SSL_OP_NO_SSLv3); -- -+ SSL_CTX_set_options(ssl, SSL_OP_LEGACY_SERVER_CONNECT); - SSL_CTX_set_mode(ssl, SSL_MODE_AUTO_RETRY); - - #ifdef SSL_MODE_NO_AUTO_CHAIN diff --git a/modules/packages/gaming.nix b/modules/packages/gaming.nix deleted file mode 100644 index 39df07a7..00000000 --- a/modules/packages/gaming.nix +++ /dev/null @@ -1,13 +0,0 @@ -inputs: -{ - config = - { - environment.systemPackages = [ inputs.config.nur.repos.ataraxiasjel.proton-ge inputs.pkgs.wine ]; - programs = - { - anime-game-launcher.enable = true; - honkers-railway-launcher.enable = true; - steam.enable = true; - }; - }; -} diff --git a/modules/packages/gui.nix b/modules/packages/gui.nix deleted file mode 100644 index eaa623d0..00000000 --- a/modules/packages/gui.nix +++ /dev/null @@ -1,112 +0,0 @@ -inputs: -{ - config = - { - environment.systemPackages = with inputs.pkgs; - [ - ( vscode-with-extensions.override - { - vscodeExtensions = (with vscode-extensions; - [ - ms-vscode.cpptools - genieai.chatgpt-vscode - ms-ceintl.vscode-language-pack-zh-hans - llvm-vs-code-extensions.vscode-clangd - twxs.cmake - ms-vscode.cmake-tools - donjayamanne.githistory - github.copilot - github.github-vscode-theme - ms-vscode.hexeditor - oderwat.indent-rainbow - ms-toolsai.jupyter - ms-toolsai.vscode-jupyter-cell-tags - ms-toolsai.jupyter-keymap - ms-toolsai.jupyter-renderers - ms-toolsai.vscode-jupyter-slideshow - james-yu.latex-workshop - yzhang.markdown-all-in-one - pkief.material-icon-theme - equinusocio.vsc-material-theme - bbenoist.nix - ms-python.vscode-pylance - ms-python.python - ms-vscode-remote.remote-ssh - redhat.vscode-xml - dotjoshjohnson.xml - jnoortheen.nix-ide - ]) - ++ (with nix-vscode-extensions.vscode-marketplace; - [ - jeff-hykin.better-cpp-syntax - ms-vscode.cpptools-extension-pack - ms-vscode.cpptools-themes - josetr.cmake-language-support-vscode - fredericbonnet.cmake-test-adapter - equinusocio.vsc-community-material-theme - guyutongxue.cpp-reference - intellsmi.comment-translate - intellsmi.deepl-translate - ms-vscode-remote.remote-containers - fabiospampinato.vscode-diff - cschlosser.doxdocgen - znck.grammarly - ms-python.isort - thfriedrich.lammps - leetcode.vscode-leetcode - equinusocio.vsc-material-theme-icons - gimly81.matlab - affenwiesel.matlab-formatter - xdebug.php-debug - ckolkman.vscode-postgres - ms-ossdata.vscode-postgresql - ms-vscode-remote.remote-ssh-edit - ms-vscode.remote-explorer - ms-vscode.test-adapter-converter - hbenl.vscode-test-explorer - hirse.vscode-ungit - fortran-lang.linter-gfortran - ]); - } ) - qbittorrent # tunder - gparted snapper-gui - firefox google-chrome - zotero texlive.combined.scheme-full libreoffice-qt - element-desktop tdesktop discord - # jail - qq nur-xddxdd.wechat-uos inputs.config.nur.repos.linyinfeng.wemeet - # nur-xddxdd.wine-wechat - nur-xddxdd.baidupcs-go - remmina - bitwarden - spotify yesplaymusic - crow-translate - scrcpy - mpv nur-xddxdd.svp - jetbrains.clion android-studio - localPackages.typora - yubikey-manager yubikey-manager-qt yubikey-personalization yubikey-personalization-gui - appflowy - nomacs - putty virt-viewer - wl-clipboard-x11 parallel lsof duperemove mlocate kmscon hdparm bat gnuplot whois zoom traceroute tcping-go - tcpdump nmap mtr-gui simplescreenrecorder obs-studio - signal-desktop dbeaver ftxui yaml-cpp wl-mirror poppler_utils imagemagick - ] - ++ (with inputs.lib; filter isDerivation (attrValues inputs.pkgs.plasma5Packages.kdeGear)); - programs.wireshark = { enable = true; package = inputs.pkgs.wireshark; }; - nixpkgs.config = { permittedInsecurePackages = [ "openssl-1.1.1u" "electron-19.0.7" ]; allowUnfree = true; }; - # programs.firejail = - # { - # enable = true; - # wrappedBinaries = - # { - # qq = - # { - # executable = "${inputs.pkgs.qq}/bin/qq"; - # profile = "${inputs.pkgs.firejail}/etc/firejail/linuxqq.profile"; - # }; - # }; - # }; - }; -} diff --git a/modules/packages/hpc.nix b/modules/packages/hpc.nix deleted file mode 100644 index 8c660bbb..00000000 --- a/modules/packages/hpc.nix +++ /dev/null @@ -1,80 +0,0 @@ -inputs: -{ - config.environment.systemPackages = - ( - with inputs.pkgs; - [ - ovito paraview localPackages.vesta # vsim - (python3.withPackages (ps: with ps; - [ - phonopy inquirerpy requests tqdm tensorflow keras python-telegram-bot - localPackages.upho localPackages.spectral - ])) - mathematica octave root cling gfortran - qchem.quantum-espresso - waifu2x-converter-cpp - ] - ) - ++ ( with inputs.pkgs.pkgsCross.mingwW64.buildPackages; [ gcc ] ); - config.programs.ccache.enable = true; - config.nix.settings.extra-sandbox-paths = [ inputs.config.programs.ccache.cacheDir ]; - # config.nixpkgs.config.replaceStdenv = { pkgs }: pkgs.ccacheStdenv; - # only replace stdenv for large and tested packages - # config.programs.ccache.packageNames = [ "webkitgtk" "libreoffice" "tensorflow" "linux" "chromium" ]; -} - -# cross-x86_64-pc-linux-musl/gcc -# dev-cpp/cpp-httplib ? how to use -# dev-cpp/cppcoro -# dev-cpp/date -# dev-cpp/nameof -# dev-cpp/scnlib -# dev-cpp/tgbot-cpp -# dev-libs/pocketfft -# dev-util/intel-hpckit -# dev-util/nvhpc -# kde-misc/wallpaper-engine-kde-plugin -# media-fonts/arphicfonts -# media-fonts/sarasa-gothic -# media-gfx/flameshot -# media-libs/libva-intel-driver -# media-libs/libva-intel-media-driver -# media-sound/netease-cloud-music -# net-vpn/frp -# net-wireless/bluez-tools -# sci-libs/mkl -# sci-libs/openblas -# sci-libs/pfft -# sci-libs/scalapack -# sci-libs/wannier90 -# sci-mathematics/ginac -# sci-mathematics/mathematica -# sci-mathematics/octave -# sci-physics/lammps::touchfish-os -# sci-physics/vsim -# sci-visualization/scidavis -# sys-apps/flatpak -# sys-cluster/modules -# sys-devel/distcc -# sys-fs/btrfs-progs -# sys-fs/compsize -# sys-fs/dosfstools -# sys-fs/duperemove -# sys-fs/exfatprogs -# sys-fs/mdadm -# sys-fs/ntfs3g -# sys-kernel/dracut -# sys-kernel/linux-firmware -# sys-kernel/xanmod-sources -# sys-kernel/xanmod-sources:6.1.12 -# sys-kernel/xanmod-sources::touchfish-os -# sys-libs/libbacktrace -# sys-libs/libselinux -# x11-apps/xinput -# x11-base/xorg-apps -# x11-base/xorg-fonts -# x11-base/xorg-server -# x11-misc/imwheel -# x11-misc/optimus-manager -# x11-misc/unclutter-xfixes - diff --git a/modules/packages/terminal.nix b/modules/packages/terminal.nix deleted file mode 100644 index 87fe9734..00000000 --- a/modules/packages/terminal.nix +++ /dev/null @@ -1,61 +0,0 @@ -inputs: -{ - config = - { - environment.systemPackages = with inputs.pkgs; - [ - beep neofetch screen dos2unix tldr gnugrep pv - pciutils usbutils lshw powertop compsize iotop iftop smartmontools htop intel-gpu-tools btop wayland-utils clinfo - glxinfo vulkan-tools - ksh - vim nano - wget aria2 curl yt-dlp - tree git autojump exa - nix-output-monitor inputs.topInputs.nix-alien.packages.x86_64-linux.nix-alien nix-template - apacheHttpd certbot-full - pigz rar unrar upx unzip zip lzip - util-linux snapper - ocrmypdf pdfgrep - openssl ssh-to-age gnupg age sops - ipset iptables iproute2 dig nettools - gcc clang-tools - sshfs kio-fuse - pam_u2f - e2fsprogs - trash-cli tmux adb-sync pdfchain wgetpaste httplib clang magic-enum xtensor - go rustc boost cereal cxxopts valgrind - lsd zellij broot - nil - ]; - programs = - { - nix-index-database.comma.enable = true; - nix-index.enable = true; - command-not-found.enable = false; - zsh = - { - enable = true; - syntaxHighlighting.enable = true; - autosuggestions.enable = true; - enableCompletion = true; - ohMyZsh = - { - enable = true; - plugins = [ "git" "colored-man-pages" "extract" "history-substring-search" "autojump" ]; - customPkgs = with inputs.pkgs; [ zsh-nix-shell ]; - }; - }; - adb.enable = true; - gnupg.agent = - { - enable = true; - enableSSHSupport = true; - }; - }; - services = - { - fwupd.enable = true; - udev.packages = [ inputs.pkgs.yubikey-personalization ]; - }; - }; -} diff --git a/modules/sops.nix b/modules/sops.nix deleted file mode 100644 index ce475878..00000000 --- a/modules/sops.nix +++ /dev/null @@ -1,11 +0,0 @@ -inputs: -{ - config.sops = - { - defaultSopsFile = ../secrets/${inputs.config.networking.hostName}.yaml; - - # sops start before impermanence, so we need to use the absolute path - age.sshKeyPaths = [ "/nix/persistent/etc/ssh/ssh_host_ed25519_key" ]; - gnupg.sshKeyPaths = [ "/nix/persistent/etc/ssh/ssh_host_rsa_key" ]; - }; -} diff --git a/modules/u2f_keys b/modules/u2f_keys deleted file mode 100644 index bfcedda3..00000000 --- a/modules/u2f_keys +++ /dev/null @@ -1 +0,0 @@ -chn:l0VI03ILuKvkEKm9/8nZWQGyijGDmxcX8910QFqc1f2nt9z5A8ipfvT7eAu6DuBvGSLfdRvvjOMMYdLym6aIKQ==,l+5T3iiU30/GT1T+nOirHycke8ZsENSN+nyGGukPD28yZfE4Z+lkzytg9O5qyxWMGFbCgBQWEw3pNpzjStkUEA==,es256,+presence:xUctDZKOuBMOtRE2y4b0BzVqaLdgQydCcoaDJQ3fur4y9cMrAOrvNuyaGSm6y0JsAGtBTufMF9GnK513GSEs4g==,l8Z5+9qp5z9u4eXl4nkV/0QKKvIbeD+6BAPOjTawDwZgiUKC5ltgT3pC262wrxiDLOAXUylDVRgsRLEaM7YiYg==,es256,+presence \ No newline at end of file diff --git a/modules/users/chn.nix b/modules/users/chn.nix deleted file mode 100644 index ea2198ea..00000000 --- a/modules/users/chn.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ bootstrape ? false }: inputs: -{ - config = - { - users.users.chn = - { - isNormalUser = true; - extraGroups = inputs.lib.intersectLists - [ "adbusers" "networkmanager" "wheel" "wireshark" "libvirtd" "video" "audio" ] - (builtins.attrNames inputs.config.users.groups); - shell = inputs.pkgs.zsh; - autoSubUidGidRange = true; - } // (if bootstrape then { password = "0"; } - else { passwordFile = inputs.config.sops.secrets."password/chn".path; }); - # environment.persistence."/impermanence".users.chn = - # { - # directories = - # [ - # "Desktop" - # "Documents" - # "Downloads" - # "Music" - # "repo" - # "Pictures" - # "Videos" - - # ".cache" - # ".config" - # ".gnupg" - # ".local" - # ".ssh" - # ".android" - # ".exa" - # ".gnome" - # ".Mathematica" - # ".mozilla" - # ".pki" - # ".steam" - # ".tcc" - # ".vim" - # ".vscode" - # ".Wolfram" - # ".zotero" - - # ]; - # files = - # [ - # ".bash_history" - # ".cling_history" - # ".gitconfig" - # ".gtkrc-2.0" - # ".root_hist" - # ".viminfo" - # ".zsh_history" - # ]; - # }; - } // (if !bootstrape then { sops.secrets."password/chn".neededForUsers = true; } else {}); -} diff --git a/modules/users/root.nix b/modules/users/root.nix deleted file mode 100644 index 7406d049..00000000 --- a/modules/users/root.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ bootstrape ? false }: { pkgs, ... }@inputs: -{ - config = - { - users = - { - users.root = { shell = inputs.pkgs.zsh; } - // (if bootstrape then { password = "0"; } - else { passwordFile = inputs.config.sops.secrets."password/root".path; }); - mutableUsers = false; - }; - # root password in initrd: 0000 - # currently not working, might work in the future - # boot.initrd.secrets.${builtins.toString inputs.config.sops.secrets."password/root".path} - # = builtins.toFile "root-password" "$y$j9T$EHgd1EmvM54fIkuDnrAM41$WNhog3VSAdrQXljA4I7Coy8W6iRQFQ3CLOKEH6IZzJ/"; - } // (if !bootstrape then { sops.secrets."password/root".neededForUsers = true; } else {}); -} diff --git a/modules/virtualisation/docker.nix b/modules/virtualisation/docker.nix deleted file mode 100644 index e4698f75..00000000 --- a/modules/virtualisation/docker.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - config.virtualisation.docker = - { - enable = true; - rootless = { enable = true; setSocketVariable = true; }; - enableNvidia = true; - storageDriver = "overlay2"; - }; -} \ No newline at end of file diff --git a/modules/virtualisation/kvm_guest.nix b/modules/virtualisation/kvm_guest.nix deleted file mode 100644 index 79252470..00000000 --- a/modules/virtualisation/kvm_guest.nix +++ /dev/null @@ -1 +0,0 @@ -{ config.services = { qemuGuest.enable = true; spice-vdagentd.enable = true; xserver.videoDrivers = [ "qxl" ]; }; } diff --git a/modules/virtualisation/kvm_host.nix b/modules/virtualisation/kvm_host.nix deleted file mode 100644 index 0030d6e9..00000000 --- a/modules/virtualisation/kvm_host.nix +++ /dev/null @@ -1,87 +0,0 @@ -# TODO: disable auto usb redirection -inputs: -{ - config = - { - virtualisation = - { - libvirtd = { enable = true; qemu.runAsRoot = false; onBoot = "ignore"; onShutdown = "shutdown"; }; - spiceUSBRedirection.enable = true; - }; - environment.systemPackages = with inputs.pkgs; [ qemu_full virt-manager win-spice ]; - systemd.services = - let - virsh = "${inputs.pkgs.libvirt}/bin/virsh"; - hibernate = inputs.pkgs.writeShellScript "libvirt-hibernate" - '' - if [ "$(LANG=C ${virsh} domstate "$1")" = 'running' ] - then - if ${virsh} dompmsuspend "$1" disk - then - echo "Waiting for $1 to suspend" - while ! [ "$(LANG=C ${virsh} domstate "$1")" = 'shut off' ] - do - sleep 1 - done - echo "$1 suspended" - touch "/tmp/libvirt.$1.suspended" - else - echo "Failed to suspend $1" - fi - fi - ''; - resume = inputs.pkgs.writeShellScript "libvirt-resume" - '' - if [ "$(LANG=C ${virsh} domstate "$1")" = 'shut off' ] && [ -f "/tmp/libvirt.$1.suspended" ] - then - if virsh start "$1" - then - echo "Waiting for $1 to resume" - while ! [ "$(LANG=C ${virsh} domstate "$1")" = 'running' ] - do - sleep 1 - done - echo "$1 resumed" - rm "/tmp/libvirt.$1.suspended" - else - echo "Failed to resume $1" - fi - fi - ''; - in - { - "libvirt-hibernate@" = - { - description = "libvirt hibernate"; - before = [ "systemd-hibernate.service" "systemd-suspend.service" ]; - serviceConfig = { Type = "oneshot"; ExecStart = "${hibernate} %i"; }; - }; - "libvirt-resume@" = - { - description = "libvirt resume"; - after = [ "systemd-hibernate.service" "systemd-suspend.service" ]; - serviceConfig = { Type = "oneshot"; ExecStart = "${resume} %i"; }; - }; - "libvirt-hibernate@win10" = - { - wantedBy = [ "systemd-hibernate.service" "systemd-suspend.service" ]; - overrideStrategy = "asDropin"; - }; - "libvirt-resume@win10" = - { - wantedBy = [ "systemd-hibernate.service" "systemd-suspend.service" ]; - overrideStrategy = "asDropin"; - }; - "libvirt-hibernate@hardconnect" = - { - wantedBy = [ "systemd-hibernate.service" "systemd-suspend.service" ]; - overrideStrategy = "asDropin"; - }; - "libvirt-resume@hardconnect" = - { - wantedBy = [ "systemd-hibernate.service" "systemd-suspend.service" ]; - overrideStrategy = "asDropin"; - }; - }; - }; -} diff --git a/modules/virtualisation/waydroid.nix b/modules/virtualisation/waydroid.nix deleted file mode 100644 index 5e5b3627..00000000 --- a/modules/virtualisation/waydroid.nix +++ /dev/null @@ -1,2 +0,0 @@ -# sudo waydroid shell wm set-fix-to-user-rotation enabled -{ config.virtualisation = { waydroid.enable = true; }; } diff --git a/secrets/chn-PC.yaml b/secrets/chn-PC.yaml deleted file mode 100644 index beafc7ae..00000000 --- a/secrets/chn-PC.yaml +++ /dev/null @@ -1,33 +0,0 @@ -password: - root: ENC[AES256_GCM,data:WlD/i0GDlzeVsc4uJXVK+cRLvjATZGSbVCRedenTBayPeMebC6jrGPhsK4SSZIv3uw9RKztGGkziBTe61CCKwg/Rm0oFuF661A==,iv:YBPmukuz2tiVmIEBMClYjgzPf33NjmdqihcydD1gdhg=,tag:uURlnbNmEgo1qfoU0gPwEg==,type:str] - chn: ENC[AES256_GCM,data:NMTdEfxBMqJP5bnLqinzQ1NP/4eCM3zzH5aR2HOoeu/p8BNp3JDspyuE+DkjVlb/uuVugnFPTOSASRZeEliG0B6NvpZ8gP1O/g==,iv:SNVxJ/xfdfAiVljlRMd5maIhxH0RBs90bqrypBubM6w=,tag:A7Wemy4eLcIUfV/sZ6//VA==,type:str] -xray.json: ENC[AES256_GCM,data:eog9U3zt+Lx4QOlr0F4PGP73uUXrZcxa8NDVq13hmVpfu2T/CoF+Lwf8saJN9IdAOcECfgkrI2DiUZdAUO5LGQDDEyJywiJ/CnL6u+kwmkO9doidvG9ctB1VR2CG4M5wqXnybJp8b6osG6iL83q4prjo3YjFfGQFA/X05ssuzLneugK1pQrr9yaF7PvXvFBRwOKDbsmqDqSurTkU3QZMx3is2f0OeLYZEYk9XVNE7xeL1/33gObsP4KF5O2h466+7ezI7kP2vC2rl1VPQFtYAssoxK6qxWKErPhMCu+cDDYDMxqkeYmkgGBJEefpuk6IMNXctuwWwjojX5SEMN73kOHzJxykE/NhCbRDeNQjWz9qTpDaMZ36IFTc+U7nThYD85h9ppaedsXsQtLxhG29KM45h0CByBwJPY8Q1TNkV+jYsJWk6+DqSnWwMPsAKXnj/bhtpbslWlqk7uHn/6jzexu95y89ObjNtiR6YViufCAHlAGovijXv9lEjsZk+1xMNnD418a58jrUXoBGQjr+FT+i01zDnJga61KqAkhjgblG6j5pNVzsopITs1f90cxJjoNFvqh01EgPma3OlD6x5RmY3g/Mzc4yXreWS0KhICSvZwNT27DKCTVpSWRwz20yNU0OYy4MIo1CbZtvv9uQ6pO9m681IjHLZSP5pX19rqG0hfTkP3Wvya/G8hkHhmRDHUeptzKuZII1GVU3g9JfL4KbEeLZXeZRqKJ5N5kFwyUXytWEZpmj4XYdZF65BsGnC251EI0+LJdJy6vDcGTelbMHoyW8tZ50pQysy5gukf+hERuzgw0l81P5iRZoz9Mt/dNy2sA/EFxElZayDrIRlBilKvlTUr8qgswjj2kdR0sPgfM0aaD1mZFQ65MHVcJSua2gO/B5yXNmoLtZxFSYOuqHqHXN84T1rj8DxU5XXlatvK00U6nb73Xkwdjfe14bUTR05E3DvXwYLJ/LZL+nRgHgASnS2ECDn/DAw7UigwmXSaEPz6eQbOucNvtoq6xceJgeWuNM7ZSIq5JRufL6QnLXjoHmd8OgSG6xaR7wvQkg+YwnbhhpDbi+3AB+RlJkYSVoUUdPTi8sSxYZi4x+gRys20tRCWxUuvrIKhoimFi/lNDZn4fW93EEZT1KpoHxOzD424hdVWZ/9dV2O57ZArOVvnG8WQPGsFqVQ55dzpA4QI34GNDHkeQGNJb6JF1f+8x5AJGJPbRWqDBNRmjewr8xKZwRSpYl+OH9ijU4qk9dxpiynFXY6t2cJIzhMIgRBnvgD+zFAgbOX0t1jvguLeTDxq+5ZJLc9g15gKtQKOLyBx0XAV8xtpmqQX8KuPj+CKmKUJQ1WNWUkd9THXwsYjskb3L6frOubYo0M0pnXaF+hlyHpsJoz4pdUmsFRnByAr+QQAYUUnx2oxZ3gybpIkFHUOekuXVwx4ox87buJA3YsgDYUE6QP7AUgUdpUo4pssZw4Ym8IpqCuam6F04uC9RMdTfeJ0URTaP/fY91zlvU7zJjeG97N30uLiVx60rGeJXfwK5PxcjUH6DNSZL9utX9F25+D2tbHXgP+zYPQFRThIfF5FZtcMaEA1jBFByc5YifrD+UveMwcZhJvoLy+LG635GrhuJodX0f+UB5FqxiW5+jxseXxVXhnN76UvTa1gc2sUC0/wKHeNEkO0HSoTsI5vFDldD+Vl8NFCEe90hlmBDDS89C4RBYB38tSnGicngiki089N1D8jVl5zF+Ssek6pLk/IjIhPC3F7TEshnkJpakHa009B5b50HizuJofbe5+c37BSgiCSzo3iGXQDVC/0dB8uEzKXFbeo9sGT1ESUFSwFGHLeNNC1UkMRfam6KyRqC5/PtRA+kQzk2+vJ0gk4ghGzgzFAXMgH1FovYBIc0JnwxmTyZssXdYkv8kn1fM7I+VcdEAqMMwuzZk1Q1cV2lcAFH3agodLKkMNrur0r14kdLYhoOghcedJtzQVm288exYoMxyXNm70VKcA3IiMW9GXoGY4BAFCWLKbrTQWqGzr5+MY7lyQOK6umcDeH0+R1yDmuNIrv7oog0KYQeHl++upEAyDzbjxtvlsWlB0fXRM0chvh0NZ0dPHK+qPaYlCXXucTSnNu9QKnMr34xOGY1CazPAXV4Bvyf9BxLKVxnNd9E/NPA43XCrJhKwspM4GzAGss5k1icb4za7GocMIqFfMO4y93Ug8nbZkHKJ1kzbqnx0JjfQfEH2QBznRAkhCQN0crs1Zvewcx46oOPZNzoFZLpKrP2yVnQTl93gcsmS1iw/F62BscRtW7kwSvQ+GInUoF2PWlicX90ZvkoImtzcyNLmUJ219cBxdghng12vKwgj2qMXilGWfIdHSh6UF96DjGlhWbURXUlGT2aQL7qQtC6M/sLewjs3SVT1g2xj/5SrsxCs3Id6mIcKRZTX+OiKKTY1xAvL/Ga7I/M+nN+BBSqurWMHIDbnA4jJEQcWZKPcskVve4WHJlo9qUbHznWJQl1aA6ypUJQNk2+ztLbn2TJlXPj8MN5ET2ZAtzZ1E7BUKFfxQafB0MqRygpK8d+Vtz3AP1eyn8/J6lQ9iS5JSWZ7kokFZ2362klit+ogiDGfLAAgVd4vSSDyObEZLGA+bMAxDqEb0Uc9q69I7Phf3IZN9TD9uZFJjr/H6QdS8UEF5510GilqQAanzBRLGCKO74t+Dv7qLrk3wqXZihAYevalJ5BVak8dxXQd3xDLGst+qSUiyFWxIgIBA5GX1YdPXQN4R+WhARV9v1VFaOIUtLMJfRJHni3ZjVX0yjN8R3xFSKmKgKaOc+LuO8mY3gdXBkEc0dzfhhRFMaaLb8rLNwPnp/7pL6fkltxY7e7GxwCOXQXERDQqb0e8ocYb+Mfv/ua/xc7fkxYt9bksrhqmPUxz+XdfLb86QzSs/X2rrxkZWCiFdnRHOkrgRiymbJTPAeQX+ERA39YTZJkiRlEROK3kDm15oAT4iJ+WQQpExthNtUAbPtkptQt+iG1IK6cEFiNI/RQuaqRhSjViZ0RkFraZYCBxBfQZG5WAecItvuS4awGbTM/cd1N5aNU43DbuMNlkoaX81K7w6WKkaTOcQkGtwdEBsXKbeO9KRZmO8QauUjV+g5jH2ctz+PgYUg9gGIcHsdnA0dyp6ie4HNxqa2vLMln4nj7aJzyzE0lYDB6FHrC18TOZ3UNl6Pk5u0vJB+BZdp7MMCScLo/boxloKY0IRspCsRPDmJg0W/JlQ4ezmYHUYq/wplw8V6bI07bIr4TgTFXIWK61mH1Lz/fflu4/6hj3aCklY7KKESU7uf0JGrAmGTa8y3WHtlc9/ETXq1hJv0ulUzNcBe2fxn9FiNKOMRWtfhatMuWrtaSQIk0tYWW1xJ0ZvsJeGOfM1Edf56QhSW37SJin1gvbZE6mW1IjGW1tSUn1K6vebsKpLNXYDIZ4Pbi0ZZ4njhY90GgSiw2hSvUsdrklIabRP0/s4aVdPXSHmPVNGnxQHfjiMUDaXqqGJDRS7kLgOFq5ipmNQ3bP1J2U+PYgkAxL4TA5fXu9q1H5OTgrMzemAlvp5jI7MXOPlUaD+PBn0oBVM+l7KfqEOWFyX5XIZyrJCg1+PtIMy1/V3B45PVC4yuzkWNU3m+wzaYn/UDX7XpvgxywXXSq5AO63/nn7lnbl21e48BReXlDJ7aDjAPR97qOUEEvJoVuiWk4JONEdJVt9j5ad/Z1n,iv:KROMY3fOYmtbYVdtVnN1SJyRZEhU2tzJXxFvt3yitn4=,tag:7fAjJ3ARKZpOh2InLZihBg==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age19ax6vm3pv8rph5tq3mmehd9sy9jk823tw8svsd790r0lkslycquqvlwz9m - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUcDBqZldlajB1RURQVW03 - TWJTaDlvVEYvZDd5dXBJV0c2V3FGY0laMUZ3CkxjQUtLRHBOZkQ4Mk5JTGd5V0M4 - VUJ5aHJGSDl0MWpDSTNnQ2RSRnpPQ0kKLS0tIFA2em42NXNmZkJZWCs1Tmxia1VV - RnRPQ05LTDZTOEY3OWVMdmhHTTRKT1EKyBnGiEpkJ9TUGMSne5RUX5U4Nc49gXOn - 8q6IeBWnI3mkVA0PElAThSpXLMMzq01uDrcZEeE9BocyU7Y/JRbUMA== - -----END AGE ENCRYPTED FILE----- - - recipient: age1ffvr5pqd2lfj24e3fh53s92z6h76fda3du4y4k6r3yjumdwvpfgqzj033a - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBWeEw5YWpQNXM2dWpVY3Uw - bjBFQmVKeDlqYUFPNGhwVlVwdTdDaDY2bUNNCmJncHhrbHplU2ZvTHROcU1LNzBE - dnRlOFF2eXhHKzZ5VzQvS3RPb3FsWTAKLS0tIHNDcmdGTWl1VTREaVJXR1VzSUs0 - OUlxNjdQaXdXMkZ6bnV1ek4yZ2dpbkEKpKGOAxo5Eef2jtGrg4iSzmGCeg+vTgvu - +K8b+O19MIkGMDBm6UbYUPtc/7eqoEZRiTUzNMTmfkLVS4ul5zou9A== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2023-06-29T14:16:12Z" - mac: ENC[AES256_GCM,data:CgQOGEuv7SRdwpVNdFnM5MbrlJX9UvXOXNtenkAbrCH/hv3GrCc/2+R7pt7KA2teeHd1BuobTCP086guaxuzokyZZhj2W8jnsHvp15LiBc75zC1El2Vjz0QvRxBgbSAStNGuNHWeLzulRaiMYhP5Guna0c+91PPQgIn6BS26xiY=,iv:R2p8cvadHP9Mmrajpj1qhUgsai1D7D+QYE34j74INAs=,tag:8TnF0urFYlG0jKZijxuulQ==,type:str] - pgp: [] - unencrypted_suffix: _unencrypted - version: 3.7.3