diff options
Diffstat (limited to '')
202 files changed, 5029 insertions, 5429 deletions
diff --git a/flake.lock b/flake.lock index 1c881b0f..6b1f16fb 100644 --- a/flake.lock +++ b/flake.lock @@ -29,6 +29,32 @@ "type": "github" } }, + "arkenfox-nixos": { + "inputs": { + "flake-compat": [ + "flake-compat" + ], + "nixpkgs": [ + "nixpkgs" + ], + "pre-commit": [ + "pre-commit-hooks" + ] + }, + "locked": { + "lastModified": 1744011341, + "narHash": "sha256-ZwyAdfXgfigchDLMZ/UqSjLc5YKk2xnchGHuWaNfqmQ=", + "owner": "dwarfmaster", + "repo": "arkenfox-nixos", + "rev": "57eefe49b80ea5e02f42199db531292de34a4350", + "type": "github" + }, + "original": { + "owner": "dwarfmaster", + "repo": "arkenfox-nixos", + "type": "github" + } + }, "beautysh": { "inputs": { "nixpkgs": [ @@ -57,11 +83,11 @@ }, "crane": { "locked": { - "lastModified": 1742394900, - "narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=", + "lastModified": 1743908961, + "narHash": "sha256-e1idZdpnnHWuosI3KsBgAgrhMR05T2oqskXCmNzGPq0=", "owner": "ipetkov", "repo": "crane", - "rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd", + "rev": "80ceeec0dc94ef967c371dcdc56adb280328f591", "type": "github" }, "original": { @@ -97,11 +123,11 @@ ] }, "locked": { - "lastModified": 1741786315, - "narHash": "sha256-VT65AE2syHVj6v/DGB496bqBnu1PXrrzwlw07/Zpllc=", + "lastModified": 1744145203, + "narHash": "sha256-I2oILRiJ6G+BOSjY+0dGrTPe080L3pbKpc+gCV3Nmyk=", "owner": "nix-community", "repo": "disko", - "rev": "0d8c6ad4a43906d14abd5c60e0ffe7b587b213de", + "rev": "76c0a6dba345490508f36c1aa3c7ba5b6b460989", "type": "github" }, "original": { @@ -133,11 +159,11 @@ ] }, "locked": { - "lastModified": 1741352980, - "narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=", + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", "type": "github" }, "original": { @@ -265,11 +291,11 @@ ] }, "locked": { - "lastModified": 1743136572, - "narHash": "sha256-uwaVrKgi6g1TUq56247j6QvvFtYHloCkjCrEpGBvV54=", + "lastModified": 1744208565, + "narHash": "sha256-vG3JJOar/r8ognz7wuwMtOJ8Knu1MMlOzHB1N6R2MbY=", "owner": "nix-community", "repo": "home-manager", - "rev": "1efd2503172016a6742c87b47b43ca2c8145607d", + "rev": "542efdf2dfac351498f534eb71671525b9bd45ed", "type": "github" }, "original": { @@ -379,11 +405,11 @@ ] }, "locked": { - "lastModified": 1743221873, - "narHash": "sha256-i8VPNm4UBsC3Ni6VwjojVJvCpS9GZ4vPrpFRtCGJzBs=", + "lastModified": 1743496612, + "narHash": "sha256-emPWa5lmKbnyuj8c1mSJUkzJNT+iJoU9GMcXwjp2oVM=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "53d0f0ed11487a4476741fde757d0feabef4cc4e", + "rev": "73d59580d01e9b9f957ba749f336a272869c42dd", "type": "github" }, "original": { @@ -420,11 +446,11 @@ ] }, "locked": { - "lastModified": 1742701275, - "narHash": "sha256-AulwPVrS9859t+eJ61v24wH/nfBEIDSXYxlRo3fL/SA=", + "lastModified": 1743911143, + "narHash": "sha256-4j4JPwr0TXHH4ZyorXN5yIcmqIQr0WYacsuPA4ktONo=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "36dc43cb50d5d20f90a28d53abb33a32b0a2aae6", + "rev": "a36f6a7148aec2c77d78e4466215cceb2f5f4bfb", "type": "github" }, "original": { @@ -446,11 +472,11 @@ ] }, "locked": { - "lastModified": 1743157969, - "narHash": "sha256-ldlSyVKNaXL7ys7Jr7mLhlpGDE4VPVcWmV7Odupn5TY=", + "lastModified": 1744200902, + "narHash": "sha256-BqTLjxT1C1XfREDBQSxPrfKI9DBpZHBVLHzfXZs+h8M=", "owner": "nix-community", "repo": "nixvim", - "rev": "95573411bc9be155a93b0f15d2bad62c6b43b3cc", + "rev": "51203927e395535c4a427295efed4e1b2ef8349b", "type": "github" }, "original": { @@ -484,11 +510,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1743095683, - "narHash": "sha256-gWd4urRoLRe8GLVC/3rYRae1h+xfQzt09xOfb0PaHSk=", + "lastModified": 1744098102, + "narHash": "sha256-tzCdyIJj9AjysC3OuKA+tMD/kDEDAF9mICPDU7ix0JA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5e5402ecbcb27af32284d4a62553c019a3a49ea6", + "rev": "c8cd81426f45942bb2906d5ed2fe21d2f19d95b7", "type": "github" }, "original": { @@ -498,29 +524,13 @@ "type": "github" } }, - "nixpkgs-lf": { - "locked": { - "lastModified": 1743256538, - "narHash": "sha256-fG19N9PvPtsV3UUwT7lauNJ7tE4ZB/EPKwwENrqqKCQ=", - "owner": "bpeetz", - "repo": "nixpkgs", - "rev": "e315c0e09beaf4daf4041d402067cbdbc84870d9", - "type": "github" - }, - "original": { - "owner": "bpeetz", - "ref": "init-lf.nvim", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-lib": { "locked": { - "lastModified": 1742692082, - "narHash": "sha256-s3XOULQj7BVO7myY5V4Sob0tRZ7nRpwEOIzXg/MkD/Q=", + "lastModified": 1743901752, + "narHash": "sha256-WKv9xikcdKm0VWOnhttJ6dAxorQJDjJCfIsjrP00ip4=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "a09310bc940f245e51b1ffea68731244ca38f2bd", + "rev": "2bb0af21f02e8c61a5dded3832b92db47d6a0411", "type": "github" }, "original": { @@ -531,11 +541,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1742937945, - "narHash": "sha256-lWc+79eZRyvHp/SqMhHTMzZVhpxkRvthsP1Qx6UCq0E=", + "lastModified": 1743975612, + "narHash": "sha256-o4FjFOUmjSRMK7dn0TFdAT0RRWUWD+WsspPHa+qEQT8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d02d88f8de5b882ccdde0465d8fa2db3aa1169f7", + "rev": "a880f49904d68b5e53338d1e8c7bf80f59903928", "type": "github" }, "original": { @@ -556,11 +566,11 @@ ] }, "locked": { - "lastModified": 1743201766, - "narHash": "sha256-bb/dqoIjtIWtJRzASOe8g4m8W2jUIWtuoGPXdNjM/Tk=", + "lastModified": 1743683223, + "narHash": "sha256-LdXtHFvhEC3S64dphap1pkkzwjErbW65eH1VRerCUT0=", "owner": "NuschtOS", "repo": "search", - "rev": "2651dbfad93d6ef66c440cbbf23238938b187bde", + "rev": "56a49ffef2908dad1e9a8adef1f18802bc760962", "type": "github" }, "original": { @@ -586,11 +596,11 @@ ] }, "locked": { - "lastModified": 1742397518, - "narHash": "sha256-nzgO/ZCSBzWjbMkYDxG+yl9Z2eGbCgQu06Oku3ir5D4=", + "lastModified": 1743690424, + "narHash": "sha256-cX98bUuKuihOaRp8dNV1Mq7u6/CQZWTPth2IJPATBXc=", "owner": "nix-community", "repo": "poetry2nix", - "rev": "b9a98080beff0903a5e5fe431f42cde1e3e50d6b", + "rev": "ce2369db77f45688172384bbeb962bc6c2ea6f94", "type": "github" }, "original": { @@ -687,41 +697,10 @@ "type": "github" } }, - "river_init_lesser": { - "inputs": { - "crane": [ - "crane" - ], - "flake-compat": [ - "flake-compat" - ], - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": [ - "rust-overlay" - ] - }, - "locked": { - "lastModified": 1683353540, - "narHash": "sha256-tOf9gfFzWjZxIF/2BAU64aH55xfic6SapKsFqVn6U/8=", - "ref": "refs/heads/prime", - "rev": "aedd2bf8863802443d7b6df94646c239d67b2796", - "revCount": 10, - "type": "git", - "url": "https://codeberg.org/soispha/river_keymap_init.git" - }, - "original": { - "type": "git", - "url": "https://codeberg.org/soispha/river_keymap_init.git" - } - }, "root": { "inputs": { "agenix": "agenix", + "arkenfox-nixos": "arkenfox-nixos", "beautysh": "beautysh", "crane": "crane", "devshell": "devshell", @@ -742,7 +721,6 @@ "nixVim": "nixVim", "nixos-generators": "nixos-generators", "nixpkgs": "nixpkgs", - "nixpkgs-lf": "nixpkgs-lf", "nixpkgs-lib": "nixpkgs-lib", "nixpkgs-stable": "nixpkgs-stable", "nuschtosSearch": "nuschtosSearch", @@ -750,14 +728,12 @@ "pre-commit-hooks": "pre-commit-hooks", "qmk_firmware": "qmk_firmware", "ragenix": "ragenix", - "river_init_lesser": "river_init_lesser", "rust-overlay": "rust-overlay", "serverphone": "serverphone", "shell_library": "shell_library", "systems": "systems", "templates": "templates", - "treefmt-nix": "treefmt-nix", - "user_js": "user_js" + "treefmt-nix": "treefmt-nix" } }, "rust-overlay": { @@ -767,11 +743,11 @@ ] }, "locked": { - "lastModified": 1743215516, - "narHash": "sha256-52qbrkG65U1hyrQWltgHTgH4nm0SJL+9TWv2UDCEPNI=", + "lastModified": 1744166053, + "narHash": "sha256-mpI7OzFwp+fUeDtZYQbVZ2YmtxTN2UNrrOwbYD27xKU=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "524463199fdee49338006b049bc376b965a2cfed", + "rev": "896158be1835589db6f42f45ef0a49b8b492cc66", "type": "github" }, "original": { @@ -895,11 +871,11 @@ ] }, "locked": { - "lastModified": 1743081648, - "narHash": "sha256-WRAylyYptt6OX5eCEBWyTwOEqEtD6zt33rlUkr6u3cE=", + "lastModified": 1743748085, + "narHash": "sha256-uhjnlaVTWo5iD3LXics1rp9gaKgDRQj6660+gbUU3cE=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "29a3d7b768c70addce17af0869f6e2bd8f5be4b7", + "rev": "815e4121d6a5d504c0f96e5be2dd7f871e4fd99d", "type": "github" }, "original": { @@ -907,22 +883,6 @@ "repo": "treefmt-nix", "type": "github" } - }, - "user_js": { - "flake": false, - "locked": { - "lastModified": 1741229528, - "narHash": "sha256-21DoV4SMueMFRHMsvfsPfQIOtsvRWNY06rE4gB7xFnc=", - "owner": "arkenfox", - "repo": "user.js", - "rev": "3d76c74c80485931425464fec0e59d6cb461677a", - "type": "github" - }, - "original": { - "owner": "arkenfox", - "repo": "user.js", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index c9586fb8..0fa1c1e0 100644 --- a/flake.nix +++ b/flake.nix @@ -10,8 +10,6 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # open nixpkgs prs - # FIXME: Close these PRs <2024-09-07> - nixpkgs-lf.url = "github:bpeetz/nixpkgs/init-lf.nvim"; library = { url = "git+https://git.foss-syndicate.org/vhack.eu/nix-library?ref=prime"; @@ -203,6 +201,14 @@ nixpkgs.follows = "nixpkgs"; }; }; + arkenfox-nixos = { + url = "github:dwarfmaster/arkenfox-nixos"; + inputs = { + nixpkgs.follows = "nixpkgs"; + pre-commit.follows = "pre-commit-hooks"; + flake-compat.follows = "flake-compat"; + }; + }; # my configs templates = { @@ -225,16 +231,6 @@ flake_version_update.follows = "flake_version_update"; }; }; - river_init_lesser = { - url = "git+https://codeberg.org/soispha/river_keymap_init.git"; - inputs = { - nixpkgs.follows = "nixpkgs"; - crane.follows = "crane"; - flake-utils.follows = "flake-utils"; - rust-overlay.follows = "rust-overlay"; - flake-compat.follows = "flake-compat"; - }; - }; qmk_firmware = { url = "git+https://git.foss-syndicate.org/bpeetz/qmk_layout.git?ref=prime"; inputs = { @@ -246,10 +242,6 @@ }; # external resources - user_js = { - url = "github:arkenfox/user.js"; - flake = false; - }; treefmt-nix = { url = "github:numtide/treefmt-nix"; inputs = { @@ -263,7 +255,6 @@ self, nixpkgs, nixpkgs-stable, - nixpkgs-lf, library, # modules home-manager, @@ -276,13 +267,12 @@ lanzaboote, nixVim, nix-index-database, + arkenfox-nixos, # external dependencies - user_js, treefmt-nix, templates, # my binaries shell_library, - river_init_lesser, qmk_firmware, ... }: let @@ -301,9 +291,6 @@ nixpkgs_as_input = nixpkgs; nixpkgs_open_prs = { - inherit - nixpkgs-lf - ; }; outputs = import ./flake { @@ -330,13 +317,12 @@ disko lanzaboote nix-index-database + arkenfox-nixos # external dependencies treefmt-nix - user_js templates # my binaries shell_library - river_init_lesser qmk_firmware ; }; diff --git a/flake/default.nix b/flake/default.nix index 39e7d02e..ae17ad39 100644 --- a/flake/default.nix +++ b/flake/default.nix @@ -21,13 +21,12 @@ disko, lanzaboote, nix-index-database, + arkenfox-nixos, # external dependencies - user_js, treefmt-nix, templates, # my binaries shell_library, - river_init_lesser, qmk_firmware, }: let treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;}; @@ -57,11 +56,9 @@ disko lanzaboote nix-index-database + arkenfox-nixos # bins - river_init_lesser qmk_firmware - # external - user_js ; }; @@ -138,6 +135,7 @@ in { # nix pkgs.alejandra + pkgs.deadnix # update myPkgs.generate_moz_extension # needed for the firefox extension update script diff --git a/flake/nixosConfigurations/default.nix b/flake/nixosConfigurations/default.nix index c9cb0ffe..1831cd1b 100644 --- a/flake/nixosConfigurations/default.nix +++ b/flake/nixosConfigurations/default.nix @@ -22,11 +22,9 @@ disko, lanzaboote, nix-index-database, + arkenfox-nixos, # bins - river_init_lesser, qmk_firmware, - # external - user_js, }: let modules = [ agenix.nixosModules.default @@ -56,17 +54,15 @@ impermanence nix-index-database nixVim + arkenfox-nixos # nix registry nixpkgs_as_input self templates # bins # TODO: Integrate these into `pkgs/by-name` <2024-05-22> - river_init_lesser qmk_firmware serverphone - # external deps - user_js ; }; @@ -84,7 +80,6 @@ # FIXME: These need to stay in this position for the install script hosts = ["tiamat" "apzu"]; - inactiveHosts = ["mammun" "lahmu"]; generatedHosts = builtins.listToAttrs (builtins.map generateHost hosts); in diff --git a/flake/packages/default.nix b/flake/packages/default.nix index 82924a25..95aa539a 100644 --- a/flake/packages/default.nix +++ b/flake/packages/default.nix @@ -5,7 +5,6 @@ myPkgs, pkgsStable, sysLib, - nixVim, system, shell_library, ... @@ -67,8 +66,6 @@ value) myPkgs ))); - - firefox = (import ../../modules/home.legacy/conf/firefox/scripts) {inherit pkgs sysLib;}; in { # install-iso = nixos-generators.nixosGenerate { @@ -97,5 +94,4 @@ in } // output // output_neovim - // firefox // myPkgsFlat diff --git a/hosts/_unmaintained/isimud/command-line.html b/hosts/_unmaintained/isimud/command-line.html deleted file mode 100644 index 4534001e..00000000 --- a/hosts/_unmaintained/isimud/command-line.html +++ /dev/null @@ -1,1491 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width, initial-scale=1"> -<meta name="description" content="The OnlyKey Command-Line Utility is a command line interface to OnlyKey."> -<meta name="keywords" content="OnlyKeyCommand linePython, OnlyKey, Command line"> -<title>OnlyKey Command-Line Utility | Docs</title> -<link rel="stylesheet" href="css/syntax.css"> - -<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> -<!--<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">--> -<link rel="stylesheet" href="css/modern-business.css"> -<!-- Latest compiled and minified CSS --> -<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> -<link rel="stylesheet" href="css/customstyles.css"> -<link rel="stylesheet" href="css/boxshadowproperties.css"> -<!-- most color styles are extracted out to here --> -<link rel="stylesheet" href="css/theme-blue.css"> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script> -<script src="js/jquery.navgoco.min.js"></script> - - -<!-- Latest compiled and minified JavaScript --> -<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> -<!-- Anchor.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.2.0/anchor.min.js"></script> -<script src="js/toc.js"></script> -<script src="js/customscripts.js"></script> - -<link rel="shortcut icon" href="images/favicon.ico"> - -<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> -<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> -<!--[if lt IE 9]> -<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> -<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> -<![endif]--> - -<link rel="alternate" type="application/rss+xml" title="trustcrypto.github.io" href="https://docs.onlykey.io/feed.xml"> - - <script> - $(document).ready(function() { - // Initialize navgoco with default options - $("#mysidebar").navgoco({ - caretHtml: '', - accordion: true, - openClass: 'active', // open - save: false, // leave false or nav highlighting doesn't work right - cookie: { - name: 'navgoco', - expires: false, - path: '/' - }, - slide: { - duration: 400, - easing: 'swing' - } - }); - - $("#collapseAll").click(function(e) { - e.preventDefault(); - $("#mysidebar").navgoco('toggle', false); - }); - - $("#expandAll").click(function(e) { - e.preventDefault(); - $("#mysidebar").navgoco('toggle', true); - }); - - }); - - </script> - <script> - $(function () { - $('[data-toggle="tooltip"]').tooltip() - }) - </script> - <script> - $(document).ready(function() { - $("#tg-sb-link").click(function() { - $("#tg-sb-sidebar").toggle(); - $("#tg-sb-content").toggleClass('col-md-9'); - $("#tg-sb-content").toggleClass('col-md-12'); - $("#tg-sb-icon").toggleClass('fa-toggle-on'); - $("#tg-sb-icon").toggleClass('fa-toggle-off'); - }); - }); - </script> - - -</head> -<body> -<!-- Navigation --> -<nav class="navbar navbar-inverse navbar-static-top"> - <div class="container topnavlinks"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> - <span class="sr-only">Toggle navigation</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a class="fa fa-home fa-lg navbar-brand" href="index.html"> <span class="projectTitle"> Docs</span></a> - </div> - <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> - <ul class="nav navbar-nav navbar-right"> - <!-- toggle sidebar button --> - <li><a id="tg-sb-link" href="#"><i id="tg-sb-icon" class="fa fa-toggle-on"></i> Nav</a></li> - <!-- entries without drop-downs appear here --> - - - - - - - - <li><a href="https://onlykey.io" target="_blank" rel="noopener">Purchase OnlyKey</a></li> - - - - <li><a href="https://docs.crp.to/index.html" target="_blank" rel="noopener">Get Started</a></li> - - - - <!-- entries with drop-downs appear here --> - <!-- conditional logic to control which topnav appears for the audience defined in the configuration file.--> - - - <!--comment out this block if you want to hide search--> - <li> - <!--start search--> - <div id="search-demo-container"> - <input type="text" id="search-input" placeholder="search..."> - <ul id="results-container"></ul> - </div> - <script src="js/jekyll-search.js" type="text/javascript"></script> - <script type="text/javascript"> - SimpleJekyllSearch.init({ - searchInput: document.getElementById('search-input'), - resultsContainer: document.getElementById('results-container'), - dataSource: 'search.json', - searchResultTemplate: '<li><a href="{url}" title="OnlyKey Command-Line Utility">{title}</a></li>', - noResultsText: 'No results found.', - limit: 10, - fuzzy: true, - }) - </script> - <!--end search--> - </li> - </ul> - </div> - </div> - <!-- /.container --> -</nav> - -<!-- Page Content --> -<div class="container"> - <div id="main"> - <!-- Content Row --> - <div class="row"> - - - <!-- Sidebar Column --> - <div class="col-md-3" id="tg-sb-sidebar"> - - -<ul id="mysidebar" class="nav"> - <li class="sidebarTitle">OnlyKey Documentation </li> - - - - <li> - <a title="General Information" href="#">General Information</a> - <ul> - - - - <li><a title="Get Started" href="index.html">Get Started</a></li> - - - - - - - <li><a title="FAQs" href="faq.html">FAQs</a></li> - - - - - - - <li><a title="About Security" href="security.html">About Security</a></li> - - - - - </ul> - </li> - - - - <li> - <a title="OnlyKey User's Guide" href="#">OnlyKey User's Guide</a> - <ul> - - - - <li><a title="Unpacking OnlyKey" href="usersguide.html#unpacking">Unpacking OnlyKey</a></li> - - - - - - - <li><a title="Setting up OnlyKey" href="usersguide.html#initial-setup">Setting up OnlyKey</a></li> - - - - - - - <li><a title="Reset OnlyKey (Factory Default)" href="usersguide.html#reset-default">Reset OnlyKey (Factory Default)</a></li> - - - - - - - <li><a title="Configure Basic Login Info" href="usersguide.html#all-about-slots">Configure Basic Login Info</a></li> - - - - - - - <li><a title="OnlyKey On-The-Go" href="usersguide.html#otg">OnlyKey On-The-Go</a></li> - - - - - - - <li><a title="Configure Two Factor Authentication (2FA)" href="usersguide.html#two-factor-authentication-2fa">Configure Two Factor Authentication (2FA)</a></li> - - - - - - - <li><a title="Google Authenticator (TOTP)" href="usersguide.html#google-authenticator-totp">Google Authenticator (TOTP)</a></li> - - - - - - - <li><a title="Yubico® One-Time Password" href="usersguide.html#Yubico-one-time-password">Yubico® One-Time Password</a></li> - - - - - - - <li><a title="Security Key (FIDO2 / U2F)" href="usersguide.html#universal-2nd-factor-u2f">Security Key (FIDO2 / U2F)</a></li> - - - - - - - <li><a title="Using With A Software Password Manager" href="usersguide.html#using-onlykey-with-a-software-password-manager">Using With A Software Password Manager</a></li> - - - - - - - <li><a title="OpenPGP Encryption (Files / Messages)" href="usersguide.html#openpgp">OpenPGP Encryption (Files / Messages)</a></li> - - - - - - - <li><a title="Preferences" href="usersguide.html#preferences">Preferences</a></li> - - - - - - - <li><a title="About Encryption Keys" href="usersguide.html#encryption-keys">About Encryption Keys</a></li> - - - - - - - <li><a title="Generating Keys" href="importpgp.html#generating-keys">Generating Keys</a></li> - - - - - - - <li><a title="Loading Keys" href="importpgp.html#loading-keys">Loading Keys</a></li> - - - - - - - <li><a title="Secure Encrypted Backup Anywhere" href="usersguide.html#secure-encrypted-backup-anywhere">Secure Encrypted Backup Anywhere</a></li> - - - - - - - <li><a title="Restore From Backup" href="usersguide.html#restore-from-backup">Restore From Backup</a></li> - - - - - - - <li><a title="Loading OnlyKey Firmware" href="usersguide.html#loading-onlykey-firmware">Loading OnlyKey Firmware</a></li> - - - - - - - <li><a title="Troubleshooting" href="usersguide.html#troubleshooting">Troubleshooting</a></li> - - - - - - - <li><a title="Change your PIN" href="usersguide.html#pin-change">Change your PIN</a></li> - - - - - - - <li><a title="Additional Information" href="usersguide.html#web-links">Additional Information</a></li> - - - - - </ul> - </li> - - - - <li> - <a title="OnlyKey DUO User's Guide" href="#">OnlyKey DUO User's Guide</a> - <ul> - - - - <li><a title="Unpacking OnlyKey DUO" href="duousersguide.html#unpacking">Unpacking OnlyKey DUO</a></li> - - - - - - - <li><a title="Setting up OnlyKey DUO" href="duousersguide.html#initial-setup">Setting up OnlyKey DUO</a></li> - - - - - - - <li><a title="Reset OnlyKey (Factory Default)" href="duousersguide.html#reset-default">Reset OnlyKey (Factory Default)</a></li> - - - - - - - <li><a title="Configure Basic Login Info" href="duousersguide.html#all-about-slots">Configure Basic Login Info</a></li> - - - - - - - <li><a title="On-The-Go" href="duousersguide.html#otg">On-The-Go</a></li> - - - - - - - <li><a title="Configure Two Factor Authentication (2FA)" href="duousersguide.html#two-factor-authentication-2fa">Configure Two Factor Authentication (2FA)</a></li> - - - - - - - <li><a title="Google Authenticator (TOTP)" href="duousersguide.html#google-authenticator-totp">Google Authenticator (TOTP)</a></li> - - - - - - - <li><a title="Yubico® One-Time Password" href="duousersguide.html#Yubico-one-time-password">Yubico® One-Time Password</a></li> - - - - - - - <li><a title="Security Key (FIDO2 / U2F)" href="duousersguide.html#universal-2nd-factor-u2f">Security Key (FIDO2 / U2F)</a></li> - - - - - - - <li><a title="Using With A Software Password Manager" href="duousersguide.html#using-onlykey-with-a-software-password-manager">Using With A Software Password Manager</a></li> - - - - - - - <li><a title="OpenPGP Encryption (Files / Messages)" href="duousersguide.html#openpgp">OpenPGP Encryption (Files / Messages)</a></li> - - - - - - - <li><a title="Preferences" href="duousersguide.html#preferences">Preferences</a></li> - - - - - - - <li><a title="About Encryption Keys" href="duousersguide.html#encryption-keys">About Encryption Keys</a></li> - - - - - - - <li><a title="Generating Keys" href="importpgp.html#generating-keys">Generating Keys</a></li> - - - - - - - <li><a title="Loading Keys" href="importpgp.html#loading-keys">Loading Keys</a></li> - - - - - - - <li><a title="Secure Encrypted Backup Anywhere" href="duousersguide.html#secure-encrypted-backup-anywhere">Secure Encrypted Backup Anywhere</a></li> - - - - - - - <li><a title="Restore From Backup" href="duousersguide.html#restore-from-backup">Restore From Backup</a></li> - - - - - - - <li><a title="Loading OnlyKey Firmware" href="duousersguide.html#loading-onlykey-firmware">Loading OnlyKey Firmware</a></li> - - - - - - - <li><a title="Troubleshooting" href="duousersguide.html#troubleshooting">Troubleshooting</a></li> - - - - - - - <li><a title="Change your PIN" href="duousersguide.html#pin-change">Change your PIN</a></li> - - - - - - - <li><a title="Additional Information" href="duousersguide.html#web-links">Additional Information</a></li> - - - - - </ul> - </li> - - - - <li> - <a title="Features" href="#">Features</a> - <ul> - - - - <li><a title="Universal Support" href="features.html#universal-support">Universal Support</a></li> - - - - - - - <li><a title="Portable. Durable. Waterproof" href="features.html#portable-durable-waterproof">Portable. Durable. Waterproof</a></li> - - - - - - - <li><a title="Pin Protected" href="features.html#pin-protected">Pin Protected</a></li> - - - - - - - <li><a title="Hardware Password Manager" href="features.html#hardware-password-manager">Hardware Password Manager</a></li> - - - - - - - <li><a title="Universal Two-Factor Authentication" href="features.html#universal-2-factor-token">Universal Two-Factor Authentication</a></li> - - - - - - - <li><a title="SSH Authentication" href="features.html#ssh-authentication">SSH Authentication</a></li> - - - - - - - <li><a title="OpenPGP Everywhere" href="features.html#openpgp-support">OpenPGP Everywhere</a></li> - - - - - - - <li><a title="Self-Destruct" href="features.html#self-destruct-feature">Self-Destruct</a></li> - - - - - - - <li><a title="Encrypted Backup Anywhere" href="features.html#encrypted-backup-anywhere">Encrypted Backup Anywhere</a></li> - - - - - - - <li><a title="Automatic Lock" href="features.html#automatic-lock-feature">Automatic Lock</a></li> - - - - - - - <li><a title="International Keyboard Layouts" href="features.html#international-keyboard-layouts">International Keyboard Layouts</a></li> - - - - - - - <li><a title="Sysadmin Mode" href="features.html#sysadmin-mode">Sysadmin Mode</a></li> - - - - - - - <li><a title="LED Definitions" href="features.html#led-definitions-onlykey-color">LED Definitions</a></li> - - - - - - - <li><a title="Button Definitions" href="features.html#button-definitions">Button Definitions</a></li> - - - - - - - <li><a title="OnlyKey / OnlyKey DUO Differences" href="features.html##onlykey-and-onlykey-duo-differences">OnlyKey / OnlyKey DUO Differences</a></li> - - - - - - - <li><a title="Config Mode" href="security.html#config-mode">Config Mode</a></li> - - - - - - - <li><a title="Plausible Deniability" href="features.html#plausible-deniability-feature">Plausible Deniability</a></li> - - - - - </ul> - </li> - - - - <li> - <a title="Apps and Software" href="#">Apps and Software</a> - <ul> - - - - <li><a title="Desktop App" href="app.html">Desktop App</a></li> - - - - - - - <li><a title="WebCrypt (OpenPGP Webapp)" href="webcrypt.html">WebCrypt (OpenPGP Webapp)</a></li> - - - - - - - <li><a title="SSH/GPG Agent (onlykey-agent)" href="onlykey-agent.html">SSH/GPG Agent (onlykey-agent)</a></li> - - - - - - - <li class="active"><a title="Command-Line Utility (onlykey-cli)" href="command-line.html">Command-Line Utility (onlykey-cli)</a></li> - - - - - - - <li><a title="Firmware" href="firmware.html">Firmware</a></li> - - - - - </ul> - </li> - - - - <li> - <a title="Knowledge Base" href="#">Knowledge Base</a> - <ul> - - - - <li><a title="Works with OnlyKey" href="workswithonlykey.html">Works with OnlyKey</a></li> - - - - - - - <li><a title="Upgrade Guide" href="upgradeguide.html">Upgrade Guide</a></li> - - - - - - - <li><a title="Legacy Firmware Upgrade Guide" href="legacyupgradeguide.html">Legacy Firmware Upgrade Guide</a></li> - - - - - - - <li><a title="International Travel Edition Guide" href="ite.html">International Travel Edition Guide</a></li> - - - - - - - <li><a title="Plausible Deniability Setup Guide" href="pdguide.html">Plausible Deniability Setup Guide</a></li> - - - - - - - <li><a title="Windows Active Directory Guide" href="activedirectory.html">Windows Active Directory Guide</a></li> - - - - - - - <li><a title="Linux - Using OnlyKey with Linux" href="linux.html">Linux - Using OnlyKey with Linux</a></li> - - - - - - - <li><a title="Mobile - Using OnlyKey with iOS and Android" href="mobile.html">Mobile - Using OnlyKey with iOS and Android</a></li> - - - - - - - <li><a title="OpenPGP Keys - Import keys from Protonmail, Keybase, and Mailvelope" href="importpgp.html">OpenPGP Keys - Import keys from Protonmail, Keybase, and Mailvelope</a></li> - - - - - - - <li><a title="Virtual Machines with OnlyKey" href="virtualmachines.html">Virtual Machines with OnlyKey</a></li> - - - - - - - <li><a title="Qubes OS with OnlyKey" href="qubes.html">Qubes OS with OnlyKey</a></li> - - - - - - - <li><a title="Full-Disk Encryption with OnlyKey" href="full-disk-encryption.html">Full-Disk Encryption with OnlyKey</a></li> - - - - - - - <li><a title="OpenSSH With OnlyKey" href="openssh.html">OpenSSH With OnlyKey</a></li> - - - - - </ul> - </li> - - - - <!-- if you aren't using the accordion, uncomment this block: - <p class="external"> - <a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a> - </p> - --> -</ul> - -<!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.--> -<script>$("li.active").parents('li').toggleClass("active");</script> - - </div> - - - - <!-- Content Column --> - <div class="col-md-9" id="tg-sb-content"> - <div class="post-header"> - <h1 class="post-title-main">OnlyKey Command-Line Utility</h1> -</div> - - - -<div class="post-content"> - - - <div class="summary">The OnlyKey Command-Line Utility is a command line interface to OnlyKey.</div> - - - - -<!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. --> -<script> -$( document ).ready(function() { - // Handler for .ready() called. - -$('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3,h4' }); - -/* this offset helps account for the space taken up by the floating toolbar. */ -$('#toc').on('click', 'a', function() { - var target = $(this.getAttribute('href')) - , scroll_target = target.offset().top - - $(window).scrollTop(scroll_target - 10); - return false -}) - -}); -</script> - -<div id="toc"></div> - - - - - <h1 id="onlykey-cli">onlykey-cli</h1> - -<p>OnlyKey-cli - A command line interface to the OnlyKey (Similar functionality to <a href="https://docs.crp.to/app.html">OnlyKey App</a>) that can be used for configuration, scripting, and testing.</p> - -<h2 id="installation">Installation</h2> - -<h3 id="windows-stand-alone-exe">Windows Stand-Alone EXE</h3> -<p>No install is required. Download and run the EXE to open OnlyKey CLI interactive mode or run directly from command line like this:</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>C:\ onlykey-cli.exe getlabels -</code></pre></div></div> - -<p><a href="https://github.com/trustcrypto/python-onlykey/releases/download/v1.2.9/onlykey-cli.exe">Download here</a></p> - -<h3 id="windows-install-with-dependencies">Windows Install with dependencies</h3> -<p>1) Python 3.8 and pip3 are required. To setup a Python environment on Windows we recommend Anaconda <a href="https://www.anaconda.com/download/#windows">https://www.anaconda.com/download/#windows</a></p> - -<p>2) From an administrator command prompt run:</p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pip3 install hidapi==0.9.0 onlykey -</code></pre></div></div> - -<p>You should see a message showing where the executable is installed. This is usually c:\python39\scripts\onlykey-cli.exe</p> - -<h3 id="macos-install-with-dependencies">MacOS Install with dependencies</h3> -<p>Python 3.8 and pip3 are required. To setup a Python environment on MacOS we recommend Anaconda <a href="https://www.anaconda.com/download/#macos">https://www.anaconda.com/download/#macos</a></p> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ brew install libusb -$ pip3 install onlykey -</code></pre></div></div> - -<h3 id="linuxbsd-install-with-dependencies">Linux/BSD Install with dependencies</h3> - -<p>In order for non-root users in Linux to be able to communicate with OnlyKey a udev rule must be created as described <a href="https://docs.crp.to/linux">here</a>.</p> - -<h4 id="ubuntu-install-with-dependencies">Ubuntu Install with dependencies</h4> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt update && sudo apt upgrade -$ sudo apt install python3-pip python3-tk libusb-1.0-0-dev libudev-dev -$ pip3 install onlykey -$ wget https://raw.githubusercontent.com/trustcrypto/trustcrypto.github.io/pages/49-onlykey.rules -$ sudo cp 49-onlykey.rules /etc/udev/rules.d/ -$ sudo udevadm control --reload-rules && udevadm trigger -</code></pre></div></div> - -<h4 id="debian-install-with-dependencies">Debian Install with dependencies</h4> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt update && sudo apt upgrade -$ sudo apt install python3-pip python3-tk libusb-1.0-0-dev libudev-dev -$ pip3 install onlykey -$ wget https://raw.githubusercontent.com/trustcrypto/trustcrypto.github.io/pages/49-onlykey.rules -$ sudo cp 49-onlykey.rules /etc/udev/rules.d/ -$ sudo udevadm control --reload-rules && udevadm trigger -</code></pre></div></div> - -<h4 id="redhat-install-with-dependencies">RedHat Install with dependencies</h4> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ yum update -$ yum install python3-pip python3-devel python3-tk libusb-devel libudev-devel \ - gcc redhat-rpm-config -$ pip3 install onlykey -$ wget https://raw.githubusercontent.com/trustcrypto/trustcrypto.github.io/pages/49-onlykey.rules -$ sudo cp 49-onlykey.rules /etc/udev/rules.d/ -$ sudo udevadm control --reload-rules && udevadm trigger -</code></pre></div></div> - -<h4 id="fedora-install-with-dependencies">Fedora Install with dependencies</h4> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ dnf install python3-pip python3-devel python3-tkinter libusb-devel libudev-devel \ - gcc redhat-rpm-config -$ pip3 install onlykey -$ wget https://raw.githubusercontent.com/trustcrypto/trustcrypto.github.io/pages/49-onlykey.rules -$ sudo cp 49-onlykey.rules /etc/udev/rules.d/ -$ sudo udevadm control --reload-rules && udevadm trigger -</code></pre></div></div> - -<h4 id="opensuse-install-with-dependencies">OpenSUSE Install with dependencies</h4> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ zypper install python3-pip python3-devel python3-tk libusb-1_0-devel libudev-devel -$ pip3 install onlykey -$ wget https://raw.githubusercontent.com/trustcrypto/trustcrypto.github.io/pages/49-onlykey.rules -$ sudo cp 49-onlykey.rules /etc/udev/rules.d/ -$ sudo udevadm control --reload-rules && udevadm trigger -</code></pre></div></div> - -<h4 id="arch-linux-install-with-dependencies">Arch Linux Install with dependencies</h4> -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo pacman -Sy git python3-setuptools python3 libusb python3-pip -$ pip3 install onlykey -$ wget https://raw.githubusercontent.com/trustcrypto/trustcrypto.github.io/pages/49-onlykey.rules -$ sudo cp 49-onlykey.rules /etc/udev/rules.d/ -$ sudo udevadm control --reload-rules && udevadm trigger -</code></pre></div></div> - -<h4 id="freebsd-install-with-dependencies">FreeBSD Install with dependencies</h4> - -<p>See forum thread <a href="https://groups.google.com/d/msg/onlykey/CEYwdXjB508/MCe14p0gAwAJ">here</a></p> - -<h2 id="quickstart">QuickStart</h2> - -<p>Usage: onlykey-cli [OPTIONS]</p> - -<h3 id="setup-options">Setup Options</h3> - -<h4 id="init">init</h4> -<p>A command line tool for setting PIN on OnlyKey (Initial Configuration)</p> - -<h3 id="general-options">General Options</h3> - -<h4 id="version">version</h4> -<p>Displays the version of the app</p> - -<h4 id="fwversion">fwversion</h4> -<p>Displays the version of the OnlyKey firmware</p> - -<h4 id="wink">wink</h4> -<p>OnlyKey flashes blue (winks), may be used for visual confirmation of connectivity</p> - -<h4 id="getlabels">getlabels</h4> -<p>Returns slot labels</p> - -<h4 id="settime">settime</h4> -<p>A command for setting time on OnlyKey, time is needed for TOTP (Google Authenticator)</p> - -<h4 id="getkeylabels">getkeylabels</h4> -<p>Returns key labels for RSA keys 1-4 and ECC keys 1-16</p> - -<h4 id="rng-type">rng [type]</h4> -<p>Access OnlyKey TRNG to generate random numbers:</p> -<ul> - <li>[type] must be one of the following: - <ul> - <li>hexbytes - Output hex encoded random bytes. Default 8 bytes; Maximum 255 bytes. Specify number of bytes to return with –count <number of="" bytes=""> i.e. 'onlykey-cli rng hexbytes --count 32'</number></li> - <li>feedkernel - Feed random bytes to /dev/random.</li> - </ul> - </li> -</ul> - -<h3 id="onlykey-preferences-options">OnlyKey Preferences Options</h3> - -<h4 id="idletimeout-num">idletimeout [num]</h4> -<p>OnlyKey locks after ideletimeout is reached (1 – 255 minutes; default = 30; 0 to disable). <a href="https://docs.crp.to/usersguide.html#configurable-inactivity-lockout-period">More info</a></p> - -<h4 id="wipemode-num">wipemode [num]</h4> -<p>Configure how the OnlyKey responds to -a factory reset. WARNING - Setting to Full Wipe mode cannot be changed. -1 = Sensitive Data Only (default); 2 = Full Wipe (recommended for plausible deniability users) Entire device is wiped. Firmware must be reloaded. <a href="https://docs.crp.to/usersguide.html#configurable-wipe-mode">More info</a></p> - -<h4 id="keylayout-num">keylayout [num]</h4> -<p>Set keyboard layout</p> -<ul> - <li>1 - USA_ENGLISH (Default)</li> - <li>2 - CANADIAN_FRENCH</li> - <li>3 - CANADIAN_MULTILINGUAL</li> - <li>4 - DANISH</li> - <li>5 - FINNISH</li> - <li>6 - FRENCH</li> - <li>7 - FRENCH_BELGIAN</li> - <li>8 - FRENCH_SWISS</li> - <li>9 - GERMAN</li> - <li>10 - GERMAN_MAC</li> - <li>11 - GERMAN_SWISS</li> - <li>12 - ICELANDIC</li> - <li>13 - IRISH</li> - <li>14 - ITALIAN</li> - <li>15 - NORWEGIAN</li> - <li>16 - PORTUGUESE</li> - <li>17 - PORTUGUESE_BRAZILIAN</li> - <li>18 - SPANISH</li> - <li>19 - SPANISH_LATIN_AMERICA</li> - <li>20 - SWEDISH</li> - <li>21 - TURKISH</li> - <li>22 - UNITED_KINGDOM</li> - <li>23 - US_INTERNATIONAL</li> - <li>24 - CZECH</li> - <li>25 - SERBIAN_LATIN_ONLY</li> - <li>26 - HUNGARIAN</li> - <li>27 - DANISH MAC</li> - <li>28 - US_DVORAK</li> -</ul> - -<p><a href="https://docs.crp.to/usersguide.html#configurable-keyboard-layouts">More info</a></p> - -<h4 id="keytypespeed-num">keytypespeed [num]</h4> -<p>1 = slowest; 10 = fastest [7 = default] -<a href="https://docs.crp.to/usersguide.html#configurable-keyboard-type-speed">More info</a></p> - -<h4 id="ledbrightness-num">ledbrightness [num]</h4> -<p>1 = dimmest; 10 = brightest [8 = default] -<a href="https://docs.crp.to/usersguide.html#configurable-led-brightness">More info</a></p> - -<h4 id="touchsense-num">touchsense [num]</h4> -<p>Change the OnlyKey’s button touch sensitivity. -WARNING: Setting button’s touch sensitivity lower than 5 is not recommended as this could result in inadvertent button press. -2 = highest sensitivity; 100 = lowest sensitivity [12 = default]</p> - -<h4 id="2ndprofilemode-num">2ndprofilemode [num]</h4> -<p>Set during init (Initial Configuration) to set 2nd profile type 1 = standard (default); 2 = plausible deniability</p> - -<h4 id="storedkeymode-num">storedkeymode [num]</h4> -<p>Enable or disable challenge for stored keys (SSH/PGP) -0 = Challenge Code Required (default); 1 = Button Press Required -<a href="https://docs.crp.to/usersguide.html#stored-challenge-mode">More info</a></p> - -<h4 id="derivedkeymode-num">derivedkeymode [num]</h4> -<p>Enable or disable challenge for stored keys (SSH/PGP) -0 = Challenge Code Required (default); 1 = Button Press Required -<a href="https://docs.crp.to/usersguide.html#derived-challenge-mode">More info</a></p> - -<h4 id="hmackeymode-num">hmackeymode [num]</h4> -<p>Enable or disable button press for HMAC challenge-response -0 = Button Press Required (default); 1 = Button Press Not Required. -<a href="https://docs.crp.to/usersguide.html#hmac-mode">More info</a></p> - -<h4 id="backupkeymode-num">backupkeymode [num]</h4> -<p>1 = Lock backup key so this may not be changed on device -WARNING - Once set to “Locked” this cannot be changed unless a factory reset occurs. -<a href="https://docs.crp.to/usersguide.html#backup-key-mode">More info</a></p> - -<h4 id="sysadminmode">sysadminmode</h4> -<p>Enable or disable challenge for stored keys (SSH/PGP) -0 = Challenge Code Required (default); 1 = Button Press Required -<a href="https://docs.crp.to/usersguide.html#derived-challenge-mode">More info</a></p> - -<h4 id="lockbutton">lockbutton</h4> -<p>Enable or disable challenge for stored keys (SSH/PGP) -0 = Challenge Code Required (default); 1 = Button Press Required -<a href="https://docs.crp.to/usersguide.html#derived-challenge-mode">More info</a></p> - -<h3 id="slot-config-options">Slot Config Options</h3> - -<h4 id="setslot-id-type-value">setslot [id] [type] [value]</h4> -<ul> - <li>[id] must be slot number 1a - 6b for OnlyKey or 1-24 for OnlyKey DUO</li> - <li>[type] must be one of the following: - <ul> - <li>label - set slots (1a - 6b) to have a descriptive label i.e. My Google Acct</li> - <li>url - URL to login page</li> - <li>delay1 - set a 0 - 9 second delay</li> - <li>addchar1 - Additional character before username 1 for TAB, 0 to clear</li> - <li>username - Username to login</li> - <li>addchar2 - Additional character after username 1 for TAB, 2 for RETURN</li> - <li>delay2 - set a 0 - 9 second delay</li> - <li>password - Password to login</li> - <li>addchar3 - Additional character after password 1 for TAB, 2 for RETURN</li> - <li>delay3 - set a 0 - 9 second delay</li> - <li>addchar4 - Additional character before OTP 1 for TAB</li> - <li>2fa - type of two factor authentication - <ul> - <li>g - Google Authenticator</li> - <li>y - Yubico OTP</li> - <li>u - U2F</li> - </ul> - </li> - <li>totpkey - Google Authenticator key</li> - <li>addchar5 - Additional character after OTP 2 for RETURN</li> - </ul> - </li> -</ul> - -<h4 id="wipeslot-id">wipeslot [id]</h4> -<ul> - <li>[id] must be slot number 1a - 6b for OnlyKey or 1-24 for OnlyKey DUO</li> -</ul> - -<h3 id="key-config-options">Key Config Options</h3> - -<h4 id="setkey-key-slot-type-features-hex-key">setkey [key slot] [type] [features] [hex key]</h4> -<p>Sets raw private keys and key labels, to set PEM format keys use the OnlyKey App</p> -<ul> - <li>[key slot] must be key number RSA1 - RSA4, ECC1 - ECC16, HMAC1 - HMAC2</li> - <li>[type] must be one of the following: - <ul> - <li>label - set to have a descriptive key label i.e. My GPG signing key</li> - <li>x - X25519 Key Type (32 bytes)</li> - <li>n - NIST256P1 Key Type (32 bytes)</li> - <li>s - SECP256K1 Key Type (32 bytes)</li> - <li>2 - RSA Key Type 2048bits (256 bytes)</li> - <li>4 - RSA Key Type 4096bits (512 bytes)</li> - <li>h - HMAC Key Type (20 bytes)</li> - </ul> - </li> - <li>[features] must be one of the following: - <ul> - <li>s - Use for signing</li> - <li>d - Use for decryption</li> - <li>b - Use for encryption/decryption of backups</li> - </ul> - </li> - <li>For setting keys see examples <a href="https://docs.crp.to/command-line.html#writing-private-keys-and-passwords">here</a>.</li> -</ul> - -<h4 id="genkey-key-slot-type-features">genkey [key slot] [type] [features]</h4> -<p>Generates random private key on device</p> -<ul> - <li>[key slot] must be key number ECC1 - ECC16 (only ECC keys supported)</li> - <li>[type] must be one of the following: - <ul> - <li>x - X25519 Key Type (32 bytes)</li> - <li>n - NIST256P1 Key Type (32 bytes)</li> - <li>s - SECP256K1 Key Type (32 bytes)</li> - </ul> - </li> - <li>[features] must be one of the following: - <ul> - <li>s - Use for signing</li> - <li>d - Use for decryption</li> - <li>b - Use for encryption/decryption of backups</li> - </ul> - </li> - <li>For generating key see example <a href="https://docs.crp.to/command-line.html#writing-private-keys-and-passwords">here</a>.</li> -</ul> - -<h4 id="wipekey-key-id">wipekey [key id]</h4> -<p>Erases key stored at [key id]</p> -<ul> - <li>[key id] must be key number RSA1 - RSA4, ECC1 - ECC16, HMAC1 - HMAC2</li> -</ul> - -<h3 id="fido2-config-options">FIDO2 Config Options</h3> - -<h4 id="ping">ping</h4> -<p>Sends a FIDO2 transaction to the device, which immediately echoes the same data back. This command is defined to be a uniform function for debugging, latency and performance measurements (CTAPHID_PING).</p> - -<h4 id="set-pin">set-pin</h4> -<p>Set new FIDO PIN, this is the PIN entered via keyboard and used for FIDO2 register/login (not the OnlyKey PIN entered on device).</p> - -<h4 id="change-pin">change-pin</h4> -<p>Change FIDO PIN, this is the PIN entered via keyboard and used for FIDO2 register/login (not the OnlyKey PIN entered on device, to change that PIN use the OnlyKey Desktop App).</p> - -<h4 id="credential-operation-credential-id">credential [operation] [credential ID]</h4> -<ul> - <li>[operation] must be one of the following: - <ul> - <li>info - Display number of existing resident keys and remaining space.</li> - <li>ls - List resident keys.</li> - <li>rm [credential ID] - Remove resident keys, <a href="https://docs.crp.to/command-line.html#list-and-remove-fido2-resident-key">example here</a>.</li> - </ul> - </li> -</ul> - -<h4 id="reset">reset</h4> -<p>Reset wipes all FIDO U2F and FIDO2 credentials!!! It is highly recommended to backup device prior to reset.</p> - -<h3 id="running-command-options">Running Command Options</h3> - -<p>You can run commands in two ways:</p> - -<h4 id="1-directly-in-terminal">1) Directly in terminal</h4> - -<p>Like this:</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ onlykey-cli getlabels - -Slot 1a: -Slot 1b: - -Slot 2a: -Slot 2b: - -Slot 3a: -Slot 3b: - -Slot 4a: -Slot 4b: - -Slot 5a: -Slot 5b: - -Slot 6a: -Slot 6b: - -$ onlykey-cli setslot 1a label ok -Successfully set Label -$ onlykey-cli getlabels - -Slot 1a: ok -Slot 1b: - -Slot 2a: -Slot 2b: - -Slot 3a: -Slot 3b: - -Slot 4a: -Slot 4b: - -Slot 5a: -Slot 5b: - -Slot 6a: -Slot 6b: - -</code></pre></div></div> - -<h4 id="2-interactive-mode">2) Interactive Mode</h4> - -<p>Or you can run commands in an interactive shell like this:</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ onlykey-cli -OnlyKey CLI v1.2.8 -Press the right arrow to insert the suggestion. -Press Control-C to retry. Control-D to exit. - -OnlyKey> getlabels - -Slot 1a: -Slot 1b: - -Slot 2a: -Slot 2b: - -Slot 3a: -Slot 3b: - -Slot 4a: -Slot 4b: - -Slot 5a: -Slot 5b: - -Slot 6a: -Slot 6b: - -OnlyKey> setslot 1a label ok - -Successfully set Label - -OnlyKey> getlabels - -Slot 1a: ok -Slot 1b: - -Slot 2a: -Slot 2b: - -Slot 3a: -Slot 3b: - -Slot 4a: -Slot 4b: - -Slot 5a: -Slot 5b: - -Slot 6a: -Slot 6b: - -OnlyKey> setslot 1a url accounts.google.com - -Successfully set URL - -OnlyKey> setslot 1a addchar1 2 - -Successfully set Character1 - -OnlyKey> setslot 1a delay1 2 - -Successfully set Delay1 - -OnlyKey> setslot 1a username onlykey.1234 - -Successfully set Username - -OnlyKey> setslot 1a addchar2 2 - -Successfully set Character2 - -OnlyKey> setslot 1a delay2 2 - -Successfully set Delay2 - -OnlyKey> setslot 1a password - -Type Control-T to toggle password visible. -Password: ********* -Successfully set Password - -OnlyKey> setslot 1a addchar3 2 - -Successfully set Character3 - -OnlyKey> setslot 1a delay3 2 - -Successfully set Delay3 - -OnlyKey> setslot 1a 2fa g - -Successfully set 2FA Type - -OnlyKey> setslot 1a totpkey - -Type Control-T to toggle password visible. -Password: ******************************** -Successfully set TOTP Key - -OnlyKey> setslot 1a addchar4 2 - -Successfully set Character4 - -OnlyKey> - -Bye! -</code></pre></div></div> - -<h2 id="examples">Examples</h2> - -<h3 id="writing-private-keys-and-passwords">Writing Private Keys and Passwords</h3> - -<p>Keys/passwords are masked when entered and should only be set from interactive mode and not directly from terminal. Entering directly from terminal is not secure as command history is stored.</p> - -<p><strong>Setkey Examples</strong></p> - -<p>To set key a device must first be put into config mode.</p> - -<p><strong>Set HMAC key 1 to a custom value</strong></p> - -<p>$ onlykey-cli</p> - -<p>OnlyKey> setkey HMAC1 h</p> - -<p>Type Control-T to toggle password visible. -Password/Key: <strong>**</strong><strong>**</strong><strong>**</strong><strong>**</strong><strong>**</strong><strong>**</strong><em>**</em></p> - -<p>Successfully set ECC Key</p> - -<p><em>HMAC key must be 20 bytes, h is HMAC type</em></p> - -<p><strong>Set HMAC key 2 to a custom value</strong></p> - -<p>$ onlykey-cli</p> - -<p>OnlyKey> setkey HMAC2 h</p> - -<p>Type Control-T to toggle password visible. -Password/Key: <strong>**</strong><strong>**</strong><strong>**</strong><strong>**</strong><strong>**</strong><strong>**</strong><em>**</em></p> - -<p>Successfully set ECC Key</p> - -<p><em>HMAC key must be 20 bytes, h is HMAC type</em></p> - -<p><strong>Set ECC key in slot ECC1 to a custom value (Slots ECC1-ECC16 are available for ECC keys. Supported ECC curves X25519(x), NIST256P1(n), SECP256K1(s))</strong></p> - -<p>$ onlykey-cli</p> - -<p>OnlyKey> setkey ECC1 x</p> - -<p>Type Control-T to toggle password visible. -Password/Key: <strong>**</strong><strong>**</strong><strong>**</strong><strong>**</strong><strong>**</strong><strong>**</strong><strong>**</strong><strong>**</strong><strong>**</strong><strong>**</strong>*</p> - -<p>Successfully set ECC Key</p> - -<p><em>ECC key must be 32 bytes, x is X25519 type</em></p> - -<p><strong>Genkey Examples</strong></p> - -<p>To set key a device must first be put into config mode.</p> - -<p><strong>Generate ECC key in slot ECC1 to a custom value (Slots ECC1-ECC16 are available for ECC keys. Supported ECC curves X25519(x), NIST256P1(n), SECP256K1(s))</strong></p> - -<p>$ onlykey-cli</p> - -<p>OnlyKey> genkey ECC1 x</p> - -<p>Successfully set ECC Key</p> - -<h3 id="scripting-example">Scripting Example</h3> - -<p><strong>Set time on OnlyKey (required for TOTP)</strong></p> - -<p>$ onlykey-cli settime</p> - -<p>This can be added to scripts such as the UDEV rule to automatically set time when device is inserted into USB port. See example <a href="https://raw.githubusercontent.com/trustcrypto/trustcrypto.github.io/pages/49-onlykey.rules">here</a></p> - -<p><strong>Scripted provisioning of an OnlyKey slots and keys can be done by creating a script that sets multiple values on OnlyKey</strong></p> - -<h3 id="list-and-remove-fido2-resident-key">List and Remove FIDO2 Resident Key</h3> - -<p>List current resident keys:</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>onlykey-cli credential ls -</code></pre></div></div> -<p><img src="https://raw.githubusercontent.com/trustcrypto/trustcrypto.github.io/pages/images/cli-cred-ls.png" alt="" /></p> - -<p>Remove a resident key by credential ID</p> - -<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>onlykey-cli credential rm eu7LPIjTNwIJt2Ws9LWJlXkiNKaueSEEGteZM2MT/lZtEuYo49V6deCiIRMb6EDC29XG13nBL60+Yx+6hxSUYS1uxX9+AA== -</code></pre></div></div> - -<p>Once removed, list current resident keys to verify:</p> - -<p><img src="https://raw.githubusercontent.com/trustcrypto/trustcrypto.github.io/pages/images/cli-cred-ls2.png" alt="" /></p> - -<h2 id="source">Source</h2> - -<p><a href="https://github.com/trustcrypto/python-onlykey">OnlyKey CLI on Github</a></p> - - - - <div class="tags"> - - <b>Tags: </b> - - - - - - - - - - </div> - - - - - - -<a target="_blank" rel="noopener" href="https://github.com/trustcrypto/trustcrypto.github.io/edit/pages/pages/mydoc/command-line.md" class="btn btn-default githubEditButton" role="button"><i class="fa fa-github fa-lg"></i> Edit me</a> - - - -</div> - -<hr class="shaded"/> - -<footer> - <div class="row"> - <div class="col-lg-12 footer"> - ©2023 CryptoTrust. All rights reserved. <br /> -<span>Page last updated:</span> Jan, 19, 2022<br/> Site last generated: Jun 7, 2023 <br /> -<p><a href="https://crp.to"><img src="images/company_logo.png" alt="Company logo"/></a></p> - </div> - </div> -</footer> - - - </div> - <!-- /.row --> -</div> -<!-- /.container --> -</div> -<!-- /#main --> - </div> - -</body> - -<!-- the google_analytics_id gets auto inserted from the config file --> - - - -<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create','UA-66296557-1','auto');ga('require','displayfeatures');ga('send','pageview');</script> - - -</html> diff --git a/hosts/_unmaintained/isimud/default.nix b/hosts/_unmaintained/isimud/default.nix deleted file mode 100644 index 5aa6ad3c..00000000 --- a/hosts/_unmaintained/isimud/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{pkgs, ...}: { - imports = [ - ./hardware - ./networking.nix - ../../sys - ]; - - isoImage = { - contents = [ - { - source = ./command-line.html; - # TODO:: remove the implied dependency - target = "/home/soispha/cli.html"; - } - ]; - makeEfiBootable = true; - makeUsbBootable = true; - makeBiosBootable = true; - appendToMenuLabel = " Gpg-disk"; - }; - environment.systemPackages = [ - pkgs.onlykey - pkgs.onlykey-cli - pkgs.onlykey-agent - pkgs.cryptsetup - ]; - - soispha = { - secrets.enable = false; - impermanence.enable = false; - locale = { - enable = true; - keyMap = "dvorak"; - }; - fs.backup = { - enable = false; - }; - users = { - hashedPassword = "$y$jFT$YvneNBxEtbrysV2OMG0X30$eKHdzZxJkjD3pXuGOuqbnTaeym5.4ik6kxhE.rJxs3."; - }; - }; - - system.stateVersion = "23.05"; -} diff --git a/hosts/_unmaintained/isimud/hardware/default.nix b/hosts/_unmaintained/isimud/hardware/default.nix deleted file mode 100644 index f55365b3..00000000 --- a/hosts/_unmaintained/isimud/hardware/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - lib, - pkgs, - modulesPath, - ... -}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - hardware.cpu.amd.updateMicrocode = true; # Why not? - hardware.cpu.intel.updateMicrocode = true; # Why not? - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - - soispha.disks = { - enable = false; - }; - - boot = { - kernelModules = []; - kernelPackages = lib.mkDefault pkgs.linuxPackages_6_1; # use this kernel, as it's supported by zfs - }; -} diff --git a/hosts/_unmaintained/isimud/networking.nix b/hosts/_unmaintained/isimud/networking.nix deleted file mode 100644 index 58c84ee5..00000000 --- a/hosts/_unmaintained/isimud/networking.nix +++ /dev/null @@ -1,8 +0,0 @@ -{lib, ...}: { - # Disable networking - networking.useDHCP = lib.mkForce false; - networking.interfaces = lib.mkForce {}; - boot.blacklistedKernelModules = ["igb" "iwlwifi" "rtw89"]; - - networking.hostName = "isimud"; -} diff --git a/hosts/_unmaintained/lahmu/default.nix b/hosts/_unmaintained/lahmu/default.nix deleted file mode 100644 index 94d8b054..00000000 --- a/hosts/_unmaintained/lahmu/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - config, - lib, - nixpkgs, - home-manager, - ... -}: { - imports = [ - ./hardware - ./networking.nix - - ../../sys - ]; - - soispha = { - locale.enable = true; - users = { - # enable = true; - hashedPassword = "$y$jFT$qi3wS9njrMl2y55b3NOBI0$j40Qt6AAkMSfZ82KPhqMaUaPztWtPps1wOqaXaF/L.6"; - }; - }; - - system.stateVersion = "23.05"; -} diff --git a/hosts/_unmaintained/lahmu/hardware/cpu.nix b/hosts/_unmaintained/lahmu/hardware/cpu.nix deleted file mode 100644 index 2d7232cd..00000000 --- a/hosts/_unmaintained/lahmu/hardware/cpu.nix +++ /dev/null @@ -1,4 +0,0 @@ -{config, ...}: { - powerManagement.cpuFreqGovernor = "powersave"; - hardware.cpu.amd.updateMicrocode = true; # Why not? -} diff --git a/hosts/_unmaintained/lahmu/hardware/default.nix b/hosts/_unmaintained/lahmu/hardware/default.nix deleted file mode 100644 index bc7b1f96..00000000 --- a/hosts/_unmaintained/lahmu/hardware/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - config, - lib, - pkgs, - modulesPath, - ... -}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") # TODO: is this necessary? - (modulesPath + "/profiles/qemu-guest.nix") - ./cpu.nix - ./gpu.nix - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - - system.fileSystemLayouts = { - enable = true; - mainDisk = "/dev/disk/by-uuid/c0382dda-1f55-4209-967d-b8b22cb0f6e1"; - efiDisk = "/dev/disk/by-uuid/167D-2F0B"; - ssd = true; - swap = { - uuid = "c0382dda-1f55-4209-967d-b8b22cb0f6e1"; - resumeOffset = "140544"; - }; - }; - - boot = { - kernelModules = []; - - initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk"]; - }; -} diff --git a/hosts/_unmaintained/lahmu/hardware/gpu.nix b/hosts/_unmaintained/lahmu/hardware/gpu.nix deleted file mode 100644 index 88c9b88a..00000000 --- a/hosts/_unmaintained/lahmu/hardware/gpu.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - # hardware.opengl.extraPackages = with pkgs; [ - # rocm-opencl-icd # open-cl - # amdvlk # or directly through mesa - # amd-media-driver # libva - # ]; - # - # # Force radv, TODO: is this logical? - # environment.variables.AMD_VULKAN_ICD = "RADV"; -} diff --git a/hosts/_unmaintained/lahmu/networking.nix b/hosts/_unmaintained/lahmu/networking.nix deleted file mode 100644 index 1ef69e7c..00000000 --- a/hosts/_unmaintained/lahmu/networking.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - config, - lib, - ... -}: { - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; - networking.hostName = "lahmu"; -} diff --git a/hosts/_unmaintained/mammun/default.nix b/hosts/_unmaintained/mammun/default.nix deleted file mode 100644 index 5c66d9fa..00000000 --- a/hosts/_unmaintained/mammun/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - config, - lib, - nixpkgs, - home-manager, - pkgs, - ... -}: { - imports = [ - ./hardware - ./networking.nix - - ../../sys - ]; - soispha = { - locale.enable = true; - users = { - hashedPassword = "$y$jDT$O/42/7REOL50onRYcTV9R1$Ot3bPAh2raHmPN3yScP4wsJRtNqrMtTBzOq9oRJeRA0"; - }; - }; - - system.stateVersion = "23.05"; -} diff --git a/hosts/_unmaintained/mammun/hardware/cpu.nix b/hosts/_unmaintained/mammun/hardware/cpu.nix deleted file mode 100644 index 70eaff6f..00000000 --- a/hosts/_unmaintained/mammun/hardware/cpu.nix +++ /dev/null @@ -1,3 +0,0 @@ -{...}: { - hardware.cpu.amd.updateMicrocode = true; # Why not? -} diff --git a/hosts/_unmaintained/mammun/hardware/default.nix b/hosts/_unmaintained/mammun/hardware/default.nix deleted file mode 100644 index b1683d47..00000000 --- a/hosts/_unmaintained/mammun/hardware/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - config, - lib, - pkgs, - modulesPath, - ... -}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ./cpu.nix - ./gpu.nix - ]; - - nixpkgs.hostPlatform = "x86_64-linux"; - - system.fileSystemLayouts = { - enable = true; - mainDisk = "/dev/disk/by-uuid/ac6c5efd-51a7-42e7-a8cd-668a350554b1"; - efiDisk = "/dev/disk/by-uuid/7931-40E5"; - }; - - boot = { - kernelModules = ["kvm-amd"]; - - initrd.availableKernelModules = ["xhci_pci" "ahci" "ehci_pci" "sd_mod" "sr_mod" "sdhci_pci"]; - }; -} diff --git a/hosts/_unmaintained/mammun/hardware/gpu.nix b/hosts/_unmaintained/mammun/hardware/gpu.nix deleted file mode 100644 index 939497db..00000000 --- a/hosts/_unmaintained/mammun/hardware/gpu.nix +++ /dev/null @@ -1,14 +0,0 @@ -{pkgs, ...}: { - boot.initrd.kernelModules = ["amdgpu"]; - # for Southern Islands (SI ie. GCN 1) cards and for Sea Islands (CIK ie. GCN 2) cards - boot.kernelParams = ["radeon.si_support=0" "amdgpu.si_support=1" "radeon.cik_support=0" "amdgpu.cik_support=1"]; - - hardware.opengl.driSupport = true; - # For 32 bit applications - hardware.opengl.driSupport32Bit = true; - - hardware.opengl.extraPackages = with pkgs; [ - rocm-opencl-icd - rocm-opencl-runtime - ]; -} diff --git a/hosts/_unmaintained/mammun/networking.nix b/hosts/_unmaintained/mammun/networking.nix deleted file mode 100644 index e243ebe0..00000000 --- a/hosts/_unmaintained/mammun/networking.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - config, - lib, - ... -}: { - networking = { - networkmanager = { - enable = true; - dns = "default"; - wifi = { - powersave = true; - }; - }; - hostName = "mammun"; - }; -} diff --git a/hosts/_unmaintained/marduk/default.nix b/hosts/_unmaintained/marduk/default.nix deleted file mode 100644 index 2379fcdf..00000000 --- a/hosts/_unmaintained/marduk/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{lib, ...}: { - imports = [ - ./hardware - ./networking.nix - ]; - - console = { - keyMap = "dvorak"; - }; - # needed to override defaults - isoImage.isoName = lib.mkForce "nixos-iso"; - - system.stateVersion = "23.05"; -} diff --git a/hosts/_unmaintained/marduk/hardware/default.nix b/hosts/_unmaintained/marduk/hardware/default.nix deleted file mode 100644 index 4fed1d06..00000000 --- a/hosts/_unmaintained/marduk/hardware/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - lib, - pkgs, - modulesPath, - ... -}: { - imports = [ - (modulesPath + "/installer/cd-dvd/installation-cd-graphical-gnome.nix") - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - - boot = { - kernelModules = ["rtw89"]; - # FIXME: The kernel version should probably be updated, considering that it's 6.1 <2024-03-23> - kernelPackages = pkgs.linuxPackages_6_1; # use this kernel, as it's supported by zfs - zfs.package = pkgs.zfs_unstable; # Default zfs is "broken" (to nixos) on the newest kernel - }; -} diff --git a/hosts/_unmaintained/marduk/networking.nix b/hosts/_unmaintained/marduk/networking.nix deleted file mode 100644 index da8f3850..00000000 --- a/hosts/_unmaintained/marduk/networking.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - config, - lib, - ... -}: { - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; - networking.hostName = "marduk"; -} diff --git a/hosts/apzu/default.nix b/hosts/apzu/default.nix index 331da147..133342c3 100644 --- a/hosts/apzu/default.nix +++ b/hosts/apzu/default.nix @@ -2,7 +2,6 @@ lib, pkgs, baseLib, - config, ... }: { imports = [ @@ -60,7 +59,7 @@ # Launcher "<Meta-R>" = {command = ["spawn" "${lib.getExe pkgs.rofi} -show combi -modes combi -combi-modes 'window, drun, run' -show-icons"];}; - "<Meta-<F1>>" = {command = ["spawn" "${lib.getExe config.home-manager.users.soispha.soispha.programs.neorg.package} dmenu"];}; + "<Meta-<F1>>" = {command = ["spawn" "${lib.getExe pkgs.tskm} open select"];}; "<Meta-<F2>>" = {command = ["spawn" "${lib.getExe pkgs.keepassxc}"];}; "<Meta-<F3>>" = {command = ["spawn" "${lib.getExe pkgs.signal-desktop}"];}; # "<Meta-<F4>>" = {command = ["spawn" "${lib.getExe pkgs.steam}"];}; @@ -79,11 +78,11 @@ "<Meta+Shift-0>" = {command = ["set-view-tags" (builtins.toString ((baseLib.pow 2 32) - 1))];}; # Mouse - "<MOUSE_LEFT>" = { + "<Meta-<MOUSE_LEFT>>" = { command = ["move-view"]; map_mode = "MapMouse"; }; - "<MOUSE_RIGHT>" = { + "<Meta-<MOUSE_RIGHT>>" = { command = ["resize-view"]; map_mode = "MapMouse"; }; diff --git a/hosts/hostinfo.toml b/hosts/hostinfo.toml index 4ee5918c..b51c0501 100644 --- a/hosts/hostinfo.toml +++ b/hosts/hostinfo.toml @@ -3,15 +3,3 @@ description = "This is my main desktop" [Apzu] description = "This is my light laptop, with modern hardware" - -[Mammun] -description = "This is my older and heavier laptop" - -[Lahmu] -description = "This is my config running on a vm" - -[Marduk] -description = "This is a small compilation target, to get a install-iso" - -[Marduk] -description = "A host mainly used to setup private gpg keys, without network access or other such things" diff --git a/hosts/tiamat/default.nix b/hosts/tiamat/default.nix index d18c0533..470f88cb 100644 --- a/hosts/tiamat/default.nix +++ b/hosts/tiamat/default.nix @@ -4,7 +4,6 @@ baseLib, qmk_firmware, system, - config, ... }: { imports = [ @@ -68,7 +67,7 @@ # Launcher "O" = {command = ["spawn" "${lib.getExe pkgs.rofi} -show combi -modes combi -combi-modes 'window,drun,run' -show-icons"];}; - "P" = {command = ["spawn" "${lib.getExe config.home-manager.users.soispha.soispha.programs.neorg.package} dmenu"];}; + "P" = {command = ["spawn" "${lib.getExe pkgs.tskm} open select"];}; "Q" = {command = ["spawn" "${lib.getExe pkgs.keepassxc}"];}; # "R" = {command = ["spawn" "nheko"];}; "S" = {command = ["spawn" "${lib.getExe pkgs.signal-desktop}"];}; diff --git a/lib/default.nix b/lib/default.nix index 80227cf4..f18e4b33 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -26,6 +26,34 @@ (lib.lists.imap0 (index: elem: elem * (pow 2 index)) binaryList); /* + Converts `string` to a (probably) unique numerical id. + + This is achieved by hashing the string and returning the first six hex-digits + converted to a base 10 number. + + # Type + + idFromString :: String -> Int + + # Arguments + + string + : The string to use as seed for the id generation. + + # Examples + + idFromString "3d-printer" + => 10365713 + */ + idFromString = string: let + inputSeed = + builtins.concatStringsSep "" + (lib.lists.take 6 + (lib.strings.stringToCharacters (builtins.hashString "sha256" string))); + in + lib.trivial.fromHexString inputSeed; + + /* source: https://github.com/NixOS/nix/issues/10387#issuecomment-2494597690 Raises the `base` to the power of `power`. @@ -65,5 +93,5 @@ then (base * (pow base (power - 1))) else builtins.throw "Negative powers are not supported"; in { - inherit binaryToDecimal pow; + inherit binaryToDecimal idFromString pow; } diff --git a/modules/by-name/at/atuin/atuin.zsh b/modules/by-name/at/atuin/atuin.zsh new file mode 100644 index 00000000..60fb74fe --- /dev/null +++ b/modules/by-name/at/atuin/atuin.zsh @@ -0,0 +1,126 @@ +#! /usr/bin/env zsh +# shellcheck disable=SC2034,SC2153,SC2086,SC2155 + +# Above line is because shellcheck doesn't support zsh, per +# https://github.com/koalaman/shellcheck/wiki/SC1071, and the ignore: param in +# ludeeus/action-shellcheck only supports _directories_, not _files_. So +# instead, we manually add any error the shellcheck step finds in the file to +# the above line ... + +if ! [[ $options[zle] = on ]]; then + return 0 +fi + +# Source this in your ~/.zshrc +autoload -U add-zsh-hook + +zmodload zsh/datetime 2>/dev/null + +# If zsh-autosuggestions is installed, configure it to use Atuin's search. If +# you'd like to override this, then add your config after the $(atuin init zsh) +# in your .zshrc +_zsh_autosuggest_strategy_atuin() { + suggestion=$(ATUIN_QUERY="$1" atuin search --cmd-only --limit 1 --search-mode prefix) +} + +if [ -n "${ZSH_AUTOSUGGEST_STRATEGY:-}" ]; then + ZSH_AUTOSUGGEST_STRATEGY=("atuin" "${ZSH_AUTOSUGGEST_STRATEGY[@]}") +else + ZSH_AUTOSUGGEST_STRATEGY=("atuin") +fi + +export ATUIN_SESSION=$(atuin uuid) +ATUIN_HISTORY_ID="" + +_atuin_preexec() { + local id + id=$(atuin history start -- "$1") + export ATUIN_HISTORY_ID="$id" + __atuin_preexec_time=${EPOCHREALTIME-} +} + +_atuin_precmd() { + local EXIT="$?" __atuin_precmd_time=${EPOCHREALTIME-} + + [[ -z "${ATUIN_HISTORY_ID:-}" ]] && return + + local duration="" + if [[ -n $__atuin_preexec_time && -n $__atuin_precmd_time ]]; then + printf -v duration %.0f $(((__atuin_precmd_time - __atuin_preexec_time) * 1000000000)) + fi + + (ATUIN_LOG=error atuin history end --exit $EXIT ${duration:+--duration=$duration} -- $ATUIN_HISTORY_ID &) >/dev/null 2>&1 + export ATUIN_HISTORY_ID="" +} + +_atuin_search() { + emulate -L zsh + zle -I + + # swap stderr and stdout, so that the tui stuff works + # TODO: not this + local output + # shellcheck disable=SC2048 + output=$(ATUIN_SHELL_ZSH=t ATUIN_LOG=error ATUIN_QUERY=$BUFFER atuin search $* -i 3>&1 1>&2 2>&3) + + zle reset-prompt + + if [[ -n $output ]]; then + RBUFFER="" + LBUFFER=$output + + if [[ $LBUFFER == __atuin_accept__:* ]] + then + LBUFFER=${LBUFFER#__atuin_accept__:} + zle accept-line + fi + fi +} +_atuin_search_vicmd() { + _atuin_search --keymap-mode=vim-normal +} +_atuin_search_viins() { + _atuin_search --keymap-mode=vim-insert +} + +_atuin_up_search() { + # Only trigger if the buffer is a single line + if [[ ! $BUFFER == *$'\n'* ]]; then + _atuin_search --shell-up-key-binding "$@" + else + zle up-line + fi +} +_atuin_up_search_vicmd() { + _atuin_up_search --keymap-mode=vim-normal +} +_atuin_up_search_viins() { + _atuin_up_search --keymap-mode=vim-insert +} + +add-zsh-hook preexec _atuin_preexec +add-zsh-hook precmd _atuin_precmd + +zle -N atuin-search _atuin_search +zle -N atuin-search-vicmd _atuin_search_vicmd +zle -N atuin-search-viins _atuin_search_viins +zle -N atuin-up-search _atuin_up_search +zle -N atuin-up-search-vicmd _atuin_up_search_vicmd +zle -N atuin-up-search-viins _atuin_up_search_viins + +# These are compatibility widget names for "atuin <= 17.2.1" users. +zle -N _atuin_search_widget _atuin_search +zle -N _atuin_up_search_widget _atuin_up_search + +bindkey -M emacs '^r' atuin-search +bindkey -M viins '^r' atuin-search-viins +bindkey -M vicmd '/' atuin-search +bindkey -M emacs '^[[A' atuin-up-search +bindkey -M vicmd '^[[A' atuin-up-search-vicmd +bindkey -M viins '^[[A' atuin-up-search-viins +bindkey -M emacs '^[OA' atuin-up-search +bindkey -M vicmd '^[OA' atuin-up-search-vicmd +bindkey -M viins '^[OA' atuin-up-search-viins +bindkey -M vicmd 'k' atuin-up-search-vicmd + +# vim: ft=zsh diff --git a/modules/by-name/at/atuin/module.nix b/modules/by-name/at/atuin/module.nix index 604ee4ef..2061fd71 100644 --- a/modules/by-name/at/atuin/module.nix +++ b/modules/by-name/at/atuin/module.nix @@ -18,11 +18,15 @@ in { group = "users"; }; + soispha.programs.zsh.integrations.atuin = ./atuin.zsh; + home-manager.users.soispha = { programs.atuin = { enable = true; package = pkgs.atuin-dvorak; - enableZshIntegration = config.soispha.programs.zsh.enable; + + # We can do this on our own. + enableZshIntegration = false; settings = { key_path = "${config.age.secrets.atuin_encryption_key.path}"; diff --git a/modules/by-name/ca/cargo/module.nix b/modules/by-name/ca/cargo/module.nix new file mode 100644 index 00000000..f7153509 --- /dev/null +++ b/modules/by-name/ca/cargo/module.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + ... +}: let + cfg = config.soispha.programs.cargo; +in { + options.soispha.programs.cargo = { + enable = lib.mkEnableOption "cargo"; + }; + config = lib.mkIf cfg.enable { + home-manager.users.soispha = { + home.sessionVariables = { + CARGO_HOME = "${config.home-manager.users.soispha.xdg.dataHome}/cargo"; + }; + }; + }; +} diff --git a/modules/home.legacy/conf/firefox/config/extensions/extensions.json b/modules/by-name/fi/firefox/extensions.json index 298c570d..062f1a5e 100644 --- a/modules/home.legacy/conf/firefox/config/extensions/extensions.json +++ b/modules/by-name/fi/firefox/extensions.json @@ -19,9 +19,9 @@ "addonId": "{b11bea1f-a888-4332-8d8a-cec2be7d24b9}", "default_area": "navbar", "pname": "torproject-snowflake", - "sha256": "sha256:4028bad3bef6610a985edda954d5c4f1487480a8f32f230d9edf88d97c8dd88e", - "url": "https://addons.mozilla.org/firefox/downloads/file/4379590/torproject_snowflake-0.9.2.xpi", - "version": "0.9.2" + "sha256": "sha256:615c0d570f41e721a91fc4f334377a61732171b65eb1a4429d78681e85bc8878", + "url": "https://addons.mozilla.org/firefox/downloads/file/4458115/torproject_snowflake-0.9.3.xpi", + "version": "0.9.3" }, "tridactyl-vim": { "addonId": "tridactyl.vim@cmcaine.co.uk", diff --git a/modules/by-name/fi/firefox/module.nix b/modules/by-name/fi/firefox/module.nix new file mode 100644 index 00000000..17bfa049 --- /dev/null +++ b/modules/by-name/fi/firefox/module.nix @@ -0,0 +1,234 @@ +{ + lib, + config, + pkgs, + ... +}: let + cfg = config.soispha.programs.firefox; + + mkAllowedExtension = extension: + lib.attrsets.nameValuePair extension.addonId { + installation_mode = "normal_installed"; + updates_disabled = true; + inherit (extension) default_area; + install_url = "file://${builtins.fetchurl { + inherit + (extension) + url + sha256 + ; + }}"; + }; + + allowedExtensions = + builtins.listToAttrs + (builtins.map mkAllowedExtension (builtins.attrValues + cfg.extensions)); + + mkBlockedExtension = id: + lib.attrsets.nameValuePair id { + install_mode = "blocked"; + }; + blockedExtensions = builtins.listToAttrs (builtins.map mkBlockedExtension [ + # these are the default search engines + "addons-search-detection@mozilla.com" + "amazon@search.mozilla.org" + "bing@search.mozilla.org" + "ddg@search.mozilla.org" + "google@search.mozilla.org" + "wikipedia@search.mozilla.org" + ]); + + mkProfile = import ./profile.nix {inherit config pkgs;}; +in { + options.soispha.programs.firefox = { + enable = lib.mkEnableOption "firefox"; + + profiles = lib.mkOption { + type = lib.types.attrsOf (lib.types.submodule { + options = { + id = lib.mkOption { + type = lib.types.int; + description = "The id of this profile."; + }; + name = lib.mkOption { + type = lib.types.str; + description = "The name of this profile"; + }; + }; + }); + description = "A list of profies to create besides the default `default` profile."; + default = {}; + apply = value: + lib.attrsets.mapAttrs' (name: value: lib.attrsets.nameValuePair name (mkProfile value)) + value; + }; + + extensions = lib.mkOption { + type = lib.types.attrsOf ( + lib.types.submodule { + options = { + addonId = lib.mkOption { + type = lib.types.str; + example = "addon@darkreader.org"; + description = "The addon id of this extension"; + }; + default_area = lib.mkOption { + type = lib.types.enum ["navbar" "menupanel"]; + example = "navbar"; + description = '' + Where to put this extension by default. + `navbar` means into the top-left bar as icon. + `menupanel` means hidden behind a “all extensions” button. + ''; + }; + pname = lib.mkOption { + type = lib.types.str; + example = "darkreader"; + description = "The package name of this extension"; + }; + sha256 = lib.mkOption { + type = lib.types.str; + example = "sha256:f565b2263a71626a0310380915b7aef90be8cc6fe16ea43ac1a0846efedc2e4c"; + description = "The fetchurl copatible hash of this extension"; + }; + url = lib.mkOption { + type = lib.types.str; + example = "https://addons.mozilla.org/firefox/downloads/file/4439735/darkreader-4.9.103.xpi"; + description = "The download url of this extension."; + }; + version = lib.mkOption { + type = lib.types.str; + example = "4.9.103"; + description = "The version of this extension"; + }; + }; + } + ); + + default = builtins.fromJSON (builtins.readFile ./extensions.json); + + description = '' + A list of the extensions that should be installed. + You can use a tool like `generate_extensions` to generate this config. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + programs.firefox = { + enable = true; + preferencesStatus = "locked"; + + languagePacks = ["en-CA" "de" "sv-SE"]; + + nativeMessagingHosts.packages = [ + pkgs.tridactyl-native + pkgs.keepassxc + ]; + + # NOTE: See https://mozilla.github.io/policy-templates for documentation <2023-10-21> + policies = { + # NixOS manages this already + DisableAppUpdate = true; + + DisableFirefoxAccounts = true; + DisableFirefoxScreenshots = true; + + # KeepassXC does this for me + DisableMasterPasswordCreation = true; + + # I use a self-hosted services for that + DisablePocket = true; + + # I don't want to lose my data + DisableProfileRefresh = true; + + DisableDeveloperTools = false; + + DisplayBookmarksToolbar = "newtab"; + DisplayMenuBar = "default-off"; + + DNSOverHTTPS = { + Enabled = true; + Locked = false; + }; + # The concept of a "default browser" does not apply to my NixOS config + DontCheckDefaultBrowser = true; + + ExtensionSettings = + { + "*" = { + # Blocking the extension install here, also blocks the 'about:debugging' page + + # blocked_install_message = '' + # You can't install a extension manually, + # please specify it in your NixOS configuration + # ''; + installation_mode = "allowed"; + }; + } + // allowedExtensions + // blockedExtensions; + RequestedLocales = config.programs.firefox.languagePacks; + + ExtensionUpdate = false; + + HardwareAcceleration = true; + + # KeepassXC and such things + OfferToSaveLogins = false; + PasswordManagerEnabled = false; + + PDFjs = { + Enabled = true; + # Don't honor documents right to be un-copy-able + EnablePermissions = false; + }; + + SearchBar = "unified"; + }; + + # Beware, that we already set them per-profile in the home-manager config. + preferences = {}; + }; + + home-manager.users.soispha = { + home.sessionVariables = { + # Improve touch input and make scrolling smother + MOZ_USE_XINPUT2 = "1"; + + # Tell Firefox to use Wayland + MOZ_ENABLE_WAYLAND = 1; + + # Tell GTK to use portals + GTK_USE_PORTAL = 1; + + BROWSER = "firefox"; + }; + + programs.firefox = { + enable = true; + arkenfox = { + enable = true; + version = "133.0"; + }; + + # We use the NixOS module to provide us a package. + # HACK: Extract the package from the system-path to get a version for + # arkenfox-nixos to compare to. <2025-04-02> + package = lib.lists.findSingle (x: builtins.hasAttr "pname" x && x.pname == "firefox") "none" "multiple" config.environment.systemPackages; + + profiles = + { + default = mkProfile { + isDefault = true; + id = 0; + name = "default"; + }; + } + // cfg.profiles; + }; + }; + }; +} diff --git a/modules/by-name/fi/firefox/profile.nix b/modules/by-name/fi/firefox/profile.nix new file mode 100644 index 00000000..195c2075 --- /dev/null +++ b/modules/by-name/fi/firefox/profile.nix @@ -0,0 +1,180 @@ +{ + config, + pkgs, +}: preConfig: ({ + userChrome = ./userChrome.css; + + bookmarks = { + force = true; + settings = []; + }; + + search = { + default = "brave-search"; + privateDefault = "brave-search"; + force = true; + engines = import ./search_engines {inherit pkgs;}; + + order = [ + # DEFAULT + "brave-search" + + # NIX + "nix-packages" + "nix-options" + "nixpkgs-issues" + "homemanager-options" + "nixos-wiki" + "nixpkgs-pull-request-tracker" + + # RUST + "rust-std" + "rust-tokio" + + # OTHER + "google-scholar" + "wikipedia" + "arch-wiki" + ]; + }; + + settings = { + "browser.download.dir" = "${config.home-manager.users.soispha.xdg.userDirs.download}"; + # "browser.download.useDownloadDir" = true; + # "browser.download.folderList" = 2; + + # QoL + "general.autoScroll" = false; + "browser.tabs.insertAfterCurrent" = true; + "browser.tabs.loadInBackground" = true; + "browser.ctrlTab.recentlyUsedOrder" = false; + "browser.search.widget.inNavBar" = true; + "findbar.highlightAll" = true; + + "devtools.toolbox.host" = "right"; + "devtools.toolsidebar-width.inspector" = 700; + + # Keep translations useful + "browser.translations.automaticallyPopup" = true; + "browser.translations.neverTranslateLanguages" = "de"; + + # Improve Tab UI + "browser.tabs.inTitlebar" = 1; + "browser.toolbars.bookmarks.visibility" = "never"; + "browser.places.importBookmarksHTML" = true; + + # Theme + "extensions.activeThemeID" = "firefox-alpenglow@mozilla.org"; + "extensions.extensions.activeThemeID" = "firefox-alpenglow@mozilla.org"; + + # disable updates (pretty pointless with nix) + "extensions.update.autoUpdateDefault" = false; + "extensions.update.enabled" = false; + "app.update.channel" = "default"; + "browser.shell.checkDefaultBrowser" = false; + + # Allow my custom css + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + }; + + arkenfox = { + enable = true; + "0000".enable = true; + "0100" = { + enable = true; + "0102"."browser.startup.page".value = 3; + "0103"."browser.startup.homepage".value = "file:///home/dt/home.html"; + "0104"."browser.newtabpage.enabled".value = true; + }; + "0200" = { + enable = true; + }; + "0300" = { + enable = true; + }; + "0400" = { + enable = false; + }; + "0600" = { + enable = true; + }; + "0700" = { + enable = true; + "0710"."network.trr.mode" = { + enable = true; + value = 3; + }; + }; + "0800" = { + enable = true; + }; + "0900" = { + enable = true; + }; + "1000" = { + enable = true; + "1001"."browser.cache.disk.enable".value = true; + "1003"."browser.sessionstore.privacy_level".value = 0; + }; + "1200" = { + enable = true; + "1241"."security.mixed_content.block_display_content".enable = true; + }; + "1600" = { + enable = true; + }; + "1700" = { + enable = true; + }; + "2000" = { + enable = true; + }; + "2400" = { + enable = true; + }; + "2600" = { + enable = true; + "2603" = { + "browser.download.start_downloads_in_tmp_dir".value = false; + "browser.helperApps.deleteTempFileOnExit".value = false; + }; + "2615"."permissions.default.shortcuts" = { + value = 2; + enable = true; + }; + }; + "2700" = { + enable = true; + }; + "2800" = { + enable = false; + "2810"."privacy.sanitize.sanitizeOnShutdown".value = false; + }; + "4000" = { + enable = true; + }; + "4500" = { + enable = true; + }; + "5000" = { + enable = true; + "5003"."signon.rememberSignons" = { + enable = true; + value = false; + }; + }; + "6000" = { + enable = true; + }; + "7000" = { + enable = true; + }; + "8000" = { + enable = true; + }; + "9000" = { + enable = true; + }; + }; + } + // preConfig) diff --git a/modules/home.legacy/conf/firefox/config/search/engines/default.nix b/modules/by-name/fi/firefox/search_engines/default.nix index 1c2045eb..51a447e1 100644 --- a/modules/home.legacy/conf/firefox/config/search/engines/default.nix +++ b/modules/by-name/fi/firefox/search_engines/default.nix @@ -1,81 +1,95 @@ {pkgs, ...}: { # DEFAULT - "Brave Search" = { + brave-search = { + name = "Brave Search"; urls = [{template = "https://search.brave.com/search?q={searchTerms}";}]; icon = ./logos/brave.svg; definedAliases = ["@bs"]; }; # NIX - "Nix Packages" = { + nix-packages = { + name = "Nix packages"; urls = [{template = "https://search.nixos.org/packages?type=packages&query={searchTerms}";}]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = ["@np"]; }; - "Nix functions" = { + nix-functions = { + name = "Nix functions"; urls = [{template = "https://noogle.dev/q?term={searchTerms}";}]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = ["@ng"]; }; - "NixOS Options" = { + nixos-options = { + name = "NixOS options"; urls = [{template = "https://search.nixos.org/options?type=options&query={searchTerms}";}]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = ["@no"]; }; - "HomeManager Options" = { + homemanager-options = { + name = "Home-Manager options"; urls = [{template = "https://home-manager-options.extranix.com/?query={searchTerms}&release=master";}]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = ["@nh"]; }; - "Nixpkgs issues" = { + nixpkgs-issues = { + name = "Nixpkgs issues"; urls = [{template = "https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";}]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = ["@ni"]; }; - "Nixpkgs pull requests" = { + nixpkgs-pull-requests = { + name = "Nixpkgs pull requests"; urls = [{template = "https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+{searchTerms}";}]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = ["@nr"]; }; - "Nixpkgs pull requests tracker" = { + nixpkgs-pull-requests-tracker = { + name = "Nixpkgs pull requests tracker"; urls = [{template = "https://nixpk.gs/pr-tracker.html?pr={searchTerms}";}]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = ["@nt"]; }; - "NixOS Wiki" = { + nixos-wiki = { + name = "NixOS Wiki"; urls = [{template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";}]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = ["@nw"]; }; # RUST - "Rust std" = { + rust-std = { + name = "Rust std"; urls = [{template = "https://doc.rust-lang.org/std/?search={searchTerms}";}]; icon = ./logos/rust_std.svg; definedAliases = ["@rs"]; }; - "Rust tokio" = { + rust-tokio = { + name = "Rust tokio"; urls = [{template = "https://docs.rs/tokio/latest/tokio/index.html?search={searchTerms}";}]; icon = ./logos/rust_tokio.png; definedAliases = ["@rt"]; }; # OTHER - "Google Scholar" = { + google-scholar = { + name = "Google Scholar"; urls = [{template = "https://scholar.google.com/scholar?hl=en&q={searchTerms}";}]; icon = ./logos/google_scholar.ico; definedAliases = ["@gs"]; }; - "Wikipedia" = { + wikipedia = { + name = "Wikipedia"; urls = [{template = "https://en.wikipedia.org/wiki/{searchTerms}";}]; icon = ./logos/wikipedia.svg; definedAliases = ["@wp"]; }; - "Arch Wiki" = { + arch-wiki = { + name = "Arch Wiki"; urls = [{template = "https://wiki.archlinux.org/index.php?search={searchTerms}";}]; icon = ./logos/arch_linux.svg; definedAliases = ["@aw"]; diff --git a/modules/home.legacy/conf/firefox/config/search/engines/logos/arch_linux.svg b/modules/by-name/fi/firefox/search_engines/logos/arch_linux.svg index 949b5c5f..949b5c5f 100644 --- a/modules/home.legacy/conf/firefox/config/search/engines/logos/arch_linux.svg +++ b/modules/by-name/fi/firefox/search_engines/logos/arch_linux.svg diff --git a/modules/home.legacy/conf/firefox/config/search/engines/logos/brave.svg b/modules/by-name/fi/firefox/search_engines/logos/brave.svg index 09dd2e42..09dd2e42 100644 --- a/modules/home.legacy/conf/firefox/config/search/engines/logos/brave.svg +++ b/modules/by-name/fi/firefox/search_engines/logos/brave.svg diff --git a/modules/home.legacy/conf/firefox/config/search/engines/logos/google_scholar.ico b/modules/by-name/fi/firefox/search_engines/logos/google_scholar.ico index 85d0c664..85d0c664 100644 --- a/modules/home.legacy/conf/firefox/config/search/engines/logos/google_scholar.ico +++ b/modules/by-name/fi/firefox/search_engines/logos/google_scholar.ico Binary files differdiff --git a/modules/home.legacy/conf/firefox/config/search/engines/logos/rust_std.svg b/modules/by-name/fi/firefox/search_engines/logos/rust_std.svg index 0091b5a8..0091b5a8 100644 --- a/modules/home.legacy/conf/firefox/config/search/engines/logos/rust_std.svg +++ b/modules/by-name/fi/firefox/search_engines/logos/rust_std.svg diff --git a/modules/home.legacy/conf/firefox/config/search/engines/logos/rust_tokio.png b/modules/by-name/fi/firefox/search_engines/logos/rust_tokio.png index f1de55ff..f1de55ff 100644 --- a/modules/home.legacy/conf/firefox/config/search/engines/logos/rust_tokio.png +++ b/modules/by-name/fi/firefox/search_engines/logos/rust_tokio.png Binary files differdiff --git a/modules/home.legacy/conf/firefox/config/search/engines/logos/wikipedia.svg b/modules/by-name/fi/firefox/search_engines/logos/wikipedia.svg index dc32f984..dc32f984 100644 --- a/modules/home.legacy/conf/firefox/config/search/engines/logos/wikipedia.svg +++ b/modules/by-name/fi/firefox/search_engines/logos/wikipedia.svg diff --git a/modules/by-name/fi/firefox/update_extensions.sh b/modules/by-name/fi/firefox/update_extensions.sh new file mode 100755 index 00000000..efcc83c6 --- /dev/null +++ b/modules/by-name/fi/firefox/update_extensions.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +# The `generate_extensions` binary is provided in the devshell. + +generate_extensions \ + darkreader:navbar \ + keepassxc-browser:navbar \ + vhack-libredirect:navbar \ + torproject-snowflake:navbar \ + tridactyl-vim:menupanel \ + ublock-origin:menupanel \ + >"$(dirname "$0")"/extensions.json diff --git a/modules/home.legacy/conf/firefox/config/chrome/userChrome.css b/modules/by-name/fi/firefox/userChrome.css index 0b3aff77..0b3aff77 100644 --- a/modules/home.legacy/conf/firefox/config/chrome/userChrome.css +++ b/modules/by-name/fi/firefox/userChrome.css diff --git a/modules/by-name/ho/home-manager/module.nix b/modules/by-name/ho/home-manager/module.nix index f5304170..5da40834 100644 --- a/modules/by-name/ho/home-manager/module.nix +++ b/modules/by-name/ho/home-manager/module.nix @@ -8,7 +8,6 @@ system, # bins # TODO: Integrate these <2024-05-22> - river_init_lesser, shell_library, qmk_firmware, # external deps @@ -17,6 +16,7 @@ impermanence, nix-index-database, nixVim, + arkenfox-nixos, ... }: let cfg = config.soispha.home-manager; @@ -42,7 +42,6 @@ in { # extra information system # bins - river_init_lesser shell_library qmk_firmware # external deps @@ -51,6 +50,7 @@ in { impermanence nixVim nix-index-database + arkenfox-nixos ; }; }; diff --git a/modules/by-name/lf/lf/commands/default.nix b/modules/by-name/lf/lf/commands/default.nix index 9a709168..0c42607b 100644 --- a/modules/by-name/lf/lf/commands/default.nix +++ b/modules/by-name/lf/lf/commands/default.nix @@ -2,53 +2,38 @@ functionCall = { name, dependencies, - ... + keepPath ? false, }: pkgs.writeShellApplication { inherit name; text = builtins.readFile ./base.sh + builtins.readFile ./scripts/${name}.sh; - runtimeInputs = dependencies; + runtimeInputs = [pkgs.lf pkgs.mktemp pkgs.coreutils] ++ dependencies; + inheritPath = keepPath; } + "/bin/${name}"; # closes the lf tui - shell = { - name, - dependencies, - ... - }: '' + shell = args: '' ''${{ - ${functionCall {inherit name dependencies;}} + ${functionCall args} }} ''; # runs the command in the ui/term bar - pipe = { - name, - dependencies, - ... - }: '' + pipe = args: '' %{{ - ${functionCall {inherit name dependencies;}} + ${functionCall args} }} ''; # runs the command in the background - async = { - name, - dependencies, - ... - }: '' + async = args: '' &{{ - ${functionCall {inherit name dependencies;}} + ${functionCall args} }} ''; # adds a prompt after the command has run - wait = { - name, - dependencies, - ... - }: '' + wait = args: '' !{{ - ${functionCall {inherit name dependencies;}} + ${functionCall args} }} ''; in { @@ -83,20 +68,21 @@ in { dragon = pipe { name = "dragon"; - dependencies = [pkgs.xdragon]; + dependencies = [pkgs.dragon-drop]; }; dragon_individual = pipe { name = "dragon_individual"; - dependencies = [pkgs.xdragon]; + dependencies = [pkgs.dragon-drop]; }; dragon_stay = pipe { name = "dragon_stay"; - dependencies = [pkgs.xdragon]; + dependencies = [pkgs.dragon-drop]; }; execute = shell { name = "execute"; dependencies = []; + keepPath = true; }; follow_link = pipe { name = "follow_link"; @@ -118,6 +104,7 @@ in { mk_script = shell { name = "mk_script"; dependencies = []; + keepPath = true; }; set_clipboard_path = async { @@ -137,6 +124,11 @@ in { dependencies = [pkgs.gnused]; }; + open = async { + name = "open"; + dependencies = [pkgs.handlr-regex]; + }; + trash = pipe { name = "trash"; dependencies = [pkgs.trash-cli]; @@ -153,5 +145,6 @@ in { view_file = async { name = "view_file"; dependencies = with pkgs; [file]; + keepPath = true; }; } diff --git a/modules/by-name/lf/lf/commands/scripts/dragon.sh b/modules/by-name/lf/lf/commands/scripts/dragon.sh index 299d7bbe..916c09ee 100755 --- a/modules/by-name/lf/lf/commands/scripts/dragon.sh +++ b/modules/by-name/lf/lf/commands/scripts/dragon.sh @@ -13,5 +13,5 @@ while read -r file; do set -- "$@" "$file" done <"$(echo "$fx" | tmp)" -dragon --all --and-exit "$@" +dragon-drop --all --and-exit "$@" # vim: ft=sh diff --git a/modules/by-name/lf/lf/commands/scripts/dragon_individual.sh b/modules/by-name/lf/lf/commands/scripts/dragon_individual.sh index 1cb603d9..c6b3b2a6 100755 --- a/modules/by-name/lf/lf/commands/scripts/dragon_individual.sh +++ b/modules/by-name/lf/lf/commands/scripts/dragon_individual.sh @@ -13,5 +13,5 @@ while read -r file; do set -- "$@" "$file" done <"$(echo "$fx" | tmp)" -dragon "$@" +dragon-drop "$@" # vim: ft=sh diff --git a/modules/by-name/lf/lf/commands/scripts/dragon_stay.sh b/modules/by-name/lf/lf/commands/scripts/dragon_stay.sh index 4a16e802..7296a6b9 100755 --- a/modules/by-name/lf/lf/commands/scripts/dragon_stay.sh +++ b/modules/by-name/lf/lf/commands/scripts/dragon_stay.sh @@ -13,5 +13,5 @@ while read -r file; do set -- "$@" "$file" done <"$(echo "$fx" | tmp)" -dragon --all "$@" +dragon-drop --all "$@" # vim: ft=sh diff --git a/modules/by-name/lf/lf/commands/scripts/open.sh b/modules/by-name/lf/lf/commands/scripts/open.sh new file mode 100755 index 00000000..b494074f --- /dev/null +++ b/modules/by-name/lf/lf/commands/scripts/open.sh @@ -0,0 +1,15 @@ +# shellcheck shell=sh + +# shellcheck disable=SC2269 +f="$f" +# shellcheck disable=SC2269 +fx="$fx" +# shellcheck disable=SC2269 +fs="$fs" +# shellcheck disable=SC2269 +id="$id" + +# TODO: For some reason, `xdg-utils` tries to open firefox with it's default profile for +# _everything_. Using `handlr-regex` sort-of solves this. <2025-04-04> +handlr open "$f" +# vim: ft=sh diff --git a/modules/by-name/lf/lf/commands/scripts/trash_clear.sh b/modules/by-name/lf/lf/commands/scripts/trash_clear.sh index faa3c553..a41dce27 100755 --- a/modules/by-name/lf/lf/commands/scripts/trash_clear.sh +++ b/modules/by-name/lf/lf/commands/scripts/trash_clear.sh @@ -1,8 +1,8 @@ # shellcheck shell=sh -while read -r file; do +while IFS="$(printf '\n')" read -r file; do set -- "$@" "$(pwd)/$file" -done <"$(conceal list | fzf --multi --ansi | awk '{for(i=3; i<=NF; i++) {print $i}}' | tmp)" +done <"$(conceal list | fzf --multi --ansi | awk '{$1="";$2=""; print $0}' | sed 's/^\s*//' | tmp)" [ "$#" -ne 0 ] && trash empty --match=exact "$@" diff --git a/modules/by-name/lf/lf/commands/scripts/trash_restore.sh b/modules/by-name/lf/lf/commands/scripts/trash_restore.sh index f685345f..cc2d4890 100755 --- a/modules/by-name/lf/lf/commands/scripts/trash_restore.sh +++ b/modules/by-name/lf/lf/commands/scripts/trash_restore.sh @@ -9,9 +9,9 @@ fs="$fs" # shellcheck disable=SC2269 id="$id" -while read -r file; do +while IFS="$(printf '\n')" read -r file; do set -- "$@" "$(pwd)/$file" -done <"$(conceal list | fzf --multi --ansi | awk '{for(i=3; i<=NF; i++) {print $i}}' | tmp)" +done <"$(conceal list | fzf --multi --ansi | awk '{$1="";$2=""; print $0}' | sed 's/^\s*//' | tmp)" [ "$#" -ne 0 ] && trash restore --match=exact "$@" # vim: ft=sh diff --git a/modules/by-name/lf/lf/ctpv/default.nix b/modules/by-name/lf/lf/ctpv/default.nix index 3748eca4..98438fba 100644 --- a/modules/by-name/lf/lf/ctpv/default.nix +++ b/modules/by-name/lf/lf/ctpv/default.nix @@ -1,5 +1,4 @@ { - sysLib, lib, config, pkgs, @@ -8,15 +7,15 @@ functionCall = { name, dependencies, - replacementStrings, scriptPath, - ... + environment, }: - sysLib.writeShellScript { + pkgs.writeShellApplication { inherit name; - src = scriptPath; - keepPath = false; - inherit replacementStrings dependencies; + text = builtins.readFile ./helpers.sh + builtins.readFile scriptPath; + inheritPath = false; + runtimeInputs = dependencies; + runtimeEnv = environment; } + "/bin/${name}"; @@ -24,8 +23,8 @@ matches, priority, dependencies, - replacementStrings, previewer, + environment, }: let mkMimePath = val: let split = lib.strings.splitString "/" val; @@ -49,7 +48,7 @@ inherit name dependencies - replacementStrings + environment ; scriptPath = previewer; }; @@ -93,6 +92,12 @@ }; }; + environment = lib.mkOption { + type = lib.types.attrsOf lib.types.str; + default = {}; + description = "Environment variables to set for the script"; + }; + previewer = lib.mkOption { type = lib.types.pathInStore; description = "The path to the preview script or binary"; @@ -104,13 +109,6 @@ default = 0; description = "The priority to use this previewer."; }; - replacementStrings = lib.mkOption { - type = lib.types.attrsOf (lib.types.either lib.types.str lib.types.pathInStore); - default = { - HELPERS = ./helpers.sh; - }; - description = "Arbitrary strings to replace in the shell script."; - }; dependencies = lib.mkOption { type = lib.types.listOf lib.types.package; default = []; @@ -153,17 +151,6 @@ in { package = lib.mkPackageOption pkgs "ctpv-64-types" {}; - # TODO: This is necessary, as the `./prev` dir is imported separately and as such - # cannot access the `./helpers.sh` file in it's parent directory. - # This separate import should ideally be removed. <2024-12-15> - helpers = lib.mkOption { - default = ./helpers.sh; - type = lib.types.pathInStore; - - internal = true; - readOnly = true; - }; - previewers = lib.mkOption { description = '' The previewers to add to the config file. diff --git a/modules/by-name/lf/lf/ctpv/helpers.sh b/modules/by-name/lf/lf/ctpv/helpers.sh index 6dc7fee6..30e4483a 100644 --- a/modules/by-name/lf/lf/ctpv/helpers.sh +++ b/modules/by-name/lf/lf/ctpv/helpers.sh @@ -59,7 +59,7 @@ preview_xxd() { # This has been derived mathematically. octet_columns=$(((2 * w - 22) / 7)) - if [ -n "$CTPV_LESS_PREVIEWER" ]; then + if [ "${CTPV_LESS_PREVIEWER:-unset}" != "-unset" ]; then __base_xxd_preview "$1" else __base_xxd_preview "$1" -len "$((h * octet_columns))" diff --git a/modules/by-name/lf/lf/ctpv/prev/any.sh b/modules/by-name/lf/lf/ctpv/prev/any.sh index 38dfd538..7ce72dcd 100644 --- a/modules/by-name/lf/lf/ctpv/prev/any.sh +++ b/modules/by-name/lf/lf/ctpv/prev/any.sh @@ -1,16 +1,13 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 w="$w" # shellcheck disable=SC2269 -e="$e" +e="${e:-[missing extension]}" # shellcheck disable=SC2269 -m="$m" +m="${m:-[missing mime type]}" # shellcheck disable=SC2269 h="$h" @@ -19,8 +16,6 @@ extension="$e" # shellcheck disable=SC2269 mime="$m" -. %HELPERS - is_not_printable() { grep --text --quiet '[^[:print:]]' "$1" } @@ -33,8 +28,8 @@ case "$mime" in *) echo "(ctpv did not recognize this file, with extension: '$extension' and mime: '$mime')" - directory_storage="%STORAGE_DIRECTORY/$mime" - mkdir --parents "$(dirname "%STORAGE_DIRECTORY/$mime")" + directory_storage="$STORAGE_DIRECTORY/$mime" + mkdir --parents "$(dirname "$STORAGE_DIRECTORY/$mime")" printf "%s -- %s\n" "$f" "$extension" >>"$directory_storage" ;; diff --git a/modules/by-name/lf/lf/ctpv/prev/application/archive/atool.sh b/modules/by-name/lf/lf/ctpv/prev/application/archive/atool.sh index 5f4baac7..3aebfbb3 100644 --- a/modules/by-name/lf/lf/ctpv/prev/application/archive/atool.sh +++ b/modules/by-name/lf/lf/ctpv/prev/application/archive/atool.sh @@ -1,11 +1,6 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" -. %HELPERS - atool --list -- "$f" diff --git a/modules/by-name/lf/lf/ctpv/prev/application/dll/dll.sh b/modules/by-name/lf/lf/ctpv/prev/application/dll/dll.sh index 678506eb..5237ecec 100644 --- a/modules/by-name/lf/lf/ctpv/prev/application/dll/dll.sh +++ b/modules/by-name/lf/lf/ctpv/prev/application/dll/dll.sh @@ -1,19 +1,14 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 w="$w" # shellcheck disable=SC2269 -e="$e" +e="${e:-[missing extension]}" # shellcheck disable=SC2269 -m="$m" +m="${m:-[missing mime type]}" # shellcheck disable=SC2269 h="$h" -. %HELPERS - preview_xxd "$f" diff --git a/modules/by-name/lf/lf/ctpv/prev/application/epub/default.nix b/modules/by-name/lf/lf/ctpv/prev/application/epub/default.nix index 40510a78..b4df845a 100644 --- a/modules/by-name/lf/lf/ctpv/prev/application/epub/default.nix +++ b/modules/by-name/lf/lf/ctpv/prev/application/epub/default.nix @@ -5,11 +5,11 @@ matches.mime = ["application/epub+zip"]; matches.extension = ["epub"]; priority = 1; - dependencies = with pkgs; [ - bk - epub-thumbnailer - chafa - gnused + dependencies = [ + pkgs.bk + pkgs.epub-thumbnailer + pkgs.chafa + pkgs.gnused ]; }; }; diff --git a/modules/by-name/lf/lf/ctpv/prev/application/epub/epub.sh b/modules/by-name/lf/lf/ctpv/prev/application/epub/epub.sh index 703e7dad..3bec0dd1 100644 --- a/modules/by-name/lf/lf/ctpv/prev/application/epub/epub.sh +++ b/modules/by-name/lf/lf/ctpv/prev/application/epub/epub.sh @@ -1,23 +1,18 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 w="$w" # shellcheck disable=SC2269 -e="$e" +e="${e:-[missing extension]}" # shellcheck disable=SC2269 -m="$m" +m="${m:-[missing mime type]}" # shellcheck disable=SC2269 h="$h" # shellcheck disable=SC2269 cache_f="$cache_f" -. %HELPERS - epub() { epub-thumbnailer "$f" "$cache_f" 20000 } diff --git a/modules/by-name/lf/lf/ctpv/prev/application/pdf/default.nix b/modules/by-name/lf/lf/ctpv/prev/application/pdf/default.nix index d3061ea8..24112737 100644 --- a/modules/by-name/lf/lf/ctpv/prev/application/pdf/default.nix +++ b/modules/by-name/lf/lf/ctpv/prev/application/pdf/default.nix @@ -8,6 +8,7 @@ pkgs.poppler_utils # for `pdftoppm` pkgs.chafa pkgs.gnused + pkgs.coreutils ]; }; }; diff --git a/modules/by-name/lf/lf/ctpv/prev/application/pdf/pdf.sh b/modules/by-name/lf/lf/ctpv/prev/application/pdf/pdf.sh index 2f807b1a..4d99f4b0 100644 --- a/modules/by-name/lf/lf/ctpv/prev/application/pdf/pdf.sh +++ b/modules/by-name/lf/lf/ctpv/prev/application/pdf/pdf.sh @@ -1,15 +1,10 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 cache_f="$cache_f" -. %HELPERS - pdf() { pdftoppm -f 1 -l 1 \ -scale-to-x 1920 \ diff --git a/modules/by-name/lf/lf/ctpv/prev/application/pgp/pgp.sh b/modules/by-name/lf/lf/ctpv/prev/application/pgp/pgp.sh index a4eefd96..4747a8c4 100644 --- a/modules/by-name/lf/lf/ctpv/prev/application/pgp/pgp.sh +++ b/modules/by-name/lf/lf/ctpv/prev/application/pgp/pgp.sh @@ -1,13 +1,8 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 w="$w" -. %HELPERS - hide_script_env sq inspect --certifications -- "$f" diff --git a/modules/by-name/lf/lf/ctpv/prev/application/sqlite/sqlite.sh b/modules/by-name/lf/lf/ctpv/prev/application/sqlite/sqlite.sh index 07e77a93..62c1abec 100644 --- a/modules/by-name/lf/lf/ctpv/prev/application/sqlite/sqlite.sh +++ b/modules/by-name/lf/lf/ctpv/prev/application/sqlite/sqlite.sh @@ -1,15 +1,10 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 w="$w" -. %HELPERS - echo "SQLite database. Schema:" echo diff --git a/modules/by-name/lf/lf/ctpv/prev/application/x-bittorrent/torrent.sh b/modules/by-name/lf/lf/ctpv/prev/application/x-bittorrent/torrent.sh index 16cfcbcd..f1da355a 100644 --- a/modules/by-name/lf/lf/ctpv/prev/application/x-bittorrent/torrent.sh +++ b/modules/by-name/lf/lf/ctpv/prev/application/x-bittorrent/torrent.sh @@ -1,13 +1,8 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 cache_f="$cache_f" -. %HELPERS - transmission-show -- "$f" diff --git a/modules/by-name/lf/lf/ctpv/prev/application/x-pem-file/default.nix b/modules/by-name/lf/lf/ctpv/prev/application/x-pem-file/default.nix new file mode 100644 index 00000000..a6a32808 --- /dev/null +++ b/modules/by-name/lf/lf/ctpv/prev/application/x-pem-file/default.nix @@ -0,0 +1,11 @@ +{pkgs, ...}: { + soispha.programs.lf.ctpv.previewers = { + pem = { + previewer = ./pem.sh; + matches.mime = ["application/x-pem-file"]; + dependencies = [ + pkgs.openssl + ]; + }; + }; +} diff --git a/modules/by-name/lf/lf/ctpv/prev/application/x-pem-file/pem.sh b/modules/by-name/lf/lf/ctpv/prev/application/x-pem-file/pem.sh new file mode 100644 index 00000000..76ee3002 --- /dev/null +++ b/modules/by-name/lf/lf/ctpv/prev/application/x-pem-file/pem.sh @@ -0,0 +1,8 @@ +#! /usr/bin/env dash + +# shellcheck disable=SC2269 +f="$f" +# shellcheck disable=SC2269 +cache_f="$cache_f" + +openssl x509 -in "$f" -text -noout diff --git a/modules/by-name/lf/lf/ctpv/prev/audio/audio.sh b/modules/by-name/lf/lf/ctpv/prev/audio/audio.sh index c5abc646..2e9e147c 100644 --- a/modules/by-name/lf/lf/ctpv/prev/audio/audio.sh +++ b/modules/by-name/lf/lf/ctpv/prev/audio/audio.sh @@ -1,15 +1,10 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 cache_f="$cache_f" -. %HELPERS - audio() { ffmpegthumbnailer -i "$f" -s 0 -q 5 -t 10 -o "$cache_f" 2>/dev/null } diff --git a/modules/by-name/lf/lf/ctpv/prev/audio/default.nix b/modules/by-name/lf/lf/ctpv/prev/audio/default.nix index 0c60e9d5..20df04b3 100644 --- a/modules/by-name/lf/lf/ctpv/prev/audio/default.nix +++ b/modules/by-name/lf/lf/ctpv/prev/audio/default.nix @@ -9,6 +9,7 @@ pkgs.chafa pkgs.gnused + pkgs.coreutils ]; }; }; diff --git a/modules/by-name/lf/lf/ctpv/prev/default.nix b/modules/by-name/lf/lf/ctpv/prev/default.nix index b59430f8..3e54e88a 100644 --- a/modules/by-name/lf/lf/ctpv/prev/default.nix +++ b/modules/by-name/lf/lf/ctpv/prev/default.nix @@ -10,18 +10,15 @@ in { previewer = ./any.sh; priority = -1; matches.mime = ["*/*"]; - replacementStrings = { - # FIXME: This declaration replaces the default (although it should be merged with - # the default value.) There must be a way, so that repeating the default values is - # not needed. <2024-12-15> - HELPERS = cfg.ctpv.helpers; - + environment = { STORAGE_DIRECTORY = "${cfg.ctpv.xdgDataHome}/ctpv/missing_previews"; }; dependencies = [ pkgs.tinyxxd # For xxd pkgs.bat + pkgs.gnugrep + pkgs.coreutils ]; }; }; diff --git a/modules/by-name/lf/lf/ctpv/prev/font/default.nix b/modules/by-name/lf/lf/ctpv/prev/font/default.nix index 306e7892..48bcb7ad 100644 --- a/modules/by-name/lf/lf/ctpv/prev/font/default.nix +++ b/modules/by-name/lf/lf/ctpv/prev/font/default.nix @@ -13,6 +13,7 @@ pkgs.fontforge # for `fontimage` pkgs.chafa pkgs.gnused + pkgs.coreutils ]; }; }; diff --git a/modules/by-name/lf/lf/ctpv/prev/font/font.sh b/modules/by-name/lf/lf/ctpv/prev/font/font.sh index 4065557e..9e5ef3c1 100644 --- a/modules/by-name/lf/lf/ctpv/prev/font/font.sh +++ b/modules/by-name/lf/lf/ctpv/prev/font/font.sh @@ -1,15 +1,10 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 cache_f="$cache_f" -. %HELPERS - font() { fontimage -o "$cache_f.png" "$f" 2>/dev/null && mv -- "$cache_f.png" "$cache_f" diff --git a/modules/by-name/lf/lf/ctpv/prev/image/image.sh b/modules/by-name/lf/lf/ctpv/prev/image/image.sh index b5b97668..42c99c23 100644 --- a/modules/by-name/lf/lf/ctpv/prev/image/image.sh +++ b/modules/by-name/lf/lf/ctpv/prev/image/image.sh @@ -1,11 +1,6 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" -. %HELPERS - send_image "$f" diff --git a/modules/by-name/lf/lf/ctpv/prev/image/svg+xml/svg.sh b/modules/by-name/lf/lf/ctpv/prev/image/svg+xml/svg.sh index 04a06f56..ce588ada 100644 --- a/modules/by-name/lf/lf/ctpv/prev/image/svg+xml/svg.sh +++ b/modules/by-name/lf/lf/ctpv/prev/image/svg+xml/svg.sh @@ -1,15 +1,10 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 cache_f="$cache_f" -. %HELPERS - svg() { magick "$f" "jpg:$cache_f" } diff --git a/modules/by-name/lf/lf/ctpv/prev/image/x-xcf/xcf.sh b/modules/by-name/lf/lf/ctpv/prev/image/x-xcf/xcf.sh index 1603e337..abb83a89 100644 --- a/modules/by-name/lf/lf/ctpv/prev/image/x-xcf/xcf.sh +++ b/modules/by-name/lf/lf/ctpv/prev/image/x-xcf/xcf.sh @@ -1,15 +1,10 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 cache_f="$cache_f" -. %HELPERS - xcf() { # TODO: Add this (currently it fails, as gimp lacks the `python-fu` evaluator) <2024-11-25> true diff --git a/modules/by-name/lf/lf/ctpv/prev/inode/ls.sh b/modules/by-name/lf/lf/ctpv/prev/inode/ls.sh index f73bd1c2..f5b95d13 100644 --- a/modules/by-name/lf/lf/ctpv/prev/inode/ls.sh +++ b/modules/by-name/lf/lf/ctpv/prev/inode/ls.sh @@ -1,8 +1,5 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 @@ -10,6 +7,4 @@ cache_d="$cache_d" # shellcheck disable=SC2269 cache_f="$cache_f" -. %HELPERS - ls --color --group-directories-first -- "$f" diff --git a/modules/by-name/lf/lf/ctpv/prev/inode/symlink.sh b/modules/by-name/lf/lf/ctpv/prev/inode/symlink.sh index b30957d0..fb0dea8f 100644 --- a/modules/by-name/lf/lf/ctpv/prev/inode/symlink.sh +++ b/modules/by-name/lf/lf/ctpv/prev/inode/symlink.sh @@ -1,13 +1,8 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" -. %HELPERS - # # do nothing because in src/ctpv.c some kind of a "preview" # is already printed diff --git a/modules/by-name/lf/lf/ctpv/prev/libreoffice.sh b/modules/by-name/lf/lf/ctpv/prev/libreoffice.sh index ec57da0b..9407aade 100644 --- a/modules/by-name/lf/lf/ctpv/prev/libreoffice.sh +++ b/modules/by-name/lf/lf/ctpv/prev/libreoffice.sh @@ -1,8 +1,5 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 @@ -10,8 +7,6 @@ cache_d="$cache_d" # shellcheck disable=SC2269 cache_f="$cache_f" -. %HELPERS - doc() { # File produced by libreoffice jpg="$(printf '%s\n' "$f" | sed 's|^.*/||; s|\..*$||')" diff --git a/modules/by-name/lf/lf/ctpv/prev/text/bat.sh b/modules/by-name/lf/lf/ctpv/prev/text/bat.sh index be952aea..a466c9c7 100644 --- a/modules/by-name/lf/lf/ctpv/prev/text/bat.sh +++ b/modules/by-name/lf/lf/ctpv/prev/text/bat.sh @@ -1,13 +1,8 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 w="$w" -. %HELPERS - preview_bat "$f" diff --git a/modules/by-name/lf/lf/ctpv/prev/text/diff/delta.sh b/modules/by-name/lf/lf/ctpv/prev/text/diff/delta.sh index 6a4e9a4e..3f8b5631 100644 --- a/modules/by-name/lf/lf/ctpv/prev/text/diff/delta.sh +++ b/modules/by-name/lf/lf/ctpv/prev/text/diff/delta.sh @@ -1,11 +1,6 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" -. %HELPERS - delta <"$f" diff --git a/modules/by-name/lf/lf/ctpv/prev/text/glow.sh b/modules/by-name/lf/lf/ctpv/prev/text/glow.sh index 301fe675..30f2af78 100644 --- a/modules/by-name/lf/lf/ctpv/prev/text/glow.sh +++ b/modules/by-name/lf/lf/ctpv/prev/text/glow.sh @@ -1,15 +1,10 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 w="$w" -. %HELPERS - # Specify the style, to force `glow` to output colors. # tracking issue: https://github.com/charmbracelet/glow/issues/654 # We can't use `hide_script_env` because of some bespoke reason. (It just forces glow to diff --git a/modules/by-name/lf/lf/ctpv/prev/text/html/default.nix b/modules/by-name/lf/lf/ctpv/prev/text/html/default.nix deleted file mode 100644 index 2a7a9a9f..00000000 --- a/modules/by-name/lf/lf/ctpv/prev/text/html/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{pkgs, ...}: { - # TODO: I might want to use lynx/w3m instead <2024-11-24> - soispha.programs.lf.ctpv.previewers = { - elinks = { - previewer = ./elinks.sh; - priority = 1; - matches.mime = ["text/html"]; - dependencies = [ - pkgs.elinks - ]; - }; - }; -} diff --git a/modules/by-name/lf/lf/ctpv/prev/text/html/elinks.sh b/modules/by-name/lf/lf/ctpv/prev/text/html/elinks.sh deleted file mode 100644 index ca0de22e..00000000 --- a/modules/by-name/lf/lf/ctpv/prev/text/html/elinks.sh +++ /dev/null @@ -1,18 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - -# shellcheck disable=SC2269 -f="$f" -# shellcheck disable=SC2269 -w="$w" - -. %HELPERS - -elinks \ - -dump 1 -dump-width "$w" \ - -no-references -no-numbering <"$f" - -# lynx -dump -nonumbers -nolist -width="$w" -- "$f" -# w3m -dump "$f" diff --git a/modules/by-name/lf/lf/ctpv/prev/text/json/jq.sh b/modules/by-name/lf/lf/ctpv/prev/text/json/jq.sh index bf807d1d..c7090ccb 100644 --- a/modules/by-name/lf/lf/ctpv/prev/text/json/jq.sh +++ b/modules/by-name/lf/lf/ctpv/prev/text/json/jq.sh @@ -1,11 +1,6 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" -. %HELPERS - jq --color-output . <"$f" diff --git a/modules/by-name/lf/lf/ctpv/prev/video/video.sh b/modules/by-name/lf/lf/ctpv/prev/video/video.sh index e42e3612..d1972187 100644 --- a/modules/by-name/lf/lf/ctpv/prev/video/video.sh +++ b/modules/by-name/lf/lf/ctpv/prev/video/video.sh @@ -1,15 +1,10 @@ #! /usr/bin/env dash -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 cache_f="$cache_f" -. %HELPERS - video() { ffmpegthumbnailer -i "$f" -o "$cache_f" -s 0 -t 50% 2>/dev/null } diff --git a/modules/by-name/lf/lf/module.nix b/modules/by-name/lf/lf/module.nix index 6dc8e919..ae1534d0 100644 --- a/modules/by-name/lf/lf/module.nix +++ b/modules/by-name/lf/lf/module.nix @@ -75,7 +75,7 @@ in { icons = true; ifs = "\\n"; # internal field separator for shell commands #info = "size"; # show the size of a directory - shell = "sh"; + shell = "${lib.getExe pkgs.dash}"; shellopts = "-eu"; # e: exit on error; u: error for unset variables }; extraConfig = '' diff --git a/modules/by-name/li/libvirtd/module.nix b/modules/by-name/li/libvirtd/module.nix index 5c519550..3481ef3b 100644 --- a/modules/by-name/li/libvirtd/module.nix +++ b/modules/by-name/li/libvirtd/module.nix @@ -1,4 +1,6 @@ -{pkgs, ...}: { +{...}: { + # FIXME(@bpeetz): Do something with this module. <2025-04-04> + # virtualisation = { # spiceUSBRedirection.enable = true; # TODO: this allows usb access to any user, which shouldn't be that bad # cores = 8; diff --git a/modules/by-name/ni/nix/module.nix b/modules/by-name/ni/nix/module.nix index 767ab076..48834b2d 100644 --- a/modules/by-name/ni/nix/module.nix +++ b/modules/by-name/ni/nix/module.nix @@ -7,6 +7,8 @@ system, ... }: { + # TODO(@bpeetz): Modularize <2025-02-08> + nix = { package = pkgs.lix; @@ -52,7 +54,7 @@ fallback = true; # Build from source, if binary can't be substituted - keep-failed = true; # keep failed tmp build dirs + keep-failed = false; # keep failed tmp build dirs pure-eval = true; # restrict file system and network access to hash sandbox-fallback = false; # Don't disable the sandbox, if the kernel doesn't support it diff --git a/modules/by-name/nv/nvim/plgs/harpoon/default.nix b/modules/by-name/nv/nvim/plgs/harpoon/default.nix index 05a40d9f..3760ce15 100644 --- a/modules/by-name/nv/nvim/plgs/harpoon/default.nix +++ b/modules/by-name/nv/nvim/plgs/harpoon/default.nix @@ -1,100 +1,44 @@ { - pkgs, - config, lib, + config, ... }: let - numbers = ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9"]; - mkNumberedCommand = { - command_template, - prefix, - number, - desc_template, - }: { - key = "${prefix}${number}"; - action.__raw = '' - function() - ${command_template number} - end - ''; - options.desc = "${desc_template number}"; - }; - mkGotoTerminalCommand = number: let - desc_template = number: "Goto terminal number ${number}"; - command_template = number: ''require("harpoon.term").gotoTerminal(${number})''; - prefix = "gt"; - in - mkNumberedCommand {inherit desc_template command_template prefix number;}; - mkGotoFileCommand = number: let - desc_template = number: "Goto Buffer number ${number}"; - command_template = number: ''require("harpoon.ui").nav_file(${number})''; - prefix = "gf"; - in - mkNumberedCommand {inherit desc_template command_template prefix number;}; - - gotoTerminalMappings = builtins.map mkGotoTerminalCommand numbers; - gotoFileMappings = builtins.map mkGotoFileCommand numbers; cfg = config.soispha.programs.nvim; in { home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { - plugins.harpoon = { - enable = true; - package = pkgs.vimPlugins.harpoon; - enableTelescope = true; - # menu.width = "vim.api.nvim_win_get_width(0) - 4"; # TODO: integrate that - keymaps = { - tmuxGotoTerminal = null; # TODO: - }; - }; + plugins.harpoon.enable = true; + keymaps = - [ - { - key = "-"; - action.__raw = '' + lib.mapAttrsToList + (key: action: { + mode = "n"; + inherit key; + action.__raw = builtins.elemAt action 0; + options.silent = true; + options.desc = builtins.elemAt action 1; + }) + { + # add current file + "<leader><leader>" = [ + # lua + '' function() - require("harpoon.ui").nav_next() - end - ''; - options.desc = "go to the next marked file"; - } - { - key = "_"; - action.__raw = '' - function() - require("harpoon.ui").nav_prev() - end - ''; - options.desc = "go to the previous marked file"; - } - { - key = "<leader><leader>"; - action.__raw = '' - function() - require("harpoon.mark").add_file() - end - ''; - options.desc = "add a mark to the open file in harpoon."; - } - { - key = "gqc"; - action.__raw = '' - function() - require("harpoon.cmd-ui").toggle_quick_menu() + require("harpoon"):list():add() end - ''; - options.desc = "toggle the harpoon command quick menu to see all commands."; - } - { - key = "<leader>q"; - action.__raw = '' + '' + "Add a mark to the open file in harpoon." + ]; + + # open menu + "<leader>q" = [ + # lua + '' function() - require("harpoon.ui").toggle_quick_menu() + require("harpoon").ui:toggle_quick_menu(require("harpoon"):list()) end - ''; - options.desc = "toggle the harpoon normal quick menu to see all marks."; - } - ] - ++ gotoFileMappings - ++ gotoTerminalMappings; + '' + "Toggle the harpoon normal quick menu to see all marks." + ]; + }; }; } diff --git a/modules/by-name/nv/nvim/plgs/lf-nvim/default.nix b/modules/by-name/nv/nvim/plgs/lf-nvim/default.nix index 1e7c91e3..6c363ee1 100644 --- a/modules/by-name/nv/nvim/plgs/lf-nvim/default.nix +++ b/modules/by-name/nv/nvim/plgs/lf-nvim/default.nix @@ -2,22 +2,18 @@ pkgs, lib, config, - nixpkgs_open_prs, - system, ... }: let cfg = config.soispha.programs.nvim; in { + # TODO: package lf-nvim though a module + # TODO: change the nvim path, when I change the path with lf home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { - # TODO: package lf-nvim though a module - # FIXME: change the nvim path, when I change the path with lf extraConfigLuaPost = '' ${lib.strings.fileContents ./lua/lf-nvim.lua} ''; extraPlugins = [ - nixpkgs_open_prs.nixpkgs-lf.legacyPackages."${system}".vimPlugins.lf-nvim - - pkgs.vimPlugins.toggleterm-nvim # required by lf-nvim + pkgs.vimPlugins.lf-nvim ]; }; } diff --git a/modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/default.nix b/modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/default.nix index 202b3f92..8eee9a27 100644 --- a/modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/default.nix +++ b/modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/default.nix @@ -1,9 +1,4 @@ -{ - pkgs, - config, - lib, - ... -}: let +{config, ...}: let cfg = config.soispha.programs.nvim; in { # TODO: Re-enable this, once the plugin is merged into nixpkgs <2025-03-29> diff --git a/modules/by-name/ri/river/module.nix b/modules/by-name/ri/river/module.nix index c8fb973c..139e8b66 100644 --- a/modules/by-name/ri/river/module.nix +++ b/modules/by-name/ri/river/module.nix @@ -109,7 +109,7 @@ in { ''; description = '' - Configuration for river_init_lesser via `keys.json`. + Configuration for river's rules. ''; }; diff --git a/modules/by-name/ta/taskwarrior/module.nix b/modules/by-name/ta/taskwarrior/module.nix index 0a942820..2c1f91c2 100644 --- a/modules/by-name/ta/taskwarrior/module.nix +++ b/modules/by-name/ta/taskwarrior/module.nix @@ -1,44 +1,148 @@ { lib, config, + pkgs, ... }: let cfg = config.soispha.programs.taskwarrior; + + hooksDir = + pkgs.runCommandNoCCLocal "mk-taskwarrior-hooks" {} + ('' + mkdir "$out" + '' + + (builtins.concatStringsSep "\n" + (lib.attrsets.mapAttrsToList + (name: value: '' + ln --symbolic "${lib.getExe value.executable}" "$out/${value.mode}_${name}" + '') + cfg.hooks))); + + mkHook = mode: deps: path: { + inherit mode; + + executable = pkgs.writeShellApplication { + name = "add-hook-${builtins.baseNameOf path}"; + runtimeInputs = [pkgs.taskwarrior3 pkgs.coreutils pkgs.gnugrep] ++ deps; + inheritPath = false; + text = + # bash + '' + die() { + echo "$@">&2 + exit 1 + } + + enable_hook_dbg() { + # TODO: We should probably be smarter with the debug detection <2025-04-04> + if echo "$2" | grep --quiet 'rc.debug.hooks='; then + set -x + mkdir --parents "$HOME/.cache/task" + exec >>"$HOME/.cache/task/hook.log.$1" + exec 2>>"$HOME/.cache/task/hook.log.$1" + fi + } + + addedCall() { + ${builtins.readFile path} + } + + ${ + if mode == "on-modify" + then "read -r old_task" + else "old_task=NULL" + } + read -r new_task + # We don't change the task, thus immediately return the JSON + echo "$new_task" + + enable_hook_dbg "$@" + addedCall "$new_task" "$old_task" + + exit 0 + ''; + }; + }; in { options.soispha.programs.taskwarrior = { - enable = lib.mkEnableOption "taskwarrior-secrets"; + enable = lib.mkEnableOption "taskwarrior"; + + includeFiles = lib.mkOption { + type = lib.types.attrsOf lib.types.path; + description = "Extra files to include in the taskwarrior config"; + default = {}; + apply = value: + builtins.concatStringsSep "\n" + (builtins.map (path: "include ${path}") + (builtins.attrValues value)); + }; + + hooks = lib.mkOption { + description = "Map hook names to their values"; + type = lib.types.attrsOf (lib.types.submodule { + options = { + mode = lib.mkOption { + type = lib.types.enum ["on-add" "on-modify"]; + description = "The type of the hook"; + }; + executable = lib.mkOption { + type = lib.types.package; + description = "The executable to call."; + }; + }; + }); + }; }; - # HACK: Migrating the whole `taskwarrior` setup is right now unrealistic, as the module is - # tightly coupled with the `firefox` module, and `neorg` script. - # But to work around the fact that setting the `age` secrets in the legacy module is - # impossible, this module was created as work-around until the `taskwarrior` module can - # be fully migrated. <2024-10-18> - config = lib.mkIf cfg.enable { - age.secrets = { - taskserverPrivate = { - file = ./secrets/private.key; - mode = "700"; - owner = "soispha"; - group = "users"; - }; - taskserverPublic = { - file = ./secrets/public.cert; - mode = "700"; - owner = "soispha"; - group = "users"; - }; - taskserverCA = { - file = ./secrets/ca.cert; - mode = "700"; - owner = "soispha"; - group = "users"; + config = { + lib.taskwarrior = { + inherit mkHook; + }; + + home-manager.users.soispha = lib.mkIf cfg.enable { + services.taskwarrior-sync = { + enable = true; + package = pkgs.taskwarrior3; }; - taskserverCredentials = { - file = ./secrets/credentials; - mode = "700"; - owner = "soispha"; - group = "users"; + + programs.taskwarrior = { + enable = true; + colorTheme = ./nord.theme; + package = pkgs.taskwarrior3; + extraConfig = cfg.includeFiles; + + config = { + complete.all.tags = true; + list.all = { + projects = true; + tags = true; + }; + + news.version = "3.4.1"; + + regex = true; + weekstart = "Monday"; + + uda = { + total_active_time = { + type = "duration"; + label = "Total active time"; + }; + }; + + alias = { + mod = "modify"; + }; + color = true; + + hooks.location = "${hooksDir}"; + + urgency.uda.priority = { + H.coefficient = 6.0; + M.coefficient = 0; + L.coefficient = -1.8; + }; + }; }; }; }; diff --git a/modules/home.legacy/conf/taskwarrior/nord.theme b/modules/by-name/ta/taskwarrior/nord.theme index 2897418f..2897418f 100644 --- a/modules/home.legacy/conf/taskwarrior/nord.theme +++ b/modules/by-name/ta/taskwarrior/nord.theme diff --git a/modules/by-name/ta/taskwarrior/secrets/ca.cert b/modules/by-name/ta/taskwarrior/secrets/ca.cert deleted file mode 100644 index 81528a2a..00000000 --- a/modules/by-name/ta/taskwarrior/secrets/ca.cert +++ /dev/null @@ -1,161 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4dVVkO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vv69N -k9PVnHFX8katlvqa1CA0JTwjue+x9sTcgIuUG+8Vr6jCuO1fvpFt2TDOB7eesuvE -nFdSiJugyGDh/7mz4BOG7NOm05oGUJJxAnSzV3B1z4sfyZg8rOVa9Ox5kuF4sQxi -WR6l+xgEXndzhYKTaRRa5WMOhh6J5ENKZPQY05h1WKdupufzpm/zrzZidt6c9iJ2 -vmmjT+T/ZHF9x8uN6LaV/jBTo7js1HTmqvxpDxwI5OAdkZNAYb8s/5EoJ04Wz05t -+9iGsxfiRQH1Z1F2fhbH56nrHdgaL15EgQilLqs38FTOvQ0egRwjF7/yVPRGAzSa -kiBbDWlpxqN+Qu5SDY1Er+P7wURHkgflq6uOlfG5DGTKKPKD9wzP9uVregRlFiY6 -UXKo/7yrYcanmmHtlqCRHVWeXhz19UItPzE9ERXT+GqXjlGlSphAk+OBdrb+/6ND -6IPmfRcUxznHtSQQkOcZWznXGc3w7ext+dZ2EBzJYsaj609z5HCisBIbtDS+OmfG -jk+8bKjrFiXBZcARn/MBTycN334vvNiXgq1k5hDwE8mx6/vryADpbBNr+QE3Su3z -+qF0kDR5FDjzPXk3zh5Oj4nrxWAcgVEWl1vcCvULUC88blyyU4IiffygkZyolCqj ------END AGE ENCRYPTED FILE----- diff --git a/modules/by-name/ta/taskwarrior/secrets/credentials b/modules/by-name/ta/taskwarrior/secrets/credentials deleted file mode 100644 index f3aaf502..00000000 --- a/modules/by-name/ta/taskwarrior/secrets/credentials +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBqdGQ3a0pWb3lvZXFWbTFQ -UG1JbGREZW9SS3ZuWXJhbTdvTTBqZUdhN0Q0CjF1cnJFM1d2ZFNyRW44Rzlvamlz -VWQycXhmWnB4L1hiSE5qbFozWFlGMU0KLT4gc3NoLWVkMjU1MTkgelpFb25nIEFk -bVQ3U3BsU1FkeWxBY0sySTV2UkxocXJpVXMyd1FrMXA3YUR0NWtTR1kKeUtHODVy -aXE3aXh4WkFmYTJtdlZyZ1A1QlhYZGZuTUYxYVVlblRUV1BqOAotPiBzc2gtZWQy -NTUxOSA3SGZGVXcgdGR4cFMya3p6TEx5cnhYcWNXR2FlVEk3UTBEcHQ3Y3RmK0lY -YlpwRXJGcwpwZUVqODB3SUZUdTlQVW4yaWlZaTE0RE9OT1dLanZlSGV6cnlJRElQ -UjBBCi0+ICFALWdyZWFzZSB0MFU2IDZoIEJPWUZIP1sKN1l2dzdWN1JDbEhEeXBq -THV0cWJIV1RLalVsVVp3RCtwbk5NS2pnd3kxS1RhNTNaa3pqWXZFVm9FM2N2cFp5 -TQpYR2MKLS0tIEhLQWdwL0VoT1ZGNU5UUWs0SVVqK0ZQTndkTURPb0VtNEtJN3or -S0Q0K1UKRfhyrcVb0EbsKj9gL5kqaIpfrsWd2cizrVQ67y9ZOwWilWgk/gkoXadf -q7QeYjnWsHeIVtSZIaHSa8+9pvKAwiYW+B6DjRi7EXkCYz8zGeanMuoKA4by5Q9x -VMKJlWk7c0WIzSuviw== ------END AGE ENCRYPTED FILE----- diff --git a/modules/by-name/ta/taskwarrior/secrets/private.key b/modules/by-name/ta/taskwarrior/secrets/private.key deleted file mode 100644 index 64f925fb..00000000 --- a/modules/by-name/ta/taskwarrior/secrets/private.key +++ /dev/null @@ -1,449 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBncVlhL2RhS3JNaWFIKzl5 -VFV2Y3dZRkE2SlFvV25wd2NRU0NVN1Z0T2pBCmpRM2FJSUpPMGpQRE5EZHR5NElu -UlBLcE9EWVBRSHA4eTRTNHpDaDdIOHMKLT4gc3NoLWVkMjU1MTkgelpFb25nIGlC -cGR2aytobjcxV0xJMUc4d1VseUN2K3NoMEx4UnIzRGZvOTZoNHJVaGMKYWV3TVAw -RWJzN3NnOHo3QnZSL3JvbTFxWG9zQmtISzRIMDJX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WlTXgArYGZ2TyP9lEc1yXfJ0owqf2QfsTCLty4ihE4RrYJcwSH4R7Eududb -V6aHh1U1DVEA7N6z2Yd+SUHygo4EOP1SHDaNbxuXXUdzN3HVc4KSvDFjofmTRIKU -rb+ht8MutJq0fuu6+hzxQGVx755Re1UhpO5J0rCdzZA6Mxl/Tl/RU5H1rslD+YbC -K07MRdYQnDpeDnnWZwFUENEXfZinARfqd4b8WrLvxy2BuyhKXjocARvPP/8zk2yz -fmRjmcs8xvEZ79/DaoYvQOL+YsFKpFim1qSsIwMYf9L0Zgre99O301djmUiBBHe2 -qtOzvdAxDIMihgn6oNKZUMszCM7PVxHbPhLfjPTUffkQ4PE5XusiYdWGdGk7tkyv -D2MW+rjT8wQ75CeG9iwnZ1VyEibbTpELiCTOfDzjuD5H7XfPCHWBr0ZklJ16mPBL -rC/GXhaUb8bhdYi8RJsu3y/0/A8KG5cq7rT0hnChyki4EpT7rns8uKs0BFUEspXO -nrbUiLna89rlMeTOudMojUtkR4nLxcT/0UxOPHfkYsigXR7VlTmkaYs3Ch5dHLKI -xP23qmEtRW0vWvlwuhAQIB0X7t5bZKLnoA2tcqsr+0CzRbn05UYrVCucsbb5D7qU -QJOBAKfvQuKQ2NjOKTwN0b/aUxGhr/bi51+XFMJZibyAsJUlU+LVMH05Wir5L3rp -yOWtti7HK4iBlbgs8KZ1z0YjvD0VmQCkyuluVajUj90bPWKpq/+4xp8Cf2q02xNn -OUWfs5lSnARu12QinxSYDJtPN/0x6lcGixlIX/3ZdTRg4f1REKlRj35paiSruhKf -Mfoar9/TM+perLNXW3/cOII8+LiNVz8y+Vc= ------END AGE ENCRYPTED FILE----- diff --git a/modules/by-name/ta/taskwarrior/secrets/public.cert b/modules/by-name/ta/taskwarrior/secrets/public.cert deleted file mode 100644 index d20ef291..00000000 --- a/modules/by-name/ta/taskwarrior/secrets/public.cert +++ /dev/null @@ -1,83 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24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eI3+4juXBHhAM8HTdITsUxB4sRrBdALYet7g97Lfm+BB+9IC -ISJLy36pu6/R2wpiCWP+8eQc93+inwB/yQVBCmrzQRMb4XUO4kMlw/9+bdaOSzlQ -qrVTJOTwFXenETNNpbHLdzJtu6r1BxG82goKn3hn/qSEViAbkWe/bvfvNIm8Lt4/ -PV3drkHcSXwPl6fn2fLDdYAD0iD3gL0Rb8G8ahkCBr1i85HOwISMyZ0WqtlBrcWZ -mJxcG2QxqBy/8DA1MyP5f6LQ8JQ+pMq0QQ74h4zHAb+MnJYP4kM2u8zAm0EexmfP -ckISP+DSmoL2wFApzVHH29QAbPmi3zj0rD11b+jjvEKRi3iNIq5qA2D2jiIE2w7w -1TiJ4Zhu7qRfhbFtQoLYZPdhXtB7cSabCLmvM0YYVovvl0FgzBjOemtxrnh8QGs1 -N2SbJQehgFnehmUopBbcQ99RUpuj/qB/3XYoGY1KR9ZqQkiHpf6rSVJZJq8TOfY9 -fc+OhAUrAXUV9SrU5eHU92R20jqlsIxocDlwlhhVgxiFwf1hHPtRmhPN3UoJ6lus -SeYGWQurXOtPcIr8ZcMqXuc6RdR9t3rkquLkXTCaXOeOrkEsUGyDM64bEXiYBGiA -iUEd5RIJhRnpkQAYnvDgQc54ObBG6BS+Izo/CnqTsa5d7gITK8p8knZGfTd07iSE -bIQ5b2PViUEptiwkAEqV4/OlVAcNKUJ0Q+rXHJKYjWDUkaRYzwcI44NoU94b3hDW -3BVCaxwDWiMJJOTifbzYFlhccTKwtVXZR34N0FdszJXZ2T4V3jMJ+FHblQyjd2JM -PEu9OvKK4IdhEi02VOxy1hArQqpthcCeMWYgD7iWPcqTFo+1ArovrQFxfcaGNWLi -dw== ------END AGE ENCRYPTED FILE----- diff --git a/modules/by-name/ti/timewarrior/module.nix b/modules/by-name/ti/timewarrior/module.nix new file mode 100644 index 00000000..f33d02be --- /dev/null +++ b/modules/by-name/ti/timewarrior/module.nix @@ -0,0 +1,88 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.soispha.programs.timewarrior; + + track_timewarrior = pkgs.stdenv.mkDerivation { + name = "track-timewarrior"; + nativeBuildInputs = [ + pkgs.makeWrapper + ]; + buildInputs = [ + pkgs.timewarrior + pkgs.taskwarrior3 + pkgs.python3 + ]; + dontUnpack = true; + installPhase = '' + install -Dm755 ${./taskwarrior_hooks/on-modify.track-timewarrior.py} $out/bin/track-timewarrior + wrapProgram $out/bin/track-timewarrior \ + --set PATH ${lib.makeBinPath [pkgs.taskwarrior3 pkgs.timewarrior]} + ''; + + meta.mainProgram = "track-timewarrior"; + }; + track_total_active_time = pkgs.stdenv.mkDerivation { + name = "track-total-active-time"; + nativeBuildInputs = [ + pkgs.makeWrapper + ]; + buildInputs = [ + pkgs.taskwarrior3 + pkgs.python3 + ]; + dontUnpack = true; + installPhase = '' + install -Dm755 ${./taskwarrior_hooks/on-modify.track-total-active-time.py} $out/bin/track-total-active-time + wrapProgram $out/bin/track-total-active-time \ + --set PATH ${lib.makeBinPath [pkgs.taskwarrior3]} + ''; + + meta.mainProgram = "track-total-active-time"; + }; +in { + options.soispha.programs.timewarrior = { + enable = lib.mkEnableOption "timewarrior"; + }; + config = lib.mkIf cfg.enable { + soispha.programs.taskwarrior = { + hooks = { + track-timewarrior = { + mode = "on-modify"; + executable = track_timewarrior; + }; + track-total-active-time = { + mode = "on-modify"; + executable = track_total_active_time; + }; + }; + }; + + home-manager.users.soispha = { + home.packages = [ + pkgs.timewarrior + ]; + + xdg.configFile."timewarrior/timewarrior.cfg".text = '' + # source: https://github.com/arcticicestudio/igloo + #+----+ + #+ UI + + #+----+ + import ${./nord.theme} + color = true + + #+---------+ + #+ Reports + + #+---------+ + define reports: + day: + lines = 10 + month = true + week = true + ''; + }; + }; +} diff --git a/modules/home.legacy/conf/timewarrior/nord.theme b/modules/by-name/ti/timewarrior/nord.theme index da3c387a..da3c387a 100644 --- a/modules/home.legacy/conf/timewarrior/nord.theme +++ b/modules/by-name/ti/timewarrior/nord.theme diff --git a/modules/by-name/ti/timewarrior/taskwarrior_hooks/on-modify.track-timewarrior.py b/modules/by-name/ti/timewarrior/taskwarrior_hooks/on-modify.track-timewarrior.py new file mode 100755 index 00000000..0bef8bc2 --- /dev/null +++ b/modules/by-name/ti/timewarrior/taskwarrior_hooks/on-modify.track-timewarrior.py @@ -0,0 +1,124 @@ +#!/usr/bin/env python3 + +############################################################################### +# +# Copyright 2016 - 2021, 2023, Gothenburg Bit Factory +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# https://www.opensource.org/licenses/mit-license.php +# +############################################################################### + +import json +import subprocess +import sys + +# Hook should extract all the following for use as Timewarrior tags: +# UUID +# Project +# Tags +# Description +# UDAs + +try: + input_stream = sys.stdin.buffer +except AttributeError: + input_stream = sys.stdin + + +MAX_ACTIVE = 1 + + +def extract_tags_from(json_obj) -> [str]: + # Extract attributes for use as tags. + tags = [json_obj["description"]] + + if "project" in json_obj: + tags.append(json_obj["project"]) + + if "tags" in json_obj: + if type(json_obj["tags"]) is str: + # Usage of tasklib (e.g. in taskpirate) converts the tag list into a string + # If this is the case, convert it back into a list first + # See https://github.com/tbabej/taskpirate/issues/11 + tags.extend(json_obj["tags"].split(",")) + else: + tags.extend(json_obj["tags"]) + + return tags + + +def extract_annotation_from(json_obj): + if "annotations" not in json_obj: + return "''" + + return json_obj["annotations"][0]["description"] + + +def main(old, new): + start_or_stop = "" + + # Started task. + if "start" in new and "start" not in old: + # Prevent this task from starting if "task +ACTIVE count" is greater than "MAX_ACTIVE". + p = subprocess.Popen( + ["task", "+ACTIVE", "status:pending", "count", "rc.verbose:off"], + stdout=subprocess.PIPE, + ) + out, err = p.communicate() + count = int(out.rstrip()) + if count >= MAX_ACTIVE: + print( + f"Only {MAX_ACTIVE} task(s) can be active at a time.", + ) + sys.exit(1) + else: + start_or_stop = "start" + + # Stopped task. + elif ("start" not in new or "end" in new) and "start" in old: + start_or_stop = "stop" + + if start_or_stop: + tags = extract_tags_from(new) + + subprocess.call(["timew", start_or_stop] + tags + [":yes"]) + + # Modifications to task other than start/stop + elif "start" in new and "start" in old: + old_tags = extract_tags_from(old) + new_tags = extract_tags_from(new) + + if old_tags != new_tags: + subprocess.call(["timew", "untag", "@1"] + old_tags + [":yes"]) + subprocess.call(["timew", "tag", "@1"] + new_tags + [":yes"]) + + old_annotation = extract_annotation_from(old) + new_annotation = extract_annotation_from(new) + + if old_annotation != new_annotation: + subprocess.call(["timew", "annotate", "@1", new_annotation]) + + +if __name__ == "__main__": + old = json.loads(input_stream.readline().decode("utf-8", errors="replace")) + new = json.loads(input_stream.readline().decode("utf-8", errors="replace")) + print(json.dumps(new)) + main(old, new) diff --git a/modules/home.legacy/conf/taskwarrior/hooks/scripts/on-modify_track-total-active-time.py b/modules/by-name/ti/timewarrior/taskwarrior_hooks/on-modify.track-total-active-time.py index d5b380d0..0b6be082 100755 --- a/modules/home.legacy/conf/taskwarrior/hooks/scripts/on-modify_track-total-active-time.py +++ b/modules/by-name/ti/timewarrior/taskwarrior_hooks/on-modify.track-total-active-time.py @@ -20,37 +20,24 @@ By default, this plugin allows to have one task active at a time. This can be ch ``1``. Note: - This hook requires Python 3 and the `taskw`_ package to be installed which provides the python bindings for Taskwarrior! - Also note that this hook is only compatible with Taskwarrior version greater or equal to 2.4! + Note that this hook is only compatible with Taskwarrior version greater or equal to 2.4! This hook is a fork from `kostajh/taskwarrior-time-tracking-hook`_ -.. _taskw: - https://pypi.python.org/pypi/taskw .. _kostajh/taskwarrior-time-tracking-hook: https://github.com/kostajh/taskwarrior-time-tracking-hook """ import datetime import json -import re import sys import subprocess -from taskw import TaskWarrior from typing import TypeVar TIME_FORMAT = "%Y%m%dT%H%M%SZ" UDA_KEY = "total_active_time" -w = TaskWarrior(config_filename=sys.argv[4].replace("rc:", "")) -config = w.load_config(config_filename=sys.argv[4].replace("rc:", "")) -if "max_active_tasks" in config: - MAX_ACTIVE = int(config["max_active_tasks"]) -else: - MAX_ACTIVE = 1 - -"""Compiled regular expression for the duration as ISO-8601 formatted string.""" -ISO8601DURATION = re.compile("P((\d*)Y)?((\d*)M)?((\d*)D)?T((\d*)H)?((\d*)M)?((\d*)S)?") +MAX_ACTIVE = 1 """The duration type either as integer (in seconds), as ISO-8601 formatted string ("PT1H10M31S") or the seconds suffixed with "seconds".""" DurationType = TypeVar("DurationType", str, int) @@ -63,31 +50,7 @@ def duration_str_to_time_delta(duration_str: DurationType) -> datetime.timedelta :return: The duration as timedelta object """ if duration_str.startswith("P"): - match = ISO8601DURATION.match(duration_str) - if match: - year = match.group(2) - month = match.group(4) - day = match.group(6) - hour = match.group(8) - minute = match.group(10) - second = match.group(12) - value = 0 - if second: - value += int(second) - if minute: - value += int(minute) * 60 - if hour: - value += int(hour) * 3600 - if day: - value += int(day) * 3600 * 24 - if month: - # Assume a month is 30 days for now. - value += int(month) * 3600 * 24 * 30 - if year: - # Assume a year is 365 days for now. - value += int(year) * 3600 * 24 * 365 - else: - value = int(duration_str) + value = datetime.fromisoformat(duration_str) elif duration_str.endswith("seconds"): value = int(duration_str.rstrip("seconds")) else: diff --git a/modules/by-name/ts/tskm/module.nix b/modules/by-name/ts/tskm/module.nix new file mode 100644 index 00000000..51be48fe --- /dev/null +++ b/modules/by-name/ts/tskm/module.nix @@ -0,0 +1,127 @@ +{ + lib, + config, + pkgs, + ... +}: let + cfg = config.soispha.programs.tskm; + + allProjectNames = lib.lists.flatten (lib.attrsets.mapAttrsToList mkProject cfg.projects); + + projectList = builtins.concatStringsSep "\n" allProjectNames; + mkProject = name: value: let + subprojects = lib.attrsets.mapAttrsToList (newName: mkProject "${name}.${newName}") value.subprojects; + in + [name] ++ subprojects; + + firefoxProfiles = builtins.listToAttrs (lib.imap0 (index: name: + lib.attrsets.nameValuePair name { + inherit name; + # Add one here, so that we can have the default profile at id 0. + id = index + 1; + }) + allProjectNames); + + contexts = + builtins.concatStringsSep "\n" + (lib.lists.flatten + (lib.attrsets.mapAttrsToList mkContext cfg.projects)); + mkContext = name: value: let + subprojects = + lib.attrsets.mapAttrsToList + (newName: newValue: let + finalValue = + if newValue.prefix == "" + then newValue // {inherit (value) prefix;} + else newValue; + in + mkContext "${name}.${newName}" finalValue) + value.subprojects; + contextName = builtins.replaceStrings ["."] ["_"] name; + in + [ + '' + context.${contextName}.rc.neorg_path=${value.prefix}/index.norg + context.${contextName}.read=project:${name} + context.${contextName}.write=project:${name} + '' + ] + ++ subprojects; + + contextsFile = + pkgs.writeText "contexts-file" contexts; + + projectType = lib.types.submodule { + options = { + name = lib.mkOption { + type = lib.types.str; + example = "timesinks"; + description = "The name of this project"; + }; + + prefix = lib.mkOption { + type = lib.types.str; + default = ""; + example = "programming/zig"; + description = '' + A prefix to append to the project neorg path. + This can be used to group similar project's neorg directories together. ' + ''; + }; + + subprojects = lib.mkOption { + type = lib.types.attrsOf projectType; + description = '' + A list of subprojects. + These can also contain subprojects. + ''; + default = {}; + }; + }; + }; +in { + options.soispha.programs.tskm = { + enable = lib.mkEnableOption "tskm"; + + projects = lib.mkOption { + type = lib.types.attrsOf projectType; + }; + }; + + config = lib.mkIf cfg.enable { + soispha.programs = { + firefox.profiles = firefoxProfiles; + taskwarrior = { + includeFiles = { + tskm-contexts = contextsFile; + }; + hooks = { + enforce-projects = + config.lib.taskwarrior.mkHook "on-add" [ + pkgs.jq + pkgs.gnugrep + pkgs.tskm + ] + ./taskwarrior_hooks/enforce-projects.sh; + }; + }; + }; + + home-manager.users.soispha = { + home.sessionVariables = { + # TODO: Remove this hard-coded path with a reference. <2025-04-04> + "TSKM_PROJECT_FILE" = "/home/soispha/repos/nix/config/modules/common/projects.json"; + }; + + programs.nixvim = { + plugins.neorg.settings.load."core.dirman".config.workspaces = { + tskm = "~/.local/share/tskm/notes"; + }; + }; + + xdg.configFile."tskm/projects.list" = { + text = projectList; + }; + }; + }; +} diff --git a/modules/by-name/ts/tskm/taskwarrior_hooks/enforce-projects.sh b/modules/by-name/ts/tskm/taskwarrior_hooks/enforce-projects.sh new file mode 100755 index 00000000..217e6052 --- /dev/null +++ b/modules/by-name/ts/tskm/taskwarrior_hooks/enforce-projects.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +new_task="$1" + +project="$(echo "$new_task" | jq '.project' --raw-output)" +[ "$project" = "null" ] && die "No project supplied!" + +if ! tskm projects list | grep -q "^$project$"; then + die "The project '$project' is not (yet) registered, registered projects: $(tskm projects list | tr '\n' ',')" +fi + +# vim: ft=sh diff --git a/modules/by-name/wa/water-reminder/module.nix b/modules/by-name/wa/water-reminder/module.nix new file mode 100644 index 00000000..39e63771 --- /dev/null +++ b/modules/by-name/wa/water-reminder/module.nix @@ -0,0 +1,57 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.soispha.services.water-reminder; +in { + options.soispha.services.water-reminder = { + enable = lib.mkEnableOption "periodic reminder for water intake"; + + frequency = lib.mkOption { + type = lib.types.str; + default = "*-*-* *:00/30:00"; # Every 30 minutes + description = '' + How often to remind. This value is passed to the systemd + timer configuration as the `OnCalendar` option. See + {manpage}`systemd.time(7)` for more information about the format. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + home-manager.users.soispha = { + systemd.user.services.water-reminder = { + Unit = {Description = "Water reminder";}; + Service = { + CPUSchedulingPolicy = "idle"; + IOSchedulingClass = "idle"; + ExecStart = lib.getExe ( + pkgs.writeShellApplication { + name = "water-reminder"; + + inheritPath = false; + runtimeInputs = [pkgs.libnotify]; + + text = + # bash + '' + notify-send 'Seek fluid intake' 'Water intake required' --wait --expire-time=0 --urgency=critical + ''; + } + ); + }; + }; + + systemd.user.timers.water-reminder = { + Unit = {Description = "periodic reminder for water intake";}; + Timer = { + Unit = "water-reminder.service"; + OnCalendar = cfg.frequency; + }; + Install = {WantedBy = ["timers.target"];}; + }; + }; + }; +} diff --git a/modules/by-name/xd/xdg/module.nix b/modules/by-name/xd/xdg/module.nix index 1202cd96..a7c77cd7 100644 --- a/modules/by-name/xd/xdg/module.nix +++ b/modules/by-name/xd/xdg/module.nix @@ -1,60 +1,119 @@ { pkgs, lib, + config, ... }: let - cmd = pkgs.writeShellApplication { - name = "lf_wrapper"; + lf-wrapper = pkgs.writeShellApplication { + name = "lf-wrapper"; runtimeInputs = [pkgs.lf pkgs.alacritty]; inheritPath = true; - text = builtins.readFile ./lf-wrapper.sh; + text = builtins.readFile ./scripts/lf-wrapper.sh; + }; + + url-handler = pkgs.writeShellApplication { + name = "url-handler"; + + runtimeInputs = [pkgs.rofi pkgs.libnotify pkgs.zathura pkgs.tskm]; + inheritPath = false; + + text = builtins.readFile ./scripts/url-handler.sh; }; tfcConfigFile = (pkgs.formats.ini {}).generate "xdg-desktop-portal-termfilechooser.ini" { filechooser = { default_dir = "/tmp"; - cmd = "${lib.getExe cmd}"; + cmd = "${lib.getExe lf-wrapper}"; }; }; + + cfg = config.soispha.xdg; in { - services.dbus.enable = true; - xdg = { - portal = { - enable = true; - wlr = { + options.soispha.xdg = { + enable = lib.mkEnableOption "xdg"; + }; + + config = lib.mkIf cfg.enable { + home-manager.users.soispha = { + xdg = { + configFile."xdg-desktop-portal-termfilechooser/config".source = tfcConfigFile; + + desktopEntries = { + url-handler = { + name = "url-handler"; + genericName = "Web Browser"; + exec = "${lib.getExe url-handler} %u"; + terminal = false; + categories = [ + "Application" + "Network" + "WebBrowser" + ]; + mimeType = [ + "text/html" + "text/xml" + "x-scheme-handler/http" + "x-scheme-handler/https" + "x-scheme-handler/about" + "x-scheme-handler/unknown" + ]; + }; + }; + }; + }; + + services.dbus.enable = true; + + xdg = { + mime = { enable = true; + defaultApplications = { + "application/pdf" = ["url-handler.desktop"]; + "application/x-pdf" = ["url-handler.desktop"]; + + "text/html" = ["url-handler.desktop"]; + "text/xml" = ["url-handler.desktop"]; + "x-scheme-handler/http" = ["url-handler.desktop"]; + "x-scheme-handler/https" = ["url-handler.desktop"]; + "x-scheme-handler/about" = ["url-handler.desktop"]; + "x-scheme-handler/unknown" = ["url-handler.desktop"]; + }; }; - config = { - common = { - # NOTE: The next entry is supposedly needed for gtk based apps <2023-08-31> - default = ["wlr" "gtk"]; - "org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"]; + + portal = { + enable = true; + wlr = { + enable = true; }; + config = { + common = { + # NOTE: The next entry is supposedly needed for gtk based apps <2023-08-31> + default = ["wlr" "gtk"]; + "org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"]; + }; - # TODO: Also activate, when on another wlr-based compositor <2023-11-25> - river = { - default = ["wlr" "gtk"]; - "org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"]; + # TODO: Also activate, when on another wlr-based compositor <2023-11-25> + river = { + default = ["wlr" "gtk"]; + "org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"]; + }; }; + + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + pkgs.xdg-desktop-portal-wlr + pkgs.xdg-desktop-portal-termfilechooser + ]; }; + }; - extraPortals = [ - pkgs.xdg-desktop-portal-gtk - pkgs.xdg-desktop-portal-wlr - pkgs.xdg-desktop-portal-termfilechooser + systemd.user.services.xdg-desktop-portal-termfilechooser = { + serviceConfig.ExecStart = [ + "" + "${pkgs.xdg-desktop-portal-termfilechooser}/libexec/xdg-desktop-portal-termfilechooser --loglevel=TRACE" ]; }; }; - - environment.etc."xdg/xdg-desktop-portal-termfilechooser/config".source = tfcConfigFile; - - systemd.user.services.xdg-desktop-portal-termfilechooser = { - serviceConfig.ExecStart = [ - "" - "${pkgs.xdg-desktop-portal-termfilechooser}/libexec/xdg-desktop-portal-termfilechooser --loglevel=TRACE" - ]; - }; - # TODO: mime = {}; } diff --git a/modules/by-name/xd/xdg/lf-wrapper.sh b/modules/by-name/xd/xdg/scripts/lf-wrapper.sh index f85f7bac..f85f7bac 100755 --- a/modules/by-name/xd/xdg/lf-wrapper.sh +++ b/modules/by-name/xd/xdg/scripts/lf-wrapper.sh diff --git a/modules/by-name/xd/xdg/scripts/url-handler.sh b/modules/by-name/xd/xdg/scripts/url-handler.sh new file mode 100755 index 00000000..222c91f3 --- /dev/null +++ b/modules/by-name/xd/xdg/scripts/url-handler.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env sh + +project="$({ + tskm projects list + echo nvim zathura +} | rofi -sep "$(printf "\n")" -dmenu)" + +if [ "$project" = "nvim" ]; then + "$TERMINAL" -e nvim "$1" +elif [ "$project" = "zathura" ]; then + zathura "$1" +elif [ "$project" ]; then + tskm open project "$project" "$1" +else + notify-send "(URL HANDLER) No project selected" + exit 1 +fi + +# vim: ft=sh diff --git a/modules/by-name/zs/zsh/module.nix b/modules/by-name/zs/zsh/module.nix index cb1bb086..b50e72ac 100644 --- a/modules/by-name/zs/zsh/module.nix +++ b/modules/by-name/zs/zsh/module.nix @@ -10,9 +10,25 @@ zDotDir = ".config/zsh"; sourceFile = path: "source ${path}\n"; + + extraFiles = builtins.concatStringsSep "\n" ( + builtins.map sourceFile ( + builtins.attrValues cfg.integrations + ) + ); in { options.soispha.programs.zsh = { enable = lib.mkEnableOption "zsh"; + + integrations = lib.mkOption { + type = lib.types.attrsOf lib.types.path; + example = '' + { + atuin = ./integrations/atuin.zsh; + } + ''; + default = {}; + }; }; config = lib.mkIf cfg.enable { @@ -105,6 +121,9 @@ in { lib.modules.mkMerge [ start + + extraFiles + end ]; diff --git a/modules/common/default.nix b/modules/common/default.nix index 232c329d..1c00c710 100644 --- a/modules/common/default.nix +++ b/modules/common/default.nix @@ -29,6 +29,7 @@ }; polkit.enable = true; power.enable = true; + xdg.enable = true; services = { adb = { @@ -56,6 +57,7 @@ printing.enable = true; scanning.enable = true; snapper.enable = true; + water-reminder.enable = true; steam.enable = false; systemDiff.enable = true; unison = { @@ -104,6 +106,7 @@ shell = pkgs.zsh; }; atuin.enable = true; + cargo.enable = true; direnv.enable = true; git.enable = true; imv.enable = true; @@ -182,9 +185,18 @@ ]; }; }; + firefox.enable = true; mpv.enable = true; swaylock.enable = true; - taskwarrior.enable = true; + timewarrior.enable = true; + taskwarrior = { + enable = true; + hooks = import ./hooks {inherit pkgs lib config;}; + }; + tskm = { + enable = true; + projects = builtins.fromJSON (builtins.readFile ./projects.json); + }; yambar.enable = true; yt.enable = true; zathura.enable = true; diff --git a/modules/common/hooks/default.nix b/modules/common/hooks/default.nix new file mode 100644 index 00000000..e2d12807 --- /dev/null +++ b/modules/common/hooks/default.nix @@ -0,0 +1,8 @@ +{ + pkgs, + lib, + config, +}: { + sync-git-repos = config.lib.taskwarrior.mkHook "on-add" [pkgs.git] ./scripts/sync-git-repo.sh; + sync-git-repos-mod = config.lib.taskwarrior.mkHook "on-modify" [pkgs.git] ./scripts/sync-git-repo.sh; +} diff --git a/modules/common/hooks/scripts/sync-git-repo.sh b/modules/common/hooks/scripts/sync-git-repo.sh new file mode 100755 index 00000000..ad7368f3 --- /dev/null +++ b/modules/common/hooks/scripts/sync-git-repo.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +task_data="$(task _get rc.data.location)" +[ "$task_data" ] || die "Taskwarrior should have a location set" + +cd "$task_data" || die "(BUG?): Your data.location path is not accessable" + +[ -d ./.git/ ] || git init + +git add . +git commit --message="chore: Update" --no-gpg-sign + +# vim: ft=sh diff --git a/modules/common/projects.json b/modules/common/projects.json new file mode 100644 index 00000000..48a10f03 --- /dev/null +++ b/modules/common/projects.json @@ -0,0 +1,132 @@ +{ + "3d-printer": { + "prefix": "hardware" + }, + "aoc": { + "prefix": "programming/advent_of_code" + }, + "book": { + "prefix": "book" + }, + "buy": { + "prefix": "buy", + "subprojects": { + "books": {}, + "pc": {} + } + }, + "camera": { + "prefix": "programming/zig" + }, + "hardware": { + "prefix": "research" + }, + "input": { + "prefix": "research", + "subprojects": { + "dotfiles": {}, + "read-things": {} + } + }, + "latex": { + "prefix": "programming/latex" + }, + "me": { + "subprojects": { + "bank": {}, + "google": {}, + "health": {}, + "sweden": {} + } + }, + "possible-projects": { + "prefix": "research" + }, + "presentation": { + "prefix": "research" + }, + "school": { + "prefix": "research", + "subprojects": { + "biologie": {}, + "chemie": { + "subprojects": { + "facharbeit": {} + } + }, + "deutsch": {}, + "english": {}, + "extern": { + "subprojects": { + "bwinf": {}, + "dsa": {} + } + }, + "geographie": {}, + "geschichte": {}, + "infomatik": {}, + "klausuren": {}, + "latein": {}, + "mathematik": {}, + "musik": {}, + "philosophie": {}, + "physik": {}, + "sozialkunde": {}, + "sport": {} + } + }, + "server": { + "prefix": "config", + "subprojects": { + "b-peetz": {}, + "blog": {}, + "ci": {}, + "email": {}, + "nix-sync": {}, + "sudo-less": {} + } + }, + "serverphone": { + "prefix": "programming/rust" + }, + "smartphone": { + "prefix": "hardware", + "subprojects": { + "airdrop": {}, + "airplay": {} + } + }, + "system": { + "prefix": "config", + "subprojects": { + "backup": {}, + "bar": {}, + "email": {}, + "firefox": {}, + "gpg": {}, + "keyboard": {}, + "laptop": {}, + "nvim": {}, + "rss": {}, + "shell": {}, + "task": {}, + "wm": {}, + "youtube": {} + } + }, + "timesinks": { + "subprojects": { + "games": {}, + "music": {}, + "netflix": {}, + "youtube": {} + } + }, + "trinitrix": { + "prefix": "programming/rust", + "subprojects": { + "documentation": {}, + "testing": {} + } + } +} diff --git a/modules/default.nix b/modules/default.nix index 1df511a1..a34e807f 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -7,14 +7,6 @@ baseDirectory = ./by-name; fileName = "module.nix"; finalizeFunction = name: value: value; - - # TODO: Re-activate, when/if most modules have tests. <2024-11-23> - # coImportsNameFunction = { - # shard, - # name, - # }: - # ../tests/by-name + "/${shard}" + "/${name}" + "/test.nix"; - # coImportsWarnMessageObject = "test"; }); in { imports = files; diff --git a/modules/home.legacy/conf/btop/default.nix b/modules/home.legacy/conf/btop/default.nix index 06b56ea7..48572568 100644 --- a/modules/home.legacy/conf/btop/default.nix +++ b/modules/home.legacy/conf/btop/default.nix @@ -1,4 +1,4 @@ -{config, ...}: { +{...}: { programs.btop = { enable = true; }; diff --git a/modules/home.legacy/conf/default.nix b/modules/home.legacy/conf/default.nix index e1cab572..767039c6 100644 --- a/modules/home.legacy/conf/default.nix +++ b/modules/home.legacy/conf/default.nix @@ -4,7 +4,6 @@ ./beets ./btop ./dconf - ./firefox ./gammastep ./gpg ./gtk @@ -27,10 +26,6 @@ ./ssh ./starship ./swayidle - ./taskwarrior - ./timewarrior ./tridactyl - ./xdg - ./ytcc ]; } diff --git a/modules/home.legacy/conf/firefox/config/bookmarks/default.nix b/modules/home.legacy/conf/firefox/config/bookmarks/default.nix deleted file mode 100644 index 41936819..00000000 --- a/modules/home.legacy/conf/firefox/config/bookmarks/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - lib, - pkgs, - ... -}: let - bookmarks = []; - - mkBookmarksFile = (import ./lib.nix) {inherit lib pkgs;}; - bookmarks_file = mkBookmarksFile bookmarks; -in - bookmarks_file diff --git a/modules/home.legacy/conf/firefox/config/bookmarks/lib.nix b/modules/home.legacy/conf/firefox/config/bookmarks/lib.nix deleted file mode 100644 index d1d89dd2..00000000 --- a/modules/home.legacy/conf/firefox/config/bookmarks/lib.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - lib, - pkgs, -}: bookmarks: let - indent = level: - lib.concatStringsSep "" (map (lib.const " ") (lib.range 1 level)); - - bookmarkToHTML = indentLevel: bookmark: '' - ${indent indentLevel}<DT><A HREF="${ - lib.escapeXML bookmark.url - }" ADD_DATE="0" LAST_MODIFIED="0">${lib.escapeXML bookmark.name}</A>''; - - directoryToHTML = indentLevel: directory: '' - ${indent indentLevel}<DT>${ - if directory.toolbar - then ''<H3 PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Toolbar'' - else "<H3>${lib.escapeXML directory.name}" - }</H3> - ${indent indentLevel}<DL><p> - ${allItemsToHTML (indentLevel + 1) directory.bookmarks} - ${indent indentLevel}</p></DL>''; - - itemToHTMLOrRecurse = indentLevel: item: - if item ? "url" - then bookmarkToHTML indentLevel item - else directoryToHTML indentLevel item; - - allItemsToHTML = indentLevel: bookmarks: - lib.concatStringsSep "\n" - (map (itemToHTMLOrRecurse indentLevel) bookmarks); - - bookmarkEntries = allItemsToHTML 1 bookmarks; -in - pkgs.writeText "firefox-bookmarks.html" '' - <!DOCTYPE NETSCAPE-Bookmark-file-1> - <!-- This is an automatically generated file. - It will be read and overwritten. - DO NOT EDIT! --> - <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> - <TITLE>Bookmarks</TITLE> - <H1>Bookmarks Menu</H1> - - <DL><p> - <DT><H3 ADD_DATE="0" LAST_MODIFIED="0" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Toolbar</H3> - <DL><p> - ${bookmarkEntries} - </DL><p> - </p></DL> - '' diff --git a/modules/home.legacy/conf/firefox/config/extensions/native_messaging_hosts/default.nix b/modules/home.legacy/conf/firefox/config/extensions/native_messaging_hosts/default.nix deleted file mode 100644 index 9aaa1682..00000000 --- a/modules/home.legacy/conf/firefox/config/extensions/native_messaging_hosts/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{pkgs, ...}: -/* -++ lib.optional (cfg.enableBrowserpass or false) (lib.getBin browserpass) -++ lib.optional (cfg.enableBukubrow or false) bukubrow -++ lib.optional (cfg.enableTridactylNative or false) tridactyl-native -++ lib.optional (cfg.enableGnomeExtensions or false) gnome-browser-connector -++ lib.optional (cfg.enableUgetIntegrator or false) uget-integrator -++ lib.optional (cfg.enablePlasmaBrowserIntegration or false) plasma5Packages.plasma-browser-integration -++ lib.optional (cfg.enableFXCastBridge or false) fx-cast-bridge -++ lib.optional (cfg.enableKeePassXC or false) keepassxc -*/ -with pkgs; [ - tridactyl-native - keepassxc -] diff --git a/modules/home.legacy/conf/firefox/config/policies/default.nix b/modules/home.legacy/conf/firefox/config/policies/default.nix deleted file mode 100644 index 02c740f6..00000000 --- a/modules/home.legacy/conf/firefox/config/policies/default.nix +++ /dev/null @@ -1,146 +0,0 @@ -{ - config, - extensions, - ... -}: let - locals = [ - "en-CA" - "de" - "sv-SE" - ]; - mkAllowedExtension = extension: { - name = extension.addonId; - value = { - installation_mode = "normal_installed"; - updates_disabled = true; - inherit (extension) default_area; - install_url = "file://${builtins.fetchurl { - inherit - (extension) - url - sha256 - ; - }}"; - }; - }; - allowedExtensions = - builtins.listToAttrs - (builtins.map mkAllowedExtension (builtins.attrValues - extensions)); - - mkBlockedExtension = id: { - name = id; - value = { - install_mode = "blocked"; - }; - }; - blockedExtensions = builtins.listToAttrs (builtins.map mkBlockedExtension [ - # these are the default search engines - "addons-search-detection@mozilla.com" - "amazon@search.mozilla.org" - "bing@search.mozilla.org" - "ddg@search.mozilla.org" - "google@search.mozilla.org" - "wikipedia@search.mozilla.org" - ]); - - language_packs = builtins.listToAttrs (builtins.map - ( - lang: { - name = "langpack-${lang}@firefox.mozilla.org"; - value = { - installation_mode = "normal_installed"; - updates_disabled = true; - install_url = "https://releases.mozilla.org/pub/firefox/releases/${config.soispha.firefox.package_version}/linux-x86_64/xpi/${lang}.xpi"; - }; - } - ) - locals); -in { - # NOTE: See https://mozilla.github.io/policy-templates for documentation <2023-10-21> - policies = { - # NixOS manages this already - DisableAppUpdate = true; - - DisableFirefoxAccounts = true; - DisableFirefoxScreenshots = true; - - # KeepassXC does this for me - DisableMasterPasswordCreation = true; - - # I use a self-hosted services for that - DisablePocket = true; - - # I don't want to lose my data - DisableProfileRefresh = true; - - DisableDeveloperTools = false; - - DisplayBookmarksToolbar = "newtab"; - DisplayMenuBar = "default-off"; - - DNSOverHTTPS = { - Enabled = true; - Locked = false; - }; - # The concept of a "default browser" does not apply to my NixOS config - DontCheckDefaultBrowser = true; - - EnableTrackingProtection = { - Value = true; - Locked = false; - Cryptomining = true; - Fingerprinting = true; - EmailTracking = true; - }; - - EncryptedMediaExtensions = { - # I want a _free_ config (and I can always just run another browser) - Enabled = false; - Locked = true; - }; - - ExtensionSettings = - { - "*" = { - # Blocking the extension install here, also blocks the 'about:debugging' page - - # blocked_install_message = '' - # You can't install a extension manually, - # please specify it in your NixOS configuration - # ''; - installation_mode = "allowed"; - }; - } - // allowedExtensions - // blockedExtensions - // language_packs; - - ExtensionUpdate = false; - - # TODO: Add handlers for the default file types <2023-10-21> - # Handlers = { - # }; - - HardwareAcceleration = true; - - # Blocking the extension install here, also blocks the 'about:debugging' page - # InstallAddonsPermission = { - # Allowed = []; - # Default = false; - # }; - - # KeepassXC and such things - OfferToSaveLogins = false; - PasswordManagerEnabled = false; - - PDFjs = { - Enabled = true; - # Don't honor documents right to be un-copy-able - EnablePermissions = false; - }; - - SearchBar = "unified"; - RequestedLocales = locals; - }; -} diff --git a/modules/home.legacy/conf/firefox/config/prefs/default.nix b/modules/home.legacy/conf/firefox/config/prefs/default.nix deleted file mode 100644 index 80c6d274..00000000 --- a/modules/home.legacy/conf/firefox/config/prefs/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - pkgs, - config, - user_js, - bookmarks, - ... -}: let - user_js_override = pkgs.writeText "user.override.js" (builtins.readFile ./override.js); -in - pkgs.runCommand "user.js" {} '' - mkdir $out; - cat "${user_js}/user.js" > $out/user.js; - cat "${user_js_override}" >> $out/user.js; - - cat << EOF >> $out/user.js; - // My bookmarks - user_pref("browser.bookmarks.file", "${toString bookmarks}"); - user_pref("browser.startup.homepage", "file:///home/dt/home.html"); // 0103 // TODO: add this from a flake - user_pref("browser.download.dir", "${config.xdg.userDirs.download}"); - EOF - '' diff --git a/modules/home.legacy/conf/firefox/config/prefs/override.js b/modules/home.legacy/conf/firefox/config/prefs/override.js deleted file mode 100644 index cf74cf3b..00000000 --- a/modules/home.legacy/conf/firefox/config/prefs/override.js +++ /dev/null @@ -1,202 +0,0 @@ -/* - 0100: STARTUP - 0200: GEOLOCATION / LANGUAGE / LOCALE - 0300: QUIETER FOX - 0400: SAFE BROWSING - 0600: BLOCK IMPLICIT OUTBOUND - 0700: DNS / DoH / PROXY / SOCKS / IPv6 - 0800: LOCATION BAR / SEARCH BAR / SUGGESTIONS / HISTORY / FORMS - 0900: PASSWORDS - 1000: DISK AVOIDANCE - 1200: HTTPS (SSL/TLS / OCSP / CERTS / HPKP) - 1400: FONTS - 1600: HEADERS / REFERERS - 1700: CONTAINERS - 2000: PLUGINS / MEDIA / WEBRTC - 2400: DOM (DOCUMENT OBJECT MODEL) - 2600: MISCELLANEOUS - 2700: ETP (ENHANCED TRACKING PROTECTION) - 2800: SHUTDOWN & SANITIZING - 4500: RFP (RESIST FINGERPRINTING) - 5000: OPTIONAL OPSEC - 5500: OPTIONAL HARDENING - 6000: DON'T TOUCH - 7000: DON'T BOTHER - 8000: DON'T BOTHER: FINGERPRINTING - 9000: NON-PROJECT RELATED - 9999: DEPRECATED / REMOVED / LEGACY / RENAMED -*/ - - -// restore session -user_pref("browser.startup.page", 3); // 0102 - -user_pref("browser.newtabpage.enabled", true); // 0104 - -// disable the geoservice, TODO: don't know if I want this -//user_pref("geo.provider.use_geoclue", false); // 0202 - -// TODO: is this something useful? -user_pref("datareporting.policy.dataSubmissionEnabled", true); // 0330 - -// enable health reports -user_pref("datareporting.healthreport.uploadEnabled", true); // 0331 - -// Do I want to opt-out? -user_pref("toolkit.telemetry.coverage.opt-out", false); // 0333 - -// enables studies -user_pref("app.shield.optoutstudies.enabled", true); // 0340 - -// I guess that browsing protection is useful -user_pref("browser.safebrowsing.downloads.remote.enabled", true); // 0403 - -// TODO: does this (-> set to false) make things slower? -user_pref("network.prefetch-next", true); // 0601 - -// enable ipv6 because the rest of the system uses it -user_pref("network.dns.disableIPv6", false); // 0701 - -// TRR only -user_pref("network.trr.mode", 3); // 0710 - -// I trust my search engine -user_pref("keyword.enabled", true); // 801 -user_pref("browser.search.suggest.enabled", true); // 0804 -user_pref("browser.urlbar.suggest.searches", true); // 0804 -// TODO: no idea what this does, enabling it -user_pref("browser.urlbar.showSearchTerms.enabled", true); // 9004 - -// prefetch urls, if the get auto completed -user_pref("browser.urlbar.speculativeConnect.enabled", true); // 0805 - -// Disable autoScrolling (clicking with the mouse wheel) -user_pref("general.autoScroll", false); - -// add new tabs after the current one -user_pref("browser.tabs.insertAfterCurrent", true); - -// TODO: I might want to enable this -//user_pref("browser.urlbar.suggest.quicksuggest.nonsponsored", false); // 0807 - -// TODO: enable form and search history? -//user_pref("browser.formfill.enable", false); // 0810 - -// disk cache should help performance -user_pref("browser.cache.disk.enable", true); // 1001 - -// store extra session data (form content, cookies and POST data) 0: everywhere -user_pref("browser.sessionstore.privacy_level", 0); // 1003 - -// Disable unsafe passive content (images) on https sites -user_pref("security.mixed_content.block_display_content", true); // 1241 - -// Disable the eme banner -user_pref("browser.eme.ui.enabled", false); // 2022 - -// Don't delete my precious temp files -user_pref("browser.helperApps.deleteTempFileOnExit", false); // 2603 - -// Download to the download dir -user_pref("browser.download.useDownloadDir", true); // 2651 - -// Open the download panel -user_pref("browser.download.alwaysOpenPanel", true); // 2652 - -// Block after custom ruleset -user_pref("browser.contentblocking.category", "custom"); // 2701 - -// set the custom settings // 7016 -user_pref("network.cookie.cookieBehavior", 1); -user_pref("network.http.referer.disallowCrossSiteRelaxingDefault", true); -user_pref("network.http.referer.disallowCrossSiteRelaxingDefault.top_navigation", true); -user_pref("privacy.partition.network_state.ocsp_cache", true); -user_pref("privacy.query_stripping.enabled", true); -user_pref("privacy.trackingprotection.enabled", true); -user_pref("privacy.trackingprotection.socialtracking.enabled", true); -user_pref("privacy.trackingprotection.cryptomining.enabled", true); -user_pref("privacy.trackingprotection.fingerprinting.enabled", true); - - -// I might want to change that, when it hinders session restore -//user_pref("privacy.partition.always_partition_third_party_non_cookie_storage.exempt_sessionstorage", false); // 2720 - -// I like my history very much! -user_pref("privacy.sanitize.sanitizeOnShutdown", false); // 2810 - -// The downsides (light theme + potential breakages): -//user_pref("privacy.resistFingerprinting", true); // 4501 -user_pref("privacy.resistFingerprinting.letterboxing", false); // 4504 - -// I would like to keep my gl, even in the web -user_pref("webgl.disabled", false); // 4520 - -// I like my service workers and am using a service using them. -user_pref("dom.serviceWorkers.enabled", true); // 7017 - -// I've got a password manager already -user_pref("signon.rememberSignons", false); // 5003 - -// Do not track header -user_pref("privacy.donottrackheader.enabled", true); // 7015 - -// Allow my custom css -user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); - -// might improve performance TODO: -user_pref("gfx.webrender.all", true); - -// disable updates (pretty pointless with nix) -user_pref("extensions.update.autoUpdateDefault", false); -user_pref("extensions.update.enabled", false); -user_pref("app.update.channel", "default"); - -user_pref("browser.ctrlTab.recentlyUsedOrder", false); - -user_pref("browser.download.useDownloadDir", true); -user_pref("browser.download.folderList", 2); // TODO: -user_pref("browser.download.viewableInternally.typeWasRegistered.svg", true); -user_pref("browser.download.viewableInternally.typeWasRegistered.webp", true); -user_pref("browser.download.viewableInternally.typeWasRegistered.xml", true); - -// TODO: what does this do? -user_pref("browser.search.widget.inNavBar", true); - -user_pref("browser.shell.checkDefaultBrowser", false); -user_pref("browser.tabs.loadInBackground", true); -user_pref("browser.urlbar.placeholderName", "Brave"); - -// Set the tabs and bookmarks -user_pref("browser.tabs.inTitlebar", 1); -user_pref("browser.toolbars.bookmarks.visibility", "never"); -user_pref("browser.places.importBookmarksHTML", true); - -// Theme -user_pref("extensions.activeThemeID", "firefox-alpenglow@mozilla.org"); -user_pref("extensions.extensions.activeThemeID", "firefox-alpenglow@mozilla.org"); - -// highlight all entries when searching -user_pref("findbar.highlightAll", true); - -// Set the default position for the developer toolbox -user_pref("devtools,toolbox.host", "right"); -user_pref("devtools,toolsidebar-width.inspector", 700); - -// Don't bother me with translations -user_pref("browser.translations.automaticallyPopup", true); -user_pref("browser.translations.neverTranslateLanguages", "de"); - -// Put all downloads into the downloads directory -user_pref("browser.download.start_downloads_in_tmp_dir", false); - -// TODO: -//user_pref("extensions.webcompat.enable_picture_in_picture_overrides", true); -//user_pref("extensions.webcompat.enable_shims", true); -//user_pref("extensions.webcompat.perform_injections", true); -//user_pref("extensions.webcompat.perform_ua_overrides", true); - -// onlykey / copied from a yubikey config -//user_pref("security.webauth.u2f", true); -//user_pref("security.webauth.webauthn", true); -//user_pref("security.webauth.webauthn_enable_softtoken", true); -//user_pref("security.webauth.webauthn_enable_usbtoken", true); diff --git a/modules/home.legacy/conf/firefox/default.nix b/modules/home.legacy/conf/firefox/default.nix deleted file mode 100644 index 663c4978..00000000 --- a/modules/home.legacy/conf/firefox/default.nix +++ /dev/null @@ -1,133 +0,0 @@ -{ - config, - pkgs, - lib, - user_js, - ... -}: let - extensions = - builtins.fromJSON (builtins.readFile ./config/extensions/extensions.json); - - userChrome = builtins.readFile ./config/chrome/userChrome.css; - bookmarks = (import ./config/bookmarks/default.nix) { - inherit - pkgs - lib - ; - }; - engines = (import ./config/search/engines) {inherit pkgs;}; - - native_messaging_hosts = (import ./config/extensions/native_messaging_hosts/default.nix) {inherit pkgs;}; - - policies = (import ./config/policies) {inherit config extensions;}; - - search = { - default = "Brave Search"; - privateDefault = "Brave Search"; - force = true; - order = [ - # DEFAULT - "Brave Search" - - # NIX - "Nix Packages" - "Nix Options" - "Nixpkgs issues" - "Homemanager Options" - "NixOS Wiki" - "Nixpkgs Pull Request Tracker" - - # RUST - "Rust std" - "Rust tokio" - - # OTHER - "Google Scholar" - "Wikipedia" - "Arch Wiki" - ]; - - inherit engines; - }; - - prefConfig = builtins.readFile "${ - (import ./config/prefs) {inherit pkgs lib config bookmarks user_js;} - }/user.js"; - - # Package {{{ - package = import ./package.nix { - inherit config lib pkgs; - extraPolicies = policies; - extraNativeMessagingHosts = native_messaging_hosts; - }; - # }}} - - # Profiles {{{ - profiles = { - "default" = { - inherit search userChrome; - isDefault = true; - id = 0; - name = "default"; - extraConfig = prefConfig; - }; - }; - - taskwarriorProfiles = import ../taskwarrior/firefox { - inherit - config - lib - # options - prefConfig - search - userChrome - ; - profile_size = builtins.length (builtins.attrNames profiles); - }; - # }}} -in { - options.soispha.firefox = { - package = lib.mkOption { - type = lib.types.package; - default = pkgs.firefox; - description = "Firefox package to use."; - defaultText = lib.literalExpression "pkgs.firefox"; - relatedPackages = [ - "firefox" - "firefox-beta-bin" - "firefox-bin" - "firefox-devedition-bin" - "firefox-esr" - ]; - }; - package_version = lib.mkOption { - type = lib.types.str; - default = pkgs.firefox.version; - description = "Firefox version to use"; - }; - }; - - config = { - soispha.firefox.package = package; - soispha.firefox.package_version = pkgs.firefox.version; - home.sessionVariables = { - # improve touch input & make scrolling smother - MOZ_USE_XINPUT2 = "1"; - - # improve wayland support - MOZ_ENABLE_WAYLAND = 1; - - # tell gtk to use portals - GTK_USE_PORTAL = 1; - - BROWSER = "firefox"; - }; - programs.firefox = { - enable = true; - inherit (config.soispha.firefox) package; - profiles = - profiles - // taskwarriorProfiles; - }; - }; -} diff --git a/modules/home.legacy/conf/firefox/package.nix b/modules/home.legacy/conf/firefox/package.nix deleted file mode 100644 index f7e4319b..00000000 --- a/modules/home.legacy/conf/firefox/package.nix +++ /dev/null @@ -1,30 +0,0 @@ -# taken from the NixOS Firefox module: https://github.com/NixOS/nixpkgs/blob/7c9cc5a6e5d38010801741ac830a3f8fd667a7a0/nixos/modules/programs/firefox.nix -{ - config, - lib, - pkgs, - # options - autoConfig ? "", - extraNativeMessagingHosts ? [], - wrapperConfig ? {}, - extraPolicies ? {}, - base_package ? pkgs.firefox, -}: let - pkg = base_package.override (old: { - extraPrefsFiles = - (old.extraPrefsFiles or []) - ++ [ - (pkgs.writeText "autoConfig.js" autoConfig) - ]; - nativeMessagingHosts = old.nativeMessagingHosts or [] ++ extraNativeMessagingHosts; - cfg = (old.cfg or {}) // wrapperConfig; - extraPoliciesFiles = - (old.extraPoliciesFiles or []) - ++ [ - ( - pkgs.writeText "policies.json" (builtins.toJSON extraPolicies) - ) - ]; - }); -in - pkg diff --git a/modules/home.legacy/conf/firefox/scripts/default.nix b/modules/home.legacy/conf/firefox/scripts/default.nix deleted file mode 100644 index 1127662b..00000000 --- a/modules/home.legacy/conf/firefox/scripts/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - pkgs, - sysLib, - ... -}: let - unzip_mozlz4 = pkgs.stdenv.mkDerivation { - name = "unzip_mozlz4"; - propagatedBuildInputs = [ - (pkgs.python3.withPackages (pythonPackages: - with pythonPackages; [ - lz4 - ])) - ]; - dontUnpack = true; - installPhase = "install -Dm755 ${./unzip_mozlz4.py} $out/bin/unzip_mozlz4"; - }; - extract_cookies = sysLib.writeShellScript { - name = "extract_cookies"; - src = ./extract_cookies.sh; - dependencies = with pkgs; [ - bash - sqlite - mktemp - coreutils - ]; - }; -in { - inherit unzip_mozlz4 extract_cookies; -} diff --git a/modules/home.legacy/conf/firefox/scripts/extract_cookies.sh b/modules/home.legacy/conf/firefox/scripts/extract_cookies.sh deleted file mode 100755 index e3d50d43..00000000 --- a/modules/home.legacy/conf/firefox/scripts/extract_cookies.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env bash -# copied from https://superuser.com/a/1239036 -# extract_cookies.sh: -# -# Convert from Firefox's cookies.sqlite format to Netscape cookies, -# which can then be used by wget and curl. (Why don't wget and curl -# just use libsqlite if it's installed? Mysteries abound.) -# -# Note: This script reads directly from the standard cookie jar file, -# which means cookies which are kept only in memory ("session cookies") -# will not be extracted. You will need an extension to do that. - -# USAGE: -# -# $ extract_cookies.sh > /tmp/cookies.txt -# or -# $ extract_cookies.sh ~/.mozilla/firefox/*default*/cookies.sqlite > /tmp/cookies.txt - -# USING WITH WGET: -# $ wget --load-cookies=/tmp/cookies.txt http://example.com - -# USING WITH CURL: -# $ curl --cookie /tmp/cookies.txt http://example.com - -# Note: If you do not specify an SQLite filename, this script will -# intelligently find it for you. -# -# A) Usually it will check all profiles under ~/.mozilla/firefox/ and -# use the cookies.sqlite that was updated most recently. -# -# B) If you've redirected stdin (with < or |) , then that will be used. - -# HISTORY: I believe this is circa 2010 from: -# http://slacy.com/blog/2010/02/using-cookies-sqlite-in-wget-or-curl/ -# However, that site is down now. - -# Cleaned up by Hackerb9 (2017) to be more robust and require less typing. - -cleanup() { - rm -f "$TMPFILE" - exit 0 -} -trap cleanup EXIT INT QUIT TERM - -if [ "$#" -ge 1 ]; then - SQLFILE="$1" -else - SQLFILE="$HOME/.mozilla/firefox/default/cookies.sqlite" -fi - -if ! [ -r "$SQLFILE" ]; then - echo "Error. File $SQLFILE is not readable." >&2 - exit 1 -fi - -# We have to copy cookies.sqlite, because FireFox has a lock on it -TMPFILE=$(mktemp /tmp/cookies.sqlite.XXXXXXXXXX) -cat "$SQLFILE" >>"$TMPFILE" - -# This is the format of the sqlite database: -# CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, name TEXT, value TEXT, host TEXT, path TEXT,expiry INTEGER, lastAccessed INTEGER, isSecure INTEGER, isHttpOnly INTEGER); - -echo "# Netscape HTTP Cookie File" -sqlite3 -separator $'\t' "$TMPFILE" <<EOF -.mode tabs -.header off -select host, -case substr(host,1,1)='.' when 0 then 'FALSE' else 'TRUE' end, -path, -case isSecure when 0 then 'FALSE' else 'TRUE' end, -expiry, -name, -value -from moz_cookies; -EOF - -cleanup diff --git a/modules/home.legacy/conf/firefox/scripts/unzip_mozlz4.py b/modules/home.legacy/conf/firefox/scripts/unzip_mozlz4.py deleted file mode 100755 index 71e4e6bc..00000000 --- a/modules/home.legacy/conf/firefox/scripts/unzip_mozlz4.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -# source: https://unix.stackexchange.com/a/497861 -# Command-line tool to decompress mozLz4 files used for example by Firefox to store various kinds of session backup information. -# Works in both Python 2.7.15 and 3.6.7, as of version 2.1.6 of the LZ4 Python bindings at pypi.org/project/lz4. -# To use in another script, simply cut and paste the import statement and the mozlz4_to_text() function (lines 8 to 17). - -import lz4.block # pip install lz4 --user - - -def mozlz4_to_text(filepath): - # Given the path to a "mozlz4", "jsonlz4", "baklz4" etc. file, - # return the uncompressed text. - bytestream = open(filepath, "rb") - bytestream.read(8) # skip past the b"mozLz40\0" header - valid_bytes = bytestream.read() - text = lz4.block.decompress(valid_bytes) - return text - - -def main(args): - # Given command-line arguments of an input filepath for a ".mozlz4" file - # and optionally an output filepath, write the decompressed text to the - # output filepath. - # Default output filepath is the input filepath minus the last three characters - # (e.g. "foo.jsonlz4" becomes "foo.json") - filepath_in = args[0] - if len(args) < 2: - filepath_out = filepath_in[:-3] - else: - filepath_out = args[1] - text = mozlz4_to_text(filepath_in) - with open(filepath_out, "wb") as outfile: - outfile.write(text) - if filepath_out != "/dev/stdout": - print("Wrote decompressed text to {}".format(filepath_out)) - - -if __name__ == "__main__": - import sys - - args = sys.argv[1:] - if args and args[0] not in ("--help", "-h"): - main(args) - else: - print("Usage: mozlz4.py <mozlz4 file to read> <location to write>") diff --git a/modules/home.legacy/conf/firefox/scripts/update_extensions.sh b/modules/home.legacy/conf/firefox/scripts/update_extensions.sh deleted file mode 100755 index 86bd843c..00000000 --- a/modules/home.legacy/conf/firefox/scripts/update_extensions.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -tmp=$(mktemp) -cat <<EOF | awk '!/^\s*#/' >"$tmp" - darkreader:navbar - keepassxc-browser:navbar - vhack-libredirect:navbar - torproject-snowflake:navbar - tridactyl-vim:menupanel - ublock-origin:menupanel -EOF - -# The bin is provided in the devshell; -# The cat execution should be unquoted; -# shellcheck disable=SC2046 -generate_extensions $(cat "$tmp") >"$(dirname "$0")"/../config/extensions/extensions.json - -rm "$tmp" diff --git a/modules/home.legacy/conf/gtk/default.nix b/modules/home.legacy/conf/gtk/default.nix index f5411369..b19ef3a9 100644 --- a/modules/home.legacy/conf/gtk/default.nix +++ b/modules/home.legacy/conf/gtk/default.nix @@ -1,8 +1,6 @@ { config, - lib, pkgs, - stdenv, ... }: { gtk = { diff --git a/modules/home.legacy/conf/keepassxc/default.nix b/modules/home.legacy/conf/keepassxc/default.nix index 3ac82812..38df9055 100644 --- a/modules/home.legacy/conf/keepassxc/default.nix +++ b/modules/home.legacy/conf/keepassxc/default.nix @@ -1,7 +1,3 @@ -{ - config, - pkgs, - ... -}: { +{...}: { xdg.configFile."keepassxc/keepassxc.ini".source = ./keepassxc.ini; } diff --git a/modules/home.legacy/conf/latexindent/default.nix b/modules/home.legacy/conf/latexindent/default.nix index 0d776e14..8dccc73e 100644 --- a/modules/home.legacy/conf/latexindent/default.nix +++ b/modules/home.legacy/conf/latexindent/default.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{...}: { xdg.configFile."latexindent/indentconfig.yaml".source = ./indentconfig.yaml; xdg.configFile."latexindent/mysettings.yaml".source = ./mysettings.yaml; } diff --git a/modules/home.legacy/conf/mako/default.nix b/modules/home.legacy/conf/mako/default.nix index 711457f2..6acf0afe 100644 --- a/modules/home.legacy/conf/mako/default.nix +++ b/modules/home.legacy/conf/mako/default.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{...}: { services.mako = { enable = true; backgroundColor = "#2e3440"; diff --git a/modules/home.legacy/conf/npm/default.nix b/modules/home.legacy/conf/npm/default.nix index 7b4bb6a1..d836e89c 100644 --- a/modules/home.legacy/conf/npm/default.nix +++ b/modules/home.legacy/conf/npm/default.nix @@ -1,7 +1,3 @@ -{ - config, - pkgs, - ... -}: { +{...}: { xdg.configFile."npm/.npmrc".source = ./.npmrc; } diff --git a/modules/home.legacy/conf/rclone/default.nix b/modules/home.legacy/conf/rclone/default.nix index bd0c1ac2..caae4c9e 100644 --- a/modules/home.legacy/conf/rclone/default.nix +++ b/modules/home.legacy/conf/rclone/default.nix @@ -1,7 +1,3 @@ -{ - config, - pkgs, - ... -}: { +{...}: { xdg.configFile."rclone/rclone.conf".source = ./rclone.conf; } diff --git a/modules/home.legacy/conf/starship/default.nix b/modules/home.legacy/conf/starship/default.nix index 5db6eb8b..5255ba66 100644 --- a/modules/home.legacy/conf/starship/default.nix +++ b/modules/home.legacy/conf/starship/default.nix @@ -1,7 +1,6 @@ { lib, nixosConfig, - pkgs, ... }: { programs.starship = { diff --git a/modules/home.legacy/conf/swayidle/default.nix b/modules/home.legacy/conf/swayidle/default.nix index 6b8a7d80..e0106cbf 100644 --- a/modules/home.legacy/conf/swayidle/default.nix +++ b/modules/home.legacy/conf/swayidle/default.nix @@ -1,8 +1,5 @@ -{ - config, - pkgs, - ... -}: { +{...}: { + # TODO: This fails to hibernate when the hardware swap was not previously activated. <2025-04-04> xdg.configFile."swayidle/config".source = ./config; # services.swayidle = { diff --git a/modules/home.legacy/conf/taskwarrior/default.nix b/modules/home.legacy/conf/taskwarrior/default.nix deleted file mode 100644 index d7aec156..00000000 --- a/modules/home.legacy/conf/taskwarrior/default.nix +++ /dev/null @@ -1,125 +0,0 @@ -{ - nixosConfig, - lib, - config, - ... -}: { - imports = [ - ./hooks - ]; - - services.taskwarrior-sync = { - enable = true; - }; - - programs.taskwarrior = let - projects = import ./projects {}; - - mkContext = project: - if builtins.hasAttr "subprojects" project - then - lib.lists.flatten ( - (builtins.map mkContext (builtins.map (mkProject project) project.subprojects)) - ++ (mkContext (builtins.removeAttrs project ["subprojects"])) - ) - else [ - { - inherit (project) name; - value = let - name = - if builtins.hasAttr "pname" project - then project.pname - else project.name; - in { - read = "project:${name}"; - write = "project:${name}"; - rc = { - neorg_path = - if builtins.hasAttr "neorg_path" project - then project.neorg_path - else "${project.prefix}/${project.name}/index.norg"; - }; - }; - } - ]; - mkProject = project: subproject: let - pname = - if builtins.hasAttr "pname" project - then project.pname - else project.name; - in - if builtins.isString subproject - then { - name = "${project.name}_${subproject}"; - pname = "${pname}.${subproject}"; - neorg_path = - if builtins.hasAttr "neorg_path_prefix" project - then "${project.neorg_path_prefix}/${subproject}/index.norg" - else "${project.prefix}/${project.name}/${subproject}/index.norg"; - } - else if builtins.isAttrs subproject - then let - name = builtins.elemAt (builtins.attrNames subproject) 0; - in { - name = "${project.name}_${name}"; - pname = "${pname}.${name}"; - prefix = "${project.prefix}/${project.name}"; - neorg_path_prefix = "${project.prefix}/${project.name}/${name}"; - subprojects = builtins.elemAt (builtins.attrValues subproject) 0; - } - else builtins.throw "Subproject not a string or a attrs: ${subproject}"; - - context = - builtins.listToAttrs (lib.lists.flatten (builtins.map mkContext projects)); - in { - enable = true; - colorTheme = ./nord.theme; - extraConfig = '' - # This include just contains my taskd user credentials - include ${nixosConfig.age.secrets.taskserverCredentials.path} - ''; - config = { - news.version = "2.6.0"; - complete.all.tags = true; - list.all = { - projects = true; - tags = true; - }; - regex = true; - weekstart = "Monday"; - uda = { - total_active_time = { - type = "duration"; - label = "Total active time"; - }; - }; - alias = { - mod = "modify"; - n = "execute neorg --task"; - fstart = "execute neorg fstart"; - }; - color = true; - - hooks.location = "${config.xdg.configHome}/task/hooks"; - - urgency.uda.priority = { - H.coefficient = 6.0; - M.coefficient = 0; - L.coefficient = -1.8; - }; - - inherit context; - - taskd = { - server = "taskserver.vhack.eu:53589"; - trust = "strict"; - ca = - nixosConfig.age.secrets.taskserverCA.path; - key = - nixosConfig.age.secrets.taskserverPrivate.path; - certificate = - nixosConfig.age.secrets.taskserverPublic.path; - }; - }; - }; -} diff --git a/modules/home.legacy/conf/taskwarrior/firefox/default.nix b/modules/home.legacy/conf/taskwarrior/firefox/default.nix deleted file mode 100644 index fb5daaa8..00000000 --- a/modules/home.legacy/conf/taskwarrior/firefox/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - config, - lib, - # options - prefConfig, - profile_size, - search, - userChrome, - ... -}: let - inherit (config.soispha.taskwarrior.projects) projects; - - mkFirefoxProfile = { - name, - id, - }: { - inherit name; - value = { - isDefault = false; - extraConfig = prefConfig; - inherit id name search userChrome; - }; - }; - projects_id = - lib.imap0 (id: project: { - name = project; - id = id + profile_size; - }) - projects; - firefoxProfiles = builtins.listToAttrs (builtins.map mkFirefoxProfile projects_id); -in - firefoxProfiles diff --git a/modules/home.legacy/conf/taskwarrior/hooks/default.nix b/modules/home.legacy/conf/taskwarrior/hooks/default.nix deleted file mode 100644 index ef97e1b5..00000000 --- a/modules/home.legacy/conf/taskwarrior/hooks/default.nix +++ /dev/null @@ -1,114 +0,0 @@ -{ - sysLib, - pkgs, - lib, - config, - ... -}: let - mkProject = project: subproject: - if builtins.isString subproject - then { - name = "${project.name}.${subproject}"; - prefix = null; - } - else let - name = builtins.elemAt (builtins.attrNames subproject) 0; - in { - name = "${project.name}.${name}"; - subprojects = builtins.elemAt (builtins.attrValues subproject) 0; - prefix = null; - }; - - mkProjectName = project: - if builtins.hasAttr "subprojects" project - then - lib.lists.flatten ([project.name] - ++ (builtins.map mkProjectName - (builtins.map (mkProject project) project.subprojects))) - else [project.name]; - projects = lib.lists.unique (lib.lists.naturalSort (lib.lists.flatten (builtins.map mkProjectName (import ../projects {})))); - projects_newline = builtins.concatStringsSep "\n" projects; - projects_comma = builtins.concatStringsSep ", " projects; - projects_pipe = builtins.concatStringsSep "|" projects; - - enforce_policies = sysLib.writeShellScript { - name = "bin"; - src = ./scripts/on-add_enforce-policies.sh; - dependencies = with pkgs; [dash jq taskwarrior gnused gnugrep]; - replacementStrings = { - PROJECTS_NEWLINE = projects_newline; - PROJECTS_COMMA = projects_comma; - }; - }; - track_timewarrior = pkgs.stdenv.mkDerivation { - name = "track_timewarrior.taskwarrior-hook"; - nativeBuildInputs = [ - pkgs.makeWrapper - ]; - buildInputs = [ - pkgs.timewarrior - pkgs.taskwarrior - # TODO: Use a `taskw` package, that actually supports newer python variants <2024-07-13> - (pkgs.python311.withPackages (pythonPackages: - with pythonPackages; [ - taskw - ])) - ]; - dontUnpack = true; - installPhase = '' - install -Dm755 ${./scripts/on-modify_track-timewarrior.py} $out/bin/bin - wrapProgram $out/bin/bin \ - --prefix PATH : ${lib.makeBinPath [pkgs.taskwarrior pkgs.timewarrior]} - ''; - }; - track_total_active_time = pkgs.stdenv.mkDerivation { - name = "track_total_active_time.taskwarrior-hook"; - nativeBuildInputs = [ - pkgs.makeWrapper - ]; - buildInputs = [ - pkgs.taskwarrior - # TODO: Use a `taskw` package, that actually supports newer python variants <2024-07-13> - (pkgs.python311.withPackages (pythonPackages: - with pythonPackages; [ - taskw - ])) - ]; - dontUnpack = true; - installPhase = '' - install -Dm755 ${./scripts/on-modify_track-total-active-time.py} $out/bin/bin - wrapProgram $out/bin/bin \ - --prefix PATH : ${lib.makeBinPath [pkgs.taskwarrior]} - ''; - }; - - mkSyncGitRepo = type: { - name = "${hookPath}/${type}_sync-git-repo"; - value = { - source = "${sysLib.writeShellScript { - name = "bin"; - src = ./scripts + "/${type}_sync-git-repo.sh"; - dependencies = with pkgs; [dash taskwarrior git]; - }}/bin/bin"; - }; - }; - sync_git_repos = - builtins.listToAttrs (builtins.map mkSyncGitRepo ["on-add" "on-modify"]); - hookPath = config.programs.taskwarrior.config.hooks.location; -in { - options.soispha.taskwarrior.projects = lib.mkOption { - type = lib.types.attrs; - }; - config = { - soispha.taskwarrior.projects = { - inherit projects_newline projects_comma projects projects_pipe; - }; - home.file = - { - "${hookPath}/on-add_enforce-policies".source = "${enforce_policies}/bin/bin"; - "${hookPath}/on-modify_track-timewarrior".source = "${track_timewarrior}/bin/bin"; - "${hookPath}/on-modify_track-total-active-time".source = "${track_total_active_time}/bin/bin"; - } - // sync_git_repos; - }; -} diff --git a/modules/home.legacy/conf/taskwarrior/hooks/scripts/on-add_enforce-policies.sh b/modules/home.legacy/conf/taskwarrior/hooks/scripts/on-add_enforce-policies.sh deleted file mode 100755 index eaf7f30c..00000000 --- a/modules/home.legacy/conf/taskwarrior/hooks/scripts/on-add_enforce-policies.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - -# override shell lib output to stdout -eprint() { - # shellcheck disable=SC2317 - print "$@" -} -eprintln() { - # shellcheck disable=SC2317 - println "$@" -} - -enable_hook_dbg() { - debug_hooks="$(task _get rc.debug.hooks)" - [ "$debug_hooks" ] && [ "$debug_hooks" -ge 1 ] && dbg_enable -} - -enforce_project() { - project="$(jq '.project' "$(ptmp "$1")")" - [ "$project" = "null" ] && die "No project supplied!" - - if grep -q "^$(echo "$project" | sed 's|"\(.*\)"|\1|')\$" "$(ptmp "%PROJECTS_NEWLINE")"; then - dbg "project('$project') is a valid part of %PROJECTS_COMMA" - else - die "The project '$(echo "$project" | sed 's|"||g')' is not registered with the nix config, registered projects: %PROJECTS_COMMA" - fi -} - -read -r new_task -# We don't change the task, thus immediately return the json -echo "$new_task" - -enable_hook_dbg -enforce_project "$new_task" - -exit 0 - -# vim: ft=sh diff --git a/modules/home.legacy/conf/taskwarrior/hooks/scripts/on-add_sync-git-repo.sh b/modules/home.legacy/conf/taskwarrior/hooks/scripts/on-add_sync-git-repo.sh deleted file mode 100755 index dadc96b0..00000000 --- a/modules/home.legacy/conf/taskwarrior/hooks/scripts/on-add_sync-git-repo.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - -# override shell lib output to stdout -eprint() { - # shellcheck disable=SC2317 - print "$@" -} -eprintln() { - # shellcheck disable=SC2317 - println "$@" -} - -enable_hook_dbg() { - debug_hooks="$(task _get rc.debug.hooks)" - [ "$debug_hooks" ] && [ "$debug_hooks" -ge 1 ] && dbg_enable -} - -update_git_repo() { - task_data="$(task _get rc.data.location)" - [ "$task_data" ] || die "Taskwarrior should have a location set" - - cd "$task_data" || die "(BUG?): Your data.location path is not accessable" - - [ -d ./.git/ ] || git init - - git add . - git commit --message="chore: Update" --no-gpg-sign -} - -read -r new_task -# We don't change the task, thus immediately return the json -echo "$new_task" - -enable_hook_dbg -update_git_repo - -exit 0 - -# vim: ft=sh diff --git a/modules/home.legacy/conf/taskwarrior/hooks/scripts/on-modify_sync-git-repo.sh b/modules/home.legacy/conf/taskwarrior/hooks/scripts/on-modify_sync-git-repo.sh deleted file mode 100755 index 25813e46..00000000 --- a/modules/home.legacy/conf/taskwarrior/hooks/scripts/on-modify_sync-git-repo.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - -# override shell lib output to stdout -eprint() { - # shellcheck disable=SC2317 - print "$@" -} -eprintln() { - # shellcheck disable=SC2317 - println "$@" -} - -enable_hook_dbg() { - debug_hooks="$(task _get rc.debug.hooks)" - [ "$debug_hooks" ] && [ "$debug_hooks" -ge 1 ] && dbg_enable -} - -update_git_repo() { - task_data="$(task _get rc.data.location)" - [ "$task_data" ] || die "Taskwarrior should have a location set" - - cd "$task_data" || die "(BUG?): Your data.location path is not accessable" - - [ -d ./.git/ ] || git init - - git add . - git commit --message="chore: Update" --no-gpg-sign -} - -read -r _old_task -read -r new_task -# We don't change the task, thus immediately return the json -echo "$new_task" - -enable_hook_dbg -update_git_repo - -exit 0 - -# vim: ft=sh diff --git a/modules/home.legacy/conf/taskwarrior/hooks/scripts/on-modify_track-timewarrior.py b/modules/home.legacy/conf/taskwarrior/hooks/scripts/on-modify_track-timewarrior.py deleted file mode 100755 index b482af6a..00000000 --- a/modules/home.legacy/conf/taskwarrior/hooks/scripts/on-modify_track-timewarrior.py +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -# Copyright (C) 2016-present Arctic Ice Studio <development@arcticicestudio.com> -# Copyright (C) 2016-present Sven Greb <development@svengreb.de> - -# Project: igloo -# Repository: https://github.com/arcticicestudio/igloo -# License: MIT -# References: -# https://taskwarrior.org/docs -# https://taskwarrior.org/docs/timewarrior -# timew(1) -# task(1) - -"""A Taskwarrior hook to track the time of a active task with Taskwarrior. - -This hook will extract all of the following for use as Timewarrior tags: - -* UUID -* Project -* Tags -* Description -* UDAs - -Note: - This hook requires Python 3 and is only compatible with Taskwarrior version greater or equal to 2.4! - -This hook is a fork from the `official on-modify.timewarrior hook`_. - -.. _`official on-modify.timewarrior hook`: - https://github.com/GothenburgBitFactory/timewarrior/blob/dev/ext/on-modify.timewarrior -""" - -import subprocess -import sys -from json import loads, dumps -from os import system -from sys import stdin -from taskw import TaskWarrior - -# Make no changes to the task, simply observe. -old = loads(stdin.readline()) -new = loads(stdin.readline()) -print(dumps(new)) - - -w = TaskWarrior(config_filename=sys.argv[4].replace("rc:", "")) -config = w.load_config(config_filename=sys.argv[4].replace("rc:", "")) -if "max_active_tasks" in config: - MAX_ACTIVE = int(config["max_active_tasks"]) -else: - MAX_ACTIVE = 1 - - -# Extract attributes for use as tags. -tags = [new["description"]] - -if "project" in new: - project = new["project"] - tags.append(project) - if "." in project: - tags.extend([tag for tag in project.split(".")]) - -if "tags" in new: - tags.extend(new["tags"]) - -combined = " ".join(["'%s'" % tag for tag in tags]).encode("utf-8").strip() - -# Task has been started. -if "start" in new and "start" not in old: - # Prevent this task from starting if "task +ACTIVE count" is greater than "MAX_ACTIVE". - p = subprocess.Popen( - ["task", "+ACTIVE", "status:pending", "count", "rc.verbose:off"], - stdout=subprocess.PIPE, - ) - out, err = p.communicate() - count = int(out.rstrip()) - if count >= MAX_ACTIVE: - print( - "Only %d task(s) can be active at a time. " - "See 'max_active_tasks' in .taskrc." % MAX_ACTIVE - ) - sys.exit(1) - - system("timew start " + combined.decode() + " :yes") - -# Task has been stopped. -elif "start" not in new and "start" in old: - system("timew stop " + combined.decode() + " :yes") - -# Any task that is active, with a non-pending status should not be tracked. -elif "start" in new and new["status"] != "pending": - system("timew stop " + combined.decode() + " :yes") diff --git a/modules/home.legacy/conf/taskwarrior/projects/default.nix b/modules/home.legacy/conf/taskwarrior/projects/default.nix deleted file mode 100644 index c5c55059..00000000 --- a/modules/home.legacy/conf/taskwarrior/projects/default.nix +++ /dev/null @@ -1,123 +0,0 @@ -{}: [ - { - name = "me"; - prefix = ""; - subprojects = ["health" "sweden" "bank" "google"]; - } - { - name = "timesinks"; - prefix = ""; - subprojects = ["youtube" "games" "netflix" "music"]; - } - { - name = "input"; - prefix = "research"; - subprojects = ["read-things" "dotfiles"]; - } - { - name = "book"; - prefix = "book"; - } - { - name = "aoc"; - prefix = "programming/advent_of_code"; - } - { - name = "camera"; - prefix = "programming/zig"; - subprojects = []; - } - { - name = "trinitrix"; - prefix = "programming/rust"; - subprojects = ["testing" "documentation"]; - } - { - name = "serverphone"; - prefix = "programming/rust"; - } - { - name = "latex"; - prefix = "programming/latex"; - } - { - name = "presentation"; - prefix = "research"; - } - { - name = "possible-projects"; - prefix = "research"; - } - { - name = "school"; - prefix = "research"; - subprojects = [ - "biologie" - "chemie" - "deutsch" - "english" - "geographie" - "geschichte" - "infomatik" - "klausuren" - "latein" - "mathematik" - "musik" - "philosophie" - "physik" - "sozialkunde" - "sport" - {extern = ["bwinf" "dsa"];} - {chemie = ["facharbeit"];} # TODO: Remove once the ff tabs are cleared <2024-05-10> - ]; - } - { - name = "hardware"; - prefix = "research"; - } - { - name = "buy"; - prefix = "buy"; - subprojects = ["books" "pc"]; - } - { - name = "system"; - prefix = "config"; - subprojects = [ - "youtube" - "backup" - "bar" - "email" - "firefox" - "gpg" - "keyboard" - "laptop" - "nvim" - "rss" - "shell" - "task" - "wm" - ]; - } - { - name = "server"; - prefix = "config"; - subprojects = [ - "b-peetz" - "email" - "blog" - "nix-sync" - "sudo-less" - "ci" - ]; - } - { - name = "3d-printer"; - prefix = "hardware"; - } - { - name = "smartphone"; - prefix = "hardware"; - subprojects = ["airplay" "airdrop"]; - } -] diff --git a/modules/home.legacy/conf/timewarrior/default.nix b/modules/home.legacy/conf/timewarrior/default.nix deleted file mode 100644 index bcb627f5..00000000 --- a/modules/home.legacy/conf/timewarrior/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{pkgs, ...}: { - home.packages = [ - pkgs.timewarrior - ]; - xdg.configFile."timewarrior/timewarrior.cfg".text = '' - # source: https://github.com/arcticicestudio/igloo - #+----+ - #+ UI + - #+----+ - import ${./nord.theme} - color = true - - #+---------+ - #+ Reports + - #+---------+ - define reports: - day: - lines = 10 - month = true - week = true - ''; -} diff --git a/modules/home.legacy/conf/xdg/default.nix b/modules/home.legacy/conf/xdg/default.nix deleted file mode 100644 index 4099720d..00000000 --- a/modules/home.legacy/conf/xdg/default.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ - sysLib, - pkgs, - config, - ... -}: let - url_handler = sysLib.writeShellScript { - name = "url_handler"; - src = ./url_handler.sh; - keepPath = true; - # Naming dependencies for this will be difficult, as it depend on overridden packages. - dependencies = with pkgs; [ - rofi - libnotify - zathura - ]; - replacementStrings = { - ALL_PROJECTS_PIPE = "${config.soispha.taskwarrior.projects.projects_pipe}"; - }; - }; -in { - imports = [ - ./xdg_vars.nix - ]; - - xdg = { - mimeApps = { - enable = true; - defaultApplications = { - "application/pdf" = ["url_handler.desktop"]; - "application/x-pdf" = ["url_handler.desktop"]; - - "text/html" = ["url_handler.desktop"]; - "text/xml" = ["url_handler.desktop"]; - "x-scheme-handler/http" = ["url_handler.desktop"]; - "x-scheme-handler/https" = ["url_handler.desktop"]; - "x-scheme-handler/about" = ["url_handler.desktop"]; - "x-scheme-handler/unknown" = ["url_handler.desktop"]; - }; - }; - desktopEntries = { - url_handler = { - name = "url_handler"; - genericName = "Web Browser"; - exec = "${url_handler}/bin/url_handler %u"; - terminal = false; - categories = [ - "Application" - "Network" - "WebBrowser" - ]; - mimeType = [ - "text/html" - "text/xml" - "x-scheme-handler/http" - "x-scheme-handler/https" - "x-scheme-handler/about" - "x-scheme-handler/unknown" - ]; - }; - }; - }; -} diff --git a/modules/home.legacy/conf/xdg/url_handler.sh b/modules/home.legacy/conf/xdg/url_handler.sh deleted file mode 100755 index 95eedffb..00000000 --- a/modules/home.legacy/conf/xdg/url_handler.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - -project="$(echo "%ALL_PROJECTS_PIPE|nvim|zathura|" | rofi -sep "|" -dmenu)" - -if [ "$project" = "nvim" ]; then - "$TERMINAL" -e nvim "$1" -elif [ "$project" = "zathura" ]; then - zathura "$1" -elif [ "$project" ]; then - firefox -P "$project" "$1" -else - notify-send "(URL HANDLER) No project selected" && exit 1 -fi - -# vim: ft=sh diff --git a/modules/home.legacy/conf/xdg/xdg_vars.nix b/modules/home.legacy/conf/xdg/xdg_vars.nix deleted file mode 100644 index aa2f30d4..00000000 --- a/modules/home.legacy/conf/xdg/xdg_vars.nix +++ /dev/null @@ -1,29 +0,0 @@ -{config, ...}: let - inherit (config.xdg) dataHome; -in { - # FIXME: Move these options in relevant modules, that are connected to their software. - # <2024-10-21> - - # Variables that only have to be set because special applications fail to set reasonable - # defaults (mostly understandable because of backwards-compatibility, but yeah) - home.sessionVariables = { - CARGO_HOME = "${dataHome}/cargo"; - GRADLE_USER_HOME = "${dataHome}/gradle"; - - #_JAVA_OPTIONS = lib.concatStringsSep " " [ - # ''-Djava.util.prefs.userRoot="${config.xdg.configHome}/java"'' - # ''-Djavafx.cachedir="${config.xdg.cacheHome}/openjfx"'' - # ]; - #GOPATH = "${config.xdg.dataHome}/go"; - #GTK2_RC_FILES = "${config.xdg.configHome}/gtk-2.0/gtkrc"; - #RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; - #NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc"; - #NUGET_PACKAGES = "${config.xdg.cacheHome}/NuGetPackages"; - #XAUTHORITY = "${config.xdg.stateHome}/Xauthority"; - #COMPDUMPFILE = "${config.xdg.dataHome}/zsh/.zcompdump}"; - #IPYTHONDIR = "${config.xdg.configHome}/ipython"; - #PARALLEL_HOME = "${config.xdg.configHome}/parallel"; - #STACK_XDG = "1"; - #WINEPREFIX = "${config.xdg.dataHome}/wine"; - }; -} diff --git a/modules/home.legacy/conf/ytcc/default.nix b/modules/home.legacy/conf/ytcc/default.nix deleted file mode 100644 index 87300ec1..00000000 --- a/modules/home.legacy/conf/ytcc/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - config, - pkgs, - ... -}: { - xdg.configFile."ytcc/ytcc.conf".source = pkgs.substituteAll { - src = ./ytcc.conf; - download_dir = "${config.xdg.userDirs.download}/ytcc"; - xdg_data_home = config.xdg.dataHome; - }; -} diff --git a/modules/home.legacy/conf/ytcc/ytcc.conf b/modules/home.legacy/conf/ytcc/ytcc.conf deleted file mode 100644 index 289843ad..00000000 --- a/modules/home.legacy/conf/ytcc/ytcc.conf +++ /dev/null @@ -1,37 +0,0 @@ -[ytcc] -download_dir = @download_dir@ -mpv_flags = --really-quiet --ytdl --ytdl-format=bestvideo[height<=?1080]+bestaudio/best --speed=2.7 -download_subdirs = true -order_by = playlists:asc, publish_date:desc -video_attrs = id, title, publish_date, duration, playlists -playlist_attrs = name, url, tags, reverse -db_path = @xdg_data_home@/ytcc/ytcc.db -date_format = %Y-%m-%d -max_update_fail = 5 -max_update_backlog = 20 -age_limit = 0 - -[tui] -alphabet = sdfervghnuiojkl -default_action = play_video - -[theme] -prompt_download_audio = 2 -prompt_download_video = 4 -prompt_play_audio = 2 -prompt_play_video = 4 -prompt_mark_watched = 1 -table_alternate_background = 245 -plain_label_text = 244 - -[youtube_dl] -format = bestvideo[height<=?1080]+bestaudio/best -output_template = %(title)s.%(ext)s -ratelimit = 0 -retries = 0 -subtitles = off -thumbnail = true -skip_live_stream = true -merge_output_format = mkv -max_duration = 0 -restrict_filenames = false diff --git a/modules/home.legacy/default.nix b/modules/home.legacy/default.nix index de6fec25..706e2045 100644 --- a/modules/home.legacy/default.nix +++ b/modules/home.legacy/default.nix @@ -1,6 +1,7 @@ { nixVim, nix-index-database, + arkenfox-nixos, ... }: let username = "soispha"; @@ -18,10 +19,10 @@ in { ./conf ./files ./pkgs - ./wms nixVim.homeManagerModules.nixvim nix-index-database.hmModules.nix-index + arkenfox-nixos.hmModules.arkenfox ]; # I don't know what this does, but I've seen it a lot online, so it should be good, right? diff --git a/modules/home.legacy/pkgs/default.nix b/modules/home.legacy/pkgs/default.nix index 859aea36..31942f0d 100644 --- a/modules/home.legacy/pkgs/default.nix +++ b/modules/home.legacy/pkgs/default.nix @@ -1,44 +1,22 @@ { pkgs, lib, - config, nixosConfig, ... }: # TODO: Remove this whole file, and move each package to a separate module. <2024-11-16> with pkgs; let - neorgFinal = - neorg.override - { - defaultNeorgProjectDir = config.programs.nixvim.plugins.neorg.settings.load."core.dirman".config.workspaces.projects; - allProjectsNewline = config.soispha.taskwarrior.projects.projects_newline; - allProjectsComma = config.soispha.taskwarrior.projects.projects_comma; - allProjectsPipe = config.soispha.taskwarrior.projects.projects_pipe; - allWorkspaces = config.programs.nixvim.plugins.neorg.settings.load."core.dirman".config.workspaces; - xdgConfigHome = config.xdg.configHome; - xdgDataHome = config.xdg.dataHome; - }; - Gui = { Terminals = [ alacritty # default terminal ]; - Social = [ - signal-desktop # to avoid encryption problems with signal-bridge - ]; - Misc = [ keepassxc # password manager - anki-bin # spaced repetition ]; }; TuiCli = { - EyeCandy = [ - hyfetch # Neofetch with LGBTQ pride flags. - ]; - Social = [ iamb # best tui matrix client (as of today) ]; @@ -48,9 +26,6 @@ with pkgs; let ]; Misc = [ - android-file-transfer # Android MTP client with minimalistic UI - #xdg-ninja # A shell script which checks your $HOME for unwanted files and directories. - xdg-utils # open urls and such things killall # kill a application by name snap-sync-forked # A btrfs based backup solution bc # Smart calculator @@ -65,34 +40,26 @@ with pkgs; let ]; Firefox = [ - # `neorg` handles the integration between Firefox profiles and task + # `tskm` handles the integration between Firefox profiles and task # contexts - neorgFinal + pkgs.tskm ]; }; WM = { CLITools = [ - lswt # List Wayland toplevels. wl-clipboard # Command-line copy/paste utilities. ]; - - Media = [ - libnotify # a command to send a notification. - ]; }; Media = { View = [ - imv # Image viewer zathura # PDF viewer ]; YouTube = [ yt # A command line YouTube client ]; - - Listen = []; }; Hardware = { @@ -125,19 +92,11 @@ with pkgs; let tree # A directory listing program displaying a depth indented list of files fd # Simple, fast and user-friendly alternative to find ripgrep # A search tool that combines the usability of ag with the raw speed of grep - fzf # used to quickly move around with its keybindings file # Show information about a file ll # Wrapper around `lf` to automatically change the path lm # Wrapper around `ll` to automatically cd to the last accessed path ]; - Editors = [ - ed # A POSIX-compliant line-oriented text editor - #sed # GNU stream editor - vim # The original ex/vi text editor (this is `vim` and not `vi`, as `vi` is unfree) - #neovim # Fork of Vim aiming to improve user experience, plugins, and GUIs - ]; - Programming = { GeneralTools = [ stamp # Add a license header to a file @@ -148,8 +107,6 @@ with pkgs; let ]; }; }; - # TODO: unmaintained, find sth else: - # handlr # Powerful alternative to xdg-utils written in Rust mapFun = x: if builtins.isAttrs x then @@ -158,15 +115,6 @@ with pkgs; let else builtins.attrValues x else [x]; in { - options.soispha.programs.neorg = { - package = lib.mkOption { - type = lib.types.package; - default = neorgFinal; - description = '' - The neorg package to use. - ''; - }; - }; config.home.packages = [] ++ (with builtins; diff --git a/modules/home.legacy/wms/default.nix b/modules/home.legacy/wms/default.nix deleted file mode 100644 index 340978f1..00000000 --- a/modules/home.legacy/wms/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{config, ...}: { - imports = [ - # ./sway - # ./plasma - ]; -} diff --git a/modules/home.legacy/wms/plasma/default.nix b/modules/home.legacy/wms/plasma/default.nix deleted file mode 100644 index f68ee272..00000000 --- a/modules/home.legacy/wms/plasma/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{config, ...}: { - services.xserver.enable = true; - services.xserver.displayManager.sddm.enable = true; - services.xserver.desktopManager.plasma5.enable = true; -} diff --git a/modules/home.legacy/wms/sway/default.nix b/modules/home.legacy/wms/sway/default.nix deleted file mode 100644 index bb3ddb49..00000000 --- a/modules/home.legacy/wms/sway/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -# also requires: -# security.polkit.enable = true; -{lib, ...}: { - wayland.windowManager.sway = { - enable = true; - config = { - modifier = "Mod4"; - # Use kitty as default terminal - terminal = "kitty"; - startup = [ - # Launch Firefox on start - {command = "firefox";} - ]; - }; - }; -} diff --git a/pkgs/by-name/be/beetsExtraPlugins/package.nix b/pkgs/by-name/be/beetsExtraPlugins/package.nix index 1cea9d3b..f019922e 100644 --- a/pkgs/by-name/be/beetsExtraPlugins/package.nix +++ b/pkgs/by-name/be/beetsExtraPlugins/package.nix @@ -1,3 +1,3 @@ -{pkgs, ...}: { +{...}: { # xtractor = pkgs.callPackage ./xtractor.nix {beets = pkgs.beetsPackages.beets-minimal;}; } diff --git a/pkgs/by-name/be/beetsExtraPlugins/xtractor.nix b/pkgs/by-name/be/beetsExtraPlugins/xtractor.nix index ecbc10ce..17981cdb 100644 --- a/pkgs/by-name/be/beetsExtraPlugins/xtractor.nix +++ b/pkgs/by-name/be/beetsExtraPlugins/xtractor.nix @@ -3,11 +3,10 @@ fetchFromGitHub, python3Packages, beets, -}: +}: {} # # NOTE: This fails to build now. It didn't work anyways. See # https://git.sr.ht/~johnhamelink/nix/tree/master/item/home/hosts/sun/beets/beets-plugin-xtractor.nix # for a possibly working version. <2025-03-29> - # # FIXME: Find a way to update this derivation <2024-08-11> # let # version = "0.4.2"; @@ -56,3 +55,4 @@ # license = lib.licenses.mit; # }; # } + diff --git a/pkgs/by-name/ge/generate_moz_extension/Cargo.lock b/pkgs/by-name/ge/generate_moz_extension/Cargo.lock index 10970fa6..9ca10746 100644 --- a/pkgs/by-name/ge/generate_moz_extension/Cargo.lock +++ b/pkgs/by-name/ge/generate_moz_extension/Cargo.lock @@ -76,9 +76,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.17" +version = "1.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" +checksum = "525046617d8376e3db1deffb079e91cef90a89fc3ca5c185bbf8c9ecdd15cd5c" dependencies = [ "shlex", ] @@ -133,9 +133,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", "windows-sys 0.59.0", @@ -427,9 +427,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2" dependencies = [ "bytes", "futures-channel", @@ -437,6 +437,7 @@ dependencies = [ "http", "http-body", "hyper", + "libc", "pin-project-lite", "socket2", "tokio", @@ -585,9 +586,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", "hashbrown", @@ -623,9 +624,9 @@ checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" [[package]] name = "linux-raw-sys" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] name = "litemap" @@ -653,9 +654,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" +checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" dependencies = [ "adler2", ] @@ -705,9 +706,9 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "openssl" -version = "0.10.71" +version = "0.10.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" +checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" dependencies = [ "bitflags", "cfg-if", @@ -737,9 +738,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.106" +version = "0.9.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" +checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07" dependencies = [ "cc", "libc", @@ -861,9 +862,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96" +checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" dependencies = [ "bitflags", "errno", @@ -1016,15 +1017,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" [[package]] name = "socket2" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1119,9 +1120,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.44.1" +version = "1.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" dependencies = [ "backtrace", "bytes", diff --git a/pkgs/by-name/ge/generate_moz_extension/Cargo.toml b/pkgs/by-name/ge/generate_moz_extension/Cargo.toml index 1b3ff4f0..8a07d055 100644 --- a/pkgs/by-name/ge/generate_moz_extension/Cargo.toml +++ b/pkgs/by-name/ge/generate_moz_extension/Cargo.toml @@ -11,4 +11,4 @@ futures = "0.3.31" reqwest = "0.12.15" serde = { version = "1.0.219", features = ["derive"] } serde_json = "1.0.140" -tokio = { version = "1.44.1", features = ["macros", "rt-multi-thread"] } +tokio = { version = "1.44.2", features = ["macros", "rt-multi-thread"] } diff --git a/pkgs/by-name/ge/generate_moz_extension/flake.lock b/pkgs/by-name/ge/generate_moz_extension/flake.lock index 9d72fb5b..b6478e18 100644 --- a/pkgs/by-name/ge/generate_moz_extension/flake.lock +++ b/pkgs/by-name/ge/generate_moz_extension/flake.lock @@ -2,11 +2,11 @@ "nodes": { "crane": { "locked": { - "lastModified": 1742394900, - "narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=", + "lastModified": 1743908961, + "narHash": "sha256-e1idZdpnnHWuosI3KsBgAgrhMR05T2oqskXCmNzGPq0=", "owner": "ipetkov", "repo": "crane", - "rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd", + "rev": "80ceeec0dc94ef967c371dcdc56adb280328f591", "type": "github" }, "original": { @@ -35,11 +35,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1743076231, - "narHash": "sha256-yQugdVfi316qUfqzN8JMaA2vixl+45GxNm4oUfXlbgw=", + "lastModified": 1744096231, + "narHash": "sha256-kUfx3FKU1Etnua3EaKvpeuXs7zoFiAcli1gBwkPvGSs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6c5963357f3c1c840201eda129a99d455074db04", + "rev": "b2b0718004cc9a5bca610326de0a82e6ea75920b", "type": "github" }, "original": { @@ -64,11 +64,11 @@ ] }, "locked": { - "lastModified": 1743215516, - "narHash": "sha256-52qbrkG65U1hyrQWltgHTgH4nm0SJL+9TWv2UDCEPNI=", + "lastModified": 1744166053, + "narHash": "sha256-mpI7OzFwp+fUeDtZYQbVZ2YmtxTN2UNrrOwbYD27xKU=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "524463199fdee49338006b049bc376b965a2cfed", + "rev": "896158be1835589db6f42f45ef0a49b8b492cc66", "type": "github" }, "original": { diff --git a/pkgs/by-name/hi/hibernate/package.nix b/pkgs/by-name/hi/hibernate/package.nix index 24754f09..54716606 100644 --- a/pkgs/by-name/hi/hibernate/package.nix +++ b/pkgs/by-name/hi/hibernate/package.nix @@ -1,7 +1,7 @@ { sysLib, systemd, - taskwarrior, + taskwarrior3, }: sysLib.writeShellScript { name = "hibernate"; @@ -10,6 +10,6 @@ sysLib.writeShellScript { keepPath = false; dependencies = [ systemd - taskwarrior + taskwarrior3 ]; } diff --git a/pkgs/by-name/lf/lf-make-map/Cargo.lock b/pkgs/by-name/lf/lf-make-map/Cargo.lock index d68f7492..3e651a8b 100644 --- a/pkgs/by-name/lf/lf-make-map/Cargo.lock +++ b/pkgs/by-name/lf/lf-make-map/Cargo.lock @@ -87,9 +87,9 @@ checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "cc" -version = "1.2.17" +version = "1.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" +checksum = "525046617d8376e3db1deffb079e91cef90a89fc3ca5c185bbf8c9ecdd15cd5c" dependencies = [ "shlex", ] @@ -116,9 +116,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.34" +version = "4.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e958897981290da2a852763fe9cdb89cd36977a5d729023127095fa94d95e2ff" +checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944" dependencies = [ "clap_builder", "clap_derive", @@ -126,9 +126,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.34" +version = "4.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b0f35019843db2160b5bb19ae09b4e6411ac33fc6a712003c33e03090e2489" +checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9" dependencies = [ "anstream", "anstyle", @@ -180,9 +180,9 @@ checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" [[package]] name = "iana-time-zone" -version = "0.1.62" +version = "0.1.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2fd658b06e56721792c5df4475705b6cda790e9298d19d2f8af083457bcd127" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -446,11 +446,37 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.52.0" +version = "0.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" dependencies = [ - "windows-targets", + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -460,6 +486,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" [[package]] +name = "windows-result" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +dependencies = [ + "windows-link", +] + +[[package]] name = "windows-sys" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/pkgs/by-name/lf/lf-make-map/Cargo.toml b/pkgs/by-name/lf/lf-make-map/Cargo.toml index d2427d73..4266ce0c 100644 --- a/pkgs/by-name/lf/lf-make-map/Cargo.toml +++ b/pkgs/by-name/lf/lf-make-map/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] anyhow = "1.0.97" -clap = { version = "4.5.34", features = ["derive", "env"] } +clap = { version = "4.5.35", features = ["derive", "env"] } log = "0.4.27" stderrlog = "0.6.0" walkdir = "2.5.0" diff --git a/pkgs/by-name/lf/lf-make-map/flake.lock b/pkgs/by-name/lf/lf-make-map/flake.lock index c9c523d9..2e19a47e 100644 --- a/pkgs/by-name/lf/lf-make-map/flake.lock +++ b/pkgs/by-name/lf/lf-make-map/flake.lock @@ -2,11 +2,11 @@ "nodes": { "crane": { "locked": { - "lastModified": 1742394900, - "narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=", + "lastModified": 1743908961, + "narHash": "sha256-e1idZdpnnHWuosI3KsBgAgrhMR05T2oqskXCmNzGPq0=", "owner": "ipetkov", "repo": "crane", - "rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd", + "rev": "80ceeec0dc94ef967c371dcdc56adb280328f591", "type": "github" }, "original": { @@ -53,11 +53,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1743076231, - "narHash": "sha256-yQugdVfi316qUfqzN8JMaA2vixl+45GxNm4oUfXlbgw=", + "lastModified": 1744096231, + "narHash": "sha256-kUfx3FKU1Etnua3EaKvpeuXs7zoFiAcli1gBwkPvGSs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6c5963357f3c1c840201eda129a99d455074db04", + "rev": "b2b0718004cc9a5bca610326de0a82e6ea75920b", "type": "github" }, "original": { @@ -85,11 +85,11 @@ ] }, "locked": { - "lastModified": 1743215516, - "narHash": "sha256-52qbrkG65U1hyrQWltgHTgH4nm0SJL+9TWv2UDCEPNI=", + "lastModified": 1744166053, + "narHash": "sha256-mpI7OzFwp+fUeDtZYQbVZ2YmtxTN2UNrrOwbYD27xKU=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "524463199fdee49338006b049bc376b965a2cfed", + "rev": "896158be1835589db6f42f45ef0a49b8b492cc66", "type": "github" }, "original": { @@ -120,11 +120,11 @@ ] }, "locked": { - "lastModified": 1743081648, - "narHash": "sha256-WRAylyYptt6OX5eCEBWyTwOEqEtD6zt33rlUkr6u3cE=", + "lastModified": 1743748085, + "narHash": "sha256-uhjnlaVTWo5iD3LXics1rp9gaKgDRQj6660+gbUU3cE=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "29a3d7b768c70addce17af0869f6e2bd8f5be4b7", + "rev": "815e4121d6a5d504c0f96e5be2dd7f871e4fd99d", "type": "github" }, "original": { diff --git a/pkgs/by-name/lo/lock/package.nix b/pkgs/by-name/lo/lock/package.nix index 1c857cd6..a59fbdd0 100644 --- a/pkgs/by-name/lo/lock/package.nix +++ b/pkgs/by-name/lo/lock/package.nix @@ -1,13 +1,13 @@ { writeShellApplication, - taskwarrior, + taskwarrior3, swaylock, }: writeShellApplication { name = "lock"; text = builtins.readFile ./lock.sh; runtimeInputs = [ - taskwarrior + taskwarrior3 swaylock ]; meta = { diff --git a/pkgs/by-name/ne/neorg/functions/add.sh b/pkgs/by-name/ne/neorg/functions/add.sh deleted file mode 100644 index 5a830a10..00000000 --- a/pkgs/by-name/ne/neorg/functions/add.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env dash - -add0open_taskwarrior_project_file() { - task_project_file="%TASK_PROJECT_FILE" - - cd "$(dirname $task_project_file)" || die "BUG: task_project_file ('$task_project_file') can't be accessed" - - git_dir="$(search_flake_base_dir)" - [ "$git_dir" ] || die "(BUG): No git directory?" - cd "$git_dir" || die "Unreachable, this MUST exists" - - nvim "$task_project_file" - git add "$task_project_file" - - base_task_project_file_path="$(awk "{ gsub(\"$git_dir/\", \"\", \$0); print }" "$(ptmp "$task_project_file")")" - git add $task_project_file - - # Check that only the project file has been added (and that our file is actually - # modified) - if git status --porcelain=v2 | awk -v path="$base_task_project_file_path" 'BEGIN { hit = 0 } { if ($2 ~ /A./ || $2 ~ /M./) { if ($NF ~ path) { hit = 1 } else { hit = 0; exit 1 } } } END { if (hit == 1) { exit 0 } else { exit 1 } }'; then - git commit --verbose --message="chore($(dirname "$base_task_project_file_path")): Update" - fi -} diff --git a/pkgs/by-name/ne/neorg/functions/context.sh b/pkgs/by-name/ne/neorg/functions/context.sh deleted file mode 100644 index 7095847d..00000000 --- a/pkgs/by-name/ne/neorg/functions/context.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env dash - -context0open_current_task_context() { - current_context="$(utils0get_current_context)" - - if [ "$current_context" ]; then - context_path="$(utils0get_current_context_path "$current_context")" - - extended_neorg_project_dir="$(utils0get_neorg_project_dir)" - cd "$extended_neorg_project_dir" || die "(BUG?): Can not access the project dir: $extended_neorg_project_dir" - - nvim "$extended_neorg_project_dir/$context_path" - - git add . - git commit --message="chore($(dirname "$context_path")): Update" --no-gpg-sign - else - warn "No context active" - fi -} - -context0open_current_task_context_at_task_id() { - task_id="$1" - current_context="$(utils0get_current_context)" - - if [ "$current_context" ]; then - context_path="$(utils0get_current_context_path "$current_context")" - extended_neorg_project_dir="$(utils0get_neorg_project_dir)" - task_uuid="$(task "$task_id" uuids)" - - cd "$extended_neorg_project_dir" || die "(BUG?): Can not access the project dir: $extended_neorg_project_dir" - - if ! grep -q "% $task_uuid" "$extended_neorg_project_dir/$context_path"; then - echo "* TITLE (% $task_uuid)" >>"$extended_neorg_project_dir/$context_path" - fi - - nvim "$extended_neorg_project_dir/$context_path" -c "/% $task_uuid" - - git add . - git commit --message="chore($(dirname "$context_path")): Update" --no-gpg-sign - else - warn "No context active" - fi -} diff --git a/pkgs/by-name/ne/neorg/functions/dmenu.sh b/pkgs/by-name/ne/neorg/functions/dmenu.sh deleted file mode 100644 index 5a138982..00000000 --- a/pkgs/by-name/ne/neorg/functions/dmenu.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env dash - -dmenu0open_context_in_browser() { - project="$(echo "%ALL_PROJECTS_PIPE" | rofi -sep "|" -dmenu)" - - if [ "$project" ]; then - [ -d "%NEORG_REVIEW_PATH" ] || mkdir --parents "%NEORG_REVIEW_PATH" - [ -f "%NEORG_REVIEW_PATH/$project.lock" ] || touch "%NEORG_REVIEW_PATH/$project.lock" - project0open_project_in_browser "$project" - else - notify-send "(neorg/dmenu) No project selected" - exit 1 - fi -} diff --git a/pkgs/by-name/ne/neorg/functions/f_start.sh b/pkgs/by-name/ne/neorg/functions/f_start.sh deleted file mode 100644 index 2423dd44..00000000 --- a/pkgs/by-name/ne/neorg/functions/f_start.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env dash - -fstart0start_new_task() { - task_id="$1" - fstop0stop_current_task - task start "$task_id" -} diff --git a/pkgs/by-name/ne/neorg/functions/f_stop.sh b/pkgs/by-name/ne/neorg/functions/f_stop.sh deleted file mode 100644 index e4ff0b94..00000000 --- a/pkgs/by-name/ne/neorg/functions/f_stop.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env dash - -fstop0stop_current_task() { - # we ensured that only one task may be active - active="$(task +ACTIVE _ids)" - [ "$active" ] && task stop "$active" -} diff --git a/pkgs/by-name/ne/neorg/functions/inputs.sh b/pkgs/by-name/ne/neorg/functions/inputs.sh deleted file mode 100644 index d47b129a..00000000 --- a/pkgs/by-name/ne/neorg/functions/inputs.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env dash - -_git_commit() { - message="$1" - - cd "$(dirname "%NEORG_INPUTS_STORAGE_FILE")" || die "BUG. This should exist." - [ -d .git ] || git init - git add . - git commit --message "$message" --no-gpg-sign -} - -inputs0add() { - url_file="$1" - - mkdir --parents "$(dirname "%NEORG_INPUTS_STORAGE_FILE")" - - { - # Add another newline - echo "" - # echo "# $url_file " - - clean "$url_file" - } >>"%NEORG_INPUTS_STORAGE_FILE" && - msg2 "Successfully added file '$url_file' with $(clean "$url_file" | wc -l) entries to the url list" - - _git_commit "Add entries from '$url_file' ($(clean "$url_file" | wc -l))" -} - -inputs0review() { - base_profile="$1" - - [ -f "%NEORG_INPUTS_STORAGE_FILE" ] || die "'%NEORG_INPUTS_STORAGE_FILE' is not a file. Have you added something with 'inputs_add' yet?" - - done_urls="$(mktmp)" - - # We assume that the project is not yet open. - firefox -P "$base_profile" & - # Give it some time to start up. - sleep 2 - - if [ "$(wc -l <"%NEORG_INPUTS_STORAGE_FILE")" -gt 100 ]; then - echo "Your would want to review more than 100 inputs. Limiting it to the first 100 entries." - fi - - head --lines=100 "%NEORG_INPUTS_STORAGE_FILE" | while read -r url; do - echo "-> '$url'" - firefox -P "$base_profile" "$url" - - echo "$url" >>"$done_urls" - done - - # Wait for the Firefox process from above to finish. - wait - - tmp="$(mktmp)" - # source: https://stackoverflow.com/a/24324455 - awk 'NR==FNR {a[$0]=1; next} !a[$0]' "$done_urls" "%NEORG_INPUTS_STORAGE_FILE" >"$tmp" - - mv "$tmp" "%NEORG_INPUTS_STORAGE_FILE" - - _git_commit "Dump entries into firefox profile '$base_profile'" -} diff --git a/pkgs/by-name/ne/neorg/functions/list.sh b/pkgs/by-name/ne/neorg/functions/list.sh deleted file mode 100644 index 10659457..00000000 --- a/pkgs/by-name/ne/neorg/functions/list.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env dash - -list0list_all_contexts_newline() { - print "%ALL_PROJECTS_NEWLINE" -} -list0list_all_contexts_comma() { - print "%ALL_PROJECTS_COMMA" -} diff --git a/pkgs/by-name/ne/neorg/functions/project.sh b/pkgs/by-name/ne/neorg/functions/project.sh deleted file mode 100644 index 64591850..00000000 --- a/pkgs/by-name/ne/neorg/functions/project.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env dash - -project0open_current_context_in_browser() { - current_context="$(utils0get_current_context)" - [ "$current_context" ] || die "No current context to use" - project0open_context_in_browser "$(utils0context2project "$current_context")" -} - -project0open_project_in_browser() { - project="$1" - [ "$project" ] || die "BUG: No context supplied to project0open_context_in_browser" - - old_context="$(utils0get_current_context)" - # We have ensured that only one task may be active - old_started_task="$(task +ACTIVE _ids)" - - tracking="$(mktmp)" - task "project:$project" _ids | xargs --no-run-if-empty task _zshids >"$tracking" - task context "$(utils0project2context "$project")" - - while read -r description; do - desc="$(echo "$description" | awk -F: '{print $2}')" - if [ "$desc" = "tracking" ]; then - task_id="$(echo "$description" | awk -F: '{print $1}')" - notify-send "(Neorg)" "Starting task $project -> $desc" - task start "$task_id" - break - fi - done <"$tracking" - - firefox -P "$project" - - task stop "$task_id" - [ "$old_started_task" ] && task start "$old_started_task" - - if [ "$old_context" ]; then - task context "$old_context" - else - task context none - fi -} diff --git a/pkgs/by-name/ne/neorg/functions/review.sh b/pkgs/by-name/ne/neorg/functions/review.sh deleted file mode 100644 index a0a9ab8d..00000000 --- a/pkgs/by-name/ne/neorg/functions/review.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env dash - -review0start() { - for project in $(list0list_all_contexts_newline); do - if [ -f "%NEORG_REVIEW_PATH/$project.lock" ]; then - msg "Reviewing '$project'" - notify-send "Neorg" "Reviewing '$project'" - firefox -P "$project" - rm "%NEORG_REVIEW_PATH/$project.lock" - fi - done -} diff --git a/pkgs/by-name/ne/neorg/functions/utils.sh b/pkgs/by-name/ne/neorg/functions/utils.sh deleted file mode 100644 index c3843e8e..00000000 --- a/pkgs/by-name/ne/neorg/functions/utils.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env dash - -# Runs it's first argument and then the second, regardless if the first failed or -# succeeded -utils0chain() { - eval "$1" - eval "$2" -} - -utils0get_current_context() { - current_context="$(task _get rc.context)" - printf "%s\n" "$current_context" -} - -utils0get_current_context_path() { - current_context="$1" - context_path="$(task _get rc.context."$current_context".rc.neorg_path 2>/dev/null)" - if ! [ "$context_path" ]; then - context_path="$(grep "context.$current_context.rc.neorg_path" "%HOME_TASKRC" | awk 'BEGIN {FS="="} {print $2}')" - [ "$context_path" ] || die "All contexts should have a 'neorg_path' set!" - fi - printf "%s\n" "$context_path" -} - -utils0get_neorg_project_dir() { - # Perform shell expansion of Tilde - neorg_project_dir="$(sed "s|^~|$HOME|" "$(ptmp "%DEFAULT_NEORG_PROJECT_DIR")")" - printf "%s\n" "$neorg_project_dir" -} - -utils0project2context() { - project="$1" - context="$(sed 's|\.|_|g' "$(ptmp "$project")")" - printf "%s\n" "$context" -} -utils0context2project() { - context="$1" - project="$(sed 's|_|\.|g' "$(ptmp "$context")")" - printf "%s\n" "$project" -} diff --git a/pkgs/by-name/ne/neorg/functions/workspace.sh b/pkgs/by-name/ne/neorg/functions/workspace.sh deleted file mode 100644 index d5eb2fca..00000000 --- a/pkgs/by-name/ne/neorg/functions/workspace.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env dash - -workspace0open_neorg_workspace() { - workspace="$1" - nvim -c "NeorgStart" -s "$(ptmp ":Neorg workspace $workspace\n")" -} -workspace0open_neorg_workspace_prompt() { - nvim -c "NeorgStart" -s "$(ptmp ":Neorg workspace ")" -} diff --git a/pkgs/by-name/ne/neorg/main.sh b/pkgs/by-name/ne/neorg/main.sh deleted file mode 100755 index b4f0f0e6..00000000 --- a/pkgs/by-name/ne/neorg/main.sh +++ /dev/null @@ -1,189 +0,0 @@ -#!/usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - -# load dependencies -. ./functions/add.sh -. ./functions/context.sh -. ./functions/dmenu.sh -. ./functions/f_start.sh -. ./functions/f_stop.sh -. ./functions/inputs.sh -. ./functions/list.sh -. ./functions/project.sh -. ./functions/review.sh -. ./functions/utils.sh -. ./functions/workspace.sh - -# these are used in version() -# shellcheck disable=2034 -AUTHORS="Soispha" -# shellcheck disable=2034 -YEARS="2023" - -NAME="neorg" - -help() { - cat <<EOF -This is the core interface to the system-integrated task management - -USAGE: - $NAME [OPTIONS] [COMMAND] - -OPTIONS: - --help | -h - Display this help and exit. - - --version | -v - Display version and copyright information and exit. -COMMANDS: - task [ID] - Open the neorg context associated with the current context and - the uuid of the task with id ID. Without ID, it'll open the - current context's norg file. - If no context is set, drops you to the selection prompt - - dmenu - Select a project in dmenu mode. This will give you all projects - and exectute the selected one as in 'neorg projects <selected>' - - workspace [WS] - The neorg workspace (WS) to open at startup, an empty value drops - you at a prompt to enter the workspace yourself. - - project [P] - Opens the webbrowser with either the context (P) or - the current active context as argument if no context is supplied - - list - Lists all available contexts - - add - Allows you to quickly add projects - - fstart ID - Starts the task (ID) but only after it stooped - the previous active task, if it existed. - - fstop - Stops the current active task - - review - Review all firefox tabs - - inputs_add F - Add all urls from the file F as inputs to be catogorized - - inputs_review P - Like 'review', but for the inputs that have previously been added. - It takes a project in which to open the urls. -ARGUMENTS: - ID | *([0-9]) := [[%ID_GENERATION_FUNCTION]] - The function displays all possible IDs of the eligable tasks. - - WS := %ALL_WORKSPACES - All possible workspaces. - - P := %ALL_PROJECTS_PIPE - The possible project. - - F := [[fd . --max-depth 3]] - A URL-Input file to use as source. - -EOF -} - -for arg in "$@"; do - case "$arg" in - "--help" | "-h") - help - exit 0 - ;; - "--version" | "-v") - version - exit 0 - ;; - esac -done - -while [ "$#" -ne 0 ]; do - case "$1" in - "t"*) # task - shift 1 - task_id="$1" - [ "$task_id" ] || utils0chain context0open_current_task_context "exit 0" - context0open_current_task_context_at_task_id "$task_id" - exit 0 - ;; - "w"*) # workspace - shift 1 - workspace_to_open="$1" - # TODO: Exit with 1 on error, instead of the 0 <2023-10-20> - [ "$workspace_to_open" ] || utils0chain workspace0open_neorg_workspace_prompt "exit 0" - workspace0open_neorg_workspace "$workspace_to_open" - exit 0 - ;; - "p"*) # project - shift 1 - project_to_open="$1" - # TODO: Exit with 1 on error, instead of the 0 <2023-10-20> - [ "$project_to_open" ] || utils0chain project0open_current_context_in_browser "exit 0" - if ! grep -q "$project_to_open" "$(ptmp "%ALL_PROJECTS_NEWLINE")"; then - die "Your project ('$project_to_open') is not in the list of available projects: -%ALL_PROJECTS_COMMA" - fi - project0open_project_in_browser "$project_to_open" - exit 0 - ;; - "l"*) # list - list0list_all_contexts_newline - exit 0 - ;; - "a"*) # add-project - add0open_taskwarrior_project_file - exit 0 - ;; - "d"*) # dmenu - dmenu0open_context_in_browser - exit 0 - ;; - "fsta"*) # fstart - shift 1 - task_id="$1" - [ "$task_id" ] || die "No task id provided to fstart" - fstart0start_new_task "$task_id" - exit 0 - ;; - "fsto"*) # fstop - fstop0stop_current_task - exit 0 - ;; - "r"*) # review - shift 1 - review0start - exit 0 - ;; - "inputs_a"*) # inputs_add - shift 1 - url_file="$1" - [ -f "$url_file" ] || die "Url file ('$url_file') is not a valid file." - inputs0add "$url_file" - exit 0 - ;; - "inputs_r"*) # inputs_review - shift 1 - base_project="$1" - [ -z "$base_project" ] && die "'inputs_review' requires a project." - inputs0review "$base_project" - exit 0 - ;; - *) - die "Command '$1' does not exist! Please look at:\n $NAME --help" - exit 0 - ;; - esac -done - -context0open_current_task_context -# vim: ft=sh diff --git a/pkgs/by-name/ne/neorg/neorg_id_function.sh b/pkgs/by-name/ne/neorg/neorg_id_function.sh deleted file mode 100755 index 865ecacf..00000000 --- a/pkgs/by-name/ne/neorg/neorg_id_function.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /usr/bin/env dash - -# shellcheck source=/dev/null -SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH - -context="$(task _get rc.context)" -if [ "$context" ]; then - filter="project:$context" -else - filter="0-10000" -fi -tasks="$(task "$filter" _ids)" - -if [ "$tasks" ]; then - echo "$tasks" | xargs task _zshids | awk -F: -v q="'" '{gsub(/'\''/, q "\\" q q ); print $1 ":" q $2 q}' -fi diff --git a/pkgs/by-name/ne/neorg/package.nix b/pkgs/by-name/ne/neorg/package.nix deleted file mode 100644 index ad39290a..00000000 --- a/pkgs/by-name/ne/neorg/package.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ - lib, - sysLib, - # dependencies - cocogitto, - rofi, - libnotify, - taskwarrior, - gawk, - findutils, - # config - defaultNeorgProjectDir ? "/no-default-dir", # homeConfig.programs.nixvim.plugins.neorg.settings.load."core.dirman".config.workspaces.projects - allProjectsNewline ? "", # homeConfig.soispha.taskwarrior.projects.projects_newline - allProjectsComma ? "", # homeConfig.soispha.taskwarrior.projects.projects_comma - allProjectsPipe ? "", # homeConfig.soispha.taskwarrior.projects.projects_pipe - allWorkspaces ? {}, # homeConfig.programs.nixvim.plugins.neorg.settings.load."core.dirman".config.workspaces - xdgConfigHome ? builtins.getEnv "XDG_CONFIG_HOME", - xdgDataHome ? builtins.getEnv "XDG_DATA_HOME", -}: -(sysLib.writeShellScriptMultiPart { - name = "neorg"; - src = ./.; - generateCompletions = true; - keepPath = true; - - baseName = "main.sh"; - cmdPrefix = "functions"; - cmdNames = [ - "add.sh" - "context.sh" - "dmenu.sh" - "f_start.sh" - "f_stop.sh" - "inputs.sh" - "list.sh" - "project.sh" - "review.sh" - "utils.sh" - "workspace.sh" - ]; - - dependencies = [ - cocogitto - rofi - libnotify - ]; - replacementStrings = { - DEFAULT_NEORG_PROJECT_DIR = defaultNeorgProjectDir; - HOME_TASKRC = "${xdgConfigHome}/task/home-manager-taskrc"; - NEORG_REVIEW_PATH = "${xdgDataHome}/neorg/review"; - - NEORG_INPUTS_STORAGE_FILE = "${xdgDataHome}/neorg/inputs/url_list.txt"; - - ALL_PROJECTS_NEWLINE = allProjectsNewline; - ALL_PROJECTS_COMMA = allProjectsComma; - ALL_PROJECTS_PIPE = allProjectsPipe; - ALL_WORKSPACES = "${lib.strings.concatStringsSep "|" (builtins.attrNames allWorkspaces)}"; - - ID_GENERATION_FUNCTION = "${sysLib.writeShellScript { - name = "neorg_id_function"; - src = ./neorg_id_function.sh; - dependencies = [ - taskwarrior - gawk - findutils # source of xargs - ]; - }}/bin/neorg_id_function"; - - # TODO: Replace the hard-coded path here with some reference <2023-10-20> - TASK_PROJECT_FILE = "/home/soispha/repos/nix/nixos-config/hm/soispha/conf/taskwarrior/projects/default.nix"; - }; -}) -// { - meta.mainProgram = "neorg"; -} diff --git a/pkgs/by-name/ri/river-mk-keymap/Cargo.lock b/pkgs/by-name/ri/river-mk-keymap/Cargo.lock index 7fb009ef..c555a367 100644 --- a/pkgs/by-name/ri/river-mk-keymap/Cargo.lock +++ b/pkgs/by-name/ri/river-mk-keymap/Cargo.lock @@ -60,9 +60,9 @@ checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" [[package]] name = "clap" -version = "4.5.34" +version = "4.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e958897981290da2a852763fe9cdb89cd36977a5d729023127095fa94d95e2ff" +checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944" dependencies = [ "clap_builder", "clap_derive", @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.34" +version = "4.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b0f35019843db2160b5bb19ae09b4e6411ac33fc6a712003c33e03090e2489" +checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9" dependencies = [ "anstream", "anstyle", diff --git a/pkgs/by-name/ri/river-mk-keymap/Cargo.toml b/pkgs/by-name/ri/river-mk-keymap/Cargo.toml index f14411f2..19b3cbcb 100644 --- a/pkgs/by-name/ri/river-mk-keymap/Cargo.toml +++ b/pkgs/by-name/ri/river-mk-keymap/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] anyhow = "1.0.97" -clap = { version = "4.5.34", features = ["derive"] } +clap = { version = "4.5.35", features = ["derive"] } keymaps = { version = "1.0.0", features = ["serde", "mouse-keys"] } serde = { version = "1.0.219", features = ["derive"] } serde_json = "1.0.140" diff --git a/pkgs/by-name/ri/river-mk-keymap/flake.lock b/pkgs/by-name/ri/river-mk-keymap/flake.lock index 82448387..eb3616c8 100644 --- a/pkgs/by-name/ri/river-mk-keymap/flake.lock +++ b/pkgs/by-name/ri/river-mk-keymap/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1743076231, - "narHash": "sha256-yQugdVfi316qUfqzN8JMaA2vixl+45GxNm4oUfXlbgw=", + "lastModified": 1744096231, + "narHash": "sha256-kUfx3FKU1Etnua3EaKvpeuXs7zoFiAcli1gBwkPvGSs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6c5963357f3c1c840201eda129a99d455074db04", + "rev": "b2b0718004cc9a5bca610326de0a82e6ea75920b", "type": "github" }, "original": { diff --git a/pkgs/by-name/ts/tskm/.envrc b/pkgs/by-name/ts/tskm/.envrc new file mode 100644 index 00000000..d21a17fc --- /dev/null +++ b/pkgs/by-name/ts/tskm/.envrc @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +SHELL_COMPLETION_DIR="$(pwd)/target/shell" +export SHELL_COMPLETION_DIR + +export TSKM_PROJECT_FILE=/home/soispha/repos/nix/config/modules/common/projects.json + +use flake diff --git a/pkgs/by-name/ts/tskm/.gitignore b/pkgs/by-name/ts/tskm/.gitignore new file mode 100644 index 00000000..2d5df85d --- /dev/null +++ b/pkgs/by-name/ts/tskm/.gitignore @@ -0,0 +1,2 @@ +/target +.direnv diff --git a/pkgs/by-name/ts/tskm/Cargo.lock b/pkgs/by-name/ts/tskm/Cargo.lock new file mode 100644 index 00000000..e4beb42a --- /dev/null +++ b/pkgs/by-name/ts/tskm/Cargo.lock @@ -0,0 +1,1296 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +dependencies = [ + "anstyle", + "once_cell", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "bitflags" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" + +[[package]] +name = "bumpalo" +version = "3.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cc" +version = "1.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525046617d8376e3db1deffb079e91cef90a89fc3ca5c185bbf8c9ecdd15cd5c" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "clap" +version = "4.5.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_complete" +version = "4.5.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06f5378ea264ad4f82bbc826628b5aad714a75abf6ece087e923010eb937fb6" +dependencies = [ + "clap", +] + +[[package]] +name = "clap_derive" +version = "4.5.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" + +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + +[[package]] +name = "flate2" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e" + +[[package]] +name = "iana-time-zone" +version = "0.1.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "is-terminal" +version = "0.4.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.171" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags", + "libc", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +dependencies = [ + "pkg-config", + "vcpkg", +] + +[[package]] +name = "litemap" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" + +[[package]] +name = "log" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" + +[[package]] +name = "lz4_flex" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5" +dependencies = [ + "twox-hash", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "miniz_oxide" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" +dependencies = [ + "adler2", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "proc-macro2" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + +[[package]] +name = "redox_users" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" +dependencies = [ + "getrandom 0.2.15", + "libredox", + "thiserror", +] + +[[package]] +name = "rusqlite" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" +dependencies = [ + "bitflags", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + +[[package]] +name = "rustversion" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "smallvec" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "stderrlog" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c910772f992ab17d32d6760e167d2353f4130ed50e796752689556af07dc6b" +dependencies = [ + "chrono", + "is-terminal", + "log", + "termcolor", + "thread_local", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" + +[[package]] +name = "strum_macros" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn", +] + +[[package]] +name = "syn" +version = "2.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "taskchampion" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b010f5ebe51e88ae490691ed2a43b699e3468c8e3838e244accd8526aca7751b" +dependencies = [ + "anyhow", + "byteorder", + "chrono", + "flate2", + "log", + "rusqlite", + "serde", + "serde_json", + "strum", + "strum_macros", + "thiserror", + "uuid", +] + +[[package]] +name = "termcolor" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tskm" +version = "0.1.0" +dependencies = [ + "anyhow", + "clap", + "clap_complete", + "dirs", + "log", + "lz4_flex", + "serde", + "serde_json", + "stderrlog", + "taskchampion", + "url", + "walkdir", +] + +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "static_assertions", +] + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "uuid" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" +dependencies = [ + "getrandom 0.3.2", + "serde", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "windows-core" +version = "0.61.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-link" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" + +[[package]] +name = "windows-result" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/pkgs/by-name/ts/tskm/Cargo.toml b/pkgs/by-name/ts/tskm/Cargo.toml new file mode 100644 index 00000000..39feea0c --- /dev/null +++ b/pkgs/by-name/ts/tskm/Cargo.toml @@ -0,0 +1,91 @@ +[package] +name = "tskm" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +anyhow = "1.0.97" +clap = { version = "4.5.35", features = ["derive"] } +dirs = "6.0.0" +log = "0.4.27" +lz4_flex = "0.11.3" +serde = { version = "1.0.219", features = ["derive"] } +serde_json = "1.0.140" +stderrlog = "0.6.0" +taskchampion = { version = "2.0.3", default-features = false } +url = { version = "2.5.4", features = ["serde"] } +walkdir = "2.5.0" + +[profile.release] +lto = true +codegen-units = 1 +panic = "abort" +split-debuginfo = "off" + +[lints.rust] +# rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html +warnings = "warn" +future_incompatible = { level = "warn", priority = -1 } +let_underscore = { level = "warn", priority = -1 } +nonstandard_style = { level = "warn", priority = -1 } +rust_2018_compatibility = { level = "warn", priority = -1 } +rust_2018_idioms = { level = "warn", priority = -1 } +rust_2021_compatibility = { level = "warn", priority = -1 } +unused = { level = "warn", priority = -1 } +# rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html +# missing_docs = "warn" +macro_use_extern_crate = "warn" +meta_variable_misuse = "warn" +missing_abi = "warn" +missing_copy_implementations = "warn" +missing_debug_implementations = "warn" +non_ascii_idents = "warn" +noop_method_call = "warn" +single_use_lifetimes = "warn" +trivial_casts = "warn" +trivial_numeric_casts = "warn" +unreachable_pub = "warn" +unsafe_op_in_unsafe_fn = "warn" +unused_crate_dependencies = "warn" +unused_import_braces = "warn" +unused_lifetimes = "warn" +unused_qualifications = "warn" +variant_size_differences = "warn" + +[lints.rustdoc] +# rustdoc lints https://doc.rust-lang.org/rustdoc/lints.html +broken_intra_doc_links = "warn" +private_intra_doc_links = "warn" +missing_crate_level_docs = "warn" +private_doc_tests = "warn" +invalid_codeblock_attributes = "warn" +invalid_rust_codeblocks = "warn" +bare_urls = "warn" + +[lints.clippy] +# clippy allowed by default +dbg_macro = "warn" +# clippy categories https://doc.rust-lang.org/clippy/ +all = { level = "warn", priority = -1 } +correctness = { level = "warn", priority = -1 } +suspicious = { level = "warn", priority = -1 } +style = { level = "warn", priority = -1 } +complexity = { level = "warn", priority = -1 } +perf = { level = "warn", priority = -1 } +pedantic = { level = "warn", priority = -1 } +missing_panics_doc = "allow" +missing_errors_doc = "allow" + +[build-dependencies] +anyhow = "1.0.97" +clap = { version = "4.5.35", features = ["derive"] } +clap_complete = "4.5.47" +dirs = "6.0.0" +log = "0.4.27" +serde = { version = "1.0.219", features = ["derive"] } +serde_json = "1.0.140" +taskchampion = { version = "2.0.3", default-features = false } +url = "2.5.4" +walkdir = "2.5.0" diff --git a/pkgs/by-name/ts/tskm/build.rs b/pkgs/by-name/ts/tskm/build.rs new file mode 100644 index 00000000..e3b60bb9 --- /dev/null +++ b/pkgs/by-name/ts/tskm/build.rs @@ -0,0 +1,52 @@ +use anyhow::{Context, Result}; +use clap::{CommandFactory, ValueEnum}; +use clap_complete::generate_to; +use clap_complete::Shell; + +use std::env; +use std::fs; +use std::path::PathBuf; + +use crate::cli::CliArgs; + +pub mod task { + include!("src/task/mod.rs"); +} +pub mod state { + include!("src/state.rs"); +} + +pub mod interface { + pub mod input { + include!("src/interface/input/mod.rs"); + } + pub mod project { + include!("src/interface/project/mod.rs"); + } +} + +pub mod cli { + include!("src/cli.rs"); +} + +fn main() -> Result<()> { + let outdir = match env::var_os("SHELL_COMPLETION_DIR") { + None => return Ok(()), + Some(outdir) => outdir, + }; + + if !PathBuf::from(&outdir).exists() { + fs::create_dir_all(&outdir)?; + } + + let mut cmd = CliArgs::command(); + + for &shell in Shell::value_variants() { + let path = generate_to(shell, &mut cmd, "tskm", &outdir).with_context(|| { + format!("Failed to output shell completion for {shell} to {outdir:?}") + })?; + println!("cargo:warning=completion file for {shell} is generated at: {path:?}"); + } + + Ok(()) +} diff --git a/pkgs/by-name/ts/tskm/flake.lock b/pkgs/by-name/ts/tskm/flake.lock new file mode 100644 index 00000000..eb3616c8 --- /dev/null +++ b/pkgs/by-name/ts/tskm/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1744096231, + "narHash": "sha256-kUfx3FKU1Etnua3EaKvpeuXs7zoFiAcli1gBwkPvGSs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b2b0718004cc9a5bca610326de0a82e6ea75920b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/pkgs/by-name/ts/tskm/flake.nix b/pkgs/by-name/ts/tskm/flake.nix new file mode 100644 index 00000000..5a5f628b --- /dev/null +++ b/pkgs/by-name/ts/tskm/flake.nix @@ -0,0 +1,29 @@ +{ + description = "This is the core interface to the system-integrated task management"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + }; + + outputs = {nixpkgs, ...}: let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages."${system}"; + in { + devShells."${system}".default = pkgs.mkShell { + buildInputs = [ + pkgs.sqlite + ]; + + packages = with pkgs; [ + cargo + clippy + rustc + rustfmt + + cargo-edit + ]; + }; + }; +} +# vim: ts=2 + diff --git a/pkgs/by-name/ts/tskm/package.nix b/pkgs/by-name/ts/tskm/package.nix new file mode 100644 index 00000000..3d320772 --- /dev/null +++ b/pkgs/by-name/ts/tskm/package.nix @@ -0,0 +1,53 @@ +{ + rustPlatform, + installShellFiles, + makeWrapper, + lib, + # Dependencies + taskwarrior3, + git, + rofi, + firefox, + sqlite, +}: +rustPlatform.buildRustPackage (finalAttrs: { + pname = "tskm"; + version = "0.1.0"; + + src = ./.; + cargoLock = { + lockFile = ./Cargo.lock; + }; + + env = { + SHELL_COMPLETION_DIR = "./shell"; + }; + + buildInputs = [ + taskwarrior3 + git + rofi + firefox + sqlite + ]; + + nativeBuildInputs = [ + installShellFiles + makeWrapper + ]; + + postInstall = '' + installShellCompletion --cmd tskm \ + --bash ./shell/tskm.bash \ + --fish ./shell/tskm.fish \ + --zsh ./shell/_tskm + + # NOTE: We cannot clear the path, because we need access to the $EDITOR. <2025-04-04> + wrapProgram $out/bin/tskm \ + --prefix PATH : ${lib.makeBinPath finalAttrs.buildInputs} + ''; + + meta = { + mainProgram = "tskm"; + }; +}) diff --git a/pkgs/by-name/ts/tskm/src/cli.rs b/pkgs/by-name/ts/tskm/src/cli.rs new file mode 100644 index 00000000..1c72b3c2 --- /dev/null +++ b/pkgs/by-name/ts/tskm/src/cli.rs @@ -0,0 +1,153 @@ +use std::path::PathBuf; + +use anyhow::{bail, Result}; +use clap::{ArgAction, Parser, Subcommand}; +use url::Url; + +use crate::{ + interface::{input::Input, project::ProjectName}, + state::State, + task, +}; + +#[derive(Parser, Debug)] +#[command(author, version, about, long_about, verbatim_doc_comment)] +/// This is the core interface to the system-integrated task management +/// +/// `tskm` effectively combines multiple applications together: +/// - `taskwarrior` projects are raised connected to `firefox` profiles, making it possible to “open” +/// a project. +/// - Every `taskwarrior` project has a determined `neorg` path, so that extra information for a +/// `project` can be stored in this `norg` file. +/// - `tskm` can track inputs for you. These are URLs with optional tags which you can that +/// “review” to open tasks based on them. +pub struct CliArgs { + #[command(subcommand)] + pub command: Command, + + /// Increase message verbosity + #[arg(long="verbose", short = 'v', action = ArgAction::Count, default_value_t = 2)] + pub verbosity: u8, + + /// Silence all output + #[arg(long, short = 'q')] + pub quiet: bool, +} + +#[derive(Subcommand, Debug)] +pub enum Command { + /// Interact with projects. + Projects { + #[command(subcommand)] + command: ProjectCommand, + }, + + /// Manage the input queue. + Inputs { + #[command(subcommand)] + command: InputCommand, + }, + + /// Access the associated `neorg` workspace for the project/task. + Neorg { + #[command(subcommand)] + command: NeorgCommand, + }, + + /// Interface with the Firefox profile of each project. + Open { + #[command(subcommand)] + command: OpenCommand, + }, +} + +#[derive(Subcommand, Debug)] +pub enum ProjectCommand { + /// Lists all available projects. + List, + + /// Allows you to quickly add projects. + Add { + /// The name of the new project. + #[arg(value_parser = ProjectName::try_from_project)] + new_project_name: ProjectName, + }, +} + +#[derive(Subcommand, Debug, Clone, Copy)] +pub enum NeorgCommand { + /// Open the `neorg` project associated with id of the task. + Task { + /// The working set id of the task + #[arg(value_parser = task_from_working_set_id)] + id: task::Task, + }, +} + +fn task_from_working_set_id(id: &str) -> Result<task::Task> { + let id: usize = id.parse()?; + let mut state = State::new_ro()?; + + let Some(task) = task::Task::from_working_set(id, &mut state)? else { + bail!("Working set id '{id}' is not valid!") + }; + Ok(task) +} + +#[derive(Subcommand, Debug)] +pub enum OpenCommand { + /// Open each project's Firefox profile consecutively, that was opened since the last review. + /// + /// This allows you to remove stale opened tabs and to commit open tabs to the `inputs`. + Review, + + /// Opens Firefox with either the supplied project or the currently active project profile. + Project { + /// The project to open. + #[arg(value_parser = task::Project::from_project_string)] + project: task::Project, + + /// The URL to open. + url: Option<Url>, + }, + + /// Open a selected project in it's Firefox profile. + /// + /// This will use rofi's dmenu mode to select one project from the list of all registered + /// projects. + Select { + /// The URL to open. + url: Option<Url>, + }, + + /// List all open tabs in the project. + ListTabs { + /// The project to open. + #[arg(value_parser = task::Project::from_project_string)] + project: Option<task::Project>, + }, +} + +#[derive(Subcommand, Debug)] +pub enum InputCommand { + /// Add URLs as inputs to be categorized. + Add { inputs: Vec<Input> }, + /// Remove URLs + Remove { inputs: Vec<Input> }, + + /// Add all URLs in the file as inputs to be categorized. + /// + /// This expects each line to contain one URL. + File { file: PathBuf }, + + /// Like 'review', but for the inputs that have previously been added. + /// It takes a project in which to open the URLs. + Review { + /// Opens all the URLs in this project. + #[arg(value_parser = task::Project::from_project_string)] + project: task::Project, + }, + + /// List all the previously added inputs. + List, +} diff --git a/pkgs/by-name/ts/tskm/src/interface/input/handle.rs b/pkgs/by-name/ts/tskm/src/interface/input/handle.rs new file mode 100644 index 00000000..0ff0e56e --- /dev/null +++ b/pkgs/by-name/ts/tskm/src/interface/input/handle.rs @@ -0,0 +1,112 @@ +use std::{ + fs, process, + str::FromStr, + thread::{self, sleep}, + time::Duration, +}; + +use anyhow::{Context, Result}; +use log::{error, info}; + +use crate::cli::InputCommand; + +use super::Input; + +/// # Errors +/// When command handling fails. +/// +/// # Panics +/// When internal assertions fail. +pub fn handle(command: InputCommand) -> Result<()> { + match command { + InputCommand::Add { inputs } => { + for input in inputs { + input.commit().with_context(|| { + format!("Failed to add input ('{input}') to the input storage.") + })?; + } + } + InputCommand::Remove { inputs } => { + for input in inputs { + input.remove().with_context(|| { + format!("Failed to remove input ('{input}') from the input storage.") + })?; + } + } + InputCommand::File { file } => { + let file = fs::read_to_string(file)?; + for line in file.lines() { + let input = Input::from_str(line)?; + input.commit().with_context(|| { + format!("Failed to add input ('{input}') to the input storage.") + })?; + } + } + InputCommand::Review { project } => { + let project = project.to_project_display(); + + let local_project = project.clone(); + let handle = thread::spawn(move || { + // We assume that the project is not yet open. + let mut firefox = process::Command::new("firefox") + .args(["-P", local_project.as_str(), "about:newtab"]) + .spawn()?; + + Ok::<_, anyhow::Error>(firefox.wait()?) + }); + // Give Firefox some time to start. + info!("Waiting on firefox to start"); + sleep(Duration::from_secs(4)); + + let project_str = project.as_str(); + 'outer: for all in Input::all()?.chunks(100) { + info!("Starting review for the first hundred URLs."); + + for input in all { + info!("-> '{input}'"); + let status = process::Command::new("firefox") + .args(["-P", project_str, input.url().to_string().as_str()]) + .status()?; + + if status.success() { + input.remove()?; + } else { + error!("Adding `{input}` to Firefox failed!"); + } + } + + { + use std::io::{stdin, stdout, Write}; + + let mut s = String::new(); + eprint!("Continue? (y/N) "); + stdout().flush()?; + + stdin() + .read_line(&mut s) + .expect("Did not enter a correct string"); + + if let Some('\n') = s.chars().next_back() { + s.pop(); + } + if let Some('\r') = s.chars().next_back() { + s.pop(); + } + + if s != "y" { + break 'outer; + } + } + } + + info!("Waiting for firefox to stop"); + handle.join().expect("Should be joinable")?; + } + InputCommand::List => { + for url in Input::all()? { + println!("{url}"); + } + } + } + Ok(()) +} diff --git a/pkgs/by-name/ts/tskm/src/interface/input/mod.rs b/pkgs/by-name/ts/tskm/src/interface/input/mod.rs new file mode 100644 index 00000000..9ece7a3a --- /dev/null +++ b/pkgs/by-name/ts/tskm/src/interface/input/mod.rs @@ -0,0 +1,257 @@ +use std::{ + collections::HashSet, + fmt::Display, + fs::{self, read_to_string, File}, + io::Write, + path::PathBuf, + process::Command, + str::FromStr, +}; + +use anyhow::{bail, Context, Result}; +use url::Url; +use walkdir::WalkDir; + +pub mod handle; +pub use handle::handle; + +#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct NoWhitespaceString(String); + +impl NoWhitespaceString { + /// # Panics + /// If the input contains whitespace. + #[must_use] + pub fn new(input: String) -> Self { + if input.contains(' ') { + panic!("Your input '{input}' contains whitespace. I did not expect that.") + } else { + Self(input) + } + } +} + +impl Display for NoWhitespaceString { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + self.0.fmt(f) + } +} + +impl NoWhitespaceString { + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } +} + +#[derive(Debug, Clone)] +pub struct Input { + url: Url, + tags: HashSet<NoWhitespaceString>, +} + +impl FromStr for Input { + type Err = anyhow::Error; + + fn from_str(s: &str) -> std::result::Result<Self, Self::Err> { + if s.contains(' ') { + let (url, tags) = s.split_once(' ').expect("Should work"); + Ok(Self { + url: Url::from_str(url)?, + tags: { + tags.trim() + .split(' ') + .map(|tag| { + if let Some(tag) = tag.strip_prefix('+') { + Ok(NoWhitespaceString::new(tag.to_owned())) + } else { + bail!("Your tag '{tag}' does not start with the required '+'"); + } + }) + .collect::<Result<_, _>>()? + }, + }) + } else { + Ok(Self { + url: Url::from_str(s)?, + tags: HashSet::new(), + }) + } + } +} + +impl Display for Input { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + if self.tags.is_empty() { + self.url.fmt(f) + } else { + write!( + f, + "{} {}", + self.url, + self.tags + .iter() + .fold(String::new(), |mut acc, tag| { + acc.push('+'); + acc.push_str(tag.as_str()); + acc.push(' '); + acc + }) + .trim() + ) + } + } +} + +impl Input { + fn base_path() -> PathBuf { + dirs::data_local_dir() + .expect("This should be set") + .join("tskm/inputs") + } + + fn url_path(url: &Url) -> Result<PathBuf> { + let base_path = Self::base_path(); + + let url_path = base_path.join(url.to_string()); + fs::create_dir_all(&url_path) + .with_context(|| format!("Failed to open file: '{}'", url_path.display()))?; + + Ok(url_path.join("url_value")) + } + + #[must_use] + pub fn url(&self) -> &Url { + &self.url + } + + /// Commit this constructed [`Input`] to storage. + /// + /// # Errors + /// If IO operations fail. + pub fn commit(&self) -> Result<()> { + let url_path = Self::url_path(&self.url)?; + + let url_content = { + if url_path.exists() { + read_to_string(&url_path)? + } else { + String::new() + } + }; + + let mut file = File::create(&url_path) + .with_context(|| format!("Failed to open file: '{}'", url_path.display()))?; + writeln!(file, "{url_content}{self}")?; + + Self::git_commit(&format!("Add new url: '{self}'"))?; + + Ok(()) + } + + /// Remove this constructed [`Input`] to storage. + /// + /// Beware that this does not take tags into account. + /// + /// # Errors + /// If IO operations fail. + pub fn remove(&self) -> Result<()> { + let url_path = Self::url_path(&self.url)?; + + fs::remove_file(&url_path) + .with_context(|| format!("Failed to remove file: '{}'", url_path.display()))?; + + let mut url_path = url_path.as_path(); + while let Some(parent) = url_path.parent() { + if fs::read_dir(parent)?.count() == 0 { + fs::remove_dir(parent)?; + } + url_path = parent; + } + + Self::git_commit(&format!("Remove url: '{self}'"))?; + Ok(()) + } + + /// Commit your changes + fn git_commit(message: &str) -> Result<()> { + let status = Command::new("git") + .args(["add", "."]) + .current_dir(Self::base_path()) + .status()?; + if !status.success() { + bail!("Git add . failed!"); + } + + let status = Command::new("git") + .args(["commit", "--message", message, "--no-gpg-sign"]) + .current_dir(Self::base_path()) + .status()?; + if !status.success() { + bail!("Git commit failed!"); + } + + Ok(()) + } + + /// Get all previously [`Self::commit`]ed inputs. + /// + /// # Errors + /// When IO handling fails. + /// + /// # Panics + /// If internal assertions fail. + pub fn all() -> Result<Vec<Self>> { + let mut output = vec![]; + for entry in WalkDir::new(Self::base_path()) + .min_depth(1) + .into_iter() + .filter_entry(|e| { + let s = e.file_name().to_str(); + s != Some(".git") + }) + { + let entry = entry?; + + if !entry.file_type().is_file() { + continue; + } + + let url_value_file = entry + .path() + .to_str() + .expect("All of these should be URLs and thus valid strings"); + assert!(url_value_file.ends_with("/url_value")); + + let url = { + let base = url_value_file + .strip_prefix(&format!("{}/", Self::base_path().display())) + .expect("This will exist"); + + let (proto, path) = base.split_once(':').expect("This will countain a :"); + + let path = path.strip_suffix("/url_value").expect("Will exist"); + + Url::from_str(&format!("{proto}:/{path}")) + .expect("This was a URL, it should still be one") + }; + let tags = { + let url_values = read_to_string(PathBuf::from(url_value_file))?; + url_values + .lines() + .map(|line| { + let input = Self::from_str(line)?; + Ok::<_, anyhow::Error>(input.tags) + }) + .collect::<Result<Vec<HashSet<NoWhitespaceString>>, _>>()? + .into_iter() + .flatten() + .collect() + }; + + output.push(Self { url, tags }); + } + + Ok(output) + } +} diff --git a/pkgs/by-name/ts/tskm/src/interface/mod.rs b/pkgs/by-name/ts/tskm/src/interface/mod.rs new file mode 100644 index 00000000..1a0d934c --- /dev/null +++ b/pkgs/by-name/ts/tskm/src/interface/mod.rs @@ -0,0 +1,4 @@ +pub mod input; +pub mod neorg; +pub mod open; +pub mod project; diff --git a/pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs b/pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs new file mode 100644 index 00000000..d904b12e --- /dev/null +++ b/pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs @@ -0,0 +1,88 @@ +use std::{ + env, + fs::{self, read_to_string, File, OpenOptions}, + io::Write, + process::Command, +}; + +use anyhow::{bail, Context, Result}; + +use crate::{cli::NeorgCommand, state::State}; + +pub fn handle(command: NeorgCommand, state: &mut State) -> Result<()> { + match command { + NeorgCommand::Task { id } => { + let project = id.project(state)?; + let base = dirs::data_local_dir() + .expect("This should exists") + .join("tskm/notes"); + let path = base.join(project.get_neorg_path()?); + + fs::create_dir_all(path.parent().expect("This should exist"))?; + + { + let contents = if path.exists() { + read_to_string(&path) + .with_context(|| format!("Failed to read file: '{}'", path.display()))? + } else { + File::create(&path) + .with_context(|| format!("Failed to create file: '{}'", path.display()))?; + String::new() + }; + + if !contents.contains(format!("% {}", id.uuid()).as_str()) { + let mut options = OpenOptions::new(); + options.append(true).create(false); + + let mut file = options.open(&path)?; + file.write_all(format!("* TITLE (% {})", id.uuid()).as_bytes()) + .with_context(|| { + format!("Failed to write task uuid to file: '{}'", path.display()) + })?; + file.flush() + .with_context(|| format!("Failed to flush file: '{}'", path.display()))?; + } + } + + let editor = env::var("EDITOR").unwrap_or("nvim".to_owned()); + let status = Command::new(editor) + .args([ + path.to_str().expect("Should be a utf-8 str"), + "-c", + format!("/% {}", id.uuid()).as_str(), + ]) + .status()?; + if !status.success() { + bail!("$EDITOR fail with error code: {status}"); + } + + { + let status = Command::new("git") + .args(["add", "."]) + .current_dir(path.parent().expect("Will exist")) + .status()?; + if !status.success() { + bail!("Git add . failed!"); + } + + let status = Command::new("git") + .args([ + "commit", + "--message", + format!("chore({}): Update", project.get_neorg_path()?.display()).as_str(), + "--no-gpg-sign", + ]) + .current_dir(path.parent().expect("Will exist")) + .status()?; + if !status.success() { + bail!("Git commit failed!"); + } + } + + { + id.mark_neorg_data(state)?; + } + } + } + Ok(()) +} diff --git a/pkgs/by-name/ts/tskm/src/interface/neorg/mod.rs b/pkgs/by-name/ts/tskm/src/interface/neorg/mod.rs new file mode 100644 index 00000000..51d58ab3 --- /dev/null +++ b/pkgs/by-name/ts/tskm/src/interface/neorg/mod.rs @@ -0,0 +1,25 @@ +use std::path::PathBuf; + +use anyhow::Result; + +use crate::task::{run_task, Project}; + +pub mod handle; +pub use handle::handle; + +impl Project { + /// Return the stored neorg path of this project. + /// The returned path will never start with a slash (/). + pub(super) fn get_neorg_path(&self) -> Result<PathBuf> { + let project_path = run_task(&[ + "_get", + format!("rc.context.{}.rc.neorg_path", self.to_context_display()).as_str(), + ])?; + + let final_path = project_path + .strip_prefix('/') + .unwrap_or(project_path.as_str()); + + Ok(PathBuf::from(final_path)) + } +} diff --git a/pkgs/by-name/ts/tskm/src/interface/open/handle.rs b/pkgs/by-name/ts/tskm/src/interface/open/handle.rs new file mode 100644 index 00000000..4d7341b2 --- /dev/null +++ b/pkgs/by-name/ts/tskm/src/interface/open/handle.rs @@ -0,0 +1,232 @@ +use std::{ + fs, + net::{IpAddr, Ipv4Addr}, + path::PathBuf, + process, +}; + +use anyhow::{bail, Context, Result}; +use log::{error, info, warn}; +use url::Url; + +use crate::{cli::OpenCommand, rofi, state::State, task}; + +pub fn handle(command: OpenCommand, state: &mut State) -> Result<()> { + match command { + OpenCommand::Review => { + for project in task::Project::all().context("Failed to get all project files")? { + if project.is_touched() { + info!("Reviewing project: '{}'", project.to_project_display()); + open_in_browser(project, state, None).with_context(|| { + format!( + "Failed to open project ('{}') in Firefox", + project.to_project_display() + ) + })?; + project.untouch().with_context(|| { + format!( + "Failed to untouch project ('{}')", + project.to_project_display() + ) + })?; + } + } + } + OpenCommand::Project { project, url } => { + project.touch().context("Failed to touch project")?; + open_in_browser(&project, state, url).with_context(|| { + format!("Failed to open project: {}", project.to_project_display()) + })?; + } + OpenCommand::Select { url } => { + let selected_project: task::Project = task::Project::from_project_string( + &rofi::select( + task::Project::all() + .context("Failed to get all registered projects")? + .iter() + .map(task::Project::to_project_display) + .collect::<Vec<_>>() + .as_slice(), + ) + .context("Failed to get selected project")?, + ) + .expect("This should work, as we send only projects in"); + + selected_project + .touch() + .context("Failed to touch project")?; + + open_in_browser(&selected_project, state, url).context("Failed to open project")?; + } + OpenCommand::ListTabs { project } => { + let project = if let Some(p) = project { + p + } else if let Some(p) = + task::Project::get_current().context("Failed to get currently focused project")? + { + p + } else { + bail!("You need to either supply a project or have a project active!"); + }; + + let session_store = project.get_sessionstore().with_context(|| { + format!( + "Failed to get session store for project: '{}'", + project.to_project_display() + ) + })?; + + let selected = session_store + .windows + .iter() + .map(|w| w.selected) + .collect::<Vec<_>>(); + + let tabs = session_store + .windows + .iter() + .flat_map(|window| window.tabs.iter()) + .map(|tab| tab.entries.get(tab.index - 1).expect("This should be Some")) + .collect::<Vec<_>>(); + + for (index, entry) in tabs.iter().enumerate() { + let index = index + 1; + let is_selected = { + if selected.contains(&index) { + "🔻 " + } else { + " " + } + }; + println!("{}{}", is_selected, entry.url); + } + } + } + Ok(()) +} + +fn open_in_browser( + selected_project: &task::Project, + state: &mut State, + url: Option<Url>, +) -> Result<()> { + let old_project: Option<task::Project> = + task::Project::get_current().context("Failed to get currently active project")?; + let old_task: Option<task::Task> = + task::Task::get_current(state).context("Failed to get currently active task")?; + + selected_project.activate().with_context(|| { + format!( + "Failed to active project: '{}'", + selected_project.to_project_display() + ) + })?; + + let tracking_task = { + let all_tasks = selected_project.get_tasks(state).with_context(|| { + format!( + "Failed to get assoctiated tasks for project: '{}'", + selected_project.to_project_display() + ) + })?; + + let tracking_task = all_tasks.into_iter().find(|t| { + let maybe_desc = t.description(state); + if let Ok(desc) = maybe_desc { + desc == "tracking" + } else { + error!( + "Getting task description returned error: {}", + maybe_desc.expect_err("We already check for Ok") + ); + false + } + }); + + if let Some(task) = tracking_task { + info!( + "Starting task {} -> tracking", + selected_project.to_project_display() + ); + task.start(state) + .with_context(|| format!("Failed to start task {task}"))?; + } + tracking_task + }; + + let status = { + let mut args = vec!["-P".to_owned(), selected_project.to_project_display()]; + if let Some(url) = url { + args.push(url.to_string()); + } else { + let lock_file = dirs::home_dir() + .expect("Exists") + .join(".mozilla/firefox") + .join(selected_project.to_project_display()) + .join("lock"); + + if lock_file.exists() { + let (ip, pid): (IpAddr, u32) = { + let link = fs::read_link(&lock_file).with_context(|| { + format!("Failed to readlink lock at '{}'", lock_file.display()) + })?; + + let (ip, pid) = link + .to_str() + .expect("Should work") + .split_once(':') + .expect("The split works"); + + ( + ip.parse().expect("Should be a valid ip address"), + pid.parse().expect("Should be a valid pid"), + ) + }; + + if ip != Ipv4Addr::new(127, 0, 0, 2) { + warn!("Your ip is weird.."); + } + + if PathBuf::from("/proc").join(pid.to_string()).exists() { + // Another Firefox instance has already been started for this project + // Add a buffer URL to force Firefox to open it in the already open instance + args.push("about:newtab".to_owned()); + } else { + // This project does not yet have another Firefox instance + // We do not need to add anything to the arguments, Firefox will open a new + // instance. + } + } else { + // There is no lock file and thus no instance already open. + } + }; + + process::Command::new("firefox") + .args(args) + .status() + .context("Failed to start firefox")? + }; + + if !status.success() { + error!("Firefox run exited with error."); + } + + if let Some(task) = tracking_task { + task.stop(state) + .with_context(|| format!("Failed to stop task {task}"))?; + } + if let Some(task) = old_task { + task.start(state) + .with_context(|| format!("Failed to start task {task}"))?; + } + + if let Some(project) = old_project { + project.activate().with_context(|| { + format!("Failed to active project {}", project.to_project_display()) + })?; + } else { + task::Project::clear().context("Failed to clear currently focused project")?; + } + + Ok(()) +} diff --git a/pkgs/by-name/ts/tskm/src/interface/open/mod.rs b/pkgs/by-name/ts/tskm/src/interface/open/mod.rs new file mode 100644 index 00000000..2dc75957 --- /dev/null +++ b/pkgs/by-name/ts/tskm/src/interface/open/mod.rs @@ -0,0 +1,106 @@ +use std::{collections::HashMap, fs::File, io}; + +use anyhow::{Context, Result}; +use lz4_flex::decompress_size_prepended; +use serde::Deserialize; +use serde_json::Value; +use url::Url; + +use crate::task::Project; + +pub mod handle; +pub use handle::handle; + +impl Project { + pub(super) fn get_sessionstore(&self) -> Result<SessionStore> { + let path = dirs::home_dir() + .expect("Will exist") + .join(".mozilla/firefox") + .join(self.to_project_display()) + .join("sessionstore-backups/recovery.jsonlz4"); + let file = decompress_mozlz4( + File::open(&path) + .with_context(|| format!("Failed to open path '{}'", path.display()))?, + ) + .with_context(|| format!("Failed to decompress file as mozlzh '{}'", path.display()))?; + + let contents: SessionStore = serde_json::from_str(&file).with_context(|| { + format!( + "Failed to deserialize file ('{}') as session store.", + path.display() + ) + })?; + Ok(contents) + } +} + +fn decompress_mozlz4<P: io::Read>(mut file: P) -> Result<String> { + const MOZLZ4_MAGIC_NUMBER: &[u8] = b"mozLz40\0"; + + let mut buf = [0u8; 8]; + file.read_exact(&mut buf) + .context("Failed to read the mozlz40 header.")?; + + assert_eq!(buf, MOZLZ4_MAGIC_NUMBER); + + let mut buf = vec![]; + file.read_to_end(&mut buf).context("Failed to read file")?; + + let uncompressed = decompress_size_prepended(&buf).context("Failed to decompress file")?; + + Ok(String::from_utf8(uncompressed).expect("This should be valid json and thus utf8")) +} + +#[derive(Deserialize, Debug)] +pub struct SessionStore { + pub windows: Vec<Window>, +} + +#[derive(Deserialize, Debug)] +pub struct Window { + pub tabs: Vec<Tab>, + pub selected: usize, +} + +#[derive(Deserialize, Debug)] +pub struct Tab { + pub entries: Vec<TabEntry>, + #[serde(rename = "lastAccessed")] + pub last_accessed: u64, + pub hidden: bool, + #[serde(rename = "searchMode")] + pub search_mode: Option<Value>, + #[serde(rename = "userContextId")] + pub user_context_id: u32, + pub attributes: TabAttributes, + #[serde(rename = "extData")] + pub ext_data: Option<HashMap<String, Value>>, + pub index: usize, + #[serde(rename = "requestedIndex")] + pub requested_index: Option<u32>, + pub image: Option<Url>, +} + +#[derive(Deserialize, Debug)] +pub struct TabEntry { + pub url: Url, + pub title: String, + #[serde(rename = "cacheKey")] + pub cache_key: u32, + #[serde(rename = "ID")] + pub id: u32, + #[serde(rename = "docshellUUID")] + pub docshell_uuid: Value, + #[serde(rename = "resultPrincipalURI")] + pub result_principal_uri: Option<Url>, + #[serde(rename = "hasUserInteraction")] + pub has_user_interaction: bool, + #[serde(rename = "triggeringPrincipal_base64")] + pub triggering_principal_base64: Value, + #[serde(rename = "docIdentifier")] + pub doc_identifier: u32, + pub persist: bool, +} + +#[derive(Deserialize, Debug, Clone, Copy)] +pub struct TabAttributes {} diff --git a/pkgs/by-name/ts/tskm/src/interface/project/handle.rs b/pkgs/by-name/ts/tskm/src/interface/project/handle.rs new file mode 100644 index 00000000..2b01f5d1 --- /dev/null +++ b/pkgs/by-name/ts/tskm/src/interface/project/handle.rs @@ -0,0 +1,87 @@ +use std::{env, fs::File, io::Write}; + +use anyhow::{anyhow, Context, Result}; +use log::trace; + +use crate::{cli::ProjectCommand, task}; + +use super::{ProjectDefinition, ProjectList, SortAlphabetically}; + +/// # Panics +/// If internal expectations fail. +/// +/// # Errors +/// If IO operations fail. +pub fn handle(command: ProjectCommand) -> Result<()> { + match command { + ProjectCommand::List => { + for project in task::Project::all()? { + println!("{}", project.to_project_display()); + } + } + ProjectCommand::Add { + mut new_project_name, + } => { + let project_file = env::var("TSKM_PROJECT_FILE") + .map_err(|err| anyhow!("The `TSKM_PROJECT_FILE` env var is unset: {err}"))?; + + let mut projects_content: ProjectList = + serde_json::from_reader(File::open(&project_file).with_context(|| { + format!("Failed to open project file ('{project_file:?}') for reading") + })?)?; + + let first = new_project_name.project_segments.remove(0); + if let Some(mut definition) = projects_content.0.get_mut(&first) { + for segment in new_project_name.project_segments { + if definition.subprojects.contains_key(&segment) { + definition = definition + .subprojects + .get_mut(&segment) + .expect("We checked"); + } else { + let new_definition = ProjectDefinition::default(); + let output = definition + .subprojects + .insert(segment.clone(), new_definition); + + assert_eq!(output, None); + + definition = definition + .subprojects + .get_mut(&segment) + .expect("Was just inserted"); + } + } + } else { + let mut orig_definition = ProjectDefinition::default(); + let mut definition = &mut orig_definition; + for segment in new_project_name.project_segments { + trace!("Adding segment: {segment}"); + + let new_definition = ProjectDefinition::default(); + + assert!(definition + .subprojects + .insert(segment.clone(), new_definition) + .is_none()); + + definition = definition + .subprojects + .get_mut(&segment) + .expect("Was just inserted"); + } + assert!(projects_content.0.insert(first, orig_definition).is_none()); + }; + + let mut file = File::create(&project_file).with_context(|| { + format!("Failed to open project file ('{project_file:?}') for writing") + })?; + serde_json::to_writer_pretty( + &file, + &SortAlphabetically::<ProjectList>(projects_content), + )?; + writeln!(file)?; + } + } + Ok(()) +} diff --git a/pkgs/by-name/ts/tskm/src/interface/project/mod.rs b/pkgs/by-name/ts/tskm/src/interface/project/mod.rs new file mode 100644 index 00000000..62069746 --- /dev/null +++ b/pkgs/by-name/ts/tskm/src/interface/project/mod.rs @@ -0,0 +1,73 @@ +use std::collections::HashMap; + +use anyhow::Result; +use serde::{Deserialize, Serialize}; + +pub mod handle; +pub use handle::handle; + +#[derive(Deserialize, Serialize)] +struct ProjectList(HashMap<String, ProjectDefinition>); + +#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)] +struct ProjectDefinition { + #[serde(default)] + #[serde(skip_serializing_if = "is_default")] + name: String, + + #[serde(default)] + #[serde(skip_serializing_if = "is_default")] + prefix: String, + + #[serde(default)] + #[serde(skip_serializing_if = "is_default")] + subprojects: HashMap<String, ProjectDefinition>, +} + +fn is_default<T: Default + PartialEq>(input: &T) -> bool { + input == &T::default() +} + +#[derive(Debug, Clone)] +pub struct ProjectName { + project_segments: Vec<String>, +} + +impl ProjectName { + #[must_use] + pub fn segments(&self) -> &[String] { + &self.project_segments + } + + /// # Errors + /// Never. + pub fn try_from_project(s: &str) -> Result<Self> { + Ok(Self::from_project(s)) + } + pub fn from_project(s: &str) -> Self { + let me = Self { + project_segments: s.split('.').map(ToOwned::to_owned).collect(), + }; + me + } + pub fn from_context(s: &str) -> Self { + let me = Self { + project_segments: s.split('_').map(ToOwned::to_owned).collect(), + }; + me + } +} + +// Source: https://stackoverflow.com/a/67792465 +fn sort_alphabetically<T: Serialize, S: serde::Serializer>( + value: &T, + serializer: S, +) -> Result<S::Ok, S::Error> { + let value = serde_json::to_value(value).map_err(serde::ser::Error::custom)?; + value.serialize(serializer) +} + +#[derive(Serialize)] +pub(super) struct SortAlphabetically<T: Serialize>( + #[serde(serialize_with = "sort_alphabetically")] T, +); diff --git a/pkgs/by-name/ts/tskm/src/main.rs b/pkgs/by-name/ts/tskm/src/main.rs new file mode 100644 index 00000000..f4416c6d --- /dev/null +++ b/pkgs/by-name/ts/tskm/src/main.rs @@ -0,0 +1,67 @@ +use anyhow::Result; +use clap::Parser; +use state::State; + +use crate::interface::{input, neorg, open, project}; + +pub mod cli; +pub mod interface; +pub mod rofi; +pub mod state; +pub mod task; + +use crate::cli::{CliArgs, Command}; + +fn main() -> Result<(), anyhow::Error> { + // TODO: Support these completions for the respective types <2025-04-04> + // + // ID_GENERATION_FUNCTION + // ```sh + // context="$(task _get rc.context)" + // if [ "$context" ]; then + // filter="project:$context" + // else + // filter="0-10000" + // fi + // tasks="$(task "$filter" _ids)" + // + // if [ "$tasks" ]; then + // echo "$tasks" | xargs task _zshids | awk -F: -v q="'" '{gsub(/'\''/, q "\\" q q ); print $1 ":" q $2 q}' + // fi + // ``` + // + // ARGUMENTS: + // ID | *([0-9]) := [[%ID_GENERATION_FUNCTION]] + // The function displays all possible IDs of the eligible tasks. + // + // WS := %ALL_WORKSPACES + // All possible workspaces. + // + // P := %ALL_PROJECTS_PIPE + // The possible project. + // + // F := [[fd . --max-depth 3]] + // A URL-Input file to use as source. + let args = CliArgs::parse(); + + stderrlog::new() + .module(module_path!()) + .quiet(args.quiet) + .show_module_names(true) + .color(stderrlog::ColorChoice::Auto) + .verbosity(usize::from(args.verbosity)) + .timestamp(stderrlog::Timestamp::Off) + .init() + .expect("Let's just hope that this does not panic"); + + let mut state = State::new_rw()?; + + match args.command { + Command::Inputs { command } => input::handle(command)?, + Command::Neorg { command } => neorg::handle(command, &mut state)?, + Command::Open { command } => open::handle(command, &mut state)?, + Command::Projects { command } => project::handle(command)?, + } + + Ok(()) +} diff --git a/pkgs/by-name/ts/tskm/src/rofi/mod.rs b/pkgs/by-name/ts/tskm/src/rofi/mod.rs new file mode 100644 index 00000000..a0591b7f --- /dev/null +++ b/pkgs/by-name/ts/tskm/src/rofi/mod.rs @@ -0,0 +1,37 @@ +use std::{ + io::Write, + process::{Command, Stdio}, +}; + +use anyhow::{Context, Result}; + +pub fn select(options: &[String]) -> Result<String> { + let mut child = Command::new("rofi") + .args(["-sep", "\n", "-dmenu"]) + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .spawn() + .context("Failed to spawn rofi")?; + + let mut stdin = child + .stdin + .take() + .expect("We piped this, so should be available"); + + stdin + .write_all(options.join("\n").as_bytes()) + .context("Failed to write to rofi's stdin")?; + + let output = child + .wait_with_output() + .context("Failed to wait for rofi's output")?; + + let selected = String::from_utf8(output.stdout.clone()).with_context(|| { + format!( + "Failed to decode '{}' as utf8", + String::from_utf8_lossy(&output.stdout) + ) + })?; + + Ok(selected.trim_end().to_owned()) +} diff --git a/pkgs/by-name/ts/tskm/src/state.rs b/pkgs/by-name/ts/tskm/src/state.rs new file mode 100644 index 00000000..175a7f03 --- /dev/null +++ b/pkgs/by-name/ts/tskm/src/state.rs @@ -0,0 +1,45 @@ +use std::path::PathBuf; + +use anyhow::Result; +use taskchampion::{storage::AccessMode, Replica, StorageConfig}; + +pub struct State { + replica: Replica, +} + +impl std::fmt::Debug for State { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "State") + } +} + +impl State { + fn taskdb_dir() -> PathBuf { + dirs::data_local_dir().expect("Should exist").join("task") + } + + fn new(taskdb_dir: PathBuf, access_mode: AccessMode) -> Result<Self> { + let storage = StorageConfig::OnDisk { + taskdb_dir, + create_if_missing: false, + access_mode, + } + .into_storage()?; + + let replica = Replica::new(storage); + + Ok(Self { replica }) + } + + pub fn new_ro() -> Result<Self> { + Self::new(Self::taskdb_dir(), AccessMode::ReadOnly) + } + pub fn new_rw() -> Result<Self> { + Self::new(Self::taskdb_dir(), AccessMode::ReadWrite) + } + + #[must_use] + pub fn replica(&mut self) -> &mut Replica { + &mut self.replica + } +} diff --git a/pkgs/by-name/ts/tskm/src/task/mod.rs b/pkgs/by-name/ts/tskm/src/task/mod.rs new file mode 100644 index 00000000..03a12faa --- /dev/null +++ b/pkgs/by-name/ts/tskm/src/task/mod.rs @@ -0,0 +1,342 @@ +use std::{ + fmt::Display, + fs::{self, read_to_string, File}, + path::PathBuf, + process::Command, + str::FromStr, + sync::OnceLock, +}; + +use anyhow::{bail, Context, Result}; +use log::{debug, info, trace}; +use taskchampion::Tag; + +use crate::{interface::project::ProjectName, state::State}; + +/// The `taskwarrior` id of a task. +#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Ord, Eq)] +pub struct Task { + uuid: taskchampion::Uuid, +} + +impl From<&taskchampion::Task> for Task { + fn from(value: &taskchampion::Task) -> Self { + Self { + uuid: value.get_uuid(), + } + } +} +impl From<&taskchampion::TaskData> for Task { + fn from(value: &taskchampion::TaskData) -> Self { + Self { + uuid: value.get_uuid(), + } + } +} + +impl Task { + pub fn from_working_set(id: usize, state: &mut State) -> Result<Option<Self>> { + Ok(state + .replica() + .working_set()? + .by_index(id) + .map(|uuid| Self { uuid })) + } + + pub fn get_current(state: &mut State) -> Result<Option<Self>> { + let tasks = state + .replica() + .pending_tasks()? + .into_iter() + .filter(taskchampion::Task::is_active) + .collect::<Vec<_>>(); + + assert!( + tasks.len() <= 1, + "We have ensured that only one task may be active, via a hook" + ); + if let Some(active) = tasks.first() { + Ok(Some(Self::from(active))) + } else { + Ok(None) + } + } + + #[must_use] + pub fn uuid(&self) -> &taskchampion::Uuid { + &self.uuid + } + + fn as_task(&self, state: &mut State) -> Result<taskchampion::Task> { + Ok(state + .replica() + .get_task(self.uuid)? + .expect("We have the task from this replica, it should still be in it")) + } + + /// Adds a tag to the task, to show the user that it has additional neorg data. + pub fn mark_neorg_data(&self, state: &mut State) -> Result<()> { + let mut ops = vec![]; + self.as_task(state)? + .add_tag(&Tag::from_str("neorg_data").expect("Is valid"), &mut ops)?; + state.replica().commit_operations(ops)?; + Ok(()) + } + + /// Try to start this task. + /// It will stop previously active tasks. + pub fn start(&self, state: &mut State) -> Result<()> { + info!("Activating {self}"); + + if let Some(active) = Self::get_current(state)? { + active.stop(state)?; + } + + let mut ops = vec![]; + self.as_task(state)?.start(&mut ops)?; + state.replica().commit_operations(ops)?; + Ok(()) + } + + /// Stops this task. + pub fn stop(&self, state: &mut State) -> Result<()> { + info!("Stopping {self}"); + + let mut ops = vec![]; + self.as_task(state)?.stop(&mut ops)?; + state.replica().commit_operations(ops)?; + Ok(()) + } + + pub fn description(&self, state: &mut State) -> Result<String> { + Ok(self.as_task(state)?.get_description().to_owned()) + } + + pub fn project(&self, state: &mut State) -> Result<Project> { + let output = { + let task = self.as_task(state)?; + let task_data = task.into_task_data(); + task_data + .get("project") + .expect("Every task should have a project") + .to_owned() + }; + let project = Project::from_project_string(output.as_str()) + .expect("This comes from tw, it should be valid"); + Ok(project) + } +} + +impl Display for Task { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + self.uuid.fmt(f) + } +} + +impl FromStr for Task { + type Err = anyhow::Error; + + fn from_str(s: &str) -> Result<Self, Self::Err> { + let uuid = taskchampion::Uuid::from_str(s)?; + Ok(Self { uuid }) + } +} + +/// A registered task Project +#[derive(Debug, Clone, PartialEq)] +pub struct Project { + /// The project name. + /// For example: + /// ```no_run + /// &["trinitrix", "testing", "infra"] + /// ``` + name: Vec<String>, +} + +static ALL_CACHE: OnceLock<Vec<Project>> = OnceLock::new(); +impl Project { + #[must_use] + pub fn to_project_display(&self) -> String { + self.name.join(".") + } + #[must_use] + pub fn to_context_display(&self) -> String { + self.name.join("_") + } + + /// # Errors + /// - When the string does not encode a previously registered project. + /// - When the string does not adhere to the project syntax. + pub fn from_project_string(s: &str) -> Result<Self> { + Self::from_input(s, ProjectName::from_project) + } + + /// # Errors + /// - When the string does not encode a previously registered project. + /// - When the string does not adhere to the context syntax. + pub fn from_context_string(s: &str) -> Result<Self> { + Self::from_input(s, ProjectName::from_context) + } + + fn from_input<F>(s: &str, f: F) -> Result<Self> + where + F: Fn(&str) -> ProjectName, + { + if s.is_empty() { + bail!("Your project is empty") + } + + let all = Self::all()?; + let me = Self::from_project_name_unchecked(&f(s)); + if all.contains(&me) { + Ok(me) + } else { + bail!( + "Your project '{}' is not registered!", + me.to_project_display() + ); + } + } + fn from_project_name_unchecked(pn: &ProjectName) -> Self { + Self { + name: pn.segments().to_owned(), + } + } + + /// Return all known valid projects. + /// + /// # Errors + /// When file operations fail. + /// + /// # Panics + /// Only when internal assertions fail. + pub fn all<'a>() -> Result<&'a [Project]> { + // Inlined from `OnceLock::get_or_try_init` + { + let this = &ALL_CACHE; + let f = || { + let file = dirs::config_local_dir() + .expect("Should be some") + .join("tskm/projects.list"); + let contents = read_to_string(&file) + .with_context(|| format!("Failed to read file: '{}'", file.display()))?; + + Ok::<_, anyhow::Error>( + contents + .lines() + .map(|s| Self::from_project_name_unchecked(&ProjectName::from_project(s))) + .collect::<Vec<_>>(), + ) + }; + + // Fast path check + // NOTE: We need to perform an acquire on the state in this method + // in order to correctly synchronize `LazyLock::force`. This is + // currently done by calling `self.get()`, which in turn calls + // `self.is_initialized()`, which in turn performs the acquire. + if let Some(value) = this.get() { + return Ok(value); + } + + this.set(f()?).expect( + "This should always be able to take our value, as we initialize only once.", + ); + + Ok(this.get().expect("This was initialized")) + } + } + + fn touch_dir(&self) -> PathBuf { + let lock_dir = dirs::data_dir() + .expect("Should be found") + .join("tskm/review"); + lock_dir.join(format!("{}.opened", self.to_project_display())) + } + + /// Mark this project as having been interacted with. + /// + /// # Errors + /// When IO operations fail. + pub fn touch(&self) -> Result<()> { + let lock_file = self.touch_dir(); + + File::create(&lock_file) + .with_context(|| format!("Failed to create lock_file at: {}", lock_file.display()))?; + + Ok(()) + } + /// Returns [`true`] if it was previously [`Self::touch`]ed. + #[must_use] + pub fn is_touched(&self) -> bool { + let lock_file = self.touch_dir(); + lock_file.exists() + } + /// Mark this project as having not been interacted with. + /// + /// # Errors + /// When IO operations fail. + pub fn untouch(&self) -> Result<()> { + let lock_file = self.touch_dir(); + + fs::remove_file(&lock_file) + .with_context(|| format!("Failed to create lock_file at: {}", lock_file.display()))?; + + Ok(()) + } + + /// # Errors + /// When `task` execution fails. + pub fn get_tasks(&self, state: &mut State) -> Result<Vec<Task>> { + Ok(state + .replica() + .pending_task_data()? + .into_iter() + .filter(|t| t.get("project").expect("Is set") == self.to_project_display()) + .map(|t| Task::from(&t)) + .collect()) + } + + /// # Errors + /// When `task` execution fails. + pub fn activate(&self) -> Result<()> { + debug!("Setting project {}", self.to_context_display()); + + run_task(&["context", self.to_context_display().as_str()]).map(|_| ()) + } + /// # Errors + /// When `task` execution fails. + pub fn clear() -> Result<()> { + debug!("Clearing active project"); + + run_task(&["context", "none"]).map(|_| ()) + } + + /// # Errors + /// When `task` execution fails. + pub fn get_current() -> Result<Option<Self>> { + let self_str = run_task(&["_get", "rc.context"])?; + + if self_str.is_empty() { + Ok(None) + } else { + Self::from_context_string(&self_str).map(Some) + } + } +} + +pub(crate) fn run_task(args: &[&str]) -> Result<String> { + debug!("Running task command: `task {}`", args.join(" ")); + + let output = Command::new("task") + .args(args) + .output() + .with_context(|| format!("Failed to run `task {}`", args.join(" ")))?; + + let stdout = String::from_utf8(output.stdout).context("Failed to read task output as utf8")?; + let stderr = String::from_utf8(output.stderr).context("Failed to read task output as utf8")?; + + trace!("Output (stdout): '{}'", stdout.trim()); + trace!("Output (stderr): '{}'", stderr.trim()); + + Ok(stdout.trim().to_owned()) +} diff --git a/pkgs/by-name/ts/tskm/update.sh b/pkgs/by-name/ts/tskm/update.sh new file mode 100755 index 00000000..9268caf2 --- /dev/null +++ b/pkgs/by-name/ts/tskm/update.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +cargo update && cargo upgrade diff --git a/update.sh b/update.sh index 77cb9482..3a8c7cb1 100755 --- a/update.sh +++ b/update.sh @@ -10,9 +10,12 @@ __update_sh_run() { unset __update_sh_command } -__update_sh_run ./modules/home.legacy/conf/firefox/scripts/update_extensions.sh "$@" +__update_sh_run ./modules/by-name/fi/firefox/update_extensions.sh "$@" __update_sh_run ./pkgs/update_pkgs.sh "$@" -echo "Also update out-of tree dependencies, like yt!" 2>&1 +__update_sh_run nix flake check +__update_sh_run ./build.sh + +printf "\033[31;1m%s\033[0m\033[33;1m%s\033[0m\n" "Also update out-of-tree dependencies, like " "yt" 2>&1 # vim: ft=sh |