Skip to content

Commit

Permalink
local/remote merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Octelly committed Feb 2, 2025
2 parents 4554660 + 6a5deb4 commit 6bf9e51
Show file tree
Hide file tree
Showing 14 changed files with 504 additions and 393 deletions.
295 changes: 97 additions & 198 deletions flake.lock

Large diffs are not rendered by default.

19 changes: 11 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
nur.url = "github:nix-community/NUR";
vscode-ext.url = "github:nix-community/nix-vscode-extensions";
flatpaks.url = "github:GermanBread/declarative-flatpak/stable-v3";
anyrun = {
url = "github:Kirottu/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
#anyrun = {
# url = "github:Kirottu/anyrun";
# inputs.nixpkgs.follows = "nixpkgs";
#};

## Hyprland stuff
#hyprland = {
Expand All @@ -45,10 +45,12 @@
#};

# Flake for testing COSMIC on NixOS
nixos-cosmic = {
url = "github:lilyinstarlight/nixos-cosmic";
inputs.nixpkgs.follows = "nixpkgs";
};
#nixos-cosmic = {
# url = "github:lilyinstarlight/nixos-cosmic";
# inputs.nixpkgs.follows = "nixpkgs";
#};

zen-browser.url = "github:0xc000022070/zen-browser-flake";

# Hoyoverse games
aagl = {
Expand Down Expand Up @@ -89,6 +91,7 @@
"freeimage-unstable-2021-11-01" # for EmulationStation DE (desktop edition)

"fluffychat-linux-1.22.1" # isn't really insecure
"fluffychat-linux-1.23.0"
"cinny-unwrapped-4.2.3"
"cinny-4.2.3"
"olm-3.2.16" # this is what marks fluffy and many other matrix things as insecure
Expand Down
99 changes: 72 additions & 27 deletions hosts/ocean-desktop/configuration.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, pkgs, ... }: {
{ pkgs, ... }: {

modules = {
desktop = {
Expand All @@ -7,6 +7,12 @@
olympus.enable = false;
minecraft.enable = true;
sunshine.enable = true;
emulation = {
enable = true;
switch = true;
wii = true;
};
utils.overlays.vkbasalt = true;
};
awesome = {
enable = true;
Expand All @@ -22,6 +28,16 @@
hardware.bluetooth.enable = true;
};

hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
# p sure this was here only for Davinki
#rocmPackages.clr.icd
];
};

programs.corectrl.enable = true;

virtualisation.vmware.host = {
enable = true;
extraConfig = ''
Expand All @@ -31,30 +47,59 @@
'';
};

#services.davfs2 = {
# enable = true;
# settings.sections = {
# "/home/octelly/nextcloud" = {
# use_locks = false;
# gui_optimize = true;
# cache_size = 1024 * 8;
# table_size = 32768;
# };
# };
#};

#fileSystems."/home/octelly/nextcloud" = {
# device = "https://cloud.owo.digital/remote.php/dav/files/octelly/";
# fsType = "davfs";
# options = [
# #"x-systemd.automount" # mount on access
# "noauto" # do not mount on boot
# "user" # let's ordinary user to unmount
# "uid=octelly"
# "rw" # read write
# #"async" # ??
# ];
#};
networking.firewall.allowedTCPPorts = [ 3216 ]; # EA App
networking.firewall.allowedUDPPorts = [ 3216 ]; # EA App
# for dev stuff
virtualisation.docker.enable = true;

# VR
programs.alvr = {
enable = true;
openFirewall = true;
};
programs.adb.enable = true; # wired ALVR
environment.systemPackages = with pkgs; [
wlx-overlay-s

# VRChat creation
unityhub
alcom
vrc-get
];

# required for NixOS SteamVR to work
# https://wiki.nixos.org/wiki/VR/en#SteamVR
boot.kernelPatches = [
{
name = "amdgpu-ignore-ctx-privileges";
patch = pkgs.fetchpatch {
name = "cap_sys_nice_begone.patch";
url = "https://github.com/Frogging-Family/community-patches/raw/master/linux61-tkg/cap_sys_nice_begone.mypatch";
hash = "sha256-Y3a0+x2xvHsfLax/uwycdJf3xLxvVfkfDVqjkxNaYEo=";
};
}
];

services.flatpak.enable = true;

fileSystems."/tmp" = {
device = "none";
fsType = "tmpfs";
options = [
"defaults"
"size=150%"
];
};

services.btrfs.autoScrub = {
enable = true;
interval = "weekly";
};

networking.firewall.allowedTCPPorts = [
25565 # minecra
3216 # EA App
];
networking.firewall.allowedUDPPorts = [
25565 # minecra
3216 # EA App
];
}
2 changes: 1 addition & 1 deletion hosts/ocean-desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lib.nixosSystem {

inputs.home.nixosModules.home-manager
inputs.flatpaks.nixosModules.declarative-flatpak
inputs.nixos-cosmic.nixosModules.default
#inputs.nixos-cosmic.nixosModules.default

# hardware modules
inputs.nixHW.nixosModules.common-cpu-amd
Expand Down
21 changes: 14 additions & 7 deletions hosts/ocean-desktop/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
[
(modulesPath + "/installer/scan/not-detected.nix")
];

boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
Expand All @@ -14,29 +15,35 @@
boot.extraModulePackages = [ ];

fileSystems."/" =
{ device = "/dev/disk/by-uuid/23f48d9f-cce6-488a-ba7f-5e2e0d13dd5d";
{
device = "/dev/disk/by-uuid/23f48d9f-cce6-488a-ba7f-5e2e0d13dd5d";
fsType = "btrfs";
};

fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/9DB6-25F6";
{
device = "/dev/disk/by-uuid/9DB6-25F6";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};

fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/2c738dc3-b5ad-4c18-8c98-d25e98431a9f";
{
device = "/dev/disk/by-uuid/2c738dc3-b5ad-4c18-8c98-d25e98431a9f";
fsType = "btrfs";
options = [
"noatime"
];
};

fileSystems."/home" =
{ device = "/dev/disk/by-uuid/da172f79-f4f5-425b-a000-0f4486c2932f";
{
device = "/dev/disk/by-uuid/da172f79-f4f5-425b-a000-0f4486c2932f";
fsType = "btrfs";
};

swapDevices =
[ { device = "/dev/disk/by-uuid/37c98e08-e2a7-4875-a126-899e6e124e4b"; }
];
[{ device = "/dev/disk/by-uuid/37c98e08-e2a7-4875-a126-899e6e124e4b"; }];

# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
Expand Down
4 changes: 4 additions & 0 deletions hosts/ocean-t460/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
steam.enable = true;
olympus.enable = false;
minecraft.enable = true;
emulation = {
enable = true;
wii = true;
};
};
awesome = {
enable = true;
Expand Down
2 changes: 1 addition & 1 deletion hosts/ocean-t460/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lib.nixosSystem {
inputs.home.nixosModules.home-manager
inputs.nixHW.nixosModules.lenovo-thinkpad-t460
inputs.flatpaks.nixosModules.declarative-flatpak
inputs.nixos-cosmic.nixosModules.default
#inputs.nixos-cosmic.nixosModules.default

../shared/configuration.nix
./configuration.nix
Expand Down
19 changes: 17 additions & 2 deletions hosts/shared/configuration.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, pkgs, inputs, lib, ... }: {
{ config, pkgs, lib, ... }: {

nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
Expand All @@ -16,6 +16,7 @@
];
trusted-users = [
"nixremote"
"@wheel"
];
};

Expand Down Expand Up @@ -53,6 +54,7 @@
'';

extraConfig = builtins.concatStringsSep "\n" [
# FIXME: this doesn't work actually, lol
## auto boot last choice
# save selection as default
"GRUB_SAVEDEFAULT=true"
Expand Down Expand Up @@ -143,7 +145,9 @@
xclip
zip
wireguard-tools
];
]
# adds PolicyKit rules
++ lib.optional config.services.desktopManager.plasma6.enable pkgs.kdePackages.kpmcore;

# WARN: polkit will error out with shells not listed here
shells = with pkgs; [ zsh bash nushell elvish ];
Expand All @@ -154,6 +158,13 @@
MOZ_USE_XINPUT2 = "1";
};

# HOME MANAGER DOCS:
# Note, if you use the NixOS module and have useUserPackages = true,
# make sure to add
pathsToLink = [ "/share/xdg-desktop-portal" "/share/applications" ];
# to your system configuration so that the portal definitions and DE
# provided configurations get linked.

plasma6.excludePackages = with pkgs.kdePackages; [
elisa
kate
Expand All @@ -175,6 +186,10 @@
enable = true;
flake = "/etc/nixos";
};

# Bitwarden system integration
## needs to be here to set up background services and stuff
goldwarden.enable = true;
};

security.pam.services.gtklock.text = lib.readFile "${pkgs.gtklock}/etc/pam.d/gtklock";
Expand Down
2 changes: 1 addition & 1 deletion hosts/twinkpad/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lib.nixosSystem {
inputs.home.nixosModules.home-manager
inputs.nixHW.nixosModules.lenovo-thinkpad-t460s
inputs.flatpaks.nixosModules.declarative-flatpak
inputs.nixos-cosmic.nixosModules.default
#inputs.nixos-cosmic.nixosModules.default

../shared/configuration.nix
./configuration.nix
Expand Down
26 changes: 26 additions & 0 deletions modules/desktop/gaming/emulation.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{ config, pkgs, lib, inputs, system, ... }:

with builtins;
with lib;
let cfg = config.modules.desktop.gaming.emulation;
in {
options.modules.desktop.gaming.emulation = {
enable = mkEnableOption "the emulation module";
switch = mkEnableOption "Nintendo Switch";
gamecube = mkEnableOption "Nintendo GameCube";
wii = mkEnableOption "Nintendo Wii";

primehack = mkEnableOption "Metroid Prime GCN/Wii mouse keyboard hack";
};

config = mkIf cfg.enable {

# some emulators support gamemode natively
modules.desktop.gaming.utils.gamemode = mkDefault true;

environment.systemPackages = []
++ optional cfg.switch pkgs.ryujinx
++ optional (cfg.gamecube || cfg.wii) pkgs.dolphin-emu
++ optional cfg.primehack pkgs.dolphin-emu-primehack;
};
}
35 changes: 14 additions & 21 deletions modules/desktop/gaming/steam.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,26 @@ in {
programs.steam = {
enable = true;

remotePlay.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
remotePlay.openFirewall = mkDefault true;
localNetworkGameTransfers.openFirewall = mkDefault true;

# wayland thing
# makes Steam Input and such behave better under Wayland
extest.enable = true;

protontricks.enable = true;
gamescopeSession.enable = true;
protontricks.enable = mkDefault true;
gamescopeSession.enable = mkDefault true;
};

programs.gamemode = {
enable = true;
enableRenice = true;
};

environment = {
sessionVariables.STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
modules.desktop.gaming.utils = {
protonup = mkDefault true;

systemPackages = with pkgs; [
protonup-qt

# helpful overlays and such
mangohud
vkbasalt
# a configurator for them
goverlay
];
# both gamemode and mangohud will have to be enabled manually per game
gamemode = mkDefault true;
overlays.mangohud = mkDefault true;
};

environment
.sessionVariables
.STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
};
}
Loading

0 comments on commit 6bf9e51

Please sign in to comment.