diff --git a/assets/wallpaper-clouds.png b/assets/wallpaper-clouds.png new file mode 100644 index 0000000..f7baeff Binary files /dev/null and b/assets/wallpaper-clouds.png differ diff --git a/assets/wallpaper-sword.jpg b/assets/wallpaper-sword.jpg new file mode 100644 index 0000000..b397d20 Binary files /dev/null and b/assets/wallpaper-sword.jpg differ diff --git a/container/agent-manager/default.nix b/container/agent-manager/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/container/agent-manager/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/container/authentik/default.nix b/container/authentik/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/container/authentik/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/container/dockge/default.nix b/container/dockge/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/container/dockge/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/container/emby/default.nix b/container/emby/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/container/emby/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/container/gitea/default.nix b/container/gitea/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/container/gitea/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/container/jellyseerr/default.nix b/container/jellyseerr/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/container/jellyseerr/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/container/lidarr/default.nix b/container/lidarr/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/container/lidarr/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/container/radarr/default.nix b/container/radarr/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/container/radarr/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/container/recyclarr/default.nix b/container/recyclarr/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/container/recyclarr/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/container/sabnzbd/default.nix b/container/sabnzbd/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/container/sabnzbd/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/container/sonarr/default.nix b/container/sonarr/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/container/sonarr/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/container/syncthing/default.nix b/container/syncthing/default.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/container/syncthing/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/dotfiles/kwinrulesrc b/dotfiles/kwinrulesrc new file mode 100644 index 0000000..01e690f --- /dev/null +++ b/dotfiles/kwinrulesrc @@ -0,0 +1,15 @@ +[2ade3df0-3c0b-4f75-bc22-ccfc46b21de9] +Description=Fenster-Einstellungen für vesktop +clientmachine=localhost +decocolor=BreezeDark +decocolorrule=2 +title=• Discord | #nixos | Nix/NixOS (unofficial) +types=1 +windowrole=browser-window +windowrolematch=1 +wmclass=vesktop +wmclassmatch=1 + +[General] +count=1 +rules=2ade3df0-3c0b-4f75-bc22-ccfc46b21de9 diff --git a/flake.nix b/flake.nix index 6df81f1..e8a1b1d 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,7 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; + nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1"; }; # Define Outputs, import Modules outputs = @@ -21,6 +22,7 @@ home-manager, jovian, plasma-manager, + nix-flatpak, ... }: let @@ -31,6 +33,7 @@ # NixOS Modules for all hosts systemModules = [ home-manager.nixosModules.home-manager + nix-flatpak.nixosModules.nix-flatpak ./modules/system/apps-shell ./modules/system/boot ./modules/system/devices @@ -39,7 +42,6 @@ ./modules/system/networking ./modules/system/nixsettings ./modules/system/shell - ./modules/system/syncthing ./modules/system/systemversion ./modules/system/upgrades ./modules/system/users @@ -48,6 +50,7 @@ userModules = [ ./modules/user/git ./modules/user/homeversion + ./modules/user/shell ]; in { @@ -77,9 +80,11 @@ ./modules/system/controller ./modules/system/jovian-${hostName} ./modules/system/lact - ./modules/system/sddm ./modules/system/plasma + ./modules/system/retrodeck ./modules/system/steam + ./modules/system/syncthing + ./modules/system/sddm { # Device specific Home Manager Modules home-manager.users.${user}.imports = userModules ++ [ @@ -117,7 +122,9 @@ ./modules/system/jovian-${hostName} ./modules/system/lact ./modules/system/plasma + ./modules/system/retrodeck ./modules/system/steam + ./modules/system/syncthing { # Device specific Home Manager Modules home-manager.users.${user}.imports = userModules ++ [ @@ -128,5 +135,74 @@ } ]; }; + + konsole = + let + user = "deck"; + hostName = "konsole"; + in + lib.nixosSystem { + specialArgs = { + inherit systemModules; + inherit userModules; + inherit system; + inherit user; + inherit hostName; + }; + system = system; + # Device specific NixOS Modules + modules = systemModules ++ [ + jovian.nixosModules.jovian + ./hosts/${hostName} + ./modules/system/apps-misc + ./modules/system/browser + ./modules/system/controller + ./modules/system/jovian-${hostName} + ./modules/system/lact + ./modules/system/plasma + ./modules/system/retrodeck + ./modules/system/steam + ./modules/system/syncthing + { + # Device specific Home Manager Modules + home-manager.users.${user}.imports = userModules ++ [ + ./modules/user/plasma + ]; + # Issue with Plasma Manager, has to be imported in a special way + home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ]; + } + ]; + }; + + server = + let + user = "administrator"; + hostName = "server"; + in + lib.nixosSystem { + specialArgs = { + inherit systemModules; + inherit userModules; + inherit system; + inherit user; + inherit hostName; + }; + system = system; + # Device specific NixOS Modules + modules = systemModules ++ [ + ./hosts/${hostName} + ./modules/docker + ./modules/system/syncthing + { + # Device specific Home Manager Modules + home-manager.users.${user}.imports = userModules ++ [ + ]; + # Issue with Plasma Manager, has to be imported in a special way + home-manager.sharedModules = []; + } + ]; + }; + + }; } diff --git a/hosts/konsole/default.nix b/hosts/konsole/default.nix new file mode 100644 index 0000000..2440752 --- /dev/null +++ b/hosts/konsole/default.nix @@ -0,0 +1,24 @@ +{ ... }: +{ + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + + fileSystems."/" = + { device = "/dev/disk/by-partlabel/root"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-partlabel/EFI"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ { + device = "/var/lib/swapfile"; + size = 16*1024; + }]; +} diff --git a/modules/system/apps-misc/default.nix b/modules/system/apps-misc/default.nix index 949a27a..d8e4348 100644 --- a/modules/system/apps-misc/default.nix +++ b/modules/system/apps-misc/default.nix @@ -3,7 +3,6 @@ environment.systemPackages = (with pkgs; [ ibm-plex - mangohud pciutils aha vesktop diff --git a/modules/system/docker/default.nix b/modules/system/docker/default.nix new file mode 100644 index 0000000..2f5d501 --- /dev/null +++ b/modules/system/docker/default.nix @@ -0,0 +1,8 @@ +{ user, ... }: +{ + virtualisation.docker.enable = true; + users.users.${user}.extraGroups = [ "docker" ]; + virtualisation.docker.daemon.settings = { + data-root = "/docker/data-root"; +}; +} diff --git a/modules/system/jovian-konsole/default.nix b/modules/system/jovian-konsole/default.nix new file mode 100644 index 0000000..d8ff2b1 --- /dev/null +++ b/modules/system/jovian-konsole/default.nix @@ -0,0 +1,14 @@ +{ user, ... }: +{ + jovian.steam = { + enable = true; + autoStart = true; + user = user; + desktopSession = "plasma"; + }; + jovian.decky-loader.enable = true; + jovian.decky-loader.user = user; + jovian.hardware.has.amd.gpu = true; + jovian.hardware.amd.gpu.enableEarlyModesetting = true; + jovian.steamos.enableBluetoothConfig = true; +} diff --git a/modules/system/retrodeck/default.nix b/modules/system/retrodeck/default.nix new file mode 100644 index 0000000..6c821d0 --- /dev/null +++ b/modules/system/retrodeck/default.nix @@ -0,0 +1,8 @@ +{ ... }: +{ + services.flatpak.enable = true; + services.flatpak.update.onActivation = true; + services.flatpak.packages = [ + { appId = "net.retrodeck.retrodeck"; origin = "flathub"; } + ]; +} diff --git a/modules/system/steam/default.nix b/modules/system/steam/default.nix index 39b1d7d..d301d70 100644 --- a/modules/system/steam/default.nix +++ b/modules/system/steam/default.nix @@ -1,12 +1,27 @@ { pkgs, ... }: { + + systemd.user.services.steam = { + enable = true; + description = "Open Steam in the background at boot"; + serviceConfig = { + ExecStart = "${pkgs.steam}/bin/steam -nochatui -nofriendsui -silent %U"; + wantedBy = [ "graphical-session.target" ]; + Restart = "on-failure"; + RestartSec = "5s"; + }; + }; + programs.steam = { enable = true; remotePlay.openFirewall = true; dedicatedServer.openFirewall = true; localNetworkGameTransfers.openFirewall = true; }; - environment.systemPackages = [ - pkgs.gamescope - ]; + environment.systemPackages = + (with pkgs; [ + gamescope + mangohud + protonup-qt + ]); } diff --git a/modules/system/upgrades/default.nix b/modules/system/upgrades/default.nix index e8a2585..1faa22f 100644 --- a/modules/system/upgrades/default.nix +++ b/modules/system/upgrades/default.nix @@ -1,11 +1,11 @@ -{ ... }: +{ hostName, ... }: { system.autoUpgrade = { enable = true; dates = "04:00"; - flake = "github:Moe1369/nixos-config"; + flake = "github:Moe1369/nixos-config#${hostName}"; flags = [ - "--update-input" "nixpkgs" "--commit-lock-file" + "--update-input" "nixpkgs" "-L" "--commit-lock-file" ]; allowReboot = true; }; diff --git a/modules/user/plasma/default.nix b/modules/user/plasma/default.nix index be9d688..11de2aa 100644 --- a/modules/user/plasma/default.nix +++ b/modules/user/plasma/default.nix @@ -1,17 +1,23 @@ { user, ... }: { + # Configuration Files home.file."Code/.directory".source = ../../../dotfiles/directory; home.file.".config/haruna/haruna.conf".source = ../../../dotfiles/haruna.conf; home.file.".local/share/color-schemes/BreezeDunkelFarbe.colors".source = ../../../dotfiles/BreezeDunkelFarbe.colors; home.file.".local/share/color-schemes/BreezeHellFarbe.colors".source = ../../../dotfiles/BreezeHellFarbe.colors; home.file.".config/kglobalshortcutsrc".source = ../../../dotfiles/kglobalshortcutsrc; + home.file.".config/kwinrulesrc".source = ../../../dotfiles/kwinrulesrc; + home.file.".config/kwinrc".source = ../../../dotfiles/kwinrc; + home.file.".local/share/user-places.xbel".source = ../../../dotfiles/user-places.xbel; + + # Wallpaper home.file."Bilder/Wallpaper/wallpaper-nix.png".source = ../../../assets/wallpaper-nix.png; home.file."Bilder/Wallpaper/wallpaper-asia.jpg".source = ../../../assets/wallpaper-asia.jpg; home.file."Bilder/Wallpaper/wallpaper-kame.jpg".source = ../../../assets/wallpaper-kame.jpg; home.file."Bilder/Wallpaper/wallpaper-retrogirl.png".source = ../../../assets/wallpaper-retrogirl.png; - home.file.".config/kwinrc".source = ../../../dotfiles/kwinrc; - home.file.".local/share/user-places.xbel".source = ../../../dotfiles/user-places.xbel; - home.file.".zshrc".source = ../../../dotfiles/zshrc; + home.file."Bilder/Wallpaper/wallpaper-sword.jpg".source = ../../../assets/wallpaper-sword.jpg; + home.file."Bilder/Wallpaper/wallpaper-clouds.png".source = ../../../assets/wallpaper-clouds.png; + programs.plasma = { @@ -19,7 +25,6 @@ enable = true; workspace.wallpaperSlideShow.path = /home/mo/Bilder/Wallpaper; workspace.wallpaperSlideShow.interval = 864000; - #workspace.wallpaper = "/home/mo/Bilder/Wallpaper/wallpaper-nix.png"; kscreenlocker.appearance.wallpaper = "/home/mo/Bilder/Wallpaper/wallpaper-nix.png"; kwin.titlebarButtons.left = ["keep-above-windows"]; diff --git a/modules/user/shell/default.nix b/modules/user/shell/default.nix new file mode 100644 index 0000000..fb3e8c6 --- /dev/null +++ b/modules/user/shell/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + home.file.".zshrc".source = ../../../dotfiles/zshrc; +}