commit 76d68230f69a22f7c33fc047676a1f26ace52cee Author: Asaki Yuki Date: Thu Apr 9 10:36:32 2026 +0700 big refactor diff --git a/assets/grub/background.png b/assets/grub/background.png new file mode 100644 index 0000000..63a6060 Binary files /dev/null and b/assets/grub/background.png differ diff --git a/devices/ideapad-slim-5/configuration.nix b/devices/ideapad-slim-5/configuration.nix new file mode 100755 index 0000000..5cc77dc --- /dev/null +++ b/devices/ideapad-slim-5/configuration.nix @@ -0,0 +1,57 @@ +{ + libs, + pkgs, + ... +}: +{ + imports = [ + ./hardware-configuration.nix + (libs.root "/host/desktop/default.nix") + (libs.root "/home/asakiyuki/configuration.nix") + ]; + + networking.hostName = "nixos"; + networking.networkmanager.enable = true; + time.timeZone = "Asia/Ho_Chi_Minh"; + + nixpkgs.config.allowUnfree = true; + + programs.firefox.enable = true; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + device = { + flake-name = "ideapad-slim-5"; + cursors = "aemeath"; + + dm.sddm.enable = true; + dm.gdm.enable = false; + + de.kdePlasma.enable = false; + de.gnome.enable = false; + + wm.niri.enable = false; + wm.hyprland.enable = true; + + bluetooth.enable = true; + flatpak.enable = true; + + programs = { + terminal = "ghostty"; + obs-studio.enable = true; + nixcord.enable = true; + tmux.enable = true; + starship.enable = true; + fastfetch.enable = true; + cider-2.enable = true; + steam.enable = true; + }; + }; + + boot.kernelPackages = pkgs.linuxPackages_latest; + boot.extraModulePackages = [ pkgs.linuxPackages_latest.zenpower ]; + system.stateVersion = "25.11"; +} diff --git a/devices/ideapad-slim-5/hardware-configuration.nix b/devices/ideapad-slim-5/hardware-configuration.nix new file mode 100755 index 0000000..a1eee23 --- /dev/null +++ b/devices/ideapad-slim-5/hardware-configuration.nix @@ -0,0 +1,33 @@ +# 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" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/85ab0f38-b6e7-4046-a33b-ce7b9812b959"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/2221-C55B"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/20e229eb-f32e-4369-be96-25275ebc8ae3"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..9bae294 --- /dev/null +++ b/flake.lock @@ -0,0 +1,1063 @@ +{ + "nodes": { + "aquamarine": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1775558810, + "narHash": "sha256-fy95EdPnqQlpbP8+rk0yWKclWShCUS5VKs6P7/1MF2c=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "7371b669b22aa2af980f913fc312a786d2f1abb2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, + "catppuccin": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1775213373, + "narHash": "sha256-wJHsijC2l/E+ovmlpPGha8pXA6RHSwHWmBV97gvkmyI=", + "owner": "catppuccin", + "repo": "nix", + "rev": "ba73719e673e7c2d89ac2f8df0bc0d48983e4907", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "nix", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "revCount": 69, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1772408722, + "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768135262, + "narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "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" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_3" + }, + "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" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "hyprland", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1775425411, + "narHash": "sha256-KY6HsebJHEe5nHOWP7ur09mb0drGxYSzE3rQxy62rJo=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "0d02ec1d0a05f88ef9e74b516842900c41f0f2fe", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-25.11", + "repo": "home-manager", + "type": "github" + } + }, + "honkai-railway-grub-theme": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1775016235, + "narHash": "sha256-/C6J0Zf6APHUrPXVkXTsOYcQWGzusoO3SVG8bXlLink=", + "owner": "voidlhf", + "repo": "StarRailGrubThemes", + "rev": "4a84e576bb544afbdfc76dbe40ffc50a5c2b16de", + "type": "github" + }, + "original": { + "owner": "voidlhf", + "repo": "StarRailGrubThemes", + "rev": "4a84e576bb544afbdfc76dbe40ffc50a5c2b16de", + "type": "github" + } + }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1772461003, + "narHash": "sha256-pVICsV7FtcEeVwg5y/LFh3XFUkVJninm/P1j/JHzEbM=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "b62396457b9cfe2ebf24fe05404b09d2a40f8ed7", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprgraphics": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1775496928, + "narHash": "sha256-Ds759WU03mGWtu3I43J+5GF5Ni8TvF+GYQUFD+fVeMo=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "cf95d93d17baa18f1d9b016b3afe27f820521a6e", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprgraphics": "hyprgraphics", + "hyprland-guiutils": "hyprland-guiutils", + "hyprland-protocols": "hyprland-protocols", + "hyprlang": "hyprlang", + "hyprutils": "hyprutils", + "hyprwayland-scanner": "hyprwayland-scanner", + "hyprwire": "hyprwire", + "nixpkgs": "nixpkgs_3", + "pre-commit-hooks": "pre-commit-hooks", + "systems": "systems_2", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1775578056, + "narHash": "sha256-TiSPoIM8EBf6Z6Hrne5wX4hPfss1xTRcRfTL6+DfmLo=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "75dc67e63f1873f1e97f73daf0ce284f75afa97c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "Hyprland", + "type": "github" + } + }, + "hyprland-guiutils": { + "inputs": { + "aquamarine": [ + "hyprland", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprtoolkit": "hyprtoolkit", + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1774710575, + "narHash": "sha256-p7Rcw13+gA4Z9EI3oGYe3neQ3FqyOOfZCleBTfhJ95Q=", + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "rev": "0703df899520001209646246bef63358c9881e36", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "type": "github" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1772460177, + "narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1772459629, + "narHash": "sha256-/iwvNUYShmmnwmz/czEUh6+0eF5vCMv0xtDW0STPIuM=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "7615ee388de18239a4ab1400946f3d0e498a8186", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprtoolkit": { + "inputs": { + "aquamarine": [ + "hyprland", + "hyprland-guiutils", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprland-guiutils", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprland-guiutils", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprland-guiutils", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprland-guiutils", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "hyprland-guiutils", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprland-guiutils", + "systems" + ] + }, + "locked": { + "lastModified": 1772462885, + "narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=", + "owner": "hyprwm", + "repo": "hyprtoolkit", + "rev": "9af245a69fa6b286b88ddfc340afd288e00a6998", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprtoolkit", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1774911391, + "narHash": "sha256-c4YVwO33Mmw+FIV8E0u3atJZagHvGTJ9Jai6RtiB8rE=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "e6caa3d4d1427eedbdf556cf4ceb70f2d9c0b56d", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1772459835, + "narHash": "sha256-978jRz/y/9TKmZb/qD4lEYHCQGHpEXGqy+8X2lFZsak=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "0a692d4a645165eebd65f109146b8861e3a925e7", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "hyprwire": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1775414057, + "narHash": "sha256-mDpHnf+MkdOxEqIM1TnckYYh9p1SXR8B3KQfNZ12M8s=", + "owner": "hyprwm", + "repo": "hyprwire", + "rev": "86012ee01b0fdd8bf3101ef38816f2efbee42490", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwire", + "type": "github" + } + }, + "ixx": { + "inputs": { + "flake-utils": [ + "nixvim", + "nuschtosSearch", + "flake-utils" + ], + "nixpkgs": [ + "nixvim", + "nuschtosSearch", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1754860581, + "narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.1.1", + "repo": "ixx", + "type": "github" + } + }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": "nixpkgs_4", + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1775566751, + "narHash": "sha256-5Xkx4NQvl2azAQe3lCZCMUx4FiwGOlEb+I4kyycQYw8=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "6aa49a9c5b82911459e230db5bd64289082d4354", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1756556321, + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.08", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1775561155, + "narHash": "sha256-TK2IrqQivRcwqJa0suZMbcsN17CtA8Uu0v7CDnLATb0=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "599db847f857b8a7ff78ce02f15acab5d5d9fee1", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, + "nix-index-database": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1775365369, + "narHash": "sha256-DgH5mveLoau20CuTnaU5RXZWgFQWn56onQ4Du2CqYoI=", + "owner": "nix-community", + "repo": "nix-index-database", + "rev": "cef5cf82671e749ac87d69aadecbb75967e6f6c3", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-index-database", + "type": "github" + } + }, + "nixcord": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_5", + "nixpkgs-nixcord": "nixpkgs-nixcord" + }, + "locked": { + "lastModified": 1775609538, + "narHash": "sha256-wuEAtQEyYLSTljliQJfCktlaougrr2x72AL3elomMe8=", + "owner": "FlameFlag", + "repo": "nixcord", + "rev": "62128fa01d11c887437114248536438fd3add38d", + "type": "github" + }, + "original": { + "owner": "FlameFlag", + "repo": "nixcord", + "type": "github" + } + }, + "nixos-hardware": { + "locked": { + "lastModified": 1775490113, + "narHash": "sha256-2ZBhDNZZwYkRmefK5XLOusCJHnoeKkoN95hoSGgMxWM=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "c775c2772ba56e906cbeb4e0b2db19079ef11ff7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1775036866, + "narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6201e203d09599479a3b3450ed24fa81537ebc4e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1772328832, + "narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-nixcord": { + "locked": { + "lastModified": 1773222311, + "narHash": "sha256-BHoB/XpbqoZkVYZCfXJXfkR+GXFqwb/4zbWnOr2cRcU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0590cd39f728e129122770c029970378a79d076a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1775305101, + "narHash": "sha256-/74n1oQPtKG52Yw41cbToxspxHbYz6O3vi+XEw16Qe8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "36a601196c4ebf49e035270e10b2d103fe39076b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1774709303, + "narHash": "sha256-D3Q07BbIA2KnTcSXIqqu9P586uWxN74zNoCH3h2ESHg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8110df5ad7abf5d4c0f6fb0f8f978390e77f9685", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1775423009, + "narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1775423009, + "narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1773222311, + "narHash": "sha256-BHoB/XpbqoZkVYZCfXJXfkR+GXFqwb/4zbWnOr2cRcU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0590cd39f728e129122770c029970378a79d076a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1775305101, + "narHash": "sha256-/74n1oQPtKG52Yw41cbToxspxHbYz6O3vi+XEw16Qe8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "36a601196c4ebf49e035270e10b2d103fe39076b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "nixpkgs" + ], + "nuschtosSearch": "nuschtosSearch", + "systems": "systems_4" + }, + "locked": { + "lastModified": 1769049374, + "narHash": "sha256-h0Os2qqNyycDY1FyZgtbn28VF1ySP74/n0f+LDd8j+w=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "b8f76bf5751835647538ef8784e4e6ee8deb8f95", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "nixos-25.11", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils_2", + "ixx": "ixx", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768249818, + "narHash": "sha256-ANfn5OqIxq3HONPIXZ6zuI5sLzX1sS+2qcf/Pa0kQEc=", + "owner": "NuschtOS", + "repo": "search", + "rev": "b6f77b88e9009bfde28e2130e218e5123dc66796", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1775036584, + "narHash": "sha256-zW0lyy7ZNNT/x8JhzFHBsP2IPx7ATZIPai4FJj12BgU=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "4e0eb042b67d863b1b34b3f64d52ceb9cd926735", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "root": { + "inputs": { + "catppuccin": "catppuccin", + "home-manager": "home-manager", + "honkai-railway-grub-theme": "honkai-railway-grub-theme", + "hyprland": "hyprland", + "niri": "niri", + "nix-index-database": "nix-index-database", + "nixcord": "nixcord", + "nixos-hardware": "nixos-hardware", + "nixpkgs": "nixpkgs_6", + "nixvim": "nixvim", + "unstablepkgs": "unstablepkgs" + } + }, + "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": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "unstablepkgs": { + "locked": { + "lastModified": 1775423009, + "narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": [ + "hyprland", + "hyprland-protocols" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1773601989, + "narHash": "sha256-2tJf/CQoHApoIudxHeJye+0Ii7scR0Yyi7pNiWk0Hn8=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "a9b862d1aa000a676d310cc62d249f7ad726233d", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1755491097, + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "388d291e82ffbc73be18169d39470f340707edaa", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.7", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1773622265, + "narHash": "sha256-wToKwH7IgWdGLMSIWksEDs4eumR6UbbsuPQ42r0oTXQ=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "a879e5e0896a326adc79c474bf457b8b99011027", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c0b05da --- /dev/null +++ b/flake.nix @@ -0,0 +1,70 @@ +{ + description = "The Asa's nix configurations"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; + unstablepkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + catppuccin.url = "github:catppuccin/nix"; + + niri.url = "github:sodiboo/niri-flake"; + hyprland.url = "github:hyprwm/Hyprland"; + nixcord.url = "github:FlameFlag/nixcord"; + + honkai-railway-grub-theme.url = "github:voidlhf/StarRailGrubThemes/4a84e576bb544afbdfc76dbe40ffc50a5c2b16de"; + + nix-index-database = { + url = "github:nix-community/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + home-manager = { + url = "github:nix-community/home-manager/release-25.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + nixvim = { + url = "github:nix-community/nixvim/nixos-25.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = + { + self, + nixpkgs, + unstablepkgs, + ... + }@inputs: + let + libs = import ./libs/default.nix inputs; + custom = import ./packages/default.nix inputs; + unstable = import unstablepkgs { + system = "x86_64-linux"; + config.allowUnfree = true; + }; + in + { + nixosConfigurations = { + ideapad-slim-5 = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit + self + custom + libs + unstable + inputs + ; + }; + modules = [ + inputs.nixos-hardware.nixosModules.lenovo-ideapad-slim-5 + inputs.nix-index-database.nixosModules.default + inputs.home-manager.nixosModules.default + (libs.root "/devices/ideapad-slim-5/configuration.nix") + ]; + }; + }; + }; +} + diff --git a/home/asakiyuki/configuration.nix b/home/asakiyuki/configuration.nix new file mode 100644 index 0000000..6cca440 --- /dev/null +++ b/home/asakiyuki/configuration.nix @@ -0,0 +1,43 @@ +{ + inputs, + config, + pkgs, + custom, + ... +}: +let + osconfig = config; +in +{ + users.users.asakiyuki = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + }; + + home-manager.users.asakiyuki = { + _module.args = { inherit inputs osconfig custom; }; + imports = [ + ./modules/programs.nix + ./modules/files.nix + + ../../modules/features/home/theme.nix + + inputs.catppuccin.homeModules.catppuccin + inputs.nixvim.homeModules.nixvim + inputs.nixcord.homeModules.nixcord + inputs.niri.homeModules.niri + ]; + + home = { + username = "asakiyuki"; + stateVersion = "25.11"; + pointerCursor = + (custom.cursors { + name = osconfig.device.cursors; + size = 48; + }) + { pkgs = pkgs; }; + }; + }; +} + diff --git a/home/asakiyuki/modules/env.nix b/home/asakiyuki/modules/env.nix new file mode 100644 index 0000000..31d7eb7 --- /dev/null +++ b/home/asakiyuki/modules/env.nix @@ -0,0 +1,5 @@ +{ ... }: { + home.sessionVariables = { + QT_QPA_PLATFORMTHEME = "qt6ct"; + }; +} \ No newline at end of file diff --git a/home/asakiyuki/modules/files.nix b/home/asakiyuki/modules/files.nix new file mode 100644 index 0000000..189fdb1 --- /dev/null +++ b/home/asakiyuki/modules/files.nix @@ -0,0 +1,19 @@ +{ pkgs, osconfig, ... }: +{ + home.file = { + ".config/qt5ct/colors/Catppuccin-Mocha.conf".source = "${pkgs.catppuccin-qt5ct}/share/qt5ct/colors/Catppuccin-Mocha.conf"; + ".config/qt6ct/colors/Catppuccin-Mocha.conf".source = "${pkgs.catppuccin-qt5ct}/share/qt5ct/colors/Catppuccin-Mocha.conf"; + }; + + xdg.configFile = { + kdeglobals.text = builtins.readFile ((pkgs.catppuccin-kde.override { flavour = ["mocha"]; accents = ["sapphire"]; }) + "/share/color-schemes/CatppuccinMochaSapphire.colors") + + '' + + [UiSettings] + ColorScheme=qt6ct + + [General] + TerminalApplication=${osconfig.device.programs.terminal} + ''; + }; +} \ No newline at end of file diff --git a/home/asakiyuki/modules/programs.nix b/home/asakiyuki/modules/programs.nix new file mode 100644 index 0000000..3076c0a --- /dev/null +++ b/home/asakiyuki/modules/programs.nix @@ -0,0 +1,20 @@ +{ lib, osconfig, ... }: { + imports = [ + (../../../modules/features/home/ghostty.nix) + (../../../modules/features/home/kitty.nix) + + (../../../modules/features/home/bash.nix) + (../../../modules/features/home/starship.nix) + (../../../modules/features/home/tmux.nix) + (../../../modules/features/home/fastfetch.nix) + (../../../modules/features/home/vscode.nix) + (../../../modules/features/home/obs-studio.nix) + (../../../modules/features/home/xdg.nix) + (../../../modules/features/home/packages.nix) + + (../../../modules/programs/nixvim/_nixvim.nix) + (../../../modules/programs/nixcord/default.nix) + (../../../modules/features/home/niri.nix) + (../../../modules/programs/hyprland/default.nix) + ]; +} \ No newline at end of file diff --git a/host/desktop/default.nix b/host/desktop/default.nix new file mode 100644 index 0000000..885fd44 --- /dev/null +++ b/host/desktop/default.nix @@ -0,0 +1,28 @@ +{ libs, ... }: +{ + imports = [ + (libs.root "/modules/hardware/default.nix") + + (libs.root "/modules/fonts.nix") + + (libs.root "/modules/features/system/packages.nix") + (libs.root "/modules/features/system/boot.nix") + (libs.root "/modules/features/system/sddm.nix") + (libs.root "/modules/features/system/gdm.nix") + (libs.root "/modules/features/system/kde-plasma.nix") + (libs.root "/modules/features/system/gnome.nix") + (libs.root "/modules/features/system/niri.nix") + (libs.root "/modules/features/system/hyprland.nix") + (libs.root "/modules/features/system/input-method.nix") + (libs.root "/modules/features/system/steam.nix") + (libs.root "/modules/features/system/nix-dl.nix") + (libs.root "/modules/features/system/flatpak.nix") + + (libs.root "/modules/services/default.nix") + (libs.root "/modules/home-manager.nix") + + (libs.root "/options/desktop/default.nix") + (libs.root "/overlays/nixpkgs.nix") + ]; +} + diff --git a/libs/default.nix b/libs/default.nix new file mode 100644 index 0000000..1d9bb1b --- /dev/null +++ b/libs/default.nix @@ -0,0 +1,3 @@ +{ ... }: { + root = path: ../. + path; +} \ No newline at end of file diff --git a/modules/features/home/bash.nix b/modules/features/home/bash.nix new file mode 100644 index 0000000..a826f42 --- /dev/null +++ b/modules/features/home/bash.nix @@ -0,0 +1,62 @@ +{ lib, osconfig, ... }: { + programs.bash = { + enable = true; + shellAliases = { + cls = "clear"; + cleanup = "sudo nix-collect-garbage -d"; + cls-log = "sudo journalctl --vacuum-time=1s"; + + logout = "pkill -KILL -u $USER"; + + nrs = "sudo nixos-rebuild switch --flake /etc/nixos#${osconfig.device.flake-name}"; + wss = "waydroid session stop; exit;"; + flake-upgrade = "nix flake update"; + spf = "superfile"; + }; + + shellOptions = [ + "histappend" + "checkwinsize" + "extglob" + "globstar" + "checkjobs" + "autocd" + ]; + + initExtra = '' + function git-commit() { + git add . + git commit -m "$1" + } + + function git-push() { + git-commit "$1" + git push origin HEAD + } + + function git-pull() { + git fetch origin HEAD + git pull origin HEAD + } + + function get-hash() { + nix hash to-sri --type sha256 $(nix-prefetch-url --unpack "$1") + } + '' + + lib.optionalString osconfig.device.programs.tmux.enable '' + allowed_terms=("xterm-kitty" "xterm-ghostty") + + should_run_tmux=false + for term in "${"$" + "{allowed_terms[@]" + "}"}"; do + if [[ "$TERM" == "$term" ]]; then + should_run_tmux=true + break + fi + done + + if [ -z "$TMUX" ] && [ "$should_run_tmux" = true ]; then + exec tmux + fi + ''; + }; +} \ No newline at end of file diff --git a/modules/features/home/fastfetch.nix b/modules/features/home/fastfetch.nix new file mode 100644 index 0000000..57a8302 --- /dev/null +++ b/modules/features/home/fastfetch.nix @@ -0,0 +1,176 @@ +{ lib, osconfig, ... }: +{ + programs.fastfetch = lib.mkIf osconfig.device.programs.fastfetch.enable { + enable = true; + settings = { + logo = { + padding.top = 1; + color = { + "1" = "#89b4fa"; + "2" = "#cdd6f4"; + "3" = "#89b4fa"; + "4" = "#cdd6f4"; + "5" = "#89b4fa"; + "6" = "#cdd6f4"; + }; + }; + + display = { + color = { + title = "#cdd6f4"; + output = "#cdd6f4"; + separator = "black"; + }; + + bar = { + width = 10; + charTotal = " "; + border.left = "["; + border.right = "]"; + char.elapsed = "█"; + color = { + border = "green"; + elapsed = "green"; + total = "black"; + }; + }; + + percent = { + type = 3; + color = { + green = "green"; + yellow = "yellow"; + red = "red"; + }; + }; + + separator = " "; + brightColor = true; + }; + + modules = [ + { + type = "title"; + format = " {user-name}@{host-name}"; + outputColor = "bright_yellow"; + } + + { + type = "separator"; + string = "─"; + length = 24; + outputColor = "white"; + } + + { + type = "os"; + key = "╭─"; + keyColor = "green"; + } + { + type = "kernel"; + key = "├─󰌽"; + keyColor = "green"; + } + { + type = "shell"; + key = "├─"; + keyColor = "green"; + } + { + type = "packages"; + key = "├─󰆧"; + keyColor = "green"; + } + { + type = "uptime"; + key = "╰─󱑁"; + keyColor = "green"; + } + + "break" + + { + type = "host"; + keyColor = "blue"; + key = "╭─󰧨"; + } + { + type = "cpu"; + key = "├─"; + keyColor = "blue"; + } + { + type = "gpu"; + key = "├─"; + keyColor = "blue"; + } + { + type = "sound"; + key = "├─"; + format = "{name}"; + keyColor = "blue"; + } + { + type = "memory"; + format = "{percentage-bar} {used} / {total}"; + key = "├─"; + keyColor = "blue"; + } + { + type = "disk"; + format = "{size-percentage-bar} {name} ({mountpoint}) {size-used} / {size-total} - {filesystem}"; + key = "├─󰋊"; + keyColor = "blue"; + } + { + type = "localip"; + key = "╰─"; + keyColor = "blue"; + } + + "break" + + { + type = "terminal"; + key = "╭─"; + keyColor = "yellow"; + } + { + type = "wm"; + key = "├─󰨇"; + keyColor = "yellow"; + } + { + type = "de"; + key = "├─󰨇"; + keyColor = "yellow"; + } + { + type = "bios"; + key = "├─"; + keyColor = "yellow"; + } + { + type = "theme"; + key = "├─󱓓"; + keyColor = "yellow"; + } + { + type = "icons"; + key = "├─󱓓"; + keyColor = "yellow"; + } + { + type = "cursor"; + key = "╰─󱓓"; + keyColor = "yellow"; + } + + "break" + "colors" + ]; + }; + }; +} + diff --git a/modules/features/home/ghostty.nix b/modules/features/home/ghostty.nix new file mode 100644 index 0000000..edb78b4 --- /dev/null +++ b/modules/features/home/ghostty.nix @@ -0,0 +1,50 @@ +{ lib, osconfig, ... }: { + programs.ghostty = lib.mkIf (osconfig.device.programs.terminal == "ghostty") { + enable = true; + settings = { + theme = "catppuccin-mocha"; + + font-size = 10; + font-family = "SauceCodePro NFP Bold"; + + window-width = 230; + window-height = 68; + + window-padding-x = 5; + window-padding-y = 0; + + keybind = [ + "ctrl+shift+n=unbind" + "ctrl+shift+i=unbind" + ]; + }; + + themes = { + catppuccin-mocha = { + background = "1e1e2e"; + cursor-color = "f5e0dc"; + foreground = "cdd6f4"; + palette = [ + "0=#45475a" + "1=#f38ba8" + "2=#a6e3a1" + "3=#f9e2af" + "4=#89b4fa" + "5=#f5c2e7" + "6=#94e2d5" + "7=#bac2de" + "8=#585b70" + "9=#f38ba8" + "10=#a6e3a1" + "11=#f9e2af" + "12=#89b4fa" + "13=#f5c2e7" + "14=#94e2d5" + "15=#a6adc8" + ]; + selection-background = "353749"; + selection-foreground = "cdd6f4"; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/features/home/kitty.nix b/modules/features/home/kitty.nix new file mode 100644 index 0000000..7631d3e --- /dev/null +++ b/modules/features/home/kitty.nix @@ -0,0 +1,75 @@ +{ lib, osconfig, ... }: { + programs.kitty = lib.mkIf (osconfig.device.programs.terminal == "kitty") { + enable = true; + + keybindings = { + "ctrl+c" = "copy_to_clipboard"; + "ctrl+v" = "paste_from_clipboard"; + }; + + settings = { + window_padding_width = 2; + window_padding_height = 2; + + cursor_shape = "beam"; + # background_opacity = 0.5; + + font_family = "Tahoma"; + font_size = 9; + + foreground = "#cdd6f4"; + background = "#1e1e2e"; + selection_foreground = "#1e1e2e"; + selection_background = "#f5e0dc"; + + cursor = "#f5e0dc"; + cursor_text_color = "#1e1e2e"; + + url_color = "#f5e0dc"; + + active_border_color = "#b4befe"; + inactive_border_color = "#6c7086"; + bell_border_color = "#f9e2af"; + + wayland_titlebar_color = "system"; + macos_titlebar_color = "system"; + + active_tab_foreground = "#11111b"; + active_tab_background = "#cba6f7"; + inactive_tab_foreground = "#cdd6f4"; + inactive_tab_background = "#181825"; + tab_bar_background = "#11111b"; + + mark1_foreground = "#1e1e2e"; + mark1_background = "#b4befe"; + mark2_foreground = "#1e1e2e"; + mark2_background = "#cba6f7"; + mark3_foreground = "#1e1e2e"; + mark3_background = "#74c7ec"; + + color0 = "#45475a"; + color8 = "#585b70"; + + color1 = "#f38ba8"; + color9 = "#f38ba8"; + + color2 = "#a6e3a1"; + color10 = "#a6e3a1"; + + color3 = "#f9e2af"; + color11 = "#f9e2af"; + + color4 = "#89b4fa"; + color12 = "#89b4fa"; + + color5 = "#f5c2e7"; + color13 = "#f5c2e7"; + + color6 = "#94e2d5"; + color14 = "#94e2d5"; + + color7 = "#bac2de"; + color15 = "#a6adc8"; + }; + }; +} \ No newline at end of file diff --git a/modules/features/home/niri.nix b/modules/features/home/niri.nix new file mode 100644 index 0000000..5e99097 --- /dev/null +++ b/modules/features/home/niri.nix @@ -0,0 +1,11 @@ +{ osconfig, lib, ... }: { + programs.niri = lib.mkIf osconfig.device.wm.niri.enable { + enable = true; + settings = { + binds = { + # "Ctrl+Alt+T" = "ghostty"; + # "Mod+D" = "fuzzel"; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/features/home/obs-studio.nix b/modules/features/home/obs-studio.nix new file mode 100644 index 0000000..5ac8cac --- /dev/null +++ b/modules/features/home/obs-studio.nix @@ -0,0 +1,5 @@ +{ pkgs, custom, lib, osconfig, ... }: +lib.mkIf osconfig.device.programs.obs-studio.enable { + programs.obs-studio.enable = true; + home.file.".config/obs-studio/themes".source = pkgs.callPackage custom.catppuccin-obs { }; +} \ No newline at end of file diff --git a/modules/features/home/packages.nix b/modules/features/home/packages.nix new file mode 100644 index 0000000..eec6614 --- /dev/null +++ b/modules/features/home/packages.nix @@ -0,0 +1,14 @@ +{ + pkgs, + lib, + osconfig, + ... +}: +{ + home.packages = with pkgs; [ + hyprshot + antigravity + + (lib.mkIf osconfig.device.programs.cider-2.enable cider-2) + ]; +} diff --git a/modules/features/home/starship.nix b/modules/features/home/starship.nix new file mode 100644 index 0000000..4743be5 --- /dev/null +++ b/modules/features/home/starship.nix @@ -0,0 +1,81 @@ +{ lib, osconfig, ... }: { + programs.starship = lib.mkIf osconfig.device.programs.starship.enable { + enable = true; + settings = { + add_newline = true; + scan_timeout = 10; + + format = '' + $os $shell $cmake$java$nodejs$git_branch$character + $cmd_duration$sudo$directory > ''; + + sudo = { + format = "[$symbol]($style) "; + symbol = ""; + disabled = false; + }; + + java = { + format = "[$symbol $version]($style) "; + symbol = ""; + }; + + cmake = { + format = "[$symbol $version](bold blue) "; + symbol = ""; + }; + + nodejs = { + format = "[$symbol $version](bold green) "; + symbol = "󰎙"; + }; + + git_branch = { + format = "[$symbol $branch]($style) "; + symbol = ""; + style = "red"; + disabled = false; + }; + + directory = { + format = "[$read_only]($read_only_style)[$path]($style)"; + style = "#2e8be8"; + truncation_length = 2; + read_only = "󰌾 "; + }; + + character = { + success_symbol = "[](green)"; + error_symbol = "[](red)"; + disabled = false; + }; + + cmd_duration = { + min_time = 1; + format = "[\\[$duration\\]]($style) "; + style = "#C0C0C0"; + show_milliseconds = true; + }; + + shell = { + disabled = false; + bash_indicator = "bash"; + fish_indicator = "fish"; + zsh_indicator = "zsh"; + powershell_indicator = "pwsh"; + format = "[$indicator]($style)"; + style = "white"; + }; + + os = { + format = "[$symbol]($style)"; + disabled = false; + symbols = { + Arch = "[󰣇](bold blue)"; + Windows = "[](bold blue)"; + NixOS = "[](bold blue)"; + }; + }; + }; + }; +} diff --git a/modules/features/home/theme.nix b/modules/features/home/theme.nix new file mode 100644 index 0000000..bcd3751 --- /dev/null +++ b/modules/features/home/theme.nix @@ -0,0 +1,50 @@ +{ pkgs, lib, ... }: +let + catppuccin-gtk = pkgs.catppuccin-gtk.override { + variant = "mocha"; + accents = [ "sapphire" ]; + size = "compact"; + }; +in +{ + home.activation.copyGtkTheme = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + mkdir -p "$HOME/.themes/" + + if [ ! -d "$HOME/.themes/catppuccin-mocha-sapphire-compact" ]; then + cp -r "${catppuccin-gtk}/share/themes/catppuccin-mocha-sapphire-compact" "$HOME/.themes/" + fi + + if [ ! -d "$HOME/.themes/catppuccin-mocha-sapphire-compact-hdpi" ]; then + cp -r "${catppuccin-gtk}/share/themes/catppuccin-mocha-sapphire-compact-hdpi" "$HOME/.themes/" + fi + + if [ ! -d "$HOME/.themes/catppuccin-mocha-sapphire-compact-xhdpi" ]; then + cp -r "${catppuccin-gtk}/share/themes/catppuccin-mocha-sapphire-compact-xhdpi" "$HOME/.themes/" + fi + ''; + + # QT + qt = { + enable = true; + platformTheme.name = "qtct"; + style = { + package = with pkgs; [ + catppuccin-qt5ct + catppuccin-kde + kdePackages.breeze + ]; + }; + }; + + # GTK + gtk.theme.name = "catppuccin-mocha-sapphire-compact"; + + # Catppuccin + catppuccin = { + accent = "blue"; + flavor = "mocha"; + + fcitx5.enable = true; + obs.enable = true; + }; +} \ No newline at end of file diff --git a/modules/features/home/tmux.nix b/modules/features/home/tmux.nix new file mode 100644 index 0000000..1a2b2c0 --- /dev/null +++ b/modules/features/home/tmux.nix @@ -0,0 +1,81 @@ +{ lib, osconfig, pkgs, ... }: +let + TOP_PANEL = '' + set -g pane-border-status top + set -g pane-border-lines single + set -g pane-border-indicators colour + + set -g pane-border-format "#{E:@asa-module-icon} #{pane_index} #{E:@asa-module-text} #{pane_current_path} #[default]" + ''; + + OPTIONS = '' + set-option -g destroy-unattached on + set -g allow-passthrough on + ''; + + BINDS = '' + unbind r + bind r source-file ~/.config/tmux/tmux.conf; + ''; + + BOTTOM_PANEL = '' + set -g status-justify "centre" + + set -g window-status-format "#{E:@asa-module-icon} #I #{E:@asa-module-text} #W " + set -g window-status-current-format "#{E:@asa-module-icon} #I #{E:@asa-module-text} #W " + + set -gg status-left "#{E:@asa-module-text} %A %d/%m/%Y #[default] " + set -ag status-left "#{E:@asa-module-text} %I:%M %p #[default] " + set -g status-left-length 100 + + set -g status-right "#{E:@asa-module-icon}  #{E:@asa-module-text} #S #[default] " + set -ag status-right "#{E:@asa-module-icon} CPU #{E:@asa-module-text} #{cpu_percentage} #[default] " + set -ag status-right "#{E:@asa-module-icon} RAM #{E:@asa-module-text} #{ram_percentage} " + set -g status-right-length 100 + + setw -g automatic-rename off + ''; + + CATPPUCCIN = '' + set -g @catppuccin_flavor 'mocha' + set -ogq @asa-module-icon "#[bg=#{E:@thm_sapphire},fg=#{E:@thm_surface_0}]" + set -ogq @asa-module-text "#[bg=#{E:@thm_surface_0},fg=#{E:@thm_fg}]" + ''; + + YANK = '' + set -g @yank_selection 'primary' + set -g @yank_selection_mouse 'primary' + ''; + + EXTRA_CONFIG = '' + bind-key -T copy-mode-vi v send-keys -X begin-selection + bind-key -T copy-mode-vi V send-keys -X select-line + bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle + bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel + ''; +in +{ + programs.tmux = lib.mkIf osconfig.device.programs.tmux.enable { + enable = true; + keyMode = "vi"; + disableConfirmationPrompt = true; + prefix = "c-a"; + + extraConfig = TOP_PANEL + OPTIONS + BINDS + EXTRA_CONFIG; + + plugins = with pkgs.tmuxPlugins; [ + { + plugin = yank; + extraConfig = YANK; + } + { + plugin = catppuccin; + extraConfig = CATPPUCCIN; + } + { + plugin = cpu; + extraConfig = BOTTOM_PANEL; + } + ]; + }; +} diff --git a/modules/features/home/vscode.nix b/modules/features/home/vscode.nix new file mode 100644 index 0000000..3aa606a --- /dev/null +++ b/modules/features/home/vscode.nix @@ -0,0 +1,5 @@ +{ ... }: { + programs.vscode = { + enable = true; + }; +} \ No newline at end of file diff --git a/modules/features/home/xdg.nix b/modules/features/home/xdg.nix new file mode 100644 index 0000000..1eb7cd0 --- /dev/null +++ b/modules/features/home/xdg.nix @@ -0,0 +1,14 @@ +{ pkgs, lib, osconfig, ... }: { + xdg.portal = lib.mkIf osconfig.device.wm.hyprland.enable { + enable = true; + xdgOpenUsePortal = true; + config = { + common.default = ["gtk"]; + hyprland.default = ["gtk" "hyprland"]; + }; + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + pkgs.xdg-desktop-portal-hyprland + ]; + }; +} \ No newline at end of file diff --git a/modules/features/system/boot.nix b/modules/features/system/boot.nix new file mode 100644 index 0000000..f19f953 --- /dev/null +++ b/modules/features/system/boot.nix @@ -0,0 +1,24 @@ +{ inputs, pkgs, libs, ... }: let + background = libs.root "/assets/grub/background.png"; + baseTheme = inputs.honkai-railway-grub-theme.packages.${pkgs.stdenv.hostPlatform.system}.cyrene-grub-theme; +in { + boot = { + loader = { + efi.canTouchEfiVariables = true; + + grub = rec { + enable = true; + device = "nodev"; + efiSupport = true; + useOSProber = true; + splashImage = background; + theme = pkgs.runCommand "my-grub-theme" { } '' + mkdir -p $out + cp -r ${baseTheme}/* $out/ + chmod -R u+w $out + cp ${background} $out/background.png + ''; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/features/system/flatpak.nix b/modules/features/system/flatpak.nix new file mode 100644 index 0000000..b362b71 --- /dev/null +++ b/modules/features/system/flatpak.nix @@ -0,0 +1,5 @@ +{ lib, config, ... }: { + services.flatpak = lib.mkIf config.device.flatpak.enable { + enable = true; + }; +} \ No newline at end of file diff --git a/modules/features/system/gdm.nix b/modules/features/system/gdm.nix new file mode 100644 index 0000000..4583e78 --- /dev/null +++ b/modules/features/system/gdm.nix @@ -0,0 +1,5 @@ +{ lib, config, ... }: { + services = lib.mkIf config.device.dm.gdm.enable { + displayManager.gdm.enable = true; + }; +} \ No newline at end of file diff --git a/modules/features/system/gnome.nix b/modules/features/system/gnome.nix new file mode 100644 index 0000000..b434dea --- /dev/null +++ b/modules/features/system/gnome.nix @@ -0,0 +1,5 @@ +{ lib, config, ... }: { + services = lib.mkIf config.device.de.gnome.enable { + desktopManager.gnome.enable = true; + }; +} \ No newline at end of file diff --git a/modules/features/system/hyprland.nix b/modules/features/system/hyprland.nix new file mode 100644 index 0000000..8500ce4 --- /dev/null +++ b/modules/features/system/hyprland.nix @@ -0,0 +1,5 @@ +{ lib, config, ... }: { + programs.hyprland = lib.mkIf config.device.wm.hyprland.enable { + enable = true; + }; +} \ No newline at end of file diff --git a/modules/features/system/input-method.nix b/modules/features/system/input-method.nix new file mode 100644 index 0000000..c2ca486 --- /dev/null +++ b/modules/features/system/input-method.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: { + i18n.inputMethod = { + enable = true; + type = "fcitx5"; + fcitx5.addons = with pkgs; [ + # fcitx5-bamboo + kdePackages.fcitx5-unikey + ]; + }; +} \ No newline at end of file diff --git a/modules/features/system/kde-plasma.nix b/modules/features/system/kde-plasma.nix new file mode 100644 index 0000000..b615e2e --- /dev/null +++ b/modules/features/system/kde-plasma.nix @@ -0,0 +1,6 @@ +{ lib, config, ... }: { + services = lib.mkIf config.device.de.kdePlasma.enable { + desktopManager.plasma6.enable = true; + xserver.enable = true; + }; +} \ No newline at end of file diff --git a/modules/features/system/niri.nix b/modules/features/system/niri.nix new file mode 100644 index 0000000..8928447 --- /dev/null +++ b/modules/features/system/niri.nix @@ -0,0 +1,4 @@ +{ lib, config, ... }: { + programs.niri.enable = lib.mkIf config.device.wm.niri.enable true; + services.xserver.enable = lib.mkIf config.device.wm.niri.enable true; +} \ No newline at end of file diff --git a/modules/features/system/nix-dl.nix b/modules/features/system/nix-dl.nix new file mode 100644 index 0000000..a43a7a7 --- /dev/null +++ b/modules/features/system/nix-dl.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: { + programs.nix-ld = { + enable = true; + libraries = with pkgs; [ + stdenv.cc.cc + zlib + brotli + unixODBC + zstd + glib + stdenv.cc.cc.lib + ]; + }; +} \ No newline at end of file diff --git a/modules/features/system/packages.nix b/modules/features/system/packages.nix new file mode 100644 index 0000000..1a8805b --- /dev/null +++ b/modules/features/system/packages.nix @@ -0,0 +1,67 @@ +{ + pkgs, + lib, + config, + ... +}: +{ + environment.systemPackages = + with pkgs; + [ + git + vim + wget + tree + btop + ffmpeg-full + nodejs + bun + brightnessctl + + quickshell + bluetuith + lxqt.pavucontrol-qt + nwg-look + + (pkgs.catppuccin-kde.override { + flavour = [ "mocha" ]; + accents = [ "sapphire" ]; + }) + + (pkgs.catppuccin-gtk.override { + variant = "mocha"; + accents = [ "sapphire" ]; + size = "compact"; + }) + ] + ++ ( + with pkgs; + with kdePackages; + [ + dolphin + kate + qt5compat + qtdeclarative + libsForQt5.qt5.qtgraphicaleffects + qtimageformats + qtsvg + qtmultimedia + kde-gtk-config + qtdeclarative + kirigami + ksvg + qtbase + plasma5support + qttools + plasma-sdk + ] + ) + ++ (lib.optionals config.device.wm.hyprland.enable ( + with pkgs; + [ + xdg-desktop-portal + xdg-desktop-portal-wlr + xdg-desktop-portal-hyprland + ] + )); +} diff --git a/modules/features/system/sddm.nix b/modules/features/system/sddm.nix new file mode 100644 index 0000000..8cd7fd7 --- /dev/null +++ b/modules/features/system/sddm.nix @@ -0,0 +1,24 @@ +{ pkgs, lib, config, ... }: let + custom-sddm-astronaut = pkgs.sddm-astronaut.override { + embeddedTheme = config.device.dm.sddm.theme; + }; +in { + services.displayManager.sddm = lib.mkIf config.device.dm.sddm.enable { + enable = true; + wayland.enable = true; + extraPackages = with pkgs; [ + custom-sddm-astronaut + ]; + theme = "sddm-astronaut-theme"; + settings = { + Theme = { + Current = "sddm-astronaut-theme"; + }; + }; + }; + + environment.systemPackages = with pkgs; [ + custom-sddm-astronaut + kdePackages.qtmultimedia + ]; +} \ No newline at end of file diff --git a/modules/features/system/steam.nix b/modules/features/system/steam.nix new file mode 100644 index 0000000..8329534 --- /dev/null +++ b/modules/features/system/steam.nix @@ -0,0 +1,5 @@ +{ lib, config, ... }: { + programs.steam = lib.mkIf config.device.programs.steam.enable { + enable = true; + }; +} \ No newline at end of file diff --git a/modules/fonts.nix b/modules/fonts.nix new file mode 100644 index 0000000..315ae1f --- /dev/null +++ b/modules/fonts.nix @@ -0,0 +1,86 @@ +{ pkgs, ... }: +let + fetch-fonts = { + segoe-ui = { + light = pkgs.fetchurl { + url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.ttf"; + sha256 = "1bqbvpxqflh4an5ciawrkl0bxy58vqhxiynspcvpx1zyryxcjlhm"; + }; + + semilight = pkgs.fetchurl { + url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.ttf"; + sha256 = "1y6rfxdwwfq1bgk7fj4bvhck1di6whw5h0yby8gj7x6y1cv4ka1p"; + }; + + normal = pkgs.fetchurl { + url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.ttf"; + sha256 = "0ac4hgmlxl6cgak7g39rvfk25gs3fm5wlnmc7mbpv38i7mkppiaf"; + }; + + bold = pkgs.fetchurl { + url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.ttf"; + sha256 = "147mk64y2hihy6s29dlgimcrfi7ihi68qjcrfdzqk6cvk8kr3f0q"; + }; + + semibold = pkgs.fetchurl { + url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.ttf"; + sha256 = "0whxgk9q4j9pd3k462m0dyr39q7vk2lxla5whcckyfrks983c4nj"; + }; + }; + }; + + custom = { + tahoma = pkgs.stdenv.mkDerivation { + pname = "tahoma"; + version = "1.0"; + dontUnpack = true; + + src = pkgs.fetchurl { + url = "https://www.asakiyuki.com/static/fonts/Tahoma.ttf"; + sha256 = "129l1cprplci2xmxi0gnsjrvprr48xqp8kr5s9lrwcnaxvb4z4ni"; + }; + + installPhase = '' + mkdir -p $out/share/fonts/truetype + cp $src $out/share/fonts/truetype/ + ''; + }; + + segoe-ui = pkgs.stdenv.mkDerivation { + pname = "segoe-ui"; + version = "1.0"; + dontUnpack = true; + + installPhase = '' + mkdir -p $out/share/fonts/truetype + + cp ${fetch-fonts.segoe-ui.light} $out/share/fonts/truetype + cp ${fetch-fonts.segoe-ui.semilight} $out/share/fonts/truetype + cp ${fetch-fonts.segoe-ui.normal} $out/share/fonts/truetype + cp ${fetch-fonts.segoe-ui.bold} $out/share/fonts/truetype + cp ${fetch-fonts.segoe-ui.semibold} $out/share/fonts/truetype + ''; + }; + }; +in +{ + fonts.enableDefaultPackages = true; + fonts.packages = with pkgs; [ + custom.tahoma + custom.segoe-ui + + # Nerd fonts + nerd-fonts.sauce-code-pro + + # Unicode fonts + noto-fonts + noto-fonts-cjk-sans + noto-fonts-color-emoji + liberation_ttf + fira-code + fira-code-symbols + mplus-outline-fonts.githubRelease + dina-font + proggyfonts + ]; +} \ No newline at end of file diff --git a/modules/hardware/bluetooth.nix b/modules/hardware/bluetooth.nix new file mode 100644 index 0000000..53cedb6 --- /dev/null +++ b/modules/hardware/bluetooth.nix @@ -0,0 +1,3 @@ +{ config, ... }: { + hardware.bluetooth.enable = config.device.bluetooth.enable; +} \ No newline at end of file diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix new file mode 100644 index 0000000..dd6ae6f --- /dev/null +++ b/modules/hardware/default.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ./bluetooth.nix + ]; +} \ No newline at end of file diff --git a/modules/home-manager.nix b/modules/home-manager.nix new file mode 100644 index 0000000..b3c526a --- /dev/null +++ b/modules/home-manager.nix @@ -0,0 +1,7 @@ +{ ... }: { + home-manager = { + useUserPackages = true; + useGlobalPkgs = true; + backupFileExtension = "bak"; + }; +} \ No newline at end of file diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix new file mode 100644 index 0000000..7adae6a --- /dev/null +++ b/modules/programs/hyprland/default.nix @@ -0,0 +1,13 @@ +{ lib, osconfig, ... }: +{ + imports = [ + ./settings/default.nix + ]; + + wayland.windowManager.hyprland = lib.mkIf osconfig.device.wm.hyprland.enable { + enable = true; + xwayland.enable = true; + + }; +} + diff --git a/modules/programs/hyprland/settings/default.nix b/modules/programs/hyprland/settings/default.nix new file mode 100644 index 0000000..6696ee9 --- /dev/null +++ b/modules/programs/hyprland/settings/default.nix @@ -0,0 +1,15 @@ +{ osconfig, ... }: +{ + imports = [ + ./key-bind.nix + ./theme.nix + ./exec.nix + ./window-rules.nix + ./input.nix + ]; + + wayland.windowManager.hyprland.settings = { + monitor = osconfig.device.wm.hyprland.monitors; + }; +} + diff --git a/modules/programs/hyprland/settings/exec.nix b/modules/programs/hyprland/settings/exec.nix new file mode 100644 index 0000000..7b6050a --- /dev/null +++ b/modules/programs/hyprland/settings/exec.nix @@ -0,0 +1,8 @@ +{ ... }: +{ + wayland.windowManager.hyprland.settings.exec-once = [ + "quickshell" + "fcitx5" + ]; +} + diff --git a/modules/programs/hyprland/settings/input.nix b/modules/programs/hyprland/settings/input.nix new file mode 100644 index 0000000..c50caa2 --- /dev/null +++ b/modules/programs/hyprland/settings/input.nix @@ -0,0 +1,5 @@ +{ ... }: { + wayland.windowManager.hyprland.settings.input = { + touchpad.natural_scroll = true; + }; +} \ No newline at end of file diff --git a/modules/programs/hyprland/settings/key-bind.nix b/modules/programs/hyprland/settings/key-bind.nix new file mode 100644 index 0000000..9af8ff4 --- /dev/null +++ b/modules/programs/hyprland/settings/key-bind.nix @@ -0,0 +1,47 @@ +{ osconfig, ... }: +{ + wayland.windowManager.hyprland.settings.bind = [ + "CTRL ALT, T, exec, ${osconfig.device.programs.terminal}" + + "ALT, F4, killactive" + "SUPER SHIFT, L, exit," + "SUPER SHIFT, TAB, togglefloating," + "SUPER SHIFT, S, exec, hyprshot -m region -o '~/Pictures/Screenshot/' -z" + "SUPER, J, togglesplit," + "SUPER, E, exec, dolphin" + + "SUPER, left, movefocus, l" + "SUPER, right, movefocus, r" + "SUPER, up, movefocus, u" + "SUPER, down, movefocus, d" + + "SUPER CTRL, left, movewindow, l" + "SUPER CTRL, right, movewindow, r" + "SUPER CTRL, up, movewindow, u" + "SUPER CTRL, down, movewindow, d" + + "SUPER, tab, workspace, e+1" + "SUPER, mouse_down, workspace, e-1" + "SUPER, mouse_up, workspace, e+1" + + "ALT, space, global, asakiyuki:launcher" + + ",XF86MonBrightnessDown, exec, brightnessctl s 5%-" + ",XF86MonBrightnessUp, exec, brightnessctl s +5%" + ] + ++ builtins.concatLists ( + builtins.genList (i: [ + "SUPER, ${toString (i + 1)}, workspace,${toString (i + 1)}" + "SUPER SHIFT, ${toString (i + 1)}, movetoworkspace,${toString (i + 1)}" + ]) 9 + ) + ++ [ + "SUPER, 0, workspace, 10" + "SUPER SHIFT, 0, movetoworkspace, 10" + ]; + + wayland.windowManager.hyprland.settings.bindm = [ + "SUPER, mouse:272, movewindow" + "SUPER, mouse:273, resizewindow" + ]; +} diff --git a/modules/programs/hyprland/settings/theme.nix b/modules/programs/hyprland/settings/theme.nix new file mode 100644 index 0000000..d687b60 --- /dev/null +++ b/modules/programs/hyprland/settings/theme.nix @@ -0,0 +1,58 @@ +{ ... }: { + wayland.windowManager.hyprland.settings = { + general = { + gaps_in = 5; + gaps_out = 10; + border_size = 1; + "col.active_border" = "rgb(cdd6f4)"; + "col.inactive_border" = "rgb(7f849c)"; + allow_tearing = true; + resize_on_border = true; + }; + + decoration = { + rounding = 5; + rounding_power = 5; + active_opacity = 1; + inactive_opacity = 1; + + blur = { + enabled = true; + size = 2; + passes = 5; + vibrancy = 3; + }; + }; + + animations = { + enabled = "yes"; + + bezier = [ + "overshot, 0.05, 0.9, 0.1, 1.1" + "md3_decel, 0.05, 0.7, 0.1, 1" + ]; + + animation = [ + "windows, 1, 3, overshot, popin 60%" + "border, 1, 10, default" + "fade, 1, 2, default" + "workspaces, 1, 3.5, overshot, slidefade 15%" + "specialWorkspace, 1, 3, md3_decel, slidevert" + ]; + }; + + dwindle = { + pseudotile = true; + preserve_split = true; + }; + + master = { + new_status = "master"; + }; + + misc = { + force_default_wallpaper = 1; + disable_hyprland_logo = true; + }; + }; +} \ No newline at end of file diff --git a/modules/programs/hyprland/settings/window-rules.nix b/modules/programs/hyprland/settings/window-rules.nix new file mode 100644 index 0000000..1410417 --- /dev/null +++ b/modules/programs/hyprland/settings/window-rules.nix @@ -0,0 +1,15 @@ +{ ... }: +{ + wayland.windowManager.hyprland.settings.windowrule = [ + "opacity 0.0 override, class:^(xwaylandvideobridge)$" + "noanim, class:^(xwaylandvideobridge)$" + "noinitialfocus, class:^(xwaylandvideobridge)$" + "maxsize 1 1, class:^(xwaylandvideobridge)$" + "noblur, class:^(xwaylandvideobridge)$" + "nofocus, class:^(xwaylandvideobridge)$" + ]; + wayland.windowManager.hyprland.settings.windowrulev2 = [ + "tile, class:^(Chromium)$" + ]; +} + diff --git a/modules/programs/nixcord/default.nix b/modules/programs/nixcord/default.nix new file mode 100644 index 0000000..ca486db --- /dev/null +++ b/modules/programs/nixcord/default.nix @@ -0,0 +1,44 @@ +{ lib, osconfig, ... }: +{ + programs.nixcord = lib.mkIf osconfig.device.programs.nixcord.enable { + enable = true; + discord = { + enable = true; + vencord.enable = true; + }; + + config = { + enableReactDevtools = true; + themeLinks = [ "https://catppuccin.github.io/discord/dist/catppuccin-mocha-blue.theme.css" ]; + + plugins = { + BlurNSFW.enable = true; + volumeBooster.enable = true; + ClearURLs.enable = true; + copyEmojiMarkdown.enable = true; + youtubeAdblock.enable = true; + experiments.enable = true; + fixCodeblockGap.enable = true; + fixImagesQuality.enable = true; + fixSpotifyEmbeds.enable = true; + fixYoutubeEmbeds.enable = true; + gameActivityToggle.enable = true; + imageZoom.enable = true; + memberCount.enable = true; + mentionAvatars.enable = true; + noDevtoolsWarning.enable = true; + noF1.enable = true; + openInApp.enable = true; + voiceDownload.enable = true; + validUser.enable = true; + translate.enable = true; + whoReacted.enable = true; + + fakeNitro = { + enable = true; + enableEmojiBypass = false; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/programs/nixvim/_nixvim.nix b/modules/programs/nixvim/_nixvim.nix new file mode 100644 index 0000000..f3182af --- /dev/null +++ b/modules/programs/nixvim/_nixvim.nix @@ -0,0 +1,14 @@ +{ pkgs, config, ... }: +{ + programs.nixvim.imports = [ + ./default.nix + ./extra-packages.nix + + ./keymaps/_keymaps.nix + + ./plugins/_plugins.nix + ./plugins/_extraPlugins.nix + + ./lua/_lua.nix + ]; +} diff --git a/modules/programs/nixvim/default.nix b/modules/programs/nixvim/default.nix new file mode 100644 index 0000000..dc1e7ec --- /dev/null +++ b/modules/programs/nixvim/default.nix @@ -0,0 +1,20 @@ +{ ... }: +{ + enable = true; + vimdiffAlias = true; + colorschemes.catppuccin.enable = true; + + opts = { + number = true; + relativenumber = true; + + tabstop = 2; + shiftwidth = 2; + softtabstop = 2; + smartindent = true; + expandtab = true; + + clipboard = "unnamedplus"; + }; +} + diff --git a/modules/programs/nixvim/extra-packages.nix b/modules/programs/nixvim/extra-packages.nix new file mode 100644 index 0000000..1951aa8 --- /dev/null +++ b/modules/programs/nixvim/extra-packages.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: +{ + extraPackages = with pkgs; [ + nodePackages.prettier + ]; +} diff --git a/modules/programs/nixvim/keymaps/_default.nix b/modules/programs/nixvim/keymaps/_default.nix new file mode 100644 index 0000000..fb6dd0f --- /dev/null +++ b/modules/programs/nixvim/keymaps/_default.nix @@ -0,0 +1,26 @@ +[ + { + mode = "i"; + key = ""; + action = ""; + options.silent = true; + } + { + mode = "i"; + key = ""; + action = ""; + options.silent = true; + } + { + mode = "i"; + key = ""; + action = ""; + options.silent = true; + } + { + mode = "i"; + key = ""; + action = ""; + options.silent = true; + } +] diff --git a/modules/programs/nixvim/keymaps/_keymaps.nix b/modules/programs/nixvim/keymaps/_keymaps.nix new file mode 100644 index 0000000..160868f --- /dev/null +++ b/modules/programs/nixvim/keymaps/_keymaps.nix @@ -0,0 +1,11 @@ +{ ... }: +{ + globals.mapleader = " "; + keymaps = + [ ] + ++ (import ./_default.nix) + ++ (import ./barbar.nix) + ++ (import ./toggleterm.nix) + ++ (import ./nvim-tree-toggle.nix); +} + diff --git a/modules/programs/nixvim/keymaps/barbar.nix b/modules/programs/nixvim/keymaps/barbar.nix new file mode 100644 index 0000000..d1cdf6a --- /dev/null +++ b/modules/programs/nixvim/keymaps/barbar.nix @@ -0,0 +1,39 @@ +[ + { + mode = "n"; + key = ""; + action = "BufferPrevious"; + options.silent = true; + } + { + mode = "n"; + key = ""; + action = "BufferNext"; + options.silent = true; + } + { + mode = "n"; + key = ""; + action = "BufferMovePrevious"; + options.silent = true; + } + { + mode = "n"; + key = ">"; + action = "BufferMoveNext"; + options.silent = true; + } + { + mode = "n"; + key = ""; + action = "BufferClose"; + options.silent = true; + } +] +++ (builtins.genList (i: { + mode = "n"; + key = ""; + action = "BufferGoto ${toString (i + 1)}"; + options.silent = true; +}) 9) + diff --git a/modules/programs/nixvim/keymaps/nvim-tree-toggle.nix b/modules/programs/nixvim/keymaps/nvim-tree-toggle.nix new file mode 100644 index 0000000..7c48e7a --- /dev/null +++ b/modules/programs/nixvim/keymaps/nvim-tree-toggle.nix @@ -0,0 +1,8 @@ +[ + { + mode = "n"; + key = ""; + action = "NvimTreeToggle"; + options.silent = true; + } +] diff --git a/modules/programs/nixvim/keymaps/toggleterm.nix b/modules/programs/nixvim/keymaps/toggleterm.nix new file mode 100644 index 0000000..c1509ed --- /dev/null +++ b/modules/programs/nixvim/keymaps/toggleterm.nix @@ -0,0 +1,63 @@ +[ + { + mode = "t"; + key = ""; + action = ""; + } + { + mode = "t"; + key = "jk"; + action = ""; + } + { + mode = "t"; + key = ""; + action = ""; + } + + { + mode = "t"; + key = ""; + action = "wincmd l"; + } + { + mode = "t"; + key = ""; + action = "wincmd k"; + } + { + mode = "t"; + key = ""; + action = "wincmd j"; + } + { + mode = "t"; + key = ""; + action = "wincmd h"; + } +] +++ builtins.concatLists ( + builtins.genList (i: [ + { + mode = "n"; + key = "th${toString (i + 1)}"; + action = ":${toString (i + 1)}ToggleTerm direction=horizontal"; + options.silent = true; + options.noremap = true; + } + { + mode = "n"; + key = "tv${toString (i + 1)}"; + action = ":${toString (i + 1)}ToggleTerm direction=vertical"; + options.silent = true; + options.noremap = true; + } + { + mode = "n"; + key = "tf${toString (i + 1)}"; + action = ":${toString (i + 1)}ToggleTerm direction=float"; + options.silent = true; + options.noremap = true; + } + ]) 9 +) diff --git a/modules/programs/nixvim/lua/_lua.nix b/modules/programs/nixvim/lua/_lua.nix new file mode 100644 index 0000000..facb35d --- /dev/null +++ b/modules/programs/nixvim/lua/_lua.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + +} diff --git a/modules/programs/nixvim/plugins/_extraPlugins.nix b/modules/programs/nixvim/plugins/_extraPlugins.nix new file mode 100644 index 0000000..94a6838 --- /dev/null +++ b/modules/programs/nixvim/plugins/_extraPlugins.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: +let + EXTRA_PLUGINS = [ + ./extras/neocord.nix + ./extras/mini-icons.nix + ]; + + LUA = [ + ./lua/neocord.lua + ]; +in +{ + extraPlugins = map (path: import path { plugins = pkgs.vimPlugins; }) EXTRA_PLUGINS; + extraConfigLua = builtins.concatStringsSep "\n" (map builtins.readFile LUA); +} \ No newline at end of file diff --git a/modules/programs/nixvim/plugins/_plugins.nix b/modules/programs/nixvim/plugins/_plugins.nix new file mode 100644 index 0000000..4d3f798 --- /dev/null +++ b/modules/programs/nixvim/plugins/_plugins.nix @@ -0,0 +1,33 @@ +{ ... }@inputs: +{ + plugins = { + nvim-tree = import ./nvimtree.nix inputs; + lsp = import ./lsp.nix inputs; + lspkind = import ./lspkind.nix inputs; + conform-nvim = import ./conform-nvim.nix inputs; + which-key = import ./which-key.nix inputs; + lint = import ./lint.nix inputs; + + cmp = import ./cmp.nix inputs; + cmp-nvim-lsp.enable = true; + cmp-buffer.enable = true; + cmp-path.enable = true; + cmp_luasnip.enable = true; + + web-devicons.enable = true; + lz-n.enable = true; + treesitter.enable = true; + lualine.enable = true; + neoscroll.enable = true; + image.enable = true; + nvim-autopairs.enable = true; + bufferline.enable = true; + luasnip.enable = true; + friendly-snippets.enable = true; + indent-blankline.enable = true; + barbar.enable = true; + toggleterm.enable = true; + auto-save.enable = true; + visual-multi.enable = true; + }; +} diff --git a/modules/programs/nixvim/plugins/cmp.nix b/modules/programs/nixvim/plugins/cmp.nix new file mode 100644 index 0000000..8b49804 --- /dev/null +++ b/modules/programs/nixvim/plugins/cmp.nix @@ -0,0 +1,25 @@ +{ ... }: { + enable = true; + autoEnableSources = true; + + settings = { + sources = [ + { name = "nvim_lsp"; } + { name = "path"; } + { name = "luasnip"; } + { name = "buffer"; } + ]; + + mapping = { + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.abort()"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + }; + + formatting.fields = [ "kind" "abbr" "menu" ]; + }; +} \ No newline at end of file diff --git a/modules/programs/nixvim/plugins/conform-nvim.nix b/modules/programs/nixvim/plugins/conform-nvim.nix new file mode 100644 index 0000000..192e491 --- /dev/null +++ b/modules/programs/nixvim/plugins/conform-nvim.nix @@ -0,0 +1,20 @@ +{ ... }: +{ + enable = true; + settings = { + formatters_by_ft = { + javascript = [ "prettier" ]; + typescript = [ "prettier" ]; + json = [ "prettier" ]; + css = [ "prettier" ]; + html = [ "prettier" ]; + nix = [ "nixfmt" ]; + php = [ "php_cs_fixer" ]; + }; + + format_on_save = { + timeout_ms = 500; + lsp_fallback = true; + }; + }; +} diff --git a/modules/programs/nixvim/plugins/extras/mini-icons.nix b/modules/programs/nixvim/plugins/extras/mini-icons.nix new file mode 100644 index 0000000..38b4a25 --- /dev/null +++ b/modules/programs/nixvim/plugins/extras/mini-icons.nix @@ -0,0 +1,4 @@ +{ plugins, ... }: +{ + plugin = plugins.mini-icons; +} \ No newline at end of file diff --git a/modules/programs/nixvim/plugins/extras/neocord.nix b/modules/programs/nixvim/plugins/extras/neocord.nix new file mode 100644 index 0000000..8af30c2 --- /dev/null +++ b/modules/programs/nixvim/plugins/extras/neocord.nix @@ -0,0 +1,4 @@ +{ plugins, ... }: +{ + plugin = plugins.neocord; +} \ No newline at end of file diff --git a/modules/programs/nixvim/plugins/lint.nix b/modules/programs/nixvim/plugins/lint.nix new file mode 100644 index 0000000..a46224a --- /dev/null +++ b/modules/programs/nixvim/plugins/lint.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + enable = true; + lintersByFt = { + }; +} diff --git a/modules/programs/nixvim/plugins/lsp.nix b/modules/programs/nixvim/plugins/lsp.nix new file mode 100644 index 0000000..ee013d0 --- /dev/null +++ b/modules/programs/nixvim/plugins/lsp.nix @@ -0,0 +1,12 @@ +{ ... }: +{ + enable = true; + servers = { + phpactor.enable = true; + nil_ls.enable = true; + pyright.enable = true; + ts_ls.enable = true; + html.enable = true; + cssls.enable = true; + }; +} diff --git a/modules/programs/nixvim/plugins/lspkind.nix b/modules/programs/nixvim/plugins/lspkind.nix new file mode 100644 index 0000000..22cd50e --- /dev/null +++ b/modules/programs/nixvim/plugins/lspkind.nix @@ -0,0 +1,4 @@ +{ ... }: { + enable = true; + cmp.enable = true; +} diff --git a/modules/programs/nixvim/plugins/lua/neocord.lua b/modules/programs/nixvim/plugins/lua/neocord.lua new file mode 100644 index 0000000..9384beb --- /dev/null +++ b/modules/programs/nixvim/plugins/lua/neocord.lua @@ -0,0 +1,24 @@ +require("neocord").setup({ + -- General options + logo= "auto", -- "auto" or url + logo_tooltip= nil,-- nil or string + main_image= "language", -- "language" or "logo" + client_id = "1157438221865717891",-- Use your own Discord application client id (not recommended) + log_level = nil,-- Log messages at or above this level (one of the following: "debug", "info", "warn", "error") + debounce_timeout= 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(, true)`) + blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches + file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference) + show_time = true, -- Show the timer + global_timer= false,-- if set true, timer won't update when any event are triggered + buttons = nil,-- A list of buttons (objects with label and url attributes) or a function returning such list. + + -- Rich Presence text options + editing_text= "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string) + file_explorer_text= "Browsing %s",-- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string) + git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string) + plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string) + reading_text= "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string) + workspace_text= "Working on %s",-- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string) + line_number_text= "Line %s out of %s",-- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string) + terminal_text = "Using Terminal", -- Format string rendered when in terminal mode. +}) \ No newline at end of file diff --git a/modules/programs/nixvim/plugins/nvimtree.nix b/modules/programs/nixvim/plugins/nvimtree.nix new file mode 100644 index 0000000..e9073ff --- /dev/null +++ b/modules/programs/nixvim/plugins/nvimtree.nix @@ -0,0 +1,5 @@ +{ ... }: { + enable = true; + openOnSetupFile = true; + settings.auto_reload_on_write = true; +} diff --git a/modules/programs/nixvim/plugins/which-key.nix b/modules/programs/nixvim/plugins/which-key.nix new file mode 100644 index 0000000..f8a8422 --- /dev/null +++ b/modules/programs/nixvim/plugins/which-key.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + enable = true; + settings = { + preset = "modern"; + }; +} diff --git a/modules/services/default.nix b/modules/services/default.nix new file mode 100644 index 0000000..0295aac --- /dev/null +++ b/modules/services/default.nix @@ -0,0 +1,6 @@ +{ ... }: { + services.pipewire = { + enable = true; + pulse.enable = true; + }; +} \ No newline at end of file diff --git a/options/common/default.nix b/options/common/default.nix new file mode 100644 index 0000000..64c67b5 --- /dev/null +++ b/options/common/default.nix @@ -0,0 +1,10 @@ +{ lib, ... }: { + options.device = { + flatpak.enable = lib.mkEnableOption "flatpak"; + flake-name = lib.mkOption { + type = lib.types.str; + default = "desktop"; + description = "Flake name for quick rebuild"; + }; + }; +} \ No newline at end of file diff --git a/options/desktop/default.nix b/options/desktop/default.nix new file mode 100644 index 0000000..63061ff --- /dev/null +++ b/options/desktop/default.nix @@ -0,0 +1,17 @@ +{ lib, ... }: { + imports = [ + ../common/default.nix + + ./environment.nix + ./programs.nix + ./hardware.nix + ]; + + options.device = { + cursors = lib.mkOption { + type = lib.types.str; + default = "aemeath"; + description = "Cursor theme to use for the desktop"; + }; + }; +} \ No newline at end of file diff --git a/options/desktop/environment.nix b/options/desktop/environment.nix new file mode 100644 index 0000000..a9e42b7 --- /dev/null +++ b/options/desktop/environment.nix @@ -0,0 +1,33 @@ +{ lib, ... }: { + options.device = { + dm = { + sddm = { + enable = lib.mkEnableOption "sddm"; + theme = lib.mkOption { + type = lib.types.str; + default = "hyprland_kath"; + description = "astronaut theme name"; + }; + }; + + gdm.enable = lib.mkEnableOption "gdm"; + }; + + de = { + kdePlasma.enable = lib.mkEnableOption "kde plasma"; + gnome.enable = lib.mkEnableOption "gnome"; + }; + + wm = { + niri.enable = lib.mkEnableOption "niri"; + hyprland = { + enable = lib.mkEnableOption "hyprland"; + monitors = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ "eDP-1, 1920x1200@60, 0x0, 1" ]; + description = "Monitors settings"; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/options/desktop/hardware.nix b/options/desktop/hardware.nix new file mode 100644 index 0000000..002a483 --- /dev/null +++ b/options/desktop/hardware.nix @@ -0,0 +1,5 @@ +{ lib, ... }: { + options.device = { + bluetooth.enable = lib.mkEnableOption "bluetooth"; + }; +} \ No newline at end of file diff --git a/options/desktop/programs.nix b/options/desktop/programs.nix new file mode 100644 index 0000000..a2581fb --- /dev/null +++ b/options/desktop/programs.nix @@ -0,0 +1,18 @@ +{ lib, ... }: { + options.device.programs = { + terminal = lib.mkOption { + type = lib.types.str; + default = "ghostty"; + description = "Terminal"; + }; + + nixcord.enable = lib.mkEnableOption "nixcord"; + tmux.enable = lib.mkEnableOption "tmux"; + starship.enable = lib.mkEnableOption "starship"; + fastfetch.enable = lib.mkEnableOption "fastfetch"; + steam.enable = lib.mkEnableOption "steam"; + + obs-studio.enable = lib.mkEnableOption "Obs Studio"; + cider-2.enable = lib.mkEnableOption "Cider 2"; + }; +} \ No newline at end of file diff --git a/overlays/nixpkgs.nix b/overlays/nixpkgs.nix new file mode 100644 index 0000000..c3e264f --- /dev/null +++ b/overlays/nixpkgs.nix @@ -0,0 +1,3 @@ +{ inputs, ... }: { + nixpkgs.overlays = [ inputs.niri.overlays.niri ]; +} \ No newline at end of file diff --git a/packages/bun.nix b/packages/bun.nix new file mode 100755 index 0000000..ac08808 --- /dev/null +++ b/packages/bun.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: +pkgs.stdenv.mkDerivation rec { + pname = "bun"; + version = "1.3.10"; + + src = pkgs.fetchzip { + url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64-baseline.zip"; + hash = "sha256-ZWTs4ApH0BsATxrE1DSuqCETIrNZZxdG8xtN0NinNBw="; + }; + + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + cp bun $out/bin/ + chmod +x $out/bin/bun + ''; + + meta = with pkgs.lib; { + description = "Incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one"; + homepage = "https://bun.sh"; + license = with licenses; [ + mit + lgpl21Only + ]; + }; +} diff --git a/packages/cage-xtmapper-0.1.5.nix b/packages/cage-xtmapper-0.1.5.nix new file mode 100644 index 0000000..9e6d3d1 --- /dev/null +++ b/packages/cage-xtmapper-0.1.5.nix @@ -0,0 +1,48 @@ +{ pkgs, ... }: +let + RELEASE_VERSION = "20260208"; + PACKAGE_VERSION = "0.1.5"; +in +pkgs.stdenv.mkDerivation rec { + pname = "cage-xtmapper"; + version = PACKAGE_VERSION; + + src = pkgs.fetchurl { + url = "https://github.com/Xtr126/cage-xtmapper/releases/download/v${RELEASE_VERSION}/cage-xtmapper-v${PACKAGE_VERSION}.tar"; + hash = "sha256-ZmdltOQInGbCBpf/e8D2sB9Rjt4wqd8wwuSFvryHfFA="; + }; + + nativeBuildInputs = [ pkgs.autoPatchelfHook ]; + + buildInputs = with pkgs; [ + wayland + libxkbcommon + pixman + libdrm + libGL + mesa + vulkan-loader + udev + seatd + libxcb-render-util + ]; + + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + tar xvf $src + cp usr/local/bin/cage_xtmapper $out/bin/ + cp usr/local/bin/cage_xtmapper.sh $out/bin/ + chmod +x $out/bin/cage_xtmapper + chmod +x $out/bin/cage_xtmapper.sh + ''; + + meta = with pkgs.lib; { + description = "cage-xtmapper input mapping tool"; + homepage = "https://github.com/Xtr126/cage-xtmapper"; + license = licenses.mit; + platforms = platforms.linux; + }; +} + diff --git a/packages/cage-xtmapper-0.2.0.nix b/packages/cage-xtmapper-0.2.0.nix new file mode 100644 index 0000000..dc8e95b --- /dev/null +++ b/packages/cage-xtmapper-0.2.0.nix @@ -0,0 +1,48 @@ +{ pkgs, ... }: +let + RELEASE_VERSION = "20260208"; + PACKAGE_VERSION = "0.2.0"; +in +pkgs.stdenv.mkDerivation rec { + pname = "cage-xtmapper"; + version = PACKAGE_VERSION; + + src = pkgs.fetchurl { + url = "https://github.com/Xtr126/cage-xtmapper/releases/download/v${RELEASE_VERSION}/cage-xtmapper-v${PACKAGE_VERSION}.tar"; + hash = "sha256-F1C3KnTzTO1vEouixqO1xnsGmufRyAk+BiRlypNq4kQ="; + }; + + nativeBuildInputs = [ pkgs.autoPatchelfHook ]; + + buildInputs = with pkgs; [ + wayland + libxkbcommon + pixman + libdrm + libGL + mesa + vulkan-loader + udev + seatd + libxcb-render-util + ]; + + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + tar xvf $src + cp usr/local/bin/cage_xtmapper $out/bin/ + cp usr/local/bin/cage_xtmapper.sh $out/bin/ + chmod +x $out/bin/cage_xtmapper + chmod +x $out/bin/cage_xtmapper.sh + ''; + + meta = with pkgs.lib; { + description = "cage-xtmapper input mapping tool"; + homepage = "https://github.com/Xtr126/cage-xtmapper"; + license = licenses.mit; + platforms = platforms.linux; + }; +} + diff --git a/packages/catppuccin-obs.nix b/packages/catppuccin-obs.nix new file mode 100644 index 0000000..0dcd502 --- /dev/null +++ b/packages/catppuccin-obs.nix @@ -0,0 +1,16 @@ +{ lib, pkgs, ... }: +pkgs.stdenv.mkDerivation { + pname = "catppuccin-obs"; + version = "main"; + + src = pkgs.fetchzip { + url = "https://static.asakiyuki.com/nixos/catppuccin-obs.zip"; + sha256 = "sha256-Uk4a0HKaeyQilgBiPsuAWQubk1yZdyirNcfhYJEL+lQ="; + }; + + buildCommand = '' + mkdir -p $out + cp -r $src/themes/* $out/ + ''; +} + diff --git a/packages/custom-cursors.nix b/packages/custom-cursors.nix new file mode 100644 index 0000000..2163719 --- /dev/null +++ b/packages/custom-cursors.nix @@ -0,0 +1,31 @@ +{ + cursors ? "aemeath", + size ? 48, +}: +let + _b = name: url: hash: { inherit name url hash; }; + _q = name: hash: { ${name} = _b name "https://static.asakiyuki.com/cursors/linux/${name}.tar.gz" hash; }; + + cursors-data = ( + _q "castorice" "sha256-nqAC+Itr+TXLGG8zYDBoBve+MeRckds5BM23DrsCTMM=" + // _q "aemeath" "sha256-0eEsUks5MwW4g5Xau24SgchX+LD9Ra3azAH0KL9JzQw=" + // _q "elysia" "sha256-mjDHklWrX5Pp/vejRQiMk0VA6afY04HXGyGD0PcopdI=" + // _q "cartethyia" "sha256-jYIDoX+rfUjw6LXrqE4y8j5IL0vByrrRkgRuz08Zy6U=" + ).${cursors}; +in +{ pkgs, ... }: +{ + gtk.enable = true; + x11.enable = true; + name = cursors-data.name; + size = size; + package = pkgs.runCommand "moveUp" { } '' + mkdir -p $out/share/icons + ln -s ${ + pkgs.fetchzip { + url = cursors-data.url; + hash = cursors-data.hash; + } + } $out/share/icons/${cursors-data.name} + ''; +} diff --git a/packages/default.nix b/packages/default.nix new file mode 100644 index 0000000..5e6a3fa --- /dev/null +++ b/packages/default.nix @@ -0,0 +1,7 @@ +{ ... }@inputs: +{ + bun = import ./bun.nix; + cage-xtmapper = { version ? "0.2.0" }: import ./cage-xtmapper-${version}.nix; + catppuccin-obs = import ./catppuccin-obs.nix; + cursors = { name ? "aemeath", size ? 48 }: (import ./custom-cursors.nix { cursors = name; size = size; }); +} \ No newline at end of file