From 3f70d39d4fc043ea977083d28d2123c7ea35f3b2 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sun, 18 May 2025 11:13:57 +0200 Subject: [PATCH] add scheibnkleister presence --- pkgs/default.nix | 1 + pkgs/scheibnkleister-presence/default.nix | 22 ++++++++++++ systems/pc/configuration.nix | 44 +++++++++-------------- 3 files changed, 39 insertions(+), 28 deletions(-) create mode 100644 pkgs/scheibnkleister-presence/default.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index 23df04f..bd84bb4 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -8,6 +8,7 @@ kop-newproject = pkgs.callPackage ./kop-newproject/default.nix { }; kop-website = pkgs.callPackage ./website/default.nix { inherit kop-hub ente-frontend; }; + scheibnkleister-presence = pkgs.callPackage ./scheibnkleister-presence/default.nix { }; sddm-astronaut = pkgs.callPackage ./sddm-astronaut/default.nix { }; mangal-patched = pkgs.callPackage ./mangal/default.nix { }; rdna4-lact = pkgs.callPackage ./lact/default.nix { }; diff --git a/pkgs/scheibnkleister-presence/default.nix b/pkgs/scheibnkleister-presence/default.nix new file mode 100644 index 0000000..acb2a77 --- /dev/null +++ b/pkgs/scheibnkleister-presence/default.nix @@ -0,0 +1,22 @@ +{ buildNpmPackage +, fetchFromGitHub +, lib +, ... +}: +buildNpmPackage rec { + pname = "scheibnkleister-presence"; + version = "0.0.1"; + + src = fetchGit { + url = "git@github.com:oberprofis/scheibnkleister-presence.git"; + ref = "master"; + rev = "34d07540872ae5827b68c7b272a3384480822cff"; + }; + + forceGitDeps = true; + dontNpmBuild = true; + npmDepsHash = "sha256-ncjKsjox28t11t3KoIiRlrwO/ISzYmRZ0mfTPO+8XBE="; + + # The prepack script runs the build script, which we'd rather do in the build phase. + npmPackFlags = [ "--ignore-scripts" ]; +} diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index b301607..f6b539d 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -99,6 +99,22 @@ }; virtualisation.waydroid.enable = false; + systemd.user.services.scheibnkleister-presence = { + description = "scheibnkleister-presence"; + wantedBy = [ "graphical-session.target" ]; + wants = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + serviceConfig = { + Type = "simple"; + ExecStart = + "${pkgs.scheibnkleister-presence}/bin/scheibnkleister-presence"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + + i18n.supportedLocales = [ "C.UTF-8/UTF-8" "de_AT.UTF-8/UTF-8" @@ -111,7 +127,6 @@ environment.systemPackages = with pkgs; [ #libimobiledevice #ifuse # optional, to mount using 'ifuse' - openai-whisper ]; networking.firewall.allowedTCPPorts = [ 6567 ]; # mindustry @@ -119,32 +134,6 @@ mainUser.layout = "de"; mainUser.variant = "us"; age.identityPaths = [ /home/kopatz/.ssh/id_rsa ]; - services.xserver.displayManager.session = [ - #{ - # manage = "desktop"; - # name = "hyprland"; - # start = '' - # ${lib.getExe pkgs.hyprland} & - # waitPID=$! - # ''; - #} - #{ - # manage = "desktop"; - # name = "plasma5"; - # start = '' - # env ${pkgs.plasma-workspace}/bin/startplasma-x11 - # ''; - #} - ]; - - # not worth it - # https://github.com/NixOS/nixpkgs/blob/master/lib/systems/architectures.nix - #nix.settings.system-features = ["znver3" "gccarch-znver3" ]; - #nixpkgs.hostPlatform = { - # gcc.arch = "znver3"; - # gcc.tune = "znver3"; - # system = "x86_64-linux"; - #}; # fix index services.xserver.extraConfig = '' @@ -157,7 +146,6 @@ # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; networking.hostName = "kop-pc"; # Define your hostname.