1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
Files
niveum/systems/zaatar/configuration.nix

111 lines
2.9 KiB
Nix
Raw Normal View History

2020-10-28 20:29:41 +01:00
{ config, pkgs, lib, ... }:
{
2020-10-28 20:29:41 +01:00
imports = [
./hardware-configuration.nix
<niveum/configs/wifi.nix>
<niveum/configs/keyboard.nix>
<niveum/modules/retiolum.nix>
<niveum/configs/tuner.nix>
2020-10-28 20:29:41 +01:00
<niveum/configs/spacetime.nix>
<niveum/configs/mpd.nix>
<niveum/configs/sshd.nix>
<niveum/configs/version.nix>
<niveum/configs/spotifyd.nix>
2020-10-28 20:29:41 +01:00
{
sound.enable = true;
}
{
2021-01-23 17:12:08 +01:00
environment.systemPackages =
let
worldradio = pkgs.callPackage <niveum/packages/worldradio.nix> {};
in [
(pkgs.writers.writeDashBin "mpv" ''
${pkgs.mpv}/bin/mpv --no-video "$@"
'')
2021-01-23 17:12:08 +01:00
(pkgs.writers.writeDashBin "worldradio" ''
shuf ${worldradio} | ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv --no-video
'')
];
}
{
services.illum.enable = true;
}
{
environment.systemPackages = [ pkgs.tmux ];
systemd.services.turntables = {
description = "music controller session";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.alacritty.terminfo ];
script = ''
${pkgs.tmux}/bin/tmux -2 new-session -d -s turntables ${pkgs.alsaUtils}/bin/alsamixer \; new-window
'';
preStop = "${pkgs.tmux}/bin/tmux kill-session -t turntables";
serviceConfig = {
User = "root";
RemainAfterExit = true;
Type = "oneshot";
};
};
}
/* {
users.extraUsers.kiosk = {
isNormalUser = true;
password = "";
extraGroups = [ "audio" ];
2020-10-28 20:29:41 +01:00
};
services.cage = {
2020-10-28 20:29:41 +01:00
enable = true;
user = config.users.extraUsers.kiosk.name;
extraArguments = [ "-s" ]; # allow vt switching
program =
let startUrl = "https://youtube.com";
in pkgs.writers.writeDash "kiosk-browser" ''
while true; do
${pkgs.chromium}/bin/chromium \
--no-first-run --no-message-box --noerrdialogs \
--default-browser --no-default-browser-check \
--start-maximized --kiosk ${startUrl}
sleep 0.5
done
'';
2020-10-28 20:29:41 +01:00
};
systemd.services.cage-tty1.environment.XKB_DEFAULT_LAYOUT = "de";
2020-10-29 07:54:22 +01:00
programs.chromium = {
enable = true;
extensions = [
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
];
};
} */
2020-10-28 20:29:41 +01:00
];
nix.nixPath = [ "/var/src" ];
services.logind = {
lidSwitch = "ignore";
lidSwitchDocked = "ignore";
lidSwitchExternalPower = "ignore";
};
2020-10-28 20:29:41 +01:00
services.illum.enable = true;
environment.systemPackages = with pkgs; [ git vim htop ];
boot.loader.systemd-boot = {
enable = true;
configurationLimit = 5;
};
2019-01-30 17:08:07 +01:00
boot.loader.efi.canTouchEfiVariables = true;
2020-10-28 21:56:14 +01:00
networking.hostName = "zaatar";
2019-01-30 17:08:07 +01:00
2020-01-24 08:57:39 +01:00
networking.retiolum = {
2020-11-06 10:52:08 +01:00
ipv4 = "10.243.2.34";
ipv6 = "42:0:3c46:156e:10b6:3bd6:6e82:b2cd";
2020-01-24 08:57:39 +01:00
};
2020-10-28 20:29:41 +01:00
system.stateVersion = "20.09";
2019-01-30 17:08:07 +01:00
}