Compare commits

..

No commits in common. "eba2ffcdcd98efb3c0af64a475b7302f5002b135" and "370e2e29ffaa761a83183a7d65b375bdf857f0c6" have entirely different histories.

11 changed files with 103 additions and 208 deletions

35
flake.lock generated
View File

@ -191,19 +191,20 @@
}, },
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1736373539, "lastModified": 1736066484,
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=", "narHash": "sha256-uTstP36WaFrw+TEHb8nLF14hFPzQBOhmIxzioHCDaL8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56", "rev": "5ad12b6ea06b84e48f6b677957c74f32d47bdee0",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-24.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -249,35 +250,19 @@
"locked": { "locked": {
"lastModified": 1736200483, "lastModified": 1736200483,
"narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=", "narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751", "rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nixos",
"ref": "nixos-24.11", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "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": { "locked": {
"lastModified": 1735648875, "lastModified": 1735648875,
"narHash": "sha256-fQ4k/hyQiH9RRPznztsA9kbcDajvwV1sRm01el6Sr3c=", "narHash": "sha256-fQ4k/hyQiH9RRPznztsA9kbcDajvwV1sRm01el6Sr3c=",
@ -297,7 +282,7 @@
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs",
"stylix": "stylix" "stylix": "stylix"
} }
}, },
@ -312,7 +297,7 @@
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"gnome-shell": "gnome-shell", "gnome-shell": "gnome-shell",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_2",
"systems": "systems", "systems": "systems",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",

View File

@ -5,7 +5,11 @@
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
stylix.url = "github:danth/stylix"; stylix.url = "github:danth/stylix";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; 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 = { 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 { server = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;}; specialArgs = {inherit inputs;};
modules = [ modules = [

View File

@ -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. Its 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?
}

View File

@ -1 +0,0 @@
##TODO

View File

@ -1,9 +0,0 @@
{
config,
pkgs,
inputs,
...
}: {
imports = [../home/home_common.nix];
home = {packages = with pkgs; [steam wivrn opencomposite neovim];};
}

View File

@ -8,6 +8,7 @@
username = "k"; username = "k";
homeDirectory = "/home/k"; homeDirectory = "/home/k";
stateVersion = "23.11"; stateVersion = "23.11";
enableNixpkgsReleaseCheck = false;
}; };
programs = { programs = {
git = { git = {

View File

@ -5,19 +5,7 @@
... ...
}: { }: {
imports = [./waybar.nix ./tile.nix]; imports = [./waybar.nix ./tile.nix];
home.packages = with pkgs; [ programs = {hyprlock = {enable=true;};};
hyprlock
hyprpaper
iio-hyprland
batsignal
jq #iio-hyprland needs this
];
services = {
hypridle.enable=true;
hyprpaper.enable=true;
};
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
systemd.variables = ["--all"]; systemd.variables = ["--all"];
@ -25,8 +13,8 @@
settings = { settings = {
exec-once = [ exec-once = [
"${pkgs.hyprpaper}/bin/hyprpaper"
"${pkgs.iio-hyprland}/bin/iio-hyprland" "${pkgs.iio-hyprland}/bin/iio-hyprland"
"${pkgs.batsignal}/bin/batsignal -n BAT0 -b"
]; ];
monitor = "eDP-1,preferred,auto,1"; monitor = "eDP-1,preferred,auto,1";
general = { general = {

View File

@ -65,17 +65,14 @@
enable = true; enable = true;
package = pkgs.ollama-intel; package = pkgs.ollama-intel;
}; };
auto-cpufreq = { tlp = {
enable = true; enable = true;
settings = { settings = {
battery = { CPU_SCALING_GOVERNOR_ON_AC = "performance";
governor = "powersave"; CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
turbo = "never";
}; CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
charger = { CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
governor = "balance_performance";
turbo = "auto";
};
}; };
}; };
logind = { logind = {
@ -120,6 +117,11 @@
package = pkgs.nerdfonts; package = pkgs.nerdfonts;
name = "Iosevka NFM"; name = "Iosevka NFM";
}; };
# emoji = {
# package = pkgs.notofonts;
# name = "Noto Color Emoji";
# };
}; };
}; };

View File

@ -5,9 +5,10 @@
... ...
}: { }: {
imports = [./hardware-configuration.nix ./service.nix]; imports = [./hardware-configuration.nix ./service.nix];
powerManagement.enable = true; powerManagement.enable = false;
system.autoUpgrade.enable = true; system.autoUpgrade.enable = true;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
boot.kernelParams = ["intel_pstate=active"];
nix = { nix = {
gc.automatic = true; gc.automatic = true;
@ -17,17 +18,13 @@
trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="]; trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="];
}; };
}; };
nixpkgs.config.allowUnfree = true;
nixpkgs.config = {
allowUnfree = true;
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
programs = { programs = {
nix-ld.enable = true;
nix-ld.libraries = with pkgs; [glibc glib];
zsh.enable = true; zsh.enable = true;
neovim.enable = true;
}; };
users = { users = {
motd = "Welcome to the Server"; motd = "Welcome to the Server";
defaultUserShell = pkgs.zsh; defaultUserShell = pkgs.zsh;
@ -59,15 +56,17 @@
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
intel-compute-runtime
intel-media-driver intel-media-driver
intel-vaapi-driver vaapiIntel
vaapiVdpau vaapiVdpau
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in) libvdpau-va-gl
vpl-gpu-rt # QSV on 11th gen or newer vpl-gpu-rt
intel-media-sdk # QSV up to 11th gen
]; ];
}; };
services.xserver.videoDrivers = ["intel"];
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave # on your system were taken. Its perfectly fine and recommended to leave

View File

@ -5,5 +5,5 @@
... ...
}: { }: {
imports = [../home/home_common.nix]; imports = [../home/home_common.nix];
home = {packages = with pkgs; [docker docker-compose neovim];}; home = {packages = with pkgs; [docker docker-compose];};
} }

View File

@ -5,8 +5,8 @@
}: { }: {
networking.firewall = { networking.firewall = {
enable = true; enable = true;
allowedTCPPorts = [80 443 22]; allowedTCPPorts = [80 443 22 26615 25565 24454 8080 53];
allowedUDPPorts = []; allowedUDPPorts = [26615 25565 24454 8080 53];
}; };
security.acme = { security.acme = {
@ -37,6 +37,46 @@
package = pkgs.ollama-intel; 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 = { gitea = {
enable = true; enable = true;
settings = { settings = {
@ -74,7 +114,7 @@
http = { http = {
use_x_forwarded_for = "true"; use_x_forwarded_for = "true";
trusted_proxies = ["127.0.0.1"]; trusted_proxies = ["127.0.0.1"];
server_port = 8002; server_port = 8003;
}; };
}; };
}; };
@ -95,7 +135,7 @@
searx = { searx = {
enable = true; enable = true;
settings = { settings = {
server.port = 8003; server.port = 8005;
server.secret_key = "secretlol"; server.secret_key = "secretlol";
search.formats = ["html" "json"]; 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" = { "srx.dhilton.xyz" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8005";
proxyWebsockets = true;
};
};
"hom.dhilton.xyz" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/" = { 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" = { "nix.dhilton.xyz" = {
locations."/".proxyPass = "http://127.0.0.1:5000"; locations."/".proxyPass = "http://127.0.0.1:5000";
}; };