Fix vt-terminal screen stuff
This commit is contained in:
parent
b96921de98
commit
6ab66771f2
14
flake.nix
14
flake.nix
|
@ -58,8 +58,10 @@
|
||||||
groups.dibbler = { };
|
groups.dibbler = { };
|
||||||
users.dibbler = {
|
users.dibbler = {
|
||||||
group = "dibbler";
|
group = "dibbler";
|
||||||
|
extraGroups = [ "lp" ];
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = "${screen} -x dibbler";
|
shell = ((pkgs.writeShellScriptBin "login-shell" "${screen} -x dibbler") // {shellPath = "/bin/login-shell";});
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -68,7 +70,7 @@
|
||||||
wantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStartPre = "-${screen} -X -S dibbler kill";
|
ExecStartPre = "-${screen} -X -S dibbler kill";
|
||||||
ExecStart = "${screen} -dmS dibbler -O -l /home/dibbler/dibbler/text_based.py";
|
ExecStart = "${screen} -dmS dibbler -O -l ${cfg.package.override { conf = cfg.config; }}/bin/dibbler";
|
||||||
ExecStartPost = "${screen} -X -S dibbler width 42 80";
|
ExecStartPost = "${screen} -X -S dibbler width 42 80";
|
||||||
User = "dibbler";
|
User = "dibbler";
|
||||||
Group = "dibbler";
|
Group = "dibbler";
|
||||||
|
@ -81,10 +83,14 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/84105
|
# https://github.com/NixOS/nixpkgs/issues/84105
|
||||||
|
boot.kernelParams = [
|
||||||
|
"console=ttyUSB0,9600"
|
||||||
|
"console=tty1"
|
||||||
|
];
|
||||||
systemd.services."serial-getty@ttyUSB0" = {
|
systemd.services."serial-getty@ttyUSB0" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wantedBy = [ "getty.target" ];
|
wantedBy = [ "getty.target" ]; # to start at boot
|
||||||
serviceConfig.Restart = "always";
|
serviceConfig.Restart = "always"; # restart when session is closed
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|
Loading…
Reference in New Issue