diff --git a/flake.lock b/flake.lock index 4feaf75..1971ffe 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,119 @@ { "nodes": { + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1708890466, + "narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "665b3c6748534eb766c777298721cece9453fdae", + "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-foot": { + "flake": false, + "locked": { + "lastModified": 1696725948, + "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", + "owner": "tinted-theming", + "repo": "base16-foot", + "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-foot", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1720809814, + "narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "34f41987bec14c0f3f6b2155c19787b1f6489625", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-kitty": { + "flake": false, + "locked": { + "lastModified": 1665001328, + "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=", + "owner": "kdrag0n", + "repo": "base16-kitty", + "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805", + "type": "github" + }, + "original": { + "owner": "kdrag0n", + "repo": "base16-kitty", + "type": "github" + } + }, + "base16-tmux": { + "flake": false, + "locked": { + "lastModified": 1696725902, + "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", + "owner": "tinted-theming", + "repo": "base16-tmux", + "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-tmux", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1716150083, + "narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "type": "github" + } + }, "chaotic": { "inputs": { "compare-to": "compare-to", @@ -220,6 +334,22 @@ "type": "github" } }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1689549921, + "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -240,6 +370,23 @@ "type": "github" } }, + "gnome-shell": { + "flake": false, + "locked": { + "lastModified": 1713702291, + "narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934", + "type": "github" + }, + "original": { + "owner": "GNOME", + "ref": "46.1", + "repo": "gnome-shell", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -677,6 +824,7 @@ "nur": "nur", "plasma-manager": "plasma-manager", "pre-commit-hooks": "pre-commit-hooks", + "stylix": "stylix", "systems": "systems" } }, @@ -705,6 +853,40 @@ "type": "github" } }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-foot": "base16-foot", + "base16-helix": "base16-helix", + "base16-kitty": "base16-kitty", + "base16-tmux": "base16-tmux", + "base16-vim": "base16-vim", + "flake-compat": [ + "flake-compat" + ], + "gnome-shell": "gnome-shell", + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722946882, + "narHash": "sha256-mxtnMye8gs82tdQbVC+g6v3aPOZlH150f9WyntHIkTg=", + "owner": "danth", + "repo": "stylix", + "rev": "5853f1a8bd072f2ebabfc3de3973084353cf6f1e", + "type": "github" + }, + "original": { + "owner": "danth", + "repo": "stylix", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1680978846, diff --git a/flake.nix b/flake.nix index e3b2d2e..d22fff1 100644 --- a/flake.nix +++ b/flake.nix @@ -110,6 +110,12 @@ inputs.flake-utils.follows = "flake-utils"; inputs.flake-compat.follows = "flake-compat"; }; + stylix = { + url = "github:danth/stylix"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + inputs.flake-compat.follows = "flake-compat"; + }; llama-cpp = { url = "git+https://git.vlt81.de/tristan/llama.cpp.git"; inputs.nixpkgs.follows = "nixpkgs"; @@ -133,12 +139,15 @@ , chaotic , envfs , llama-cpp + , stylix + , nix-wallpaper , ... } @ inputs: let system = "x86_64-linux"; my-overlay = final: prev: { my = self.packages."${system}"; + nix-wallpaper = nix-wallpaper.packages."${system}".default; }; overlays = [ my-overlay @@ -157,6 +166,7 @@ nix-index-database.hmModules.nix-index nur.hmModules.nur plasma-manager.homeManagerModules.plasma-manager + # stylix.homeManagerModules.stylix ]; osModules = [ lanzaboote.nixosModules.lanzaboote @@ -167,6 +177,7 @@ nur.nixosModules.nur chaotic.nixosModules.default envfs.nixosModules.envfs + stylix.nixosModules.stylix ]; args = { inherit self inputs system; diff --git a/home-mods/common/default.nix b/home-mods/common/default.nix index 744672d..3e6f2c3 100644 --- a/home-mods/common/default.nix +++ b/home-mods/common/default.nix @@ -4,4 +4,18 @@ , ... }: { xdg.enable = true; + stylix.targets = { + alacritty.enable = true; + bat.enable = true; + btop.enable = true; + firefox.enable = true; + firefox.profileNames = [ "default" ]; + fish.enable = true; + fzf.enable = true; + gtk.enable = true; + kde.enable = true; # ?? + ncspot.enable = true; + neovim.enable = true; + zellij.enable = true; + }; } diff --git a/home-mods/desktop/default.nix b/home-mods/desktop/default.nix index e9bacf6..efe0a80 100644 --- a/home-mods/desktop/default.nix +++ b/home-mods/desktop/default.nix @@ -2,15 +2,7 @@ , pkgs , inputs , ... -}: -let - wallpaper = inputs.nix-wallpaper.packages.${pkgs.system}.default.override { - logoSize = 24; - preset = "gruvbox-dark-rainbow"; - }; - wallpaperPath = "${wallpaper}/share/wallpapers/nixos-wallpaper.png"; -in -{ +}: { programs.mpv = { enable = true; package = pkgs.mpv; @@ -37,7 +29,7 @@ in }; home = { - file."Pictures/default_background.png".source = wallpaperPath; + file."Pictures/default_background.png".source = config.stylix.image; packages = with pkgs; [ bitwarden @@ -75,6 +67,7 @@ in waypipe veracrypt deadbeef-with-plugins + flightgear ]; }; } diff --git a/home-mods/plasma/default.nix b/home-mods/plasma/default.nix index 83cf17f..d5ca952 100644 --- a/home-mods/plasma/default.nix +++ b/home-mods/plasma/default.nix @@ -4,11 +4,12 @@ }: { programs.plasma = { enable = true; - overrideConfig = true; + overrideConfig = false; # needed for stylix compat sadly workspace = { theme = "breeze-dark"; lookAndFeel = "org.kde.breezedark.desktop"; - wallpaper = "${config.home.homeDirectory}/Pictures/default_background.png"; + wallpaper = config.stylix.image; + # wallpaper = "${config.home.homeDirectory}/Pictures/default_background.png"; set by stylix }; panels = [ # Windows-like panel at the bottom @@ -21,7 +22,7 @@ name = "org.kde.plasma.kicker"; config = { General = { - icon = "nix-snowflake-white"; + icon = "nix-snowflake"; alphaSort = true; showIconsRootLevel = true; }; diff --git a/home-mods/shell/default.nix b/home-mods/shell/default.nix index 742778e..8065c0c 100644 --- a/home-mods/shell/default.nix +++ b/home-mods/shell/default.nix @@ -26,7 +26,6 @@ in alacritty = { enable = true; settings = { - window.opacity = 0.88; window.dimensions = { lines = 40; columns = 150; @@ -52,12 +51,6 @@ in package = pkgs.fish; interactiveShellInit = '' - # TODO do not run on headless systems - function kde_run - ${pkgs.kdePackages.plasma-workspace}/libexec/plasma-dbus-run-session-if-needed \ - ${pkgs.kdePackages.plasma-workspace}/bin/startplasma-wayland - end - ############################################ # Adds a seperating arrow inbetween commands # ~ ls <----------- at 12:12 @@ -74,16 +67,12 @@ in starship module time end + any-nix-shell fish --info-right | source + if test -z $INSIDE_EMACS && test $TERM != linux ; eval (${pkgs.zellij}/bin/zellij setup --generate-auto-start fish | string collect) end - if test $TERM = linux && test (who am i | string split " ")[2] = tty1; - kde_run && exit - end - - any-nix-shell fish --info-right | source - cat /var/lib/rust-motd/motd ''; loginShellInit = '' @@ -370,6 +359,7 @@ in neovim lazydocker sshx + bat ]; }; } diff --git a/os-mods/common/default.nix b/os-mods/common/default.nix index 61eefa1..6a42d02 100644 --- a/os-mods/common/default.nix +++ b/os-mods/common/default.nix @@ -207,4 +207,56 @@ in } # ssh ]; }; + + # TODO Extract into stylix module + services.kmscon.enable = true; + services.kmscon.hwRender = config.hardware.amdgpu.initrd.enable; + stylix = + let + wallpaper = pkgs.nix-wallpaper.override { + logoSize = 24; + preset = "gruvbox-dark-rainbow"; + width = 6960; + height = 4320; + }; + wallpaperPath = "${wallpaper}/share/wallpapers/nixos-wallpaper.png"; + fontpkg = pkgs.nerdfonts.override { fonts = [ "Iosevka" "IosevkaTerm" "FiraCode" "DroidSansMono" "NerdFontsSymbolsOnly" ]; }; + in + { + enable = true; + image = wallpaperPath; + polarity = "dark"; + base16Scheme = lib.mkForce "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml"; + autoEnable = false; + cursor = { + package = pkgs.kdePackages.breeze; + name = "breeze_cursors"; + size = 24; + }; + opacity.terminal = 0.88; + fonts = { + serif = config.stylix.fonts.sansSerif; + sansSerif = { + package = fontpkg; + name = "Iosevka Nerd Font Propo"; + }; + + monospace = { + package = fontpkg; + name = "Iosevka Nerd Font Mono"; + }; + + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + targets = { + console.enable = true; + fish.enable = true; + gtk.enable = true; + kmscon.enable = true; + nixos-icons.enable = true; + }; + }; } diff --git a/os-mods/desktop/default.nix b/os-mods/desktop/default.nix index 65dec11..bea9bd4 100644 --- a/os-mods/desktop/default.nix +++ b/os-mods/desktop/default.nix @@ -39,9 +39,6 @@ mplus-outline-fonts.githubRelease dina-font proggyfonts - (nerdfonts.override { - fonts = [ "Iosevka" "IosevkaTerm" "FiraCode" "DroidSansMono" "NerdFontsSymbolsOnly" ]; - }) ]; }; @@ -73,5 +70,42 @@ desktopManager.plasma6.enable = true; desktopManager.plasma6.enableQt5Integration = true; displayManager.enable = true; + xserver = { + enable = true; + xkb = { + layout = "us"; + variant = "alt-intl"; + }; + }; + + greetd = { + enable = true; + settings = { + default_session = { + command = '' + ${lib.getExe pkgs.greetd.tuigreet} \ + --asterisks --asterisks-char • \ + --greeting "Welcome to NixOS ${config.system.nixos.version} (${config.system.nixos.codeName}) on ${config.system.name}!" \ + --theme "border=magenta;text=cyan;prompt=green;time=red;action=blue;button=yellow;container=black;input=red" \ + --time --time-format "%H:%M | %a • %h | %F" \ + --remember \ + --cmd ${pkgs.writeShellScript "tuigreet-cmd.sh" '' + ${pkgs.kdePackages.plasma-workspace}/libexec/plasma-dbus-run-session-if-needed + exec 2>/dev/null 1>/dev/null ${pkgs.kdePackages.plasma-workspace}/bin/startplasma-wayland + ''}; + ''; + }; + }; + }; + }; + + systemd.services.greetd.serviceConfig = { + Type = "idle"; + StandardInput = "tty"; + StandardOutput = "tty"; + StandardError = "journal"; + TTYReset = true; + TTYVHangup = true; + TTYVTDisallocate = true; }; } diff --git a/os-mods/desktop/gaming.nix b/os-mods/desktop/gaming.nix index 7ba6f22..b54abad 100644 --- a/os-mods/desktop/gaming.nix +++ b/os-mods/desktop/gaming.nix @@ -32,4 +32,6 @@ ]; hardware.xone.enable = true; # USB hardware.xpadneo.enable = true; # Wireless + hardware.bluetooth.enable = true; + hardware.steam-hardware.enable = true; } diff --git a/os-mods/virt/default.nix b/os-mods/virt/default.nix index c5b4178..eb92780 100644 --- a/os-mods/virt/default.nix +++ b/os-mods/virt/default.nix @@ -23,6 +23,14 @@ autoPrune.enable = true; }; + security.wrappers.spice-client-glib-usb-acl-helper = { + owner = "root"; + group = "root"; + # capabilities = "cap_fowner+ep"; + setuid = true; + source = "${pkgs.spice-gtk}/bin/spice-client-glib-usb-acl-helper"; + }; + virtualisation.libvirtd = { enable = true; package = pkgs.libvirt; diff --git a/systems/nixos-fw16/default.nix b/systems/nixos-fw16/default.nix index bcb33e2..3e95fcf 100644 --- a/systems/nixos-fw16/default.nix +++ b/systems/nixos-fw16/default.nix @@ -94,6 +94,7 @@ "gpiolib_acpi.ignore_interrupt=AMDI0009:00@9" # mask IRQ 9 ? ]; loader = { + timeout = 0; systemd-boot = { enable = false; # due to lanzaboote configurationLimit = 8; @@ -109,7 +110,6 @@ configurationLimit = 8; pkiBundle = "/etc/secureboot"; }; - initrd = { availableKernelModules = [ "nvme" diff --git a/users/default.nix b/users/default.nix index aac70fa..0167a64 100644 --- a/users/default.nix +++ b/users/default.nix @@ -32,11 +32,6 @@ home-manager = { useUserPackages = true; useGlobalPkgs = true; - users.tester = import ./admin-thin.nix { - username = "tester"; - - inherit pkgs config inputs system lib; - }; users.tristand = import ./admin-fat.nix { username = "tristand";