From aa22049e91b7d6c63da743c8108fd672548ade0e Mon Sep 17 00:00:00 2001 From: BuyMyMojo Date: Tue, 25 Mar 2025 10:18:01 +1100 Subject: [PATCH 1/4] Move services into their own file and enbale syncthing --- nixos/configuration.nix | 56 ++--------------------------- nixos/flake.nix | 1 + nixos/services.nix | 80 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+), 54 deletions(-) create mode 100644 nixos/services.nix diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 407cd7e..4534b62 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -26,10 +26,7 @@ inputs.ucodenix.nixosModules.default ]; - services.ucodenix = { - enable = true; - cpuModelId = "00A20F12"; # AMD 5900X - }; + # Use the latest linux Kernel boot.kernelPackages = pkgs.linuxPackages_latest; @@ -266,16 +263,7 @@ # List services that you want to enable: # Enable the OpenSSH daemon. - services.openssh.enable = true; - services.flatpak.enable = true; - services.pcscd.enable = true; - - services.sunshine = { - enable = true; - autoStart = true; - capSysAdmin = true; - openFirewall = true; - }; + virtualisation.docker.enable = true; virtualisation.docker.storageDriver = "btrfs"; @@ -290,46 +278,6 @@ # Or disable the firewall altogether. networking.firewall.enable = false; - # services.blocky = { - # enable = true; - # settings = { - # ports.dns = 53; # Port for incoming DNS Queries. - # upstreams.groups.default = [ - # "https://one.one.one.one/dns-query" # Using Cloudflare's DNS over HTTPS server for resolving queries. - # ]; - # # For initially solving DoH/DoT Requests when no system Resolver is available. - # bootstrapDns = { - # upstream = "https://one.one.one.one/dns-query"; - # ips = [ "1.1.1.1" "1.0.0.1" ]; - # }; - # #Enable Blocking of certian domains. - # blocking = { - # blackLists = { - # #Adblocking - # ads = [ - # "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" - # "https://adaway.org/hosts.txt" - # "https://v.firebog.net/hosts/AdguardDNS.txt" - # ]; - # #Another filter for blocking adult sites - # adult = ["https://blocklistproject.github.io/Lists/porn.txt"]; - # #You can add additional categories - # }; - # #Configure what block categories are used - # clientGroupsBlock = { - # default = [ "ads" ]; - # # kids-ipad = ["ads" "adult"]; - # }; - # }; - # customDNS = { - # customTTL = "1h"; - # mapping = { - # "upload.aria.coffee" = "192.168.20.2"; - # }; - # }; - # }; - # }; - networking.hosts = { "192.168.20.2" = [ "upload.aria.coffee" diff --git a/nixos/flake.nix b/nixos/flake.nix index 82b32df..d2ba3cb 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -34,6 +34,7 @@ }; modules = [ ./configuration.nix + ./services.nix ]; }; diff --git a/nixos/services.nix b/nixos/services.nix new file mode 100644 index 0000000..0b63e16 --- /dev/null +++ b/nixos/services.nix @@ -0,0 +1,80 @@ +{ + config, + pkgs, + unstable, + inputs, + ... +}: + +{ + + services = { + openssh.enable = true; + flatpak.enable = true; + pcscd.enable = true; + + sunshine = { + enable = true; + autoStart = true; + capSysAdmin = true; + openFirewall = true; + }; + + ucodenix = { + enable = true; + # cpuModelId = "00A20F12"; # AMD 5900X + }; + + syncthing = { + enable = true; + group = "BuyMyAria"; + user = "BuyMyAria"; + dataDir = "/home/myusername/Documents/Syncthing"; # Default folder for new synced folders + configDir = "/home/myusername/Documents/.config/syncthing"; # Folder for Syncthing's settings and keys + }; + + + + + # services.blocky = { + # enable = true; + # settings = { + # ports.dns = 53; # Port for incoming DNS Queries. + # upstreams.groups.default = [ + # "https://one.one.one.one/dns-query" # Using Cloudflare's DNS over HTTPS server for resolving queries. + # ]; + # # For initially solving DoH/DoT Requests when no system Resolver is available. + # bootstrapDns = { + # upstream = "https://one.one.one.one/dns-query"; + # ips = [ "1.1.1.1" "1.0.0.1" ]; + # }; + # #Enable Blocking of certian domains. + # blocking = { + # blackLists = { + # #Adblocking + # ads = [ + # "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" + # "https://adaway.org/hosts.txt" + # "https://v.firebog.net/hosts/AdguardDNS.txt" + # ]; + # #Another filter for blocking adult sites + # adult = ["https://blocklistproject.github.io/Lists/porn.txt"]; + # #You can add additional categories + # }; + # #Configure what block categories are used + # clientGroupsBlock = { + # default = [ "ads" ]; + # # kids-ipad = ["ads" "adult"]; + # }; + # }; + # customDNS = { + # customTTL = "1h"; + # mapping = { + # "upload.aria.coffee" = "192.168.20.2"; + # }; + # }; + # }; + # }; + }; + +} From 0922964b5ff600209680d0a1a9a8db34bc77a554 Mon Sep 17 00:00:00 2001 From: BuyMyMojo Date: Tue, 25 Mar 2025 10:20:58 +1100 Subject: [PATCH 2/4] Fix syncthing path lol --- nixos/services.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/services.nix b/nixos/services.nix index 0b63e16..5416d1d 100644 --- a/nixos/services.nix +++ b/nixos/services.nix @@ -29,8 +29,8 @@ enable = true; group = "BuyMyAria"; user = "BuyMyAria"; - dataDir = "/home/myusername/Documents/Syncthing"; # Default folder for new synced folders - configDir = "/home/myusername/Documents/.config/syncthing"; # Folder for Syncthing's settings and keys + dataDir = "/home/buymymojo/Documents/Syncthing"; # Default folder for new synced folders + configDir = "/home/buymymojo/Documents/.config/syncthing"; # Folder for Syncthing's settings and keys }; From f71ecde53c2c6653e27bcd953409f6bbae1341eb Mon Sep 17 00:00:00 2001 From: BuyMyMojo Date: Tue, 25 Mar 2025 22:36:57 +1100 Subject: [PATCH 3/4] Fix syncthing useer and group --- nixos/services.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/services.nix b/nixos/services.nix index 5416d1d..8a43595 100644 --- a/nixos/services.nix +++ b/nixos/services.nix @@ -27,8 +27,8 @@ syncthing = { enable = true; - group = "BuyMyAria"; - user = "BuyMyAria"; + group = "users"; + user = "buymymojo"; dataDir = "/home/buymymojo/Documents/Syncthing"; # Default folder for new synced folders configDir = "/home/buymymojo/Documents/.config/syncthing"; # Folder for Syncthing's settings and keys }; From b1ed19a6db93527054160c2cebe010f53086d79b Mon Sep 17 00:00:00 2001 From: BuyMyMojo Date: Tue, 25 Mar 2025 22:37:31 +1100 Subject: [PATCH 4/4] Add unrar for rar support in ark & ser mangohud to globally on --- nixos/configuration.nix | 4 ++++ nixos/hardware-configuration.nix | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 4534b62..377e55c 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -181,6 +181,7 @@ fzf nixfmt-rfc-style dwarfs + unrar wineWowPackages.stable winetricks @@ -307,7 +308,10 @@ environment.sessionVariables = { # === Prefer RADV driver === AMD_VULKAN_ICD = "RADV"; + FLAKE = "/home/buymymojo/etc/nixos/"; + + MANGOHUD = "1"; }; # This value determines the NixOS release from which the default diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix index 1f5bad1..722bfb9 100644 --- a/nixos/hardware-configuration.nix +++ b/nixos/hardware-configuration.nix @@ -194,7 +194,7 @@ graphics = { enable = true; enable32Bit = true; - + # === amdvlk driver === extraPackages = with pkgs; [ amdvlk