Enable RetroArch on Steam Deck

This commit is contained in:
Invariantspace 2024-03-03 00:11:51 -08:00
parent 202e5c098a
commit 8534c96c66
17 changed files with 127 additions and 113 deletions

View file

@ -16,13 +16,6 @@ with lib; {
The home directory for the default user.
'';
};
wildcard = mkOption {
type = types.str;
default = "0.0.0.0";
description = ''
The localhost address.
'';
};
localhost = mkOption {
type = types.str;
default = "127.0.0.1";
@ -52,6 +45,13 @@ with lib; {
The post master email address.
'';
};
privateKeyFiles = mkOption {
type = types.listOf types.str;
default = if config.services.openssh.enable then builtins.map (key: key.path) config.services.openssh.hostKeys else [ "/root/.ssh/${config.networking.hostName}" ];
description = ''
The private key files for sops.
'';
};
publicKeys = mkOption {
type = types.listOf types.str;
default = [
@ -61,13 +61,6 @@ with lib; {
The public keys for SSH authentication.
'';
};
privateKeyFiles = mkOption {
type = types.listOf types.str;
default = if config.services.openssh.enable then builtins.map (key: key.path) config.services.openssh.hostKeys else [ "/root/.ssh/${config.networking.hostName}" ];
description = ''
The private key files for sops.
'';
};
sopsFile = mkOption {
type = types.path;
default = ./secrets.yaml;
@ -75,6 +68,17 @@ with lib; {
The secrets file for device.
'';
};
syncthingDevices = mkOption {
type = types.attrsOf (types.attrsOf types.str);
default = {
blitzar.id = "KGCBCIZ-GG6KMQ2-FLK5BWW-GLCEDML-5LCI24S-UKO5UWL-HWNCPYX-ZWWD5AQ";
nebula.id = "NJXA5XS-2PSWECD-UHBV7JH-IR2RSWY-PRUPFTZ-AHL7IN6-RXSLZKB-2FUNRQH";
protostar.id = "MEEIJ3F-NYIB55Y-SDCWCLX-6XOR6YU-OQO477W-JAPG6F6-LRBGBGG-FENYPQE";
};
description = ''
The device information for syncthing
'';
};
userName = mkOption {
type = types.str;
default = "macronova";
@ -82,5 +86,12 @@ with lib; {
The username across all devices.
'';
};
wildcard = mkOption {
type = types.str;
default = "0.0.0.0";
description = ''
The localhost address.
'';
};
};
}

View file

@ -1,6 +1,7 @@
{ config, pkgs, ... }:
let
home = config.constants.homeDir;
usr = config.constants.userName;
usrPwdFile = "users/${usr}/password";
in
@ -89,6 +90,15 @@ in
};
};
resolved.enable = true;
syncthing = {
configDir = "${home}/.config/syncthing";
dataDir = "${home}/.local/share/syncthing";
openDefaultPorts = true;
overrideDevices = true;
overrideFolders = true;
settings.devices = config.constants.syncthingDevices;
user = usr;
};
};
sops.secrets.${usrPwdFile}.neededForUsers = true;