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() { ...@@ -26,6 +26,7 @@ usage() {
positional=() positional=()
via_hostname="" via_hostname=""
substitute_on_destination="" substitute_on_destination=""
keep_going=""
show_trace="" show_trace=""
while [[ $# -gt 0 ]] while [[ $# -gt 0 ]]
do do
...@@ -41,6 +42,9 @@ do ...@@ -41,6 +42,9 @@ do
--substitute-on-destination|-s) --substitute-on-destination|-s)
substitute_on_destination="--substitute-on-destination" substitute_on_destination="--substitute-on-destination"
;; ;;
--keep-going)
keep_going="--keep-going"
;;
--show-trace) --show-trace)
show_trace="--show-trace" show_trace="--show-trace"
;; ;;
...@@ -75,7 +79,7 @@ fi ...@@ -75,7 +79,7 @@ fi
operation=$original_operation operation=$original_operation
set_profile="" set_profile=""
reboot="" 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" ]] if [[ "$operation" = "switch" || "$operation" = "boot" ]]
then then
......
...@@ -32,7 +32,7 @@ fi ...@@ -32,7 +32,7 @@ fi
hostname=$1 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 ]] if [[ ! -f $config_file_path ]]
then then
...@@ -42,7 +42,7 @@ fi ...@@ -42,7 +42,7 @@ fi
config=$(<$config_file_path) config=$(<$config_file_path)
address=$(jq --raw-output .address <<<$config) address=$(jq --raw-output '.address[0]' <<<$config)
key=$(wg genkey) key=$(wg genkey)
pubkey=$(wg pubkey <<<$key) pubkey=$(wg pubkey <<<$key)
...@@ -53,13 +53,12 @@ config=$(jq ".publicKey = \"$pubkey\"" <<<$config) ...@@ -53,13 +53,12 @@ config=$(jq ".publicKey = \"$pubkey\"" <<<$config)
print "[Interface] print "[Interface]
Address=$address Address=$address
DNS=fd42:2a03:0099:ec13::1
PrivateKey=$key PrivateKey=$key
ListenPort=55542 ListenPort=55542
[Peer] [Peer]
PublicKey=lzKM49e5AqKLd232wLtVSrnKLvb/qV6LKZ3rrpLB+AQ= PublicKey=lzKM49e5AqKLd232wLtVSrnKLvb/qV6LKZ3rrpLB+AQ=
Endpoint=gateway.queezle.net:55542 Endpoint=gateway.queezle.net:55542
AllowedIPs=10.0.0.0/16 AllowedIPs=fd42:2a03:0099:ec13::/64
PersistentKeepalive=25
" "
...@@ -42,7 +42,7 @@ fi ...@@ -42,7 +42,7 @@ fi
config=$(<$config_file_path) config=$(<$config_file_path)
address=$(jq --raw-output .address <<<$config) address=$(jq --raw-output '.address[0]' <<<$config)
key=$(wg genkey) key=$(wg genkey)
pubkey=$(wg pubkey <<<$key) pubkey=$(wg pubkey <<<$key)
...@@ -53,15 +53,14 @@ config=$(jq ".publicKey = \"$pubkey\"" <<<$config) ...@@ -53,15 +53,14 @@ config=$(jq ".publicKey = \"$pubkey\"" <<<$config)
wg_config="[Interface] wg_config="[Interface]
Address=$address Address=$address
DNS=fd42:2a03:0099:ec13::1
PrivateKey=$key PrivateKey=$key
ListenPort=55542 ListenPort=55542
[Peer] [Peer]
PublicKey=lzKM49e5AqKLd232wLtVSrnKLvb/qV6LKZ3rrpLB+AQ= PublicKey=lzKM49e5AqKLd232wLtVSrnKLvb/qV6LKZ3rrpLB+AQ=
Endpoint=gateway.queezle.net:55542 Endpoint=gateway.queezle.net:55542
AllowedIPs=10.0.0.0/16 AllowedIPs=fd42:2a03:0099:ec13::/64
PersistentKeepalive=25
" "
qrencode -t ansi256utf8 <<<$wg_config qrencode -t ansi256utf8 <<<$wg_config
...@@ -70,6 +70,7 @@ in ...@@ -70,6 +70,7 @@ in
#q = if system == "aarch64-multiplatform" #q = if system == "aarch64-multiplatform"
# then flakeInputs.q.packages.x86_64-linux.aarch64-multiplatform.q; # then flakeInputs.q.packages.x86_64-linux.aarch64-multiplatform.q;
# else flakeInputs.q.packages.${system}.q; # else flakeInputs.q.packages.${system}.q;
qbar = flakeInputs.qbar.packages.${system}.qbar;
}) })
flakeInputs.emacs-overlay.overlay flakeInputs.emacs-overlay.overlay
] ++ extraOverlays; ] ++ extraOverlays;
......
{ {
"nodes": { "nodes": {
"emacs-overlay": { "emacs-overlay": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": { "locked": {
"lastModified": 1643481488, "lastModified": 1652123915,
"narHash": "sha256-6WqxMVVbwvFKuqOz+SEeNLtCfRM1NOWd0imBKe2onxs=", "narHash": "sha256-oUB1163GgKTVu5pu/YoAMkJ281cBKFS9DDC4K5u4n5Q=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "db06e18bcea9fa0cd93067dab0648b8280637304", "rev": "ef3088863916b0604dbd5c3ba402b7f52c89c53d",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -31,6 +35,21 @@ ...@@ -31,6 +35,21 @@
"type": "github" "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": { "homemanager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
...@@ -38,11 +57,11 @@ ...@@ -38,11 +57,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1640417317, "lastModified": 1651886851,
"narHash": "sha256-jT2uMARXs0Xm65ccroFsKyr4LTHSecw+9HAnmBdJO8U=", "narHash": "sha256-kbXOJSf1uho0/7P54nZkJdJY3oAelIjyc6tfiRhaXJI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "48f2b381dd397ec88040d3354ac9c036739ba139", "rev": "882bd8118bdbff3a6e53e5ced393932b351ce2f6",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -69,11 +88,11 @@ ...@@ -69,11 +88,11 @@
"mobile-nixos": { "mobile-nixos": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1640650371, "lastModified": 1647144108,
"narHash": "sha256-dJPS507lpYPpQKKchx+B52rnOO0oXZ3fWu+nAG6EK2A=", "narHash": "sha256-taqtdA4BZOG4TDro1t+meWCvKV4rVTeYf440UwiGI2I=",
"owner": "NixOS", "owner": "NixOS",
"repo": "mobile-nixos", "repo": "mobile-nixos",
"rev": "8a105e177632f0fbc4ca28ee0195993baf0dcf9a", "rev": "c45932ae53aa0c5da9cfddd25e7cbb503f472147",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -84,37 +103,32 @@ ...@@ -84,37 +103,32 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1647297614,
"narHash": "sha256-ulGq3W5XsrBMU/u5k9d4oPy65pQTkunR4HKKtTq0RwY=", "narHash": "sha256-ulGq3W5XsrBMU/u5k9d4oPy65pQTkunR4HKKtTq0RwY=",
"owner": "nixos", "path": "/nix/store/f71alr07xb2swc37fiqjr5h416qcs6wr-source",
"repo": "nixpkgs", "type": "path"
"rev": "73ad5f9e147c0d2a2061f1d4bd91e05078dc0b58",
"type": "github"
}, },
"original": { "original": {
"owner": "nixos", "id": "nixpkgs",
"ref": "nixos-unstable", "type": "indirect"
"repo": "nixpkgs",
"type": "github"
} }
}, },
"nixpkgs-master": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1643565674, "lastModified": 1651726670,
"narHash": "sha256-VP+0nFRcmQY7DbZgbudgrCJfnbPxcnkI8QiDnMsWWpE=", "narHash": "sha256-dSGdzB49SEvdOJvrQWfQYkAefewXraHIV08Vz6iDXWQ=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "24bc16243e07744359ccdde9e086fde0eb61db8a", "rev": "c777cdf5c564015d5f63b09cc93bef4178b19b01",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "master", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1645334861, "lastModified": 1645334861,
"narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=", "narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=",
...@@ -130,7 +144,7 @@ ...@@ -130,7 +144,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1645334861, "lastModified": 1645334861,
"narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=", "narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=",
...@@ -144,7 +158,7 @@ ...@@ -144,7 +158,7 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=", "narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=",
"path": "/nix/store/65cmw2ws80b61dyysmnqn8py9vgqdydn-source", "path": "/nix/store/65cmw2ws80b61dyysmnqn8py9vgqdydn-source",
...@@ -155,7 +169,7 @@ ...@@ -155,7 +169,7 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_5": { "nixpkgs_6": {
"locked": { "locked": {
"narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=", "narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=",
"path": "/nix/store/65cmw2ws80b61dyysmnqn8py9vgqdydn-source", "path": "/nix/store/65cmw2ws80b61dyysmnqn8py9vgqdydn-source",
...@@ -166,9 +180,22 @@ ...@@ -166,9 +180,22 @@
"type": "indirect" "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": { "q": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"quasar-network": "quasar-network" "quasar-network": "quasar-network"
}, },
"locked": { "locked": {
...@@ -189,7 +216,7 @@ ...@@ -189,7 +216,7 @@
}, },
"qauth": { "qauth": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"host": "git.c3pb.de", "host": "git.c3pb.de",
...@@ -207,9 +234,29 @@ ...@@ -207,9 +234,29 @@
"type": "gitlab" "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": { "quasar": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"host": "git.c3pb.de", "host": "git.c3pb.de",
...@@ -229,7 +276,7 @@ ...@@ -229,7 +276,7 @@
}, },
"quasar-network": { "quasar-network": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_4",
"quasar": "quasar" "quasar": "quasar"
}, },
"locked": { "locked": {
...@@ -255,13 +302,13 @@ ...@@ -255,13 +302,13 @@
"homemanager": "homemanager", "homemanager": "homemanager",
"matrix-homeserver": "matrix-homeserver", "matrix-homeserver": "matrix-homeserver",
"mobile-nixos": "mobile-nixos", "mobile-nixos": "mobile-nixos",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-pinephone": [ "nixpkgs-pinephone": [
"nixpkgs" "nixpkgs"
], ],
"q": "q", "q": "q",
"qauth": "qauth" "qauth": "qauth",
"qbar": "qbar"
} }
} }
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
inputs = { inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable; 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.url = github:nixos/nixpkgs/nixos-unstable;
nixpkgs-pinephone.follows = "nixpkgs"; nixpkgs-pinephone.follows = "nixpkgs";
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
url = gitlab:jens/q?host=git.c3pb.de; url = gitlab:jens/q?host=git.c3pb.de;
}; };
qbar.url = gitlab:jens/qbar?host=git.c3pb.de;
mobile-nixos = { mobile-nixos = {
url = github:NixOS/mobile-nixos; url = github:NixOS/mobile-nixos;
flake = false; flake = false;
......
...@@ -42,11 +42,15 @@ in ...@@ -42,11 +42,15 @@ in
wdisplays wdisplays
squeekboard squeekboard
feh feh
networkmanagerapplet # Also contains connection editor ui
# screenshot utilities # screenshot utilities
grim grim
slurp slurp
# debug/development utilities
wev # similar to xev, but for wayland
# cursor theme (installed via `home-profiles/desktop/.local/share/icons/default/index.theme`) # cursor theme (installed via `home-profiles/desktop/.local/share/icons/default/index.theme`)
simpleandsoft simpleandsoft
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
./mobile-nixos-bootloader.nix ./mobile-nixos-bootloader.nix
./spotifyd.nix ./spotifyd.nix
./terminal.nix ./terminal.nix
./tts
# server # server
#./webserver.nix #./webserver.nix
......
...@@ -48,7 +48,7 @@ let ...@@ -48,7 +48,7 @@ let
); );
}; };
emacsWithPackages = (pkgs.emacsPackagesFor pkgs.emacsPgtkGcc).withPackages; emacsWithPackages = (pkgs.emacsPackagesFor pkgs.emacsPgtkNativeComp).withPackages;
emacs-queezle = emacsWithPackages (epkgs: [(config-queezle epkgs)]); emacs-queezle = emacsWithPackages (epkgs: [(config-queezle epkgs)]);
...@@ -271,7 +271,6 @@ let ...@@ -271,7 +271,6 @@ let
;; Known issue - enables code execution but is required for the `derive`-feature (e.g. used by matrix-sdk) ;; 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) (setq lsp-rust-analyzer-proc-macro-enable t)
;;; helm ;;; helm
(setq helm-command-prefix-key "<leader> c") (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 { ...@@ -20,7 +20,6 @@ rec {
packageOverrides = hself: hsuper: super.haskell.packageOverrides hself hsuper // { packageOverrides = hself: hsuper: super.haskell.packageOverrides hself hsuper // {
#net-mqtt = self.haskell.lib.doJailbreak hsuper.net-mqtt; #net-mqtt = self.haskell.lib.doJailbreak hsuper.net-mqtt;
#net-mqtt = self.haskell.lib.unmarkBroken hsuper.net-mqtt; #net-mqtt = self.haskell.lib.unmarkBroken hsuper.net-mqtt;
qbar = hself.callPackage ./qbar {};
}; };
}; };
...@@ -33,6 +32,4 @@ rec { ...@@ -33,6 +32,4 @@ rec {
fetchSubmodules = true; 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