From 3ef7f87cfb697f68a18ed6318c6bf0c8c136f50f Mon Sep 17 00:00:00 2001 From: Sebastian Moser Date: Fri, 10 Nov 2023 18:13:22 +0100 Subject: [PATCH] other random changes --- hosts/main.nix | 13 +++++++++++-- .../default.nix | 4 ++-- mybin/log | 6 ++++++ mybin/nixre | 2 +- mybin/ru | 2 +- programs/ssh.nix | 12 ++++++++++++ users/me/home.nix | 15 ++++++++++----- 7 files changed, 43 insertions(+), 11 deletions(-) create mode 100755 mybin/log diff --git a/hosts/main.nix b/hosts/main.nix index 0edb2d7..792350a 100644 --- a/hosts/main.nix +++ b/hosts/main.nix @@ -20,15 +20,22 @@ ../users/root/default.nix ]; + virtualisation.podman.enable = true; + hardware.bluetooth.settings = { + General = { + MultiProfile = "multiple"; + }; + }; + nix.settings = { trusted-public-keys = [ "sebastian@c2vi.dev:0tIXGRJMLaI9H1ZPdU4gh+BikUuBVHtk+e1B5HggdZo=" ]; - builders = "@/etc/nix/machines"; + #builders = "@/etc/nix/machines"; trusted-users = [ "me" ]; }; nix = { - distributedBuilds = true; + distributedBuilds = false; # false, because i can't build on hpm currently ... not signed by trusted user error buildMachines = [ { hostName = "hpm"; @@ -158,7 +165,9 @@ virtualisation.libvirtd.enable = true; system.activationScripts.setupLibvirt = lib.stringAfter [ "var" ] '' + mkdir -p /var/lib/libvirt/storage ln -nsf ${workDir}/vm/libvirt/my-image-pool.xml /var/lib/libvirt/storage/my-image-pool.xml + rm -rf /var/lib/libvirt/qemu/networks ln -nsf ${workDir}/vm/qemu/* /var/lib/libvirt/qemu/ # there is no /bin/bash diff --git a/mods/xdg-desktop-portal-termfilechooser/default.nix b/mods/xdg-desktop-portal-termfilechooser/default.nix index f0c5f28..2dec3bf 100644 --- a/mods/xdg-desktop-portal-termfilechooser/default.nix +++ b/mods/xdg-desktop-portal-termfilechooser/default.nix @@ -3,7 +3,7 @@ , stdenv , fetchFromGitHub , meson -, pkgconfig +, pkg-config , inih , systemd , scdoc @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ meson - pkgconfig + pkg-config inih systemd scdoc diff --git a/mybin/log b/mybin/log new file mode 100755 index 0000000..4098152 --- /dev/null +++ b/mybin/log @@ -0,0 +1,6 @@ +#!/bin/bash + +export SUPABASE_KEY=$(cat ~/.mysecrets/log-supabase-key) +export SUPABASE_URL=$(cat ~/.mysecrets/log-supabase-url) + +python3 ~/work/log/new/client.py $@ diff --git a/mybin/nixre b/mybin/nixre index 3f7c5cd..a7ea83a 100755 --- a/mybin/nixre +++ b/mybin/nixre @@ -15,7 +15,7 @@ build_from_github(){ } build_from_local(){ - export out_path=$(nix build "$HOME/work/config#nixosConfigurations.$host.config.system.build.toplevel" --impure --no-link --print-out-paths $args_to_pass) + export out_path=$(sudo nix build "$HOME/work/config#nixosConfigurations.$host.config.system.build.toplevel" --impure --no-link --print-out-paths $args_to_pass) build_exit_code=$? echo out_path: $out_path diff --git a/mybin/ru b/mybin/ru index ade4407..42ab215 100755 --- a/mybin/ru +++ b/mybin/ru @@ -7,7 +7,7 @@ then elif [ "$1" == "mnt-wechner" ] then -rclone mount --vfs-cache-mode full -vvvv onedrive-school:projekt-autobatterie ~/wechner-mount/ +rclone mount --vfs-cache-mode full -vvvv onedrive-school:projekt-autobatterie ~/work/htl/projekt/wechner/mnt elif [ "$1" == "wstunnel" ] diff --git a/programs/ssh.nix b/programs/ssh.nix index a8246ff..abbe722 100644 --- a/programs/ssh.nix +++ b/programs/ssh.nix @@ -8,6 +8,17 @@ hostname = "github.com"; identityFile = "${secretsDir}/private-key-main"; }; + phone = { + user = "u0_a345"; + hostname = "192.168.44.1"; + port = 8022; + identityFile = "${secretsDir}/private-key-main"; + }; + uwu = { + user = "sebastian"; + identityFile = "${secretsDir}/private-key-main"; + hostname = "192.168.122.56"; + }; hpm = { #hostname = "192.168.1.6"; user = "me"; @@ -40,6 +51,7 @@ }; }; + home.file.".ssh/known_hosts".force = true; home.file.".ssh/known_hosts".text = '' hpm ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ+FpaNOf+ao6RCa6e43vAHFcQZTGu45rIqAG3Vx0/M8 hpm ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDbIgfPvt3NUWLxAv0jvWv7IUXHaR7k5M7Z1Kz24K+ZYuPRboHWNbcqGjik0kWDGwXejtTLkyiThK641Q0ffYp3bumKL3b3fBNLoRwHfVMHT9ZuM7e9nALJRa+0keBPTcO9kHliYJlEBiF4jHSZhVDPnZ0Qskg2m94AipKrhUC4KIbLFAERlDnFTxw8LTnzdfzs/n/80zH5tKq1TSlYd2XBIMlzYwxTGEgItifierQhncleVVUJ8IPLsSulMgCQu3BA8cGmdApbSe41FIieIsYzLEtJVnCRt0PymdYa1NdyngJ8ZWyXo6JjTCEHWv35WW05Oiw/tMyUDQoeebACe+Ve9WsYdb+0uttAQWZauODimGY/kRrwy2jCqDRoKjq+rWmTgLsXzuTr7sZ2nmlCIs0XkTXzwduo6ZJ1uNHYWTIjnC1in5uB5TMBlVQxEOdeLOIB9reHP7dajguCGLsOg/a7W/kx181w5MdXq5e9ch7Hp2eC9wBbwcy4EtmX0GAYSPV4GWGwunU92TFE5kg7haV23sdRfLf6ARrDLtsfvTzvoWWQFiO7AgrcOdSQtMUM0/egLUj0lg/A5fxV1pfXvxAF7TquNJCXhDYczCbej4PQM2WBe2eGY+BjY3gDHtUdzWEqhH+b6/Cz78yAa4aSWDB8D+Ejv0N0BZLaImYQhma5PQ== diff --git a/users/me/home.nix b/users/me/home.nix index ed05bd1..c8273ad 100644 --- a/users/me/home.nix +++ b/users/me/home.nix @@ -1,5 +1,5 @@ -{ config, pkgs, self, secretsDir, inputs, ... }: +{ config, pkgs, self, secretsDir, inputs, persistentDir, ... }: { # The home.stateVersion option does not have a default and must be set @@ -44,13 +44,17 @@ home.sessionPath = [ "${self}/mybin" ]; home.file = { - ".config/rclone".source = config.lib.file.mkOutOfStoreSymlink "${secretsDir}/rclone-conf"; + ".rclone.conf".source = config.lib.file.mkOutOfStoreSymlink "${secretsDir}/rclone-conf"; ".subversion/config".text = '' [miscellany] global-ignores = node_modules target ''; # documentation for this config file: https://svnbook.red-bean.com/en/1.7/svn.advanced.confarea.html ".mysecrets/root-pwd".text = "changeme"; ".mysecrets/me-pwd".text = "changeme"; + + ".mozilla/firefox".source = config.lib.file.mkOutOfStoreSymlink "${persistentDir}/firefox"; + ".cache/rofi-3.runcache".source = config.lib.file.mkOutOfStoreSymlink "${persistentDir}/rofi-run-cache"; + }; home.packages = with pkgs; [ @@ -102,10 +106,11 @@ moonlight-qt comma delta - jq + jq xorg.xkill - wget - xorg.xmodmap + wget + xorg.xmodmap + android-studio inputs.firefox.packages.${pkgs.system}.firefox-nightly-bin