diff --git a/old-conf/.envrc b/old-conf/.envrc new file mode 100644 index 00000000..3550a30f --- /dev/null +++ b/old-conf/.envrc @@ -0,0 +1 @@ +use flake diff --git a/old-conf/.github/flake-to-md.awk b/old-conf/.github/flake-to-md.awk new file mode 100644 index 00000000..f2cba472 --- /dev/null +++ b/old-conf/.github/flake-to-md.awk @@ -0,0 +1,131 @@ +# Parses a flake lock update commit and output readable markdown with proper +# https://github.com/sandhose/nixconf/blob/master/misc/flake-to-markdown.awk +# compare links + +function unquote (str) { + split(str, arr, "'"); + return arr[2]; +} + +function parse_flakeref (flakeref, res) { + split(flakeref, arr, ":"); + type = arr[1]; + tmp = arr[2]; + split(tmp, arr, "?"); + tmp = arr[1]; + n = split(tmp, arr, "/"); + commit = arr[n]; + repo = arr[1] + for (i = 2; i < n; i++) { + repo = repo "/" arr[i]; + } + + res["type"] = type; + res["commit"] = commit; + res["repo"] = repo; +} + +function short (sha) { + return substr(sha, 1, 8); +} + +# Show the raw output in a foldable section +BEGIN { + print "
Raw output

"; + print ""; + print "```"; +} + +# Print all lines anyway +{ print } + +# This is a "Updated input 'x'" ine +$3 ~ /input/ { + input = unquote($4); + operations[input] = $2; + next; +} + +# This is a "'type:foo/bar/1234' (2021-01-01)" line +$2 ~ /\(.*\)/ { + input_from[input] = unquote($1) + input_from_date[input] = substr($2, 2, 10); + next; +} + +# This is a "→ 'type:foo/bar/1234' (2021-01-01)" line +$3 ~ /\(.*\)/ { + input_to[input] = unquote($2) + input_to_date[input] = substr($3, 2, 10); + next; +} + +END { + print "```"; + print ""; + print "

"; + print ""; + + # Once we gathered the information we needed, we can show it properly + for (input in operations) { + operation = operations[input]; + details = ""; + link = ""; + + # For "updated" inputs, we have two flake refs + if (operation == "Updated") { + from = input_from[input]; + to = input_to[input]; + from_date = input_from_date[input] + to_date = input_to_date[input] + parse_flakeref(from, parsed_from); + parse_flakeref(to, parsed_to); + type = parsed_to["type"]; + repo = parsed_to["repo"]; + from_commit = parsed_from["commit"]; + to_commit = parsed_to["commit"]; + + compare = sprintf("`%s` ➡️ `%s`", short(from_commit), short(to_commit)); + # Render the details according to the ref type + if (type == "github") { + compare = sprintf("[%s](https://github.com/%s/compare/%s...%s)", compare, repo, from_commit, to_commit); + link = sprintf("https://github.com/%s", repo); + } else if (type == "gitlab") { + compare = sprintf("[%s](https://gitlab.com/%s/-/compare/%s...%s)", compare, repo, from_commit, to_commit); + link = sprintf("https://gitlab.com/%s", repo); + } + + details = sprintf("%s (%s to %s)", compare, from_date, to_date); + # For "added" inputs, we have one flake ref + } else if (operation == "Added") { + ref = input_from[input]; + parse_flakeref(ref, parsed_ref); + type = parsed_ref["type"]; + repo = parsed_ref["repo"]; + commit = parsed_ref["commit"]; + + # Render the details according to the ref type + if (type == "github") { + details = sprintf("[github.com/%s](https://github.com/%s/tree/%s/)", repo, repo, commit); + link = sprintf("https://github.com/%s", repo); + } else if (type == "gitlab") { + details = sprintf("[gitlab.com/%s](https://gitlab.com/%s/-/tree/%s/)", repo, repo, commit); + link = sprintf("https://gitlab.com/%s", repo); + } else { + details = sprintf("`%s`", ref); + } + } + + if (link) { + input_txt = sprintf("[`%s`](%s)", input, link); + } else { + input_txt = sprintf("`%s`", input); + } + + if (details) { + printf(" - %s input %s: %s\n", operation, input_txt, details); + } else { + printf(" - %s input %s.\n", operation, input_txt); + } + } +} diff --git a/old-conf/.github/workflows/update.yaml b/old-conf/.github/workflows/update.yaml new file mode 100644 index 00000000..ce115d56 --- /dev/null +++ b/old-conf/.github/workflows/update.yaml @@ -0,0 +1,53 @@ +# https://github.com/sandhose/nixconf/blob/master/.github/workflows/update.yaml +name: "Update lock file" +on: + schedule: + - cron: "0 6 * * *" + workflow_dispatch: +jobs: + tests: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: tibdex/github-app-token@v1.5 + id: generate-token + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} + + - uses: cachix/install-nix-action@v16 + with: + install_url: https://releases.nixos.org/nix/nix-2.6.1/install + extra_nix_config: | + experimental-features = nix-command flakes + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + + - name: Setup Git author + run: | + git config user.name 'GitHub Ations' + git config user.email 'noreply@github.com' + + - name: Update lock file + run: nix flake update --no-use-registries --commit-lock-file + + - name: Get commit message + id: commit + run: | + message="$(git log -1 --pretty=%B | tail +3 | awk -f ./.github/flake-to-md.awk)" + message="${message//'%'/'%25'}" + message="${message//$'\n'/'%0A'}" + message="${message//$'\r'/'%0D'}" + echo "::set-output name=message::$message" + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + token: "${{ steps.generate-token.outputs.token }}" + title: "Automated Flake update" + body: "${{ steps.commit.outputs.message }}" + delete-branch: true + assignees: thexyno diff --git a/old-conf/.gitignore b/old-conf/.gitignore new file mode 100644 index 00000000..007af98a --- /dev/null +++ b/old-conf/.gitignore @@ -0,0 +1,13 @@ +# Ignore configurable file with secrets +#/data/secrets.nix +.DS_Store +/.direnv + +# Ignore build symlinks +result* +internal +.tmp + +# Ignore vscode stuff +/.vscode/ + diff --git a/old-conf/.helix/languages.toml b/old-conf/.helix/languages.toml new file mode 100644 index 00000000..5dd999ea --- /dev/null +++ b/old-conf/.helix/languages.toml @@ -0,0 +1,6 @@ +[language-server.nil] +command = "nil" +[[language]] +name = "nix" +formatter = {command = "nixfmt"} +language-servers = [ "nil" ] diff --git a/old-conf/.nixd.json b/old-conf/.nixd.json new file mode 100644 index 00000000..05a44f42 --- /dev/null +++ b/old-conf/.nixd.json @@ -0,0 +1,8 @@ +{ + "options": { + "enable": true, + "target": { + "installable": ".#nixosConfigurations.picard.options" + } + } +} \ No newline at end of file diff --git a/old-conf/LICENSE b/old-conf/LICENSE new file mode 100644 index 00000000..a612ad98 --- /dev/null +++ b/old-conf/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/old-conf/README.md b/old-conf/README.md new file mode 100644 index 00000000..154dda19 --- /dev/null +++ b/old-conf/README.md @@ -0,0 +1,19 @@ +# my nixos/nix-darwin Configs + +## Folder structure + +- `hosts/` + - host specific configuration +- `nixos-modules/` + - nixos modules +- `hm-imports/` + - home-manager modules +- `data/` + - some configuration files, pubkeys, ... +- `lib/` + - helper functions +- `packages/` + - packages to small to put into another repo +- `secrets/` + - agenix secrets + diff --git a/old-conf/darwin-common.nix b/old-conf/darwin-common.nix new file mode 100644 index 00000000..f79a8aa1 --- /dev/null +++ b/old-conf/darwin-common.nix @@ -0,0 +1,47 @@ +{ config, pkgs, inputs, ... }: { + programs.zsh.enable = true; + environment.pathsToLink = [ "/share/zsh" ]; + services.nix-daemon.enable = true; + nix.settings.cores = 0; # use all cores + nix.settings.max-jobs = 10; # use all cores + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + security.pam.enableSudoTouchIdAuth = true; + programs.zsh.shellInit = '' + eval "$(/opt/homebrew/bin/brew shellenv)" + ''; + environment.systemPath = [ "/opt/homebrew/bin" "/opt/homebrew/sbin" ]; + #nix.settings.auto-optimise-store = true; + nix.distributedBuilds = true; + nix.nixPath = [{ nixpkgs = "${inputs.nixpkgs-darwin.outPath}"; nixpkgs-master = "${inputs.nixpkgs-master.outPath}"; nixpkgs-nixos = "${inputs.nixpkgs.outPath}"; }]; + nix.buildMachines = [{ + systems = [ "x86_64-linux" ]; + supportedFeatures = [ "kvm" "big-parallel" ]; + sshUser = "ragon"; + maxJobs = 12; + hostName = "ds9"; + sshKey = "/Users/xyno/.ssh/id_ed25519"; + publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUorQkJYdWZYQUpoeVVIVmZocWxrOFk0ekVLSmJLWGdKUXZzZEU0ODJscFYgcm9vdEBpc28K"; + }]; + nix.extraOptions = '' + builders-use-substitutes = true + ''; + + system.defaults = { + NSGlobalDomain.AppleShowAllExtensions = true; + NSGlobalDomain.InitialKeyRepeat = 25; + NSGlobalDomain.KeyRepeat = 4; + NSGlobalDomain.NSNavPanelExpandedStateForSaveMode = true; + NSGlobalDomain.PMPrintingExpandedStateForPrint = true; + NSGlobalDomain."com.apple.mouse.tapBehavior" = 1; + NSGlobalDomain."com.apple.trackpad.trackpadCornerClickBehavior" = 1; + dock.autohide = true; + dock.mru-spaces = false; + dock.show-recents = false; + dock.static-only = true; + dock.expose-animation-duration = 0.01; + finder.AppleShowAllExtensions = true; + finder.FXEnableExtensionChangeWarning = false; + loginwindow.GuestEnabled = false; + }; +} + diff --git a/old-conf/darwin-modules/.gitkeep b/old-conf/darwin-modules/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/old-conf/darwin-modules/borgmatic.nix b/old-conf/darwin-modules/borgmatic.nix new file mode 100644 index 00000000..f5d39bd2 --- /dev/null +++ b/old-conf/darwin-modules/borgmatic.nix @@ -0,0 +1,73 @@ +{ pkgs, lib, config, ... }: +with lib; +let + cfg = config.ragon.services.borgmatic; + settingsFormat = pkgs.formats.yaml { }; + cfgType = with types; submodule { + freeformType = settingsFormat.type; + }; + cfgfile = settingsFormat.generate "config.yaml" cfg.settings; +in +{ + options.ragon.services.borgmatic = { + enable = mkEnableOption (mdDoc "borgmatic"); + + settings = mkOption { + description = mdDoc '' + See https://torsion.org/borgmatic/docs/reference/configuration/ + ''; + default = null; + type = types.nullOr cfgType; + }; + + configurations = mkOption { + description = mdDoc '' + Set of borgmatic configurations, see https://torsion.org/borgmatic/docs/reference/configuration/ + ''; + default = { }; + type = types.attrsOf cfgType; + }; + }; + config = mkIf cfg.enable { + + environment.systemPackages = [ + #pkgs.borgmatic + pkgs.borgbackup + ]; + homebrew.brews = [ "borgmatic" ]; + + environment.etc = (optionalAttrs (cfg.settings != null) { "borgmatic/config.yaml".source = cfgfile; }) // + mapAttrs' + (name: value: nameValuePair + "borgmatic.d/${name}.yaml" + { source = settingsFormat.generate "${name}.yaml" value; }) + cfg.configurations; + + launchd.user.agents.borgmatic = { + script = '' + if (pmset -g batt | grep -q 'AC Power'); then + borgmatic + else + echo "On Battery Power, skipping backup" + fi + ''; + path = [ "/opt/homebrew/bin" config.environment.systemPath ]; + serviceConfig = { + StartInterval = 60 * 60; # run every hour + StandardOutPath = "/var/log/borgmatic.log"; + StandardErrorPath = "/var/log/borgmatic.log"; + KeepAlive = true; + # NetworkState = true; + Nice = 1; + }; + }; + assertions = [ + { + assertion = config.homebrew.enable; + message = "homebrew must be enabled for borgmatic to run"; + } + ]; + }; + + +} diff --git a/old-conf/data/monitoring.toml b/old-conf/data/monitoring.toml new file mode 100644 index 00000000..ad6ef86c --- /dev/null +++ b/old-conf/data/monitoring.toml @@ -0,0 +1,17 @@ +[master] +hostname = "beliskner" +ip = "beliskner.kangaroo-galaxy.ts.net" # tailscale + +[hostOverrides] + +[exporters.node] +hosts = [ "ds9", "picard" ] + +[exporters.smartctl] +hosts = [ "ds9" ] + +[exporters.blackbox] +hosts = [ "beliskner" ] + +[promtail] +hosts = [ "picard", "ds9" ] diff --git a/old-conf/data/pubkeys.nix b/old-conf/data/pubkeys.nix new file mode 100644 index 00000000..05b234ae --- /dev/null +++ b/old-conf/data/pubkeys.nix @@ -0,0 +1,29 @@ +let + ragon = + let + user = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEJwOH1b6xWmEr1VZh48kBIYhW11vtPFR3my8stAHlSi" # saurier + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIuwQJY0H/fdu1UmGXAut7VfcvAk2Dm78tJpkyyv2in2" # daedalus + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKZ0hlF6EFQXpw74kkpoA8vxMX6vVDTnpM41rCDXRMuo" # daedalusvm + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC6xx1IWlRoSQvCUZ+iyzekjFjoXBKmDT4Kxww4Tl+63" # iPad + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJmN2QRbwQyeUChQ0ZxNzjNnUZTOUVbM4kDEGfEtmufc" # iPhone + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID/oMAi5jyQsNohfhcSH2ItisTpBGB0WtYTVxJYKKqhj" # theseus + ]; + server = user ++ hosts.ds9 ++ hosts.picard; + client = user; + hosts = { + ds9 = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ+BBXufXAJhyUHVfhqlk8Y4zEKJbKXgJQvsdE482lpV" ]; + picard = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAm3UXZaN95WBUaS9SiHLNEuI1tP1x1w07qnYxPe+vdr" ]; + theseus = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP/pPCcq0ziQhdyZSObly3bUUJqH56Ly+uYS6MNdR2D+"]; + }; + in + { + inherit user server client; + computers = user ++ (builtins.foldl' (a: b: a ++ b) [ ] (builtins.attrValues hosts)); # everything + host = hn: (hosts.${hn} ++ user); + hosts = hn: ((map (x: hosts.${x}) hn) ++ user); + }; +in +{ + inherit ragon; +} diff --git a/old-conf/flake.lock b/old-conf/flake.lock new file mode 100644 index 00000000..4f440dbb --- /dev/null +++ b/old-conf/flake.lock @@ -0,0 +1,749 @@ +{ + "nodes": { + "agenix": { + "inputs": { + "darwin": "darwin", + "home-manager": "home-manager", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1754433428, + "narHash": "sha256-NA/FT2hVhKDftbHSwVnoRTFhes62+7dxZbxj5Gxvghs=", + "owner": "ryantm", + "repo": "agenix", + "rev": "9edb1787864c4f59ae5074ad498b6272b3ec308d", + "type": "github" + }, + "original": { + "owner": "ryantm", + "ref": "main", + "repo": "agenix", + "type": "github" + } + }, + "attic": { + "inputs": { + "crane": "crane", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1758711588, + "narHash": "sha256-0nZlCCDC5PfndsQJXXtcyrtrfW49I3KadGMDlutzaGU=", + "owner": "zhaofengli", + "repo": "attic", + "rev": "12cbeca141f46e1ade76728bce8adc447f2166c6", + "type": "github" + }, + "original": { + "owner": "zhaofengli", + "repo": "attic", + "type": "github" + } + }, + "crane": { + "locked": { + "lastModified": 1751562746, + "narHash": "sha256-smpugNIkmDeicNz301Ll1bD7nFOty97T79m4GUMUczA=", + "owner": "ipetkov", + "repo": "crane", + "rev": "aed2020fd3dc26e1e857d4107a5a67a33ab6c1fd", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "darwin": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1744478979, + "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "43975d782b418ebf4969e9ccba82466728c2851b", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, + "darwin_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1758805352, + "narHash": "sha256-BHdc43Lkayd+72W/NXRKHzX5AZ+28F3xaUs3a88/Uew=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "c48e963a5558eb1c3827d59d21c5193622a1477c", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "attic", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1751413152, + "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1738453229, + "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flakey-profile": { + "locked": { + "lastModified": 1712898590, + "narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=", + "owner": "lf-", + "repo": "flakey-profile", + "rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d", + "type": "github" + }, + "original": { + "owner": "lf-", + "repo": "flakey-profile", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745494811, + "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1758463745, + "narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-25.05", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_3": { + "inputs": { + "nixpkgs": [ + "zen-browser", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1752603129, + "narHash": "sha256-S+wmHhwNQ5Ru689L2Gu8n1OD6s9eU9n9mD827JNR+kw=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "e8c19a3cec2814c754f031ab3ae7316b64da085b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "impermanence": { + "locked": { + "lastModified": 1737831083, + "narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=", + "owner": "nix-community", + "repo": "impermanence", + "rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "impermanence", + "type": "github" + } + }, + "kmonad": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "dir": "nix", + "lastModified": 1751398458, + "narHash": "sha256-EHg2Z0EbsFN5zU1WrLc1sFszbUsLLpqZgFim7Zi8dRc=", + "ref": "feat-tap-overlap", + "rev": "fb0334cbd16ec64c5ebcc10f7982a9857bd97d27", + "revCount": 986, + "type": "git", + "url": "https://github.com/jokesper/kmonad" + }, + "original": { + "dir": "nix", + "ref": "feat-tap-overlap", + "type": "git", + "url": "https://github.com/jokesper/kmonad" + } + }, + "lix": { + "flake": false, + "locked": { + "lastModified": 1753223229, + "narHash": "sha256-tkT4aCZZE6IEmjYotOzKKa2rV3pGpH3ZREeQn7ACgdU=", + "rev": "7ac20fc47cf2f1b7469c7a2f379e5a3a51a6789a", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/7ac20fc47cf2f1b7469c7a2f379e5a3a51a6789a.tar.gz?rev=7ac20fc47cf2f1b7469c7a2f379e5a3a51a6789a" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/lix-project/lix/archive/release-2.93.tar.gz" + } + }, + "lix-module": { + "inputs": { + "flake-utils": "flake-utils", + "flakey-profile": "flakey-profile", + "lix": "lix", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1753282722, + "narHash": "sha256-KYMUrTV7H/RR5/HRnjV5R3rRIuBXMemyJzTLi50NFTs=", + "rev": "46a9e8fcfe4be72b4c7c8082ee11d2c42da1e873", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/46a9e8fcfe4be72b4c7c8082ee11d2c42da1e873.tar.gz?rev=46a9e8fcfe4be72b4c7c8082ee11d2c42da1e873" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.3-1.tar.gz" + } + }, + "miro": { + "flake": false, + "locked": { + "lastModified": 1644177791, + "narHash": "sha256-t8L6UboaOcg6JkGjX1NTd13Yw7ATySGxmnkJ7wUyZAE=", + "owner": "miromannino", + "repo": "miro-windows-manager", + "rev": "faa6f5f0bc025cc2465f3198609d2123d86101c2", + "type": "github" + }, + "original": { + "owner": "miromannino", + "repo": "miro-windows-manager", + "type": "github" + } + }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "attic", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737420293, + "narHash": "sha256-F1G5ifvqTpJq7fdkT34e/Jy9VCyzd5XfJ9TO8fHhJWE=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "f4158fa080ef4503c8f4c820967d946c2af31ec9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, + "nixos-hardware": { + "locked": { + "lastModified": 1758663926, + "narHash": "sha256-6CFdj7Xs616t1W4jLDH7IohAAvl5Dyib3qEv/Uqw1rk=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "170ff93c860b2a9868ed1e1102d4e52cb3d934e1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1759143472, + "narHash": "sha256-TvODmeR2W7yX/JmOCmP+lAFNkTT7hAxYcF3Kz8SZV3w=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5ed4e25ab58fd4c028b59d5611e14ea64de51d23", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-darwin": { + "locked": { + "lastModified": 1735564410, + "narHash": "sha256-HB/FA0+1gpSs8+/boEavrGJH+Eq08/R2wWNph1sM1Dg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1e7a8f391f1a490460760065fa0630b5520f9cf8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-24.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1738452942, + "narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz" + } + }, + "nixpkgs-master": { + "locked": { + "lastModified": 1759258560, + "narHash": "sha256-ykJfEwNYol4x+gQdbePWc5tfxwky7aXpM4ZJDyCpK5Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "66063074cf41f08c39738b1436f4bdae7fb97265", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1751741127, + "narHash": "sha256-t75Shs76NgxjZSgvvZZ9qOmz5zuBE8buUaYD28BMTxg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "29e290002bfff26af1db6f64d070698019460302", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1736320768, + "narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4bc9c909d9ac828a039f288cf872d16d38185db8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1755615617, + "narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "20075955deac2583bb12f07151c2df830ef346b4", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "pandoc-latex-template": { + "flake": false, + "locked": { + "lastModified": 1758365407, + "narHash": "sha256-gat4bW9oW5UEcB23s026vmBmxwQE7Eyejgr/qIS7CsM=", + "owner": "Wandmalfarbe", + "repo": "pandoc-latex-template", + "rev": "f99fe1dbda926be29f567196b1edfeb92f96ac10", + "type": "github" + }, + "original": { + "owner": "Wandmalfarbe", + "repo": "pandoc-latex-template", + "type": "github" + } + }, + "quadlet-nix": { + "locked": { + "lastModified": 1758631655, + "narHash": "sha256-EGeZ963L7xsNAY7snvP1JHQe7LWLVCM6f49+PzWjhEE=", + "owner": "SEIAROTg", + "repo": "quadlet-nix", + "rev": "2ebe01b175e2e1e6de3f172d23f0c3b88713eec9", + "type": "github" + }, + "original": { + "owner": "SEIAROTg", + "repo": "quadlet-nix", + "type": "github" + } + }, + "root": { + "inputs": { + "agenix": "agenix", + "attic": "attic", + "darwin": "darwin_2", + "home-manager": "home-manager_2", + "impermanence": "impermanence", + "kmonad": "kmonad", + "lix-module": "lix-module", + "miro": "miro", + "nixos-hardware": "nixos-hardware", + "nixpkgs": "nixpkgs", + "nixpkgs-darwin": "nixpkgs-darwin", + "nixpkgs-master": "nixpkgs-master", + "pandoc-latex-template": "pandoc-latex-template", + "quadlet-nix": "quadlet-nix", + "spoons": "spoons", + "synapse": "synapse", + "utils": "utils", + "wired": "wired", + "x": "x", + "xynoblog": "xynoblog", + "zen-browser": "zen-browser" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1740709839, + "narHash": "sha256-4dF++MXIXna/AwlZWDKr7bgUmY4xoEwvkF1GewjNrt0=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "b4270835bf43c6f80285adac6f66a26d83f0f277", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "spoons": { + "flake": false, + "locked": { + "lastModified": 1747090751, + "narHash": "sha256-ZRSRb2QW8hrTkdCg5xezF09DntPocE842rc4ZKt7aHY=", + "owner": "Hammerspoon", + "repo": "Spoons", + "rev": "e5b871250346c3fe93bac0d431fc75f6f0e2f92a", + "type": "github" + }, + "original": { + "owner": "Hammerspoon", + "repo": "Spoons", + "type": "github" + } + }, + "synapse": { + "flake": false, + "locked": { + "lastModified": 1754934810, + "narHash": "sha256-4HAA9Xq4C3DHxz0BgqBitfM4wZwPSEu+IO/OPfHzLVw=", + "owner": "element-hq", + "repo": "synapse", + "rev": "4054d956f75056ace9edc729ee488edcbf00d1a2", + "type": "github" + }, + "original": { + "owner": "element-hq", + "repo": "synapse", + "rev": "4054d956f75056ace9edc729ee488edcbf00d1a2", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "wired": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1743305055, + "narHash": "sha256-NIsi8Dno9YsOLUUTrLU4p+hxYeJr3Vkg1gIpQKVTaDs=", + "owner": "Toqozz", + "repo": "wired-notify", + "rev": "75d43f54a02b15f2a15f5c1a0e1c7d15100067a6", + "type": "github" + }, + "original": { + "owner": "Toqozz", + "repo": "wired-notify", + "type": "github" + } + }, + "x": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1680879729, + "narHash": "sha256-ItGaOeb0wt8ESKTJxPkFVbV8cyR/0RhSFVltelLQ9b4=", + "owner": "thexyno", + "repo": "x", + "rev": "5b15dd8e511c9cd39c7dbfa583e2c85ff30afecb", + "type": "github" + }, + "original": { + "owner": "thexyno", + "repo": "x", + "type": "github" + } + }, + "xynoblog": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1732833558, + "narHash": "sha256-KpAsXBkNJTNBHQuwqJkMSCsVWhbj9K7LLY7emgU6f4Q=", + "owner": "thexyno", + "repo": "blog", + "rev": "b020543dcb823c7be01a7aca9f1748a517ece659", + "type": "github" + }, + "original": { + "owner": "thexyno", + "repo": "blog", + "type": "github" + } + }, + "zen-browser": { + "inputs": { + "home-manager": "home-manager_3", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1759203282, + "narHash": "sha256-lsKz9cA0VpHsSbOXZcg8V2fGmUSvC183Fmmn++WAG5o=", + "owner": "0xc000022070", + "repo": "zen-browser-flake", + "rev": "7c14e901ac9d2d5b994bad90a11dfbf25500c6cb", + "type": "github" + }, + "original": { + "owner": "0xc000022070", + "repo": "zen-browser-flake", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/old-conf/flake.nix b/old-conf/flake.nix new file mode 100644 index 00000000..cd5e53e8 --- /dev/null +++ b/old-conf/flake.nix @@ -0,0 +1,221 @@ +{ + description = "ragons nix/nixos configs"; + inputs = { + # base imports + utils.url = "github:numtide/flake-utils"; + + ## nixos/nix-darwin dependencies + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; + nixpkgs-darwin.url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin"; + nixpkgs-master.url = "github:NixOS/nixpkgs/master"; + agenix.url = "github:ryantm/agenix/main"; + agenix.inputs.nixpkgs.follows = "nixpkgs"; + home-manager.url = "github:nix-community/home-manager/release-25.05"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + impermanence.url = "github:nix-community/impermanence"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + darwin.url = "github:lnl7/nix-darwin/master"; + darwin.inputs.nixpkgs.follows = "nixpkgs"; + quadlet-nix.url = "github:SEIAROTg/quadlet-nix"; + quadlet-nix.inputs.nixpkgs.follows = "nixpkgs"; + + lix-module = { + url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.3-1.tar.gz"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # programs + xynoblog.url = "github:thexyno/blog"; + xynoblog.inputs.nixpkgs.follows = "nixpkgs"; + x.url = "github:thexyno/x"; + x.inputs.nixpkgs.follows = "nixpkgs"; + # helix.url = "github:SofusA/helix-pull-diagnostics/pull-diagnostics"; + wired.inputs.nixpkgs.follows = "nixpkgs"; + wired.url = "github:Toqozz/wired-notify"; + zen-browser.url = "github:0xc000022070/zen-browser-flake"; + attic.url = "github:zhaofengli/attic"; + attic.inputs.nixpkgs.follows = "nixpkgs"; + + synapse.url = "github:element-hq/synapse?rev=4054d956f75056ace9edc729ee488edcbf00d1a2"; + synapse.flake = false; + + kmonad = { + url = "git+https://github.com/jokesper/kmonad?dir=nix&ref=feat-tap-overlap"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + ## editor stuff + # nixd.url = "github:nix-community/nixd"; + # nixd.inputs.nixpkgs.follows = "nixpkgs"; + + + ## vim + # nnn-nvim.url = "github:luukvbaal/nnn.nvim"; + # nnn-nvim.flake = false; + # notify-nvim.url = "github:rcarriga/nvim-notify"; + # notify-nvim.flake = false; + # noice-nvim.url = "github:folke/noice.nvim"; + # noice-nvim.flake = false; + + # ## zsh + # zsh-completions.url = "github:zsh-users/zsh-completions"; + # zsh-completions.flake = false; + # zsh-syntax-highlighting.url = "github:zsh-users/zsh-syntax-highlighting/master"; + # zsh-syntax-highlighting.flake = false; + # zsh-vim-mode.url = "github:softmoth/zsh-vim-mode"; + # zsh-vim-mode.flake = false; + # agkozak-zsh-prompt.url = "github:agkozak/agkozak-zsh-prompt"; + # agkozak-zsh-prompt.flake = false; + + # ## xonsh + # xonsh-fish-completer.url = "github:xonsh/xontrib-fish-completer"; + # xonsh-fish-completer.flake = false; + # xonsh-direnv.url = "github:74th/xonsh-direnv"; + # xonsh-direnv.flake = false; + + ## hammerspoon + miro.url = "github:miromannino/miro-windows-manager"; + miro.flake = false; + spoons.url = "github:Hammerspoon/Spoons"; + spoons.flake = false; + + + + #other dependencies + pandoc-latex-template.url = "github:Wandmalfarbe/pandoc-latex-template"; + pandoc-latex-template.flake = false; + + }; + + outputs = + inputs @ { self + , nixpkgs + , nixpkgs-darwin + , nixpkgs-master + , agenix + , home-manager + , impermanence + , darwin + , utils + , xynoblog + # , lolpizza + , lix-module + , kmonad + , wired + , x + , ... + }: + let + extraSystems = [ ]; + lib = nixpkgs.lib.extend (self: super: { + my = import ./lib { inherit inputs; lib = self; }; + }); + + overlays = [ + self.overlays.default + wired.overlays.default + ]; + genPkgsWithOverlays = system: import nixpkgs { + inherit system overlays; + config.allowUnfree = true; + }; + genDarwinPkgsWithOverlays = system: import nixpkgs-darwin { + inherit system overlays; + config.allowUnfree = true; + }; + + + rev = if (lib.hasAttrByPath [ "rev" ] self.sourceInfo) then self.sourceInfo.rev else "Dirty Build"; + + nixosSystem = system: extraModules: hostName: + let + pkgs = genPkgsWithOverlays system; + in + nixpkgs.lib.nixosSystem + rec { + inherit system; + specialArgs = { inherit lib inputs; }; + modules = [ + lix-module.nixosModules.default + agenix.nixosModules.age + impermanence.nixosModules.impermanence + home-manager.nixosModules.home-manager + kmonad.nixosModules.default + xynoblog.nixosModule + # lolpizza.nixosModule + x.nixosModule + ({ config, ... }: lib.mkMerge [{ + nixpkgs.pkgs = pkgs; + nixpkgs.overlays = overlays; + networking.hostName = hostName; + system.configurationRevision = rev; + services.getty.greetingLine = + "<<< Welcome to ${config.system.nixos.label} @ ${rev} - Please leave \\l >>>"; + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit inputs; }; + }]) + ./nixos-common.nix + ] ++ extraModules; + }; + darwinSystem = system: extraModules: hostName: + let + pkgs = genDarwinPkgsWithOverlays system; + in + darwin.lib.darwinSystem + { + inherit system; + specialArgs = { inherit lib inputs self darwin; }; + modules = [ + home-manager.darwinModules.home-manager + { + nixpkgs.overlays = overlays; + networking.hostName = hostName; + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit inputs pkgs; }; + } + ./darwin-common.nix + lix-module.nixosModules.default + ] ++ extraModules; + }; + + processConfigurations = lib.mapAttrs (n: v: v n); + + + in + { + lib = lib.my; + overlays.default = final: prev: { + unstable = import nixpkgs-master { + system = prev.system; + config.allowUnfree = true; + }; + my = self.packages."${prev.system}"; + }; + # nixosModules = lib.my.mapModulesRec ./nixos-modules import; + # darwinModules = lib.my.mapModulesRec ./darwin-modules import; + + nixosConfigurations = processConfigurations { + picard = nixosSystem "x86_64-linux" [ ./hosts/picard/default.nix ]; + ds9 = nixosSystem "x86_64-linux" [ ./hosts/ds9/default.nix ]; + + voyager = nixosSystem "x86_64-linux" [ ./hosts/voyager/default.nix ]; + theseus = nixosSystem "x86_64-linux" [ ./hosts/theseus/default.nix ]; + }; + darwinConfigurations = processConfigurations { + daedalus = darwinSystem "aarch64-darwin" [ ./hosts/daedalus/default.nix ]; + }; + + } // utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; in + { + devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + pkgs.nixfmt-rfc-style + pkgs.nil + lefthook inputs.agenix.packages.${system}.agenix ]; + }; + packages = lib.my.mapModules ./packages (p: pkgs.callPackage p { inputs = inputs; }); + }); +} diff --git a/old-conf/hm-modules/cli.nix b/old-conf/hm-modules/cli.nix new file mode 100644 index 00000000..3e84d2aa --- /dev/null +++ b/old-conf/hm-modules/cli.nix @@ -0,0 +1,86 @@ +{ inputs, config, lib, pkgs, ... }: +{ + + home.stateVersion = lib.mkDefault "22.05"; + home.packages = with pkgs; [ + my.scripts + jq + nnn + bat + htop + eza + curl + fd + file + git + neofetch + ripgrep + direnv # needed for lorri + unzip + pv + killall + yt-dlp + aria2 + ]; + home.shellAliases = { + v = "nvim"; + c = "code"; + vim = "nvim"; + gpl = "git pull"; + gp = "git push"; + gpf = "git push --force-with-lease"; + gd = "git diff"; + lg = "lazygit"; + gc = "git commit -v"; + kb = "git commit -m \"\$(curl -s http://whatthecommit.com/index.txt)\""; + gs = "git status -v"; + gfc = "git fetch && git checkout"; + gl = "git log --graph"; + l = "eza -la --git"; + la = "eza -la --git"; + ls = "eza"; + ll = "eza -l --git"; + cat = "bat"; + p = "cd ~/proj"; + ytl = ''yt-dlp -f "bv*+mergeall[vcodec=none]" --audio-multistreams''; + }; + + programs = { + bat = { + enable = true; + config.theme = "gruvbox-dark"; + }; + git = { + enable = true; + lfs.enable = true; + + # Default configs + extraConfig = { + commit.gpgSign = true; + gpg.format = "ssh"; + + user.name = "Lucy Hochkamp"; + user.email = "git@xyno.systems"; + user.signingKey = # TODO: don't hardcode a computer + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID/oMAi5jyQsNohfhcSH2ItisTpBGB0WtYTVxJYKKqhj"; # theseus + + # Set default "git pull" behaviour so it doesn't try to default to + # either "git fetch; git merge" (default) or "git fetch; git rebase". + pull.ff = "only"; + }; + }; + # Htop configurations + htop = { + enable = true; + settings = { + hide_userland_threads = true; + highlight_base_name = true; + shadow_other_users = true; + show_program_path = false; + tree_view = false; + }; + }; + + }; +} + diff --git a/old-conf/hm-modules/eww/eww.scss b/old-conf/hm-modules/eww/eww.scss new file mode 100644 index 00000000..e69de29b diff --git a/old-conf/hm-modules/eww/eww.yuck b/old-conf/hm-modules/eww/eww.yuck new file mode 100644 index 00000000..95c92386 --- /dev/null +++ b/old-conf/hm-modules/eww/eww.yuck @@ -0,0 +1,39 @@ +(defwindow bar + :monitor 0 + :hexpand false + :vexpand false + :geometry (geometry :anchor "top left" :x 0 :y 0 :width "100%") + ; :reserve (struts :distance "10px" :side "top") + (bar)) + +(defwidget bar + (centerbox :orientation "h" + (left) + (center) + (right))) + +(defwidget left [] + :halign "start" + (workspaces) + ) + +(defwidget workspaces [] + (box :class "workspaces" + :orientation "h" + :space-evenly true + :spacing 5 + (button :onclick "wmctrl -s 0" 1) + (button :onclick "wmctrl -s 1" 2) + (button :onclick "wmctrl -s 2" 3) + (button :onclick "wmctrl -s 3" 4) + (button :onclick "wmctrl -s 4" 5) + (button :onclick "wmctrl -s 5" 6) + (button :onclick "wmctrl -s 6" 7) + (button :onclick "wmctrl -s 7" 8) + (button :onclick "wmctrl -s 8" 9))) + +(defwidget center [] + :haligh "center" + (window_name)) + +(defwidget ) diff --git a/old-conf/hm-modules/files.nix b/old-conf/hm-modules/files.nix new file mode 100644 index 00000000..e98cdbe5 --- /dev/null +++ b/old-conf/hm-modules/files.nix @@ -0,0 +1,15 @@ +{ inputs, config, lib, pkgs, ... }: +{ + imports = [ + "${inputs.impermanence}/home-manager.nix" + ]; + home.file = { + # Home nix config. + ".config/nixpkgs/config.nix".text = "{ allowUnfree = true; }"; + ".local/share/pandoc/templates/default.latex".source = "${inputs.pandoc-latex-template}/eisvogel.tex"; + + # empty zshrc to stop zsh-newuser-install from running + ".zshrc".text = ""; + + }; +} diff --git a/old-conf/hm-modules/helix/default.nix b/old-conf/hm-modules/helix/default.nix new file mode 100644 index 00000000..04a3112e --- /dev/null +++ b/old-conf/hm-modules/helix/default.nix @@ -0,0 +1,145 @@ +{ pkgs, config, lib, inputs, ... }: +let + cfg = config.ragon.helix; +in +{ + options.ragon.helix.enable = lib.mkOption { default = false; }; + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + jsonnet-language-server + jsonnet + nixpkgs-fmt + # omnisharp-roslyn + ## ts + # nodePackages_latest.prettier + typescript + dprint + nodePackages_latest.typescript-language-server + nodePackages_latest.vscode-langservers-extracted + ## python + ruff-lsp + # nodePackages_latest.pyright + inputs.roslyn-language-server.packages.${pkgs.system}.roslyn-language-server + netcoredbg + ]; + programs.helix = { + package = inputs.helix.packages.${pkgs.system}.default; + enable = true; + defaultEditor = true; + settings = { + theme = "gruvbox_dark_hard"; + editor = { + line-number = "relative"; + bufferline = "multiple"; + color-modes = true; + cursorline = true; + auto-format = true; + end-of-line-diagnostics = "hint"; + inline-diagnostics = { + cursor-line = "hint"; + }; + lsp = { + display-messages = true; + display-inlay-hints = true; + }; + popup-border = "popup"; + statusline.left = [ + "mode" + "spinner" + "spacer" + "version-control" + "file-name" + "diagnostics" + "read-only-indicator" + "file-modification-indicator" + "spacer" + ]; + + statusline.right = [ + "workspace-diagnostics" + "register" + "position" + "selections" + "file-encoding" + "file-type" + ]; + idle-timeout = 50; + completion-timeout = 100; + indent-guides = { + render = true; + character = "│"; + skip-levels = 1; + }; + soft-wrap = { + enable = true; + }; + whitespace = { + render = { + space = "none"; + tab = "all"; + newline = "none"; + }; + characters = { + nbsp = "·"; + tab = "→"; + }; + }; + + }; + keys = { + normal = { + space."=" = ":fmt"; + + # smart tab++ + tab = "move_parent_node_end"; + S-tab = "move_parent_node_start"; + }; + insert = { + # smart tab ++ + S-tab = "move_parent_node_start"; + }; + select = { + # smart tab++ + tab = "extend_parent_node_end"; + S-tab = "extend_parent_node_start"; + }; + }; + + + }; + languages = { + language-server.pyright.config.python.analysis.typeCheckingMode = "basic"; + language-server.ruff = { + command = "ruff-lsp"; + config.settings.args = [ "--ignore" "E501" ]; + }; + language-server.roslyn = { + command = "roslyn-language-server"; + }; + language = lib.flatten [ + (map + (x: { + name = x; + language-servers = [ "typescript-language-server" "eslint" ]; + #formatter = { command = "dprint"; args = [ "fmt" "--stdin" x ]; }; + # formatter = { command = "prettier"; args = [ "--parser" "typescript" ]; }; + }) [ "typescript" "javascript" "jsx" "tsx" ]) + { + name = "nix"; + formatter = { command = "nixpkgs-fmt"; }; + } + { + name = "python"; + language-servers = [ "pyright" "ruff" ]; + } + { + name = "c-sharp"; + language-servers = [ "roslyn" ]; + formatter = { command = "dotnet"; args = [ "csharpier" ]; }; + + } + ]; + }; + }; + }; +} diff --git a/old-conf/hm-modules/nushell/default.nix b/old-conf/hm-modules/nushell/default.nix new file mode 100644 index 00000000..04d42eda --- /dev/null +++ b/old-conf/hm-modules/nushell/default.nix @@ -0,0 +1,346 @@ +{ pkgs, config, lib, inputs, ... }: +let + cfg = config.ragon.nushell; + aliasesJson = pkgs.writeText "shell-aliases.json" (builtins.toJSON config.home.shellAliases); +in +{ + options.ragon.nushell.enable = lib.mkOption { default = false; }; + options.ragon.nushell.isNixOS = lib.mkOption { default = false; }; + config = lib.mkIf cfg.enable { + programs.direnv = { + enable = true; + enableNushellIntegration = true; + }; + programs.nushell = { + enable = true; + extraConfig = '' + $env.CARAPACE_BRIDGES = 'zsh,fish,bash,inshellisense' + let carapace_completer = {|spans: list| + carapace $spans.0 nushell ...$spans + | from json + | if ($in | default [] | where value =~ '^-.*ERR$' | is-empty) { $in } else { null } + } + let external_completer = {|spans| + let expanded_alias = scope aliases + | where name == $spans.0 + | get -i 0.expansion + + let spans = if $expanded_alias != null { + $spans + | skip 1 + | prepend ($expanded_alias | split row ' ' | take 1) + } else { + $spans + } + + match $spans.0 { + # carapace completions are incorrect for nu + # nu => $fish_completer + # fish completes commits and branch names in a nicer way + # git => $fish_completer + # carapace doesn't have completions for asdf + # asdf => $fish_completer + # use zoxide completions for zoxide commands + # __zoxide_z | __zoxide_zi => $zoxide_completer + _ => $carapace_completer + } | do $in $spans + } + $env.config = { + edit_mode: vi + show_banner: false, + completions: { + case_sensitive: false # case-sensitive completions + quick: true # set to false to prevent auto-selecting completions + partial: true # set to false to prevent partial filling of the prompt + algorithm: "fuzzy" # prefix or fuzzy + external: { + # set to false to prevent nushell looking into $env.PATH to find more suggestions + enable: true + # set to lower can improve completion performance at the cost of omitting some options + max_results: 100 + completer: $external_completer # check 'carapace_completer' + } + } + } + $env.EDITOR = "hx" + $env.VISUAL = "hx" + # alias no = open + # alias open = ^open + alias l = ls -al + alias ll = ls -l + alias ga = git add + alias gaa = git add -A + alias gd = git diff + alias gc = git commit + alias gp = git push + alias gpl = git pull + alias ytl = yt-dlp -f "bv*+mergeall[vcodec=none]" --audio-multistreams + alias conf = cd ~/proj/nixos-config + ${(if !cfg.isNixOS then '' + + $env.NIX_REMOTE = "daemon" + $env.NIX_USER_PROFILE_DIR = $"/nix/var/nix/profiles/per-user/($env.USER)" + $env.NIX_PROFILES = $"/nix/var/nix/profiles/default:($env.HOME)/.nix-profile" + $env.NIX_SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt" + $env.NIX_PATH = "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixpkgs:/nix/var/nix/profiles/per-user/root/channels" + $env.PATH = ($env.PATH | + split row (char esep) | + append /usr/bin/env | + append $"($env.HOME)/.nix-profile/bin" | + append "/nix/var/nix/profiles/default/bin" | + append $"/etc/profiles/per-user/($env.USER)/bin" | + append "/run/current-system/sw/bin" | + append "/opt/homebrew/bin" | + append $"($env.HOME)/.cargo/bin" | + append $"($env.HOME)/.local/bin" + ) + '' else "")} + ''; + shellAliases = { + vi = "hx"; + vim = "hx"; + nano = "hx"; + }; + }; + programs.carapace.enable = true; + programs.carapace.enableNushellIntegration = true; + + programs.starship = { + enable = true; + settings = { + "add_newline" = false; + # "format" = "($direnv$nix_shell$container$fill$git_metrics\n)$cmd_duration$hostname$localip$shlvl$shell$env_var$jobs$username$directory "; + "format" = "$cmd_duration$status$hostname$localip$shlvl$shell$env_var$jobs$username$directory"; + "right_format" = "$nix_shell$git_branch$git_commit$git_state$git_status$package$custom$os$battery$time"; + aws.disabled = true; + status.disabled = false; + battery.disabled = true; + "buf" = { + "format" = " [buf](italic) [$symbol $version $buf_version]($style)"; + # "symbol" = "■ "; + }; + "c" = { + "format" = " [$symbol($version(-$name))]($style)"; + # "symbol" = "ℂ "; + }; + "character" = { + "error_symbol" = "[:](italic purple)"; + "format" = "$symbol "; + "success_symbol" = "[:](bold italic bright-yellow)"; + "vimcmd_replace_one_symbol" = "r"; + "vimcmd_replace_symbol" = "R"; + "vimcmd_symbol" = "[>](italic dimmed green)"; + "vimcmd_visual_symbol" = "SEL"; + }; + "cmd_duration" = { + "format" = "[$duration](italic white) "; + }; + "conda" = { + "format" = " conda [$symbol$environment]($style)"; + # "symbol" = "◯ "; + }; + "continuation_prompt" = "[▸▹ ](dimmed white)"; + "dart" = { + "format" = " dart [$symbol($version )]($style)"; + # "symbol" = "◁◅ "; + }; + "deno" = { + "format" = " [deno](italic) [∫ $version](green bold)"; + "version_format" = "\${raw}"; + }; + "directory" = { + "format" = "[$path]($style)[$read_only]($read_only_style)"; + "home_symbol" = "~"; + "read_only" = " (ro) "; + "repo_root_format" = "[$before_root_path]($before_repo_root_style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style)"; + "repo_root_style" = "bold blue"; + "style" = "italic blue"; + "truncation_length" = 50; + "truncation_symbol" = "⋯"; + "use_os_path_sep" = true; + }; + "docker_context" = { + "format" = " docker [$symbol$context]($style)"; + # "symbol" = "◧ "; + }; + direnv = { + disabled = false; + }; + "elixir" = { + "format" = " exs [$symbol $version OTP $otp_version ]($style)"; + # "symbol" = "△ "; + }; + "elm" = { + "format" = " elm [$symbol($version )]($style)"; + # "symbol" = "◩ "; + }; + "env_var" = { + "VIMSHELL" = { + "format" = "[$env_value]($style)"; + "style" = "green italic"; + }; + }; + "fill" = { + "symbol" = " "; + }; + "git_branch" = { + "format" = " [$branch(:$remote_branch)]($style)"; + "ignore_branches" = [ + "main" + "master" + ]; + "only_attached" = true; + "style" = "italic bright-blue"; + "symbol" = "(bold italic bright-blue)"; + # "symbol" = "[△](bold italic bright-blue)"; + "truncation_length" = 13; + "truncation_symbol" = "⋯"; + }; + "git_metrics" = { + "added_style" = "italic dimmed green"; + "deleted_style" = "italic dimmed red"; + "disabled" = false; + "format" = "([▴$added]($added_style))([▿$deleted]($deleted_style))"; + "ignore_submodules" = true; + }; + "git_status" = { + "ahead" = "[▴│[\${count}](bold white)│](italic green)"; + "behind" = "[▿│[\${count}](bold white)│](italic red)"; + "conflicted" = "[◪◦](italic bright-magenta)"; + "deleted" = "[✕](italic red)"; + "diverged" = "[◇ ▴┤[\${ahead_count}](regular white)│▿┤[\${behind_count}](regular white)│](italic bright-magenta)"; + "format" = "([⎪$ahead_behind$staged$modified$untracked$renamed$deleted$conflicted$stashed⎥]($style))"; + "modified" = "[●◦](italic yellow)"; + "renamed" = "[◎◦](italic bright-blue)"; + "staged" = "[▪┤[$count](bold white)│](italic bright-cyan)"; + "stashed" = "[◃◈](italic white)"; + "style" = "bold italic bright-blue"; + "untracked" = "[◌◦](italic bright-yellow)"; + }; + "golang" = { + "format" = " go [$symbol($version )]($style)"; + # "symbol" = "∩ "; + }; + "haskell" = { + "format" = " hs [$symbol($version )]($style)"; + # "symbol" = "❯λ "; + }; + "java" = { + "format" = " java [\${symbol}(\${version} )]($style)"; + # "symbol" = "∪ "; + }; + "jobs" = { + "format" = "[$symbol$number]($style) "; + "style" = "white"; + "symbol" = "[▶](blue italic)"; + }; + "julia" = { + "format" = " jl [$symbol($version )]($style)"; + "symbol" = "◎ "; + }; + "localip" = { + "disabled" = false; + "format" = " ◯[$localipv4](bold magenta)"; + "ssh_only" = true; + }; + "lua" = { + "format" = " [lua](italic) [\${symbol}\${version}]($style)"; + "style" = "bold bright-yellow"; + "symbol" = "⨀ "; + "version_format" = "\${raw}"; + }; + "memory_usage" = { + "format" = " mem [\${ram}( \${swap})]($style)"; + "symbol" = "▪▫▪ "; + }; + "nim" = { + "format" = " nim [$symbol($version )]($style)"; + "symbol" = "▴▲▴ "; + }; + "nix_shell" = { + "format" = "[$symbol]($style) [$name](italic dimmed white)"; + "impure_msg" = "[impure](bold dimmed red)"; + "pure_msg" = "[pure](bold dimmed green)"; + "style" = "bold italic dimmed blue"; + "symbol" = "󱄅"; + "unknown_msg" = "[unknown](bold dimmed ellow)"; + }; + "nodejs" = { + "detect_extensions" = [ + ]; + "detect_files" = [ + "package-lock.json" + "yarn.lock" + "pnpm-lock.yaml" + ]; + "detect_folders" = [ + "node_modules" + ]; + "format" = " [node](italic) [($version)](bold bright-green)"; + "version_format" = "\${raw}"; + }; + "package" = { + "format" = " [pkg](italic dimmed) [$symbol$version]($style)"; + "style" = "dimmed yellow italic bold"; + # "symbol" = "◨ "; + "version_format" = "\${raw}"; + }; + "python" = { + "format" = " [py](italic) [\${symbol}\${version}]($style)"; + "style" = "bold bright-yellow"; + # "symbol" = "[⌉](bold bright-blue)⌊ "; + "version_format" = "\${raw}"; + }; + "ruby" = { + disabled = true; + "format" = " [rb](italic) [\${symbol}\${version}]($style)"; + "style" = "bold red"; + # "symbol" = "◆ "; + "version_format" = "\${raw}"; + }; + "rust" = { + "format" = " [rs](italic) [$symbol$version]($style)"; + "style" = "bold red"; + # "symbol" = "⊃ "; + "version_format" = "\${raw}"; + }; + "spack" = { + "format" = " spack [$symbol$environment]($style)"; + # "symbol" = "◇ "; + }; + "sudo" = { + "disabled" = true; + "format" = "[$symbol]($style)"; + "style" = "bold italic bright-purple"; + "symbol" = "sudo"; + }; + "swift" = { + "format" = " [sw](italic) [\${symbol}\${version}]($style)"; + "style" = "bold bright-red"; + # "symbol" = "◁ "; + "version_format" = "\${raw}"; + }; + "time" = { + "disabled" = true; + "format" = "[ $time]($style)"; + "style" = "italic dimmed white"; + "time_format" = "%R"; + "utc_time_offset" = "local"; + }; + "username" = { + "disabled" = false; + "format" = "[$user]($style) "; + "show_always" = false; + "style_root" = "purple bold italic"; + "style_user" = "bright-yellow bold italic"; + }; + }; + }; + programs.vscode.userSettings."terminal.integrated.profiles.osx" = { + nushell = { + path = "${pkgs.nushell}/bin/nushell"; + }; + }; + programs.vscode.userSettings."terminal.integrated.defaultProfile.osx" = "nushell"; + }; +} diff --git a/old-conf/hm-modules/nvim/config/lua/.luarc.json b/old-conf/hm-modules/nvim/config/lua/.luarc.json new file mode 100644 index 00000000..e3a8d25e --- /dev/null +++ b/old-conf/hm-modules/nvim/config/lua/.luarc.json @@ -0,0 +1,137 @@ +{ + "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", + "Lua.workspace.checkThirdParty": false, + "Lua.workspace.library": [ + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/cmp-buffer", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/cmp-cmdline", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/cmp-nvim-lsp", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/cmp-path", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/cmp_luasnip", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/gruvbox", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/luasnip", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nnn-nvim", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/noice-nvim", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/notify-nvim", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nui.nvim", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-cmp", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-lspconfig", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-bash-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-beancount-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-bibtex-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-c-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-clojure-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-cmake-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-comment-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-commonlisp-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-cpp-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-css-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-cuda-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-c_sharp-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-dart-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-devicetree-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-dockerfile-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-dot-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-eex-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-elisp-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-elixir-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-elm-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-embedded_template-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-erlang-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-fennel-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-fish-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-fortran-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-gdscript-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-glimmer-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-glsl-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-go-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-godot_resource-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-gomod-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-gowork-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-graphql-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-haskell-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-hcl-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-heex-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-hjson-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-html-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-http-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-janet_simple-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-java-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-javascript-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-jsdoc-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-json-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-json5-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-jsonnet-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-julia-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-kotlin-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-latex-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-ledger-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-llvm-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-lua-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-make-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-markdown-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-markdown_inline-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-nickel-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-nix-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-norg-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-ocaml-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-ocaml_interface-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-org-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-perl-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-pgn-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-php-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-pioasm-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-prisma-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-pug-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-python-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-ql-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-ql_dbscheme-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-query-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-r-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-regex-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-rego-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-rst-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-ruby-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-rust-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-scala-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-scheme-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-scss-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-smithy-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-sparql-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-sql-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-supercollider-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-surface-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-svelte-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-tiger-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-tlaplus-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-toml-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-tsq-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-tsx-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-turtle-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-typescript-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-verilog-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-vim-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-vue-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-yaml-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-yang-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter-zig-grammar", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/plenary.nvim", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/rust-tools.nvim", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/telescope.nvim", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/toggleterm.nvim", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/vim-tmux-navigator", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/vimspector", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/__python3_dependencies", + "/Users/ragon/.config/nvim", + "/Users/ragon/.local/share/nvim/site", + "/nix/store/j5myw4djaj1hmi5r8p5hxaynhingy8k5-neovim-unwrapped-0ecb4d7/share/nvim/runtime", + "/nix/store/j5myw4djaj1hmi5r8p5hxaynhingy8k5-neovim-unwrapped-0ecb4d7/lib/nvim", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/cmp-buffer/after", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/cmp-cmdline/after", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/cmp-nvim-lsp/after", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/cmp-path/after", + "/nix/store/y7fc4px5ijgv7wpls3r0xiw2hd600q7n-vim-pack-dir/pack/myNeovimPackages/start/cmp_luasnip/after", + "${3rd}/love2d/library" + ] +} \ No newline at end of file diff --git a/old-conf/hm-modules/nvim/config/lua/dark_notify.lua b/old-conf/hm-modules/nvim/config/lua/dark_notify.lua new file mode 100644 index 00000000..380ca195 --- /dev/null +++ b/old-conf/hm-modules/nvim/config/lua/dark_notify.lua @@ -0,0 +1,210 @@ +-- http://lua-users.org/wiki/StringTrim +function trim6(s) + return s:match '^()%s*$' and '' or s:match '^%s*(.*%S)' +end + +-- from norcalli/nvim_utils +function nvim_create_augroups(definitions) + for group_name, definition in pairs(definitions) do + vim.api.nvim_command('augroup ' .. group_name) + vim.api.nvim_command('autocmd!') + for _, def in ipairs(definition) do + -- if type(def) == 'table' and type(def[#def]) == 'function' then + -- def[#def] = lua_callback(def[#def]) + -- end + local command = table.concat(vim.tbl_flatten { 'autocmd', def }, ' ') + vim.api.nvim_command(command) + end + vim.api.nvim_command('augroup END') + end +end + +local state = { + initialized = false, + pid = -1, + stdin_handle = nil, + config = {}, +} + +local M = {} + +local function ensure_config() + if state.config == nil then + state.config = {} + end +end + +local function get_config() + ensure_config() + return state.config +end + +local function edit_config(fn) + ensure_config() + fn(state.config) +end + +local function apply_mode(mode) + local config = get_config() + local sel = config.schemes[mode] or {} + local colorscheme = sel.colorscheme or nil + local bg = sel.background or mode + local lualineTheme = sel.lualine or nil + + vim.api.nvim_command('set background=' .. bg) + if colorscheme ~= nil then + vim.api.nvim_command('colorscheme ' .. colorscheme) + end + + require('lualine').setup { options = { theme = lualineTheme } } + + if config.onchange ~= nil then + config.onchange(mode) + end + + state.current_mode = mode +end + +function M.update() + local mode = vim.fn.system('dark-notify --exit') + mode = trim6(mode) + apply_mode(mode) +end + +function M.set_mode(mode) + mode = trim6(mode) + if not (mode == "light" or mode == "dark") then + error("mode must be either \"light\" or \"dark\"" .. mode) + return + end + apply_mode(mode) +end + +function M.toggle() + local mode = state.current_mode + if mode == "light" then + mode = "dark" + elseif mode == "dark" then + mode = "light" + else + M.update() + return + end + apply_mode(mode) +end + +local function init_dark_notify() + -- Docs on this vim.loop stuff: https://github.com/luvit/luv + + local handle, pid + local stdout = vim.loop.new_pipe(false) + local stdin = vim.loop.new_pipe(false) + + local function onexit() + vim.loop.close(handle, vim.schedule_wrap(function() + vim.loop.shutdown(stdout) + vim.loop.shutdown(stdin) + state.initialized = false + state.pid = nil + state.stdin_handle = nil + end)) + end + + local function onread(err, chunk) + assert(not err, err) + if (chunk) then + local mode = trim6(chunk) + if not (mode == "light" or mode == "dark") then + error("dark-notify output not expected: " .. chunk) + return + end + apply_mode(mode) + end + end + + handle, pid = vim.loop.spawn( + "dark-notify", + { stdio = { stdin, stdout, nil } }, + vim.schedule_wrap(onexit) + ) + + vim.loop.read_start(stdout, vim.schedule_wrap(onread)) + + state.initialized = true + state.pid = pid + state.stdin_handle = stdin + + -- For whatever reason, nvim isn't killing child processes properly on exit + -- So if you don't do this, you get zombie dark-notify processes hanging about. + nvim_create_augroups({ + DarkNotifyKillChildProcess = { + { "VimLeave", "*", "lua require('dark_notify').stop()" }, + } + }) +end + +-- For whatever reason, killing the child process doesn't work, at all. So we +-- send it the line "quit\n", and it kills itself. +function M.stop() + if state.stdin_handle == nil then + return + end + vim.loop.write(state.stdin_handle, "quit\n") + -- process quits itself, calls onexit + -- config gets edited from there +end + +function M.configure(config) + if config == nil then + return + end + local lightline_loaders = config.lightline_loaders or {} + local schemes = config.schemes or {} + local onchange = config.onchange + + for _, mode in pairs({ "light", "dark" }) do + if type(schemes[mode]) == "string" then + schemes[mode] = { colorscheme = schemes[mode] } + end + end + + edit_config(function(conf) + conf.lightline_loaders = lightline_loaders + conf.schemes = schemes + conf.onchange = onchange + end) +end + +function M.run(config) + if config ~= nil or get_config().schemes == nil then + -- if it's nil, it's a first run, so configure with no options. + config = config or {} + M.configure(config) + end + + local config = get_config() + if not config.initialized then + -- first run on startup, also happens to apply current mode + init_dark_notify() + elseif state.current_mode ~= nil then + -- we have run it before, but we're updating the settings + -- so don't reset to system, but do apply changed config. + local mode = state.current_mode + apply_mode(mode) + end +end + +return M + +-- init.lua or init.vim in a lua < /tmp/curvimserver') + endfunction +]] diff --git a/old-conf/hm-modules/nvim/config/lua/keybindings.lua b/old-conf/hm-modules/nvim/config/lua/keybindings.lua new file mode 100644 index 00000000..6fc35d79 --- /dev/null +++ b/old-conf/hm-modules/nvim/config/lua/keybindings.lua @@ -0,0 +1,68 @@ +local map = require('utils').map + +-- split binds +map { 'n', '', 'vertical resize -5', noremap = true, silent = true} +map { 'n', '', 'vertical resize +5', noremap = true, silent = true} +map { 'n', '', 'resize -5', noremap = true, silent = true} +map { 'n', '', 'resize +5', noremap = true, silent = true} +map { 'n', '', ' =', noremap = true, silent = true} + +map { 'n', '', 'vsp', noremap = true, silent = true} +map { 'n', '', 'split', noremap = true, silent = true} + +map { 'n', '', 'h', noremap = true, silent = true} +map { 'n', '', 'j', noremap = true, silent = true} +map { 'n', '', 'k', noremap = true, silent = true} +map { 'n', '', 'l', noremap = true, silent = true} + +-- telescope +map { 'n', 'b', 'Telescope buffers', noremap = false, silent = true} +--map { 'n', 'ff', 'Telescope find_files', noremap = false, silent = true} +map { 'n', 's', 'Telescope live_grep', noremap = false, silent = true} +map { 'n', '', 'Telescope registers', noremap = false, silent = true} +--map { 'n', 'pp', 'lua require\'telescope\'.extensions.projects.projects{}', noremap = false, silent = true} +-- tab binds +map { 'n', '', 'tabnew', noremap = false, silent = true} +map { 'n', '', 'tabprevious', noremap = false, silent = true} +map { 'n', '', 'tabnext', noremap = false, silent = true} + +-- copy paste +map { 'v', '', '"+y', noremap = true, silent = true} +--map { 'n', '', '"+P', noremap = false, silent = true} + +-- sudo :w +map { 'c', 'w!!', 'w !sudo tee > /dev/null %', noremap = false, silent = false} + +-- vimspector +map { 'n', 'di', 'VimspectorBalloonEval', noremap = false, silent = false } +map { 'x', 'di', 'VimspectorBalloonEval', noremap = false, silent = false } + +-- terminal +-- map { 'n', 't', ':term', noremap = false, silent = true} +-- map { 't', '', '', noremap = true, silent = true} + +-- plugins - nnn +map { 'n', '', ':NnnPicker %:p:h', noremap = true, silent = true} +map { 'n', '', ':NnnExplorer %:p:h', noremap = true, silent = true} + +-- plugins - terminal +map {"n", "gg", "lua _lazygit_toggle()", {noremap = true, silent = true}} +map {"n", "gl", "lua _glab_toggle()", {noremap = true, silent = true}} +map {"n", "gh", "lua _ghub_toggle()", {noremap = true, silent = true}} + +-- diagnostic +map {"n", "e", "lua require\'telescope.builtin\'.lsp_diagnostics{}", { noremap = true, silent = true}} +map {"n", "q", "lua vim.diagnostic.setloclist()", { noremap = true, silent = true}} +map {"n", "]g", "lua vim.diagnostic.goto_next()", { noremap = true, silent = true}} +map {"n", "[g", "lua vim.diagnostic.goto_prev()", { noremap = true, silent = true}} +-- dap +map {"n", "db", "lua require'dap'.toggle_breakpoint()", { noremap = true, silent = true}} +map {"n", "du", "lua require'dapui'.toggle()", { noremap = true, silent = true}} +map {"n", "dc", "lua require'dap'.continue()", { noremap = true, silent = true}} +map {"n", "dr", "lua require'dap'.repl.open()", { noremap = true, silent = true}} +map {"n", "di", "lua require'dap'.step_into()", { noremap = true, silent = true}} +-- cp +map {"n", "c", "Copilot panel", { noremap = true, silent = true}} +vim.cmd [[ + imap