pulsebert: add ledfx
This commit is contained in:
parent
db211ae2fa
commit
009780d093
20
flake.lock
20
flake.lock
|
@ -328,11 +328,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681493503,
|
||||
"narHash": "sha256-MDvaEks31Gy5mzDp6KDg3L6rX4wIsyDZbZqdkPNPgkc=",
|
||||
"lastModified": 1681503602,
|
||||
"narHash": "sha256-4QbGS4tghgSFNn0E06qR2ygcej0IDPxZeQ8WvqWapq4=",
|
||||
"owner": "astro",
|
||||
"repo": "microvm.nix",
|
||||
"rev": "79348ff0bd850606d8c6c438ea1af8078494c559",
|
||||
"rev": "d578ed45d3528c42ab4b12edf6d1512a7bd35714",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -385,11 +385,11 @@
|
|||
},
|
||||
"nixos": {
|
||||
"locked": {
|
||||
"lastModified": 1681496784,
|
||||
"narHash": "sha256-snebCSMpgzD2iFp4KTq/aJ93yyJuDMslcVbcGyXJDk4=",
|
||||
"lastModified": 1681515794,
|
||||
"narHash": "sha256-DF5pVSJU9Wd7v91j9AJ1yRgsY11JG0HELzoTcHfqzcQ=",
|
||||
"owner": "SuperSandro2000",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "752e461c4d93b12ea7ec622a4eb780968c324e62",
|
||||
"rev": "50ac6d359a4fa22230fd39afc8b5d08829554d7c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -844,11 +844,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1680737870,
|
||||
"narHash": "sha256-JHHuBUN8M1worLTM0ucp6PqkScmVJyjsCk7JTl10Pjo=",
|
||||
"lastModified": 1681500882,
|
||||
"narHash": "sha256-D7x+w5TR/S93tNerDP//Z8/kzopOAtPsGuS55em8JIo=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "3069e4c5b952daa7866a0077cc763835c9d3f43e",
|
||||
"revCount": 1761,
|
||||
"rev": "dd75dcd8e496953b833fe5fa5376f7e8a501a803",
|
||||
"revCount": 1763,
|
||||
"type": "git",
|
||||
"url": "https://gitea.c3d2.de/zentralwerk/network.git"
|
||||
},
|
||||
|
|
|
@ -37,20 +37,42 @@
|
|||
pkgs.makeModulesClosure (x // { allowMissing = true; });
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
python3 = prev.python3.override {
|
||||
packageOverrides = python-final: python-prev: {
|
||||
aiohttp = python-prev.aiohttp.overrideAttrs ({ nativeBuildInputs ? [],... }: {
|
||||
nativeBuildInputs = nativeBuildInputs ++ [python-final.setuptools];
|
||||
|
||||
doCheck = false;
|
||||
doInstallCheck = false;
|
||||
});
|
||||
|
||||
pystray = python-prev.pystray.overrideAttrs (_: {
|
||||
doCheck = false;
|
||||
doInstallCheck = false;
|
||||
});
|
||||
|
||||
samplerate = python-prev.samplerate.overrideAttrs (_: {
|
||||
dontUseSetuptoolsCheck = true;
|
||||
});
|
||||
};
|
||||
};
|
||||
python3Packages = final.python3.pkgs;
|
||||
})
|
||||
];
|
||||
|
||||
networking = {
|
||||
domain = "hq.c3d2.de";
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
# pulseaudio/pipewire network sync
|
||||
4713
|
||||
# llmnr
|
||||
5355
|
||||
4713 # pulseaudio/pipewire network sync
|
||||
5355 # llmnr
|
||||
8888 # ledfx
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
# mdns
|
||||
5353
|
||||
# llmnr
|
||||
5355
|
||||
5353 # mdns
|
||||
5355 # llmnr
|
||||
];
|
||||
};
|
||||
hostName = "pulsebert";
|
||||
|
@ -68,7 +90,8 @@
|
|||
|
||||
# https://github.com/dump-dvb/nix-config/blob/310ceedca5ab2d5c22070bd73c603926b6100a74/hardware/configuration-rpi-3b.nix#L16
|
||||
sdImage = lib.mkForce {
|
||||
populateFirmwareCommands = let
|
||||
populateFirmwareCommands =
|
||||
let
|
||||
configTxt = pkgs.writeText "config.txt" ''
|
||||
[pi3]
|
||||
kernel=u-boot-rpi3.bin
|
||||
|
@ -100,7 +123,8 @@
|
|||
# when attempting to show low-voltage or overtemperature warnings.
|
||||
avoid_warnings=1
|
||||
'';
|
||||
in ''
|
||||
in
|
||||
''
|
||||
(cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/firmware/)
|
||||
# Add the config
|
||||
cp ${configTxt} firmware/config.txt
|
||||
|
@ -128,12 +152,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
users.users = lib.optionalAttrs config.services.octoprint.enable {
|
||||
# Allow access to printer serial port and GPIO
|
||||
"${config.services.octoprint.user}".extraGroups = [ "dialout" ];
|
||||
};
|
||||
|
||||
services = {
|
||||
avahi.nssmdns = true;
|
||||
# Do not log to flash but also breaks journalctl --user
|
||||
# journald.extraConfig = ''
|
||||
# Storage=volatile
|
||||
|
@ -183,4 +203,17 @@
|
|||
};
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
|
||||
systemd.user.services.ledfx = {
|
||||
after = [ "pipewire.target" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.ledfx}/bin/ledfx --host 0.0.0.0";
|
||||
};
|
||||
};
|
||||
|
||||
users.users = lib.optionalAttrs config.services.octoprint.enable {
|
||||
# Allow access to printer serial port and GPIO
|
||||
"${config.services.octoprint.user}".extraGroups = [ "dialout" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true; # required for ledfx
|
||||
config.pipewire-pulse =
|
||||
let
|
||||
default-pipewire-pulse = lib.importJSON (pkgs.path + "/nixos/modules/services/desktops/pipewire/daemon/pipewire-pulse.conf.json");
|
||||
|
|
Loading…
Reference in New Issue