[WIP] Several changes

- `foot` fonts and background color
- `helix` editor
- `pass` related aliases in shell
- `nix-index` automatic update
- `sway`/`waybar` changes
-  new `beebox` host
- `kodi` module
- `coredns` for `hs`
This commit is contained in:
Andrea Ciceri 2022-10-18 10:55:48 +02:00
parent 859896c9b2
commit 759b200b45
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
14 changed files with 313 additions and 41 deletions

View file

@ -1,9 +1,10 @@
{pkgs, ...}: {
fonts = {
fonts = with pkgs; [powerline-fonts dejavu_fonts fira-code fira-code-symbols emacs-all-the-icons-fonts];
fonts = with pkgs; [powerline-fonts dejavu_fonts fira-code fira-code-symbols emacs-all-the-icons-fonts nerdfonts joypixels];
fontconfig.defaultFonts = {
monospace = ["DejaVu Sans Mono for Powerline"];
sansSerif = ["DejaVu Sans"];
};
};
nixpkgs.config.joypixels.acceptLicense = true;
}

78
modules/kodi/default.nix Normal file
View file

@ -0,0 +1,78 @@
{
config,
lib,
pkgs,
...
}: {
services.xserver = {
enable = true;
desktopManager.kodi = {
enable = true;
package = pkgs.kodi.withPackages (ps:
with ps; [
joystick
youtube
libretro
libretro-mgba
]);
};
displayManager.autoLogin = {
enable = true;
user = "kodi";
};
};
users.extraUsers.kodi = {
isNormalUser = true;
uid = 1002;
};
networking.firewall = {
allowedTCPPorts = [8080];
allowedUDPPorts = [8080];
};
environment.systemPackages = with pkgs; [xboxdrv cifs-utils];
fileSystems."/mnt/film" = {
device = "//ccr.ydns.eu/film";
fsType = "cifs";
options = let
credentials = pkgs.writeText "credentials" ''
username=guest
password=
'';
in ["credentials=${credentials},x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"];
};
fileSystems."/mnt/archivio" = {
device = "//ccr.ydns.eu/archivio";
fsType = "cifs";
options = let
credentials = pkgs.writeText "credentials" ''
username=guest
password=
'';
in ["credentials=${credentials},x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"];
};
systemd.services.xboxdrv = {
wantedBy = ["multi-user.target"];
after = ["network.target"];
serviceConfig = {
Type = "forking";
User = "root";
ExecStart = ''${pkgs.xboxdrv}/bin/xboxdrv --daemon --detach --pid-file /var/run/xboxdrv.pid --dbus disabled --silent --deadzone 4000 --deadzone-trigger 10% --mimic-xpad-wireless'';
};
};
services.xserver.config = ''
Section "InputClass"
Identifier "joystick catchall"
MatchIsJoystick "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "StartKeysEnabled" "False"
Option "StartMouseEnabled" "False"
EndSection
'';
boot.blacklistedKernelModules = ["xpad"];
}

View file

@ -41,7 +41,7 @@
system.activationScripts = {
populate-netrc.text = ''
cat <<EOF> /etc/nix/netrc
machine mlabs.cachix.org login "" password "$(cat ${config.age.secrets.mlabs-cachix.path})"
machine mlabs.cachix.org login x password "$(cat ${config.age.secrets.mlabs-cachix.path})"
EOF
'';
};