Compare commits

..

4 commits

Author SHA1 Message Date
2d0fcbe30a
Remove sunshine.nix
it is now part of nixpkgs
2024-05-04 14:32:49 -04:00
c8229f6f26
Revert 606c39a1: Update flake.lock 2024-05-04 14:32:16 -04:00
606c39a17a
Update flake.lock
Flake lock file updates:

• Updated input 'agenix':
    'github:ryantm/agenix/1381a759b205dff7a6818733118d02253340fd5e' (2024-04-02)
  → 'github:ryantm/agenix/24a7ea390564ccd5b39b7884f597cfc8d7f6f44e' (2024-04-26)
• Updated input 'home-manager':
    'github:nix-community/home-manager/057117a401a34259c9615ce62218aea7afdee4d3' (2024-04-19)
  → 'github:nix-community/home-manager/9036fe9ef8e15a819fa76f47a8b1f287903fb848' (2024-05-02)
• Updated input 'hyprland':
    'github:hyprwm/Hyprland/4ad739ec63c9a11f0537a884ae2a4c56d6bab10b' (2024-04-20)
  → 'github:hyprwm/Hyprland/25964e5a2b633aed191915efa0de0489bf94dbb9' (2024-05-04)
• Updated input 'hyprland/hyprcursor':
    'github:hyprwm/hyprcursor/0a53b9957f0b17f1a0036b25198f569969ad43a0' (2024-04-15)
  → 'github:hyprwm/hyprcursor/cab4746180f210a3c1dd3d53e45c510e309e90e1' (2024-04-20)
• Updated input 'hyprland/hyprwayland-scanner':
    'github:hyprwm/hyprwayland-scanner/f58a3f56e89857dc7ab7166cff2f971345026634' (2024-04-20)
  → 'github:hyprwm/hyprwayland-scanner/1270ebaa539e56d61b708c24b072b09cbbd3a828' (2024-05-03)
• Updated input 'hyprland/wlroots':
    'github:hyprwm/wlroots-hyprland/611a4f24cd2384378f6e500253983107c6656c64' (2024-04-14)
  → 'github:hyprwm/wlroots-hyprland/5c1d51c5a2793480f5b6c4341ad0797052aec2ea' (2024-04-21)
• Updated input 'hyprland/xdph':
    'github:hyprwm/xdg-desktop-portal-hyprland/bb44921534a9cee9635304fdb876c1b3ec3a8f61' (2024-04-15)
  → 'github:hyprwm/xdg-desktop-portal-hyprland/0fe840441e43da12cd7865ed9aa8cdc35a8da85a' (2024-04-25)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/5c24cf2f0a12ad855f444c30b2421d044120c66f' (2024-04-19)
  → 'github:NixOS/nixpkgs/63c3a29ca82437c87573e4c6919b09a24ea61b0f' (2024-05-02)
2024-05-04 08:33:56 -04:00
e3b72e8e35
add nh 2024-05-04 08:33:43 -04:00
4 changed files with 16 additions and 57 deletions

View file

@ -106,7 +106,7 @@
nix.settings.auto-optimise-store = true;
system.autoUpgrade.enable = false;
nix.gc = {
automatic = true;
automatic = false;
dates = "weekly";
options = "--delete-older-than 10d";
};
@ -226,6 +226,12 @@
];
};
programs.nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 10d --keep 5";
flake = "/home/insert/Documents/nixos";
};
services.rpcbind.enable = true; # needed for NFS
systemd.mounts = [{

View file

@ -170,9 +170,9 @@
programs.zsh = {
enable = true;
shellAliases = {
update = "sudo nixos-rebuild switch --flake /home/insert/Documents/nixos# -v --impure --upgrade --option commit-lockfile-summary 'Update flake.lock' --commit-lock-file";
update-locked = "sudo nixos-rebuild switch --flake /home/insert/Documents/nixos# -v --impure";
update-boot = "sudo nixos-rebuild boot --flake /home/insert/Documents/nixos# -v --impure";
update = "nh os switch -a /home/insert/Documents/nixos -- --impure --option commit-lockfile-summary 'Update flake.lock' --commit-lock-file";
update-locked = "nh os switch -a /home/insert/Documents/nixos -- --impure";
update-boot = "nh os boot -a /home/insert/Documents/nixos -- --impure";
garbage = "nix-collect-garbage";
};
initExtra = ''

View file

@ -1,7 +1,6 @@
{ inputs, config, lib, pkgs, ... }:
{
environment.etc.nixpkgs.source = inputs.nixpkgs;
imports = [ ./sunshine.nix ];
networking.hostName = "insertpclinux";
services.xserver.videoDrivers = ["nvidia"];
#nixpkgs.overlays = [ (self: super: (let
@ -14,6 +13,12 @@
# })) ];
#boot.kernelPackages = pkgs.linuxPackages;
services.sunshine = {
enable = true;
autoStart = true;
capSysAdmin = true;
};
hardware.nvidia = {
# Modesetting is needed most of the time
@ -41,7 +46,6 @@
};
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
services.sunshine.enable = true;
security.pki.certificateFiles = [
/home/insert/Documents/nextcloud/nextcloudinternal.pem
/home/insert/Documents/personal-vaultwarden/cert.pem

View file

@ -1,51 +0,0 @@
{ config, lib, pkgs, ... }:
#source: https://github.com/RandomNinjaAtk/nixos/blob/d2480c148e882f49e5caa6267060fd2d9e10af9b/services.sunshine.nix
#https://discourse.nixos.org/t/sunshine-self-hosted-game-stream/25608/16
with lib;
let
cfg = config.services.sunshine;
in
{
options = {
services.sunshine = {
enable = mkEnableOption (mdDoc "Sunshine");
};
};
config = mkIf config.services.sunshine.enable {
environment.systemPackages = [
pkgs.sunshine
];
security.wrappers.sunshine = {
owner = "root";
group = "root";
capabilities = "cap_sys_admin+p";
source = "${pkgs.sunshine}/bin/sunshine";
};
# Requires to simulate input
boot.kernelModules = [ "uinput" ];
services.udev.extraRules = ''
KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"
'';
systemd.user.services.sunshine =
{
description = "sunshine";
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${config.security.wrapperDir}/sunshine";
};
};
};
}