Install copyparty

Move some services and configurations around
This commit is contained in:
Christopher Mühl 2025-09-17 12:44:06 +02:00
parent 722c44532d
commit 54e67cf2de
No known key found for this signature in database
GPG key ID: E919B0F59E14FD47
15 changed files with 318 additions and 105 deletions

129
flake.lock generated
View file

@ -80,6 +80,25 @@
"type": "github"
}
},
"copyparty": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1758061721,
"narHash": "sha256-+agPUV+fOJSpqjVOEM0xC8+xhBFbnQesyy+8ErwGpks=",
"owner": "9001",
"repo": "copyparty",
"rev": "5996a58b20fa015bd404dfdb2cef8892909b3d69",
"type": "github"
},
"original": {
"owner": "9001",
"repo": "copyparty",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
@ -249,6 +268,40 @@
}
},
"flake-utils": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils_2"
},
"locked": {
"lastModified": 1715533576,
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_5"
},
@ -266,25 +319,6 @@
"type": "github"
}
},
"flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils"
},
"locked": {
"lastModified": 1715533576,
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
@ -463,7 +497,7 @@
"hyprlang": "hyprlang_2",
"hyprutils": "hyprutils_2",
"hyprwayland-scanner": "hyprwayland-scanner_2",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"pre-commit-hooks": "pre-commit-hooks_2",
"systems": "systems_3",
"xdph": "xdph"
@ -758,6 +792,24 @@
"type": "github"
}
},
"musnix": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1756852730,
"narHash": "sha256-qPere4RBHoZxiEGl8zXU8gjroZg4gkYGEwaAbKmL4vE=",
"owner": "musnix",
"repo": "musnix",
"rev": "7ccc92050e43dc92309396c6f2fe1f542214a242",
"type": "github"
},
"original": {
"owner": "musnix",
"repo": "musnix",
"type": "github"
}
},
"nix-filter": {
"locked": {
"lastModified": 1693833173,
@ -774,6 +826,21 @@
}
},
"nixpkgs": {
"locked": {
"lastModified": 1748162331,
"narHash": "sha256-rqc2RKYTxP3tbjA+PB3VMRQNnjesrT0pEofXQTrMsS8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-25.05",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1754725699,
"narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=",
@ -789,7 +856,23 @@
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs_3": {
"locked": {
"lastModified": 1756542300,
"narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d7600c775f877cd87b4f5a831c28aa94137377aa",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1755186698,
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
@ -855,13 +938,15 @@
"inputs": {
"agenix": "agenix",
"agenix-rekey": "agenix-rekey",
"copyparty": "copyparty",
"darwin": "darwin_2",
"disko": "disko",
"docker-compose-1": "docker-compose-1",
"home-manager": "home-manager_2",
"hypridle": "hypridle",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs_2",
"musnix": "musnix",
"nixpkgs": "nixpkgs_4",
"rose-pine-hyprcursor": "rose-pine-hyprcursor",
"snowfall": "snowfall",
"split-monitor-workspaces": "split-monitor-workspaces"

View file

@ -14,8 +14,10 @@
# Global system modules to be included for all systems
systems.modules = with inputs; {
nixos = [
disko.nixosModules.default
agenix.nixosModules.default
agenix-rekey.nixosModules.default
copyparty.nixosModules.default
./modules/common
];
darwin = [
@ -28,10 +30,11 @@
# Add modules only to specific hosts
systems.hosts = with inputs; {
cobalt.modules = [
disko.nixosModules.default
copyparty.nixosModules.default
musnix.nixosModules.default
];
mercury.modules = [
disko.nixosModules.default
beryllium.modules = [
copyparty.nixosModules.default
];
};
@ -42,6 +45,10 @@
permittedInsecurePackages = [];
};
overlays = with inputs; [
copyparty.overlays.default
];
outputs-builder = channels: {
formatter = channels.nixpkgs.alejandra;
};
@ -83,6 +90,8 @@
agenix-rekey.url = "github:oddlama/agenix-rekey";
agenix-rekey.inputs.nixpkgs.follows = "nixpkgs";
copyparty.url = "github:9001/copyparty";
hyprland.url = "github:hyprwm/hyprland";
hypridle = {
@ -101,6 +110,8 @@
inputs.hyprland.follows = "hyprland";
};
musnix.url = "github:musnix/musnix";
docker-compose-1.url = github:nixos/nixpkgs/b0f0b5c6c021ebafbd322899aa9a54b87d75a313;
};
}

View file

@ -21,6 +21,7 @@
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHl33DPxxzxrNNjM8rL4ktAj4ExzCyGiU8rKog0csxNA";
needs = {
copypartyPassword = "copyparty-password.age";
repoUpdatePAT = "repo-update-pat.age";
npmrc = {
rekeyFile = "npmrc.age";

View file

@ -15,9 +15,12 @@
solaar # Logitech mouse driver
btop # Better resource monitor
bottom # System resource monitor
copyparty
# GUI
vcv-rack # Audio synthesizer/eurorack simulator
ardour # General DAW
reaper # Narrating DAW
vlc # Video player
todoist-electron # Todo application
logseq # Knowledge Base
@ -38,7 +41,7 @@
# spacedrive # File explorer (Alpha, not usable yet)
thunderbird # Email client
speedcrunch # GUI calculator app
shotcut # Video editing
davinci-resolve # Video editing
naps2 # Scanning
feh # Image viewer

View file

@ -13,11 +13,8 @@
];
})
# wine
#(wineWowPackages.stable.override {waylandSupport = true;})
#winetricks
gamemode # performance mode
mangohud # performance overlays
alvr
];
}

View file

@ -3,7 +3,10 @@
lib,
...
}: {
home.packages = with pkgs; [tofi];
home.packages = with pkgs; [
tofi
fuzzel
];
# Clear the tofi cache after each activation so that newly installed packages
# are immediately available using tofi-drun.

View file

@ -0,0 +1,36 @@
{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.services.beszel-agent;
in {
options.services = {
beszel-agent = {
enable = mkEnableOption "Enable the Beszel Agent";
};
};
config = mkIf cfg.enable {
environment.systemPackages = [
pkgs.beszel
pkgs.rocmPackages.rocm-smi # Interface with AMD GPUs
];
systemd.services.beszel-agent = {
enable = true;
description = "Beszel Agent (remote monitoring)";
environment = {
KEY = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMkUPOw28Cu2LMuzfmvjT/L2ToNHcADwGyGvSpJ4wH2T";
LISTEN = "45876";
};
serviceConfig = {
ExecStart = "${pkgs.beszel}/bin/beszel-agent";
};
};
};
}

View file

@ -1,5 +1,6 @@
{...}: {
imports = [
./lnxlink.nix
./beszel.nix
];
}

View file

@ -0,0 +1,69 @@
{
pkgs,
config,
lib,
inputs,
...
}:
with lib; let
cfg = config.elements.wm;
tuigreet = "${pkgs.tuigreet}/bin/tuigreet";
hyprland-pkg = inputs.hyprland.packages.${pkgs.system}.hyprland;
hyprland-portal-pkg = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
hyprland-session = "${hyprland-pkg}/share/wayland-sessions";
in {
options.elements = {
wm = {
enable = mkEnableOption "Enable window manager configuration";
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
swaynotificationcenter
inputs.rose-pine-hyprcursor.packages.${pkgs.system}.default
xwayland-satellite
hyprshot
];
programs.hyprland = {
enable = true;
package = hyprland-pkg;
portalPackage = hyprland-portal-pkg;
};
security = {
polkit.enable = true;
pam.services.swaylock = {};
};
xdg.portal = {
config.common.default = ["hyprland"];
config.hyprland.default = ["wlr" "gtk"];
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
wlr.enable = true;
};
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${tuigreet} --asterisks --time --remember --remember-session --sessions ${hyprland-session}";
user = "greeter";
};
};
};
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal";
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
};
}

Binary file not shown.

View file

@ -0,0 +1,8 @@
age-encryption.org/v1
-> ssh-ed25519 Sih9FA 0KicXG2Efz0e9uzmZVEVfJT/i7enxSZOHN403NX/TQI
SMTWuslXUrZ4uTAAoBJPW2qI/uyUpirNs+qutENWpEY
-> u1J0d-grease 3Yf,I\u njKv!al
7tlxC1cHMMzeCC9BuAmRXuC19dLT2Oa416bN5ZEU9y7bKKwxdlHDCQA40E8yuSRk
asdGgYzSxPIqTwIsTQ
--- S+Dtx+pCwnQtyh1lSa7CA1wy0Ye4Yy8rqg5RXXFAVPc
Ð$z°M2ú¬\ö°Øz:N@—:¯,3Àzy¥ñf  €U<E282AC>7áëÁŠˆx

View file

@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 /u/eYA xmiJ76GC9OgIuJcMRzPK1Mwo1DdRsAc1LPXbpshXag8
5WmXKC4YQhc9qqmQVs26GXXlpmxh7rYvww3L0FPLmPQ
-> ]KoF}\i-grease _q#e
JnCuJ2FjXe3WtG0VmvNj3ww+sa7i
--- YdgtSb+pPQgjgdtY7XLBHGcbWPLDXd0ph7s6Pq3Sn7M
õ´½£˜XŽSÿ¹Pf´âѧٕjÀMåV\»ÍÏãçæm«TpY4Âs»Rï0

View file

@ -1,20 +0,0 @@
{pkgs, ...}: {
environment.systemPackages = [
pkgs.beszel
pkgs.rocmPackages.rocm-smi # Interface with AMD GPUs
];
systemd.services.beszel-agent = {
enable = true;
description = "Beszel Agent (remote monitoring)";
environment = {
KEY = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMkUPOw28Cu2LMuzfmvjT/L2ToNHcADwGyGvSpJ4wH2T";
LISTEN = "45876";
};
serviceConfig = {
ExecStart = "${pkgs.beszel}/bin/beszel-agent";
};
};
}

View file

@ -4,30 +4,42 @@
{
pkgs,
lib,
config,
...
}:
with lib._elements; {
imports = [
./hardware.nix
./disk-config.nix
./beszel-agent.nix
./wayland.nix
];
elements = {
hostname = "cobalt";
users = ["christopher"];
quirks = ["avahi" "docker" "nix-ld"];
wm = enabled;
secrets = {
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPjqieS4GkYAa1WRYZpxjgYsj7VGZ9U+rTFCkX8M0umD";
needs = {
copypartyPassword = rec {
owner = "christopher";
group = owner;
rekeyFile = "copyparty-password.age";
};
};
};
};
# Set the default drive
disko.devices.disk.main.device = "/dev/nvme1n1";
musnix = {
enable = true;
rtcqs.enable = true;
};
qt = {
enable = true;
platformTheme = "gnome";
@ -50,12 +62,7 @@ with lib._elements; {
xdg.portal = {
enable = true;
config.common.default = ["hyprland"];
config.hyprland.default = ["wlr" "gtk"];
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
wlr.enable = true;
xdgOpenUsePortal = true;
};
programs = {
@ -84,19 +91,31 @@ with lib._elements; {
};
services = {
openssh.enable = true;
openssh.settings.PasswordAuthentication = false;
# Bluetooth manager
blueman.enable = true;
# Linux link via MQTT
lnxlink.enable = true;
beszel-agent.enable = true;
pulseaudio.enable = true;
pulseaudio.support32Bit = true;
pipewire.enable = lib.mkForce false;
pipewire = {
enable = lib.mkForce true;
alsa.enable = true;
jack.enable = true;
pulse.enable = true;
};
# Automatic mounting of removable media
udisks2.enable = true;
usbmuxd = {
enable = true;
package = pkgs.usbmuxd2;
};
gvfs.enable = true; # Mount/trash/...
tumbler.enable = true; # Thumbnail support in Thunar
@ -116,6 +135,38 @@ with lib._elements; {
# Smartcard support, necessary for Yubikey logins
pcscd.enable = true;
copyparty = {
enable = false;
user = "christopher";
settings = {
i = "0.0.0.0";
};
accounts.c.passwordFile = config.age.secrets.copypartyPassword.path;
volumes = {
"/" = {
path = "/home/christopher";
access.rwmdga = "c";
flags = {
fk = 4;
scan = 60;
e2d = true;
};
};
"/hdd" = {
path = "/mnt/hdd";
access.rwmdga = "c";
flags = {
fk = 4;
scan = 60;
e2d = true;
};
};
};
};
};
programs = {
@ -141,8 +192,11 @@ with lib._elements; {
htop
gnumake
libnotify
gtk3
lact # GPU tuning
libimobiledevice
ifuse
# Oxidized coreutils
uutils-coreutils-noprefix

View file

@ -1,42 +0,0 @@
{
pkgs,
inputs,
...
}: let
tuigreet = "${pkgs.tuigreet}/bin/tuigreet";
hyprland-pkg = inputs.hyprland.packages.${pkgs.system}.hyprland;
hyprland-portal-pkg = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
hyprland-session = "${hyprland-pkg}/share/wayland-sessions";
in {
environment.systemPackages = with pkgs; [
swaynotificationcenter # Notification daemon for Wayland
inputs.rose-pine-hyprcursor.packages.${pkgs.system}.default
hyprshot
];
programs.hyprland = {
enable = true;
package = hyprland-pkg;
portalPackage = hyprland-portal-pkg;
};
services.greetd = {
enable = true;
settings = rec {
default_session = {
command = "${tuigreet} --asterisks --time --remember --remember-session --sessions ${hyprland-session}";
user = "greeter";
};
};
};
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal";
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
}