Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions default.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,21 @@
}
},
"todo-tree.regex.regex": "($TAGS)((\\-.*|)\\(.*\\)):", // ($TAGS)((\\-.*|)\\(.*\\)):
"todo-tree.filtering.excludeGlobs": [
"**/node_modules",
"**/README.md"
],
"todo-tree.tree.groupedByTag": false,
"todo-tree.tree.groupedBySubTag": false,
"todo-tree.tree.flat": true,

"dateTime.showSeconds": true,

// GitLens
"gitlens.plusFeatures.enabled": false, // Disable the annoying pop-ups
"gitlens.launchpad.indicator.enabled": false, // Disable launchpad indicator as we are not using that functionality
"gitlens.statusBar.enabled": false, // Do not bloat the status bar
"gitlens.statusBar.pullRequests.enabled": false,
},

"extensions": {
Expand Down
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@

inputs.nixpkgs.legacyPackages.${system}.ncurses
inputs.nixpkgs.legacyPackages.${system}.pkg-config

inputs.nixpkgs.legacyPackages.${system}.ungoogled-chromium # Web browser used in the integrated developer environment for interacting with the outside resources
];
inputsFrom = [
config.mission-control.devShell
Expand Down
4 changes: 2 additions & 2 deletions src/nixos/machines/morph/config/security.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ in {
];

# SECURITY(Krey): Currently a necessary malware to keep the CPU functional.. Such is the curse of i686/amd64 systems
hardware.cpu.intel.updateMicrocode = mkForce true;
hardware.cpu.amd.updateMicrocode = mkForce true;

# NOTE(Krey): System designed to not need this
hardware.enableRedistributableFirmware = mkForce false;
hardware.enableRedistributableFirmware = mkForce true;
}
];
}
1 change: 1 addition & 0 deletions src/nixos/machines/morph/config/setup.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ in {

nix.distributedBuilds = true; # Perform distributed builds if requested

services.sunshine.enable = true;
services.openssh.enable = true;
services.tor.enable = true;
# FIXME(Krey): Kernel Panic on wake-up
Expand Down
2 changes: 2 additions & 0 deletions src/nixos/machines/morph/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

# Users
self.nixosModules.users-kreyren
self.homeManagerModules."kreyren@morph"

# Files
./config/bootloader.nix
Expand All @@ -27,6 +28,7 @@
./services/binfmt.nix
./services/distributedBuilds.nix
./services/openssh.nix
./services/sunshine.nix
./services/tor.nix
];
};
Expand Down
123 changes: 123 additions & 0 deletions src/nixos/machines/morph/services/sunshine.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{ self, pkgs, config, lib, aagl, ... }:

# MORPH-specific configuration of Sunshine

let
inherit (lib) mkIf;

akl-scripts = pkgs.kodi.packages.buildKodiAddon rec {
pname = "akl.scripts";
namespace = "script.module.akl";
version = "1.1.2";

src = pkgs.fetchzip {
url = "https://github.com/chrisism/repository.chrisism.dev/raw/refs/heads/main/matrix/script.module.akl/script.module.akl-1.1.2.zip";
hash = "sha256-lS04rfGBgr+42JBkw1TKIfwI5x1MKHA2/9/r42yqSwY=";
};

propagatedBuildInputs = with pkgs.kodi.packages; [
six
xbmcswift2
routing
requests
];

passthru = {
pythonPath = "lib";
};

meta = with lib; {
homepage = "https://github.com/chrisism/repository.chrisism.dev/blob/main/matrix/plugin.program.akl";
description = "Advanced Kodi Launcher";
# maintainers = teams.kodi.members;
};
};

# FIXME(Krey): Requires resources/scheme.sql installed in $USER/.kodi/addons/plugins.program.aki/resources/scheme.sql otherwise the addon will fail to deploy
akl = pkgs.kodi.packages.buildKodiAddon rec {
pname = "akl";
namespace = "plugin.program.akl";
version = "1.5.1";

src = pkgs.fetchzip {
url = "https://github.com/chrisism/repository.chrisism.dev/raw/refs/heads/main/matrix/plugin.program.akl/plugin.program.akl-1.5.1.zip";
hash = "sha256-RK+DHt5LxGMPHV3i3HEZ8PSe7ukIa3wlN2yzuZnj/tc=";
};

propagatedBuildInputs = with pkgs.kodi.packages; [
six
xbmcswift2
routing
akl-scripts
];

passthru = {
pythonPath = "resources/lib";
};

meta = with lib; {
homepage = "https://github.com/chrisism/repository.chrisism.dev/blob/main/matrix/plugin.program.akl";
description = "Advanced Kodi Launcher";
# maintainers = teams.kodi.members;
};
};
in mkIf config.services.sunshine.enable {
services.sunshine.capSysAdmin = true; # Assign CAP_SYS_ADMIN for DRM/KMS screen capture
services.sunshine.openFirewall = true; # Open Firewall for local network

# Enable Auto-Login
# FIXME-SECURITY(Krey): Require that the user is logged-in and out remotely
# services.displayManager.autoLogin.enable = true;
# services.displayManager.autoLogin.user = "kreyren";

# Desktop Environment - Kodi
# FIXME(Krey): Struggling to figure out a way to add and play linux games through kodi rn
# services.xserver.enable = true;
# services.xserver.desktopManager.kodi.enable = true;
# services.xserver.displayManager.lightdm.greeter.enable = false;
# # System-wide plugins - https://github.com/NixOS/nixpkgs/tree/nixos-24.05/pkgs/applications/video/kodi/addons
# services.xserver.desktopManager.kodi.package = pkgs.kodi.withPackages (p: with p; [
# # osmc-skin
# # sponsorblock
# # youtube
# # akl
# # akl-scripts
# ]);

# Desktop Environment - GNOME (Backup UI)
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.displayManager.gdm.wayland = false; # Do not use wayland as it has issues rn
services.xserver.desktopManager.gnome.enable = true;
programs.dconf.enable = true; # Needed for home-manager to not fail deployment (https://github.com/nix-community/home-manager/issues/3113)

# Tor Access to The Web UI
services.tor.relay.onionServices."sunshine".map = mkIf config.services.tor.enable [{ port = 80; target = { port = 47990; }; }]; # Provide the admin panel over onions to make it accessible

# Broadcasted Applications
# services.sunshine.applications = {
# apps = [
# {
# name = "Desktop";
# image-path = "desktop.png";
# }
# {
# name = "That Anime Game";
# image-path = "${./images/sunshine-aagl-cover.png}";
# # FIXME-QA(Krey): This doesn't work to open the anime-game
# detached = [ "${self.inputs.aagl.packages.x86_64-linux.anime-game-launcher}/bin/anime-game-launcher" ];
# }
# {
# # DNM(Krey): For Testing..
# name = "Alacritty";
# image-path = "desktop.png";
# detached = [ "${pkgs.alacritty}/bin/alacritty" ];
# }
# ];
# };

# # Impermanence
# environment.persistence."/nix/persist/system".directories = mkIf config.boot.impermanence.enable [
# "/home/sunshine/.local/share/anime-game-launcher"
# ];
}
1 change: 1 addition & 0 deletions src/nixos/users/users/kreyren/home/machines/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
imports = [
./ignucius
./lengo
./morph
./sinnenfreude
./tupac
];
Expand Down
41 changes: 41 additions & 0 deletions src/nixos/users/users/kreyren/home/machines/morph/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{ config, inputs, self, ... }:

let
inherit (config.flake) homeManagerModules;
in {
# Module
flake.homeManagerModules."kreyren@morph".imports = [
homeManagerModules.kreyren
{
home-manager = {
users.kreyren.imports = [
./home-configuration.nix
];
backupFileExtension = "backup"; # To avoid build failures on generated files
};
}
];

# FIXME(Krey): Figure out how to make this work on non-standalone nix distro scenario or on foreign infrastructure managements
# # Standalone declaration
# flake.homeManagerConfigurations."kreyren@ignucius" = inputs.home-manager-nixpkgs.lib.homeManagerConfiguration {
# pkgs = import inputs.nixpkgs {
# system = "x86_64-linux";
# nixpkgs.config.allowUnfree = true;
# };
# modules = [
# { home.stateVersion = "23.11"; }

# self.nixosModules.homeManagerConfiguration.kreyren.default

# ./home-configuration.nix
# ];

# extraSpecialArgs = {
# unstable = import inputs.nixpkgs-unstable {
# system = "x86_64-linux";
# nixpkgs.config.allowUnfree = true;
# };
# };
# };
}
Loading