Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jens/dotfiles
1 result
Show changes
Commits on Source (6)
......@@ -26,6 +26,7 @@ usage() {
positional=()
via_hostname=""
substitute_on_destination=""
keep_going=""
show_trace=""
while [[ $# -gt 0 ]]
do
......@@ -41,6 +42,9 @@ do
--substitute-on-destination|-s)
substitute_on_destination="--substitute-on-destination"
;;
--keep-going)
keep_going="--keep-going"
;;
--show-trace)
show_trace="--show-trace"
;;
......@@ -75,7 +79,7 @@ fi
operation=$original_operation
set_profile=""
reboot=""
readonly common_nix_flags=(--log-format bar-with-logs)
readonly common_nix_flags=(--log-format bar-with-logs $keep_going)
if [[ "$operation" = "switch" || "$operation" = "boot" ]]
then
......
......@@ -32,7 +32,7 @@ fi
hostname=$1
readonly config_file_path="$MACHINES_PATH/external/$hostname/wg_gateway.json"
readonly config_file_path="$MACHINES_PATH/external/$hostname/qnet.json"
if [[ ! -f $config_file_path ]]
then
......@@ -42,7 +42,7 @@ fi
config=$(<$config_file_path)
address=$(jq --raw-output .address <<<$config)
address=$(jq --raw-output '.address[0]' <<<$config)
key=$(wg genkey)
pubkey=$(wg pubkey <<<$key)
......@@ -53,13 +53,12 @@ config=$(jq ".publicKey = \"$pubkey\"" <<<$config)
print "[Interface]
Address=$address
DNS=fd42:2a03:0099:ec13::1
PrivateKey=$key
ListenPort=55542
[Peer]
PublicKey=lzKM49e5AqKLd232wLtVSrnKLvb/qV6LKZ3rrpLB+AQ=
Endpoint=gateway.queezle.net:55542
AllowedIPs=10.0.0.0/16
PersistentKeepalive=25
AllowedIPs=fd42:2a03:0099:ec13::/64
"
......@@ -42,7 +42,7 @@ fi
config=$(<$config_file_path)
address=$(jq --raw-output .address <<<$config)
address=$(jq --raw-output '.address[0]' <<<$config)
key=$(wg genkey)
pubkey=$(wg pubkey <<<$key)
......@@ -53,15 +53,14 @@ config=$(jq ".publicKey = \"$pubkey\"" <<<$config)
wg_config="[Interface]
Address=$address
DNS=fd42:2a03:0099:ec13::1
PrivateKey=$key
ListenPort=55542
[Peer]
PublicKey=lzKM49e5AqKLd232wLtVSrnKLvb/qV6LKZ3rrpLB+AQ=
Endpoint=gateway.queezle.net:55542
AllowedIPs=10.0.0.0/16
PersistentKeepalive=25
AllowedIPs=fd42:2a03:0099:ec13::/64
"
qrencode -t ansi256utf8 <<<$wg_config
......@@ -70,6 +70,7 @@ in
#q = if system == "aarch64-multiplatform"
# then flakeInputs.q.packages.x86_64-linux.aarch64-multiplatform.q;
# else flakeInputs.q.packages.${system}.q;
qbar = flakeInputs.qbar.packages.${system}.qbar;
})
flakeInputs.emacs-overlay.overlay
] ++ extraOverlays;
......
{
"nodes": {
"emacs-overlay": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1643481488,
"narHash": "sha256-6WqxMVVbwvFKuqOz+SEeNLtCfRM1NOWd0imBKe2onxs=",
"lastModified": 1652123915,
"narHash": "sha256-oUB1163GgKTVu5pu/YoAMkJ281cBKFS9DDC4K5u4n5Q=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "db06e18bcea9fa0cd93067dab0648b8280637304",
"rev": "ef3088863916b0604dbd5c3ba402b7f52c89c53d",
"type": "github"
},
"original": {
......@@ -31,6 +35,21 @@
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1649676176,
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"homemanager": {
"inputs": {
"nixpkgs": [
......@@ -38,11 +57,11 @@
]
},
"locked": {
"lastModified": 1640417317,
"narHash": "sha256-jT2uMARXs0Xm65ccroFsKyr4LTHSecw+9HAnmBdJO8U=",
"lastModified": 1651886851,
"narHash": "sha256-kbXOJSf1uho0/7P54nZkJdJY3oAelIjyc6tfiRhaXJI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "48f2b381dd397ec88040d3354ac9c036739ba139",
"rev": "882bd8118bdbff3a6e53e5ced393932b351ce2f6",
"type": "github"
},
"original": {
......@@ -69,11 +88,11 @@
"mobile-nixos": {
"flake": false,
"locked": {
"lastModified": 1640650371,
"narHash": "sha256-dJPS507lpYPpQKKchx+B52rnOO0oXZ3fWu+nAG6EK2A=",
"lastModified": 1647144108,
"narHash": "sha256-taqtdA4BZOG4TDro1t+meWCvKV4rVTeYf440UwiGI2I=",
"owner": "NixOS",
"repo": "mobile-nixos",
"rev": "8a105e177632f0fbc4ca28ee0195993baf0dcf9a",
"rev": "c45932ae53aa0c5da9cfddd25e7cbb503f472147",
"type": "github"
},
"original": {
......@@ -84,37 +103,32 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1647297614,
"narHash": "sha256-ulGq3W5XsrBMU/u5k9d4oPy65pQTkunR4HKKtTq0RwY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "73ad5f9e147c0d2a2061f1d4bd91e05078dc0b58",
"type": "github"
"path": "/nix/store/f71alr07xb2swc37fiqjr5h416qcs6wr-source",
"type": "path"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs-master": {
"nixpkgs_2": {
"locked": {
"lastModified": 1643565674,
"narHash": "sha256-VP+0nFRcmQY7DbZgbudgrCJfnbPxcnkI8QiDnMsWWpE=",
"owner": "NixOS",
"lastModified": 1651726670,
"narHash": "sha256-dSGdzB49SEvdOJvrQWfQYkAefewXraHIV08Vz6iDXWQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "24bc16243e07744359ccdde9e086fde0eb61db8a",
"rev": "c777cdf5c564015d5f63b09cc93bef4178b19b01",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs_3": {
"locked": {
"lastModified": 1645334861,
"narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=",
......@@ -130,7 +144,7 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1645334861,
"narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=",
......@@ -144,7 +158,7 @@
"type": "indirect"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=",
"path": "/nix/store/65cmw2ws80b61dyysmnqn8py9vgqdydn-source",
......@@ -155,7 +169,7 @@
"type": "indirect"
}
},
"nixpkgs_5": {
"nixpkgs_6": {
"locked": {
"narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=",
"path": "/nix/store/65cmw2ws80b61dyysmnqn8py9vgqdydn-source",
......@@ -166,9 +180,22 @@
"type": "indirect"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1631118067,
"narHash": "sha256-tEcFvm3a6ToeBGwHdjfB2mVQwa4LZCZTQYE2LnY3ycA=",
"path": "/nix/store/6dcqil119qr3sad2lp9ykkkc852ppmqm-source",
"rev": "09cd65b33c5653d7d2954fef4b9f0e718c899743",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"q": {
"inputs": {
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_3",
"quasar-network": "quasar-network"
},
"locked": {
......@@ -189,7 +216,7 @@
},
"qauth": {
"inputs": {
"nixpkgs": "nixpkgs_5"
"nixpkgs": "nixpkgs_6"
},
"locked": {
"host": "git.c3pb.de",
......@@ -207,9 +234,29 @@
"type": "gitlab"
}
},
"qbar": {
"inputs": {
"nixpkgs": "nixpkgs_7"
},
"locked": {
"host": "git.c3pb.de",
"lastModified": 1631472750,
"narHash": "sha256-4kEfVRaA05FYzw671G1IJwmqrpcvhrRdr0fG+XBGfX4=",
"owner": "jens",
"repo": "qbar",
"rev": "d3f3e6ee5d5587cdd9f6ad2b87e12651e78248bc",
"type": "gitlab"
},
"original": {
"host": "git.c3pb.de",
"owner": "jens",
"repo": "qbar",
"type": "gitlab"
}
},
"quasar": {
"inputs": {
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_5"
},
"locked": {
"host": "git.c3pb.de",
......@@ -229,7 +276,7 @@
},
"quasar-network": {
"inputs": {
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_4",
"quasar": "quasar"
},
"locked": {
......@@ -255,13 +302,13 @@
"homemanager": "homemanager",
"matrix-homeserver": "matrix-homeserver",
"mobile-nixos": "mobile-nixos",
"nixpkgs": "nixpkgs",
"nixpkgs-master": "nixpkgs-master",
"nixpkgs": "nixpkgs_2",
"nixpkgs-pinephone": [
"nixpkgs"
],
"q": "q",
"qauth": "qauth"
"qauth": "qauth",
"qbar": "qbar"
}
}
},
......
......@@ -2,7 +2,7 @@
inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable;
nixpkgs-master.url = github:nixos/nixpkgs/master;
#nixpkgs-master.url = github:nixos/nixpkgs/master;
nixpkgs-pinephone.url = github:nixos/nixpkgs/nixos-unstable;
nixpkgs-pinephone.follows = "nixpkgs";
......@@ -18,6 +18,8 @@
url = gitlab:jens/q?host=git.c3pb.de;
};
qbar.url = gitlab:jens/qbar?host=git.c3pb.de;
mobile-nixos = {
url = github:NixOS/mobile-nixos;
flake = false;
......
......@@ -42,11 +42,15 @@ in
wdisplays
squeekboard
feh
networkmanagerapplet # Also contains connection editor ui
# screenshot utilities
grim
slurp
# debug/development utilities
wev # similar to xev, but for wayland
# cursor theme (installed via `home-profiles/desktop/.local/share/icons/default/index.theme`)
simpleandsoft
......
......@@ -14,6 +14,7 @@
./mobile-nixos-bootloader.nix
./spotifyd.nix
./terminal.nix
./tts
# server
#./webserver.nix
......
......@@ -48,7 +48,7 @@ let
);
};
emacsWithPackages = (pkgs.emacsPackagesFor pkgs.emacsPgtkGcc).withPackages;
emacsWithPackages = (pkgs.emacsPackagesFor pkgs.emacsPgtkNativeComp).withPackages;
emacs-queezle = emacsWithPackages (epkgs: [(config-queezle epkgs)]);
......@@ -271,7 +271,6 @@ let
;; Known issue - enables code execution but is required for the `derive`-feature (e.g. used by matrix-sdk)
(setq lsp-rust-analyzer-proc-macro-enable t)
;;; helm
(setq helm-command-prefix-key "<leader> c")
......
{ lib, config, pkgs, ... }:
with lib;
let
tts = pkgs.writeScriptBin "tts" ''
#!${pkgs.zsh}/bin/zsh
curl --silent -X POST --data @- 'localhost:59125/api/tts?voice=en_US/hifi-tts_low%2392&lengthScale=1&noiseScale=0.2&noiseW=0.2' | mpv --no-terminal --no-config --no-video -
'';
in
{
options.queezle.tts.enable = mkEnableOption "tts server";
config = mkIf config.queezle.tts.enable {
virtualisation.oci-containers.backend = "podman";
virtualisation.oci-containers.containers.tts = {
image = "mycroftai/mimic3:0.2.3-amd64";
imageFile = pkgs.dockerTools.pullImage {
imageName = "mycroftai/mimic3";
finalImageTag = "0.2.3-amd64";
imageDigest = "sha256:8213f6d146e9d9d5614f0cdc141403926d2d2a4d1b8d2b24e8179adf74ebc2a2";
sha256 = "sha256-gVyS6V3IX9K8dpE+777TNHZFdtpImkHQzRx1kOsXfmY=";
};
volumes = [
"mimic3:/home/mimic3/.local/share/mycroft/mimic3"
];
ports = [
"127.0.0.1:59125:59125"
];
extraOptions = [
#"--userns=auto"
"--uidmap=1000:4000:1"
"--uidmap=0:4001:1"
"--gidmap=1000:4000:1"
"--gidmap=0:4001:1"
];
};
users.users.mimic3 = {
description = "tts daemon user";
uid = 4000;
# also requires uid 4001
isSystemUser = true;
group = "mimic3";
};
users.groups.mimic3 = {
gid = 4000;
# also requires gid 4001
};
environment.systemPackages = [ tts ];
};
}
......@@ -20,7 +20,6 @@ rec {
packageOverrides = hself: hsuper: super.haskell.packageOverrides hself hsuper // {
#net-mqtt = self.haskell.lib.doJailbreak hsuper.net-mqtt;
#net-mqtt = self.haskell.lib.unmarkBroken hsuper.net-mqtt;
qbar = hself.callPackage ./qbar {};
};
};
......@@ -33,6 +32,4 @@ rec {
fetchSubmodules = true;
};
}));
qbar = self.haskellPackages.qbar;
}
{ haskell, fetchgit, callCabal2nix }:
let
repo = with builtins; fromJSON ( readFile ./repo.json );
src = fetchgit {
inherit (repo) url rev sha256;
};
in
haskell.lib.generateOptparseApplicativeCompletion "qbar" (
callCabal2nix "qbar" src {}
)
{
"ref": "refs/heads/master",
"url": "https://git.c3pb.de/jens/qbar.git",
"rev": "d3f3e6ee5d5587cdd9f6ad2b87e12651e78248bc",
"date": "2021-09-12T20:52:30+02:00",
"path": "/nix/store/djx48kn3pxl45hl6x6v9yy9y88phf9dv-qbar",
"sha256": "0zkx8rqgkij7mxfv91igjypal29791nx9fqfrxc93lw02raiyhg2",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}
#!/usr/bin/env nix-shell
#! nix-shell -i sh -p nix-prefetch-git jq
url="https://git.c3pb.de/jens/qbar.git"
ref="refs/heads/master"
nix-prefetch-git --rev "$ref" --no-deepClone "$url" | jq --arg ref "$ref" '{ref: $ref} + .' > repo.json