diff --git a/configuration.nix b/configuration.nix index 1a52d6f..8e1266e 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,6 +1,5 @@ { - config, - lib, + inputs, pkgs, ... }: @@ -10,9 +9,12 @@ ./nixvim/nixvim.nix ]; - boot.loader.systemd-boot.enable = true; + boot.loader.systemd-boot = { + edk2-uefi-shell.enable = true; + configurationLimit = 5; + }; boot.loader.efi.canTouchEfiVariables = true; - boot.kernelPackages = pkgs.linuxPackages; + boot.kernelPackages = pkgs.linuxPackages_latest; nix.settings.experimental-features = [ "nix-command" "flakes" @@ -35,17 +37,23 @@ LC_TELEPHONE = "de_DE.UTF-8"; LC_TIME = "de_DE.UTF-8"; }; - services.xserver.enable = true; services.xserver.xkb = { layout = "eu"; variant = ""; }; - services = { - desktopManager.plasma6.enable = true; - displayManager.sddm.enable = true; - displayManager.sddm.wayland.enable = true; + services.displayManager.ly.enable = true; + programs.steam = { + enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers + }; + programs.hyprland = { + package = pkgs.hyprland; + enable = true; + withUWSM = true; # recommended for most users + xwayland.enable = true; # Xwayland can be disabled. }; - security.doas.enable = true; security.sudo.enable = false; security.doas.extraRules = [ @@ -60,9 +68,15 @@ } ]; - programs.bash.interactiveShellInit = '' - complete -F _command doas - ''; + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestions.enable = true; + syntaxHighlighting.enable = true; + ohMyZsh.enable = true; + ohMyZsh.theme = "gentoo"; + interactiveShellInit = ''eval "$(devenv hook zsh)"''; + }; # Enable CUPS to print documents. services.printing.enable = true; @@ -79,7 +93,7 @@ # Enable touchpad support (enabled default in most desktopManager). services.libinput.enable = true; programs.xppen = { - enable = false; + enable = true; package = pkgs.xppen_4.overrideAttrs (old: { src = pkgs.fetchurl { url = "https://download01.xp-pen.com/file/2026/04/XPPenLinux4.0.15-260422.tar.gz"; @@ -97,45 +111,10 @@ noto-fonts noto-fonts-cjk-sans noto-fonts-color-emoji - (iosevka.override { - set = "Custom"; - privateBuildPlan = '' - [buildPlans.IosevkaCustom] - family = "Iosevka Custom" - spacing = "fontconfig-mono" - serifs = "slab" - noCvSs = true - exportGlyphNames = false - - [buildPlans.IosevkaCustom.variants] - inherits = "ss12" - - [buildPlans.IosevkaCustom.weights.Regular] - shape = 400 - menu = 400 - css = 400 - - [buildPlans.IosevkaCustom.weights.Bold] - shape = 700 - menu = 700 - css = 700 - - [buildPlans.IosevkaCustom.slopes.Upright] - angle = 0 - shape = "upright" - menu = "upright" - css = "normal" - - [buildPlans.IosevkaCustom.slopes.Italic] - angle = 9.4 - shape = "italic" - menu = "italic" - css = "italic" - ''; - }) nerd-fonts.symbols-only ]; users.users."lucy" = { + shell = pkgs.zsh; isNormalUser = true; description = "lucy"; extraGroups = [ @@ -148,18 +127,17 @@ nixpkgs.config.allowUnfree = true; environment.systemPackages = with pkgs; [ + wl-clipboard + btop + ripgrep + fd + bat + grimblast git - kdePackages.discover # Optional: Software center for Flatpaks/firmware updates - kdePackages.kcalc # Calculator - kdePackages.kcharselect # Character map - kdePackages.kclock # Clock app - kdePackages.kcolorchooser # Color picker - kdePackages.kolourpaint # Simple paint program - kdePackages.ksystemlog # System log viewer - kdePackages.sddm-kcm # SDDM configuration module - kdePackages.isoimagewriter # Write hybrid ISOs to USB - kdePackages.partitionmanager # Disk and partition management - hardinfo2 # System benchmarks and hardware info + blueman + devenv + inetutils + filezilla ]; hardware.bluetooth = { enable = true; diff --git a/flake.lock b/flake.lock index 7bf4de6..3d4e925 100644 --- a/flake.lock +++ b/flake.lock @@ -86,11 +86,11 @@ "firefox-gnome-theme": { "flake": false, "locked": { - "lastModified": 1779670703, - "narHash": "sha256-UdfMivNMwCCqQsYDg5pSz8X2IOaOrIZLIIy+Bg3CO2o=", + "lastModified": 1782007937, + "narHash": "sha256-PbnJr+eB+9Czol3ReI83dUgEhcn0sDK6TSy6ODTQm88=", "owner": "rafaelmardojai", "repo": "firefox-gnome-theme", - "rev": "942159e73e40bf785816f7f1f5feed9ef3d7c8f9", + "rev": "981bd332015397fb1ca033fa982bd61635160c78", "type": "github" }, "original": { @@ -176,11 +176,11 @@ ] }, "locked": { - "lastModified": 1778716662, - "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", + "lastModified": 1782949081, + "narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", + "rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e", "type": "github" }, "original": { @@ -189,24 +189,6 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "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": { @@ -248,18 +230,20 @@ "gnome-shell": { "flake": false, "locked": { - "lastModified": 1767737596, - "narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=", + "host": "gitlab.gnome.org", + "lastModified": 1776175984, + "narHash": "sha256-RJFlFW8GiMei6oqUGrMkGEvVqOH8U7Q8abc1yK4VKD8=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "ef02db02bf0ff342734d525b5767814770d85b49", - "type": "github" + "rev": "e0fdc4c13250e9a9b8ea9594c83925274f4a5dca", + "type": "gitlab" }, "original": { + "host": "gitlab.gnome.org", "owner": "GNOME", + "ref": "50.1", "repo": "gnome-shell", - "rev": "ef02db02bf0ff342734d525b5767814770d85b49", - "type": "github" + "type": "gitlab" } }, "home-manager": { @@ -269,11 +253,11 @@ ] }, "locked": { - "lastModified": 1783823409, - "narHash": "sha256-OI4IkRjRXa1e7hYmCGJDPDq5H/kPwhsyoS80cNUF9fI=", + "lastModified": 1785168662, + "narHash": "sha256-kGJTc0oEUQuEwV66lSlMxYtOEtpk9N/HS43k+rFAvs8=", "owner": "nix-community", "repo": "home-manager", - "rev": "7566825d4652a1b885bd4ce65bd9e8def432fec9", + "rev": "cbb77679b3d992c8b62f884cd3a84af534a28621", "type": "github" }, "original": { @@ -306,28 +290,6 @@ "type": "github" } }, - "late-sh": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay_2" - }, - "locked": { - "lastModified": 1783895121, - "narHash": "sha256-w98u6zKAdIGmbKHrbCEo2dA26k/LjU95ev1eCxzV/5k=", - "owner": "mpiorowski", - "repo": "late-sh", - "rev": "8355402e86f7dda93d79c5f0d9228e4a6378400a", - "type": "github" - }, - "original": { - "owner": "mpiorowski", - "repo": "late-sh", - "type": "github" - } - }, "nix-easyroam": { "inputs": { "nixpkgs": [ @@ -335,11 +297,11 @@ ] }, "locked": { - "lastModified": 1781526487, - "narHash": "sha256-pZ8xS3GGXUyzEN8JicUSpW7qRa22wPIPHOO15pS7jd4=", + "lastModified": 1784038797, + "narHash": "sha256-td6Ko5RV/TFw7ALmYP9YUVXMS1b7hW7vDqabrGXyzUo=", "owner": "0x5a4", "repo": "nix-easyroam", - "rev": "e519fa1db92ee5f3ffb1aabe504ca9863febc6dc", + "rev": "a6c72d25edc3b210bf6b2b46395c88be7efac147", "type": "github" }, "original": { @@ -358,11 +320,11 @@ "nixpkgs-nixcord": "nixpkgs-nixcord" }, "locked": { - "lastModified": 1783764089, - "narHash": "sha256-AzoohteEEymQ+m3fAXlQJ+mkFLQ9XjPRqSlgqJ7TLGY=", + "lastModified": 1785174508, + "narHash": "sha256-lnLPM02rSg8LxRwbNh0vfkB4OsBE5FYnVhy3dz2CPjI=", "owner": "FlameFlag", "repo": "nixcord", - "rev": "f3c556542c423b5e790a94d0337a80cede816620", + "rev": "3708bb6f9e6c0e65b10741eab6ac55e701c09625", "type": "github" }, "original": { @@ -373,11 +335,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1783816212, - "narHash": "sha256-2aZisVTVGSFEk3MYcOiWQp3zvwyzbqpktB69Rcfp150=", + "lastModified": 1785141334, + "narHash": "sha256-kh35kIx7el4Jk8Ki3BH9/Pn1eZYSYLJ6LMALos0zOy0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3b32825de172d0bc85664f495edb096b10862524", + "rev": "38a4887411571457d700c51c64a6e49ead2ed5ab", "type": "github" }, "original": { @@ -404,11 +366,11 @@ }, "nixpkgs-nixcord": { "locked": { - "lastModified": 1782999065, - "narHash": "sha256-5Dgj5+pIQYZKrXUGaLCk7CKfN3MmpwIhO94++WVxvng=", + "lastModified": 1784432872, + "narHash": "sha256-n3gKTBIV4ZA5VQpUakffBe3KGu4+mhPoA34rrqS0GkA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "80d591ed473cfc46329932c2aadac9b435342c7c", + "rev": "fd1462031fdee08f65fd0b4c6b64e22239a77870", "type": "github" }, "original": { @@ -420,11 +382,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1783791668, - "narHash": "sha256-zbcZ1dmBTPfJ7Mlqh/yLEPGpgJnwuv4Xr1xucy2WqMA=", + "lastModified": 1784555310, + "narHash": "sha256-/FCliTPgiuV1owejZFNx3Ch9irdvkOfOFl+HHZ+DrtM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "716c7a2664ca8325617b8a7fbb609273f2c4cae7", + "rev": "421eebfd0ec7bccd4abe826ce62d7e6e83129493", "type": "github" }, "original": { @@ -438,14 +400,14 @@ "inputs": { "flake-parts": "flake-parts_2", "nixpkgs": "nixpkgs_2", - "systems": "systems_2" + "systems": "systems" }, "locked": { - "lastModified": 1783869492, - "narHash": "sha256-47qs7UofgjxU6m7c90RycaHjvEXnVM5DeVEAtaPVPUA=", + "lastModified": 1785001306, + "narHash": "sha256-xWqmquUtqKXLeDZ1oQUO+rV4sjA9TShIJhLL8M5Bozo=", "owner": "nix-community", "repo": "nixvim", - "rev": "4ef28e447b9003b67ff7fa9488a3be93c43312db", + "rev": "48409beb41e8e28b64e8160ca82d8a93fb628963", "type": "github" }, "original": { @@ -466,11 +428,11 @@ ] }, "locked": { - "lastModified": 1780281641, - "narHash": "sha256-M/+hUKoKbHXpV0xGVfELbN1Ds1aoe3pL5p5/t46YhVo=", + "lastModified": 1783439237, + "narHash": "sha256-WUr8JF2v3n4Y30E5dxv4sAgNJXpVDBoCQNoQ/V4+n4o=", "owner": "nix-community", "repo": "NUR", - "rev": "30f9ae2f04174de63ba8bcf3580ca90843b28a01", + "rev": "b70bb66c7bcd162642f3a609bc16843c7059f503", "type": "github" }, "original": { @@ -506,11 +468,11 @@ "inputs": { "home-manager": "home-manager", "lanzaboote": "lanzaboote", - "late-sh": "late-sh", "nix-easyroam": "nix-easyroam", "nixcord": "nixcord", "nixpkgs": "nixpkgs", "nixvim": "nixvim", + "spicetify-nix": "spicetify-nix", "stylix": "stylix" } }, @@ -535,24 +497,24 @@ "type": "github" } }, - "rust-overlay_2": { + "spicetify-nix": { "inputs": { "nixpkgs": [ - "late-sh", "nixpkgs" - ] + ], + "systems": "systems_2" }, "locked": { - "lastModified": 1776222810, - "narHash": "sha256-5TD8MYqLMcJi9yV/9jq2dVUPtnu/lKZPD61esQCgvqs=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "4d6fee71fea68418a48992409b47f1183d0dd111", + "lastModified": 1785048222, + "narHash": "sha256-LjFVfwxensz76SjnvofF1Jsw+xTLd8Qp31W0J6nh2XI=", + "owner": "Gerg-L", + "repo": "spicetify-nix", + "rev": "17e524f330c282d31c32dfe076222d4a12277886", "type": "github" }, "original": { - "owner": "oxalica", - "repo": "rust-overlay", + "owner": "Gerg-L", + "repo": "spicetify-nix", "type": "github" } }, @@ -576,11 +538,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1783358511, - "narHash": "sha256-/F85cBWvU8b2hpawuCog464065ZTJtdMgVPWwJ9yHjE=", + "lastModified": 1784676123, + "narHash": "sha256-ndyanKzw90yX2nUVFmTuYqXidUNymtMfgmIHyNdhht0=", "owner": "nix-community", "repo": "stylix", - "rev": "14814ef555d8148ab82eba5054e654cd9eae3a1f", + "rev": "66714e5ce44269ecc58c20d9196da8dbe1b27a31", "type": "github" }, "original": { @@ -590,21 +552,6 @@ } }, "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { "locked": { "lastModified": 1774449309, "narHash": "sha256-brhZ8DmuGtzkCYHJg4HEd602amKm89Y9ytsFZ5uWD1w=", @@ -620,6 +567,21 @@ "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" + } + }, "systems_3": { "locked": { "lastModified": 1681028828, @@ -654,11 +616,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1777806186, - "narHash": "sha256-PDF0/wObw4nIsSBeXVYLsloXOiphXCgIdsrNcVXguKs=", + "lastModified": 1781968807, + "narHash": "sha256-yYO3Vw2M0y3TAUqt+9+Mj0zwP3XDTF5/PXcPhhFQ1ZM=", "owner": "tinted-theming", "repo": "schemes", - "rev": "0c94645546f4f3ddac77a1a5fce54eb95bf50795", + "rev": "2ccef2f4b22e3cab5a9292811f7133a07eeba4a7", "type": "github" }, "original": { @@ -670,11 +632,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1778379944, - "narHash": "sha256-wPDFzMGSlARlw0Sfsn48Q2+jPSfk6N0Ng6BC/d+7Q24=", + "lastModified": 1782012462, + "narHash": "sha256-2iDiD8DQLwS1lGuD9TS8WlvNyDoTs6krWntJbtB2zGo=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "fe0203a198690e71a5ff11e08812a4673de3678d", + "rev": "8c4e750f738a742bd73377ee41d3dadedebedef4", "type": "github" }, "original": { @@ -686,11 +648,11 @@ "tinted-zed": { "flake": false, "locked": { - "lastModified": 1778378178, - "narHash": "sha256-OXPXRIQgGwV77HjYRryOHguh4ALX96jkg+tseLkGgHA=", + "lastModified": 1782009766, + "narHash": "sha256-VUhBjpGvWqHI7rWeyMYb/u87YJSXHKfVV6S+IelWeO8=", "owner": "tinted-theming", "repo": "base16-zed", - "rev": "9cd816033ff969415b190722cddf134e78a5665f", + "rev": "5e8350bcd354e3241ab681a265fa6ef060c40be1", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 7fbdb40..9a7db1f 100644 --- a/flake.nix +++ b/flake.nix @@ -22,14 +22,14 @@ url = "github:nix-community/stylix"; inputs.nixpkgs.follows = "nixpkgs"; }; - late-sh = { - url = "github:mpiorowski/late-sh"; - inputs.nixpkgs.follows = "nixpkgs"; - }; lanzaboote = { url = "github:nix-community/lanzaboote/v1.1.0"; inputs.nixpkgs.follows = "nixpkgs"; }; + spicetify-nix = { + url = "github:Gerg-L/spicetify-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = @@ -44,10 +44,12 @@ }: { nixosConfigurations.seele = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; modules = [ ./easyroam.nix ./configuration.nix ./nixvim/nixvim.nix + ./hw-configs/laptop.nix nix-easyroam.nixosModules.nix-easyroam stylix.nixosModules.stylix nixvim.nixosModules.nixvim @@ -59,19 +61,33 @@ home-manager.extraSpecialArgs = { inherit inputs; }; } ({ lib, ... }: { + boot.loader.systemd-boot.enable = true; networking.hostName = lib.mkForce "seele"; - imports = [ - ./hardware-configuration-laptop.nix - ]; - + powerManagement.powertop.enable = true; + services.upower.enable = true; + services.tlp = { + enable = true; + settings = { + 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"; + CPU_MIN_PERF_ON_AC = 0; + CPU_MAX_PERF_ON_AC = 100; + CPU_MIN_PERF_ON_BAT = 0; + CPU_MAX_PERF_ON_BAT = 20; + }; + }; }) ]; }; nixosConfigurations.nerv = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; modules = [ ./configuration.nix ./nixvim/nixvim.nix + ./hw-configs/desktop.nix lanzaboote.nixosModules.lanzaboote nix-easyroam.nixosModules.nix-easyroam stylix.nixosModules.stylix @@ -84,22 +100,35 @@ home-manager.extraSpecialArgs = { inherit inputs; }; } - ({ pkgs, lib, ... }: { - imports = [ - ./hardware-configuration-desktop.nix - ]; - networking.hostName = lib.mkForce "nerv"; - environment.systemPackages = [ - # For debugging and troubleshooting Secure Boot. - pkgs.sbctl - ]; - boot.loader.systemd-boot.enable = lib.mkForce false; + ( + { + config, + pkgs, + lib, + ... + }: + { + networking.hostName = lib.mkForce "nerv"; + environment.systemPackages = [ + pkgs.sbctl + ]; + boot.kernelParams = [ + "video=card2-DP-5:2560x1440@60" + ]; + boot.loader.systemd-boot.enable = lib.mkForce false; + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.nvidia = { + modesetting.enable = true; + open = true; + package = config.boot.kernelPackages.nvidiaPackages.latest; + }; - boot.lanzaboote = { - enable = true; - pkiBundle = "/var/lib/sbctl"; - }; - }) + boot.lanzaboote = { + enable = true; + pkiBundle = "/var/lib/sbctl"; + }; + } + ) ]; }; }; diff --git a/hardware-configuration-desktop.nix b/hardware-configuration-desktop.nix deleted file mode 100644 index da5f51c..0000000 --- a/hardware-configuration-desktop.nix +++ /dev/null @@ -1,50 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ - config, - lib, - pkgs, - modulesPath, - ... -}: - -{ - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ - "nvme" - "ahci" - "xhci_pci" - "usbhid" - "usb_storage" - "sd_mod" - ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/64a37727-0c5f-41d4-afac-dc26978916c1"; - fsType = "xfs"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/F424-0E3E"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - swapDevices = [ ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - services.xserver.videoDrivers = [ "nvidia" ]; - hardware.nvidia.open = true; # see the note above - boot.loader.systemd-boot.configurationLimit = 5; -} diff --git a/home/home.nix b/home/home.nix index d8e09f6..6fa1c50 100644 --- a/home/home.nix +++ b/home/home.nix @@ -8,33 +8,38 @@ imports = [ ./stylix.nix ./fastfetch.nix + ./hyprland.nix inputs.nixcord.homeModules.nixcord + inputs.spicetify-nix.homeManagerModules.spicetify ]; + programs.spicetify = { + enable = true; + wayland = true; + }; # Home Manager needs a bit of information about you and the # paths it should manage. home.packages = with pkgs; [ - rnote xournalpp - git - inputs.late-sh.packages.${stdenv.hostPlatform.system}.late - spotify fastfetch hyfetch + nemo + pavucontrol + material-symbols ]; + home.pointerCursor.enable = true; home.username = "lucy"; home.homeDirectory = "/home/lucy"; - services.syncthing = { + services.syncthing.enable = true; + programs.git = { enable = true; settings = { - devices = { - cyberia = { - id = "OOJBAJU-AAIKLHO-BKMMHBU-2NXE75Z-HE64A6V-LET4ZXB-Q2FT2Y4-GZON3AD"; - autoAcceptFolders = true; - name = "cyberia"; - }; - }; + user.name = "lucy"; + user.email = "lucykaufmann@protonmail.com"; + init.defaultBranch = "main"; }; }; + programs.quickshell.enable = true; + programs.fuzzel.enable = true; programs.nixcord = { enable = true; discord.vencord.enable = true; @@ -45,33 +50,15 @@ }; }; }; - programs.bash = { - enable = true; - enableCompletion = true; - bashrcExtra = '' - PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] ' - ''; - - }; programs.google-chrome.enable = true; - programs.firefox = { - enable = false; - profiles = { - lucy = { - isDefault = true; - extensions.force = true; - path = "lucy"; - id = 0; - settings = { - default = true; - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - }; + programs.foot = { + enable = true; + settings = { + main = { + pad = "20x20"; }; }; }; - programs.ghostty = { - enable = true; - }; # DANGER ZONE programs.home-manager.enable = true; home.stateVersion = "26.05"; diff --git a/home/hyprland.lua b/home/hyprland.lua new file mode 100644 index 0000000..d63a75b --- /dev/null +++ b/home/hyprland.lua @@ -0,0 +1,225 @@ +hl.monitor({ + output = "", + mode = "preferred", + position = "auto", + scale = "1", +}) + +hl.monitor({ + output = "eDP-1", + mode = "preferred", + position = "auto", + scale = "1", +}) +hl.monitor({ + output = "DP-5", + mode = "2560x1440@165", + position = "auto", + scale = "1", +}) + +-- Set programs that you use +local terminal = "foot" +local fileManager = "nemo" +local menu = "fuzzel" + +hl.on("hyprland.start", function() + hl.exec_cmd("qs") + hl.exec_cmd("/usr/libexec/hyprpolkitagent") +end) +hl.config({ + general = { + gaps_in = 5, + gaps_out = 10, + border_size = 2, + resize_on_border = false, + allow_tearing = false, + layout = "master", + }, + + decoration = { + rounding = 18, + rounding_power = 2, + active_opacity = 1.0, + inactive_opacity = 1.0, + shadow = { + enabled = true, + range = 4, + render_power = 3, + color = 0xee1a1a1a, + }, + + blur = { + enabled = true, + size = 3, + passes = 2, + vibrancy = 0.1696, + }, + }, + + animations = { + enabled = true, + }, +}) + +-- Default curves and animations, see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/ +hl.curve("easeOutQuint", { type = "bezier", points = { { 0.23, 1 }, { 0.32, 1 } } }) +hl.curve("easeInOutCubic", { type = "bezier", points = { { 0.65, 0.05 }, { 0.36, 1 } } }) +hl.curve("linear", { type = "bezier", points = { { 0, 0 }, { 1, 1 } } }) +hl.curve("almostLinear", { type = "bezier", points = { { 0.5, 0.5 }, { 0.75, 1 } } }) +hl.curve("quick", { type = "bezier", points = { { 0.15, 0 }, { 0.1, 1 } } }) + +-- Default springs +hl.curve("easy", { type = "spring", mass = 1, stiffness = 71.2633, dampening = 15.8273644 }) + +hl.animation({ leaf = "global", enabled = true, speed = 5, bezier = "easeInOutCubic" }) +hl.animation({ leaf = "windows", enabled = true, speed = 4, bezier = "easeOutQuint", style = "slide" }) +hl.animation({ leaf = "fade", enabled = true, speed = 3, bezier = "quick" }) +hl.animation({ leaf = "layers", enabled = true, speed = 4, bezier = "easeOutQuint" }) +hl.animation({ leaf = "workspaces", enabled = true, speed = 2, bezier = "easeOutQuint", style = "slidevert" }) +hl.animation({ leaf = "border", enabled = false, speed = 2, bezier = "easeOutQuint", style = "slidevert" }) +hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" }) + +hl.config({ + master = { + new_status = "slave", + }, +}) + +--------------- +---- INPUT ---- +--------------- + +hl.config({ + input = { + kb_layout = "eu", + kb_variant = "", + kb_model = "", + kb_options = "", + kb_rules = "", + + follow_mouse = 1, + + sensitivity = 0, -- -1.0 - 1.0, 0 means no modification. + accel_profile = "flat", + + touchpad = { + natural_scroll = false, + }, + }, +}) + +hl.gesture({ + fingers = 3, + direction = "vertical", + action = "workspace", +}) + +local mainMod = "SUPER" -- Sets "Windows" key as main modifier +local aux_mod = "ALT" + +-- Example binds, see https://wiki.hypr.land/Configuring/Basics/Binds/ for more +hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd(terminal)) +hl.bind(mainMod .. " + Q", hl.dsp.window.close()) +hl.bind( + mainMod .. " + M", + hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch 'hl.dsp.exit()'") +) +hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager)) +hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" })) +hl.bind(mainMod .. " + Space", hl.dsp.exec_cmd(menu)) + +-- Move focus with mainMod + arrow keys +hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "left" })) +hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "right" })) +hl.bind(mainMod .. " + up", hl.dsp.focus({ direction = "up" })) +hl.bind(mainMod .. " + down", hl.dsp.focus({ direction = "down" })) +hl.bind(mainMod .. " + h", hl.dsp.focus({ direction = "left" })) +hl.bind(mainMod .. " + l", hl.dsp.focus({ direction = "right" })) +hl.bind(mainMod .. " + k", hl.dsp.focus({ direction = "up" })) +hl.bind(mainMod .. " + j", hl.dsp.focus({ direction = "down" })) + +for i = 1, 10 do + local key = i % 10 -- 10 maps to key 0 + hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i })) + hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i })) +end + +-- Move/resize windows with mainMod + LMB/RMB and dragging +hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) +hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) +hl.bind(aux_mod .. " + mouse:272", hl.dsp.window.resize(), { mouse = true }) + +-- Laptop multimedia keys for volume and LCD brightness +hl.bind( + "XF86AudioRaiseVolume", + hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), + { locked = true, repeating = true } +) +hl.bind( + "XF86AudioLowerVolume", + hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), + { locked = true, repeating = true } +) +hl.bind( + "XF86AudioMute", + hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), + { locked = true, repeating = true } +) +hl.bind( + "XF86AudioMicMute", + hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), + { locked = true, repeating = true } +) +hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl set 5%+"), { locked = true, repeating = true }) +hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl set 5%-"), { locked = true, repeating = true }) + +-- Requires playerctl +hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true }) +hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true }) + +-- Screenshot binds +hl.bind(aux_mod .. "+ SHIFT + S", hl.dsp.exec_cmd("grimblast copy output -n -c")) +hl.bind(mainMod .. "+ SHIFT + S", hl.dsp.exec_cmd("grimblast copy area -n -f")) +-- misc binds +hl.bind(mainMod .. " + w", hl.dsp.exec_cmd("/etc/bash/bashrc.d/90-qs.bash switch-wall fuzzel")) +hl.bind(mainMod .. " + t", hl.dsp.exec_cmd("/etc/bash/bashrc.d/90-qs.bash switch-theme fuzzel")) +hl.bind(mainMod .. "+ SHIFT + minus", hl.dsp.window.move({ workspace = "special:scratchpad" })) +hl.bind(mainMod .. " + minus", hl.dsp.workspace.toggle_special("scratchpad")) + +hl.window_rule({ + -- Ignore maximize requests from all apps. You'll probably like this. + name = "suppress-maximize-events", + match = { class = ".*" }, + + suppress_event = "maximize", +}) + +hl.window_rule({ + -- Fix some dragging issues with XWayland + name = "fix-xwayland-drags", + match = { + class = "^$", + title = "^$", + xwayland = true, + float = true, + fullscreen = false, + pin = false, + }, + + no_focus = true, +}) + +hl.window_rule({ + name = "discord-to-ws6", + match = { class = "^(discord)$" }, + workspace = "6 silent", +}) + +hl.window_rule({ + name = "spotify-to-ws7", + match = { class = "^(Spotify)$" }, + workspace = "7 silent", +}) diff --git a/home/hyprland.nix b/home/hyprland.nix new file mode 100644 index 0000000..50c016d --- /dev/null +++ b/home/hyprland.nix @@ -0,0 +1,31 @@ +{ + config, + inputs, + pkgs, + ... +}: +{ + wayland.windowManager.hyprland = { + enable = true; + package = null; + systemd.enable = false; + extraConfig = '' + require("main") + ''; + portalPackage = + pkgs.xdg-desktop-portal-hyprland; + }; + xdg.configFile."hypr/main.lua".source = + config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/home/hyprland.lua"; + xdg.portal.config = { + common = { + default = [ "gtk" ]; + }; + hyprland = { + default = [ "hyprland" ]; + "org.freedesktop.impl.portal.Secret" = [ + "gnome-keyring" + ]; + }; + }; +} diff --git a/home/stylix.nix b/home/stylix.nix index ec5c812..8259677 100644 --- a/home/stylix.nix +++ b/home/stylix.nix @@ -1,18 +1,48 @@ { + lib, + inputs, + ... +}: +let + keep = [ + "spicetify" + "neovim" + "qt" + "gtk" + "hyprland" + "hyprpaper" + "foot" + "fuzzel" + "discord" + "console" + ]; + dir = "${inputs.stylix}/modules"; + + drop = builtins.filter (n: !(builtins.elem n keep)) ( + builtins.attrNames (lib.filterAttrs (_: t: t == "directory") (builtins.readDir dir)) + ); + + disable = + platform: + map (n: "${dir}/${n}/${platform}.nix") ( + builtins.filter (n: builtins.pathExists "${dir}/${n}/${platform}.nix") drop + ); +in + +{ + disabledModules = disable "hm"; stylix = { enable = true; autoEnable = false; targets = { gtk.enable = true; - ghostty.enable = true; - firefox.enable = true; - firefox.profileNames = [ "lucy" ]; - firefox.colorTheme.enable = true; nixcord.enable = true; - xresources.enable = true; - kde.enable = true; - kde.useWallpaper = false; qt.enable = true; + hyprland.enable = true; + hyprland.hyprpaper.enable = false; + fuzzel.enable = true; + foot.enable = true; + spicetify.enable = true; }; }; } diff --git a/hw-configs/desktop.nix b/hw-configs/desktop.nix new file mode 100644 index 0000000..64df67f --- /dev/null +++ b/hw-configs/desktop.nix @@ -0,0 +1,31 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/64a37727-0c5f-41d4-afac-dc26978916c1"; + fsType = "xfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/F424-0E3E"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hardware-configuration-laptop.nix b/hw-configs/laptop.nix similarity index 81% rename from hardware-configuration-laptop.nix rename to hw-configs/laptop.nix index c3d407a..31e056d 100644 --- a/hardware-configuration-laptop.nix +++ b/hw-configs/laptop.nix @@ -14,18 +14,18 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/624609f3-6d1c-4e9c-adcb-0c4d66de25c3"; + { device = "/dev/disk/by-uuid/751981d7-36b5-4759-b0eb-7db70b5d7b8c"; fsType = "xfs"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/298C-5081"; + { device = "/dev/disk/by-uuid/65BD-721E"; fsType = "vfat"; options = [ "fmask=0077" "dmask=0077" ]; }; swapDevices = - [ { device = "/dev/disk/by-uuid/9d98be55-ea0d-465f-967e-29c83c4127a9"; } + [ { device = "/dev/disk/by-uuid/889d88f6-0a64-482a-88e1-7a091a019373"; } ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; diff --git a/nixvim/keymaps.nix b/nixvim/keymaps.nix index 342a5da..f1f921d 100644 --- a/nixvim/keymaps.nix +++ b/nixvim/keymaps.nix @@ -6,7 +6,7 @@ action = " lua vim.lsp.buf.format() "; } { - key = "t"; + key = ""; action = "ToggleTerm size=10"; } { diff --git a/nixvim/nixvim.nix b/nixvim/nixvim.nix index 8fd62cc..4d5ea02 100644 --- a/nixvim/nixvim.nix +++ b/nixvim/nixvim.nix @@ -21,6 +21,7 @@ ''; opts = { relativenumber = true; + number = true; tabstop = 8; shiftwidth = 8; expandtab = true; diff --git a/nixvim/plugins.nix b/nixvim/plugins.nix index aad00ca..1c9ecc0 100644 --- a/nixvim/plugins.nix +++ b/nixvim/plugins.nix @@ -38,6 +38,7 @@ lualine = { enable = true; settings = { + extensions = [ "toggleterm" ]; options = { section_separators = { left = "▎"; @@ -48,6 +49,25 @@ right = ""; }; }; + inactive_sections = { + lualine_a = [ + "mode" + ]; + lualine_b = [ + "filename" + "filetype" + ]; + lualine_c = [ + "diagnostics" + ]; + lualine_x = [ + "lsp_status" + ]; + lualine_y = [ ]; + lualine_z = [ + "location" + ]; + }; sections = { lualine_a = [ "mode" diff --git a/stylix.nix b/stylix.nix index 8a54320..7e498d7 100644 --- a/stylix.nix +++ b/stylix.nix @@ -1,9 +1,36 @@ { + inputs, config, pkgs, + lib, ... }: +let + keep = [ + "neovim" + "qt" + "gtk" + "hyprland" + "foot" + "fuzzel" + "nixcord" + "console" + ]; + dir = "${inputs.stylix}/modules"; + + drop = builtins.filter (n: !(builtins.elem n keep)) ( + builtins.attrNames (lib.filterAttrs (_: t: t == "directory") (builtins.readDir dir)) + ); + + disable = + platform: + map (n: "${dir}/${n}/${platform}.nix") ( + builtins.filter (n: builtins.pathExists "${dir}/${n}/${platform}.nix") drop + ); +in { + disabledModules = disable "nixos"; + stylix.opacity = { terminal = 0.8; desktop = 1.0; @@ -23,14 +50,18 @@ stylix = { enable = true; autoEnable = false; - base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark.yaml"; + base16Scheme = "${pkgs.base16-schemes}/share/themes/gruber.yaml"; polarity = "dark"; image = ./wallpaper.png; targets = { console.enable = true; gtk.enable = true; qt.enable = true; - nixvim.enable = true; + qt.platform = lib.mkForce "qtct"; + nixvim = { + enable = true; + plugin = "base16-nvim"; + }; }; fonts = { sizes = { @@ -47,7 +78,8 @@ name = config.stylix.fonts.monospace.name; }; monospace = { - name = "Iosevka Custom"; + name = "Maple Mono"; + package = pkgs.maple-mono.truetype; }; emoji = {