diff --git a/flake.lock b/flake.lock index 4fe5a78..df8d4de 100644 --- a/flake.lock +++ b/flake.lock @@ -191,19 +191,20 @@ }, "home-manager": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1736373539, - "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=", + "lastModified": 1736066484, + "narHash": "sha256-uTstP36WaFrw+TEHb8nLF14hFPzQBOhmIxzioHCDaL8=", "owner": "nix-community", "repo": "home-manager", - "rev": "bd65bc3cde04c16755955630b344bc9e35272c56", + "rev": "5ad12b6ea06b84e48f6b677957c74f32d47bdee0", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.11", "repo": "home-manager", "type": "github" } @@ -249,35 +250,19 @@ "locked": { "lastModified": 1736200483, "narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=", - "owner": "NixOS", + "owner": "nixos", "repo": "nixpkgs", "rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_2": { - "locked": { - "lastModified": 1736200483, - "narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1735648875, "narHash": "sha256-fQ4k/hyQiH9RRPznztsA9kbcDajvwV1sRm01el6Sr3c=", @@ -297,7 +282,7 @@ "inputs": { "home-manager": "home-manager", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "stylix": "stylix" } }, @@ -312,7 +297,7 @@ "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "systems": "systems", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", diff --git a/flake.nix b/flake.nix index 42694a5..a653dfc 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,11 @@ nixos-hardware.url = "github:NixOS/nixos-hardware/master"; stylix.url = "github:danth/stylix"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; - home-manager.url = "github:nix-community/home-manager/release-24.11"; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { @@ -30,15 +34,6 @@ ]; }; - desktop = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - modules = [ - ./hosts/desktop/configuration.nix - inputs.home-manager.nixosModules.default - inputs.stylix.nixosModules.stylix - ]; - }; - server = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs;}; modules = [ diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix deleted file mode 100644 index 420750c..0000000 --- a/hosts/desktop/configuration.nix +++ /dev/null @@ -1,114 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). -{ - config, - pkgs, - inputs, - nixos-hardware, - ... -}: { - imports = [./hardware-configuration.nix]; - hardware.steam-hardware.enable = true; - - networking = { - hostName = "desktop"; - networkmanager.enable = true; - firewall.enable = false; - }; - - nix = { - gc.automatic = true; - settings = { - experimental-features = ["nix-command" "flakes"]; - substituters = ["http://nix.dhilton.xyz/" "https://cache.nixos.org/"]; - trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="]; - }; - }; - - services = { - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - }; - wivrn = { - enable = true; - defaultRuntime = true; - }; - xserver.enable = true; - displayManager.sddm.enable = true; - desktopManager.plasma6.enable = true; - }; - - stylix = { - enable = true; - autoEnable = true; - polarity = "dark"; - image = ./wallpaper.png; - base16Scheme = "${pkgs.base16-schemes}/share/themes/everforest.yaml"; - opacity = { - terminal = 0.85; - popups = 0.75; - desktop = 0.75; - }; - cursor = { - package = pkgs.adwaita-icon-theme; - name = "Adwaita"; - size = 28; - }; - fonts = { - serif = { - package = pkgs.nerdfonts; - name = "Iosevka NF"; - }; - - sansSerif = { - package = pkgs.nerdfonts; - name = "Iosevka NF"; - }; - - monospace = { - package = pkgs.nerdfonts; - name = "Iosevka NFM"; - }; - }; - }; - - i18n = { - defaultLocale = "en_US.UTF-8"; - extraLocaleSettings = { - LC_ADDRESS = "en_US.UTF-8"; - LC_IDENTIFICATION = "en_US.UTF-8"; - LC_MEASUREMENT = "en_US.UTF-8"; - LC_MONETARY = "en_US.UTF-8"; - LC_NAME = "en_US.UTF-8"; - LC_NUMERIC = "en_US.UTF-8"; - LC_PAPER = "en_US.UTF-8"; - LC_TELEPHONE = "en_US.UTF-8"; - LC_TIME = "en_US.UTF-8"; - }; - }; - - hardware = { - graphics.enable32Bit = true; - }; - - programs = { - zsh.enable = true; - wivrn.enable = true; - opencomposite.enable = true; - steam.enable = true; - gamescope.enable = true; - } - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "23.11"; # Did you read the comment? -} diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix deleted file mode 100644 index 0d0787f..0000000 --- a/hosts/desktop/hardware-configuration.nix +++ /dev/null @@ -1 +0,0 @@ -##TODO diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix deleted file mode 100644 index a15c042..0000000 --- a/hosts/desktop/home.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - config, - pkgs, - inputs, - ... -}: { - imports = [../home/home_common.nix]; - home = {packages = with pkgs; [steam wivrn opencomposite neovim];}; -} diff --git a/hosts/home/home_common.nix b/hosts/home/home_common.nix index e13b2e3..e0707b3 100644 --- a/hosts/home/home_common.nix +++ b/hosts/home/home_common.nix @@ -8,6 +8,7 @@ username = "k"; homeDirectory = "/home/k"; stateVersion = "23.11"; + enableNixpkgsReleaseCheck = false; }; programs = { git = { diff --git a/hosts/home/hyprland.nix b/hosts/home/hyprland.nix index abec126..06ab1cc 100644 --- a/hosts/home/hyprland.nix +++ b/hosts/home/hyprland.nix @@ -5,19 +5,7 @@ ... }: { imports = [./waybar.nix ./tile.nix]; - home.packages = with pkgs; [ - hyprlock - hyprpaper - iio-hyprland - batsignal - jq #iio-hyprland needs this - ]; - - services = { - hypridle.enable=true; - hyprpaper.enable=true; - }; - + programs = {hyprlock = {enable=true;};}; wayland.windowManager.hyprland = { enable = true; systemd.variables = ["--all"]; @@ -25,8 +13,8 @@ settings = { exec-once = [ + "${pkgs.hyprpaper}/bin/hyprpaper" "${pkgs.iio-hyprland}/bin/iio-hyprland" - "${pkgs.batsignal}/bin/batsignal -n BAT0 -b" ]; monitor = "eDP-1,preferred,auto,1"; general = { diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 5102a91..78c556f 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -65,17 +65,14 @@ enable = true; package = pkgs.ollama-intel; }; - auto-cpufreq = { + tlp = { enable = true; settings = { - battery = { - governor = "powersave"; - turbo = "never"; - }; - charger = { - governor = "balance_performance"; - turbo = "auto"; - }; + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; }; }; logind = { @@ -120,6 +117,11 @@ package = pkgs.nerdfonts; name = "Iosevka NFM"; }; + + # emoji = { + # package = pkgs.notofonts; + # name = "Noto Color Emoji"; + # }; }; }; diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 5b666ef..7bf6192 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -5,9 +5,10 @@ ... }: { imports = [./hardware-configuration.nix ./service.nix]; - powerManagement.enable = true; + powerManagement.enable = false; system.autoUpgrade.enable = true; networking.networkmanager.enable = true; + boot.kernelParams = ["intel_pstate=active"]; nix = { gc.automatic = true; @@ -17,17 +18,13 @@ trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="]; }; }; - - nixpkgs.config = { - allowUnfree = true; - vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; - }; + nixpkgs.config.allowUnfree = true; programs = { + nix-ld.enable = true; + nix-ld.libraries = with pkgs; [glibc glib]; zsh.enable = true; - neovim.enable = true; }; - users = { motd = "Welcome to the Server"; defaultUserShell = pkgs.zsh; @@ -59,15 +56,17 @@ hardware.graphics = { enable = true; extraPackages = with pkgs; [ + intel-compute-runtime intel-media-driver - intel-vaapi-driver + vaapiIntel vaapiVdpau - intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in) - vpl-gpu-rt # QSV on 11th gen or newer - intel-media-sdk # QSV up to 11th gen + libvdpau-va-gl + vpl-gpu-rt ]; }; + services.xserver.videoDrivers = ["intel"]; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/hosts/server/home.nix b/hosts/server/home.nix index 3b1a21b..22dc964 100644 --- a/hosts/server/home.nix +++ b/hosts/server/home.nix @@ -5,5 +5,5 @@ ... }: { imports = [../home/home_common.nix]; - home = {packages = with pkgs; [docker docker-compose neovim];}; + home = {packages = with pkgs; [docker docker-compose];}; } diff --git a/hosts/server/service.nix b/hosts/server/service.nix index 55fc65c..b9354a4 100644 --- a/hosts/server/service.nix +++ b/hosts/server/service.nix @@ -5,8 +5,8 @@ }: { networking.firewall = { enable = true; - allowedTCPPorts = [80 443 22]; - allowedUDPPorts = []; + allowedTCPPorts = [80 443 22 26615 25565 24454 8080 53]; + allowedUDPPorts = [26615 25565 24454 8080 53]; }; security.acme = { @@ -37,6 +37,46 @@ package = pkgs.ollama-intel; }; + crab-hole = { + enable = true; + settings = { + api = { + listen = "192.168.0.2"; + port = 8080; + show_doc = true; + }; + downstream = [ + { + listen = "192.168.0.2"; + port = 53; + protocol = "udp"; + } + ]; + upstream = { + name_servers = [ + { + protocol = "tls"; + socket_addr = "[2606:4700:4700::1111]:853"; + tls_dns_name = "1dot1dot1dot1.cloudflare-dns.com"; + trust_nx_responses = false; + } + { + protocol = "tls"; + socket_addr = "1.1.1.1:853"; + tls_dns_name = "1dot1dot1dot1.cloudflare-dns.com"; + trust_nx_responses = false; + } + ]; + }; + blocklist.lists = [ + "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" + "https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt" + "https://raw.githubusercontent.com/anudeepND/blacklist/master/CoinMiner.txt" + "https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt" + ]; + }; + }; + gitea = { enable = true; settings = { @@ -74,7 +114,7 @@ http = { use_x_forwarded_for = "true"; trusted_proxies = ["127.0.0.1"]; - server_port = 8002; + server_port = 8003; }; }; }; @@ -95,7 +135,7 @@ searx = { enable = true; settings = { - server.port = 8003; + server.port = 8005; server.secret_key = "secretlol"; search.formats = ["html" "json"]; }; @@ -151,16 +191,16 @@ }; }; - "hom.dhilton.xyz" = { - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://127.0.0.1:8002"; - proxyWebsockets = true; - }; - }; - "srx.dhilton.xyz" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://127.0.0.1:8005"; + proxyWebsockets = true; + }; + }; + + "hom.dhilton.xyz" = { forceSSL = true; enableACME = true; locations."/" = { @@ -169,6 +209,15 @@ }; }; + "map.dhilton.xyz" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://127.0.0.1:8100"; + proxyWebsockets = true; + }; + }; + "nix.dhilton.xyz" = { locations."/".proxyPass = "http://127.0.0.1:5000"; };