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