Compare commits
7 Commits
3b40ecbad1
...
kodi-to-wa
| Author | SHA1 | Date | |
|---|---|---|---|
| f22ff0e286 | |||
| 811b61e9e2 | |||
| 2390d55782 | |||
| 609e5f4548 | |||
| bc5d69e4cf | |||
| 637c0cca2b | |||
| c82a85a630 |
@@ -10,7 +10,7 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../roles/common/default.nix
|
../../roles/common/default.nix
|
||||||
../../roles/nix/default.nix
|
../../roles/nix/default.nix
|
||||||
(import ../../roles/kodi/default.nix { autologin = true; inherit lib; inherit pkgs; })
|
(import ../../roles/kodi/default.nix { autologin = true; wayland = true; inherit lib; inherit pkgs; })
|
||||||
(import ../../roles/users/default.nix { extraGroups = []; })
|
(import ../../roles/users/default.nix { extraGroups = []; })
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -19,93 +19,8 @@
|
|||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.hostName = "boxy"; # Define your hostname.
|
networking.hostName = "boxy"; # Define your hostname.
|
||||||
# Pick only one of the below networking options.
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|
||||||
|
|
||||||
# Set your time zone.
|
hardware.graphics.enable = true;
|
||||||
# time.timeZone = "Europe/Amsterdam";
|
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
# i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
# console = {
|
|
||||||
# font = "Lat2-Terminus16";
|
|
||||||
# keyMap = "us";
|
|
||||||
# useXkbConfig = true; # use xkb.options in tty.
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
|
||||||
# services.xserver.enable = true;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
# services.xserver.xkb.layout = "us";
|
|
||||||
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
# services.printing.enable = true;
|
|
||||||
|
|
||||||
# Enable sound.
|
|
||||||
# hardware.pulseaudio.enable = true;
|
|
||||||
# OR
|
|
||||||
# services.pipewire = {
|
|
||||||
# enable = true;
|
|
||||||
# pulse.enable = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
# services.libinput.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
# users.users.alice = {
|
|
||||||
# isNormalUser = true;
|
|
||||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
||||||
# packages = with pkgs; [
|
|
||||||
# firefox
|
|
||||||
# tree
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
users.users.johno = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
# environment.systemPackages = with pkgs; [
|
|
||||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|
||||||
# wget
|
|
||||||
# ];
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# Copy the NixOS configuration file and link it from the resulting system
|
|
||||||
# (/run/current-system/configuration.nix). This is useful in case you
|
|
||||||
# accidentally delete configuration.nix.
|
|
||||||
# system.copySystemConfiguration = true;
|
|
||||||
|
|
||||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
../../roles/common/default.nix
|
../../roles/common/default.nix
|
||||||
(import ../../roles/desktop/default.nix { x11Only = true; inherit inputs; inherit pkgs; })
|
(import ../../roles/desktop/default.nix { x11Only = true; inherit inputs; inherit pkgs; })
|
||||||
../../roles/kids/default.nix
|
../../roles/kids/default.nix
|
||||||
(import ../../roles/kodi/default.nix { autologin = false; inherit lib; inherit pkgs; })
|
(import ../../roles/kodi/default.nix { autologin = false; wayland = false; inherit lib; inherit pkgs; })
|
||||||
../../roles/nfs-mounts/default.nix
|
../../roles/nfs-mounts/default.nix
|
||||||
../../roles/nix/default.nix
|
../../roles/nix/default.nix
|
||||||
../../roles/printing/default.nix
|
../../roles/printing/default.nix
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
service.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
pulse.enabld = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
{ autologin ? false, pkgs, ... }:
|
{ autologin ? false, wayland ? false, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
kodiBasePkg = if wayland then pkgs.kodi-wayland else pkgs.kodi;
|
||||||
|
kodiPkg = kodiBasePkg.withPackages (pkgs: with pkgs; [
|
||||||
|
jellyfin
|
||||||
|
steam-launcher
|
||||||
|
steam-library
|
||||||
|
youtube
|
||||||
|
]);
|
||||||
|
in
|
||||||
{
|
{
|
||||||
services.xserver.desktopManager.kodi = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.kodi.withPackages (pkgs: with pkgs; [
|
|
||||||
jellyfin
|
|
||||||
]);
|
|
||||||
};
|
|
||||||
users.extraUsers.kodi.isNormalUser = true;
|
users.extraUsers.kodi.isNormalUser = true;
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
@@ -14,13 +19,29 @@
|
|||||||
allowedUDPPorts = [ 8080 ];
|
allowedUDPPorts = [ 8080 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.displayManager = if autologin then {
|
services = mkIf autologin {
|
||||||
autoLogin.enable = true;
|
cage = mkIf wayland {
|
||||||
autoLogin.user = "kodi";
|
user = "kodi";
|
||||||
defaultSession = "kodi";
|
program = "${kodiPkg}/bin/kodi-standalone";
|
||||||
} else {};
|
enable = true;
|
||||||
services.xserver.displayManager = if autologin then {
|
};
|
||||||
lightdm.enable = true;
|
|
||||||
lightdm.greeter.enable = false;
|
xserver = mkIf (!wayland) {
|
||||||
} else {};
|
enable = true;
|
||||||
|
desktopManager.kodi = {
|
||||||
|
enable = true;
|
||||||
|
package = kodiPkg;
|
||||||
|
};
|
||||||
|
displayManager.lightdm = {
|
||||||
|
enable = true;
|
||||||
|
greeter.enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
displayManager = mkIf (!wayland) {
|
||||||
|
autoLogin.enable = true;
|
||||||
|
autoLogin.user = "kodi";
|
||||||
|
defaultSession = "kodi";
|
||||||
|
sessionData.autologinSession = "kodi";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user