Compare commits
128 commits
fix/nvfetc
...
main
Author | SHA1 | Date | |
---|---|---|---|
b12f | c9b4b44b68 | ||
teutat3s | 2501d4a145 | ||
teutat3s | 45edd17782 | ||
teutat3s | 4a7b5f3bb2 | ||
teutat3s | d83389b1dd | ||
teutat3s | dfd80c0e95 | ||
teutat3s | 110e0aefad | ||
teutat3s | fcf960a70f | ||
teutat3s | 5acbaa3dd5 | ||
teutat3s | 88404be55b | ||
teutat3s | 5a05079e17 | ||
teutat3s | 2d27b9c315 | ||
teutat3s | 8f4f5687f2 | ||
Benjamin Bädorf | 9bade4eb64 | ||
Benjamin Bädorf | d951e821b3 | ||
teutat3s | 1fe6d34f6e | ||
teutat3s | 9271e8d037 | ||
teutat3s | fd74f59c39 | ||
Benjamin Bädorf | e36709613c | ||
Benjamin Bädorf | 41c2d668f7 | ||
b12f | 3ef9ba217e | ||
Benjamin Bädorf | 3c3abec238 | ||
b12f | 8d23a7df43 | ||
b12f | 747fbd5dff | ||
teutat3s | b2d0c80f79 | ||
teutat3s | be42efff50 | ||
teutat3s | 6bc4cd72e9 | ||
teutat3s | 002e6970ed | ||
teutat3s | ef0d7ca68d | ||
teutat3s | c73a49d4d2 | ||
teutat3s | 62933459b9 | ||
teutat3s | ead398b835 | ||
teutat3s | 442ba90068 | ||
teutat3s | 3d2aed46ab | ||
teutat3s | a479b8e544 | ||
teutat3s | ea69c1d12c | ||
teutat3s | c30c1700f4 | ||
teutat3s | 1459aa9ada | ||
teutat3s | ab39518867 | ||
teutat3s | 2b9def0a76 | ||
teutat3s | 75f7d813d3 | ||
Benjamin Bädorf | 4c37713f2d | ||
teutat3s | c9c874ab00 | ||
teutat3s | a2733eee73 | ||
teutat3s | 3569216294 | ||
teutat3s | a6bec82fb7 | ||
teutat3s | 323a3bd189 | ||
teutat3s | 972e0af361 | ||
teutat3s | d664702dc8 | ||
teutat3s | d28da2e1e6 | ||
teutat3s | c65f185773 | ||
teutat3s | a7d4be4af5 | ||
teutat3s | 4a8c97ff74 | ||
teutat3s | f964dd3803 | ||
teutat3s | 5131912195 | ||
teutat3s | a3ad8e57f8 | ||
teutat3s | f4f67b3197 | ||
teutat3s | 97239d1fbb | ||
teutat3s | 7dbe853f3a | ||
teutat3s | 97cc2f3fa8 | ||
teutat3s | a708ab378c | ||
teutat3s | 6cb3ab687f | ||
teutat3s | b5ff01f703 | ||
teutat3s | fa2bfce65a | ||
Hendrik Sokolowski | 647c80ae4b | ||
teutat3s | 0c8763808a | ||
teutat3s | 70045c28ea | ||
teutat3s | 438be193e8 | ||
teutat3s | 9930808f77 | ||
b12f | f4c509b3de | ||
teutat3s | ed532fa271 | ||
Akshay Mankar | 91353938af | ||
teutat3s | 24587194e9 | ||
teutat3s | 6e870529da | ||
teutat3s | fcd65dc34a | ||
teutat3s | 029be00eab | ||
teutat3s | 76d8af7c3a | ||
teutat3s | 9f7d209392 | ||
teutat3s | 864f38920f | ||
teutat3s | 879a657f8c | ||
teutat3s | 3ea141d445 | ||
teutat3s | 3bdc4b1f39 | ||
teutat3s | 52c2ca9f13 | ||
teutat3s | 972e3f1569 | ||
teutat3s | b1ad71cd35 | ||
teutat3s | b01c5f9fce | ||
teutat3s | d0470d5aaf | ||
teutat3s | fd7f326376 | ||
Akshay Mankar | 1f5b2b9d10 | ||
teutat3s | cffffbd440 | ||
teutat3s | 803c495778 | ||
b12f | 153617394b | ||
b12f | 03aec25c22 | ||
teutat3s | a3c4719f9b | ||
teutat3s | a301a91d24 | ||
hensoko | 55d85cc757 | ||
Hendrik Sokolowski | 25126fd8ca | ||
Hendrik Sokolowski | 1c6a726d01 | ||
Hendrik Sokolowski | 858fd257a4 | ||
b12f | c9662596b7 | ||
teutat3s | dff81759a8 | ||
b12f | 820e322313 | ||
b12f | 837a2e1685 | ||
teutat3s | 9e6c7c140b | ||
teutat3s | 5fd4ffeb5d | ||
teutat3s | 9a3a7c7d00 | ||
Benjamin Bädorf | 3f7f1f0038 | ||
teutat3s | c8435976eb | ||
teutat3s | db3af3c76a | ||
teutat3s | c5c6f1b098 | ||
teutat3s | 35c276bb49 | ||
teutat3s | 4ef40b5971 | ||
teutat3s | a50ae3df10 | ||
teutat3s | 9153af8809 | ||
b12f | df569f3215 | ||
teutat3s | 2ed21e3b94 | ||
teutat3s | edc7335d48 | ||
teutat3s | 8ef0827565 | ||
hensoko | a18a883500 | ||
Hendrik Sokolowski | 25ad234f2a | ||
Hendrik Sokolowski | 5f6988291c | ||
Hendrik Sokolowski | 289b58198c | ||
teutat3s | 8422868ede | ||
teutat3s | 164c0f8fb3 | ||
teutat3s | 568e1b2fa7 | ||
teutat3s | 155237dec7 | ||
teutat3s | 158f336517 | ||
teutat3s | ae2f945f42 |
17
.drone.yml
17
.drone.yml
|
@ -11,10 +11,12 @@ steps:
|
||||||
event:
|
event:
|
||||||
- pull_request
|
- pull_request
|
||||||
environment:
|
environment:
|
||||||
NIX_FLAGS: "--print-build-logs --verbose"
|
NIX_FLAGS: "--print-build-logs --verbose --accept-flake-config"
|
||||||
commands:
|
commands:
|
||||||
- 'echo DEBUG: Using NIX_FLAGS: $NIX_FLAGS'
|
- 'echo DEBUG: Using NIX_FLAGS: $NIX_FLAGS'
|
||||||
- nix $$NIX_FLAGS develop --command nix flake show
|
- nix $$NIX_FLAGS develop --command nix flake show
|
||||||
|
- nix $$NIX_FLAGS develop --command treefmt --fail-on-change
|
||||||
|
- nix $$NIX_FLAGS develop --command editorconfig-checker
|
||||||
- nix $$NIX_FLAGS build ".#nixosConfigurations.PubSolarOS.config.system.build.toplevel"
|
- nix $$NIX_FLAGS build ".#nixosConfigurations.PubSolarOS.config.system.build.toplevel"
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -27,7 +29,7 @@ node:
|
||||||
steps:
|
steps:
|
||||||
- name: "Tests"
|
- name: "Tests"
|
||||||
environment:
|
environment:
|
||||||
NIX_FLAGS: "--print-build-logs --verbose"
|
NIX_FLAGS: "--print-build-logs --verbose --accept-flake-config"
|
||||||
commands:
|
commands:
|
||||||
- 'echo DEBUG: Using NIX_FLAGS: $NIX_FLAGS'
|
- 'echo DEBUG: Using NIX_FLAGS: $NIX_FLAGS'
|
||||||
- nix $$NIX_FLAGS build ".#checks.x86_64-linux.customTestFor-PubSolarOS-firstTest"
|
- nix $$NIX_FLAGS build ".#checks.x86_64-linux.customTestFor-PubSolarOS-firstTest"
|
||||||
|
@ -93,7 +95,7 @@ steps:
|
||||||
- name: "Build ISO"
|
- name: "Build ISO"
|
||||||
image: docker.nix-community.org/nixpkgs/nix-flakes:latest
|
image: docker.nix-community.org/nixpkgs/nix-flakes:latest
|
||||||
environment:
|
environment:
|
||||||
NIX_FLAGS: "--print-build-logs --verbose"
|
NIX_FLAGS: "--print-build-logs --verbose --accept-flake-config"
|
||||||
volumes:
|
volumes:
|
||||||
- name: file-exchange
|
- name: file-exchange
|
||||||
path: /var/nix/iso-cache
|
path: /var/nix/iso-cache
|
||||||
|
@ -111,9 +113,8 @@ steps:
|
||||||
- nix run nixpkgs#gnused -- --in-place "s/$ISO_NAME/PubSolarOS-latest.iso/" PubSolarOS-latest.iso.sha256
|
- nix run nixpkgs#gnused -- --in-place "s/$ISO_NAME/PubSolarOS-latest.iso/" PubSolarOS-latest.iso.sha256
|
||||||
|
|
||||||
- name: "Publish ISO"
|
- name: "Publish ISO"
|
||||||
# custom drone-scp image, source: https://git.b12f.io/pub-solar/drone-scp/
|
# https://github.com/appleboy/drone-scp/pull/141 got merged, yay
|
||||||
# docker build --tag registry.greenbaum.cloud/library/drone-scp:v1.6.5 --file ./docker/Dockerfile.linux.amd64 .
|
image: appleboy/drone-scp:1.6.5-linux-amd64
|
||||||
image: registry.greenbaum.cloud/library/drone-scp:v1.6.5
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: file-exchange
|
- name: file-exchange
|
||||||
path: /var/nix/iso-cache
|
path: /var/nix/iso-cache
|
||||||
|
@ -126,7 +127,7 @@ steps:
|
||||||
from_secret: iso_web_ssh_port
|
from_secret: iso_web_ssh_port
|
||||||
key:
|
key:
|
||||||
from_secret: iso_web_ssh_key
|
from_secret: iso_web_ssh_key
|
||||||
target: /srv/os/download
|
target: /data/srv/www/os/download
|
||||||
source:
|
source:
|
||||||
- /var/nix/iso-cache/*.iso
|
- /var/nix/iso-cache/*.iso
|
||||||
- /var/nix/iso-cache/*.iso.sha256
|
- /var/nix/iso-cache/*.iso.sha256
|
||||||
|
@ -148,6 +149,6 @@ volumes:
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 291be33bbf2954d1f5e4bf569679e24a773e7d6f90db4765fb9dacb3686a825e
|
hmac: a116f78a0b22188052893bdb46aa40f8de66438826c10ced362ea183d7644d67
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Setup ssh inside container
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo "$GITEA_SSH_KEY" > ~/.ssh/id_rsa
|
|
||||||
echo "[git.b12f.io]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ4uaREL7acSSCNAX+voDYl1Kj7JipP62fR5x1UyGP9u" >> ~/.ssh/known_hosts
|
|
||||||
echo "Host git.b12f.io" >> ~/.ssh/config
|
|
||||||
echo " Port 2222" >> ~/.ssh/config
|
|
||||||
chmod -R 600 ~/.ssh
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
set -u
|
|
||||||
|
|
||||||
LOCAL="$DRONE_BRANCH"
|
|
||||||
[ "$LOCAL" = "main" ] && UPSTREAM=origin/devos || UPSTREAM=origin/main
|
|
||||||
|
|
||||||
git fetch --all
|
|
||||||
git checkout "$LOCAL"
|
|
||||||
git merge "$UPSTREAM"
|
|
||||||
git push origin "$LOCAL"
|
|
|
@ -15,6 +15,9 @@ end_of_line = unset
|
||||||
insert_final_newline = unset
|
insert_final_newline = unset
|
||||||
trim_trailing_whitespace = unset
|
trim_trailing_whitespace = unset
|
||||||
indent_size = unset
|
indent_size = unset
|
||||||
|
charset = unset
|
||||||
|
indent_style = unset
|
||||||
|
indent_size = unset
|
||||||
|
|
||||||
[{.*,secrets}/**]
|
[{.*,secrets}/**]
|
||||||
end_of_line = unset
|
end_of_line = unset
|
||||||
|
|
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
@ -1,38 +0,0 @@
|
||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help improve
|
|
||||||
title: ''
|
|
||||||
labels: 'bug'
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Your issue may already be reported!
|
|
||||||
Please search on the [issue tracker](../) before creating one.
|
|
||||||
|
|
||||||
## Expected Behavior
|
|
||||||
<!--- What should happen? -->
|
|
||||||
<!--- How it should work? -->
|
|
||||||
|
|
||||||
## Current Behavior
|
|
||||||
<!--- What happens instead of the expected behavior? -->
|
|
||||||
|
|
||||||
## Possible Solution
|
|
||||||
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
|
|
||||||
<!--- or ideas how to implement the addition or change -->
|
|
||||||
|
|
||||||
## Steps to Reproduce
|
|
||||||
<!--- An unambiguous set of steps to reproduce this bug. -->
|
|
||||||
<!--- Linked fork or gist if needed. -->
|
|
||||||
1.
|
|
||||||
2.
|
|
||||||
3.
|
|
||||||
4.
|
|
||||||
|
|
||||||
## Context
|
|
||||||
<!--- How has this issue affected you? What are you trying to accomplish? -->
|
|
||||||
<!--- Providing context helps us come up with a solution that is most useful in the real world. -->
|
|
||||||
|
|
||||||
## Your Environment
|
|
||||||
<!--- Include relevant details about the environment you experienced the bug in. -->
|
|
||||||
<!--- If you have run `bud update`, for example, post the flake.lock file. -->
|
|
22
.github/ISSUE_TEMPLATE/community_request.md
vendored
22
.github/ISSUE_TEMPLATE/community_request.md
vendored
|
@ -1,22 +0,0 @@
|
||||||
---
|
|
||||||
name: Commuity Request
|
|
||||||
about: inspire contribution to the `community` branch
|
|
||||||
title: ''
|
|
||||||
labels: 'community'
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Your issue may already be reported!
|
|
||||||
Please search on the [issue tracker](../) before creating one.
|
|
||||||
|
|
||||||
## Ideas
|
|
||||||
<!--- The `community` branch is meant to provide various preconfigured system options, -->
|
|
||||||
<!--- useful to all kinds of users. -->
|
|
||||||
|
|
||||||
<!--- The point is to engage the community for what it thinks are -->
|
|
||||||
<!--- sane defaults for various tools. -->
|
|
||||||
|
|
||||||
## Requests
|
|
||||||
<!--- Have a tool that you'd like to see a system profile for? -->
|
|
||||||
<!--- Feel free to request it here. -->
|
|
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
@ -1,24 +0,0 @@
|
||||||
---
|
|
||||||
name: Feature request
|
|
||||||
about: Suggest an idea
|
|
||||||
title: ''
|
|
||||||
labels: 'enhancement'
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Your issue may already be reported!
|
|
||||||
Please search on the [issue tracker](../) before creating one.
|
|
||||||
|
|
||||||
## Would your feature fix an existing issue?
|
|
||||||
<!--- If your idea is related to, or resolves other issues, please mention. -->
|
|
||||||
|
|
||||||
## Describe the solution you'd like
|
|
||||||
<!--- What you want to happen. -->
|
|
||||||
|
|
||||||
## Describe alternatives you've considered
|
|
||||||
<!--- Any alternative solutions or features you've considered? -->
|
|
||||||
|
|
||||||
## Additional context
|
|
||||||
<!--- Is this feature only useful for a particular usecase? -->
|
|
||||||
<!--- Please elaborate. -->
|
|
16
.github/ISSUE_TEMPLATE/upstream_notice.md
vendored
16
.github/ISSUE_TEMPLATE/upstream_notice.md
vendored
|
@ -1,16 +0,0 @@
|
||||||
---
|
|
||||||
name: Upstream notice (Issues or Changes)
|
|
||||||
about: Create an upstream notice to help our research
|
|
||||||
title: '[ <put the upstream project> ]: <topic>'
|
|
||||||
labels: 'upstream'
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Link
|
|
||||||
<!-- just place a link to the upstream issue, or PR -->
|
|
||||||
|
|
||||||
|
|
||||||
## Context
|
|
||||||
<!-- We want to make this as cheap for you as possible.
|
|
||||||
Context is not required but helpful -->
|
|
29
.github/workflows/check.yml
vendored
29
.github/workflows/check.yml
vendored
|
@ -1,29 +0,0 @@
|
||||||
name: "Check & Cachix"
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- trying
|
|
||||||
- staging
|
|
||||||
jobs:
|
|
||||||
check:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2.3.4
|
|
||||||
- uses: cachix/install-nix-action@v13
|
|
||||||
with:
|
|
||||||
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20210415_76980a1/install
|
|
||||||
extra_nix_config: |
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
system-features = nixos-test benchmark big-parallel kvm recursive-nix
|
|
||||||
substituters = https://nrdxp.cachix.org https://nix-community.cachix.org https://cache.nixos.org
|
|
||||||
trusted-public-keys = nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
|
||||||
- uses: cachix/cachix-action@v10
|
|
||||||
with:
|
|
||||||
name: nrdxp
|
|
||||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
||||||
- run: nix -Lv flake check
|
|
||||||
- run: nix -Lv build ".#nixosConfigurations.NixOS.config.system.build.toplevel"
|
|
||||||
- run: nix -Lv develop -c echo OK
|
|
||||||
- run: nix -Lv develop --command bud --help
|
|
27
.github/workflows/mdbook_docs.yml
vendored
27
.github/workflows/mdbook_docs.yml
vendored
|
@ -1,27 +0,0 @@
|
||||||
name: Deploy Docs to GitHub Pages
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Setup mdBook
|
|
||||||
uses: peaceiris/actions-mdbook@v1
|
|
||||||
with:
|
|
||||||
mdbook-version: 'latest'
|
|
||||||
|
|
||||||
- run: mdbook build doc
|
|
||||||
|
|
||||||
- name: Deploy
|
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_branch: gh-pages
|
|
||||||
publish_dir: ./doc/book
|
|
||||||
cname: devos.divnix.com
|
|
71
.github/workflows/release.yml
vendored
71
.github/workflows/release.yml
vendored
|
@ -1,71 +0,0 @@
|
||||||
name: Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- v*
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
changelog:
|
|
||||||
name: Update Changelog
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Get version from tag
|
|
||||||
env:
|
|
||||||
GITHUB_REF: ${{ github.ref }}
|
|
||||||
run: |
|
|
||||||
export CURRENT_VERSION=${GITHUB_TAG/refs\/tags\/v/}
|
|
||||||
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
ref: main
|
|
||||||
- name: Update Changelog
|
|
||||||
uses: heinrichreimer/github-changelog-generator-action@v2.1.1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
issues: false
|
|
||||||
issuesWoLabels: false
|
|
||||||
pullRequests: true
|
|
||||||
prWoLabels: true
|
|
||||||
addSections: '{"documentation":{"prefix":"**Documentation:**","labels":["documentation"]}}'
|
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
||||||
with:
|
|
||||||
commit_message: Update Changelog for tag ${{ env.CURRENT_VERSION }}
|
|
||||||
file_pattern: CHANGELOG.md
|
|
||||||
|
|
||||||
release_notes:
|
|
||||||
name: Create Release Notes
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: changelog
|
|
||||||
steps:
|
|
||||||
- name: Get version from tag
|
|
||||||
env:
|
|
||||||
GITHUB_REF: ${{ github.ref }}
|
|
||||||
run: |
|
|
||||||
export CURRENT_VERSION=${GITHUB_TAG/refs\/tags\/v/}
|
|
||||||
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
ref: main
|
|
||||||
|
|
||||||
- name: Get Changelog Entry
|
|
||||||
id: changelog_reader
|
|
||||||
uses: mindsers/changelog-reader-action@v1
|
|
||||||
with:
|
|
||||||
version: ${{ env.CURRENT_VERSION }}
|
|
||||||
path: ./CHANGELOG.md
|
|
||||||
|
|
||||||
- name: Create Release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.ref }}
|
|
||||||
release_name: Release ${{ github.ref }}
|
|
||||||
body: ${{ steps.changelog_reader.outputs.log_entry }}
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
33
CONTRIBUTING.md
Normal file
33
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Quick branch overview
|
||||||
|
|
||||||
|
We work with several branches in this repo. This document aims to explain how
|
||||||
|
to contribute changes to the existing branches.
|
||||||
|
|
||||||
|
### `main` branch
|
||||||
|
|
||||||
|
- Changes to `modules` and `profiles` should go [the main branch](https://git.pub.solar/pub-solar/os/src/branch/main)
|
||||||
|
- Changes can get accepted via: Pull Request
|
||||||
|
- Branch protected from direct `git push`
|
||||||
|
|
||||||
|
### `infra` branch
|
||||||
|
|
||||||
|
- Changes to the [pub.solar](https://pub.solar) infrastructure should be merged [into this branch](https://git.pub.solar/pub-solar/os/src/branch/infra)
|
||||||
|
- Changes can get accepted via: Pull Request
|
||||||
|
- Branch protected from direct `git push`
|
||||||
|
|
||||||
|
### `momo/main` branch
|
||||||
|
|
||||||
|
- Changes to the [Momo](https://momo.koeln) infrastructure should be merged [into this branch](https://git.pub.solar/pub-solar/os/src/branch/momo/main)
|
||||||
|
- Changes can get accepted via: Pull Request
|
||||||
|
- Deployment of changes is [automatic via CI pipeline](https://git.pub.solar/pub-solar/os/src/commit/43bd7421509f7cc9ba06d7c740f3f536a4a2af76/.drone.yml#L20-L38)
|
||||||
|
- Branch protected from direct `git push`
|
||||||
|
|
||||||
|
### `$USER` branches
|
||||||
|
|
||||||
|
- User's custom hosts and changes can be worked on in these branches
|
||||||
|
- Direct `git push` possible
|
||||||
|
- Examples:
|
||||||
|
- [hensoko](https://git.pub.solar/pub-solar/os/src/branch/hensoko)
|
||||||
|
- [b12f](https://git.pub.solar/pub-solar/os/src/branch/b12f)
|
||||||
|
- [axeman](https://git.pub.solar/pub-solar/os/src/branch/axeman)
|
||||||
|
- [teutat3s](https://git.pub.solar/pub-solar/os/src/branch/teutat3s)
|
|
@ -38,7 +38,7 @@ _PubSolarOS_:
|
||||||
as much non-free software as you like.
|
as much non-free software as you like.
|
||||||
- Automation is better. The reproducibility of nix feels so much more
|
- Automation is better. The reproducibility of nix feels so much more
|
||||||
powerful once you're deploying your new configuration from your laptop
|
powerful once you're deploying your new configuration from your laptop
|
||||||
to all your other devices with one command. [We have an automated CI using drone](https://ci.b12f.io/pub-solar/os).
|
to all your other devices with one command. [We have an automated CI using drone](https://ci.pub.solar/pub-solar/os).
|
||||||
- Community is important. We just like working on this together, and it
|
- Community is important. We just like working on this together, and it
|
||||||
feels really good to see our progress at the end of a
|
feels really good to see our progress at the end of a
|
||||||
[hakken.irl](https://pub.solar/hakken) session.
|
[hakken.irl](https://pub.solar/hakken) session.
|
||||||
|
|
|
@ -5,7 +5,6 @@ let
|
||||||
|
|
||||||
ciSystems = [
|
ciSystems = [
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
"i686-linux"
|
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -59,5 +59,5 @@ list of strings
|
||||||
_*Default*_
|
_*Default*_
|
||||||
|
|
||||||
```
|
```
|
||||||
["aarch64-linux","aarch64-darwin","i686-linux","x86_64-darwin","x86_64-linux"]
|
["aarch64-linux","aarch64-darwin","x86_64-darwin","x86_64-linux"]
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
[book]
|
[book]
|
||||||
authors = ["Timothy DeHerrera"]
|
authors = [
|
||||||
|
"Timothy DeHerrera",
|
||||||
|
"Parthiv Seetharaman",
|
||||||
|
"David Arnold",
|
||||||
|
]
|
||||||
language = "en"
|
language = "en"
|
||||||
multilingual = false
|
multilingual = false
|
||||||
src = "."
|
src = "."
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
Users are a special case of [profiles](profiles.md) that define system
|
Users are a special case of [profiles](profiles.md) that define system
|
||||||
users and [home-manager][home-manager] configurations. For your convenience,
|
users and [home-manager][home-manager] configurations. For your convenience,
|
||||||
home manager is wired in by default so all you have to worry about is declaring
|
home manager is wired in by default so all you have to worry about is declaring
|
||||||
your users. For a fully fleshed out example, check out the developers personal
|
your users.
|
||||||
[branch](https://github.com/divnix/devos/tree/nrd/users/nrd/default.nix).
|
|
||||||
|
|
||||||
## Basic Usage
|
## Basic Usage
|
||||||
|
|
||||||
|
@ -60,18 +59,6 @@ using the `homeConfigurations` flake output.
|
||||||
This is great for keeping your environment consistent across Unix-like systems,
|
This is great for keeping your environment consistent across Unix-like systems,
|
||||||
including macOS.
|
including macOS.
|
||||||
|
|
||||||
### From within the projects devshell:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
# builds the pub-solar user defined in the PubSolarOS host
|
|
||||||
nix build '.#homeConfigurations."pub-solar@PubSolarOS".activationPackage'
|
|
||||||
|
|
||||||
# build and activate
|
|
||||||
nix build '.#homeConfigurations."pub-solar@PubSolarOS".activationPackage' && ./result/activate && unlink result
|
|
||||||
```
|
|
||||||
|
|
||||||
### Manually from outside the project:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# build
|
# build
|
||||||
nix build "github:divnix/devos#homeConfigurations.nixos@NixOS.home.activationPackage"
|
nix build "github:divnix/devos#homeConfigurations.nixos@NixOS.home.activationPackage"
|
||||||
|
@ -81,5 +68,5 @@ nix build "github:divnix/devos#homeConfigurations.nixos@NixOS.home.activationPac
|
||||||
```
|
```
|
||||||
|
|
||||||
[home-manager]: https://nix-community.github.io/home-manager
|
[home-manager]: https://nix-community.github.io/home-manager
|
||||||
[modules-list]: https://github.com/divnix/devos/tree/main/users/modules/module-list.nix
|
[modules-list]: https://github.com/divnix/digga/tree/main/users/modules/module-list.nix
|
||||||
[portableuser]: https://digga.divnix.com/api-reference-home.html#homeusers
|
[portableuser]: https://digga.divnix.com/api-reference-home.html#homeusers
|
||||||
|
|
|
@ -4,7 +4,8 @@ The only dependency is nix, so make sure you have it [installed][install-nix].
|
||||||
|
|
||||||
## Get the Template
|
## Get the Template
|
||||||
|
|
||||||
If you currently don't have flakes setup, you can utilize the digga shell to pull the template:
|
If you currently don't have flakes setup, you can utilize the digga shell to
|
||||||
|
pull the template:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
nix-shell "https://github.com/divnix/digga/archive/main.tar.gz" \
|
nix-shell "https://github.com/divnix/digga/archive/main.tar.gz" \
|
||||||
|
@ -22,37 +23,26 @@ Then make sure to create the git repository:
|
||||||
```sh
|
```sh
|
||||||
git init
|
git init
|
||||||
git add .
|
git add .
|
||||||
git commit -m init
|
git commit
|
||||||
```
|
```
|
||||||
|
|
||||||
To drop into a nix-shell, if you don't have flakes setup, use the digga shell to create a `flake.lock`:
|
Finally, run `nix-shell` to get to an interactive shell with all the
|
||||||
|
dependencies, including the unstable nix version required. You can run `menu` to
|
||||||
```sh
|
confirm that you are using digga (expected output includes [docs], [general
|
||||||
nix-shell "https://github.com/divnix/digga/archive/main.tar.gz" \
|
commands], [linter], etc.).
|
||||||
--run "nix flake lock"
|
|
||||||
```
|
|
||||||
|
|
||||||
Or if you do have flakes support, just run:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
nix flake lock
|
|
||||||
```
|
|
||||||
|
|
||||||
Finally, run `nix-shell` to get to an interactive shell with all the dependencies, including the unstable nix
|
|
||||||
version required. You can run `menu` to confirm that you are using digga (expected output includes [docs], [general commands], [linter], etc.).
|
|
||||||
|
|
||||||
In addition, the [binary cache](../integrations/cachix.md) is added for faster deployment.
|
In addition, the [binary cache](../integrations/cachix.md) is added for faster deployment.
|
||||||
|
|
||||||
> ##### _Notes:_
|
> # _Notes:_
|
||||||
>
|
>
|
||||||
> - Flakes ignore files that have not been added to git, so be sure to stage new
|
> - Flakes ignore files that have not been added to git, so be sure to stage new
|
||||||
> files before building the system.
|
> files before building the system.
|
||||||
> - You can choose to simply clone the repo with git if you want to follow
|
> - You can choose to simply clone the repo with git if you want to follow
|
||||||
> upstream changes.
|
> upstream changes.
|
||||||
> - If the `nix-shell -p cachix --run "cachix use nrdxp"` line doesn't work
|
> - If the `nix-shell -p cachix --run "cachix use nrdxp"` line doesn't work you
|
||||||
> you can try with sudo: `sudo nix-shell -p cachix --run "cachix use nrdxp"`
|
> can try with sudo: `sudo nix-shell -p cachix --run "cachix use nrdxp"`
|
||||||
|
|
||||||
## Next Steps:
|
## Next Steps
|
||||||
|
|
||||||
- [Make installable ISO](./iso.md)
|
- [Make installable ISO](./iso.md)
|
||||||
|
|
||||||
|
|
15
doc/tests.md
15
doc/tests.md
|
@ -14,12 +14,21 @@ be built during CI.
|
||||||
|
|
||||||
## Integration Tests
|
## Integration Tests
|
||||||
|
|
||||||
All your profiles defined in suites will be tested in a NixOS VM.
|
All your profiles defined in suites can be tested against an individual host.
|
||||||
|
Simply use digga's pre-baked `digga.lib.allProfilesTest` like so:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
hosts = {
|
||||||
|
Morty.tests = [ allProfilesTest ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
You can write integration tests for one or more NixOS VMs that can,
|
You can write integration tests for one or more NixOS VMs that can,
|
||||||
optionally, be networked together, and yes, it's as awesome as it sounds!
|
optionally, be networked together, and yes, it's as awesome as it sounds!
|
||||||
|
|
||||||
Be sure to use the `mkTest` function from digga, `digga.lib.pkgs-lib.mkTest`
|
Be sure to use the `mkTest` function from Digga, `digga.lib.mkTest`
|
||||||
which wraps the official [testing-python][testing-python] function to ensure
|
which wraps the official [testing-python][testing-python] function to ensure
|
||||||
that the system is setup exactly as it is for a bare DevOS system. There are
|
that the system is setup exactly as it is for a bare DevOS system. There are
|
||||||
already great resources for learning how to use these tests effectively,
|
already great resources for learning how to use these tests effectively,
|
||||||
|
@ -28,7 +37,7 @@ and the examples in [nixpkgs][nixos-tests].
|
||||||
|
|
||||||
[test-doc]: https://nixos.org/manual/nixos/stable/index.html#sec-nixos-tests
|
[test-doc]: https://nixos.org/manual/nixos/stable/index.html#sec-nixos-tests
|
||||||
[test-blog]: https://www.haskellforall.com/2020/11/how-to-use-nixos-for-lightweight.html
|
[test-blog]: https://www.haskellforall.com/2020/11/how-to-use-nixos-for-lightweight.html
|
||||||
[default]: https://github.com/divnix/devos/tree/main/tests/default.nix
|
[default]: https://github.com/divnix/devos/tree/core/tests/default.nix
|
||||||
[run-test]: https://github.com/NixOS/nixpkgs/blob/6571462647d7316aff8b8597ecdf5922547bf365/lib/debug.nix#L154-L166
|
[run-test]: https://github.com/NixOS/nixpkgs/blob/6571462647d7316aff8b8597ecdf5922547bf365/lib/debug.nix#L154-L166
|
||||||
[nixos-tests]: https://github.com/NixOS/nixpkgs/tree/master/nixos/tests
|
[nixos-tests]: https://github.com/NixOS/nixpkgs/tree/master/nixos/tests
|
||||||
[testing-python]: https://github.com/NixOS/nixpkgs/tree/master/nixos/lib/testing-python.nix
|
[testing-python]: https://github.com/NixOS/nixpkgs/tree/master/nixos/lib/testing-python.nix
|
||||||
|
|
451
flake.lock
451
flake.lock
|
@ -2,16 +2,19 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"agenix": {
|
"agenix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"darwin": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixos"
|
"nixos"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673301561,
|
"lastModified": 1682101079,
|
||||||
"narHash": "sha256-gRUWHbBAtMuPDJQXotoI8u6+3DGBIUZHkyQWpIv7WpM=",
|
"narHash": "sha256-MdAhtjrLKnk2uiqun1FWABbKpLH090oeqCSiWemtuck=",
|
||||||
"owner": "ryantm",
|
"owner": "ryantm",
|
||||||
"repo": "agenix",
|
"repo": "agenix",
|
||||||
"rev": "42d371d861a227149dc9a7e03350c9ab8b8ddd68",
|
"rev": "2994d002dcff5353ca1ac48ec584c7f6589fe447",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -20,21 +23,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"blank": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1625557891,
|
|
||||||
"narHash": "sha256-O8/MWsPBGhhyPoPLHZAuoZiiHo9q6FLlEeIDEXuj6T4=",
|
|
||||||
"owner": "divnix",
|
|
||||||
"repo": "blank",
|
|
||||||
"rev": "5a5d2684073d9f563072ed07c871d577a6c614a8",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "divnix",
|
|
||||||
"repo": "blank",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"darwin": {
|
"darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -42,32 +30,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673295039,
|
"lastModified": 1696360011,
|
||||||
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
|
"narHash": "sha256-HpPv27qMuPou4acXcZ8Klm7Zt0Elv9dgDvSJaomWb9Y=",
|
||||||
"owner": "LnL7",
|
"owner": "LnL7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
|
"rev": "8b6ea26d5d2e8359d06278364f41fbc4b903b28a",
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "LnL7",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"darwin_2": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"digga",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1651916036,
|
|
||||||
"narHash": "sha256-UuD9keUGm4IuVEV6wdSYbuRm7CwfXE63hVkzKDjVsh4=",
|
|
||||||
"owner": "LnL7",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"rev": "2f2bdf658d2b79bada78dc914af99c53cad37cba",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -78,18 +45,20 @@
|
||||||
},
|
},
|
||||||
"deploy": {
|
"deploy": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": [
|
||||||
|
"flake-compat"
|
||||||
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixos"
|
"nixos"
|
||||||
],
|
],
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1674127017,
|
"lastModified": 1695052866,
|
||||||
"narHash": "sha256-QO1xF7stu5ZMDLbHN30LFolMAwY6TVlzYvQoUs1RD68=",
|
"narHash": "sha256-agn7F9Oww4oU6nPiw+YiYI9Xb4vOOE73w8PAoBRP4AA=",
|
||||||
"owner": "serokell",
|
"owner": "serokell",
|
||||||
"repo": "deploy-rs",
|
"repo": "deploy-rs",
|
||||||
"rev": "8c9ea9605eed20528bf60fae35a2b613b901fd77",
|
"rev": "e3f41832680801d0ee9e2ed33eb63af398b090e9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -107,11 +76,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1655976588,
|
"lastModified": 1671489820,
|
||||||
"narHash": "sha256-VreHyH6ITkf/1EX/8h15UqhddJnUleb0HgbC3gMkAEQ=",
|
"narHash": "sha256-qoei5HDJ8psd1YUPD7DhbHdhLIT9L2nadscp4Qk37uk=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "devshell",
|
"repo": "devshell",
|
||||||
"rev": "899ca4629020592a13a46783587f6e674179d1db",
|
"rev": "5aa3a8039c68b4bf869327446590f4cdf90bb634",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -122,18 +91,21 @@
|
||||||
},
|
},
|
||||||
"digga": {
|
"digga": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"blank": "blank",
|
"darwin": [
|
||||||
"darwin": "darwin_2",
|
"darwin"
|
||||||
|
],
|
||||||
"deploy": [
|
"deploy": [
|
||||||
"deploy"
|
"deploy"
|
||||||
],
|
],
|
||||||
"devshell": "devshell",
|
"devshell": "devshell",
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": [
|
||||||
|
"flake-compat"
|
||||||
|
],
|
||||||
|
"flake-utils": "flake-utils_2",
|
||||||
"flake-utils-plus": "flake-utils-plus",
|
"flake-utils-plus": "flake-utils-plus",
|
||||||
"home-manager": [
|
"home-manager": [
|
||||||
"home"
|
"home"
|
||||||
],
|
],
|
||||||
"latest": "latest",
|
|
||||||
"nixlib": [
|
"nixlib": [
|
||||||
"nixos"
|
"nixos"
|
||||||
],
|
],
|
||||||
|
@ -143,11 +115,11 @@
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1661600857,
|
"lastModified": 1674947971,
|
||||||
"narHash": "sha256-KfQCcTtfvU0PXV4fD9XKIMcKx9lUUR0xWJoBgc12fKE=",
|
"narHash": "sha256-6gKqegJHs72jnfFP9g2sihl4fIZgtKgKuqU2rCkIdGY=",
|
||||||
"owner": "pub-solar",
|
"owner": "pub-solar",
|
||||||
"repo": "digga",
|
"repo": "digga",
|
||||||
"rev": "c902b3ef0aa45cb4f336c390f647bb182c38a221",
|
"rev": "2da608bd8afb48afef82c6b1b6d852a36094a497",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -158,38 +130,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1668681692,
|
|
||||||
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat_2": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1650374568,
|
|
||||||
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat_3": {
|
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673956053,
|
"lastModified": 1673956053,
|
||||||
|
@ -222,7 +162,10 @@
|
||||||
},
|
},
|
||||||
"flake-utils-plus": {
|
"flake-utils-plus": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2"
|
"flake-utils": [
|
||||||
|
"digga",
|
||||||
|
"flake-utils"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1654029967,
|
"lastModified": 1654029967,
|
||||||
|
@ -240,220 +183,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_2": {
|
"flake-utils_2": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1644229661,
|
|
||||||
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixos"
|
|
||||||
],
|
|
||||||
"utils": "utils_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1674440933,
|
|
||||||
"narHash": "sha256-CASRcD/rK3fn5vUCti3jzry7zi0GsqRsBohNq9wPgLs=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "65c47ced082e3353113614f77b1bc18822dc731f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"ref": "release-22.11",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"latest": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1657265485,
|
|
||||||
"narHash": "sha256-PUQ9C7mfi0/BnaAUX2R/PIkoNCb/Jtx9EpnhMBNrO/o=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "b39924fc7764c08ae3b51beef9a3518c414cdb7d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"latest_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1674641431,
|
|
||||||
"narHash": "sha256-qfo19qVZBP4qn5M5gXc/h1MDgAtPA5VxJm9s8RUAkVk=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "9b97ad7b4330aacda9b2343396eb3df8a853b4fc",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"naersk": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixos"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1671096816,
|
|
||||||
"narHash": "sha256-ezQCsNgmpUHdZANDCILm3RvtO1xH8uujk/+EqNvzIOg=",
|
|
||||||
"owner": "nmattia",
|
|
||||||
"repo": "naersk",
|
|
||||||
"rev": "d998160d6a076cfe8f9741e56aeec7e267e3e114",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nmattia",
|
|
||||||
"repo": "naersk",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixlib": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1636849918,
|
|
||||||
"narHash": "sha256-nzUK6dPcTmNVrgTAC1EOybSMsrcx+QrVPyqRdyKLkjA=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixpkgs.lib",
|
|
||||||
"rev": "28a5b0557f14124608db68d3ee1f77e9329e9dd5",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixpkgs.lib",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixos": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1674868155,
|
|
||||||
"narHash": "sha256-eFNm2h6fNbgD7ZpO4MHikCB5pSnCJ7DTmwPisjetmwc=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "ce20e9ebe1903ea2ba1ab006ec63093020c761cb",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-22.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixos-generators": {
|
|
||||||
"inputs": {
|
|
||||||
"nixlib": "nixlib",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1674666581,
|
|
||||||
"narHash": "sha256-KNI2s/xrL7WOYaPJAWKBtb7cCH3335rLfsL+B+ssuGY=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixos-generators",
|
|
||||||
"rev": "6a5dc1d3d557ea7b5c19b15ff91955124d0400fa",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixos-generators",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixos-hardware": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1674550793,
|
|
||||||
"narHash": "sha256-ljJlIFQZwtBbzWqWTmmw2O5BFmQf1A/DspwMOQtGXHk=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixos-hardware",
|
|
||||||
"rev": "b7ac0a56029e4f9e6743b9993037a5aaafd57103",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixos-hardware",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1637186689,
|
|
||||||
"narHash": "sha256-NU7BhgnwA/3ibmCeSzFK6xGi+Bari9mPfn+4cBmyEjw=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "7fad01d9d5a3f82081c00fb57918d64145dc904c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-unstable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1657292830,
|
|
||||||
"narHash": "sha256-ldfVSTveWceDCmW6gf3B4kR6vwmz/XS80y5wsLLHFJU=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "334ec8b503c3981e37a04b817a70e8d026ea9e84",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nur": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 0,
|
|
||||||
"narHash": "sha256-koC6DBYmLCrgXA+AMHVaODf1uHYPmvcFygHfy3eg6vI=",
|
|
||||||
"path": "/nix/store/6mfkswqi67m35qwv0vh7kpk8rypbl2rq-source",
|
|
||||||
"type": "path"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nur",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"agenix": "agenix",
|
|
||||||
"darwin": "darwin",
|
|
||||||
"deploy": "deploy",
|
|
||||||
"digga": "digga",
|
|
||||||
"flake-compat": "flake-compat_3",
|
|
||||||
"home": "home",
|
|
||||||
"latest": "latest_2",
|
|
||||||
"naersk": "naersk",
|
|
||||||
"nixos": "nixos",
|
|
||||||
"nixos-generators": "nixos-generators",
|
|
||||||
"nixos-hardware": "nixos-hardware",
|
|
||||||
"nur": "nur"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"utils": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667395993,
|
"lastModified": 1667395993,
|
||||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
|
@ -468,7 +197,121 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"utils_2": {
|
"fork": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1692960587,
|
||||||
|
"narHash": "sha256-39SKGdhn8jKKkdqhULbCvQOpdUPE9NNJpy5HTB++Jvg=",
|
||||||
|
"owner": "teutat3s",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "312709dd70684f52496580e533d58645526b1c90",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "teutat3s",
|
||||||
|
"ref": "nvfetcher-fix",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixos"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1695108154,
|
||||||
|
"narHash": "sha256-gSg7UTVtls2yO9lKtP0yb66XBHT1Fx5qZSZbGMpSn2c=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "07682fff75d41f18327a871088d20af2710d4744",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-23.05",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"latest": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696604326,
|
||||||
|
"narHash": "sha256-YXUNI0kLEcI5g8lqGMb0nh67fY9f2YoJsILafh6zlMo=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "87828a0e03d1418e848d3dd3f3014a632e4a4f64",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixos": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696697597,
|
||||||
|
"narHash": "sha256-q26Qv4DQ+h6IeozF2o1secyQG0jt2VUT3V0K58jr3pg=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "5a237aecb57296f67276ac9ab296a41c23981f56",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-23.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixos-hardware": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696614066,
|
||||||
|
"narHash": "sha256-nAyYhO7TCr1tikacP37O9FnGr2USOsVBD3IgvndUYjM=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"rev": "bb2db418b616fea536b1be7f6ee72fb45c11afe0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1672791794,
|
||||||
|
"narHash": "sha256-mqGPpGmwap0Wfsf3o2b6qHJW1w2kk/I6cGCGIU+3t6o=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9813adc7f7c0edd738c6bdd8431439688bb0cb3d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"agenix": "agenix",
|
||||||
|
"darwin": "darwin",
|
||||||
|
"deploy": "deploy",
|
||||||
|
"digga": "digga",
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"fork": "fork",
|
||||||
|
"home": "home",
|
||||||
|
"latest": "latest",
|
||||||
|
"nixos": "nixos",
|
||||||
|
"nixos-hardware": "nixos-hardware"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667395993,
|
"lastModified": 1667395993,
|
||||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
|
|
64
flake.nix
64
flake.nix
|
@ -2,14 +2,14 @@
|
||||||
description = "A highly structured configuration database.";
|
description = "A highly structured configuration database.";
|
||||||
|
|
||||||
nixConfig.extra-experimental-features = "nix-command flakes";
|
nixConfig.extra-experimental-features = "nix-command flakes";
|
||||||
nixConfig.extra-substituters = "https://nix-dram.cachix.org https://dram.cachix.org https://nrdxp.cachix.org https://nix-community.cachix.org";
|
|
||||||
nixConfig.extra-trusted-public-keys = "nix-dram.cachix.org-1:CKjZ0L1ZiqH3kzYAZRt8tg8vewAx5yj8Du/+iR8Efpg= dram.cachix.org-1:baoy1SXpwYdKbqdTbfKGTKauDDeDlHhUpC+QuuILEMY= nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
|
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# Track channels with commits tested and built by hydra
|
# Track channels with commits tested and built by hydra
|
||||||
nixos.url = "github:nixos/nixpkgs/nixos-22.11";
|
nixos.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||||
latest.url = "github:nixos/nixpkgs/nixos-unstable";
|
latest.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
fork.url = "github:teutat3s/nixpkgs/nvfetcher-fix";
|
||||||
|
|
||||||
flake-compat.url = "github:edolstra/flake-compat";
|
flake-compat.url = "github:edolstra/flake-compat";
|
||||||
flake-compat.flake = false;
|
flake-compat.flake = false;
|
||||||
|
|
||||||
|
@ -18,8 +18,10 @@
|
||||||
digga.inputs.nixlib.follows = "nixos";
|
digga.inputs.nixlib.follows = "nixos";
|
||||||
digga.inputs.home-manager.follows = "home";
|
digga.inputs.home-manager.follows = "home";
|
||||||
digga.inputs.deploy.follows = "deploy";
|
digga.inputs.deploy.follows = "deploy";
|
||||||
|
digga.inputs.darwin.follows = "darwin";
|
||||||
|
digga.inputs.flake-compat.follows = "flake-compat";
|
||||||
|
|
||||||
home.url = "github:nix-community/home-manager/release-22.11";
|
home.url = "github:nix-community/home-manager/release-23.05";
|
||||||
home.inputs.nixpkgs.follows = "nixos";
|
home.inputs.nixpkgs.follows = "nixos";
|
||||||
|
|
||||||
darwin.url = "github:LnL7/nix-darwin";
|
darwin.url = "github:LnL7/nix-darwin";
|
||||||
|
@ -27,16 +29,13 @@
|
||||||
|
|
||||||
deploy.url = "github:serokell/deploy-rs";
|
deploy.url = "github:serokell/deploy-rs";
|
||||||
deploy.inputs.nixpkgs.follows = "nixos";
|
deploy.inputs.nixpkgs.follows = "nixos";
|
||||||
|
deploy.inputs.flake-compat.follows = "flake-compat";
|
||||||
|
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
agenix.inputs.nixpkgs.follows = "nixos";
|
agenix.inputs.nixpkgs.follows = "nixos";
|
||||||
|
agenix.inputs.darwin.follows = "darwin";
|
||||||
naersk.url = "github:nmattia/naersk";
|
|
||||||
naersk.inputs.nixpkgs.follows = "nixos";
|
|
||||||
|
|
||||||
nixos-hardware.url = "github:nixos/nixos-hardware";
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
||||||
|
|
||||||
nixos-generators.url = "github:nix-community/nixos-generators";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
@ -45,7 +44,6 @@
|
||||||
nixos,
|
nixos,
|
||||||
home,
|
home,
|
||||||
nixos-hardware,
|
nixos-hardware,
|
||||||
nur,
|
|
||||||
agenix,
|
agenix,
|
||||||
deploy,
|
deploy,
|
||||||
...
|
...
|
||||||
|
@ -58,14 +56,22 @@
|
||||||
# allowUnfree = true;
|
# allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
supportedSystems = ["x86_64-linux" "aarch64-linux"];
|
supportedSystems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin"];
|
||||||
|
|
||||||
channels = {
|
channels = {
|
||||||
nixos = {
|
nixos = {
|
||||||
imports = [(digga.lib.importOverlays ./overlays)];
|
imports = [(digga.lib.importOverlays ./overlays)];
|
||||||
overlays = [];
|
overlays = [
|
||||||
|
(self: super: {
|
||||||
|
deploy-rs = {
|
||||||
|
inherit (inputs.nixos.legacyPackages.x86_64-linux) deploy-rs;
|
||||||
|
lib = inputs.deploy.lib.x86_64-linux;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
latest = {};
|
latest = {};
|
||||||
|
fork = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
lib = import ./lib {lib = digga.lib // nixos.lib;};
|
lib = import ./lib {lib = digga.lib // nixos.lib;};
|
||||||
|
@ -77,8 +83,7 @@
|
||||||
our = self.lib;
|
our = self.lib;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
nur.overlay
|
agenix.overlays.default
|
||||||
agenix.overlay
|
|
||||||
|
|
||||||
(import ./pkgs)
|
(import ./pkgs)
|
||||||
];
|
];
|
||||||
|
@ -102,9 +107,7 @@
|
||||||
|
|
||||||
imports = [(digga.lib.importHosts ./hosts)];
|
imports = [(digga.lib.importHosts ./hosts)];
|
||||||
hosts = {
|
hosts = {
|
||||||
/*
|
# Set host-specific properties here
|
||||||
set host specific properties here
|
|
||||||
*/
|
|
||||||
bootstrap = {
|
bootstrap = {
|
||||||
modules = [
|
modules = [
|
||||||
digga.nixosModules.bootstrapIso
|
digga.nixosModules.bootstrapIso
|
||||||
|
@ -112,10 +115,10 @@
|
||||||
};
|
};
|
||||||
PubSolarOS = {
|
PubSolarOS = {
|
||||||
tests = [
|
tests = [
|
||||||
(import ./tests/first-test.nix {
|
#(import ./tests/first-test.nix {
|
||||||
pkgs = nixos.legacyPackages.x86_64-linux;
|
# pkgs = nixos.legacyPackages.x86_64-linux;
|
||||||
lib = nixos.lib;
|
# lib = nixos.lib;
|
||||||
})
|
#})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -144,7 +147,11 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
users = {
|
users = {
|
||||||
pub-solar = {suites, ...}: {imports = suites.base;};
|
pub-solar = {suites, ...}: {
|
||||||
|
imports = suites.base;
|
||||||
|
|
||||||
|
home.stateVersion = "21.03";
|
||||||
|
};
|
||||||
}; # digga.lib.importers.rakeLeaves ./users/hm;
|
}; # digga.lib.importers.rakeLeaves ./users/hm;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -152,6 +159,17 @@
|
||||||
|
|
||||||
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
|
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
|
||||||
|
|
||||||
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations {};
|
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations {
|
||||||
|
#example = {
|
||||||
|
# hostname = "example.com:22";
|
||||||
|
# sshUser = "bartender";
|
||||||
|
# fastConnect = true;
|
||||||
|
# profilesOrder = ["system" "direnv"];
|
||||||
|
# profiles.direnv = {
|
||||||
|
# user = "bartender";
|
||||||
|
# path = self.pkgs.x86_64-linux.nixos.deploy-rs.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.bartender;
|
||||||
|
# };
|
||||||
|
#};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,10 @@
|
||||||
{lib}:
|
{lib}:
|
||||||
lib.makeExtensible (self: {})
|
lib.makeExtensible (self: let
|
||||||
|
callLibs = file: import file {lib = self;};
|
||||||
|
in rec {
|
||||||
|
## Define your own library functions here!
|
||||||
|
#id = x: x;
|
||||||
|
## Or in files, containing functions that take {lib}
|
||||||
|
#foo = callLibs ./foo.nix;
|
||||||
|
## In configs, they can be used under "lib.our"
|
||||||
|
})
|
||||||
|
|
|
@ -66,37 +66,52 @@ in {
|
||||||
|
|
||||||
# rtkit is optional but recommended
|
# rtkit is optional but recommended
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
# Enable sound using pipewire-pulse
|
# Enable sound using pipewire-pulse, default config:
|
||||||
|
# https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/daemon/pipewire.conf.in
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
alsa.support32Bit = true;
|
alsa.support32Bit = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
|
|
||||||
config.pipewire = {
|
|
||||||
context.default.clock = {
|
|
||||||
allowed-rates = [44100 48000 88200 96000];
|
|
||||||
rate = 44100;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config.pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Bluetooth configuration using wireplumber
|
# Make pulseaudio listen on port 4713 for mopidy, extending the default
|
||||||
# https://nixos.wiki/wiki/PipeWire#Bluetooth_Configuration
|
# config: https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/daemon/pipewire-pulse.conf.in
|
||||||
environment.etc = mkIf cfg.bluetooth.enable {
|
environment.etc = mkIf cfg.mopidy.enable {
|
||||||
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
|
"pipewire/pipewire-pulse.conf.d/99-custom.conf".text = ''
|
||||||
bluez_monitor.properties = {
|
{
|
||||||
["bluez5.enable-sbc-xq"] = true,
|
"context.modules": [
|
||||||
["bluez5.enable-msbc"] = true,
|
{
|
||||||
["bluez5.enable-hw-volume"] = true,
|
"name": "libpipewire-module-protocol-pulse",
|
||||||
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
"args": {
|
||||||
|
"server.address": ["unix:native", "tcp:4713"],
|
||||||
|
"vm.overrides": {
|
||||||
|
"pulse.min.quantum": "1024/48000"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable bluetooth
|
# Enable bluetooth
|
||||||
hardware.bluetooth.enable = mkIf cfg.bluetooth.enable true;
|
hardware.bluetooth = mkIf cfg.bluetooth.enable {
|
||||||
|
enable = true;
|
||||||
|
# Disable bluetooth on startup to save battery
|
||||||
|
powerOnBoot = false;
|
||||||
|
# Disable useless SIM Access Profile plugin
|
||||||
|
disabledPlugins = [
|
||||||
|
"sap"
|
||||||
|
];
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
# Enables experimental features and interfaces.
|
||||||
|
# Makes BlueZ Battery Provider available
|
||||||
|
Experimental = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
services.blueman.enable = mkIf cfg.bluetooth.enable true;
|
services.blueman.enable = mkIf cfg.bluetooth.enable true;
|
||||||
|
|
||||||
# Enable audio server & client
|
# Enable audio server & client
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
{
|
|
||||||
"context.properties": {},
|
|
||||||
"context.spa-libs": {
|
|
||||||
"audio.convert.*": "audioconvert/libspa-audioconvert",
|
|
||||||
"support.*": "support/libspa-support"
|
|
||||||
},
|
|
||||||
"context.modules": [
|
|
||||||
{
|
|
||||||
"name": "libpipewire-module-rtkit",
|
|
||||||
"args": {},
|
|
||||||
"flags": ["ifexists", "nofail"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libpipewire-module-protocol-native"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libpipewire-module-client-node"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libpipewire-module-adapter"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libpipewire-module-metadata"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "libpipewire-module-protocol-pulse",
|
|
||||||
"args": {
|
|
||||||
"server.address": ["unix:native", "tcp:4713"],
|
|
||||||
"vm.overrides": {
|
|
||||||
"pulse.min.quantum": "1024/48000"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"stream.properties": {}
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; {
|
|
||||||
# Both things below are for
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/124215
|
|
||||||
documentation.info.enable = lib.mkForce false;
|
|
||||||
nix.settings.extra-sandbox-paths = ["/bin/sh=${pkgs.bash}/bin/sh"];
|
|
||||||
}
|
|
|
@ -33,10 +33,10 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
loader.systemd-boot.enable = true;
|
loader.systemd-boot.enable = lib.mkDefault true;
|
||||||
|
|
||||||
# Use latest LTS linux kernel by default
|
# Use latest LTS linux kernel by default
|
||||||
kernelPackages = pkgs.linuxPackages_5_15;
|
kernelPackages = lib.mkDefault pkgs.linuxPackages_6_1;
|
||||||
|
|
||||||
# Support ntfs drives
|
# Support ntfs drives
|
||||||
supportedFilesystems = ["ntfs"];
|
supportedFilesystems = ["ntfs"];
|
||||||
|
|
|
@ -15,8 +15,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
resumeDevice = mkOption {
|
resumeDevice = mkOption {
|
||||||
type = types.str;
|
type = types.nullOr types.str;
|
||||||
default = "/dev/sda1";
|
default = null;
|
||||||
description = "The location of the hibernation resume swap file.";
|
description = "The location of the hibernation resume swap file.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ in {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
boot = mkIf cfg.enable {
|
boot = mkIf cfg.enable {
|
||||||
resumeDevice = cfg.resumeDevice;
|
resumeDevice = mkIf (cfg.resumeDevice != null) cfg.resumeDevice;
|
||||||
kernelParams = mkIf (cfg.resumeOffset != null) ["resume_offset=${builtins.toString cfg.resumeOffset}"];
|
kernelParams = mkIf (cfg.resumeOffset != null) ["resume_offset=${builtins.toString cfg.resumeOffset}"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -56,12 +56,12 @@ in {
|
||||||
|
|
||||||
# Caddy reverse proxy for local services like cups
|
# Caddy reverse proxy for local services like cups
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = cfg.enableCaddy;
|
enable = lib.mkDefault cfg.enableCaddy;
|
||||||
globalConfig = ''
|
globalConfig = lib.mkDefault ''
|
||||||
default_bind 127.0.0.1
|
default_bind 127.0.0.1
|
||||||
auto_https off
|
auto_https off
|
||||||
'';
|
'';
|
||||||
extraConfig = concatStringsSep "\n" [
|
extraConfig = lib.mkDefault (concatStringsSep "\n" [
|
||||||
(lib.optionalString
|
(lib.optionalString
|
||||||
config.pub-solar.printing.enable
|
config.pub-solar.printing.enable
|
||||||
''
|
''
|
||||||
|
@ -79,7 +79,7 @@ in {
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
'')
|
'')
|
||||||
];
|
]);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,13 +15,14 @@
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
# Prevents impurities in builds
|
# Prevents impurities in builds
|
||||||
sandbox = true;
|
sandbox = true;
|
||||||
# give root and @wheel special privileges with nix
|
# Give root and @wheel special privileges with nix
|
||||||
trusted-users = ["root" "@wheel"];
|
trusted-users = ["root" "@wheel"];
|
||||||
# This is just a representation of the nix default
|
# Allow only group wheel to connect to the nix daemon
|
||||||
system-features = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
allowed-users = ["@wheel"];
|
||||||
};
|
};
|
||||||
# Generally useful nix option defaults
|
# Generally useful nix option defaults
|
||||||
extraOptions = ''
|
extraOptions = lib.mkForce ''
|
||||||
|
experimental-features = flakes nix-command
|
||||||
min-free = 536870912
|
min-free = 536870912
|
||||||
keep-outputs = true
|
keep-outputs = true
|
||||||
keep-derivations = true
|
keep-derivations = true
|
||||||
|
|
|
@ -24,6 +24,7 @@ in {
|
||||||
openssh
|
openssh
|
||||||
curl
|
curl
|
||||||
htop
|
htop
|
||||||
|
btop
|
||||||
lsof
|
lsof
|
||||||
psmisc
|
psmisc
|
||||||
file
|
file
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
# If you don't want the host to have SSH actually opened up to the net,
|
# If you don't want the host to have SSH actually opened up to the net,
|
||||||
# set `services.openssh.openFirewall` to false in your config.
|
# set `services.openssh.openFirewall` to false in your config.
|
||||||
openFirewall = lib.mkDefault true;
|
openFirewall = lib.mkDefault true;
|
||||||
passwordAuthentication = false;
|
settings.PasswordAuthentication = lib.mkDefault false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Service that makes Out of Memory Killer more effective
|
# Service that makes Out of Memory Killer more effective
|
||||||
|
|
114
modules/docker-ci-runner/default.nix
Normal file
114
modules/docker-ci-runner/default.nix
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
bootstrap = pkgs.writeScript "bootstrap.sh" ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
apt update
|
||||||
|
apt install --yes curl git sudo xz-utils
|
||||||
|
|
||||||
|
adduser --system --uid 999 build
|
||||||
|
chown build /nix
|
||||||
|
|
||||||
|
sudo -u build curl -L https://nixos.org/nix/install > install
|
||||||
|
sudo -u build sh install
|
||||||
|
|
||||||
|
echo "export PATH=/nix/var/nix/profiles/per-user/build/profile/bin:''$PATH" >> /etc/profile
|
||||||
|
|
||||||
|
mkdir /etc/nix
|
||||||
|
echo 'experimental-features = nix-command flakes' >> /etc/nix/nix.conf
|
||||||
|
|
||||||
|
export nix_user_config_file="/home/build/.local/share/nix/trusted-settings.json"
|
||||||
|
mkdir -p $(dirname \\$nix_user_config_file)
|
||||||
|
echo '{"extra-experimental-features":{"nix-command flakes":true}}' > \\$nix_user_config_file
|
||||||
|
chown -R build /home/build/
|
||||||
|
|
||||||
|
curl -L https://github.com/drone-runners/drone-runner-exec/releases/latest/download/drone_runner_exec_linux_amd64.tar.gz | tar xz
|
||||||
|
sudo install -t /usr/local/bin drone-runner-exec
|
||||||
|
|
||||||
|
if [ ! -f /run/vars ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -a /run/vars /run/runtime-vars
|
||||||
|
env | grep "DRONE" >> /run/runtime-vars
|
||||||
|
|
||||||
|
su - -s /bin/bash build sh -c "/usr/local/bin/drone-runner-exec daemon /run/runtime-vars"
|
||||||
|
'';
|
||||||
|
psCfg = config.pub-solar;
|
||||||
|
cfg = config.pub-solar.docker-ci-runner;
|
||||||
|
in {
|
||||||
|
options.pub-solar.docker-ci-runner = {
|
||||||
|
enable = lib.mkEnableOption "Enables a docker container running a drone exec runner as unprivileged user.";
|
||||||
|
|
||||||
|
enableKvm = lib.mkOption {
|
||||||
|
description = ''
|
||||||
|
Enable kvm support.
|
||||||
|
'';
|
||||||
|
default = true;
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
|
|
||||||
|
nixCacheLocation = lib.mkOption {
|
||||||
|
description = ''
|
||||||
|
Location of nix cache that is shared between builds
|
||||||
|
'';
|
||||||
|
default = "/var/lib/docker-ci-runner";
|
||||||
|
type = types.path;
|
||||||
|
};
|
||||||
|
|
||||||
|
runnerEnvironment = lib.mkOption {
|
||||||
|
description = ''
|
||||||
|
Additional environment vars added to the vars file on container runtime
|
||||||
|
'';
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
runnerVarsFile = lib.mkOption {
|
||||||
|
description = ''
|
||||||
|
Location of vars file passed to drone runner
|
||||||
|
'';
|
||||||
|
type = types.path;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
virtualisation = {
|
||||||
|
docker = {
|
||||||
|
enable = true; # sadly podman is not supported rightnow
|
||||||
|
};
|
||||||
|
|
||||||
|
oci-containers = {
|
||||||
|
backend = "docker";
|
||||||
|
containers."drone-exec-runner" = {
|
||||||
|
image = "debian";
|
||||||
|
autoStart = true;
|
||||||
|
entrypoint = "bash";
|
||||||
|
cmd = ["/bootstrap.sh"];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"${cfg.runnerVarsFile}:/run/vars"
|
||||||
|
"${cfg.nixCacheLocation}:/nix"
|
||||||
|
"${bootstrap}:/bootstrap.sh"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = cfg.runnerEnvironment;
|
||||||
|
|
||||||
|
extraOptions = lib.mkIf cfg.enableKvm ["--device=/dev/kvm"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Fix container not stopping correctly and holding the system 120s upon
|
||||||
|
# shutdown / reboot
|
||||||
|
systemd.services.docker-drone-exec-runner.preStop = ''
|
||||||
|
docker stop drone-exec-runner
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -14,6 +14,7 @@ in {
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
virtualisation.docker.package = pkgs.docker_24;
|
||||||
users.users = with pkgs;
|
users.users = with pkgs;
|
||||||
pkgs.lib.setAttrByPath [psCfg.user.name] {
|
pkgs.lib.setAttrByPath [psCfg.user.name] {
|
||||||
extraGroups = ["docker"];
|
extraGroups = ["docker"];
|
||||||
|
|
|
@ -66,7 +66,7 @@ in {
|
||||||
|
|
||||||
services.getty.autologinUser = mkIf cfg.autologin.enable (mkForce "${psCfg.user.name}");
|
services.getty.autologinUser = mkIf cfg.autologin.enable (mkForce "${psCfg.user.name}");
|
||||||
|
|
||||||
qt5 = {
|
qt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
platformTheme = "gtk2";
|
platformTheme = "gtk2";
|
||||||
style = "gtk2";
|
style = "gtk2";
|
||||||
|
@ -100,7 +100,7 @@ in {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
alacritty
|
alacritty
|
||||||
foot
|
foot
|
||||||
chromium
|
ungoogled-chromium
|
||||||
firefox-wayland
|
firefox-wayland
|
||||||
|
|
||||||
flameshot
|
flameshot
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
pkgs: {
|
pkgs: {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Lightweight Wayland notification daemon";
|
Description = "Network Manager applet";
|
||||||
BindsTo = ["sway-session.target"];
|
BindsTo = ["sway-session.target"];
|
||||||
After = ["sway-session.target"];
|
After = ["sway-session.target"];
|
||||||
# ConditionEnvironment requires systemd v247 to work correctly
|
# ConditionEnvironment requires systemd v247 to work correctly
|
||||||
|
|
|
@ -18,9 +18,6 @@ bindsym $mod+Shift+h exec psos help
|
||||||
|
|
||||||
bindsym $mod+F2 exec firefox
|
bindsym $mod+F2 exec firefox
|
||||||
|
|
||||||
bindsym $mod+F3 exec $term -e vifm
|
|
||||||
bindsym $mod+Shift+F3 exec gksu $term -e vifm
|
|
||||||
|
|
||||||
bindsym $mod+F4 exec nautilus -w
|
bindsym $mod+F4 exec nautilus -w
|
||||||
bindsym $mod+Shift+F4 exec signal-desktop --use-tray-icon
|
bindsym $mod+Shift+F4 exec signal-desktop --use-tray-icon
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
};
|
};
|
||||||
Service = {
|
Service = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
|
ExecStartPre = "${pkgs.systemd}/bin/systemctl --user unset-environment WAYLAND_DISPLAY DISPLAY";
|
||||||
ExecStart = "${pkgs.sway}/bin/sway";
|
ExecStart = "${pkgs.sway}/bin/sway";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = "1";
|
RestartSec = "1";
|
||||||
TimeoutStopSec = "10";
|
TimeoutStopSec = "10";
|
||||||
ExecStopPost = "${pkgs.systemd}/bin/systemctl --user unset-environment SWAYSOCK DISPLAY I3SOCK WAYLAND_DISPLAY";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
112
modules/terminal-life/bash/default.nix
Normal file
112
modules/terminal-life/bash/default.nix
Normal file
|
@ -0,0 +1,112 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
psCfg = config.pub-solar;
|
||||||
|
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
|
||||||
|
in {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
historyControl = ["ignorespace"];
|
||||||
|
|
||||||
|
# Run when initializing a login shell
|
||||||
|
profileExtra = ''
|
||||||
|
[ "$(tty)" = "/dev/tty1" ] && exec ${pkgs.sway-service}/bin/sway-service
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Run when initializing an interactive shell
|
||||||
|
initExtra = ''
|
||||||
|
# Show current directory at the top in Alacritty
|
||||||
|
PROMPT_COMMAND='echo -e -n "\e]2;$(basename "$PWD" | sed "s/${psCfg.user.name}/~/")\e\\"'
|
||||||
|
|
||||||
|
# If a command is not found, show me where it is
|
||||||
|
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
|
||||||
|
|
||||||
|
# Helps you navigate directories faster
|
||||||
|
# https://github.com/gsamokovarov/jump
|
||||||
|
eval "$(${pkgs.jump}/bin/jump shell --bind=z)"
|
||||||
|
|
||||||
|
eval "$(${pkgs.direnv}/bin/direnv hook bash)"
|
||||||
|
|
||||||
|
bind 'set show-all-if-ambiguous on'
|
||||||
|
|
||||||
|
# Syntax highlighting, auto suggestions, vim modes, etc.
|
||||||
|
# https://github.com/akinomyoga/ble.sh/wiki/Manual-A1-Installation#user-content-nixpkgs
|
||||||
|
source "$(blesh-share)"/ble.sh --attach=none
|
||||||
|
# ctrl + space to accept autocomplete suggestion
|
||||||
|
ble-bind -m 'auto_complete' -f 'C-@' 'auto_complete/insert-on-end'
|
||||||
|
# Meta (Alt) + Backspace to delete a word
|
||||||
|
ble-bind -m 'vi_imap' -f 'M-C-?' 'kill-backward-cword'
|
||||||
|
# Meta (Alt) + p to jump one word backwards
|
||||||
|
ble-bind -m 'vi_imap' -f M-p '@nomarked backward-uword'
|
||||||
|
ble-bind -m 'vi_imap' -f M-left '@nomarked backward-uword'
|
||||||
|
# Meta (Alt) + n to jump one word forwards
|
||||||
|
ble-bind -m 'vi_imap' -f M-n '@nomarked forward-uword'
|
||||||
|
ble-bind -m 'vi_imap' -f M-right '@nomarked forward-uword'
|
||||||
|
# Arrow up and Ctrl + p searches history for entered input
|
||||||
|
ble-bind -m 'vi_imap' -f up 'history-search-backward hide-status:immediate-accept:empty=emulate-readline:point=end'
|
||||||
|
ble-bind -m 'vi_imap' -f C-p 'history-search-backward hide-status:immediate-accept:empty=emulate-readline:point=end'
|
||||||
|
# Arrow down and Ctrl + n searches history for entered input
|
||||||
|
ble-bind -m 'vi_imap' -f down 'history-search-forward hide-status:immediate-accept:empty=emulate-readline:point=end'
|
||||||
|
ble-bind -m 'vi_imap' -f C-n 'history-search-forward hide-status:immediate-accept:empty=emulate-readline:point=end'
|
||||||
|
|
||||||
|
ble-face region_insert='fg=black,bg=navy'
|
||||||
|
|
||||||
|
function my/complete-load-hook {
|
||||||
|
bleopt complete_auto_delay=250
|
||||||
|
}
|
||||||
|
blehook/eval-after-load complete my/complete-load-hook
|
||||||
|
|
||||||
|
bleopt exec_elapsed_mark=
|
||||||
|
bleopt exec_errexit_mark=
|
||||||
|
bleopt filename_ls_colors="$LS_COLORS"
|
||||||
|
|
||||||
|
bleopt complete_menu_style=desc
|
||||||
|
|
||||||
|
# Bash vim mode keybindings
|
||||||
|
if [[ $- == *i* ]]; then # in interactive session
|
||||||
|
set -o vi
|
||||||
|
|
||||||
|
ble-bind -m vi_imap -f 'ENTER' 'vi_imap/complete'
|
||||||
|
ble-bind -m vi_imap -f 'TAB' 'vi_imap/complete'
|
||||||
|
|
||||||
|
ble-bind -m vi_imap -f 'j j' 'vi_imap/normal-mode'
|
||||||
|
ble-bind -m vi_imap -f 'ESC' 'vi_imap/normal-mode'
|
||||||
|
|
||||||
|
ble-bind -m vi_nmap -f 'h' 'vi_nmap/insert-mode'
|
||||||
|
ble-bind -m vi_nmap -f 'i' 'vi-command/backward-line'
|
||||||
|
ble-bind -m vi_nmap -f 'j' 'vi-command/backward-char'
|
||||||
|
ble-bind -m vi_nmap -f 'k' 'vi-command/forward-line'
|
||||||
|
ble-bind -m vi_nmap -f 'l' 'vi-command/forward-char'
|
||||||
|
|
||||||
|
ble-bind -m vi_imap -f 'C-c' discard-line
|
||||||
|
fi
|
||||||
|
|
||||||
|
# end of .bashrc
|
||||||
|
# Somehow we need to ensure starship starts later than ble.sh
|
||||||
|
# (possible packaging issue?)
|
||||||
|
# https://github.com/akinomyoga/ble.sh/issues/333
|
||||||
|
eval "$(${pkgs.starship}/bin/starship init bash)"
|
||||||
|
|
||||||
|
[[ ''${BLE_VERSION-} ]] && ble-attach
|
||||||
|
'';
|
||||||
|
|
||||||
|
shellAliases = {
|
||||||
|
nano = "nvim";
|
||||||
|
vi = "nvim";
|
||||||
|
vim = "nvim";
|
||||||
|
mutt = "neomutt";
|
||||||
|
ls = "exa";
|
||||||
|
la = "exa --group-directories-first -lag";
|
||||||
|
wget = "wget --hsts-file=$XDG_CACHE_HOME/wget-hsts";
|
||||||
|
irssi = "irssi --config=$XDG_CONFIG_HOME/irssi/config --home=$XDG_DATA_HOME/irssi";
|
||||||
|
drone = "DRONE_TOKEN=$(secret-tool lookup drone token) drone";
|
||||||
|
no = "manix \"\" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview=\"manix '{}'\" | xargs manix";
|
||||||
|
# fix nixos-option
|
||||||
|
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
|
||||||
|
myip = "dig +short myip.opendns.com @208.67.222.222 2>&1";
|
||||||
|
nnn = "nnn -d -e -H -r";
|
||||||
|
};
|
||||||
|
}
|
|
@ -24,46 +24,54 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.command-not-found.enable = false;
|
programs.command-not-found.enable = false;
|
||||||
|
|
||||||
# Needed to get zsh completion for system packages (e.g. systemd).
|
|
||||||
environment.pathsToLink = ["/share/zsh"];
|
|
||||||
|
|
||||||
environment.shells = with pkgs; [
|
|
||||||
zsh
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
screen
|
screen
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Starship is a fast and featureful shell prompt
|
||||||
|
# starship.toml has sane defaults that can be changed there
|
||||||
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
settings = import ./starship.toml.nix;
|
||||||
|
};
|
||||||
|
|
||||||
home-manager = with pkgs;
|
home-manager = with pkgs;
|
||||||
pkgs.lib.setAttrByPath ["users" psCfg.user.name] {
|
pkgs.lib.setAttrByPath ["users" psCfg.user.name] {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
ack
|
ack
|
||||||
asciinema
|
asciinema
|
||||||
bat
|
bat
|
||||||
|
blesh
|
||||||
exa
|
exa
|
||||||
fd
|
fd
|
||||||
gh
|
gh
|
||||||
glow
|
glow
|
||||||
nnn
|
jump
|
||||||
|
(nnn.overrideAttrs (o: {
|
||||||
|
patches =
|
||||||
|
(o.patches or [])
|
||||||
|
++ [
|
||||||
|
./nnn/0001-feat-use-wasd-keybindings-for-jkli.patch
|
||||||
|
];
|
||||||
|
}))
|
||||||
powerline
|
powerline
|
||||||
silver-searcher
|
silver-searcher
|
||||||
vifm
|
|
||||||
watson
|
watson
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.neovim = import ./nvim {
|
programs.bash = import ./bash {
|
||||||
inherit config;
|
inherit config;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
inherit self;
|
||||||
};
|
};
|
||||||
programs.fzf = import ./fzf {
|
programs.fzf = import ./fzf {
|
||||||
inherit config;
|
inherit config;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
};
|
};
|
||||||
programs.zsh = import ./zsh {
|
programs.neovim = import ./nvim {
|
||||||
inherit config;
|
inherit config;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit self;
|
inherit lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,5 +10,5 @@
|
||||||
"--color=fg:#d3d1d4,header:#7accd7,info:#e5c463,pointer:#ef9062"
|
"--color=fg:#d3d1d4,header:#7accd7,info:#e5c463,pointer:#ef9062"
|
||||||
"--color=marker:#ef9062,fg+:#303030,prompt:#e5c463,hl+:#7accd7"
|
"--color=marker:#ef9062,fg+:#303030,prompt:#e5c463,hl+:#7accd7"
|
||||||
];
|
];
|
||||||
enableZshIntegration = true;
|
enableBashIntegration = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
From a81ee68923412c0fb8fab46f2f918a7ec865b384 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= <hello@benjaminbaedorf.eu>
|
||||||
|
Date: Sun, 9 Jul 2023 04:19:51 +0200
|
||||||
|
Subject: [PATCH] feat: use wasd keybindings for jkli
|
||||||
|
|
||||||
|
---
|
||||||
|
src/nnn.h | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/nnn.h b/src/nnn.h
|
||||||
|
index d476ddd2..5f106987 100644
|
||||||
|
--- a/src/nnn.h
|
||||||
|
+++ b/src/nnn.h
|
||||||
|
@@ -131,7 +131,7 @@ struct key {
|
||||||
|
static struct key bindings[] = {
|
||||||
|
/* Back */
|
||||||
|
{ KEY_LEFT, SEL_BACK },
|
||||||
|
- { 'h', SEL_BACK },
|
||||||
|
+ { 'j', SEL_BACK },
|
||||||
|
/* Inside or select */
|
||||||
|
{ KEY_ENTER, SEL_OPEN },
|
||||||
|
{ '\r', SEL_OPEN },
|
||||||
|
@@ -139,10 +139,10 @@ static struct key bindings[] = {
|
||||||
|
{ KEY_RIGHT, SEL_NAV_IN },
|
||||||
|
{ 'l', SEL_NAV_IN },
|
||||||
|
/* Next */
|
||||||
|
- { 'j', SEL_NEXT },
|
||||||
|
+ { 'k', SEL_NEXT },
|
||||||
|
{ KEY_DOWN, SEL_NEXT },
|
||||||
|
/* Previous */
|
||||||
|
- { 'k', SEL_PREV },
|
||||||
|
+ { 'i', SEL_PREV },
|
||||||
|
{ KEY_UP, SEL_PREV },
|
||||||
|
/* Page down */
|
||||||
|
{ KEY_NPAGE, SEL_PGDN },
|
||||||
|
--
|
||||||
|
2.40.1
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
let g:clipboard = {
|
let g:clipboard = {
|
||||||
\ 'name': 'wayland-strip-carriage',
|
\ 'name': 'wayland-strip-carriage',
|
||||||
\ 'copy': {
|
\ 'copy': {
|
||||||
\ '+': 'wl-copy --foreground --type text/plain',
|
\ '+': 'wl-copy --foreground --type text/plain --trim-newline',
|
||||||
\ '*': 'wl-copy --foreground --type text/plain --primary',
|
\ '*': 'wl-copy --foreground --type text/plain --primary --trim-newline',
|
||||||
\ },
|
\ },
|
||||||
\ 'paste': {
|
\ 'paste': {
|
||||||
\ '+': {-> systemlist('wl-paste --no-newline | tr -d "\r"')},
|
\ '+': {-> systemlist('wl-paste --no-newline | tr -d "\r"')},
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
psCfg = config.pub-solar;
|
psCfg = config.pub-solar;
|
||||||
|
@ -21,8 +22,10 @@ in {
|
||||||
|
|
||||||
extraPackages = with pkgs;
|
extraPackages = with pkgs;
|
||||||
lib.mkIf (!cfg.lite) [
|
lib.mkIf (!cfg.lite) [
|
||||||
|
ansible-language-server
|
||||||
ccls
|
ccls
|
||||||
gopls
|
gopls
|
||||||
|
nixd
|
||||||
nodejs
|
nodejs
|
||||||
nodePackages.bash-language-server
|
nodePackages.bash-language-server
|
||||||
nodePackages.dockerfile-language-server-nodejs
|
nodePackages.dockerfile-language-server-nodejs
|
||||||
|
@ -33,73 +36,142 @@ in {
|
||||||
nodePackages.vue-language-server
|
nodePackages.vue-language-server
|
||||||
nodePackages.vscode-langservers-extracted
|
nodePackages.vscode-langservers-extracted
|
||||||
nodePackages.yaml-language-server
|
nodePackages.yaml-language-server
|
||||||
python39Packages.python-lsp-server
|
python3Packages.python-lsp-server
|
||||||
python3Full
|
python3Full
|
||||||
solargraph
|
|
||||||
rnix-lsp
|
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
|
solargraph
|
||||||
terraform-ls
|
terraform-ls
|
||||||
universal-ctags
|
universal-ctags
|
||||||
];
|
];
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins;
|
||||||
nvim-cmp
|
[]
|
||||||
cmp-nvim-lsp
|
++ lib.optionals (!cfg.lite) [
|
||||||
cmp_luasnip
|
(pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [
|
||||||
luasnip
|
p.ini
|
||||||
|
p.json
|
||||||
|
p.json5
|
||||||
|
p.markdown
|
||||||
|
p.nix
|
||||||
|
p.toml
|
||||||
|
p.yaml
|
||||||
|
|
||||||
lsp_extensions-nvim
|
p.css
|
||||||
nvim-lspconfig
|
p.graphql
|
||||||
|
p.html
|
||||||
|
p.javascript
|
||||||
|
p.scss
|
||||||
|
p.tsx
|
||||||
|
p.typescript
|
||||||
|
p.vue
|
||||||
|
|
||||||
instant-nvim-nvfetcher
|
p.c
|
||||||
|
p.cpp
|
||||||
|
p.go
|
||||||
|
p.gomod
|
||||||
|
p.gosum
|
||||||
|
p.haskell
|
||||||
|
p.lua
|
||||||
|
p.php
|
||||||
|
p.python
|
||||||
|
p.ruby
|
||||||
|
p.rust
|
||||||
|
|
||||||
ack-vim
|
p.vim
|
||||||
vim-airline
|
p.vimdoc
|
||||||
editorconfig-vim
|
|
||||||
nnn-vim
|
|
||||||
quick-scope
|
|
||||||
suda-vim
|
|
||||||
syntastic
|
|
||||||
vim-gutentags
|
|
||||||
vim-vinegar
|
|
||||||
vim-workspace-nvfetcher
|
|
||||||
|
|
||||||
sonokai
|
p.passwd
|
||||||
vim-hybrid-material
|
p.sql
|
||||||
vim-airline-themes
|
|
||||||
vim-apprentice-nvfetcher
|
|
||||||
|
|
||||||
fugitive
|
p.diff
|
||||||
vim-gitgutter
|
p.gitcommit
|
||||||
vim-rhubarb
|
p.gitignore
|
||||||
vimagit-nvfetcher
|
p.git_config
|
||||||
|
p.gitattributes
|
||||||
|
p.git_rebase
|
||||||
|
|
||||||
fzf-vim
|
p.bash
|
||||||
fzfWrapper
|
p.dockerfile
|
||||||
vim-highlightedyank
|
p.make
|
||||||
|
p.ninja
|
||||||
|
p.terraform
|
||||||
|
]))
|
||||||
|
|
||||||
vim-beautify-nvfetcher
|
# Dependencies for nvim-lspconfig
|
||||||
vim-surround
|
nvim-cmp
|
||||||
|
cmp-nvim-lsp
|
||||||
|
cmp_luasnip
|
||||||
|
luasnip
|
||||||
|
|
||||||
vim-bufkill
|
# Quickstart configs for neovim LSP
|
||||||
vim-sensible
|
lsp_extensions-nvim
|
||||||
|
nvim-lspconfig
|
||||||
|
|
||||||
ansible-vim
|
# Collaborative editing in Neovim using built-in capabilities
|
||||||
emmet-vim
|
instant-nvim-nvfetcher
|
||||||
rust-vim
|
|
||||||
vim-caddyfile-nvfetcher
|
# Search functionality behind :Ack
|
||||||
vim-go
|
ack-vim
|
||||||
vim-javascript
|
|
||||||
vim-json
|
# The status bar in the bottom of the screen with the mode indication and file location
|
||||||
SchemaStore-nvim
|
vim-airline
|
||||||
vim-markdown
|
|
||||||
vim-nix
|
# Automatically load editorconfig files in repos to configure nvim settings
|
||||||
vim-nixhash
|
editorconfig-vim
|
||||||
vim-ruby
|
|
||||||
vim-toml
|
# File browser. Use <leader>n to access
|
||||||
vim-vue
|
nnn-vim
|
||||||
yats-vim
|
|
||||||
];
|
# Highlight characters when using f, F, t, and T
|
||||||
|
quick-scope
|
||||||
|
|
||||||
|
# Get sudo in vim; :SudaWrite <optional filename>
|
||||||
|
suda-vim
|
||||||
|
|
||||||
|
# Undo history etc. per project
|
||||||
|
vim-workspace-nvfetcher
|
||||||
|
|
||||||
|
# JSON schemas
|
||||||
|
SchemaStore-nvim
|
||||||
|
|
||||||
|
# Work with tags files
|
||||||
|
vim-gutentags
|
||||||
|
|
||||||
|
# Neovim colorschemes / themes
|
||||||
|
sonokai
|
||||||
|
vim-hybrid-material
|
||||||
|
vim-airline-themes
|
||||||
|
vim-apprentice-nvfetcher
|
||||||
|
|
||||||
|
# Git integrations
|
||||||
|
# A Git wrapper so awesome, it should be illegal
|
||||||
|
fugitive
|
||||||
|
# Shows git diff markers in the sign column
|
||||||
|
vim-gitgutter
|
||||||
|
# GitHub extension for fugitive
|
||||||
|
vim-rhubarb
|
||||||
|
# Ease your git workflow within Vim
|
||||||
|
vimagit-nvfetcher
|
||||||
|
|
||||||
|
# FZF fuzzy finder
|
||||||
|
fzf-vim
|
||||||
|
fzfWrapper
|
||||||
|
# Make the yanked region apparent
|
||||||
|
vim-highlightedyank
|
||||||
|
|
||||||
|
# :Beautify Code beautifier
|
||||||
|
vim-beautify-nvfetcher
|
||||||
|
|
||||||
|
# Unload, delete or wipe a buffer without closing the window
|
||||||
|
vim-bufkill
|
||||||
|
# Defaults everyone can agree on
|
||||||
|
vim-sensible
|
||||||
|
|
||||||
|
# emmet for vim: http://emmet.io/
|
||||||
|
emmet-vim
|
||||||
|
# Caddyfile syntax support for Vim
|
||||||
|
vim-caddyfile-nvfetcher
|
||||||
|
];
|
||||||
|
|
||||||
extraConfig = builtins.concatStringsSep "\n" [
|
extraConfig = builtins.concatStringsSep "\n" [
|
||||||
''
|
''
|
||||||
|
|
|
@ -101,3 +101,6 @@ if has("autocmd")
|
||||||
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
nmap - :NnnPicker %<CR>
|
||||||
|
nmap <leader>n :NnnPicker %<CR>
|
||||||
|
nmap <leader>N :NnnPicker<CR>
|
||||||
|
|
|
@ -81,6 +81,7 @@ lua <<EOF
|
||||||
local use_denols_for_typescript = not(os.getenv('NVIM_USE_DENOLS') == nil)
|
local use_denols_for_typescript = not(os.getenv('NVIM_USE_DENOLS') == nil)
|
||||||
|
|
||||||
for lsp_key, lsp_settings in pairs({
|
for lsp_key, lsp_settings in pairs({
|
||||||
|
'ansiblels', ---------------------------- Ansible
|
||||||
'bashls', ------------------------------- Bash
|
'bashls', ------------------------------- Bash
|
||||||
'ccls', --------------------------------- C / C++ / Objective-C
|
'ccls', --------------------------------- C / C++ / Objective-C
|
||||||
'cssls', -------------------------------- CSS / SCSS / LESS
|
'cssls', -------------------------------- CSS / SCSS / LESS
|
||||||
|
@ -121,9 +122,9 @@ lua <<EOF
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'nixd', --------------------------------- Nix
|
||||||
'phpactor', ----------------------------- PHP
|
'phpactor', ----------------------------- PHP
|
||||||
'pylsp', -------------------------------- Python
|
'pylsp', -------------------------------- Python
|
||||||
'rnix', --------------------------------- Nix
|
|
||||||
'solargraph', --------------------------- Ruby
|
'solargraph', --------------------------- Ruby
|
||||||
'rust_analyzer', ------------------------ Rust
|
'rust_analyzer', ------------------------ Rust
|
||||||
['sqlls'] = {
|
['sqlls'] = {
|
||||||
|
@ -147,7 +148,6 @@ lua <<EOF
|
||||||
['schemas'] = {
|
['schemas'] = {
|
||||||
['https://json.schemastore.org/github-workflow'] = '.github/workflows/*.{yml,yaml}',
|
['https://json.schemastore.org/github-workflow'] = '.github/workflows/*.{yml,yaml}',
|
||||||
['https://json.schemastore.org/github-action'] = '.github/action.{yml,yaml}',
|
['https://json.schemastore.org/github-action'] = '.github/action.{yml,yaml}',
|
||||||
['https://json.schemastore.org/ansible-stable-2.9'] = 'roles/tasks/*.{yml,yaml}',
|
|
||||||
['https://json.schemastore.org/drone'] = '*.drone.{yml,yaml}',
|
['https://json.schemastore.org/drone'] = '*.drone.{yml,yaml}',
|
||||||
['https://json.schemastore.org/swagger-2.0'] = 'swagger.{yml,yaml}',
|
['https://json.schemastore.org/swagger-2.0'] = 'swagger.{yml,yaml}',
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,3 +83,5 @@ if executable('ag')
|
||||||
let g:ackprg = 'ag --vimgrep'
|
let g:ackprg = 'ag --vimgrep'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" nnn
|
||||||
|
let g:nnn#command = 'nnn -d -e -H -r'
|
||||||
|
|
|
@ -31,6 +31,6 @@ with self; ''
|
||||||
--style="''${BAT_STYLE:-numbers}" \
|
--style="''${BAT_STYLE:-numbers}" \
|
||||||
--color=always \
|
--color=always \
|
||||||
--pager=never \
|
--pager=never \
|
||||||
--file-name=''$FILE \
|
--file-name="''$FILE" \
|
||||||
--highlight-line=$CENTER
|
--highlight-line=$CENTER
|
||||||
''
|
''
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
let g:base16_shell_path = $XDG_CONFIG_HOME . "/zsh/base16.sh"
|
let g:base16_shell_path = $XDG_DATA_HOME . "/scripts/base16.sh"
|
||||||
let base16colorspace = 256
|
let base16colorspace = 256
|
||||||
set termguicolors
|
set termguicolors
|
||||||
let g:sonokai_style = 'shusia'
|
let g:sonokai_style = 'shusia'
|
||||||
|
|
169
modules/terminal-life/starship.toml.nix
Normal file
169
modules/terminal-life/starship.toml.nix
Normal file
|
@ -0,0 +1,169 @@
|
||||||
|
{
|
||||||
|
format = "$username$hostname$directory($git_branch$git_commit$git_state$git_status)($c$deno$golang$haskell$nodejs$php$python$ruby$rust$terraform[](fg:#F85E84 bg:#000000))($docker_context[](fg:#06969A))($container)$fill(\${custom.triton})$nix_shell$status[ |](fg:#F85E84)$line_break$character";
|
||||||
|
|
||||||
|
# Disable the blank line at the start of the prompt
|
||||||
|
add_newline = false;
|
||||||
|
|
||||||
|
# You can also replace your username with a neat symbol like to save some space
|
||||||
|
username = {
|
||||||
|
style_user = "bg:#000000 fg:#F85E84";
|
||||||
|
style_root = "bg:#F85E84 fg:#000000";
|
||||||
|
format = ''[$user ]($style)'';
|
||||||
|
};
|
||||||
|
|
||||||
|
hostname = {
|
||||||
|
ssh_symbol = "";
|
||||||
|
trim_at = "";
|
||||||
|
style = "bg:#000000 fg:#F85E84";
|
||||||
|
};
|
||||||
|
|
||||||
|
character = {
|
||||||
|
success_symbol = "[❯](bold purple)";
|
||||||
|
error_symbol = "[✗](#FF4B00)";
|
||||||
|
};
|
||||||
|
|
||||||
|
status = {
|
||||||
|
disabled = false;
|
||||||
|
style = "#FF4B00";
|
||||||
|
};
|
||||||
|
|
||||||
|
fill = {
|
||||||
|
symbol = "-";
|
||||||
|
#style = "bold green";
|
||||||
|
style = "black";
|
||||||
|
};
|
||||||
|
|
||||||
|
directory = {
|
||||||
|
style = "#F85E84";
|
||||||
|
truncate_to_repo = false;
|
||||||
|
fish_style_pwd_dir_length = 1;
|
||||||
|
truncation_symbol = "…/";
|
||||||
|
format = "[](fg:black bg:#F85E84)[$path[$read_only](bg:$style fg:black)](bg:$style fg:black)[](fg:$style)";
|
||||||
|
read_only = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Here is how you can shorten some long paths by text replacement
|
||||||
|
# similar to mapped_locations in Oh My Posh:
|
||||||
|
directory.substitutions = {
|
||||||
|
"Documents" = " ";
|
||||||
|
"Downloads" = " ";
|
||||||
|
"Music" = " ";
|
||||||
|
"Pictures" = " ";
|
||||||
|
};
|
||||||
|
# Keep in mind that the order matters. For example:
|
||||||
|
# "Important Documents" = " "
|
||||||
|
# will not be replaced, because "Documents" was already substituted before.
|
||||||
|
# So either put "Important Documents" before "Documents" or use the substituted version:
|
||||||
|
# "Important " = " "
|
||||||
|
|
||||||
|
c = {
|
||||||
|
symbol = " ";
|
||||||
|
style = "bg:#86BBD8";
|
||||||
|
format = ''[ $symbol ($version) ]($style)'';
|
||||||
|
};
|
||||||
|
|
||||||
|
#container = {};
|
||||||
|
|
||||||
|
custom = {
|
||||||
|
triton = {
|
||||||
|
command = "echo $TRITON_PROFILE";
|
||||||
|
when = "test $TRITON_PROFILE";
|
||||||
|
format = "[✚ ](fg:#F85E84 bg:#1A181A)[$output](fg:#F85E84 bg:#1A181A)";
|
||||||
|
description = "The current triton profile";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
docker_context = {
|
||||||
|
symbol = " ";
|
||||||
|
style = "bg:#06969A";
|
||||||
|
format = ''[ $symbol $context ]($style) $path'';
|
||||||
|
};
|
||||||
|
|
||||||
|
#deno = {};
|
||||||
|
|
||||||
|
git_branch = {
|
||||||
|
style = "#E5C463";
|
||||||
|
format = "[](fg:black bg:$style)[ $symbol$branch](fg:black bg:$style)[](fg:$style)";
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_commit = {
|
||||||
|
style = "#E5C463";
|
||||||
|
# ^H is the literal backspace character which renders to \b in the final
|
||||||
|
# starship config TOML, produced in insert mode via ctrl+v then ctrl+h.
|
||||||
|
# We use the literal character, because escaping a single \ doesn't work
|
||||||
|
# with pkgs.formats.toml, see: https://github.com/NixOS/nixpkgs/issues/97310 and
|
||||||
|
# https://jdhao.github.io/2020/10/07/nvim_insert_unicode_char/
|
||||||
|
format = "[ ](bg:$style)[\\($hash$tag\\)](fg:black bg:$style)[](fg:$style)";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_state = {
|
||||||
|
style = "#E5C463";
|
||||||
|
format = "[ ](bg:$style)[ \\($state( $progress_current/$progress_total)\\)](fg:black bg:$style)[](fg:$style)";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_status = {
|
||||||
|
style = "#E5C463";
|
||||||
|
format = "([ ](bg:$style fg:black)$conflicted$staged$modified$renamed$deleted$untracked$stashed$ahead_behind[](fg:$style))";
|
||||||
|
conflicted = "[ ](bold fg:88 bg:#E5C463)[ \${count} ](fg:black bg:#E5C463)";
|
||||||
|
staged = "[ $count ](fg:black bg:#E5C463)";
|
||||||
|
modified = "[ \${count} ](fg:black bg:#E5C463)";
|
||||||
|
renamed = "[ \${count} ](fg:black bg:#E5C463)";
|
||||||
|
deleted = "[ \${count} ](fg:black bg:#E5C463)";
|
||||||
|
untracked = "[?\${count} ](fg:black bg:#E5C463)";
|
||||||
|
stashed = "[ \${count} ](fg:black bg:#E5C463)";
|
||||||
|
ahead = "[ \${count} ](fg:#523333 bg:#E5C463)";
|
||||||
|
behind = "[ \${count} ](fg:black bg:#E5C463)";
|
||||||
|
diverged = "[ ](fg:88 bg:#E5C463)[ ](fg:black bg:#E5C463)[ \${ahead_count} ](fg:black bg:#E5C463)[ \${behind_count} ](fg:black bg:#E5C463)";
|
||||||
|
};
|
||||||
|
|
||||||
|
golang = {
|
||||||
|
symbol = " ";
|
||||||
|
style = "bg:#86BBD8";
|
||||||
|
format = ''[ $symbol ($version) ]($style)'';
|
||||||
|
};
|
||||||
|
|
||||||
|
haskell = {
|
||||||
|
symbol = " ";
|
||||||
|
style = "bg:#86BBD8";
|
||||||
|
format = ''[ $symbol ($version) ]($style)'';
|
||||||
|
};
|
||||||
|
|
||||||
|
nix_shell = {
|
||||||
|
format = ''[$symbol]($style) '';
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
nodejs = {
|
||||||
|
symbol = "";
|
||||||
|
style = "bg:#86BBD8";
|
||||||
|
format = ''[ $symbol ($version) ]($style)'';
|
||||||
|
};
|
||||||
|
|
||||||
|
php = {
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
python = {
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
ruby = {
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
rust = {
|
||||||
|
symbol = "";
|
||||||
|
style = "bg:#86BBD8";
|
||||||
|
format = ''[ $symbol ($version) ]($style)'';
|
||||||
|
};
|
||||||
|
|
||||||
|
#terraform = {};
|
||||||
|
|
||||||
|
time = {
|
||||||
|
disabled = false;
|
||||||
|
time_format = "%R"; # Hour:Minute Format
|
||||||
|
style = "bg:#33658A";
|
||||||
|
format = ''[ ♥ $time ]($style)'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,123 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
self,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
psCfg = config.pub-solar;
|
|
||||||
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
|
|
||||||
in {
|
|
||||||
enable = true;
|
|
||||||
enableAutosuggestions = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
dotDir = ".config/zsh";
|
|
||||||
|
|
||||||
history = {
|
|
||||||
ignoreDups = true;
|
|
||||||
expireDuplicatesFirst = true;
|
|
||||||
ignoreSpace = true;
|
|
||||||
path = "$HOME/.local/share/zsh/zsh_history";
|
|
||||||
save = 10000;
|
|
||||||
size = 10000;
|
|
||||||
};
|
|
||||||
|
|
||||||
loginExtra = ''
|
|
||||||
[ "$(tty)" = "/dev/tty1" ] && exec ${pkgs.sway-service}/bin/sway-service
|
|
||||||
'';
|
|
||||||
|
|
||||||
shellAliases = {
|
|
||||||
nano = "nvim";
|
|
||||||
vi = "nvim";
|
|
||||||
vim = "nvim";
|
|
||||||
mutt = "neomutt";
|
|
||||||
ls = "exa";
|
|
||||||
la = "exa --group-directories-first -lag";
|
|
||||||
fm = "vifm .";
|
|
||||||
vifm = "vifm .";
|
|
||||||
wget = "wget --hsts-file=$XDG_CACHE_HOME/wget-hsts";
|
|
||||||
irssi = "irssi --config=$XDG_CONFIG_HOME/irssi/config --home=$XDG_DATA_HOME/irssi";
|
|
||||||
drone = "DRONE_TOKEN=$(secret-tool lookup drone token) drone";
|
|
||||||
no = "manix \"\" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview=\"manix '{}'\" | xargs manix";
|
|
||||||
# fix nixos-option
|
|
||||||
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
|
|
||||||
myip = "dig +short myip.opendns.com @208.67.222.222 2>&1";
|
|
||||||
};
|
|
||||||
plugins = [
|
|
||||||
# src gets fetched by nvfetcher, see: ./pkgs/sources.toml
|
|
||||||
{
|
|
||||||
# will source ohmyzsh/plugins/z/
|
|
||||||
name = "zsh-plugins-z";
|
|
||||||
file = "plugins/z/z.plugin.zsh";
|
|
||||||
src = pkgs.sources.ohmyzsh.src;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "zsh-powerlevel10k";
|
|
||||||
file = "powerlevel10k.zsh-theme";
|
|
||||||
src = pkgs.sources.powerlevel10k.src;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "zsh-fast-syntax-highlighting";
|
|
||||||
file = "F-Sy-H.plugin.zsh";
|
|
||||||
src = pkgs.sources.F-Sy-H.src;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "zsh-nix-shell";
|
|
||||||
file = "nix-shell.plugin.zsh";
|
|
||||||
src = pkgs.sources.zsh-nix-shell.src;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
initExtra =
|
|
||||||
''
|
|
||||||
bindkey -v
|
|
||||||
bindkey -v 'jj' vi-cmd-mode
|
|
||||||
bindkey -a 'i' up-line
|
|
||||||
bindkey -a 'k' down-line
|
|
||||||
bindkey -a 'j' backward-char
|
|
||||||
bindkey -a 'h' vi-insert
|
|
||||||
bindkey '^[[H' beginning-of-line
|
|
||||||
bindkey '^[[F' end-of-line
|
|
||||||
bindkey '^R' history-incremental-pattern-search-backward
|
|
||||||
bindkey '^ ' autosuggest-accept
|
|
||||||
bindkey '^q' push-line-or-edit
|
|
||||||
|
|
||||||
bindkey '^R' fzf-history-widget
|
|
||||||
|
|
||||||
# ArrowUp/Down start searching history with current input
|
|
||||||
autoload -U up-line-or-beginning-search
|
|
||||||
autoload -U down-line-or-beginning-search
|
|
||||||
zle -N up-line-or-beginning-search
|
|
||||||
zle -N down-line-or-beginning-search
|
|
||||||
bindkey "^[[A" up-line-or-beginning-search
|
|
||||||
bindkey "^[[B" down-line-or-beginning-search
|
|
||||||
bindkey "^P" up-line-or-beginning-search
|
|
||||||
bindkey "^N" down-line-or-beginning-search
|
|
||||||
|
|
||||||
# MAKE CTRL+S WORK IN VIM
|
|
||||||
stty -ixon
|
|
||||||
stty erase '^?'
|
|
||||||
|
|
||||||
precmd () {
|
|
||||||
DIR_NAME=$(pwd | sed "s|^$HOME|~|g")
|
|
||||||
echo -e -n "\e]2;$DIR_NAME\e\\"
|
|
||||||
|
|
||||||
if [ $(date +%d%m) = '0104' ]; then
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo "Success! That was a great command! I can't wait to see what amazing stuff you'll be up to next."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# If a command is not found, show me where it is
|
|
||||||
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
|
|
||||||
''
|
|
||||||
+ builtins.readFile ./base16.zsh
|
|
||||||
+ builtins.readFile ./p10k.zsh
|
|
||||||
+ ''
|
|
||||||
source ${pkgs.fzf}/share/fzf/key-bindings.zsh
|
|
||||||
source ${pkgs.fzf}/share/fzf/completion.zsh
|
|
||||||
source ${pkgs.git-bug}/share/zsh/site-functions/git-bug
|
|
||||||
eval "$(direnv hook zsh)"
|
|
||||||
''
|
|
||||||
+ builtins.readFile ./fzf.zsh;
|
|
||||||
}
|
|
|
@ -1,58 +0,0 @@
|
||||||
# Use ~~ as the trigger sequence instead of the default **
|
|
||||||
export FZF_COMPLETION_TRIGGER='~~'
|
|
||||||
|
|
||||||
# Options to fzf command
|
|
||||||
export FZF_COMPLETION_OPTS='--border --info=inline'
|
|
||||||
|
|
||||||
__fzfcmd() {
|
|
||||||
echo "fzf"
|
|
||||||
}
|
|
||||||
|
|
||||||
# ctrl+r - Paste the selected command from history into the command line
|
|
||||||
fzf-history-widget() {
|
|
||||||
local selected num
|
|
||||||
setopt localoptions noglobsubst noposixbuiltins pipefail HIST_FIND_NO_DUPS 2> /dev/null
|
|
||||||
|
|
||||||
selected=( $(fc -rl 1 |
|
|
||||||
FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) )
|
|
||||||
local ret=$?
|
|
||||||
if [ -n "$selected" ]; then
|
|
||||||
num=$selected[1]
|
|
||||||
if [ -n "$num" ]; then
|
|
||||||
zle vi-fetch-history -n $num
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
zle redisplay
|
|
||||||
typeset -f zle-line-init >/dev/null && zle zle-line-init
|
|
||||||
return $ret
|
|
||||||
}
|
|
||||||
zle -N fzf-history-widget
|
|
||||||
bindkey '^R' fzf-history-widget
|
|
||||||
|
|
||||||
# Use fd (https://github.com/sharkdp/fd) instead of the default find
|
|
||||||
# command for listing path candidates.
|
|
||||||
# - The first argument to the function ($1) is the base path to start traversal
|
|
||||||
# - See the source code (completion.{bash,zsh}) for the details.
|
|
||||||
_fzf_compgen_path() {
|
|
||||||
fd --hidden --follow --exclude ".git" . "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Use fd to generate the list for directory completion
|
|
||||||
_fzf_compgen_dir() {
|
|
||||||
fd --type d --hidden --follow --exclude ".git" . "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
# (EXPERIMENTAL) Advanced customization of fzf options via _fzf_comprun function
|
|
||||||
# - The first argument to the function is the name of the command.
|
|
||||||
# - You should make sure to pass the rest of the arguments to fzf.
|
|
||||||
_fzf_comprun() {
|
|
||||||
local command=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
case "$command" in
|
|
||||||
cd) fzf "$@" --preview 'tree -C {} | head -200' ;;
|
|
||||||
export|unset) fzf "$@" --preview "eval 'echo \$'{}" ;;
|
|
||||||
ssh) fzf "$@" --preview 'dig {}' ;;
|
|
||||||
*) fzf "$@" ;;
|
|
||||||
esac
|
|
||||||
}
|
|
|
@ -1,943 +0,0 @@
|
||||||
# Generated by Powerlevel10k configuration wizard on 2020-04-18 at 01:15 CEST.
|
|
||||||
# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 30399.
|
|
||||||
# Wizard options: powerline, classic, unicode, darkest, 24h time, angled separators,
|
|
||||||
# sharp heads, sharp tails, 1 line, compact, concise, transient_prompt,
|
|
||||||
# instant_prompt=verbose.
|
|
||||||
# Type `p10k configure` to generate another config.
|
|
||||||
#
|
|
||||||
# Config for Powerlevel10k with classic powerline prompt style. 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_*'
|
|
||||||
|
|
||||||
# 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=(
|
|
||||||
ssh
|
|
||||||
context
|
|
||||||
dir # current directory
|
|
||||||
vcs # git status
|
|
||||||
# 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=(
|
|
||||||
vi_mode # vi mode (you don't need this if you've enabled prompt_char)
|
|
||||||
status # exit code of the last command
|
|
||||||
command_execution_time # duration of the last command
|
|
||||||
background_jobs # presence of background jobs
|
|
||||||
direnv # direnv status (https://direnv.net/)
|
|
||||||
vim_shell # vim shell indicator (:sh)
|
|
||||||
triton # show the current triton profile
|
|
||||||
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
|
|
||||||
watson
|
|
||||||
# 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
|
|
||||||
# ranger # ranger shell (https://github.com/ranger/ranger)
|
|
||||||
# nnn # nnn shell (https://github.com/jarun/nnn)
|
|
||||||
# midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
|
||||||
# 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
|
|
||||||
# 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)
|
|
||||||
)
|
|
||||||
|
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND="black"
|
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND="yellow"
|
|
||||||
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=""
|
|
||||||
typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING="CMD"
|
|
||||||
|
|
||||||
# Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.
|
|
||||||
typeset -g POWERLEVEL9K_MODE=powerline
|
|
||||||
# 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_ON_NEWLINE=true
|
|
||||||
typeset -g POWERLEVEL9K_RPROMPT_ON_NEWLINE=false
|
|
||||||
|
|
||||||
# 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=''
|
|
||||||
typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%238F'
|
|
||||||
typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%238F❯ '
|
|
||||||
# Connect right prompt lines with these symbols.
|
|
||||||
typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%238F'
|
|
||||||
typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%238F'
|
|
||||||
typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%238F'
|
|
||||||
|
|
||||||
# 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=
|
|
||||||
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=238
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Default background color.
|
|
||||||
typeset -g POWERLEVEL9K_BACKGROUND=none
|
|
||||||
|
|
||||||
# Separator between same-color segments on the left.
|
|
||||||
typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='%242F\uE0B1'
|
|
||||||
# Separator between same-color segments on the right.
|
|
||||||
typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='%242F\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='\uE0B2'
|
|
||||||
# The right end of right prompt.
|
|
||||||
typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0'
|
|
||||||
# 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=255
|
|
||||||
# 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=1
|
|
||||||
# Red prompt symbol if the last command failed.
|
|
||||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=17
|
|
||||||
# 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='Ⅴ'
|
|
||||||
# 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 ]##################################
|
|
||||||
typeset -g POWERLEVEL9K_{ETC,FOLDER,HOME,HOME_SUB}_ICON=
|
|
||||||
typeset -g POWERLEVEL9K_DIR_{ETC,HOME,HOME_SUBFOLDER,DEFAULT,NOT_WRITABLE}_BACKGROUND=1
|
|
||||||
typeset -g POWERLEVEL9K_DIR_{ETC,HOME,HOME_SUBFOLDER,DEFAULT,NOT_WRITABLE}_FOREGROUND=0
|
|
||||||
typeset -g POWERLEVEL9K_DIR_WRITABLE_FORBIDDEN_VISUAL_IDENTIFIER_COLOR=17
|
|
||||||
|
|
||||||
typeset -g POWERLEVEL9K_DIR_{ETC,DEFAULT}_BACKGROUND=15
|
|
||||||
typeset -g POWERLEVEL9K_DIR_{HOME,HOME_SUBFOLDER}_BACKGROUND=1
|
|
||||||
typeset -g POWERLEVEL9K_DIR_NOT_WRITABLE_BACKGROUND=1
|
|
||||||
|
|
||||||
# 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
|
|
||||||
# Color of the shortened directory segments.
|
|
||||||
typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=0
|
|
||||||
# Color of the anchor directory segments. Anchor segments are never shortened. The first
|
|
||||||
# segment is always an anchor.
|
|
||||||
typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=0
|
|
||||||
# Display anchor directory segments in bold.
|
|
||||||
typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=false
|
|
||||||
# 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 true, remove everything before the last (deepest) subdirectory that contains files
|
|
||||||
# matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is
|
|
||||||
# /foo/bar/git_repo/baz, prompt will display git_repo/baz. This assumes that /foo/bar/git_repo
|
|
||||||
# contains a marker (.git) and other directories don't.
|
|
||||||
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 directories.
|
|
||||||
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=true
|
|
||||||
# Show this icon when the current directory is not writable. POWERLEVEL9K_DIR_SHOW_WRITABLE
|
|
||||||
# above must be set to true for this parameter to have effect.
|
|
||||||
typeset -g POWERLEVEL9K_DIR_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='∅'
|
|
||||||
|
|
||||||
#####################################[ vcs: git status ]######################################
|
|
||||||
# Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
|
|
||||||
|
|
||||||
# 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 ⇣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
|
|
||||||
|
|
||||||
if (( $1 )); then
|
|
||||||
# Styling for up-to-date Git status.
|
|
||||||
local meta='%0F' # grey foreground
|
|
||||||
local clean='%0F' # green foreground
|
|
||||||
local modified='%0F' # yellow foreground
|
|
||||||
local untracked='%0F' # blue foreground
|
|
||||||
local conflicted='%0F' # red foreground
|
|
||||||
else
|
|
||||||
# Styling for incomplete and stale Git status.
|
|
||||||
local meta='%0F' # grey foreground
|
|
||||||
local clean='%0F' # grey foreground
|
|
||||||
local modified='%0F' # grey foreground
|
|
||||||
local untracked='%0F' # grey foreground
|
|
||||||
local conflicted='%0F' # grey foreground
|
|
||||||
fi
|
|
||||||
|
|
||||||
local res
|
|
||||||
local where # branch or tag
|
|
||||||
if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
|
|
||||||
res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}"
|
|
||||||
where=${(V)VCS_STATUS_LOCAL_BRANCH}
|
|
||||||
elif [[ -n $VCS_STATUS_TAG ]]; then
|
|
||||||
res+="${meta}#"
|
|
||||||
where=${(V)VCS_STATUS_TAG}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If local branch name or tag 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.
|
|
||||||
(( $#where > 32 )) && where[13,-13]="…"
|
|
||||||
res+="${clean}${where//\%/%%}" # escape %
|
|
||||||
|
|
||||||
# Display the current Git commit if there is no branch or tag.
|
|
||||||
# Tip: To always display the current Git commit, remove `[[ -z $where ]] &&` from the next line.
|
|
||||||
[[ -z $where ]] && 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//\%/%%}" # escape %
|
|
||||||
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 '|': '~|~/some/dir'.
|
|
||||||
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(1)))+${my_git_format}}'
|
|
||||||
typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}'
|
|
||||||
# Enable counters for staged, unstaged, etc.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1
|
|
||||||
|
|
||||||
# Icon color.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=4
|
|
||||||
typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=4
|
|
||||||
# Custom icon.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION=
|
|
||||||
# Custom prefix.
|
|
||||||
# typeset -g POWERLEVEL9K_VCS_PREFIX='%244Fon '
|
|
||||||
|
|
||||||
# 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)
|
|
||||||
|
|
||||||
# These settings are used for respositories other than Git or when gitstatusd fails and
|
|
||||||
# Powerlevel10k has to fall back to using vcs_info.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=0
|
|
||||||
typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2
|
|
||||||
typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=0
|
|
||||||
typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=3
|
|
||||||
typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=0
|
|
||||||
typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=3
|
|
||||||
|
|
||||||
##########################[ 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_FOREGROUND=70
|
|
||||||
typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'
|
|
||||||
|
|
||||||
# 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_FOREGROUND=70
|
|
||||||
typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'
|
|
||||||
|
|
||||||
# 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_FOREGROUND=160
|
|
||||||
typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'
|
|
||||||
|
|
||||||
# Status when the last command was terminated by a signal.
|
|
||||||
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
|
|
||||||
typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160
|
|
||||||
# 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='✘'
|
|
||||||
|
|
||||||
# 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_FOREGROUND=160
|
|
||||||
typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'
|
|
||||||
|
|
||||||
###################[ command_execution_time: duration of the last command ]###################
|
|
||||||
# Show duration of the last command if takes longer than 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
|
|
||||||
# Execution time color.
|
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=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='%244Ftook '
|
|
||||||
|
|
||||||
#######################[ background_jobs: presence of background jobs ]#######################
|
|
||||||
# Don't show the number of background jobs.
|
|
||||||
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
|
|
||||||
# Background jobs color.
|
|
||||||
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=37
|
|
||||||
# Custom icon.
|
|
||||||
typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='≡'
|
|
||||||
|
|
||||||
#######################[ direnv: direnv status (https://direnv.net/) ]########################
|
|
||||||
# Direnv color.
|
|
||||||
typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178
|
|
||||||
# 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).
|
|
||||||
typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66
|
|
||||||
|
|
||||||
# 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 diretory, 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=168
|
|
||||||
# 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=37
|
|
||||||
# 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=37
|
|
||||||
# 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=70
|
|
||||||
# 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=37
|
|
||||||
# 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=134
|
|
||||||
# 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=38
|
|
||||||
# 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=32
|
|
||||||
# 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=32
|
|
||||||
# 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=67
|
|
||||||
# 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=125
|
|
||||||
# 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=129
|
|
||||||
# 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=31
|
|
||||||
# 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=99
|
|
||||||
# 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=172
|
|
||||||
# typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
||||||
# typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar'
|
|
||||||
|
|
||||||
###########[ nix_shell ]###########
|
|
||||||
# # Nix shell color.
|
|
||||||
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74
|
|
||||||
|
|
||||||
# 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='nix'
|
|
||||||
|
|
||||||
###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]###########
|
|
||||||
# Text and color for normal (a.k.a. command) vi mode.
|
|
||||||
typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=CMD
|
|
||||||
typeset -g POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND=4
|
|
||||||
# Text and color for visual vi mode.
|
|
||||||
typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VIS
|
|
||||||
typeset -g POWERLEVEL9K_VI_MODE_VISUAL_FOREGROUND=3
|
|
||||||
# Text and color for overtype (a.k.a. overwrite and replace) vi mode.
|
|
||||||
typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVR
|
|
||||||
typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_FOREGROUND=2
|
|
||||||
# Text and color for insert vi mode.
|
|
||||||
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
|
|
||||||
typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=7
|
|
||||||
|
|
||||||
##################################[ context: user@hostname ]##################################
|
|
||||||
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=17
|
|
||||||
# Context color in SSH without privileges.
|
|
||||||
typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=7
|
|
||||||
# Default context color (no privileges, no SSH).
|
|
||||||
typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=7
|
|
||||||
|
|
||||||
# Context format when running with privileges: bold user@hostname.
|
|
||||||
typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%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'
|
|
||||||
|
|
||||||
###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###
|
|
||||||
# Python virtual environment color.
|
|
||||||
typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37
|
|
||||||
# Don't show Python version next to the virtual environment name.
|
|
||||||
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=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=37
|
|
||||||
# Don't show Python version next to the anaconda environment name.
|
|
||||||
typeset -g POWERLEVEL9K_ANACONDA_SHOW_PYTHON_VERSION=false
|
|
||||||
# Separate environment name from Python version only with a space.
|
|
||||||
typeset -g POWERLEVEL9K_ANACONDA_{LEFT,RIGHT}_DELIMITER=
|
|
||||||
# Custom icon.
|
|
||||||
# typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
||||||
|
|
||||||
################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################
|
|
||||||
# Pyenv color.
|
|
||||||
typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37
|
|
||||||
# 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
|
|
||||||
# Custom icon.
|
|
||||||
# typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
||||||
|
|
||||||
################[ goenv: go environment (https://github.com/syndbg/goenv) ]################
|
|
||||||
# Goenv color.
|
|
||||||
typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37
|
|
||||||
# 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=70
|
|
||||||
# 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=70
|
|
||||||
# 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=70
|
|
||||||
# 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=70
|
|
||||||
# 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=37
|
|
||||||
# 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=37
|
|
||||||
# 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=134
|
|
||||||
# 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=99
|
|
||||||
# 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=161
|
|
||||||
# Custom icon.
|
|
||||||
# typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
|
||||||
|
|
||||||
####################[ java_version: java version (https://www.java.com/) ]####################
|
|
||||||
# Java version color.
|
|
||||||
typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32
|
|
||||||
# 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=117
|
|
||||||
# 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='⭐'
|
|
||||||
|
|
||||||
#############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############
|
|
||||||
# Rbenv color.
|
|
||||||
typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168
|
|
||||||
# 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='⭐'
|
|
||||||
|
|
||||||
#######################[ rvm: ruby version from rvm (https://rvm.io) ]########################
|
|
||||||
# Rvm color.
|
|
||||||
typeset -g POWERLEVEL9K_RVM_FOREGROUND=168
|
|
||||||
# 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=38
|
|
||||||
# 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=32
|
|
||||||
# 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=32
|
|
||||||
# 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=67
|
|
||||||
# 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=99
|
|
||||||
# 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='⭐'
|
|
||||||
|
|
||||||
##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]###########
|
|
||||||
# Haskell color.
|
|
||||||
typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172
|
|
||||||
# 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='⭐'
|
|
||||||
|
|
||||||
# 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 orange text greeting the user.
|
|
||||||
#
|
|
||||||
# Type `p10k help segment` for documentation and a more sophisticated example.
|
|
||||||
function prompt_watson() {
|
|
||||||
local watson_status=$(watson status)
|
|
||||||
local noproject="No project started."
|
|
||||||
if [ "$watson_status" != "$noproject" ]; then
|
|
||||||
p10k segment -i "祥" -f yellow -t "$(echo $watson_status | awk '{print $2,$3}')"
|
|
||||||
else
|
|
||||||
p10k segment -i "⏾" -f red -t ""
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function prompt_triton() {
|
|
||||||
local triton_profile=$(echo $TRITON_PROFILE)
|
|
||||||
if [ "$triton_profile" != "" ]; then
|
|
||||||
p10k segment -f yellow -t "$(echo "✚" "$triton_profile")"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# 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=always
|
|
||||||
|
|
||||||
# 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=false
|
|
||||||
|
|
||||||
# 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'
|
|
|
@ -39,7 +39,7 @@ in {
|
||||||
libvirt-glib
|
libvirt-glib
|
||||||
qemu
|
qemu
|
||||||
virt-manager
|
virt-manager
|
||||||
python38Packages.libvirt
|
python3Packages.libvirt
|
||||||
gvfs
|
gvfs
|
||||||
edk2
|
edk2
|
||||||
OVMF
|
OVMF
|
||||||
|
|
32
overlays/blesh.nix
Normal file
32
overlays/blesh.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
final: prev: {
|
||||||
|
blesh = prev.blesh.overrideAttrs (oldAttrs: rec {
|
||||||
|
inherit (prev.sources.blesh-nvfetcher) version src;
|
||||||
|
|
||||||
|
dontBuild = false;
|
||||||
|
buildInputs = [prev.git];
|
||||||
|
patchPhase = ''
|
||||||
|
substituteInPlace GNUmakefile \
|
||||||
|
--replace "git submodule update --init --recursive" ""
|
||||||
|
'';
|
||||||
|
nativeCheckInputs = oldAttrs.nativeCheckInputs ++ [prev.busybox];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p "$out/share/blesh/lib"
|
||||||
|
|
||||||
|
cat <<EOF >"$out/share/blesh/lib/_package.sh"
|
||||||
|
_ble_base_package_type=nix
|
||||||
|
|
||||||
|
function ble/base/package:nix/update {
|
||||||
|
echo "Ble.sh is installed by Nix. You can update it there." >&2
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
make install INSDIR=$out/share/blesh
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
}
|
|
@ -3,21 +3,13 @@ channels: final: prev: {
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
(channels.latest)
|
(channels.latest)
|
||||||
cachix
|
nixd
|
||||||
dhall
|
docker_24
|
||||||
discord
|
;
|
||||||
element-desktop
|
|
||||||
rage
|
inherit
|
||||||
nix-index
|
(channels.fork)
|
||||||
qutebrowser
|
nvfetcher
|
||||||
alejandra
|
|
||||||
signal-desktop
|
|
||||||
starship
|
|
||||||
deploy-rs
|
|
||||||
nix
|
|
||||||
tdesktop
|
|
||||||
arduino
|
|
||||||
arduino-cli
|
|
||||||
;
|
;
|
||||||
|
|
||||||
haskellPackages =
|
haskellPackages =
|
||||||
|
@ -33,4 +25,6 @@ channels: final: prev: {
|
||||||
;
|
;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
vimPlugins = prev.vimPlugins // {inherit (channels.latest.vimPlugins) nvim-lspconfig;};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
# This file was generated by nvfetcher, please do not modify it manually.
|
# This file was generated by nvfetcher, please do not modify it manually.
|
||||||
|
{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }:
|
||||||
{
|
{
|
||||||
fetchgit,
|
blesh-nvfetcher = {
|
||||||
fetchurl,
|
pname = "blesh-nvfetcher";
|
||||||
fetchFromGitHub,
|
version = "9d84b424daf31b192891c06275fff316fa5ddd35";
|
||||||
}: {
|
|
||||||
F-Sy-H = {
|
|
||||||
pname = "F-Sy-H";
|
|
||||||
version = "b935a87a75560f8173dd78deee6717c59d464e06";
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "z-shell";
|
owner = "akinomyoga";
|
||||||
repo = "F-Sy-H";
|
repo = "ble.sh";
|
||||||
rev = "b935a87a75560f8173dd78deee6717c59d464e06";
|
rev = "9d84b424daf31b192891c06275fff316fa5ddd35";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = true;
|
||||||
sha256 = "sha256-448OlDnrDkUjvaSLDhXsa9bkgYXzj1Ju8CTpJVjH8LM=";
|
deepClone = false;
|
||||||
|
leaveDotGit = true;
|
||||||
|
sha256 = "sha256-7aX5UtDB9pUHHeOi9n+qWsM2KGenHVL6O18vG9W8tmQ=";
|
||||||
};
|
};
|
||||||
|
date = "2023-10-02";
|
||||||
};
|
};
|
||||||
instant-nvim-nvfetcher = {
|
instant-nvim-nvfetcher = {
|
||||||
pname = "instant-nvim-nvfetcher";
|
pname = "instant-nvim-nvfetcher";
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
sha256 = "sha256-DXJWji/NR8ZCxe014rD51v3EHJHMhRQeOoI3SsY8mR4=";
|
sha256 = "sha256-DXJWji/NR8ZCxe014rD51v3EHJHMhRQeOoI3SsY8mR4=";
|
||||||
};
|
};
|
||||||
|
date = "2022-06-25";
|
||||||
};
|
};
|
||||||
manix = {
|
manix = {
|
||||||
pname = "manix";
|
pname = "manix";
|
||||||
|
@ -36,50 +37,31 @@
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
sha256 = "sha256-GqPuYscLhkR5E2HnSFV4R48hCWvtM3C++3zlJhiK/aw=";
|
sha256 = "sha256-GqPuYscLhkR5E2HnSFV4R48hCWvtM3C++3zlJhiK/aw=";
|
||||||
};
|
};
|
||||||
};
|
date = "2021-04-20";
|
||||||
ohmyzsh = {
|
|
||||||
pname = "ohmyzsh";
|
|
||||||
version = "65a1e4edbe678cdac37ad96ca4bc4f6d77e27adf";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "ohmyzsh";
|
|
||||||
repo = "ohmyzsh";
|
|
||||||
rev = "65a1e4edbe678cdac37ad96ca4bc4f6d77e27adf";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
sha256 = "sha256-qyI7CU0vKhhADZfQtD73GsyAbqdMPhDQ1uA03h4erpw=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
powerlevel10k = {
|
|
||||||
pname = "powerlevel10k";
|
|
||||||
version = "8091c8a3a8a845c70046684235a01cd500075def";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "romkatv";
|
|
||||||
repo = "powerlevel10k";
|
|
||||||
rev = "8091c8a3a8a845c70046684235a01cd500075def";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
sha256 = "sha256-I0/tktXCbZ3hMYTNvPoWfOEYWRgmHoXsar/jcUB6bpo=";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
rnix-lsp-nvfetcher = {
|
rnix-lsp-nvfetcher = {
|
||||||
pname = "rnix-lsp-nvfetcher";
|
pname = "rnix-lsp-nvfetcher";
|
||||||
version = "6925256babec4307479a4080b44f2be38056f210";
|
version = "95d40673fe43642e2e1144341e86d0036abd95d9";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "nix-community";
|
owner = "nix-community";
|
||||||
repo = "rnix-lsp";
|
repo = "rnix-lsp";
|
||||||
rev = "6925256babec4307479a4080b44f2be38056f210";
|
rev = "95d40673fe43642e2e1144341e86d0036abd95d9";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
sha256 = "sha256-OKLyIXIXhUnRB3Xw+7zI3u6XkwF7Mrbfz1XaasV6i7Q=";
|
sha256 = "sha256-F0s0m62S5bHNVWNHLZD6SeHiLrsDx98VQbRjDyIu+qQ=";
|
||||||
};
|
};
|
||||||
|
date = "2022-11-27";
|
||||||
};
|
};
|
||||||
vim-apprentice-nvfetcher = {
|
vim-apprentice-nvfetcher = {
|
||||||
pname = "vim-apprentice-nvfetcher";
|
pname = "vim-apprentice-nvfetcher";
|
||||||
version = "9942d0bb0a5d82f7a24450b00051c1f2cc008659";
|
version = "59ad13661fa15edaf72c62218903c7817b5a3691";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "romainl";
|
owner = "romainl";
|
||||||
repo = "Apprentice";
|
repo = "Apprentice";
|
||||||
rev = "9942d0bb0a5d82f7a24450b00051c1f2cc008659";
|
rev = "59ad13661fa15edaf72c62218903c7817b5a3691";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
sha256 = "sha256-Xs+vTdnihNbBFPOKsW+NB40pqN9eaadqzc0DIeNoOFo=";
|
sha256 = "sha256-03B9tmU9+6t2hxhOgZxBqJr9r41CAqhHLUkHYvFdcks=";
|
||||||
};
|
};
|
||||||
|
date = "2023-02-15";
|
||||||
};
|
};
|
||||||
vim-beautify-nvfetcher = {
|
vim-beautify-nvfetcher = {
|
||||||
pname = "vim-beautify-nvfetcher";
|
pname = "vim-beautify-nvfetcher";
|
||||||
|
@ -91,6 +73,7 @@
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
sha256 = "sha256-QPTCl6KaGcAjTS5yVDov9yxmv0fDaFoPLMsrtVIG6GQ=";
|
sha256 = "sha256-QPTCl6KaGcAjTS5yVDov9yxmv0fDaFoPLMsrtVIG6GQ=";
|
||||||
};
|
};
|
||||||
|
date = "2018-12-27";
|
||||||
};
|
};
|
||||||
vim-caddyfile-nvfetcher = {
|
vim-caddyfile-nvfetcher = {
|
||||||
pname = "vim-caddyfile-nvfetcher";
|
pname = "vim-caddyfile-nvfetcher";
|
||||||
|
@ -102,17 +85,19 @@
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
sha256 = "sha256-rRYv3vnt31g7hNTxttTD6BWdv5JJ+ko3rPNyDUEOZ9o=";
|
sha256 = "sha256-rRYv3vnt31g7hNTxttTD6BWdv5JJ+ko3rPNyDUEOZ9o=";
|
||||||
};
|
};
|
||||||
|
date = "2022-05-09";
|
||||||
};
|
};
|
||||||
vim-workspace-nvfetcher = {
|
vim-workspace-nvfetcher = {
|
||||||
pname = "vim-workspace-nvfetcher";
|
pname = "vim-workspace-nvfetcher";
|
||||||
version = "c26b473f9b073f24bacecd38477f44c5cd1f5a62";
|
version = "c0d1e4332a378f58bfdf363b4957168fa78e79b4";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "thaerkh";
|
owner = "thaerkh";
|
||||||
repo = "vim-workspace";
|
repo = "vim-workspace";
|
||||||
rev = "c26b473f9b073f24bacecd38477f44c5cd1f5a62";
|
rev = "c0d1e4332a378f58bfdf363b4957168fa78e79b4";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
sha256 = "sha256-XV7opLyfkHIDO0+JJaO/x0za0gsHuklrzapTGdLHJmI=";
|
sha256 = "sha256-2Brx098dk5THiieBiW71FG9mUUwS1CSY9mpOPWA/Tq4=";
|
||||||
};
|
};
|
||||||
|
date = "2023-05-28";
|
||||||
};
|
};
|
||||||
vimagit-nvfetcher = {
|
vimagit-nvfetcher = {
|
||||||
pname = "vimagit-nvfetcher";
|
pname = "vimagit-nvfetcher";
|
||||||
|
@ -124,16 +109,6 @@
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
sha256 = "sha256-fhazQQqyFaO0fdoeNI9nBshwTDhKNHH262H/QThtuO0=";
|
sha256 = "sha256-fhazQQqyFaO0fdoeNI9nBshwTDhKNHH262H/QThtuO0=";
|
||||||
};
|
};
|
||||||
};
|
date = "2022-07-03";
|
||||||
zsh-nix-shell = {
|
|
||||||
pname = "zsh-nix-shell";
|
|
||||||
version = "af6f8a266ea1875b9a3e86e14796cadbe1cfbf08";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "chisui";
|
|
||||||
repo = "zsh-nix-shell";
|
|
||||||
rev = "af6f8a266ea1875b9a3e86e14796cadbe1cfbf08";
|
|
||||||
fetchSubmodules = false;
|
|
||||||
sha256 = "sha256-BjgMhILEL/qdgfno4LR64LSB8n9pC9R+gG7IQWwgyfQ=";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
self: with self; let
|
self:
|
||||||
|
with self; let
|
||||||
looking-glass-client = self.looking-glass-client.overrideAttrs (old: {
|
looking-glass-client = self.looking-glass-client.overrideAttrs (old: {
|
||||||
meta.platforms = ["x86_64-linux" "aarch64-linux"];
|
meta.platforms = ["x86_64-linux" "aarch64-linux"];
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
self: with self; let
|
self:
|
||||||
websocket-client = python39.pkgs.buildPythonPackage rec {
|
with self; let
|
||||||
|
websocket-client = python3.pkgs.buildPythonPackage rec {
|
||||||
pname = "websocket-client";
|
pname = "websocket-client";
|
||||||
version = "1.2.1";
|
version = "1.2.1";
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
src = python39.pkgs.fetchPypi {
|
src = python3.pkgs.fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "sha256-jftxXYqZL1cS//jIQ62ulOIrIqmbLF5rDsShqYHMTg0=";
|
sha256 = "sha256-jftxXYqZL1cS//jIQ62ulOIrIqmbLF5rDsShqYHMTg0=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
python39.pkgs.buildPythonPackage rec {
|
python3.pkgs.buildPythonPackage rec {
|
||||||
pname = "Mopidy-Jellyfin";
|
pname = "Mopidy-Jellyfin";
|
||||||
version = "1.0.2";
|
version = "1.0.2";
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
propagatedBuildInputs = with python39.pkgs; [
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
unidecode
|
unidecode
|
||||||
websocket-client
|
websocket-client
|
||||||
requests
|
requests
|
||||||
|
@ -21,7 +22,7 @@ in
|
||||||
pykka
|
pykka
|
||||||
mopidy
|
mopidy
|
||||||
];
|
];
|
||||||
src = python39.pkgs.fetchPypi {
|
src = python3.pkgs.fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "sha256-5XimIIQSpvNyQbSOFtSTkA0jhA0V68BbyQEQNnov+0g=";
|
sha256 = "sha256-5XimIIQSpvNyQbSOFtSTkA0jhA0V68BbyQEQNnov+0g=";
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,22 +3,6 @@
|
||||||
src.git = "https://github.com/mlvzk/manix"
|
src.git = "https://github.com/mlvzk/manix"
|
||||||
fetch.github = "mlvzk/manix"
|
fetch.github = "mlvzk/manix"
|
||||||
|
|
||||||
[ohmyzsh]
|
|
||||||
src.git = "https://github.com/ohmyzsh/ohmyzsh"
|
|
||||||
fetch.github = "ohmyzsh/ohmyzsh"
|
|
||||||
|
|
||||||
[powerlevel10k]
|
|
||||||
src.git = "https://github.com/romkatv/powerlevel10k"
|
|
||||||
fetch.github = "romkatv/powerlevel10k"
|
|
||||||
|
|
||||||
[F-Sy-H]
|
|
||||||
src.git = "https://github.com/z-shell/F-Sy-H"
|
|
||||||
fetch.github = "z-shell/F-Sy-H"
|
|
||||||
|
|
||||||
[zsh-nix-shell]
|
|
||||||
src.git = "https://github.com/chisui/zsh-nix-shell"
|
|
||||||
fetch.github = "chisui/zsh-nix-shell"
|
|
||||||
|
|
||||||
[rnix-lsp-nvfetcher]
|
[rnix-lsp-nvfetcher]
|
||||||
src.git = "https://github.com/nix-community/rnix-lsp"
|
src.git = "https://github.com/nix-community/rnix-lsp"
|
||||||
fetch.github = "nix-community/rnix-lsp"
|
fetch.github = "nix-community/rnix-lsp"
|
||||||
|
@ -46,3 +30,9 @@ fetch.github = "zeekay/vim-beautify"
|
||||||
[vim-apprentice-nvfetcher]
|
[vim-apprentice-nvfetcher]
|
||||||
src.git = "https://github.com/romainl/Apprentice"
|
src.git = "https://github.com/romainl/Apprentice"
|
||||||
fetch.github = "romainl/Apprentice"
|
fetch.github = "romainl/Apprentice"
|
||||||
|
|
||||||
|
[blesh-nvfetcher]
|
||||||
|
src.git = "https://github.com/akinomyoga/ble.sh"
|
||||||
|
fetch.github = "akinomyoga/ble.sh"
|
||||||
|
git.fetchSubmodules = true
|
||||||
|
git.leaveDotGit = true
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
self:
|
self:
|
||||||
with self; ''
|
with self; ''
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env bash
|
||||||
# terminal application launcher for sway, using fzf
|
# terminal application launcher for sway, using fzf
|
||||||
# original command:
|
# original command:
|
||||||
# Based on: https://github.com/swaywm/sway/issues/1367
|
# Based on: https://github.com/swaywm/sway/issues/1367
|
||||||
|
@ -12,7 +12,7 @@ with self; ''
|
||||||
|
|
||||||
# Get shell command list
|
# Get shell command list
|
||||||
# This may include the occasional non-executable file
|
# This may include the occasional non-executable file
|
||||||
command_list=$({ whence -wm '*' | sed 's/:[^:]*$//' })
|
command_list=$({ compgen -c | sed 's/:[^:]*$//'; })
|
||||||
|
|
||||||
# read existing command history
|
# read existing command history
|
||||||
if [ -f "$HIST_FILE" ]; then
|
if [ -f "$HIST_FILE" ]; then
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
self: with self; let
|
self:
|
||||||
|
with self; let
|
||||||
uhk-agent-bin = stdenv.mkDerivation rec {
|
uhk-agent-bin = stdenv.mkDerivation rec {
|
||||||
pname = "uhk-agent-bin";
|
pname = "uhk-agent-bin";
|
||||||
version = "1.5.14";
|
version = "1.5.14";
|
||||||
|
|
|
@ -6,19 +6,27 @@
|
||||||
user = config.pub-solar.user;
|
user = config.pub-solar.user;
|
||||||
xdg = config.home-manager.users."${user.name}".xdg;
|
xdg = config.home-manager.users."${user.name}".xdg;
|
||||||
in ''
|
in ''
|
||||||
# Title: Summary, imperative, start upper case, don't end with a period
|
# What happened?
|
||||||
# No more than 50 chars. #### 50 chars is here: #
|
#
|
||||||
#
|
# fix feat build chore ci docs style refactor perf test
|
||||||
|
#
|
||||||
|
# type!(optional scope): <summary> --------------#
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
# ^ Remember ending with an extra blank line
|
# ^\n
|
||||||
# Body: Explain *what* and *why* (not *how*). Include issue number.
|
# What exactly was done and why? --------------------------------------#
|
||||||
# Wrap at 72 chars. ################################## which is here: #
|
#
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
# ^ Remember ending with an extra blank line
|
# ^\n
|
||||||
# At the end: Include Co-authored-by for all contributors.
|
#
|
||||||
#
|
# Any issue numbers or links?
|
||||||
# Co-authored-by: Example Name <email@example.com>
|
#
|
||||||
|
# Ref: #123
|
||||||
|
|
||||||
|
|
||||||
|
# ^\n
|
||||||
|
#
|
||||||
|
# Co-authored-by: Example Name <email@example.com>
|
||||||
''
|
''
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
" Reset all styles first
|
|
||||||
highlight clear
|
|
||||||
|
|
||||||
highlight Border cterm=none ctermfg=235 ctermbg=0
|
|
||||||
|
|
||||||
highlight TopLine cterm=none ctermfg=20 ctermbg=18
|
|
||||||
highlight TopLineSel cterm=none ctermfg=1 ctermbg=18
|
|
||||||
|
|
||||||
highlight Win cterm=none ctermfg=188 ctermbg=0
|
|
||||||
highlight Directory cterm=bold ctermfg=4 ctermbg=0
|
|
||||||
highlight CurrLine cterm=none ctermfg=3 ctermbg=19
|
|
||||||
highlight OtherLine cterm=none ctermfg=3 ctermbg=19
|
|
||||||
highlight Selected cterm=none ctermfg=5 ctermbg=19
|
|
||||||
|
|
||||||
highlight JobLine cterm=bold ctermfg=0 ctermbg=18
|
|
||||||
highlight StatusLine cterm=bold ctermfg=0 ctermbg=18
|
|
||||||
highlight ErrorMsg cterm=bold ctermfg=0 ctermbg=18
|
|
||||||
highlight WildMenu cterm=bold ctermfg=0 ctermbg=18
|
|
||||||
highlight CmdLine cterm=none ctermfg=20 ctermbg=0
|
|
||||||
|
|
||||||
highlight Executable cterm=bold ctermfg=2 ctermbg=0
|
|
||||||
highlight Link cterm=none ctermfg=9 ctermbg=0
|
|
||||||
highlight BrokenLink cterm=none ctermfg=1 ctermbg=0
|
|
||||||
highlight Device cterm=none ctermfg=228 ctermbg=0
|
|
||||||
highlight Fifo cterm=none ctermfg=109 ctermbg=0
|
|
||||||
highlight Socket cterm=none ctermfg=110 ctermbg=0
|
|
|
@ -1,495 +0,0 @@
|
||||||
" vim: filetype=vifm :
|
|
||||||
" Sample configuration file for vifm (last updated: 2 June, 2019)
|
|
||||||
" You can edit this file by hand.
|
|
||||||
" The " character at the beginning of a line comments out the line.
|
|
||||||
" Blank lines are ignored.
|
|
||||||
" The basic format for each item is shown with an example.
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" Command used to edit files in various contexts. The default is vim.
|
|
||||||
" If you would like to use another vi clone such as Elvis or Vile
|
|
||||||
" you will need to change this setting.
|
|
||||||
|
|
||||||
set vicmd=nvim
|
|
||||||
" set vicmd=elvis\ -G\ termcap
|
|
||||||
" set vicmd=vile
|
|
||||||
|
|
||||||
" This makes vifm perform file operations on its own instead of relying on
|
|
||||||
" standard utilities like `cp`. While using `cp` and alike is a more universal
|
|
||||||
" solution, it's also much slower when processing large amounts of files and
|
|
||||||
" doesn't support progress measuring.
|
|
||||||
|
|
||||||
set syscalls
|
|
||||||
|
|
||||||
" Trash Directory
|
|
||||||
" The default is to move files that are deleted with dd or :d to
|
|
||||||
" the trash directory. If you change this you will not be able to move
|
|
||||||
" files by deleting them and then using p to put the file in the new location.
|
|
||||||
" I recommend not changing this until you are familiar with vifm.
|
|
||||||
" This probably shouldn't be an option.
|
|
||||||
|
|
||||||
set trash
|
|
||||||
|
|
||||||
" This is how many directories to store in the directory history.
|
|
||||||
|
|
||||||
set history=100
|
|
||||||
|
|
||||||
" Automatically resolve symbolic links on l or Enter.
|
|
||||||
|
|
||||||
set nofollowlinks
|
|
||||||
|
|
||||||
" With this option turned on you can run partially entered commands with
|
|
||||||
" unambiguous beginning using :! (e.g. :!Te instead of :!Terminal or :!Te<tab>).
|
|
||||||
|
|
||||||
" set fastrun
|
|
||||||
|
|
||||||
" Natural sort of (version) numbers within text.
|
|
||||||
|
|
||||||
set sortnumbers
|
|
||||||
|
|
||||||
" Maximum number of changes that can be undone.
|
|
||||||
|
|
||||||
set undolevels=100
|
|
||||||
|
|
||||||
" Use Vim's format of help file (has highlighting and "hyperlinks").
|
|
||||||
" If you would rather use a plain text help file set novimhelp.
|
|
||||||
|
|
||||||
set vimhelp
|
|
||||||
|
|
||||||
" If you would like to run an executable file when you
|
|
||||||
" press return on the file name set this.
|
|
||||||
|
|
||||||
set norunexec
|
|
||||||
|
|
||||||
" Selected color scheme
|
|
||||||
|
|
||||||
colorscheme base16
|
|
||||||
|
|
||||||
" Format for displaying time in file list. For example:
|
|
||||||
" TIME_STAMP_FORMAT=%m/%d-%H:%M
|
|
||||||
" See man date or man strftime for details.
|
|
||||||
|
|
||||||
set timefmt=%m/%d\ %H:%M
|
|
||||||
|
|
||||||
" Show list of matches on tab completion in command-line mode
|
|
||||||
|
|
||||||
set wildmenu
|
|
||||||
|
|
||||||
" Display completions in a form of popup with descriptions of the matches
|
|
||||||
|
|
||||||
set wildstyle=popup
|
|
||||||
|
|
||||||
" Display suggestions in normal, visual and view modes for keys, marks and
|
|
||||||
" registers (at most 5 files). In other view, when available.
|
|
||||||
|
|
||||||
set suggestoptions=normal,visual,view,otherpane,keys,marks,registers
|
|
||||||
|
|
||||||
" Ignore case in search patterns unless it contains at least one uppercase
|
|
||||||
" letter
|
|
||||||
|
|
||||||
set ignorecase
|
|
||||||
set smartcase
|
|
||||||
|
|
||||||
" Don't highlight search results automatically
|
|
||||||
|
|
||||||
set nohlsearch
|
|
||||||
|
|
||||||
" Use increment searching (search while typing)
|
|
||||||
set incsearch
|
|
||||||
|
|
||||||
" Try to leave some space from cursor to upper/lower border in lists
|
|
||||||
|
|
||||||
set scrolloff=4
|
|
||||||
|
|
||||||
" Don't do too many requests to slow file systems
|
|
||||||
|
|
||||||
if !has('win')
|
|
||||||
set slowfs=curlftpfs
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Set custom status line look
|
|
||||||
|
|
||||||
set statusline=" Hint: %z%= %A %10u:%-7g %15s %20d "
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" :mark mark /full/directory/path [filename]
|
|
||||||
|
|
||||||
mark b ~/bin/
|
|
||||||
mark h ~/
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" :com[mand][!] command_name action
|
|
||||||
" The following macros can be used in a command
|
|
||||||
" %a is replaced with the user arguments.
|
|
||||||
" %c the current file under the cursor.
|
|
||||||
" %C the current file under the cursor in the other directory.
|
|
||||||
" %f the current selected file, or files.
|
|
||||||
" %F the current selected file, or files in the other directory.
|
|
||||||
" %b same as %f %F.
|
|
||||||
" %d the current directory name.
|
|
||||||
" %D the other window directory name.
|
|
||||||
" %m run the command in a menu window
|
|
||||||
|
|
||||||
command! df df -h %m 2> /dev/null
|
|
||||||
command! diff vim -d %f %F
|
|
||||||
command! zip zip -r %f.zip %f
|
|
||||||
command! unzip unzip %c %c.extracted
|
|
||||||
command! run !! ./%f
|
|
||||||
command! make !!make %a
|
|
||||||
command! mkcd :mkdir %a | cd %a
|
|
||||||
command! vgrep vim "+grep %a"
|
|
||||||
command! reload :write | restart
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" The file type is for the default programs to be used with
|
|
||||||
" a file extension.
|
|
||||||
" :filetype pattern1,pattern2 defaultprogram,program2
|
|
||||||
" :fileviewer pattern1,pattern2 consoleviewer
|
|
||||||
" The other programs for the file type can be accessed with the :file command
|
|
||||||
" The command macros %f, %F, %d, %F may be used in the commands.
|
|
||||||
" The %a macro is ignored. To use a % you must put %%.
|
|
||||||
|
|
||||||
" For automated FUSE mounts, you must register an extension with :file[x]type
|
|
||||||
" in one of following formats:
|
|
||||||
"
|
|
||||||
" :filetype extensions FUSE_MOUNT|some_mount_command using %SOURCE_FILE and %DESTINATION_DIR variables
|
|
||||||
" %SOURCE_FILE and %DESTINATION_DIR are filled in by vifm at runtime.
|
|
||||||
" A sample line might look like this:
|
|
||||||
" :filetype *.zip,*.jar,*.war,*.ear FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR
|
|
||||||
"
|
|
||||||
" :filetype extensions FUSE_MOUNT2|some_mount_command using %PARAM and %DESTINATION_DIR variables
|
|
||||||
" %PARAM and %DESTINATION_DIR are filled in by vifm at runtime.
|
|
||||||
" A sample line might look like this:
|
|
||||||
" :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR
|
|
||||||
" %PARAM value is filled from the first line of file (whole line).
|
|
||||||
" Example first line for SshMount filetype: root@127.0.0.1:/
|
|
||||||
"
|
|
||||||
" You can also add %CLEAR if you want to clear screen before running FUSE
|
|
||||||
" program.
|
|
||||||
|
|
||||||
" Pdf
|
|
||||||
filextype *.pdf epdfview %c %i &, apvlv %c, xpdf %c
|
|
||||||
fileviewer *.pdf
|
|
||||||
\ vifmimg pdfpreview %px %py %pw %ph %c
|
|
||||||
\ %pc
|
|
||||||
\ vifmimg clear
|
|
||||||
" \ pdftotext -nopgbrk %c -
|
|
||||||
|
|
||||||
" PostScript
|
|
||||||
filextype *.ps,*.eps,*.ps.gz
|
|
||||||
\ {View in zathura}
|
|
||||||
\ zathura %f,
|
|
||||||
\ {View in gv}
|
|
||||||
\ gv %c %i &,
|
|
||||||
|
|
||||||
" Djvu
|
|
||||||
filextype *.djvu
|
|
||||||
\ {View in zathura}
|
|
||||||
\ zathura %f,
|
|
||||||
\ {View in apvlv}
|
|
||||||
\ apvlv %f,
|
|
||||||
|
|
||||||
" Audio
|
|
||||||
filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus
|
|
||||||
\ {Play using vlc}
|
|
||||||
\ vlc %c,
|
|
||||||
\ {Play using ffplay}
|
|
||||||
\ ffplay -nodisp -autoexit %c,
|
|
||||||
fileviewer *.mp3 mp3info
|
|
||||||
fileviewer *.flac soxi
|
|
||||||
|
|
||||||
" Video
|
|
||||||
filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
|
||||||
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
|
|
||||||
\*.as[fx]
|
|
||||||
\ {View using vlc}
|
|
||||||
\ vlc %f,
|
|
||||||
\ {View using ffplay}
|
|
||||||
\ ffplay -fs -autoexit %f,
|
|
||||||
fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
|
||||||
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
|
|
||||||
\*.as[fx]
|
|
||||||
\ vifmimg videopreview %px %py %pw %ph %c
|
|
||||||
\ %pc
|
|
||||||
\ vifmimg clear
|
|
||||||
" \ ffprobe -pretty %c 2>&1
|
|
||||||
|
|
||||||
" Web
|
|
||||||
filextype *.html,*.htm
|
|
||||||
\ {Open with vim}
|
|
||||||
\ nvim %f,
|
|
||||||
\ {Open with firefox}
|
|
||||||
\ firefox %f &,
|
|
||||||
filetype *.html,*.htm links, lynx
|
|
||||||
|
|
||||||
" Object
|
|
||||||
filetype *.o nm %f | less
|
|
||||||
|
|
||||||
" Man page
|
|
||||||
filetype *.[1-8] man ./%c
|
|
||||||
fileviewer *.[1-8] man ./%c | col -b
|
|
||||||
|
|
||||||
" Images
|
|
||||||
filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
|
||||||
\ {View in viewnior}
|
|
||||||
\ viewnior %f,
|
|
||||||
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.xpm
|
|
||||||
\ vifmimg draw %px %py %pw %ph %c
|
|
||||||
\ %pc
|
|
||||||
\ vifmimg clear
|
|
||||||
" Get w3m image previews inside vifm
|
|
||||||
" \ imgt %px %py %pw %ph %c
|
|
||||||
" \ %pc
|
|
||||||
" \ imgc %px %py %pw %ph NOT NEEDED IN XTERM
|
|
||||||
fileviewer *.gif
|
|
||||||
\ vifmimg gifpreview %px %py %pw %ph %c
|
|
||||||
\ %pc
|
|
||||||
\ vifmimg clear
|
|
||||||
|
|
||||||
" OpenRaster
|
|
||||||
filextype *.ora
|
|
||||||
\ {Edit in MyPaint}
|
|
||||||
\ mypaint %f,
|
|
||||||
|
|
||||||
" Mindmap
|
|
||||||
filextype *.vym
|
|
||||||
\ {Open with VYM}
|
|
||||||
\ vym %f &,
|
|
||||||
|
|
||||||
" MD5
|
|
||||||
filetype *.md5
|
|
||||||
\ {Check MD5 hash sum}
|
|
||||||
\ md5sum -c %f %S,
|
|
||||||
|
|
||||||
" SHA1
|
|
||||||
filetype *.sha1
|
|
||||||
\ {Check SHA1 hash sum}
|
|
||||||
\ sha1sum -c %f %S,
|
|
||||||
|
|
||||||
" SHA256
|
|
||||||
filetype *.sha256
|
|
||||||
\ {Check SHA256 hash sum}
|
|
||||||
\ sha256sum -c %f %S,
|
|
||||||
|
|
||||||
" SHA512
|
|
||||||
filetype *.sha512
|
|
||||||
\ {Check SHA512 hash sum}
|
|
||||||
\ sha512sum -c %f %S,
|
|
||||||
|
|
||||||
" GPG signature
|
|
||||||
filetype *.asc
|
|
||||||
\ {Check signature}
|
|
||||||
\ !!gpg --verify %c,
|
|
||||||
|
|
||||||
" Torrent
|
|
||||||
filetype *.torrent ktorrent %f &
|
|
||||||
fileviewer *.torrent dumptorrent -v %c
|
|
||||||
|
|
||||||
" FuseZipMount
|
|
||||||
filetype *.zip,*.jar,*.war,*.ear,*.oxt,*.apkg
|
|
||||||
\ {Mount with fuse-zip}
|
|
||||||
\ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR,
|
|
||||||
\ {View contents}
|
|
||||||
\ zip -sf %c | less,
|
|
||||||
\ {Extract here}
|
|
||||||
\ tar -xf %c,
|
|
||||||
fileviewer *.zip,*.jar,*.war,*.ear,*.oxt zip -sf %c
|
|
||||||
|
|
||||||
" ArchiveMount
|
|
||||||
filetype *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz
|
|
||||||
\ {Mount with archivemount}
|
|
||||||
\ FUSE_MOUNT|archivemount %SOURCE_FILE %DESTINATION_DIR,
|
|
||||||
fileviewer *.tgz,*.tar.gz tar -tzf %c
|
|
||||||
fileviewer *.tar.bz2,*.tbz2 tar -tjf %c
|
|
||||||
fileviewer *.tar.txz,*.txz xz --list %c
|
|
||||||
fileviewer *.tar tar -tf %c
|
|
||||||
|
|
||||||
" Rar2FsMount and rar archives
|
|
||||||
filetype *.rar
|
|
||||||
\ {Mount with rar2fs}
|
|
||||||
\ FUSE_MOUNT|rar2fs %SOURCE_FILE %DESTINATION_DIR,
|
|
||||||
fileviewer *.rar unrar v %c
|
|
||||||
|
|
||||||
" IsoMount
|
|
||||||
filetype *.iso
|
|
||||||
\ {Mount with fuseiso}
|
|
||||||
\ FUSE_MOUNT|fuseiso %SOURCE_FILE %DESTINATION_DIR,
|
|
||||||
|
|
||||||
" SshMount
|
|
||||||
filetype *.ssh
|
|
||||||
\ {Mount with sshfs}
|
|
||||||
\ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR %FOREGROUND,
|
|
||||||
|
|
||||||
" FtpMount
|
|
||||||
filetype *.ftp
|
|
||||||
\ {Mount with curlftpfs}
|
|
||||||
\ FUSE_MOUNT2|curlftpfs -o ftp_port=-,,disable_eprt %PARAM %DESTINATION_DIR %FOREGROUND,
|
|
||||||
|
|
||||||
" Fuse7z and 7z archives
|
|
||||||
filetype *.7z
|
|
||||||
\ {Mount with fuse-7z}
|
|
||||||
\ FUSE_MOUNT|fuse-7z %SOURCE_FILE %DESTINATION_DIR,
|
|
||||||
fileviewer *.7z 7z l %c
|
|
||||||
|
|
||||||
" Office files
|
|
||||||
filextype *.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx libreoffice %f &
|
|
||||||
fileviewer *.doc catdoc %c
|
|
||||||
fileviewer *.docx docx2txt.pl %f -
|
|
||||||
|
|
||||||
" TuDu files
|
|
||||||
filetype *.tudu tudu -f %c
|
|
||||||
|
|
||||||
" Qt projects
|
|
||||||
filextype *.pro qtcreator %f &
|
|
||||||
|
|
||||||
" All others
|
|
||||||
filetype *.ts,*.js,*.css,*.sass,*.scss,*.go,*.rs,*.py,*.html,*.xhtml,*.json,*.jsx,*.tsx,*.vue,*.svelte,*.sql
|
|
||||||
\ {Open in editor}
|
|
||||||
\ nvim %c,
|
|
||||||
fileviewer *.ts,*.js,*.css,*.sass,*.scss,*.go,*.rs,*.py,*.html,*.xhtml,*.json,*.jsx,*.tsx,*.vue,*.svelte,*.sql bat %c
|
|
||||||
|
|
||||||
" Directories
|
|
||||||
filextype */
|
|
||||||
\ {View in thunar}
|
|
||||||
\ Thunar %f &,
|
|
||||||
|
|
||||||
" Syntax highlighting in preview
|
|
||||||
"
|
|
||||||
" Explicitly set highlight type for some extensions
|
|
||||||
"
|
|
||||||
" 256-color terminal
|
|
||||||
" fileviewer *.[ch],*.[ch]pp highlight -O xterm256 -s dante --syntax c %c
|
|
||||||
" fileviewer Makefile,Makefile.* highlight -O xterm256 -s dante --syntax make %c
|
|
||||||
"
|
|
||||||
" 16-color terminal
|
|
||||||
" fileviewer *.c,*.h highlight -O ansi -s dante %c
|
|
||||||
"
|
|
||||||
" Or leave it for automatic detection
|
|
||||||
"
|
|
||||||
" fileviewer *[^/] pygmentize -O style=monokai -f console256 -g
|
|
||||||
|
|
||||||
" Displaying pictures in terminal
|
|
||||||
"
|
|
||||||
" fileviewer *.jpg,*.png shellpic %c
|
|
||||||
|
|
||||||
" Open all other files with default system programs (you can also remove all
|
|
||||||
" :file[x]type commands above to ensure they don't interfere with system-wide
|
|
||||||
" settings). By default all unknown files are opened with 'vi[x]cmd'
|
|
||||||
" uncommenting one of lines below will result in ignoring 'vi[x]cmd' option
|
|
||||||
" for unknown file types.
|
|
||||||
" For *nix:
|
|
||||||
" filetype * xdg-open
|
|
||||||
" For OS X:
|
|
||||||
" filetype * open
|
|
||||||
" For Windows:
|
|
||||||
" filetype * start, explorer
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" What should be saved automatically between vifm sessions. Drop "savedirs"
|
|
||||||
" value if you don't want vifm to remember last visited directories for you.
|
|
||||||
set vifminfo=dhistory,savedirs,chistory,state,tui,shistory,
|
|
||||||
\phistory,fhistory,dirstack,registers,bookmarks,bmarks
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" Examples of configuring both panels
|
|
||||||
|
|
||||||
" Customize view columns a bit (enable ellipsis for truncated file names)
|
|
||||||
"
|
|
||||||
" set viewcolumns=-{name}..,6{}.
|
|
||||||
|
|
||||||
" Filter-out build and temporary files
|
|
||||||
"
|
|
||||||
" filter! /^.*\.(lo|o|d|class|py[co])$|.*~$/
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" Sample mappings
|
|
||||||
|
|
||||||
" Start shell in current directory
|
|
||||||
nnoremap s :shell<cr>
|
|
||||||
|
|
||||||
" Display sorting dialog
|
|
||||||
nnoremap S :sort<cr>
|
|
||||||
|
|
||||||
" Toggle visibility of preview window
|
|
||||||
nnoremap w :view<cr>
|
|
||||||
vnoremap w :view<cr>gv
|
|
||||||
|
|
||||||
" Open file in existing instance of nvim
|
|
||||||
nnoremap o :!vim %f<cr>
|
|
||||||
" Open file in new instance of vim
|
|
||||||
nnoremap O :!vim %f<cr>
|
|
||||||
|
|
||||||
" Open file in the background using its default program
|
|
||||||
nnoremap gb :file &<cr>l
|
|
||||||
|
|
||||||
" Interaction with system clipboard
|
|
||||||
if has('win')
|
|
||||||
" Yank current directory path to Windows clipboard with forward slashes
|
|
||||||
nnoremap yp :!echo %"d:gs!\!/! %i | clip<cr>
|
|
||||||
" Yank path to current file to Windows clipboard with forward slashes
|
|
||||||
nnoremap yf :!echo %"c:gs!\!/! %i | clip<cr>
|
|
||||||
elseif executable('xclip')
|
|
||||||
" Yank current directory path into the clipboard
|
|
||||||
nnoremap yd :!echo %d | xclip %i<cr>
|
|
||||||
" Yank current file path into the clipboard
|
|
||||||
nnoremap yf :!echo %c:p | xclip %i<cr>
|
|
||||||
elseif executable('xsel')
|
|
||||||
" Yank current directory path into primary and selection clipboards
|
|
||||||
nnoremap yd :!echo -n %d | xsel --input --primary %i &&
|
|
||||||
\ echo -n %d | xsel --clipboard --input %i<cr>
|
|
||||||
" Yank current file path into into primary and selection clipboards
|
|
||||||
nnoremap yf :!echo -n %c:p | xsel --input --primary %i &&
|
|
||||||
\ echo -n %c:p | xsel --clipboard --input %i<cr>
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Mappings for faster renaming
|
|
||||||
nnoremap I cw<c-a>
|
|
||||||
nnoremap cc cw<c-u>
|
|
||||||
nnoremap A cw
|
|
||||||
|
|
||||||
" Open console in current directory
|
|
||||||
nnoremap ,t :!xterm &<cr>
|
|
||||||
|
|
||||||
" Open editor to edit vifmrc and apply settings after returning to vifm
|
|
||||||
nnoremap ,c :write | edit $MYVIFMRC | restart<cr>
|
|
||||||
" Open gvim to edit vifmrc
|
|
||||||
nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC &<cr>
|
|
||||||
|
|
||||||
" Toggle wrap setting on ,w key
|
|
||||||
nnoremap ,w :set wrap!<cr>
|
|
||||||
|
|
||||||
" Example of standard two-panel file managers mappings
|
|
||||||
nnoremap <f3> :!less %f<cr>
|
|
||||||
nnoremap <f4> :edit<cr>
|
|
||||||
nnoremap <f5> :copy<cr>
|
|
||||||
nnoremap <f6> :move<cr>
|
|
||||||
nnoremap <f7> :mkdir<space>
|
|
||||||
nnoremap <f8> :delete<cr>
|
|
||||||
|
|
||||||
" Arrow remapping
|
|
||||||
map i <Up>
|
|
||||||
map j <Left>
|
|
||||||
map k <Down>
|
|
||||||
noremap h i
|
|
||||||
|
|
||||||
vnoremap K L
|
|
||||||
vnoremap I H
|
|
||||||
vnoremap H I
|
|
||||||
|
|
||||||
nnoremap K L
|
|
||||||
nnoremap I H
|
|
||||||
nnoremap H I
|
|
||||||
|
|
||||||
" Escape overwrite
|
|
||||||
cmap jj <Esc>
|
|
||||||
|
|
||||||
" fzf
|
|
||||||
command! FZFfind :set noquickview | :execute 'goto "'.system('fd --hidden --exclude .git --exclude node_modules | fzf --preview "ls -lhA --group-directories-first --color=always {}" --preview-window wrap 2>/dev/tty ').'"%IU' | redraw
|
|
||||||
nnoremap <c-p> :FZFfind<cr>
|
|
|
@ -26,8 +26,22 @@
|
||||||
"spacing": 10
|
"spacing": 10
|
||||||
},
|
},
|
||||||
"clock": {
|
"clock": {
|
||||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
"tooltip-format": "<tt><small>{calendar}</small></tt>",
|
||||||
"format-alt": "{:%a %d. %h %H:%M}"
|
"format-alt": "{:%a %d. %h %H:%M}",
|
||||||
|
//"on-scroll": {
|
||||||
|
// "calendar": 1
|
||||||
|
//}
|
||||||
|
"calendar": {
|
||||||
|
"mode-mon-col" : 3,
|
||||||
|
"on-scroll": -1,
|
||||||
|
"on-click-right": "mode",
|
||||||
|
"format": {
|
||||||
|
"months": "<span color='#ffead3'><b>{}</b></span>",
|
||||||
|
"days": "<span color='#ecc6d9'><b>{}</b></span>",
|
||||||
|
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
|
||||||
|
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"backlight": {
|
"backlight": {
|
||||||
// "device": "acpi_video1",
|
// "device": "acpi_video1",
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
font-family: Hack;
|
font-family: Hack, FontAwesome;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
background: rgba(11, 12, 13, 0.90);
|
background: rgba(11, 12, 13, 0.90);
|
||||||
|
|
111
profiles/base-user/.gitignore
vendored
111
profiles/base-user/.gitignore
vendored
|
@ -1,111 +0,0 @@
|
||||||
*
|
|
||||||
|
|
||||||
!*.nix
|
|
||||||
!/.gitignore
|
|
||||||
|
|
||||||
!/.zshrc
|
|
||||||
!/.Xdefaults
|
|
||||||
!/.Xresources
|
|
||||||
!/.xinitrc
|
|
||||||
!/.config
|
|
||||||
|
|
||||||
!/assets
|
|
||||||
!/assets/wallpaper.jpg
|
|
||||||
|
|
||||||
!/.config/dircolors
|
|
||||||
|
|
||||||
!/.config/xmodmap
|
|
||||||
|
|
||||||
!/.config/environment.d
|
|
||||||
!/.config/environment.d/profile.conf
|
|
||||||
!/.config/environment.d/drone.conf
|
|
||||||
!/.config/environment.d/restic.conf
|
|
||||||
|
|
||||||
!/.config/user-dirs.dirs
|
|
||||||
!/.config/user-dirs.locale
|
|
||||||
|
|
||||||
!/.config/gtk-2.0
|
|
||||||
!/.config/gtk-2.0/gtkrc
|
|
||||||
|
|
||||||
!/.config/gtk-3.0
|
|
||||||
!/.config/gtk-3.0/settings.ini
|
|
||||||
|
|
||||||
!/.config/xsettingsd
|
|
||||||
!/.config/xsettingsd/xsettingsd.conf
|
|
||||||
|
|
||||||
!/.config/mako
|
|
||||||
!/.config/mako/config
|
|
||||||
|
|
||||||
!/.config/alacritty
|
|
||||||
!/.config/alacritty/alacritty.yml
|
|
||||||
|
|
||||||
!/.config/git
|
|
||||||
!/.config/git/config
|
|
||||||
|
|
||||||
!/.config/vifm
|
|
||||||
!/.config/vifm/vifmrc
|
|
||||||
!/.config/vifm/scripts
|
|
||||||
!/.config/vifm/colors
|
|
||||||
!/.config/vifm/colors/base16.vifm
|
|
||||||
|
|
||||||
!/.config/nvim
|
|
||||||
!/.config/nvim/init.vim
|
|
||||||
!/.config/nvim/clipboard.vim
|
|
||||||
!/.config/nvim/lsp.vim
|
|
||||||
!/.config/nvim/quickfixopenall.vim
|
|
||||||
!/.config/nvim/ui.vim
|
|
||||||
|
|
||||||
!/.config/mimeapps.list
|
|
||||||
|
|
||||||
!/.config/libinput-gestures.conf
|
|
||||||
|
|
||||||
!/.config/sway
|
|
||||||
!/.config/sway/config
|
|
||||||
!/.config/sway/config.d
|
|
||||||
!/.config/sway/config.d/applications.conf
|
|
||||||
!/.config/sway/config.d/autostart.conf
|
|
||||||
!/.config/sway/config.d/colorscheme.conf
|
|
||||||
!/.config/sway/config.d/custom-keybindings.conf
|
|
||||||
!/.config/sway/config.d/gaps.conf
|
|
||||||
!/.config/sway/config.d/input-defaults.conf
|
|
||||||
!/.config/sway/config.d/systemd.conf
|
|
||||||
!/.config/sway/config.d/theme.conf
|
|
||||||
!/.config/sway/config.d/biolimo
|
|
||||||
!/.config/sway/config.d/biolimo/screens.conf
|
|
||||||
!/.config/sway/config.d/biolimo/inputs.conf
|
|
||||||
!/.config/sway/config.d/chocolatebar
|
|
||||||
!/.config/sway/config.d/chocolatebar/screens.conf
|
|
||||||
|
|
||||||
!/.config/waybar
|
|
||||||
!/.config/waybar/colorscheme.css
|
|
||||||
!/.config/waybar/config
|
|
||||||
!/.config/waybar/style.css
|
|
||||||
|
|
||||||
!/.config/mutt
|
|
||||||
!/.config/mutt/muttrc
|
|
||||||
!/.config/mutt/base16.muttrc
|
|
||||||
!/.config/mutt/mailcap
|
|
||||||
|
|
||||||
!/.config/offlineimap
|
|
||||||
!/.config/offlineimap/functions.py
|
|
||||||
|
|
||||||
!/.local
|
|
||||||
!/.local/bin
|
|
||||||
!/.local/bin/install-base
|
|
||||||
!/.local/bin/swaylock-bg
|
|
||||||
!/.local/bin/sway-launcher
|
|
||||||
!/.local/bin/sway-service
|
|
||||||
!/.local/bin/toggle-kbd-layout
|
|
||||||
!/.local/bin/wcwd
|
|
||||||
!/.local/bin/vifmrun
|
|
||||||
!/.local/bin/vifmimg
|
|
||||||
!/.local/bin/s
|
|
||||||
!/.local/bin/windows
|
|
||||||
!/.local/bin/import-gtk-settings
|
|
||||||
!/.local/bin/mailto-mutt
|
|
||||||
!/.local/bin/setup-host-conf
|
|
||||||
!/.local/bin/steam-xdg
|
|
||||||
|
|
||||||
!/.local/share
|
|
||||||
!/.local/share/applications
|
|
||||||
!/.local/share/applications/userapp-Firefox.desktop
|
|
|
@ -3,28 +3,28 @@
|
||||||
# Base16 Shell template by Chris Kempson (http://chriskempson.com)
|
# Base16 Shell template by Chris Kempson (http://chriskempson.com)
|
||||||
# Burn scheme by Benjamin Bädorf
|
# Burn scheme by Benjamin Bädorf
|
||||||
|
|
||||||
color00="1a/18/1a" # Base 00 - Black
|
color00="1a/18/1a" # Base 00 - Black
|
||||||
color01="f8/5e/84" # Base 08 - Red
|
color01="f8/5e/84" # Base 08 - Red
|
||||||
color02="9e/cd/6f" # Base 0B - Green
|
color02="9e/cd/6f" # Base 0B - Green
|
||||||
color03="e5/c4/63" # Base 0A - Yellow
|
color03="e5/c4/63" # Base 0A - Yellow
|
||||||
color04="7a/cc/d7" # Base 0D - Blue
|
color04="7a/cc/d7" # Base 0D - Blue
|
||||||
color05="ab/9d/f2" # Base 0E - Magenta
|
color05="ab/9d/f2" # Base 0E - Magenta
|
||||||
color06="ef/90/62" # Base 0C - Cyan
|
color06="ef/90/62" # Base 0C - Cyan
|
||||||
color07="e3/e1/e4" # Base 05 - White
|
color07="e3/e1/e4" # Base 05 - White
|
||||||
color08="94/94/94" # Base 03 - Bright Black
|
color08="94/94/94" # Base 03 - Bright Black
|
||||||
color09=$color01 # Base 08 - Bright Red
|
color09=$color01 # Base 08 - Bright Red
|
||||||
color10=$color02 # Base 0B - Bright Green
|
color10=$color02 # Base 0B - Bright Green
|
||||||
color11=$color03 # Base 0A - Bright Yellow
|
color11=$color03 # Base 0A - Bright Yellow
|
||||||
color12=$color04 # Base 0D - Bright Blue
|
color12=$color04 # Base 0D - Bright Blue
|
||||||
color13=$color05 # Base 0E - Bright Magenta
|
color13=$color05 # Base 0E - Bright Magenta
|
||||||
color14=$color06 # Base 0C - Bright Cyan
|
color14=$color06 # Base 0C - Bright Cyan
|
||||||
color15="ff/5f/5f" # Base 07 - Bright White
|
color15="ff/5f/5f" # Base 07 - Bright White
|
||||||
color16="df/59/23" # Base 09
|
color16="df/59/23" # Base 09
|
||||||
color17="d7/00/00" # Base 0F
|
color17="d7/00/00" # Base 0F
|
||||||
color18="2d/2a/2e" # Base 01
|
color18="2d/2a/2e" # Base 01
|
||||||
color19="30/30/30" # Base 02
|
color19="30/30/30" # Base 02
|
||||||
color20="d3/d1/d4" # Base 04
|
color20="d3/d1/d4" # Base 04
|
||||||
color21="30/30/30" # Base 06
|
color21="30/30/30" # Base 06
|
||||||
color_foreground="e3/e1/e4" # Base 05
|
color_foreground="e3/e1/e4" # Base 05
|
||||||
color_background="1a/18/1a" # Base 00
|
color_background="1a/18/1a" # Base 00
|
||||||
|
|
||||||
|
@ -50,16 +50,16 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 16 color space
|
# 16 color space
|
||||||
put_template 0 $color00
|
put_template 0 $color00
|
||||||
put_template 1 $color01
|
put_template 1 $color01
|
||||||
put_template 2 $color02
|
put_template 2 $color02
|
||||||
put_template 3 $color03
|
put_template 3 $color03
|
||||||
put_template 4 $color04
|
put_template 4 $color04
|
||||||
put_template 5 $color05
|
put_template 5 $color05
|
||||||
put_template 6 $color06
|
put_template 6 $color06
|
||||||
put_template 7 $color07
|
put_template 7 $color07
|
||||||
put_template 8 $color08
|
put_template 8 $color08
|
||||||
put_template 9 $color09
|
put_template 9 $color09
|
||||||
put_template 10 $color10
|
put_template 10 $color10
|
||||||
put_template 11 $color11
|
put_template 11 $color11
|
||||||
put_template 12 $color12
|
put_template 12 $color12
|
|
@ -21,17 +21,17 @@ in {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = psCfg.user.description;
|
description = psCfg.user.description;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
|
||||||
"input"
|
"input"
|
||||||
"networkmanager"
|
|
||||||
"lp"
|
"lp"
|
||||||
|
"networkmanager"
|
||||||
"scanner"
|
"scanner"
|
||||||
|
"video"
|
||||||
|
"wheel"
|
||||||
];
|
];
|
||||||
initialHashedPassword =
|
initialHashedPassword =
|
||||||
if psCfg.user.password != null
|
if psCfg.user.password != null
|
||||||
then psCfg.user.password
|
then psCfg.user.password
|
||||||
else "";
|
else "";
|
||||||
shell = pkgs.zsh;
|
|
||||||
openssh.authorizedKeys.keys =
|
openssh.authorizedKeys.keys =
|
||||||
if psCfg.user.publicKeys != null
|
if psCfg.user.publicKeys != null
|
||||||
then psCfg.user.publicKeys
|
then psCfg.user.publicKeys
|
||||||
|
|
|
@ -26,7 +26,16 @@ in {
|
||||||
fonts.fontconfig.enable = mkForce true;
|
fonts.fontconfig.enable = mkForce true;
|
||||||
|
|
||||||
programs.dircolors.enable = true;
|
programs.dircolors.enable = true;
|
||||||
programs.dircolors.enableZshIntegration = true;
|
|
||||||
|
programs.less = {
|
||||||
|
enable = true;
|
||||||
|
keys = ''
|
||||||
|
k forw-line
|
||||||
|
i back-line
|
||||||
|
K forw-scroll
|
||||||
|
I back-scroll
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
home.file."xinitrc".source = ./.xinitrc;
|
home.file."xinitrc".source = ./.xinitrc;
|
||||||
|
|
||||||
|
@ -52,8 +61,6 @@ in {
|
||||||
xdg.configFile."user-dirs.locale".source = ./.config/user-dirs.locale;
|
xdg.configFile."user-dirs.locale".source = ./.config/user-dirs.locale;
|
||||||
xdg.configFile."xsettingsd/xsettingsd.conf".source = ./.config/xsettingsd/xsettingsd.conf;
|
xdg.configFile."xsettingsd/xsettingsd.conf".source = ./.config/xsettingsd/xsettingsd.conf;
|
||||||
xdg.configFile."mako/config".source = ./.config/mako/config;
|
xdg.configFile."mako/config".source = ./.config/mako/config;
|
||||||
xdg.configFile."vifm/vifmrc".source = ./.config/vifm/vifmrc;
|
|
||||||
xdg.configFile."vifm/colors/base16.vifm".source = ./.config/vifm/colors/base16.vifm;
|
|
||||||
xdg.configFile."libinput-gestures.conf".source = ./.config/libinput-gestures.conf;
|
xdg.configFile."libinput-gestures.conf".source = ./.config/libinput-gestures.conf;
|
||||||
xdg.configFile."waybar/config".source = ./.config/waybar/config;
|
xdg.configFile."waybar/config".source = ./.config/waybar/config;
|
||||||
xdg.configFile."waybar/style.css".source = ./.config/waybar/style.css;
|
xdg.configFile."waybar/style.css".source = ./.config/waybar/style.css;
|
||||||
|
@ -72,6 +79,8 @@ in {
|
||||||
# docker run -it --name caddy-json-schema registry.greenbaum.cloud/gc/caddy-l4:2.5.2 caddy json-schema -output /srv/caddy_schema.json
|
# docker run -it --name caddy-json-schema registry.greenbaum.cloud/gc/caddy-l4:2.5.2 caddy json-schema -output /srv/caddy_schema.json
|
||||||
xdg.dataFile."nvim/json-schemas/caddy_schema.json".source = .local/share/nvim/json-schemas/caddy_schema.json;
|
xdg.dataFile."nvim/json-schemas/caddy_schema.json".source = .local/share/nvim/json-schemas/caddy_schema.json;
|
||||||
xdg.dataFile."nvim/templates/.keep".text = "";
|
xdg.dataFile."nvim/templates/.keep".text = "";
|
||||||
|
xdg.dataFile."scripts/.keep".text = "";
|
||||||
|
xdg.dataFile."scripts/base16.sh".source = .local/share/scripts/base16.sh;
|
||||||
xdg.dataFile."shell.nix.tmpl" = {
|
xdg.dataFile."shell.nix.tmpl" = {
|
||||||
text = ''
|
text = ''
|
||||||
let
|
let
|
||||||
|
@ -88,15 +97,5 @@ in {
|
||||||
|
|
||||||
# Allow unfree packages only on a user basis, not on a system-wide basis
|
# Allow unfree packages only on a user basis, not on a system-wide basis
|
||||||
xdg.configFile."nixpkgs/config.nix".text = " { allowUnfree = true; } ";
|
xdg.configFile."nixpkgs/config.nix".text = " { allowUnfree = true; } ";
|
||||||
|
|
||||||
# This value determines the Home Manager release that your
|
|
||||||
# configuration is compatible with. This helps avoid breakage
|
|
||||||
# when a new Home Manager release introduces backwards
|
|
||||||
# incompatible changes.
|
|
||||||
#
|
|
||||||
# You can update Home Manager without changing this value. See
|
|
||||||
# the Home Manager release notes for a list of state version
|
|
||||||
# changes in each release.
|
|
||||||
home.stateVersion = "21.03";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,6 +83,26 @@
|
||||||
|
|
||||||
# TELEMETRY BS
|
# TELEMETRY BS
|
||||||
VUEDX_TELEMETRY = "off";
|
VUEDX_TELEMETRY = "off";
|
||||||
|
|
||||||
|
# FZF shell history widget default colors
|
||||||
|
FZF_DEFAULT_OPTS = lib.mkForce "--color=bg+:#2d2a2e,bg:#1a181a,spinner:#ef9062,hl:#7accd7 --color=fg:#d3d1d4,header:#7accd7,info:#e5c463,pointer:#ef9062 --color=marker:#ef9062,fg+:#d3d1d4,prompt:#e5c463,hl+:#7accd7";
|
||||||
|
|
||||||
|
# nnn theme colors
|
||||||
|
NNN_FCOLORS = let
|
||||||
|
BLK = "04";
|
||||||
|
CHR = "04";
|
||||||
|
DIR = "04";
|
||||||
|
EXE = "02";
|
||||||
|
REG = "00";
|
||||||
|
HARDLINK = "01";
|
||||||
|
SYMLINK = "01";
|
||||||
|
MISSING = "01";
|
||||||
|
ORPHAN = "07";
|
||||||
|
FIFO = "05";
|
||||||
|
SOCK = "05";
|
||||||
|
OTHER = "02";
|
||||||
|
in
|
||||||
|
BLK + CHR + DIR + EXE + REG + HARDLINK + SYMLINK + MISSING + ORPHAN + FIFO + SOCK + OTHER;
|
||||||
};
|
};
|
||||||
|
|
||||||
envListNames = lib.attrsets.mapAttrsToList (name: value: name) variables;
|
envListNames = lib.attrsets.mapAttrsToList (name: value: name) variables;
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
folder = ./.;
|
|
||||||
toImport = name: value: folder + ("/" + name);
|
|
||||||
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key && key != "default.nix";
|
|
||||||
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
|
|
||||||
in {
|
|
||||||
inherit imports;
|
|
||||||
nix.settings.substituters = ["https://cache.nixos.org/"];
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
nix.settings = {
|
|
||||||
substituters = [
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
nix.settings = {
|
|
||||||
substituters = [
|
|
||||||
"https://nrdxp.cachix.org"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -7,8 +7,6 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) fileContents;
|
inherit (lib) fileContents;
|
||||||
in {
|
in {
|
||||||
imports = [../cachix];
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
pub-solar.audio.mopidy.enable = true;
|
pub-solar.audio.mopidy.enable = true;
|
||||||
pub-solar.audio.bluetooth.enable = true;
|
pub-solar.audio.bluetooth.enable = true;
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) fileContents;
|
inherit (lib) fileContents;
|
||||||
in {
|
in {
|
||||||
imports = [../cachix];
|
|
||||||
config = {
|
config = {
|
||||||
pub-solar.graphical.wayland.software-renderer.enable = true;
|
pub-solar.graphical.wayland.software-renderer.enable = true;
|
||||||
pub-solar.sway.terminal = "foot";
|
pub-solar.sway.terminal = "foot";
|
||||||
|
|
|
@ -8,15 +8,16 @@
|
||||||
inherit
|
inherit
|
||||||
(pkgs)
|
(pkgs)
|
||||||
agenix
|
agenix
|
||||||
|
alejandra
|
||||||
cachix
|
cachix
|
||||||
editorconfig-checker
|
editorconfig-checker
|
||||||
mdbook
|
|
||||||
nix
|
nix
|
||||||
alejandra
|
nodePackages
|
||||||
nvfetcher
|
nvfetcher
|
||||||
shellcheck
|
shellcheck
|
||||||
shfmt
|
shfmt
|
||||||
treefmt
|
treefmt
|
||||||
|
nixos-generators
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
|
@ -24,21 +25,23 @@
|
||||||
prettier
|
prettier
|
||||||
;
|
;
|
||||||
|
|
||||||
hooks = import ./hooks;
|
|
||||||
|
|
||||||
pkgWithCategory = category: package: {inherit package category;};
|
pkgWithCategory = category: package: {inherit package category;};
|
||||||
devos = pkgWithCategory "devos";
|
devos = pkgWithCategory "devos";
|
||||||
linter = pkgWithCategory "linter";
|
formatter = pkgWithCategory "linter";
|
||||||
docs = pkgWithCategory "docs";
|
|
||||||
in {
|
in {
|
||||||
_file = toString ./.;
|
imports = ["${extraModulesPath}/git/hooks.nix" ./hooks];
|
||||||
|
|
||||||
imports = ["${extraModulesPath}/git/hooks.nix"];
|
|
||||||
git = {inherit hooks;};
|
|
||||||
|
|
||||||
# override for our own welcome
|
# override for our own welcome
|
||||||
devshell.name = pkgs.lib.mkForce "PubSolarOS";
|
devshell.name = pkgs.lib.mkForce "PubSolarOS";
|
||||||
|
|
||||||
|
packages = [
|
||||||
|
alejandra
|
||||||
|
editorconfig-checker
|
||||||
|
nodePackages.prettier
|
||||||
|
shellcheck
|
||||||
|
shfmt
|
||||||
|
];
|
||||||
|
|
||||||
commands = with pkgs;
|
commands = with pkgs;
|
||||||
[
|
[
|
||||||
(devos nix)
|
(devos nix)
|
||||||
|
@ -49,20 +52,13 @@ in {
|
||||||
help = pkgs.nvfetcher.meta.description;
|
help = pkgs.nvfetcher.meta.description;
|
||||||
command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher}/bin/nvfetcher -c ./sources.toml $@";
|
command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher}/bin/nvfetcher -c ./sources.toml $@";
|
||||||
}
|
}
|
||||||
(linter alejandra)
|
(formatter treefmt)
|
||||||
(linter editorconfig-checker)
|
|
||||||
(linter nodePackages.prettier)
|
|
||||||
(linter shfmt)
|
|
||||||
(linter shellcheck)
|
|
||||||
(linter treefmt)
|
|
||||||
|
|
||||||
(docs mdbook)
|
|
||||||
]
|
]
|
||||||
++ lib.optionals (!pkgs.stdenv.buildPlatform.isi686) [
|
++ lib.optionals (!pkgs.stdenv.buildPlatform.isi686) [
|
||||||
(devos cachix)
|
(devos cachix)
|
||||||
]
|
]
|
||||||
++ lib.optionals (pkgs.stdenv.hostPlatform.isLinux && !pkgs.stdenv.buildPlatform.isDarwin) [
|
++ lib.optionals (pkgs.stdenv.hostPlatform.isLinux && !pkgs.stdenv.buildPlatform.isDarwin) [
|
||||||
(devos inputs.nixos-generators.defaultPackage.${pkgs.system})
|
(devos nixos-generators)
|
||||||
(devos deploy-rs)
|
(devos deploy-rs.deploy-rs)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
enable = true;
|
git.hooks = {
|
||||||
pre-commit.text = builtins.readFile ./pre-commit.sh;
|
enable = true;
|
||||||
|
pre-commit.text = builtins.readFile ./pre-commit.sh;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if git rev-parse --verify HEAD >/dev/null 2>&1; then
|
# Check editorconfig
|
||||||
against=HEAD
|
if ! editorconfig-checker; then
|
||||||
else
|
printf "%b\n" \
|
||||||
# Initial commit: diff against an empty tree object
|
"\nCode is not aligned with .editorconfig" \
|
||||||
against=$(${git}/bin/git hash-object -t tree /dev/null)
|
"Review the output and commit your fixes" >&2
|
||||||
fi
|
exit 1
|
||||||
|
|
||||||
diff="git diff-index --name-only --cached $against --diff-filter d"
|
|
||||||
|
|
||||||
all_files=($($diff))
|
|
||||||
|
|
||||||
# Format staged files.
|
|
||||||
if ((${#all_files[@]} != 0)); then
|
|
||||||
treefmt "${all_files[@]}" &&
|
|
||||||
git add "${all_files[@]}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check editorconfig
|
|
||||||
if ((${#all_files[@]} != 0)); then
|
|
||||||
if ! editorconfig-checker -- "${all_files[@]}"; then
|
|
||||||
printf "%b\n" \
|
|
||||||
"\nCode is not aligned with .editorconfig" \
|
|
||||||
"Review the output and commit your fixes" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
nodes.test-machine = {suites ? null, ...}: {
|
nodes.test-machine = {suites ? null, ...}: {
|
||||||
imports = suites.iso;
|
imports = suites.iso;
|
||||||
|
|
||||||
home-manager.users.pub-solar.programs.zsh.shellAliases = {
|
home-manager.users.pub-solar.programs.bash.shellAliases = {
|
||||||
test-x11 = "glinfo | tee /tmp/test-x11.out && touch /tmp/test-x11-exit-ok";
|
test-x11 = "glinfo | tee /tmp/test-x11.out && touch /tmp/test-x11-exit-ok";
|
||||||
test-wayland = "wayland-info | tee /tmp/test-wayland.out && touch /tmp/test-wayland-exit-ok";
|
test-wayland = "wayland-info | tee /tmp/test-wayland.out && touch /tmp/test-wayland-exit-ok";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
[formatter.nix]
|
[formatter.nix]
|
||||||
command = "alejandra"
|
command = "alejandra"
|
||||||
includes = ["*.nix"]
|
includes = ["*.nix"]
|
||||||
|
excludes = ["pkgs/_sources/generated.nix"]
|
||||||
|
|
||||||
[formatter.prettier]
|
[formatter.prettier]
|
||||||
command = "prettier"
|
command = "prettier"
|
||||||
|
|
Loading…
Reference in a new issue