diff --git a/configuration.nix b/configuration.nix index 52de179..ca0d6e4 100644 --- a/configuration.nix +++ b/configuration.nix @@ -28,6 +28,32 @@ in ./nginx.nix ]; + # stylix configs + stylix.enable = true; + stylix.image = ./wallpaper.png; + stylix.polarity = "dark"; + stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml"; + stylix.fonts = { + serif = { + package = pkgs.dejavu_fonts; + name = "DejaVu Serif"; + }; + + sansSerif = { + package = pkgs.dejavu_fonts; + name = "DejaVu Sans"; + }; + + monospace = { + package = pkgs.mononoki; + name = "mononoki"; + }; + + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; nix.settings.trusted-users = [ "root" "liu" ]; virtualisation.docker.enable = true; nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -218,27 +244,27 @@ in # Enable the OpenSSH daemon. services.openssh.enable = true; - services.kubernetes = { - roles = ["master" "node"]; - masterAddress = kubeMasterHostname; - apiserverAddress = "https://${kubeMasterHostname}:${toString kubeMasterAPIServerPort}"; - apiserver = { - securePort = kubeMasterAPIServerPort; - advertiseAddress = kubeMasterIP; - allowPrivileged = true; - extraOpts = "--service-node-port-range=20000-40000"; - }; - easyCerts = true; + # services.kubernetes = { + # roles = ["master" "node"]; + # masterAddress = kubeMasterHostname; + # apiserverAddress = "https://${kubeMasterHostname}:${toString kubeMasterAPIServerPort}"; + # apiserver = { + # securePort = kubeMasterAPIServerPort; + # advertiseAddress = kubeMasterIP; + # allowPrivileged = true; + # extraOpts = "--service-node-port-range=20000-40000"; + # }; + # easyCerts = true; - # use coredns - addons.dns.enable = true; + # # use coredns + # addons.dns.enable = true; - # needed if you use swap - kubelet.extraOpts = "--fail-swap-on=false"; - # proxy.extraOpts = "--proxy-mode=nftables"; - }; + # # needed if you use swap + # kubelet.extraOpts = "--fail-swap-on=false"; + # # proxy.extraOpts = "--proxy-mode=nftables"; + # }; - systemd.services.kube-proxy.path = with pkgs; lib.mkForce [iptables-legacy conntrack-tools]; + # systemd.services.kube-proxy.path = with pkgs; lib.mkForce [iptables-legacy conntrack-tools]; # Open ports in the firewall. # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. @@ -246,7 +272,7 @@ in # services.tailscale.enable = false; services.adguardhome.enable = true; services.ollama = { - enable = true; + # enable = true; acceleration = "cuda"; }; services.open-webui = { @@ -268,7 +294,7 @@ in ''}"; }; }; - + environment.sessionVariables.NIXOS_OZONE_WL = "1"; systemd.services.caddy.serviceConfig.EnvironmentFile = ["/opt/caddy/env"]; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions diff --git a/containers.nix b/containers.nix index c192be6..ca51ee7 100644 --- a/containers.nix +++ b/containers.nix @@ -6,12 +6,12 @@ { # virtualisation.oci-containers.backend = "podman"; virtualisation.oci-containers.containers = { - open-webui = { - image = "ghcr.io/open-webui/open-webui:main"; - volumes = ["/opt/open-webui:/app/backend/data"]; - # ports = ["3000:8080/tcp"]; - extraOptions = ["--gpus=all" "--network=host"]; - }; + # open-webui = { + # image = "ghcr.io/open-webui/open-webui:main"; + # volumes = ["/opt/open-webui:/app/backend/data"]; + # # ports = ["3000:8080/tcp"]; + # extraOptions = ["--gpus=all" "--network=host"]; + # }; # factorio = { # image = "factoriotools/factorio:stable-2.0.13"; # autoStart = true; diff --git a/flake.lock b/flake.lock index 27ac7e5..55fbeeb 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,71 @@ { "nodes": { + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1732200724, + "narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "153d52373b0fb2d343592871009a286ec8837aec", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1622559957, + "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1725860795, + "narHash": "sha256-Z2o8VBPW3I+KKTSfe25kskz0EUj7MpUh8u355Z1nVsU=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "7f795bf75d38e0eea9fed287264067ca187b88a9", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1731949548, + "narHash": "sha256-XIDexXM66sSh5j/x70e054BnUsviibUShW7XhbDGhYo=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "61165b1632409bd55e530f3dbdd4477f011cadc6", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "type": "github" + } + }, "devshell": { "inputs": { "nixpkgs": [ @@ -35,6 +101,22 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -43,11 +125,11 @@ ] }, "locked": { - "lastModified": 1730504689, - "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "506278e768c2a08bec68eb62932193e341f55c90", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -74,6 +156,43 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": [ + "stylix", + "systems" + ] + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, "git-hooks": { "inputs": { "flake-compat": [ @@ -91,11 +210,11 @@ ] }, "locked": { - "lastModified": 1731363552, - "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", + "lastModified": 1734797603, + "narHash": "sha256-ulZN7ps8nBV31SE+dwkDvKIzvN6hroRY8sYOT0w+E28=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", + "rev": "f0f0dc4920a903c3e08f5bdb9246bb572fcae498", "type": "github" }, "original": { @@ -126,6 +245,23 @@ "type": "github" } }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1732369855, + "narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "dadd58f630eeea41d645ee225a63f719390829dc", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "47.2", + "repo": "gnome-shell", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -133,11 +269,11 @@ ] }, "locked": { - "lastModified": 1731887066, - "narHash": "sha256-uw7K/RsYioJicV79Nl39yjtfhdfTDU2aRxnBgvFhkZ8=", + "lastModified": 1735053786, + "narHash": "sha256-Gm+0DcbUS338vvkwyYWms5jsWlx8z8MeQBzcnIDuIkw=", "owner": "nix-community", "repo": "home-manager", - "rev": "f3a2ff69586f3a54b461526e5702b1a2f81e740a", + "rev": "35b98d20ca8f4ca1f6a2c30b8a2c8bb305a36d84", "type": "github" }, "original": { @@ -154,11 +290,32 @@ ] }, "locked": { - "lastModified": 1731604581, - "narHash": "sha256-Qq2YZZaDTB3FZLWU/Hgh1uuWlUBl3cMLGB99bm7rFUM=", + "lastModified": 1734862405, + "narHash": "sha256-bXZJvUMJ2A6sIpYcCUAGjYCD5UDzmpmQCdmJSkPhleU=", "owner": "nix-community", "repo": "home-manager", - "rev": "1d0862ee2d7c6f6cd720d6f32213fa425004be10", + "rev": "cb27edb5221d2f2920a03155f8becc502cf60e35", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_3": { + "inputs": { + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733085484, + "narHash": "sha256-dVmNuUajnU18oHzBQWZm1BQtANCHaqNuxTHZQ+GN0r8=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "c1fee8d4a60b89cae12b288ba9dbc608ff298163", "type": "github" }, "original": { @@ -203,11 +360,11 @@ ] }, "locked": { - "lastModified": 1731642829, - "narHash": "sha256-vG+O2RZRzYZ8BUMNNJ+BLSj6PUoGW7taDQbp6QNJ3Xo=", + "lastModified": 1733570843, + "narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "f86f158efd4bab8dce3e207e4621f1df3a760b7a", + "rev": "a35b08d09efda83625bef267eb24347b446c80b8", "type": "github" }, "original": { @@ -218,11 +375,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1731763621, - "narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=", + "lastModified": 1734988233, + "narHash": "sha256-Ucfnxq1rF/GjNP3kTL+uTfgdoE9a3fxDftSfeLIS8mA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c69a9bffbecde46b4b939465422ddc59493d3e4d", + "rev": "de1864217bfa9b5845f465e771e0ecb48b30e02d", "type": "github" }, "original": { @@ -232,6 +389,22 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1732238832, + "narHash": "sha256-sQxuJm8rHY20xq6Ah+GwIUkF95tWjGRd1X8xF+Pkk38=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "devshell": "devshell", @@ -247,11 +420,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1731883908, - "narHash": "sha256-Yt/eVhoj+SwpsQVK0YxM8jou55ni0+dqANuQ2IvIA28=", + "lastModified": 1735169833, + "narHash": "sha256-Wu201kM5vgOUhhwkKuYSZmmTMflgBybqeEIzIH4MRY4=", "owner": "nix-community", "repo": "nixvim", - "rev": "5bc3fa6996ee37b754f2e815a165be6e4d0cfcb9", + "rev": "25c13524642cb7fe98583a5dd5f90992c76198b9", "type": "github" }, "original": { @@ -270,11 +443,11 @@ ] }, "locked": { - "lastModified": 1731582522, - "narHash": "sha256-1w6aM4bG5cl2E4jHLPnMKkrUO4tY1jUX1NI6/RwJN7Y=", + "lastModified": 1733773348, + "narHash": "sha256-Y47y+LesOCkJaLvj+dI/Oa6FAKj/T9sKVKDXLNsViPw=", "owner": "NuschtOS", "repo": "search", - "rev": "13300b2297c51368e0892c3ebe220f688014fe15", + "rev": "3051be7f403bff1d1d380e4612f0c70675b44fc9", "type": "github" }, "original": { @@ -287,7 +460,38 @@ "inputs": { "home-manager": "home-manager", "nixpkgs": "nixpkgs", - "nixvim": "nixvim" + "nixvim": "nixvim", + "stylix": "stylix" + } + }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-helix": "base16-helix", + "base16-vim": "base16-vim", + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_2", + "gnome-shell": "gnome-shell", + "home-manager": "home-manager_3", + "nixpkgs": "nixpkgs_2", + "systems": "systems_2", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-tmux": "tinted-tmux" + }, + "locked": { + "lastModified": 1735151068, + "narHash": "sha256-sJ1/y4aXAZ22trJjY+nH/bJ+pydaDKf3wZtafM+Yjcs=", + "owner": "danth", + "repo": "stylix", + "rev": "079fecebad5f616561726359c89cedd811c8a722", + "type": "github" + }, + "original": { + "owner": "danth", + "repo": "stylix", + "type": "github" } }, "systems": { @@ -305,6 +509,71 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1716423189, + "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1729501581, + "narHash": "sha256-1ohEFMC23elnl39kxWnjzH1l2DFWWx4DhFNNYDTYt54=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "f0e7f7974a6441033eb0a172a0342e96722b4f14", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -313,11 +582,11 @@ ] }, "locked": { - "lastModified": 1730321837, - "narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=", + "lastModified": 1734704479, + "narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "746901bb8dba96d154b66492a29f5db0693dbfcc", + "rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 8e861a3..6901aba 100644 --- a/flake.nix +++ b/flake.nix @@ -9,14 +9,16 @@ url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; }; + stylix.url = "github:danth/stylix"; }; - outputs = inputs@{ nixpkgs, home-manager, nixvim, ... }: { + outputs = inputs@{ nixpkgs, home-manager, nixvim, stylix, ... }: { nixosConfigurations = { nixosDesktop = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ + stylix.nixosModules.stylix ./configuration.nix home-manager.nixosModules.home-manager { diff --git a/home.nix b/home.nix index c4aa803..268504e 100644 --- a/home.nix +++ b/home.nix @@ -52,6 +52,7 @@ dolphin wofi + kitty # Language servers yaml-language-server @@ -156,7 +157,6 @@ enable = true; defaultEditor = true; settings = { - theme = "gruvbox_dark_hard"; editor = { file-picker = { hidden = false; @@ -171,8 +171,8 @@ # }; # }; }; - wayland.windowsManager.hyprland = { + wayland.windowManager.hyprland = { enable = true; - extraConfig = builtins.readFile ./hyprland.conf; + extraConfig = (builtins.readFile ./hyprland.conf); }; } diff --git a/wallpaper.png b/wallpaper.png new file mode 100644 index 0000000..e620639 Binary files /dev/null and b/wallpaper.png differ