├── .github └── workflows │ └── flake_check.yml ├── LICENSE ├── README.md ├── disks └── default.nix ├── flake.lock ├── flake.nix ├── home ├── apps │ ├── artix-game-launcher │ │ └── default.nix │ ├── default.nix │ ├── discord │ │ └── default.nix │ ├── misc │ │ └── default.nix │ ├── obs │ │ └── default.nix │ ├── obsidian │ │ └── default.nix │ ├── vscode │ │ └── default.nix │ └── zen │ │ └── default.nix ├── cli │ ├── default.nix │ ├── neve │ │ └── default.nix │ ├── nvim │ │ └── default.nix │ └── utils │ │ ├── bat │ │ └── default.nix │ │ ├── default.nix │ │ ├── eza │ │ └── default.nix │ │ ├── fd │ │ └── default.nix │ │ ├── fzf │ │ └── default.nix │ │ ├── jq │ │ └── default.nix │ │ ├── ripgrep │ │ └── default.nix │ │ ├── starship │ │ ├── catppuccin-powerline.toml │ │ ├── default.nix │ │ ├── mocha.nix │ │ ├── oxocarbon.nix │ │ ├── pure-preset.toml │ │ └── tuxdot.nix │ │ ├── tmux │ │ ├── default.nix │ │ └── gitmux.yml │ │ └── zoxide │ │ └── default.nix ├── desktop │ ├── addons │ │ ├── default.nix │ │ ├── swww │ │ │ └── default.nix │ │ ├── waybar │ │ │ ├── catppuccin │ │ │ │ ├── config.nix │ │ │ │ └── style.nix │ │ │ ├── default.nix │ │ │ ├── macos │ │ │ │ ├── config.nix │ │ │ │ └── style.nix │ │ │ ├── niri │ │ │ │ ├── config.nix │ │ │ │ └── style.nix │ │ │ ├── nixbar │ │ │ │ ├── config.nix │ │ │ │ └── style.nix │ │ │ └── og │ │ │ │ ├── config.nix │ │ │ │ └── style.nix │ │ ├── wezterm │ │ │ └── default.nix │ │ └── wofi │ │ │ └── default.nix │ ├── default.nix │ ├── hyprland │ │ ├── default.nix │ │ └── scripts │ │ │ ├── emojis.sh │ │ │ ├── launch_waybar │ │ │ ├── lock │ │ │ ├── rgb_borders │ │ │ ├── screenshot │ │ │ ├── screenshot.sh │ │ │ ├── tools │ │ │ ├── dynamic │ │ │ ├── expand │ │ │ ├── notif │ │ │ ├── start_dyn │ │ │ └── test.log │ │ │ └── wall │ └── theme │ │ └── default.nix ├── home.nix ├── rpi.nix ├── system │ ├── default.nix │ ├── fonts │ │ └── default.nix │ ├── nix │ │ └── default.nix │ └── shell │ │ └── default.nix └── tools │ ├── default.nix │ ├── direnv │ └── default.nix │ ├── git │ └── default.nix │ ├── http │ └── default.nix │ └── languages │ ├── c │ └── default.nix │ ├── default.nix │ ├── java │ └── default.nix │ ├── javascript │ └── default.nix │ ├── lua │ └── default.nix │ ├── python │ └── default.nix │ └── rust │ └── default.nix ├── hosts └── redyf │ ├── configuration.nix │ └── hardware-configuration.nix ├── modules ├── default.nix ├── gaming │ ├── default.nix │ └── steam.nix ├── hardware │ ├── default.nix │ └── nvidia.nix ├── nix │ ├── default.nix │ └── nix.nix ├── programs │ ├── default.nix │ ├── hyprland.nix │ ├── k3s.nix │ ├── nh.nix │ └── zsh.nix ├── services │ ├── default.nix │ ├── services.nix │ └── xserver.nix ├── system │ ├── audio.nix │ ├── boot.nix │ ├── default.nix │ ├── environment.nix │ ├── hardware.nix │ ├── keymap.nix │ ├── locale.nix │ ├── networking.nix │ ├── security.nix │ ├── ssh.nix │ ├── systemd.nix │ ├── time.nix │ ├── xdg-portal.nix │ └── zram.nix ├── themes │ ├── default.nix │ └── stylix.nix ├── users │ ├── default.nix │ └── groups.nix └── virtualization │ ├── default.nix │ └── docker.nix └── pkgs ├── apidog.nix ├── artixlauncher.nix └── real-vnc-viewer.nix /.github/workflows/flake_check.yml: -------------------------------------------------------------------------------- 1 | name: Nix Flake Check 2 | 3 | on: [pull_request] 4 | 5 | jobs: 6 | check: 7 | runs-on: ubuntu-latest 8 | 9 | permissions: 10 | contents: write 11 | 12 | steps: 13 | - name: Checkout repository 14 | uses: actions/checkout@v4 15 | 16 | - name: Install Nix 17 | uses: cachix/install-nix-action@v24 18 | with: 19 | nix_path: nixpkgs=channel:nixos-unstable 20 | 21 | - name: Install Nix Linting and Formatting Tools 22 | run: nix-env -i statix nixfmt-rfc-style -f '' 23 | 24 | - name: Run Statix Lint 25 | run: statix fix 26 | 27 | - name: Run Nix Format 28 | run: nixfmt **/*.nix 29 | 30 | - name: Nix Flake Checker 31 | uses: DeterminateSystems/flake-checker-action@v5 32 | 33 | - name: Commit 34 | uses: stefanzweifel/git-auto-commit-action@v5 35 | with: 36 | commit_message: Auto lint/format 37 | branch: main 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Mateus Alves 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |
4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |
19 | 20 |

21 | 22 |
23 |

24 | ❄️ NixOS dotfiles ❄️ 25 |

26 |
27 |

NixOS system configuration. Feel free to explore!

28 | 29 | ```mint 30 | ⠀⠀ 🌸 Setup / Hyprland 🌸 31 | ----------------------------------- 32 | ╭─ Distro -> NixOS 33 | ├─ Editor -> Neovim 34 | ├─ Browser -> Firefox 35 | ├─ Shell -> ZSH 36 | ╰─ Resource Monitor -> Btop 37 | ╭─ Model -> DELL XPS 8940 38 | ├─ CPU -> Intel i5-10400f @ 4.3GHz 39 | ├─ GPU -> NVIDIA GeForce GTX 1650 SUPER 40 | ╰─ Resolution -> 1920x1080@165hz 41 | ╭─ WM -> Hyprland 42 | ├─ Terminal -> Kitty 43 | ├─ Theme -> Oxocarbon 44 | ├─ Icons -> Papirus-Dark 45 | ├─ Font -> SFMono Ligaturized 46 | ╰─ Hotel -> Trivago 47 |         48 | ``` 49 | 50 |
51 | 52 |
53 | 54 | ![rice showcase](./assets/showcase.png) 55 | ![rice showcase2](./assets/showcaseoxocarbon.png) 56 | 57 |
58 | 59 |
60 | 61 | ## Commands you should know: 62 | 63 | - Rebuild and switch to change the system configuration (in the configuration directory): 64 | 65 | ``` 66 | nh os switch 67 | ``` 68 | 69 | OR 70 | 71 | ``` 72 | sudo nixos-rebuild switch --flake '.#desktop' 73 | ``` 74 | 75 | - Connect to internet (Change what's inside the brackets with your info). 76 | 77 | ``` 78 | nmcli device wifi connect [SSID] password [passphrase] 79 | ``` 80 | 81 | ## Installation 82 | 83 | > [!CAUTION] 84 | > This hosts system and home configurations are public for your own learning and 85 | > research. They are not meant to be used with any hardware other than mine. 86 | > Trying to build and deploy them to other systems without appropriate changes 87 | > can render your machines unbootable and damage data. 88 | 89 | I'll guide you through the Installation, but first make sure to download the Minimal ISO image available at [NixOS](https://nixos.org/download#nixos-iso) and make a bootable drive with it. I suggest using [Rufus](https://rufus.ie/en/) for the task as it's a great software, 90 | and an ethernet cable to make things easier. We shall begin! 91 | 92 |
93 | Installation Steps 94 | 95 | 96 | 97 | Only follow these steps after using the bootable drive, changing BIOS boot priority and getting into the installation! 98 | 99 | 100 | 101 | ``` 102 | First part: 103 | video=1920x1080 104 | setfont ter-128n 105 | configure networking as needed (skip this if you're using ethernet) 106 | sudo -i 107 | lsblk (check info about partitions and the device you want to use for the installation) 108 | gdisk /dev/vda (change according to your system, for me it's /dev/nvme0n1) 109 | then configure 600M type ef00, rest ext4 type 8300 as described below 110 | Type "n" to make a new partition, choose the partition number, first sector can be default but last sector should be 600M. Hex code for EFI is ef00. 111 | Now type n again to make another partition, this time we'll leave everything as default. After finishing these steps, make sure to write it to the disk by typing "w". 112 | lsblk 113 | mkfs.fat -F 32 -n boot /dev/vda1 (Format the partitions) 114 | mkfs.ext4 -L nixos /dev/vda2 115 | mount /dev/disk/by-label/nixos /mnt (Mount partitions) 116 | mkdir /mnt/boot (Create a directory for boot) 117 | mount /dev/disk/by-label/boot /mnt/boot 118 | ``` 119 | 120 | After mounting the partitions, you can move to the second part... 121 | 122 | ``` 123 | # go inside a nix shell with the specified programs 124 | nix-shell -p git nixUnstable neovim 125 | # create this folder if necessary 126 | mkdir -p /mnt/etc/ 127 | # clone the repo 128 | git clone https://github.com/redyf/nixdots.git /mnt/etc/nixos --recurse-submodules 129 | # remove this file 130 | rm /mnt/etc/nixos/hosts/redyf/hardware-configuration.nix 131 | # generate the config and take some files 132 | nixos-generate-config --root /mnt 133 | rm /mnt/etc/nixos/configuration.nix 134 | mv /mnt/etc/nixos/hardware-configuration.nix /mnt/etc/nixos/hosts/redyf/ 135 | # make sure you're in this path 136 | cd /mnt/etc/nixos 137 | # Install my config: 138 | nixos-install --flake '.#desktop' 139 | # Obs: 140 | If you'd like to use my config as a template, all you need to do is replace "desktop" with your username. 141 | ``` 142 | 143 |
144 |
145 | 146 | Disko is also available for formatting partitions (Only for advanced users) 147 | 148 |
149 | Disko 150 | 151 | If you save disko's config file in **./disks/default.nix**, and run the following command: 152 | 153 | ```nix 154 | sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko ./disks/default.nix --arg device '/dev/nvme0n1' 155 | ``` 156 | 157 | you will partition, format and mount the disk for /dev/nvme0n1 (change as needed). 158 | 159 |
160 | 161 |
162 | 163 | ## NixOS Raspberry PI5 Installation (Not working anymore because raspberry-pi-nix was archived) 164 | 165 | ### Requirements 166 | 167 | - rpi-imager 168 | - sd-card 169 | - Raspberry-PI5 170 | - Another device to connect remotely (PC, Laptop, etc) 171 | - Ethernet connection 172 | 173 | ### Installation Steps 174 | 175 | 1. **Open rpi-imager** and select your device, then Raspberry Pi OS and sd-card. 176 | 2. **Customize settings** to your needs, like defining a user/hostname and enabling ssh. 177 | 3. **Insert the sd-card** in your Raspberry PI5 and boot. 178 | 179 | 4. **Install Nix** on it by running the following command: 180 | 181 | ```bash 182 | curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install 183 | ``` 184 | 185 | 5. **Install Cachix client** by running: 186 | 187 | ```bash 188 | nix-env -iA cachix -f https://cachix.org/api/v1/install 189 | ``` 190 | 191 | 6. **Start using the binary cache** by running: 192 | 193 | ```bash 194 | cachix use nix-community 195 | ``` 196 | 197 | 7. **Clone the following repo**: 198 | 199 | ```bash 200 | https://github.com/nix-community/raspberry-pi-nix.git 201 | ``` 202 | 203 | 8. **Customize `flake.nix`** to match your needs, like changing hostname, timezones, etc. 204 | 205 | 9. **Build an image** suitable for flashing to an sd-card by running: 206 | 207 | ``` 208 | nix build '.#nixosConfigurations.rpi-example.config.system.build.sdImage' 209 | ``` 210 | 211 | 10. **Connect to your main machine** with ssh and copy the image to it using scp. You can use the following commands: 212 | 213 | ``` 214 | scp /path/to/file username@a:/path/to/destination 215 | ``` 216 | 217 | or 218 | 219 | ``` 220 | scp username@b:/path/to/file /path/to/destination 221 | ``` 222 | 223 | 11. **Decompress the image with zstd**, this is going to generate a .img file. 224 | 225 | ```bash 226 | sudo zstd -d result/sd-image/nixos-sd-image-24.05.20240619.dd457de-aarch64-linux.img.zst 227 | ``` 228 | 229 | 11. **Copy the image to your sd-card**: 230 | 231 | ```bash 232 | sudo dd bs=4M if=result/sd-image/nixos-sd-image-24.05.20240619.dd457de-aarch64-linux.img of=/dev/mmcblk0 conv=fsync oflag=direct status=progress 233 | ``` 234 | 235 | 12. **Boot the Raspberry-PI5 with the sd-card and you should be good to go** 236 | 237 | All references are written below. I wouldn't be able to install it without them! I really appreciate their hard work, make sure to give them a star. 238 | 239 |
240 | 241 | ## All references/credits for the NixOS Raspberry-PI 5 setup: 242 | 243 | - [Raspberry PI 5 support](https://github.com/NixOS/nixpkgs/issues/260754) 244 | - [NixOS on ARM/Raspberry Pi 5](https://wiki.nixos.org/wiki/NixOS_on_ARM/Raspberry_Pi_5) 245 | - [Pi 5 support](https://github.com/nix-community/raspberry-pi-nix/issues/13) 246 | - [raspberry-pi-nix](https://github.com/nix-community/raspberry-pi-nix) 247 | - [raspberry-pi-nix binary cache](https://app.cachix.org/cache/raspberry-pi-nix) 248 | - [nix-rpi5](https://gitlab.com/vriska/nix-rpi5) 249 | - [raspberrypi/firmware](https://github.com/raspberrypi/firmware) 250 | 251 | ## Shoutout to: 252 | 253 | - [AlphaTechnolog](https://github.com/AlphaTechnolog/nixdots) 254 | - [Eriim's](https://github.com/erictossell/nixflakes) 255 | - [IogaMaster](https://github.com/IogaMaster) 256 | - [linuxmobile](https://github.com/linuxmobile) 257 | - [NotAShelf](https://github.com/NotAShelf/nyx) 258 | - [notusknot](https://github.com/notusknot) 259 | - [Siduck76](https://github.com/siduck76/nvchad/) 260 | - [Sioodmy](https://github.com/sioodmy/dotfiles) 261 | - [Stephenstechtalks](https://github.com/stephenstechtalks) 262 | - [ZerotoNix](https://zero-to-nix.com) 263 | - [NobbZ](https://github.com/NobbZ) 264 | 265 |
266 | 267 | ## Conclusion 268 | 269 | That should be all! If you have any problem, feel free to make an issue in the github repo. (https://github.com/Redyf/nixdots/issues). 270 | 271 | The code is licensed under the MIT license, so you can use or distribute the code however you like. If you have any questions, contact me on Discord: `redyf`. 272 | -------------------------------------------------------------------------------- /disks/default.nix: -------------------------------------------------------------------------------- 1 | # If you'd saved this configuration in ./disks/default.nix, and wanted to create a disk named /dev/nvme0n1, you would run the following command to partition, format and mount the disk. 2 | # sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko ./disks/default.nix --arg device '"/dev/nvme0n1"' 3 | { 4 | lib, 5 | device ? throw "Set this to your disk device, e.g. /dev/sda", 6 | ... 7 | }: 8 | { 9 | disko = { 10 | # Do not let Disko manage fileSystems.* config for NixOS. 11 | # Reason is that Disko mounts partitions by GPT partition names, which are 12 | # easily overwritten with tools like fdisk. When you fail to deploy a new 13 | # config in this case, the old config that comes with the disk image will 14 | # not boot either. 15 | enableConfig = false; 16 | devices = { 17 | disk.main = { 18 | inherit device; 19 | type = "disk"; 20 | content = { 21 | type = "gpt"; 22 | partitions = { 23 | # Compared to MBR, GPT partition table doesn't reserve space for MBR 24 | # boot record. We need to reserve the first 1MB for MBR boot record, 25 | # so Grub can be installed here. 26 | boot = { 27 | name = "boot"; 28 | size = "1M"; 29 | type = "EF02"; 30 | }; 31 | esp = { 32 | name = "ESP"; 33 | size = "1024M"; 34 | type = "EF00"; 35 | content = { 36 | type = "filesystem"; 37 | format = "vfat"; 38 | mountpoint = "/boot"; 39 | }; 40 | }; 41 | root = { 42 | name = "root"; 43 | size = "100%"; 44 | content = { 45 | type = "filesystem"; 46 | format = "ext4"; 47 | mountpoint = "/"; 48 | }; 49 | }; 50 | }; 51 | }; 52 | }; 53 | }; 54 | }; 55 | } 56 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "Redyf's Flake"; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 6 | nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05"; 7 | home-manager = { 8 | url = "github:nix-community/home-manager/master"; 9 | inputs.nixpkgs.follows = "nixpkgs"; 10 | }; 11 | hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; 12 | disko.url = "github:nix-community/disko"; 13 | stylix.url = "github:danth/stylix"; 14 | font-flake.url = "github:redyf/font-flake"; 15 | zen-browser = { 16 | url = "github:0xc000022070/zen-browser-flake"; 17 | inputs.nixpkgs.follows = "nixpkgs"; 18 | }; 19 | Neve.url = "github:redyf/Neve"; 20 | nixvim = { 21 | url = "github:nix-community/nixvim"; 22 | inputs.nixpkgs.follows = "nixpkgs"; 23 | }; 24 | lanzaboote = { 25 | url = "github:nix-community/lanzaboote/v0.4.2"; 26 | # Optional but recommended to limit the size of your system closure. 27 | inputs.nixpkgs.follows = "nixpkgs"; 28 | }; 29 | }; 30 | 31 | outputs = 32 | { 33 | self, 34 | nixpkgs, 35 | nixpkgs-stable, 36 | hyprland, 37 | home-manager, 38 | disko, 39 | stylix, 40 | lanzaboote, 41 | ... 42 | }@inputs: 43 | let 44 | inherit (nixpkgs.lib) nixosSystem; 45 | supportedSystems = [ 46 | "x86_64-linux" 47 | "x86_64-darwin" 48 | "aarch64-linux" 49 | "aarch64-darwin" 50 | ]; 51 | 52 | # Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'. 53 | forAllSystems = nixpkgs.lib.genAttrs supportedSystems; 54 | 55 | # Nixpkgs instantiated for supported system types. 56 | nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); 57 | 58 | # Stable Nixpkgs instantiated for supported system types. 59 | nixpkgsStableFor = forAllSystems (system: import nixpkgs-stable { inherit system; }); 60 | 61 | # Function to create a nixosConfiguration with a dynamic username 62 | createNixosConfiguration = 63 | { 64 | system, 65 | username, 66 | homeDirectory, 67 | hostname ? null, 68 | modules ? [ ], 69 | includeHomeManager ? true, 70 | }: 71 | nixosSystem { 72 | inherit system; 73 | specialArgs = { 74 | inherit 75 | inputs 76 | hyprland 77 | disko 78 | ; 79 | inherit username homeDirectory hostname; 80 | }; 81 | modules = 82 | [ 83 | ./hosts/${username}/configuration.nix 84 | { networking.hostName = hostname; } 85 | ] 86 | ++ ( 87 | if includeHomeManager then 88 | [ 89 | home-manager.nixosModules.home-manager 90 | { 91 | home-manager = { 92 | useUserPackages = true; 93 | useGlobalPkgs = false; 94 | extraSpecialArgs = { 95 | inherit 96 | inputs 97 | disko 98 | nixpkgs-stable 99 | ; 100 | }; 101 | users."${username}" = import ./home/home.nix { 102 | inputs = inputs; 103 | pkgs = nixpkgsFor."${system}"; 104 | inherit username homeDirectory; 105 | }; 106 | backupFileExtension = "backup"; 107 | }; 108 | } 109 | ] 110 | else 111 | [ ] 112 | ) 113 | ++ [ 114 | stylix.nixosModules.stylix 115 | ] 116 | ++ modules; 117 | }; 118 | 119 | createHomeManagerConfiguration = 120 | { 121 | system, 122 | username, 123 | homeDirectory, 124 | stateVersion ? "22.11", 125 | modules ? [ ], 126 | }: 127 | home-manager.lib.homeManagerConfiguration { 128 | extraSpecialArgs = { 129 | inherit inputs hyprland; 130 | inherit username homeDirectory stateVersion; 131 | }; 132 | pkgs = nixpkgsFor."${system}"; 133 | modules = [ 134 | ./home/rpi.nix 135 | { 136 | home = { 137 | username = username; 138 | homeDirectory = homeDirectory; 139 | stateVersion = stateVersion; 140 | }; 141 | } 142 | ] ++ modules; 143 | }; 144 | in 145 | { 146 | nixosConfigurations = { 147 | desktop = createNixosConfiguration { 148 | system = "x86_64-linux"; 149 | username = "redyf"; 150 | homeDirectory = "/home/redyf"; 151 | hostname = "desktop"; 152 | modules = [ 153 | disko.nixosModules.disko 154 | hyprland.nixosModules.default 155 | lanzaboote.nixosModules.lanzaboote 156 | ]; 157 | }; 158 | }; 159 | 160 | homeConfigurations = { 161 | "redyf" = createHomeManagerConfiguration { 162 | system = "aarch64-linux"; 163 | username = "redyf"; 164 | homeDirectory = "/home/redyf"; 165 | stateVersion = "22.11"; 166 | modules = [ ]; 167 | }; 168 | }; 169 | 170 | devShells = forAllSystems ( 171 | system: 172 | let 173 | pkgs = nixpkgsFor.${system}; 174 | in 175 | { 176 | default = pkgs.mkShell { 177 | buildInputs = with pkgs; [ 178 | git 179 | nixfmt-rfc-style 180 | statix 181 | ]; 182 | }; 183 | } 184 | ); 185 | formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style; 186 | }; 187 | } 188 | -------------------------------------------------------------------------------- /home/apps/artix-game-launcher/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: { 7 | options = { 8 | artix-game-launcher.enable = lib.mkEnableOption "Enable artix-game-launcher module"; 9 | }; 10 | config = lib.mkIf config.artix-game-launcher.enable { 11 | home.packages = with pkgs; [ 12 | (pkgs.callPackage ../../../pkgs/artixlauncher.nix { 13 | src = artixlauncher; # pkg source is passed as a `specialArgs` and injected into this module. 14 | }) 15 | ]; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /home/apps/default.nix: -------------------------------------------------------------------------------- 1 | { lib, config, ... }: 2 | { 3 | imports = [ 4 | ./artix-game-launcher 5 | ./discord 6 | ./misc 7 | ./obs 8 | ./obsidian 9 | ./vscode 10 | ./zen 11 | ]; 12 | 13 | options = { 14 | apps.enable = lib.mkEnableOption "Enable apps module"; 15 | }; 16 | config = lib.mkIf config.apps.enable { 17 | artix-game-launcher.enable = lib.mkDefault true; 18 | discord.enable = lib.mkDefault true; 19 | misc.enable = lib.mkDefault true; 20 | obs.enable = lib.mkDefault true; 21 | obsidian.enable = lib.mkDefault true; 22 | vscode.enable = lib.mkDefault true; 23 | zen.enable = lib.mkDefault true; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /home/apps/discord/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | discord.enable = lib.mkEnableOption "Enable discord module"; 10 | }; 11 | config = lib.mkIf config.discord.enable { 12 | home.packages = with pkgs; [ 13 | discord 14 | ]; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /home/apps/misc/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | misc.enable = lib.mkEnableOption "Enable misc module"; 10 | }; 11 | config = lib.mkIf config.misc.enable { 12 | home.packages = with pkgs; [ 13 | # Gaming 14 | # prismlauncher 15 | 16 | # nyaa 17 | awscli2 18 | brave 19 | xfce.thunar 20 | httpie 21 | ngrok 22 | qbittorrent 23 | playerctl 24 | pavucontrol 25 | zathura 26 | appimage-run 27 | wget 28 | parted 29 | mpv 30 | unzip 31 | ffmpeg_6 32 | polkit_gnome 33 | yazi 34 | ]; 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /home/apps/obs/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: { 7 | options = { 8 | obs.enable = lib.mkEnableOption "Enable obs module"; 9 | }; 10 | config = lib.mkIf config.obs.enable { 11 | programs.obs-studio = { 12 | enable = true; 13 | plugins = with pkgs.obs-studio-plugins; [ 14 | wlrobs 15 | obs-vaapi 16 | obs-vkcapture 17 | obs-pipewire-audio-capture 18 | ]; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /home/apps/obsidian/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | pkgs, 5 | ... 6 | }: 7 | let 8 | gitSyncObsidian = pkgs.writeShellScriptBin "git-sync-obsidian" '' 9 | #!/usr/bin/env sh 10 | 11 | VAULT_DIR="$HOME/Documentos/GitHub_Vault" 12 | 13 | cd $VAULT_DIR || exit 1 14 | 15 | git add . 16 | 17 | git commit -m "$(date '+%Y-%m-%d %H:%M:%S')" || exit 0 18 | 19 | git pull --rebase origin main || exit 1 20 | git push origin main 21 | ''; 22 | 23 | obsidianOllama = pkgs.writeShellScriptBin "obsidianOllama" '' 24 | #!/usr/bin/env sh 25 | start_ollama_model() { 26 | echo "Iniciando o modelo do Ollama..." 27 | OLLAMA_ORIGINS=app://obsidian.md* ollama serve & 28 | OLLAMA_PID=$! # Salva o PID do processo do Ollama 29 | } 30 | 31 | # Função para parar o modelo do Ollama 32 | stop_ollama_model() { 33 | if [[ -n "$OLLAMA_PID" ]] && kill -0 "$OLLAMA_PID" 2>/dev/null; then 34 | echo "Parando o modelo do Ollama..." 35 | kill "$OLLAMA_PID" 36 | fi 37 | } 38 | 39 | # Inicia o modelo do Ollama 40 | start_ollama_model 41 | 42 | # Inicia o Obsidian e aguarda ele fechar 43 | obsidian & 44 | OBSIDIAN_PID=$! 45 | wait "$OBSIDIAN_PID" 46 | 47 | # Para o modelo do Ollama após o fechamento do Obsidian 48 | stop_ollama_model 49 | ''; 50 | in 51 | { 52 | options = { 53 | obsidian.enable = lib.mkEnableOption "Enable obsidian module"; 54 | }; 55 | config = lib.mkIf config.obsidian.enable { 56 | home.packages = with pkgs; [ 57 | obsidian 58 | gitSyncObsidian 59 | # ollama 60 | # obsidianOllama 61 | ]; 62 | systemd.user = { 63 | services.git-sync-obsidian = { 64 | Unit = { 65 | Description = "Sync Obsidian Vault with GitHub"; 66 | Wants = "git-sync-obsidian.timer"; 67 | }; 68 | Service = { 69 | ExecStart = "${gitSyncObsidian}/bin/git-sync-obsidian"; 70 | Type = "simple"; 71 | }; 72 | }; 73 | timers.git-sync-obsidian = { 74 | Unit.Description = "Run Git Sync for Obsidian Vault"; 75 | Timer.OnCalendar = "*:0/45"; 76 | Install.WantedBy = [ "timers.target" ]; 77 | }; 78 | }; 79 | }; 80 | } 81 | -------------------------------------------------------------------------------- /home/apps/vscode/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | vscode.enable = lib.mkEnableOption "Enable vscode module"; 10 | }; 11 | config = lib.mkIf config.vscode.enable { 12 | home.packages = with pkgs; [ 13 | vscode 14 | ]; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /home/apps/zen/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs, 3 | pkgs, 4 | lib, 5 | config, 6 | ... 7 | }: 8 | { 9 | options = { 10 | zen.enable = lib.mkEnableOption "Enable zen module"; 11 | }; 12 | config = lib.mkIf config.zen.enable { 13 | home.packages = with pkgs; [ 14 | inputs.zen-browser.packages."${system}".twilight 15 | ]; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /home/cli/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | ... 5 | }: 6 | { 7 | imports = [ 8 | ./nvim 9 | ./neve 10 | ./utils 11 | ]; 12 | 13 | options = { 14 | cli.enable = lib.mkEnableOption "Enable cli module"; 15 | }; 16 | config = lib.mkIf config.cli.enable { 17 | nvim.enable = lib.mkDefault true; 18 | neve.enable = lib.mkDefault false; 19 | utils.enable = lib.mkDefault true; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /home/cli/neve/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs, 3 | pkgs, 4 | lib, 5 | config, 6 | ... 7 | }: 8 | { 9 | imports = [ 10 | # For home-manager 11 | inputs.nixvim.homeManagerModules.nixvim 12 | ]; 13 | options = { 14 | neve.enable = lib.mkEnableOption "Enable neve module"; 15 | }; 16 | config = lib.mkIf config.neve.enable { 17 | home.packages = with pkgs; [ 18 | inputs.Neve.packages.${system}.default 19 | ]; 20 | # programs.nixvim = { 21 | # enable = true; 22 | # imports = [ inputs.Neve.nixvimModule ]; 23 | # # Then configure Nixvim as usual, you might have to lib.mkForce some of the settings 24 | # colorschemes.catppuccin.enable = lib.mkForce true; 25 | # # colorschemes.nord.enable = true; 26 | # }; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /home/cli/nvim/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | nvim.enable = lib.mkEnableOption "Enable neovim module"; 10 | }; 11 | config = lib.mkIf config.nvim.enable { 12 | home = { 13 | packages = with pkgs; [ 14 | neovim 15 | pkgs.vimPlugins.nvim-treesitter.withAllGrammars 16 | # (vimPlugins.nvim-treesitter.withPlugins ( 17 | # p: with p; [ 18 | # tree-sitter-query # Prioridade máxima 19 | # tree-sitter-r # Para o arquivo que você compartilhou 20 | # tree-sitter-rust # Para o arquivo que você compartilhou 21 | # tree-sitter-nix # Para editar arquivos Nix 22 | # tree-sitter-lua # Para configurações do Neovim 23 | # tree-sitter-python # Opcional, mas útil 24 | # tree-sitter-c # Opcional 25 | # tree-sitter-cpp # Opcional 26 | # ] 27 | # )) 28 | ]; 29 | }; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /home/cli/utils/bat/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | bat.enable = lib.mkEnableOption "Enable bat module"; 10 | }; 11 | config = lib.mkIf config.bat.enable { 12 | programs.bat = { 13 | enable = true; 14 | config = { 15 | pager = "less -FR"; 16 | }; 17 | }; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /home/cli/utils/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | ... 5 | }: 6 | { 7 | imports = [ 8 | ./bat 9 | ./eza 10 | ./fd 11 | ./fzf 12 | ./jq 13 | ./ripgrep 14 | ./starship 15 | ./tmux 16 | ./zoxide 17 | ]; 18 | 19 | options = { 20 | utils.enable = lib.mkEnableOption "Enable cli utils module"; 21 | }; 22 | config = lib.mkIf config.utils.enable { 23 | bat.enable = lib.mkDefault true; 24 | eza.enable = lib.mkDefault true; 25 | fd.enable = lib.mkDefault true; 26 | fzf.enable = lib.mkDefault true; 27 | jq.enable = lib.mkDefault true; 28 | ripgrep.enable = lib.mkDefault true; 29 | starship.enable = lib.mkDefault true; 30 | tmux.enable = lib.mkDefault true; 31 | zoxide.enable = lib.mkDefault true; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /home/cli/utils/eza/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | ... 5 | }: 6 | { 7 | options = { 8 | eza.enable = lib.mkEnableOption "Enable eza module"; 9 | }; 10 | config = lib.mkIf config.eza.enable { 11 | programs.eza = { 12 | enable = true; 13 | icons = "auto"; 14 | colors = "always"; 15 | extraOptions = [ 16 | "--no-filesize" 17 | "--long" 18 | "--no-user" 19 | ]; 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /home/cli/utils/fd/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: { 7 | options = { 8 | fd.enable = lib.mkEnableOption "Enable fd module"; 9 | }; 10 | config = lib.mkIf config.fd.enable { 11 | home.packages = with pkgs; [fd]; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /home/cli/utils/fzf/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | ... 5 | }: 6 | let 7 | catppuccin = { 8 | bg = "-1"; 9 | "bg+" = "-1"; 10 | hl = "#ed8796"; 11 | "hl+" = "#ed8796"; 12 | fg = "#cad3f5"; 13 | "fg+" = "#cad3f5"; 14 | header = "#ed8796"; 15 | info = "#c6a0f6"; 16 | pointer = "#f4dbd6"; 17 | marker = "#f4dbd6"; 18 | prompt = "#c6a0f6"; 19 | spinner = "#f4dbd6"; 20 | }; 21 | nord = { 22 | fg = "#e5e9f0"; 23 | bg = "#3b4252"; 24 | hl = "#81a1c1"; 25 | "fg+" = "#e5e9f0"; 26 | "bg+" = "#3b4252"; 27 | "hl+" = "#81a1c1"; 28 | info = "#eacb8a"; 29 | prompt = "#bf6069"; 30 | pointer = "#b48dac"; 31 | marker = "#a3be8b"; 32 | spinner = "#b48dac"; 33 | header = "#a3be8b"; 34 | }; 35 | in 36 | { 37 | options = { 38 | fzf.enable = lib.mkEnableOption "Enable fzf module"; 39 | }; 40 | config = lib.mkIf config.fzf.enable { 41 | programs.fzf = { 42 | enable = true; 43 | tmux = { 44 | enableShellIntegration = true; 45 | }; 46 | defaultOptions = [ 47 | "--preview='bat --color=always {}'" 48 | "--multi" 49 | "--height 100%" 50 | "--layout=reverse-list" 51 | "--border=none" 52 | "--info=inline" 53 | "--bind shift-up:preview-page-up,shift-down:preview-page-down" 54 | "--header='CTRL-c or ESC to quit'" 55 | "--color=bg:-1,bg+:-1" 56 | ]; 57 | }; 58 | }; 59 | } 60 | -------------------------------------------------------------------------------- /home/cli/utils/jq/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | ... 5 | }: { 6 | options = { 7 | jq.enable = lib.mkEnableOption "Enable jq module"; 8 | }; 9 | config = lib.mkIf config.jq.enable { 10 | programs.jq = { 11 | enable = true; 12 | }; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /home/cli/utils/ripgrep/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | ... 5 | }: { 6 | options = { 7 | ripgrep.enable = lib.mkEnableOption "Enable ripgrep module"; 8 | }; 9 | config = lib.mkIf config.ripgrep.enable { 10 | programs.ripgrep = { 11 | enable = true; 12 | }; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /home/cli/utils/starship/catppuccin-powerline.toml: -------------------------------------------------------------------------------- 1 | "$schema" = 'https://starship.rs/config-schema.json' 2 | 3 | format = """ 4 | [](red)\ 5 | $os\ 6 | $username\ 7 | [](bg:peach fg:red)\ 8 | $directory\ 9 | [](bg:yellow fg:peach)\ 10 | $git_branch\ 11 | $git_status\ 12 | [](fg:yellow bg:green)\ 13 | $c\ 14 | $rust\ 15 | $golang\ 16 | $nodejs\ 17 | $php\ 18 | $java\ 19 | $kotlin\ 20 | $haskell\ 21 | $python\ 22 | [](fg:green bg:sapphire)\ 23 | $conda\ 24 | [](fg:sapphire bg:lavender)\ 25 | $time\ 26 | [ ](fg:lavender)\ 27 | $cmd_duration\ 28 | $line_break\ 29 | $character""" 30 | 31 | palette = 'catppuccin_mocha' 32 | 33 | [os] 34 | disabled = false 35 | style = "bg:red fg:crust" 36 | 37 | [os.symbols] 38 | Windows = "" 39 | Ubuntu = "󰕈" 40 | SUSE = "" 41 | NixOS = "" 42 | Raspbian = "󰐿" 43 | Mint = "󰣭" 44 | Macos = "󰀵" 45 | Manjaro = "" 46 | Linux = "󰌽" 47 | Gentoo = "󰣨" 48 | Fedora = "󰣛" 49 | Alpine = "" 50 | Amazon = "" 51 | Android = "" 52 | Arch = "󰣇" 53 | Artix = "󰣇" 54 | CentOS = "" 55 | Debian = "󰣚" 56 | Redhat = "󱄛" 57 | RedHatEnterprise = "󱄛" 58 | 59 | [username] 60 | show_always = true 61 | style_user = "bg:red fg:crust" 62 | style_root = "bg:red fg:crust" 63 | format = '[ $user]($style)' 64 | 65 | [directory] 66 | style = "bg:peach fg:crust" 67 | format = "[ $path ]($style)" 68 | 69 | [directory.substitutions] 70 | "Documents" = "󰈙 " 71 | "Downloads" = " " 72 | "Music" = "󰝚 " 73 | "Pictures" = " " 74 | "Developer" = "󰲋 " 75 | 76 | [git_branch] 77 | symbol = "" 78 | style = "bg:yellow" 79 | format = '[[ $symbol $branch ](fg:crust bg:yellow)]($style)' 80 | 81 | [git_status] 82 | style = "bg:yellow" 83 | format = '[[($all_status$ahead_behind )](fg:crust bg:yellow)]($style)' 84 | 85 | [nodejs] 86 | symbol = "" 87 | style = "bg:green" 88 | format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)' 89 | 90 | [c] 91 | symbol = " " 92 | style = "bg:green" 93 | format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)' 94 | 95 | [rust] 96 | symbol = "" 97 | style = "bg:green" 98 | format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)' 99 | 100 | [golang] 101 | symbol = "" 102 | style = "bg:green" 103 | format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)' 104 | 105 | [php] 106 | symbol = "" 107 | style = "bg:green" 108 | format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)' 109 | 110 | [java] 111 | symbol = " " 112 | style = "bg:green" 113 | format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)' 114 | 115 | [kotlin] 116 | symbol = "" 117 | style = "bg:green" 118 | format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)' 119 | 120 | [haskell] 121 | symbol = "" 122 | style = "bg:green" 123 | format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)' 124 | 125 | [python] 126 | symbol = "" 127 | style = "bg:green" 128 | format = '[[ $symbol( $version)(\(#$virtualenv\)) ](fg:crust bg:green)]($style)' 129 | 130 | [docker_context] 131 | symbol = "" 132 | style = "bg:sapphire" 133 | format = '[[ $symbol( $context) ](fg:crust bg:sapphire)]($style)' 134 | 135 | [conda] 136 | symbol = "  " 137 | style = "fg:crust bg:sapphire" 138 | format = '[$symbol$environment ]($style)' 139 | ignore_base = false 140 | 141 | [time] 142 | disabled = false 143 | time_format = "%R" 144 | style = "bg:lavender" 145 | format = '[[  $time ](fg:crust bg:lavender)]($style)' 146 | 147 | [line_break] 148 | disabled = true 149 | 150 | [character] 151 | disabled = false 152 | success_symbol = '[❯](bold fg:green)' 153 | error_symbol = '[❯](bold fg:red)' 154 | vimcmd_symbol = '[❮](bold fg:green)' 155 | vimcmd_replace_one_symbol = '[❮](bold fg:lavender)' 156 | vimcmd_replace_symbol = '[❮](bold fg:lavender)' 157 | vimcmd_visual_symbol = '[❮](bold fg:yellow)' 158 | 159 | [cmd_duration] 160 | show_milliseconds = false 161 | format = " in $duration " 162 | style = "bg:lavender" 163 | disabled = false 164 | show_notifications = false 165 | min_time_to_notify = 45000 166 | 167 | [palettes.catppuccin_mocha] 168 | rosewater = "#f5e0dc" 169 | flamingo = "#f2cdcd" 170 | pink = "#f5c2e7" 171 | mauve = "#cba6f7" 172 | red = "#f38ba8" 173 | maroon = "#eba0ac" 174 | peach = "#fab387" 175 | yellow = "#f9e2af" 176 | green = "#a6e3a1" 177 | teal = "#94e2d5" 178 | sky = "#89dceb" 179 | sapphire = "#74c7ec" 180 | blue = "#89b4fa" 181 | lavender = "#b4befe" 182 | text = "#cdd6f4" 183 | subtext1 = "#bac2de" 184 | subtext0 = "#a6adc8" 185 | overlay2 = "#9399b2" 186 | overlay1 = "#7f849c" 187 | overlay0 = "#6c7086" 188 | surface2 = "#585b70" 189 | surface1 = "#45475a" 190 | surface0 = "#313244" 191 | base = "#1e1e2e" 192 | mantle = "#181825" 193 | crust = "#11111b" 194 | 195 | [palettes.catppuccin_frappe] 196 | rosewater = "#f2d5cf" 197 | flamingo = "#eebebe" 198 | pink = "#f4b8e4" 199 | mauve = "#ca9ee6" 200 | red = "#e78284" 201 | maroon = "#ea999c" 202 | peach = "#ef9f76" 203 | yellow = "#e5c890" 204 | green = "#a6d189" 205 | teal = "#81c8be" 206 | sky = "#99d1db" 207 | sapphire = "#85c1dc" 208 | blue = "#8caaee" 209 | lavender = "#babbf1" 210 | text = "#c6d0f5" 211 | subtext1 = "#b5bfe2" 212 | subtext0 = "#a5adce" 213 | overlay2 = "#949cbb" 214 | overlay1 = "#838ba7" 215 | overlay0 = "#737994" 216 | surface2 = "#626880" 217 | surface1 = "#51576d" 218 | surface0 = "#414559" 219 | base = "#303446" 220 | mantle = "#292c3c" 221 | crust = "#232634" 222 | 223 | [palettes.catppuccin_latte] 224 | rosewater = "#dc8a78" 225 | flamingo = "#dd7878" 226 | pink = "#ea76cb" 227 | mauve = "#8839ef" 228 | red = "#d20f39" 229 | maroon = "#e64553" 230 | peach = "#fe640b" 231 | yellow = "#df8e1d" 232 | green = "#40a02b" 233 | teal = "#179299" 234 | sky = "#04a5e5" 235 | sapphire = "#209fb5" 236 | blue = "#1e66f5" 237 | lavender = "#7287fd" 238 | text = "#4c4f69" 239 | subtext1 = "#5c5f77" 240 | subtext0 = "#6c6f85" 241 | overlay2 = "#7c7f93" 242 | overlay1 = "#8c8fa1" 243 | overlay0 = "#9ca0b0" 244 | surface2 = "#acb0be" 245 | surface1 = "#bcc0cc" 246 | surface0 = "#ccd0da" 247 | base = "#eff1f5" 248 | mantle = "#e6e9ef" 249 | crust = "#dce0e8" 250 | 251 | [palettes.catppuccin_macchiato] 252 | rosewater = "#f4dbd6" 253 | flamingo = "#f0c6c6" 254 | pink = "#f5bde6" 255 | mauve = "#c6a0f6" 256 | red = "#ed8796" 257 | maroon = "#ee99a0" 258 | peach = "#f5a97f" 259 | yellow = "#eed49f" 260 | green = "#a6da95" 261 | teal = "#8bd5ca" 262 | sky = "#91d7e3" 263 | sapphire = "#7dc4e4" 264 | blue = "#8aadf4" 265 | lavender = "#b7bdf8" 266 | text = "#cad3f5" 267 | subtext1 = "#b8c0e0" 268 | subtext0 = "#a5adcb" 269 | overlay2 = "#939ab7" 270 | overlay1 = "#8087a2" 271 | overlay0 = "#6e738d" 272 | surface2 = "#5b6078" 273 | surface1 = "#494d64" 274 | surface0 = "#363a4f" 275 | base = "#24273a" 276 | mantle = "#1e2030" 277 | crust = "#181926" 278 | -------------------------------------------------------------------------------- /home/cli/utils/starship/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | starship.enable = lib.mkEnableOption "Enable starship module"; 10 | }; 11 | config = lib.mkIf config.starship.enable { 12 | programs.starship = 13 | let 14 | mocha = import ./mocha.nix; 15 | oxocarbon = import ./oxocarbon.nix; 16 | catppuccinPowerline = builtins.fromTOML (builtins.readFile ./catppuccin-powerline.toml); 17 | pure = builtins.fromTOML (builtins.readFile ./pure-preset.toml); 18 | tuxdot = import ./tuxdot.nix; 19 | in 20 | { 21 | enable = true; 22 | settings = catppuccinPowerline; 23 | }; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /home/cli/utils/starship/mocha.nix: -------------------------------------------------------------------------------- 1 | { 2 | add_newline = false; 3 | format = '' 4 | [](#b4befe)[  ](bg:#b4befe fg:black)[](bg:black fg:#b4befe)$directory[](black) $git_branch$nix_shell 5 | $character 6 | ''; 7 | directory = { 8 | format = "[ $path ]($style)"; 9 | style = "bg:black"; 10 | truncate_to_repo = false; 11 | }; 12 | git_branch = { 13 | style = "bold yellow"; 14 | }; 15 | character = { 16 | success_symbol = "[🠚 ](bold #b4befe)"; 17 | error_symbol = "[🠚 ](bold #dd6777)"; 18 | }; 19 | nix_shell = { 20 | symbol = "[](bold #7aa2f7) "; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /home/cli/utils/starship/oxocarbon.nix: -------------------------------------------------------------------------------- 1 | { 2 | scan_timeout = 10; 3 | add_newline = false; 4 | line_break.disabled = false; 5 | format = '' 6 | $symbol[λ ](bold #ee5396)$username$git_branch 7 | $directory$character 8 | ''; 9 | # format = "$symbol[󰉊 ](bold #ee5396) $directory$character 10 | right_format = "$cmd_duration$time"; 11 | character = { 12 | success_symbol = "[󰅂 ](bold #393939)"; 13 | error_symbol = "[󰅂 ](bold #393939)"; 14 | vicmd_symbol = "[󰅂 ](bold #393939)"; 15 | }; 16 | 17 | username = { 18 | show_always = true; 19 | style_user = "bold bg:none fg:#7aa2f7"; 20 | format = "[$user]($style)"; 21 | }; 22 | 23 | hostname = { 24 | disabled = true; 25 | ssh_only = false; 26 | style = "bold bg:none fg:#CDD6F4"; 27 | format = "@[$hostname]($style) "; 28 | }; 29 | 30 | directory = { 31 | read_only = " "; 32 | truncation_length = 3; 33 | truncation_symbol = "./"; 34 | style = "bold bg:none fg:#393939"; 35 | }; 36 | 37 | git_branch = { 38 | format = " on [$symbol$branch(:$remote_branch)]($style) "; 39 | symbol = " "; 40 | style = "bold #be95ff"; 41 | }; 42 | 43 | time = { 44 | disabled = false; 45 | use_12hr = true; 46 | time_range = "-"; 47 | time_format = "%R"; 48 | utc_time_offset = "local"; 49 | format = "[ $time 󰥔]($style) "; 50 | style = "bold #393939"; 51 | }; 52 | 53 | nix_shell = { 54 | disabled = false; 55 | heuristic = false; 56 | impure_msg = "[impure-shell](red)"; 57 | pure_msg = "[pure-shell](green)"; 58 | unknown_msg = "[unknown-shell](yellow)"; 59 | }; 60 | 61 | cmd_duration = { 62 | min_time = 2000; 63 | show_milliseconds = false; 64 | format = "took [$duration]($style)"; 65 | style = "bold yellow"; 66 | disabled = false; 67 | }; 68 | } 69 | -------------------------------------------------------------------------------- /home/cli/utils/starship/pure-preset.toml: -------------------------------------------------------------------------------- 1 | format = """ 2 | $username\ 3 | $hostname\ 4 | $directory\ 5 | $git_branch\ 6 | $git_state\ 7 | $git_status\ 8 | $cmd_duration\ 9 | $line_break\ 10 | $python\ 11 | $character""" 12 | 13 | [directory] 14 | style = "blue" 15 | 16 | [character] 17 | success_symbol = "[❯](purple)" 18 | error_symbol = "[❯](red)" 19 | vimcmd_symbol = "[❮](green)" 20 | 21 | [git_branch] 22 | format = "[$branch]($style)" 23 | style = "bright-black" 24 | 25 | [git_status] 26 | format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)" 27 | style = "cyan" 28 | conflicted = "​" 29 | untracked = "​" 30 | modified = "​" 31 | staged = "​" 32 | renamed = "​" 33 | deleted = "​" 34 | stashed = "≡" 35 | 36 | [git_state] 37 | format = '\([$state( $progress_current/$progress_total)]($style)\) ' 38 | style = "bright-black" 39 | 40 | [cmd_duration] 41 | format = "[$duration]($style) " 42 | style = "yellow" 43 | 44 | [python] 45 | format = "[$virtualenv]($style) " 46 | style = "bright-black" 47 | -------------------------------------------------------------------------------- /home/cli/utils/starship/tuxdot.nix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redyf/nixdots/c5084f87801d016af75257ce7a4805d03b888a42/home/cli/utils/starship/tuxdot.nix -------------------------------------------------------------------------------- /home/cli/utils/tmux/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | tmux.enable = lib.mkEnableOption "Enable tmux module"; 10 | }; 11 | config = lib.mkIf config.tmux.enable { 12 | programs.tmux = { 13 | enable = true; 14 | clock24 = true; 15 | baseIndex = 1; 16 | terminal = "xterm-256color"; 17 | escapeTime = 0; 18 | keyMode = "vi"; 19 | prefix = "C-Space"; 20 | shell = "${pkgs.zsh}/bin/zsh"; 21 | mouse = true; 22 | plugins = 23 | let 24 | tmuxPluginsList = with pkgs.tmuxPlugins; [ 25 | yank 26 | sensible 27 | tmux-fzf 28 | vim-tmux-navigator 29 | ]; 30 | in 31 | tmuxPluginsList; 32 | extraConfig = '' 33 | #-------------------------------------------------------------------------- 34 | # Keybinds 35 | #-------------------------------------------------------------------------- 36 | # Shift Alt vim keys to switch windows 37 | bind -n M-J previous-window 38 | bind -n M-K next-window 39 | 40 | # Open panes in current directory 41 | bind '"' split-window -v -c "#{pane_current_path}" 42 | bind % split-window -h -c "#{pane_current_path}" 43 | 44 | # Copy mode 45 | bind-key -T copy-mode-vi v send-keys -X begin-selection 46 | bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle 47 | bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel 48 | 49 | # Navigate panes like in neovim 50 | # bind -r h select-pane -L 51 | # bind -r j select-pane -D 52 | # bind -r k select-pane -U 53 | # bind -r l select-pane -R 54 | 55 | # Unbind p from previous-window 56 | unbind p 57 | 58 | # make Prefix p paste the buffer. 59 | bind p paste-buffer 60 | 61 | # Don't exit from tmux when closing a session 62 | set -g detach-on-destroy off 63 | 64 | # Renumber all windows when any window is closed 65 | set -g renumber-windows on 66 | 67 | # Tmux sessionizer 68 | bind -r f run-shell "tmux neww tmux-sessionizer-script" 69 | 70 | #-------------------------------------------------------------------------- 71 | # Status Bar Gitmux 72 | #-------------------------------------------------------------------------- 73 | 74 | # set -g status-left "#[fg=blue,bold]#S #[fg=white,nobold]#(${pkgs.gitmux}/bin/gitmux -cfg ${./gitmux.yml}) " 75 | # set -g status-right "" 76 | # 77 | # set -g status-left-length 300 # increase length (from 10) 78 | # set -g status-position top # macOS / darwin style 79 | # set -g status-style 'bg=default' # transparent 80 | # 81 | # set -g window-status-current-format '*#[fg=magenta]#W' 82 | # set -g window-status-format ' #[fg=gray]#W' 83 | # 84 | # set -g allow-passthrough on 85 | # set -g message-command-style bg=default,fg=yellow 86 | # set -g message-style bg=default,fg=yellow 87 | # set -g mode-style bg=default,fg=yellow 88 | # set -g pane-active-border-style 'fg=white,bg=default' 89 | # set -g pane-border-style 'fg=brightblack,bg=default' 90 | # 91 | # bind '%' split-window -c '#{pane_current_path}' -h 92 | # bind '"' split-window -c '#{pane_current_path}' 93 | # bind c new-window -c '#{pane_current_path}' 94 | # TODO: repeat this for all bindings 95 | 96 | # bind -N "⌘+l last-session (via sesh) " L run-shell "sesh last || tmux display-message -d 1000 'Oops, no last sessions found'" 97 | # bind -N "⌘+9 switch to root session (via sesh) " 9 run-shell "sesh connect --root $(pwd)" 98 | # 99 | # bind -N "⌘+g lazygit " g new-window -c "#{pane_current_path}" -n "🌳" "lazygit 2> /dev/null" 100 | # bind -N "⌘+G gh-dash " G new-window -c "#{pane_current_path}" -n "😺" "ghd 2> /dev/null" 101 | # bind -N "⌘+b build" b split-window -v -l 10 build 102 | # bind -N "⌘+d dev" D split-window -v -l 10 dev 103 | # bind -N "⌘+R run a script" Y split-window -v -l 10 "npm run (jq -r '.scripts | keys[]' package.json | fzf --no-border)" 104 | # bind -N "⌘+Q kill current session" Q kill-session 105 | # bind -N "⌘+⇧+t break pane" B break-pane 106 | # bind -N "⌘+^+t join pane" J join-pane -t 1 107 | 108 | #-------------------------------------------------------------------------- 109 | # Status Bar by conaN 110 | #-------------------------------------------------------------------------- 111 | set -g @terminal_background "#232634" 112 | set -g @terminal_foreground "#c6d0f5" 113 | 114 | set -g @pane_active_border "#838ba7" 115 | set -g @pane_inactive_border "#414559" 116 | 117 | set -g @status_background "#303446" 118 | set -g @status_foreground "#c6d0f5" 119 | set -g @status_separator_left "" 120 | set -g @status_separator_right "" 121 | 122 | set -g @window_active_color "#51576d" 123 | set -g @window_inactive_color "#303446" 124 | set -g @window_separator_left "" 125 | set -g @window_separator_right "" 126 | 127 | set -g @session_normal_color "#8caaee" 128 | set -g @session_prefix_color "#a6d189" 129 | set -g @session_mode_color "#e5c890" 130 | set -g @session_zoom_color "#ca9ee6" 131 | 132 | set -g @directory_icon " " 133 | set -g @directory_icon_color "#e5c890" 134 | 135 | set -g @git_icon " " 136 | set -g @git_icon_color "#a6d189" 137 | 138 | set -g @icon_nvim " " 139 | set -g @color_nvim "#81c8be" 140 | set -g @icon_fish " " 141 | set -g @color_fish "#ea999c" 142 | set -g @icon_yazi " " 143 | set -g @color_yazi "#e5c890" 144 | set -g @icon_lazygit " " 145 | set -g @color_lazygit "#a6d189" 146 | set -g @icon_neogit " " 147 | set -g @color_neogit "#cba6f7" 148 | set -g @icon_fallback " " 149 | set -g @color_fallback "#8caaee" 150 | #======================================================================================================================================================================================================================# 151 | set -g focus-events on 152 | set -g allow-passthrough on 153 | set -g monitor-bell off 154 | set -g visual-bell off 155 | 156 | set -g status-right-length 100 157 | set -g status-left-length 100 158 | set -g status 2 159 | set -g status-format[1] "" 160 | set -g status-interval 2 161 | set -g status-position top 162 | 163 | set -g status-style 'bg=default' # transparent 164 | # set -g status-style "bg=#{@terminal_background},fg=#{@terminal_foreground}" # Original, but I want to use transparency 165 | set -g mode-style "bg=#{@terminal_foreground},fg=#{@terminal_background}" 166 | set -g pane-active-border-style "bg=#{@terminal_background},fg=#{@pane_active_border}" 167 | set -g pane-border-style "bg=#{@terminal_background},fg=#{@pane_inactive_border}" 168 | #======================================================================================================================================================================================================================# 169 | set -g window-status-current-format "\ 170 | #[fg=#{@window_active_color}]#[bg=#{@terminal_background}]#{@window_separator_left}\ 171 | #[bg=#{@window_active_color}]\ 172 | \ 173 | #{?#{==:#{pane_current_command},nvim},#[fg=#{@color_nvim}]#{@icon_nvim}#[fg=#{@status_foreground}]#{pane_current_command},\ 174 | #{?#{==:#{pane_current_command},fish},#[fg=#{@color_fish}]#{@icon_fish}#[fg=#{@status_foreground}]#{pane_current_command},\ 175 | #{?#{==:#{pane_current_command},yazi},#[fg=#{@color_yazi}]#{@icon_yazi}#[fg=#{@status_foreground}]#{pane_current_command},\ 176 | #{?#{==:#{pane_current_command},lazygit},#[fg=#{@color_lazygit}]#{@icon_lazygit}#[fg=#{@status_foreground}]#{pane_current_command},\ 177 | \ 178 | #[fg=#{@color_fallback}]#{@icon_fallback}#[fg=#{@status_foreground}]#{pane_current_command}}}}}\ 179 | \ 180 | #[fg=#{@window_active_color}]#[bg=#{@terminal_background}]#{@window_separator_right}" 181 | #======================================================================================================================================================================================================================# 182 | 183 | #======================================================================================================================================================================================================================# 184 | set -g window-status-format "\ 185 | #[fg=#{@window_inactive_color}]#[bg=#{@terminal_background}]#{@window_separator_left}\ 186 | #[bg=#{@window_inactive_color}]\ 187 | \ 188 | #{?#{==:#{pane_current_command},nvim},#[fg=#{@color_nvim}]#{@icon_nvim}#[fg=#{@status_foreground}]#{pane_current_command},\ 189 | #{?#{==:#{pane_current_command},fish},#[fg=#{@color_fish}]#{@icon_fish}#[fg=#{@status_foreground}]#{pane_current_command},\ 190 | #{?#{==:#{pane_current_command},yazi},#[fg=#{@color_yazi}]#{@icon_yazi}#[fg=#{@status_foreground}]#{pane_current_command},\ 191 | #{?#{==:#{pane_current_command},lazygit},#[fg=#{@color_lazygit}]#{@icon_lazygit}#[fg=#{@status_foreground}]#{pane_current_command},\ 192 | \ 193 | #[fg=#{@color_fallback}]#{@icon_fallback}#[fg=#{@status_foreground}]#{pane_current_command}}}}}\ 194 | \ 195 | #[fg=#{@window_inactive_color}]#[bg=#{@terminal_background}]#{@window_separator_right}" 196 | #======================================================================================================================================================================================================================# 197 | 198 | #======================================================================================================================================================================================================================# 199 | set -g status-left "\ 200 | #[fg=#{?client_prefix,#{@session_prefix_color},#{?pane_in_mode,#{@session_mode_color},#{?window_zoomed_flag,#{@session_zoom_color},#{@session_normal_color}}}},bg=#{@terminal_background}]#{@status_separator_left}\ 201 | #[fg=#{@terminal_background},bg=#{?client_prefix,#{@session_prefix_color},#{?pane_in_mode,#{@session_mode_color},#{?window_zoomed_flag,#{@session_zoom_color},#{@session_normal_color}}}}]\ 202 | #S\ 203 | #[fg=#{?client_prefix,#{@session_prefix_color},#{?pane_in_mode,#{@session_mode_color},#{?window_zoomed_flag,#{@session_zoom_color},#{@session_normal_color}}}},bg=#{@terminal_background}]#{@status_separator_right}\ 204 | " 205 | #======================================================================================================================================================================================================================# 206 | 207 | #======================================================================================================================================================================================================================# 208 | set -g status-right "\ 209 | \ 210 | #[fg=#{@status_background},bg=#{@terminal_background}]#{@status_separator_left}\ 211 | #[fg=#{@directory_icon_color},bg=#{@status_background}]#{@directory_icon}\ 212 | #[fg=#{@status_foreground},bg=#{@status_background}]\ 213 | \ 214 | #(echo #{pane_current_path} | sed 's|^$HOME|~|')\ 215 | \ 216 | #[fg=#{@status_background},bg=#{@terminal_background}]#{@status_separator_right}" 217 | 218 | set -ag status-right "\ 219 | \ 220 | #[fg=#{@status_background},bg=#{@terminal_background}]#{@status_separator_left}\ 221 | #[fg=#{@git_icon_color},bg=#{@status_background}]#{@git_icon}\ 222 | #[fg=#{@status_foreground},bg=#{@status_background}]\ 223 | \ 224 | #(git -C \"#{pane_current_path}\" branch --show-current 2>/dev/null || printf '·')\ 225 | \ 226 | #[fg=#{@status_background},bg=#{@terminal_background}]#{@status_separator_right}" 227 | #======================================================================================================================================================================================================================# 228 | ''; 229 | }; 230 | home.packages = with pkgs; [ 231 | # https://frontendmasters.github.io/dev-prod-2/lessons/navigation/tmux 232 | tmux-sessionizer 233 | gitmux 234 | # Script to find files with tmux in vim 235 | (writeShellScriptBin "tmux-sessionizer-script" '' 236 | selected=$(find ~/work ~/ztm ~/personal ~/projects ~/opensource -maxdepth 1 -mindepth 1 -type d | fzf) 237 | if [[ -z "$selected" ]]; then 238 | exit 0 239 | fi 240 | selected_name=$(basename $selected | tr ".,: " "____") 241 | 242 | switch_to() { 243 | if [[ -z "$TMUX" ]]; then 244 | tmux attach-session -t $selected_name 245 | else 246 | tmux switch-client -t $selected_name 247 | fi 248 | } 249 | 250 | if tmux has-session -t="$selected_name"; then 251 | switch_to 252 | else 253 | tmux new-session -ds $selected_name -c $selected 254 | switch_to 255 | fi 256 | '') 257 | ]; 258 | }; 259 | } 260 | -------------------------------------------------------------------------------- /home/cli/utils/tmux/gitmux.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ██████╗ ██╗████████╗███╗ ███╗██╗ ██╗██╗ ██╗ 3 | # ██╔════╝ ██║╚══██╔══╝████╗ ████║██║ ██║╚██╗██╔╝ 4 | # ██║ ███╗██║ ██║ ██╔████╔██║██║ ██║ ╚███╔╝ 5 | # ██║ ██║██║ ██║ ██║╚██╔╝██║██║ ██║ ██╔██╗ 6 | # ╚██████╔╝██║ ██║ ██║ ╚═╝ ██║╚██████╔╝██╔╝ ██╗ 7 | # ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ 8 | # 9 | # Git in your tmux status bar 10 | # https://github.com/arl/gitmux 11 | 12 | tmux: 13 | symbols: 14 | ahead: "👆" 15 | behind: "👇" 16 | clean: "" 17 | branch: "" 18 | hashprefix: ":" 19 | staged: " " 20 | conflict: "󰕚 " 21 | untracked: "󱀶 " 22 | modified: " " 23 | stashed: " " 24 | insertions: " " 25 | deletions: " " 26 | styles: 27 | state: "#[fg=red,nobold]" 28 | branch: "#[fg=white,nobold]" 29 | staged: "#[fg=green,nobold]" 30 | conflict: "#[fg=red,nobold]" 31 | modified: "#[fg=blue,nobold]" 32 | untracked: "#[fg=gray,nobold]" 33 | stashed: "#[fg=gray,nobold]" 34 | clean: "#[fg=green,nobold]" 35 | divergence: "#[fg=yellow,nobold]" 36 | layout: [branch, divergence, flags, stats] 37 | options: 38 | branch_max_len: 0 39 | hide_clean: false 40 | -------------------------------------------------------------------------------- /home/cli/utils/zoxide/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | ... 5 | }: 6 | { 7 | options = { 8 | zoxide.enable = lib.mkEnableOption "Enable zoxide module"; 9 | }; 10 | config = lib.mkIf config.zoxide.enable { 11 | programs.zoxide = { 12 | enable = true; 13 | options = [ 14 | "--cmd cd" 15 | ]; 16 | }; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /home/desktop/addons/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | pkgs, 5 | ... 6 | }: 7 | { 8 | imports = [ 9 | ./swww 10 | ./waybar 11 | ./wezterm 12 | ./wofi 13 | ]; 14 | options = { 15 | addons.enable = lib.mkEnableOption "Enable addons module"; 16 | }; 17 | config = lib.mkIf config.addons.enable { 18 | swww.enable = lib.mkDefault true; 19 | waybar.enable = lib.mkDefault false; 20 | wezterm.enable = lib.mkDefault true; 21 | wofi.enable = lib.mkDefault true; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /home/desktop/addons/swww/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | swww.enable = lib.mkEnableOption "Enable swww module"; 10 | }; 11 | config = lib.mkIf config.swww.enable { 12 | home.packages = with pkgs; [ 13 | (writeShellScriptBin "wallpaper" '' 14 | /usr/bin/env ls ~/wallpapers/ | sort -R | tail -1 |while read file; do 15 | swww img ~/wallpapers/$file --transition-fps 60 --transition-type wipe 16 | echo "~/wallpapers/$file" 17 | done 18 | '') 19 | swww 20 | ]; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /home/desktop/addons/waybar/catppuccin/config.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | mainBar = { 3 | layer = "top"; 4 | position = "top"; 5 | mod = "dock"; 6 | modules-left = ["custom/arch" "hyprland/workspaces"]; 7 | modules-center = ["hyprland/window"]; 8 | modules-right = [ 9 | "tray" 10 | "network" 11 | # "battery" 12 | "pulseaudio" 13 | "clock" 14 | ]; 15 | 16 | "hyprland/workspaces" = { 17 | format = "{icon}"; 18 | format-icons = { 19 | active = ""; 20 | default = ""; 21 | }; 22 | }; 23 | 24 | "custom/arch" = { 25 | format = " 󱄅 "; 26 | tooltip = false; 27 | on-click-release = "bemenu-run"; 28 | }; 29 | 30 | "custom/media" = { 31 | "format" = " {}"; 32 | "max-lenght" = "40"; 33 | "interval" = "1"; 34 | "exec" = "playerctl metadata --format '{{ artist }} - {{ title }}'"; 35 | "on-click" = "playerctl play-pause"; 36 | "on-click-right" = "playerctl stop"; 37 | "smooth-scrolling-threshold" = "4"; 38 | "on-scroll-up" = "playerctl next"; 39 | "on-scroll-down" = "playerctl previous"; 40 | }; 41 | 42 | "idle_inhibitor" = { 43 | format = "{icon}"; 44 | format-icons = { 45 | activated = " "; 46 | deactivated = " "; 47 | }; 48 | }; 49 | 50 | "tray" = { 51 | spacing = "10"; 52 | icon-size = "13"; 53 | }; 54 | 55 | "clock" = { 56 | format = "{:󰥔 %R} "; 57 | tooltip-format = "{:%Y %B}\n{calendar}"; 58 | }; 59 | 60 | "cpu" = { 61 | format = " {usage}%"; 62 | tooltip = "false"; 63 | }; 64 | 65 | "memory" = { 66 | format = " {}%"; 67 | on-click = "foot -e btop"; 68 | }; 69 | 70 | "backlight" = { 71 | format = "{icon}{percent}%"; 72 | format-icons = ["󰃞 " "󰃟 " "󰃠 "]; 73 | on-scroll-up = "light -A 1"; 74 | on-scroll-down = "light -U 1"; 75 | }; 76 | 77 | "battery" = { 78 | states = { 79 | warning = "30"; 80 | critical = "15"; 81 | }; 82 | format = "{icon}{capacity}%"; 83 | tooltip-format = "{timeTo} {capacity}%"; 84 | format-charging = "󰂄 {capacity}%"; 85 | format-plugged = " "; 86 | format-alt = "{time} {icon}"; 87 | format-icons = [" " " " " " " " " "]; 88 | }; 89 | 90 | "network" = { 91 | format-wifi = "󰖩 {essid}"; 92 | format-ethernet = "󰈀 "; 93 | format-linked = "{ifname} (No IP) 󰈀 "; 94 | format-disconnected = "󰖪 Disconnected"; 95 | on-click = "foot -e nmtui"; 96 | tooltip-format = "{essid} {signalStrength}%"; 97 | }; 98 | 99 | "pulseaudio" = { 100 | format = "{icon}"; 101 | format-muted = " 󰖁 "; 102 | format-icons = { 103 | default = ["  " "  " "  "]; 104 | }; 105 | on-click = "pavucontrol &"; 106 | }; 107 | 108 | "custom/wmname" = { 109 | format = " "; 110 | tooltip = "false"; 111 | on-click = "$HOME/.config/rofi/launchers/type-1/launcher.sh"; 112 | on-click-right = "$HOME/.config/hypr/Scripts/screenshot"; 113 | on-click-middle = "$HOME/.config/hypr/Scripts/wallpaper-switch"; 114 | }; 115 | 116 | "custom/powermenu" = { 117 | format = " "; 118 | on-click = "$HOME/.config/rofi/powermenu/powermenu.sh"; 119 | }; 120 | }; 121 | } 122 | -------------------------------------------------------------------------------- /home/desktop/addons/waybar/catppuccin/style.nix: -------------------------------------------------------------------------------- 1 | _: '' 2 | * { 3 | font-family: Ubuntu Nerd Font; 4 | font-weight: normal; 5 | font-size: 14px; 6 | min-height: 0; 7 | color: #cdd6f4; 8 | } 9 | #window, 10 | #clock, 11 | #tray, 12 | #pulseaudio, 13 | #battery, 14 | #network, 15 | #workspaces, 16 | #window, 17 | #custom-arch { 18 | background-color: #1e1e2e; 19 | margin-top: 2px; 20 | margin-bottom: 0px; 21 | padding: 3px; 22 | } 23 | #tray { 24 | border: 2px solid #9999CC; 25 | padding-left: 5px; 26 | padding-right: 5px 27 | } 28 | #custom-arch, 29 | #window { 30 | border: 2px solid #9999CC ; 31 | border-radius: 10px 10px 10px 10px; 32 | } 33 | #custom-spotify { 34 | margin-left: 3px ; 35 | border: 2px solid #9999CC ; 36 | border-radius: 10px 10px 10px 10px; 37 | } 38 | #workspaces { 39 | border: 2px solid #9999CC ; 40 | color: #eeeeef; 41 | } 42 | #clock { 43 | border-right: 2px solid #9999CC; 44 | border-top: 2px solid #9999CC; 45 | border-bottom: 2px solid #9999CC 46 | } 47 | #network { 48 | border-left: 2px solid #9999CC; 49 | border-top: 2px solid #9999CC; 50 | border-bottom: 2px solid #9999CC 51 | } 52 | #battery { 53 | border-top: 2px solid #9999CC; 54 | border-bottom: 2px solid #9999CC 55 | } 56 | #pulseaudio { 57 | border-top: 2px solid #9999CC; 58 | border-bottom: 2px solid #9999CC 59 | } 60 | #tray { 61 | border-radius: 10px 10px 10px 10px; 62 | margin-right: 3px; 63 | } 64 | #network { 65 | border-radius: 10px 0px 0px 10px; 66 | } 67 | #clock { 68 | border-radius: 0px 10px 10px 0px} 69 | #custom-arch { 70 | font-size: 16px; 71 | margin-left: 3px; 72 | margin-right: 3px } 73 | #clock { 74 | font-weight: bold; 75 | margin-right: 3px; 76 | } 77 | #window { 78 | font-weight: bold; 79 | border-radius: 10px 10px 10px 10px; 80 | padding-left: 7px; 81 | padding-right: 7px; 82 | } 83 | #workspaces button { 84 | color: #eeeeef; 85 | padding: 1px; 86 | } 87 | #workspaces button.active { 88 | color: white; 89 | } 90 | 91 | #workspaces button.focused { 92 | color: white; 93 | } 94 | #workspaces { 95 | border-radius: 10px 10px 10px 10px; 96 | } 97 | button { 98 | min-width: 16px; 99 | } 100 | window#waybar { 101 | /* you can also GTK3 CSS functions! */ 102 | background-color: transparent; 103 | border-radius: 10px 10px 10px 10px; 104 | } 105 | '' 106 | -------------------------------------------------------------------------------- /home/desktop/addons/waybar/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | osConfig, 3 | lib, 4 | config, 5 | pkgs, 6 | ... 7 | }: 8 | let 9 | # Bar v1 10 | # waybar_config = import ./og/config.nix { 11 | # inherit 12 | # osConfig 13 | # config 14 | # lib 15 | # pkgs 16 | # ; 17 | # }; 18 | # waybar_style = import ./og/style.nix { inherit (config) colorscheme; }; 19 | # NixBar 20 | # waybar_config = import ./nixbar/config.nix { 21 | # inherit 22 | # osConfig 23 | # config 24 | # lib 25 | # pkgs 26 | # ; 27 | # }; 28 | # waybar_style = import ./nixbar/style.nix { inherit (config) colorscheme; }; 29 | # Catppuccin 30 | # waybar_config = import ./catppuccin/config.nix {inherit osConfig config lib pkgs;}; 31 | # waybar_style = import ./catppuccin/style.nix {inherit (config) colorscheme;}; 32 | # Niri 33 | # waybar_config = import ./niri/config.nix { 34 | # inherit 35 | # osConfig 36 | # config 37 | # lib 38 | # pkgs 39 | # ; 40 | # }; 41 | # waybar_style = import ./niri/style.nix { inherit config; }; 42 | waybar_config = import ./macos/config.nix { 43 | inherit 44 | osConfig 45 | config 46 | lib 47 | pkgs 48 | ; 49 | }; 50 | waybar_style = import ./macos/style.nix { inherit (config) colorscheme; }; 51 | in 52 | { 53 | options = { 54 | waybar.enable = lib.mkEnableOption "Enable waybar module"; 55 | }; 56 | config = lib.mkIf config.waybar.enable { 57 | programs.waybar = { 58 | enable = true; 59 | package = pkgs.waybar; 60 | settings = waybar_config; 61 | style = waybar_style; 62 | }; 63 | xdg = { 64 | configFile = { 65 | "waybar/machiatto.css".text = '' 66 | /* 67 | * 68 | * Catppuccin Macchiato palette 69 | * Maintainer: rubyowo 70 | * 71 | */ 72 | 73 | @define-color base #24273a; 74 | @define-color mantle #1e2030; 75 | @define-color crust #181926; 76 | 77 | @define-color text #cad3f5; 78 | @define-color subtext0 #a5adcb; 79 | @define-color subtext1 #b8c0e0; 80 | 81 | @define-color surface0 #363a4f; 82 | @define-color surface1 #494d64; 83 | @define-color surface2 #5b6078; 84 | 85 | @define-color overlay0 #6e738d; 86 | @define-color overlay1 #8087a2; 87 | @define-color overlay2 #939ab7; 88 | 89 | @define-color blue #8aadf4; 90 | @define-color lavender #b7bdf8; 91 | @define-color sapphire #7dc4e4; 92 | @define-color sky #91d7e3; 93 | @define-color teal #8bd5ca; 94 | @define-color green #a6da95; 95 | @define-color yellow #eed49f; 96 | @define-color peach #f5a97f; 97 | @define-color maroon #ee99a0; 98 | @define-color red #ed8796; 99 | @define-color mauve #c6a0f6; 100 | @define-color pink #f5bde6; 101 | @define-color flamingo #f0c6c6; 102 | @define-color rosewater #f4dbd6; 103 | ''; 104 | }; 105 | }; 106 | }; 107 | } 108 | -------------------------------------------------------------------------------- /home/desktop/addons/waybar/macos/config.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | let 3 | customDate = "${pkgs.writeShellScriptBin "custom_date" '' 4 | date '+%a %d %b' 5 | ''}/bin/custom_date"; 6 | in 7 | { 8 | mainBar = { 9 | layer = "top"; 10 | height = 35; 11 | margin-top = 0; 12 | margin-bottom = 0; 13 | margin-left = 0; 14 | margin-right = 0; 15 | spacing = 10; 16 | border-size = 0; 17 | padding = 10; 18 | 19 | modules-left = [ 20 | "custom/launcher" 21 | "hyprland/window" 22 | "custom/texttwo" 23 | "custom/textthree" 24 | "custom/textfour" 25 | "custom/textfive" 26 | ]; 27 | modules-right = [ 28 | "tray" 29 | "image#ethernetart" 30 | "custom/date" 31 | "clock" 32 | ]; 33 | 34 | "tray" = { 35 | icon-size = 13; 36 | spacing = 10; 37 | }; 38 | 39 | clock = { 40 | format = "{:%H:%M %p}"; 41 | tooltip-format = "{:%A, %B %d, %Y}"; 42 | }; 43 | 44 | "custom/date" = { 45 | exec = customDate; 46 | interval = 60; 47 | tooltip = false; 48 | }; 49 | 50 | "hyprland/window" = { 51 | format = "{class}"; 52 | max-length = 20; 53 | rewrite = { 54 | "^(?!.*\\S).*" = "Finder"; 55 | }; 56 | }; 57 | 58 | "custom/launcher" = { 59 | "format" = ""; 60 | }; 61 | 62 | "custom/texttwo" = { 63 | exec = "echo 'File'"; 64 | interval = 60; 65 | return-type = "plain"; 66 | on-click = "Thunar"; 67 | }; 68 | 69 | "custom/textthree" = { 70 | exec = "echo 'Edit'"; 71 | interval = 60; 72 | return-type = "plain"; 73 | on-click = "krita"; 74 | }; 75 | 76 | "custom/textfour" = { 77 | exec = "echo 'View'"; 78 | interval = 60; 79 | return-type = "plain"; 80 | }; 81 | 82 | "custom/textfive" = { 83 | exec = "echo 'Help'"; 84 | interval = 60; 85 | return-type = "plain"; 86 | on-click = "yad --title='Help' --text-info --width=600 --height=400 --filename=<(man hyprland | col -bx)"; 87 | }; 88 | 89 | "image#ethernetart" = { 90 | path = "/home/redyf/.config/waybar/icons/wifi-white.png"; 91 | size = 13; 92 | interval = 60; 93 | }; 94 | }; 95 | 96 | home.file.".config/waybar/icons/wifi-white.png".source = ./wifi-white.png; 97 | } 98 | -------------------------------------------------------------------------------- /home/desktop/addons/waybar/macos/style.nix: -------------------------------------------------------------------------------- 1 | _: '' 2 | * { 3 | font-family: "Liga SFMono Nerd Font", sans-serif; 4 | font-size: 14px; 5 | color: white; 6 | background: transparent; 7 | } 8 | 9 | #waybar { 10 | background-color: rgba(28, 28, 30, 0.50); 11 | border-bottom: 1px solid #000000; 12 | padding: 4px 10px; 13 | margin: 5px; 14 | } 15 | 16 | #clock, 17 | #network, 18 | #pulseaudio, 19 | #cpu, 20 | #memory, 21 | #temperature { 22 | padding: 10px; 23 | color: white; 24 | } 25 | 26 | #network, 27 | #pulseaudio, 28 | #memory, 29 | #temperature { 30 | border-right: 1px solid #444444; 31 | } 32 | 33 | #clock { 34 | font-weight: 700; 35 | font-size: 12px; 36 | } 37 | 38 | #window { 39 | padding: 0 5px; 40 | font-weight: 600; 41 | } 42 | 43 | #battery { 44 | color: white; 45 | background: white; 46 | border-radius: 15px; 47 | margin: 5px; 48 | padding: 2px 10px; 49 | } 50 | 51 | #custom-launcher { 52 | color: white; 53 | padding: 0 20px 0 13px; 54 | font-size: 23px; 55 | } 56 | 57 | #custom-text { 58 | padding-left: 1px; 59 | font-weight: 600; 60 | } 61 | 62 | #custom-texttwo, 63 | #custom-textthree, 64 | #custom-textfour, 65 | #custom-textfive { 66 | font-size: 13px; 67 | padding-left: 20px; 68 | color: white; 69 | } 70 | 71 | #image.ethernetart { 72 | color: white; 73 | } 74 | 75 | #custom-date { 76 | color: white; 77 | font-size: 13px; 78 | font-weight: 700; 79 | } 80 | '' 81 | -------------------------------------------------------------------------------- /home/desktop/addons/waybar/niri/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | ... 4 | }: 5 | let 6 | primary_accent = "cba6f7"; 7 | secondary_accent = "89b4fa"; 8 | tertiary_accent = "f5f5f5"; 9 | background = "11111B"; 10 | in 11 | { 12 | home.packages = [ pkgs.playerctl ]; 13 | programs.waybar = { 14 | enable = true; 15 | systemd.enable = true; 16 | package = pkgs.waybar; 17 | settings.mainBar = { 18 | position = "top"; 19 | layer = "top"; 20 | margin-top = 0; 21 | margin-bottom = 0; 22 | margin-left = 0; 23 | margin-right = 0; 24 | modules-left = [ 25 | "custom/launcher" 26 | "custom/playerlabel" 27 | "custom/playerctl#backward" 28 | "custom/playerctl#play" 29 | "custom/playerctl#foward" 30 | ]; 31 | modules-center = [ 32 | "cava#left" 33 | "hyprland/workspaces" 34 | "niri/workspaces" 35 | "cava#right" 36 | ]; 37 | modules-right = [ 38 | "custom/notification" 39 | "tray" 40 | "battery" 41 | "pulseaudio" 42 | "backlight" 43 | "network" 44 | "clock" 45 | ]; 46 | clock = { 47 | format = "󰥔 {:%a, %d %b, %I:%M %p}"; 48 | tooltip = "true"; 49 | tooltip-format = "{:%Y %B}\n{calendar}"; 50 | format-alt = " {:%d/%m}"; 51 | }; 52 | "hyprland/workspaces" = { 53 | active-only = false; 54 | all-outputs = false; 55 | disable-scroll = false; 56 | on-scroll-up = "hyprctl dispatch workspace e-1"; 57 | on-scroll-down = "hyprctl dispatch workspace e+1"; 58 | format = "{name}"; 59 | on-click = "activate"; 60 | format-icons = { 61 | urgent = ""; 62 | active = ""; 63 | default = ""; 64 | sort-by-number = true; 65 | }; 66 | }; 67 | "niri/workspaces" = { 68 | all-outputs = false; 69 | current-only = true; 70 | format = "{index}"; 71 | disable-click = true; 72 | disable-markup = true; 73 | }; 74 | "cava#left" = { 75 | framerate = 60; 76 | autosens = 0; 77 | sensitivity = 5; 78 | bars = 16; 79 | lower_cutoff_freq = 50; 80 | higher_cutoff_freq = 10000; 81 | method = "pipewire"; 82 | source = "auto"; 83 | stereo = true; 84 | reverse = false; 85 | bar_delimiter = 0; 86 | monstercat = false; 87 | waves = false; 88 | input_delay = 2; 89 | format-icons = [ 90 | "" 91 | "" 92 | "" 93 | "" 94 | "" 95 | "" 96 | "" 97 | "" 98 | ]; 99 | }; 100 | "cava#right" = { 101 | framerate = 60; 102 | autosens = 0; 103 | sensitivity = 5; 104 | bars = 16; 105 | lower_cutoff_freq = 50; 106 | higher_cutoff_freq = 10000; 107 | method = "pipewire"; 108 | source = "auto"; 109 | stereo = true; 110 | reverse = false; 111 | bar_delimiter = 0; 112 | monstercat = false; 113 | waves = false; 114 | input_delay = 2; 115 | format-icons = [ 116 | "" 117 | "" 118 | "" 119 | "" 120 | "" 121 | "" 122 | "" 123 | "" 124 | ]; 125 | }; 126 | "custom/playerctl#backward" = { 127 | format = "󰙣 "; 128 | on-click = "playerctl previous"; 129 | on-scroll-up = "playerctl volume .05+"; 130 | on-scroll-down = "playerctl volume .05-"; 131 | }; 132 | "custom/playerctl#play" = { 133 | format = "{icon}"; 134 | return-type = "json"; 135 | exec = "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F"; 136 | on-click = "playerctl play-pause"; 137 | on-scroll-up = "playerctl volume .05+"; 138 | on-scroll-down = "playerctl volume .05-"; 139 | format-icons = { 140 | Playing = "󰏥 "; 141 | Paused = ""; 142 | Stopped = ""; 143 | }; 144 | }; 145 | "custom/playerctl#foward" = { 146 | format = "󰙡 "; 147 | on-click = "playerctl next"; 148 | on-scroll-up = "playerctl volume .05+"; 149 | on-scroll-down = "playerctl volume .05-"; 150 | }; 151 | "custom/playerlabel" = { 152 | format = "󰎈 {} 󰎈"; 153 | return-type = "json"; 154 | max-length = 40; 155 | exec = "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F"; 156 | on-click = ""; 157 | }; 158 | battery = { 159 | states = { 160 | good = 95; 161 | warning = 30; 162 | critical = 15; 163 | }; 164 | format = "{icon} {capacity}%"; 165 | format-charging = " {capacity}%"; 166 | format-plugged = " {capacity}% "; 167 | format-alt = "{icon} {time}"; 168 | format-icons = [ 169 | "" 170 | "" 171 | "" 172 | "" 173 | "" 174 | ]; 175 | }; 176 | 177 | memory = { 178 | format = "󰍛 {}%"; 179 | format-alt = "󰍛 {used}/{total} GiB"; 180 | interval = 5; 181 | }; 182 | cpu = { 183 | format = "󰻠 {usage}%"; 184 | format-alt = "󰻠 {avg_frequency} GHz"; 185 | interval = 5; 186 | }; 187 | network = { 188 | format-wifi = " {signalStrength}%"; 189 | format-ethernet = "󰈀 100% "; 190 | tooltip-format = "Connected to {essid} {ifname} via {gwaddr}"; 191 | format-linked = "{ifname} (No IP)"; 192 | format-disconnected = "󰖪 0% "; 193 | }; 194 | tray = { 195 | icon-size = 20; 196 | spacing = 8; 197 | }; 198 | backlight = { 199 | format = "{icon} {percent}%"; 200 | format-icons = { 201 | default = [ 202 | "" 203 | "" 204 | "" 205 | "" 206 | "" 207 | "" 208 | "" 209 | "" 210 | "" 211 | ]; 212 | }; 213 | }; 214 | pulseaudio = { 215 | format = "{icon} {volume}%"; 216 | format-muted = "󰝟"; 217 | format-icons = { 218 | default = [ 219 | "󰕿" 220 | "󰖀" 221 | "󰕾" 222 | ]; 223 | }; 224 | # on-scroll-up= "bash ~/.scripts/volume up"; 225 | # on-scroll-down= "bash ~/.scripts/volume down"; 226 | scroll-step = 5; 227 | on-click = "pavucontrol"; 228 | }; 229 | }; 230 | }; 231 | } 232 | -------------------------------------------------------------------------------- /home/desktop/addons/waybar/niri/style.nix: -------------------------------------------------------------------------------- 1 | _: 2 | let 3 | primary_accent = "cba6f7"; 4 | secondary_accent = "89b4fa"; 5 | tertiary_accent = "f5f5f5"; 6 | background = "11111B"; 7 | in 8 | '' 9 | * { 10 | border: none; 11 | border-radius: 0px; 12 | min-height: 0; 13 | } 14 | 15 | window#waybar { 16 | background-color: rgba(0, 0, 0, 0.096); 17 | } 18 | 19 | #cava.left, #cava.right { 20 | background: #${background}; 21 | margin: 5px; 22 | padding: 8px 16px; 23 | color: #${primary_accent}; 24 | } 25 | #cava.left { 26 | border-radius: 24px 10px 24px 10px; 27 | } 28 | #cava.right { 29 | border-radius: 10px 24px 10px 24px; 30 | } 31 | #workspaces { 32 | background: #${background}; 33 | margin: 5px 5px; 34 | padding: 8px 5px; 35 | border-radius: 16px; 36 | color: #${primary_accent} 37 | } 38 | #workspaces button { 39 | padding: 0px 5px; 40 | margin: 0px 3px; 41 | border-radius: 16px; 42 | color: transparent; 43 | background-color: #2f354a; 44 | transition: all 0.3s ease-in-out; 45 | } 46 | 47 | #workspaces button.active { 48 | background-color: #${secondary_accent}; 49 | color: #${background}; 50 | border-radius: 16px; 51 | min-width: 50px; 52 | background-size: 400% 400%; 53 | transition: all 0.3s ease-in-out; 54 | } 55 | 56 | #workspaces button:hover { 57 | background-color: #${tertiary_accent}; 58 | color: #${background}; 59 | border-radius: 16px; 60 | min-width: 50px; 61 | background-size: 400% 400%; 62 | } 63 | 64 | #custom-notification, #tray, #pulseaudio, #network, #battery, #backlight, 65 | #custom-playerctl.backward, #custom-playerctl.play, #custom-playerctl.foward{ 66 | background: #${background}; 67 | font-weight: bold; 68 | margin: 5px 0px; 69 | } 70 | #custom-notification, #tray, #pulseaudio, #network, #backlight, #battery{ 71 | color: #${primary_accent}; 72 | border-radius: 10px 24px 10px 24px; 73 | padding: 0 20px; 74 | margin-left: 7px; 75 | } 76 | #clock { 77 | color: #${tertiary_accent}; 78 | background-color: #${background}; 79 | border-radius: 0px 0px 0px 40px; 80 | padding: 10px 10px 15px 25px; 81 | margin-left: 7px; 82 | font-weight: bold; 83 | font-size: 16px; 84 | } 85 | #custom-launcher { 86 | color: #${secondary_accent}; 87 | background-color: #${background}; 88 | border-radius: 0px 0px 40px 0px; 89 | margin: 0px; 90 | padding: 0px 35px 0px 15px; 91 | font-size: 28px; 92 | } 93 | 94 | #custom-playerctl.backward, #custom-playerctl.play, #custom-playerctl.foward { 95 | background: #${background}; 96 | font-size: 22px; 97 | } 98 | #custom-playerctl.backward:hover, #custom-playerctl.play:hover, #custom-playerctl.foward:hover{ 99 | color: #${tertiary_accent}; 100 | } 101 | #custom-playerctl.backward { 102 | color: #${primary_accent}; 103 | border-radius: 24px 0px 0px 10px; 104 | padding-left: 16px; 105 | margin-left: 7px; 106 | } 107 | #custom-playerctl.play { 108 | color: #${secondary_accent}; 109 | padding: 0 5px; 110 | } 111 | #custom-playerctl.foward { 112 | color: #${primary_accent}; 113 | border-radius: 0px 10px 24px 0px; 114 | padding-right: 12px; 115 | margin-right: 7px 116 | } 117 | #custom-playerlabel { 118 | background: #${background}; 119 | color: #${tertiary_accent}; 120 | padding: 0 20px; 121 | border-radius: 24px 10px 24px 10px; 122 | margin: 5px 0; 123 | font-weight: bold; 124 | } 125 | #window{ 126 | background: #${background}; 127 | padding-left: 15px; 128 | padding-right: 15px; 129 | border-radius: 16px; 130 | margin-top: 5px; 131 | margin-bottom: 5px; 132 | font-weight: normal; 133 | font-style: normal; 134 | } 135 | '' 136 | -------------------------------------------------------------------------------- /home/desktop/addons/waybar/nixbar/config.nix: -------------------------------------------------------------------------------- 1 | _: 2 | let 3 | font = "RobotoMono Nerd Font"; 4 | fontsize = "12"; 5 | primary_accent = "cba6f7"; 6 | secondary_accent = "89b4fa"; 7 | tertiary_accent = "f5f5f5"; 8 | background = "11111B"; 9 | opacity = ".85"; 10 | cursor = "Numix-Cursor"; 11 | in 12 | { 13 | mainBar = { 14 | position = "bottom"; 15 | layer = "top"; 16 | height = 35; 17 | margin-top = 0; 18 | margin-bottom = 0; 19 | margin-left = 0; 20 | margin-right = 0; 21 | modules-left = [ 22 | "custom/launcher" 23 | "custom/playerlabel" 24 | "custom/playerctl#backward" 25 | "custom/playerctl#play" 26 | "custom/playerctl#foward" 27 | ]; 28 | modules-center = [ 29 | "cava#left" 30 | "hyprland/workspaces" 31 | "cava#right" 32 | ]; 33 | modules-right = [ 34 | "custom/notification" 35 | "tray" 36 | "battery" 37 | "pulseaudio" 38 | "network" 39 | "clock" 40 | ]; 41 | clock = { 42 | format = "󰥔 {:%a, %d %b, %I:%M %p}"; 43 | tooltip = "true"; 44 | tooltip-format = "{:%Y %B}\n{calendar}"; 45 | format-alt = " {:%d/%m}"; 46 | }; 47 | "hyprland/workspaces" = { 48 | active-only = false; 49 | all-outputs = false; 50 | disable-scroll = false; 51 | on-scroll-up = "hyprctl dispatch workspace e-1"; 52 | on-scroll-down = "hyprctl dispatch workspace e+1"; 53 | format = "{name}"; 54 | on-click = "activate"; 55 | format-icons = { 56 | urgent = ""; 57 | active = ""; 58 | default = ""; 59 | sort-by-number = true; 60 | }; 61 | }; 62 | "cava#left" = { 63 | framerate = 60; 64 | autosens = 0; 65 | sensitivity = 5; 66 | bars = 16; 67 | lower_cutoff_freq = 50; 68 | higher_cutoff_freq = 10000; 69 | method = "pipewire"; 70 | source = "auto"; 71 | stereo = true; 72 | reverse = false; 73 | bar_delimiter = 0; 74 | monstercat = false; 75 | waves = false; 76 | input_delay = 2; 77 | format-icons = [ 78 | "" 79 | "" 80 | "" 81 | "" 82 | "" 83 | "" 84 | "" 85 | "" 86 | ]; 87 | }; 88 | "cava#right" = { 89 | framerate = 60; 90 | autosens = 0; 91 | sensitivity = 5; 92 | bars = 16; 93 | lower_cutoff_freq = 50; 94 | higher_cutoff_freq = 10000; 95 | method = "pipewire"; 96 | source = "auto"; 97 | stereo = true; 98 | reverse = false; 99 | bar_delimiter = 0; 100 | monstercat = false; 101 | waves = false; 102 | input_delay = 2; 103 | format-icons = [ 104 | "" 105 | "" 106 | "" 107 | "" 108 | "" 109 | "" 110 | "" 111 | "" 112 | ]; 113 | }; 114 | "custom/playerctl#backward" = { 115 | format = "󰙣 "; 116 | on-click = "playerctl previous"; 117 | on-scroll-up = "playerctl volume .05+"; 118 | on-scroll-down = "playerctl volume .05-"; 119 | }; 120 | "custom/playerctl#play" = { 121 | format = "{icon}"; 122 | return-type = "json"; 123 | exec = "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F"; 124 | on-click = "playerctl play-pause"; 125 | on-scroll-up = "playerctl volume .05+"; 126 | on-scroll-down = "playerctl volume .05-"; 127 | format-icons = { 128 | Playing = "󰏥 "; 129 | Paused = ""; 130 | Stopped = ""; 131 | }; 132 | }; 133 | "custom/playerctl#foward" = { 134 | format = "󰙡 "; 135 | on-click = "playerctl next"; 136 | on-scroll-up = "playerctl volume .05+"; 137 | on-scroll-down = "playerctl volume .05-"; 138 | }; 139 | "custom/playerlabel" = { 140 | format = "󰎈 {} 󰎈"; 141 | return-type = "json"; 142 | max-length = 40; 143 | exec = "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F"; 144 | on-click = ""; 145 | }; 146 | battery = { 147 | states = { 148 | good = 95; 149 | warning = 30; 150 | critical = 15; 151 | }; 152 | format = "{icon} {capacity}%"; 153 | format-charging = " {capacity}%"; 154 | format-plugged = " {capacity}% "; 155 | format-alt = "{icon} {time}"; 156 | format-icons = [ 157 | "" 158 | "" 159 | "" 160 | "" 161 | "" 162 | ]; 163 | }; 164 | 165 | memory = { 166 | format = "󰍛 {}%"; 167 | format-alt = "󰍛 {used}/{total} GiB"; 168 | interval = 5; 169 | }; 170 | cpu = { 171 | format = "󰻠 {usage}%"; 172 | format-alt = "󰻠 {avg_frequency} GHz"; 173 | interval = 5; 174 | }; 175 | network = { 176 | format-wifi = " {signalStrength}%"; 177 | format-ethernet = "󰈀 100% "; 178 | tooltip-format = "Connected to {essid} {ifname} via {gwaddr}"; 179 | format-linked = "{ifname} (No IP)"; 180 | format-disconnected = "󰖪 0% "; 181 | }; 182 | tray = { 183 | icon-size = 20; 184 | spacing = 8; 185 | }; 186 | pulseaudio = { 187 | format = "{icon} {volume}%"; 188 | format-muted = "󰝟"; 189 | format-icons = { 190 | default = [ 191 | "󰕿" 192 | "󰖀" 193 | "󰕾" 194 | ]; 195 | }; 196 | # on-scroll-up= "bash ~/.scripts/volume up"; 197 | # on-scroll-down= "bash ~/.scripts/volume down"; 198 | scroll-step = 5; 199 | on-click = "pavucontrol"; 200 | }; 201 | "custom/randwall" = { 202 | format = "󰏘"; 203 | # on-click= "bash $HOME/.config/hypr/randwall.sh"; 204 | # on-click-right= "bash $HOME/.config/hypr/wall.sh"; 205 | }; 206 | "custom/launcher" = { 207 | format = ""; 208 | # on-click= "bash $HOME/.config/rofi/launcher.sh"; 209 | # on-click-right= "bash $HOME/.config/rofi/run.sh"; 210 | tooltip = "false"; 211 | }; 212 | "custom/notification" = { 213 | exec = "~/.config/waybar/scripts/notification.sh"; 214 | on-click = "dunstctl set-paused toggle"; 215 | on-click-right = "wallpaper"; 216 | return-type = "json"; 217 | max-length = 50; 218 | format = "{}"; 219 | }; 220 | }; 221 | } 222 | -------------------------------------------------------------------------------- /home/desktop/addons/waybar/nixbar/style.nix: -------------------------------------------------------------------------------- 1 | _: let 2 | font = "RobotoMono Nerd Font"; 3 | fontsize = "12"; 4 | primary_accent = "cba6f7"; 5 | secondary_accent = "89b4fa"; 6 | tertiary_accent = "f5f5f5"; 7 | background = "11111B"; 8 | opacity = ".85"; 9 | cursor = "Numix-Cursor"; 10 | in '' 11 | * { 12 | border: none; 13 | border-radius: 0px; 14 | font-family: ${font}; 15 | font-size: 14px; 16 | min-height: 0; 17 | } 18 | 19 | window#waybar { 20 | /* background: rgba(16, 18, 19, 0.8); */ 21 | background-color: rgba(0, 0, 0, 0.096); 22 | } 23 | 24 | #cava.left, #cava.right { 25 | background: #${background}; 26 | margin: 5px; 27 | padding: 8px 16px; 28 | color: #${primary_accent}; 29 | } 30 | #cava.left { 31 | border-radius: 24px 10px 24px 10px; 32 | } 33 | #cava.right { 34 | border-radius: 10px 24px 10px 24px; 35 | } 36 | #workspaces { 37 | background: #${background}; 38 | margin: 5px 5px; 39 | padding: 8px 5px; 40 | border-radius: 16px; 41 | color: #${primary_accent} 42 | } 43 | #workspaces button { 44 | padding: 0px 5px; 45 | margin: 0px 3px; 46 | border-radius: 16px; 47 | color: transparent; 48 | background-color: #2f354a; 49 | transition: all 0.3s ease-in-out; 50 | } 51 | 52 | #workspaces button.active { 53 | background-color: #${secondary_accent}; 54 | color: #${background}; 55 | border-radius: 16px; 56 | min-width: 50px; 57 | background-size: 400% 400%; 58 | transition: all 0.3s ease-in-out; 59 | } 60 | 61 | #workspaces button:hover { 62 | background-color: #${tertiary_accent}; 63 | color: #${background}; 64 | border-radius: 16px; 65 | min-width: 50px; 66 | background-size: 400% 400%; 67 | } 68 | 69 | #custom-notification, #tray, #pulseaudio, #network, #battery, 70 | #custom-playerctl.backward, #custom-playerctl.play, #custom-playerctl.foward{ 71 | background: #${background}; 72 | font-weight: bold; 73 | margin: 5px 0px; 74 | } 75 | #custom-notification, #tray, #pulseaudio, #network, #battery{ 76 | color: #${primary_accent}; 77 | border-radius: 10px 24px 10px 24px; 78 | padding: 0 20px; 79 | margin-left: 7px; 80 | } 81 | #clock { 82 | color: #${tertiary_accent}; 83 | background-color: #${background}; 84 | border-radius: 0px 0px 0px 40px; 85 | padding: 10px 10px 15px 25px; 86 | margin-left: 7px; 87 | font-weight: bold; 88 | font-size: 16px; 89 | } 90 | #custom-launcher { 91 | color: #${secondary_accent}; 92 | background-color: #${background}; 93 | border-radius: 0px 0px 40px 0px; 94 | margin: 0px; 95 | padding: 0px 35px 0px 15px; 96 | font-size: 28px; 97 | } 98 | 99 | #custom-playerctl.backward, #custom-playerctl.play, #custom-playerctl.foward { 100 | background: #${background}; 101 | font-size: 22px; 102 | } 103 | #custom-playerctl.backward:hover, #custom-playerctl.play:hover, #custom-playerctl.foward:hover{ 104 | color: #${tertiary_accent}; 105 | } 106 | #custom-playerctl.backward { 107 | color: #${primary_accent}; 108 | border-radius: 24px 0px 0px 10px; 109 | padding-left: 16px; 110 | margin-left: 7px; 111 | } 112 | #custom-playerctl.play { 113 | color: #${secondary_accent}; 114 | padding: 0 5px; 115 | } 116 | #custom-playerctl.foward { 117 | color: #${primary_accent}; 118 | border-radius: 0px 10px 24px 0px; 119 | padding-right: 12px; 120 | margin-right: 7px 121 | } 122 | #custom-playerlabel { 123 | background: #${background}; 124 | color: #${tertiary_accent}; 125 | padding: 0 20px; 126 | border-radius: 24px 10px 24px 10px; 127 | margin: 5px 0; 128 | font-weight: bold; 129 | } 130 | #window{ 131 | background: #${background}; 132 | padding-left: 15px; 133 | padding-right: 15px; 134 | border-radius: 16px; 135 | margin-top: 5px; 136 | margin-bottom: 5px; 137 | font-weight: normal; 138 | font-style: normal; 139 | } 140 | '' 141 | -------------------------------------------------------------------------------- /home/desktop/addons/waybar/og/config.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | mainBar = { 3 | layer = "top"; # Original 4 | # position = "bottom"; # Original 5 | height = 32; 6 | # width = "1280"; 7 | spacing = 8; 8 | margin-top = 6; 9 | margin-bottom = 2; 10 | margin-right = 8; 11 | margin-left = 8; 12 | fixed-center = false; 13 | modules-left = [ 14 | "hyprland/workspaces" 15 | "custom/spotify" 16 | ]; 17 | modules-center = [ 18 | "hyprland/window" 19 | ]; 20 | modules-right = [ 21 | # "custom/colorpicker" 22 | "custom/notification" 23 | "custom/cava" 24 | "memory" 25 | # "disk" 26 | "pulseaudio" 27 | "network" 28 | "clock" 29 | "tray" 30 | "custom/power-menu" 31 | ]; 32 | 33 | "wlr/workspaces" = { 34 | active-only = false; 35 | on-click = "activate"; 36 | on-scroll-up = "hyprctl dispatch workspace m+1"; 37 | on-scroll-down = "hyprctl dispatch workspace m-1"; 38 | format = "{name}"; 39 | format-icons = { 40 | "1" = "一"; 41 | "2" = "二"; 42 | "3" = "三"; 43 | "4" = "四"; 44 | "5" = "五"; 45 | "6" = "六"; 46 | "7" = "七"; 47 | "8" = "八"; 48 | "9" = "九"; 49 | "10" = "十"; 50 | # "urgent" = ""; 51 | # "active" = ""; 52 | # "default" = ""; 53 | }; 54 | }; 55 | 56 | "hyprland/window" = { 57 | format = "{}"; 58 | }; 59 | "tray" = { 60 | icon-size = 21; 61 | spacing = 5; 62 | }; 63 | "clock" = { 64 | tooltip-format = "{:%Y %B}\n{calendar}"; 65 | format-alt = " {:%a %b %d}"; 66 | format = " {:%I:%M %p}"; 67 | today-format = "{}"; 68 | format-calendar = "{}"; 69 | format-calendar-weeks = "W{:%U}"; 70 | format-calendar-weekdays = "{}"; 71 | on-scroll = { 72 | calendar = 1; 73 | }; 74 | }; 75 | memory = { 76 | interval = 30; 77 | format = " {used:0.1f}G / {total:0.1f}G"; 78 | on-click = "foot -e btop"; 79 | tooltip = false; 80 | }; 81 | disk = { 82 | format = "󰋊 {percentage_used}%"; 83 | format-alt = "󰋊 {used}/{total} GiB"; 84 | interval = 5; 85 | path = "/"; 86 | }; 87 | network = { 88 | # interface = "wlp2*"; # Optional 89 | format-wifi = "󰖩 {signalStrength}%"; 90 | format-ethernet = "󰈀 {cidr}"; 91 | tooltip-format = "{ifname} via {gwaddr}"; 92 | format-linked = "{ifname} (No IP)"; 93 | format-disconnect = "󰖪"; 94 | on-click = "foot -e nmtui"; 95 | }; 96 | pulseaudio = { 97 | # scroll-step = 1; # %, can be a float 98 | format = "{icon} {volume}%"; 99 | format-bluetooth = "{volume}%  {format_source}"; 100 | format-bluetooth-muted = "󰖁 "; 101 | format-muted = "󰖁"; 102 | # format-source = "{volume}% "; 103 | # format-source-muted = ""; 104 | format-icons = { 105 | headphone = ""; 106 | hands-free = "󰂑"; 107 | headset = "󰂑"; 108 | phone = ""; 109 | portable = ""; 110 | car = ""; 111 | default = ["" "" ""]; 112 | }; 113 | on-click = "pavucontrol"; 114 | }; 115 | "custom/spotify" = { 116 | # exec = "python ~/.config/waybar/scripts/mediaplayer.py --player spotify"; 117 | format = " {}"; 118 | return-type = "json"; 119 | on-click = "playerctl --player=spotify play-pause"; 120 | on-scroll-down = "playerctl --player=spotify next"; 121 | on-scroll-up = "playerctl --player=spotify previous"; 122 | tooltip = false; 123 | }; 124 | "custom/power-menu" = { 125 | format = "⏻"; 126 | on-click = "~/.config/waybar/scripts/power-menu/powermenu.sh"; 127 | }; 128 | "custom/notification" = { 129 | # exec = "~/.config/waybar/scripts/notification.sh"; 130 | exec = "~/flake/home/desktop/services/wayland/waybar/scripts/notification.sh"; 131 | on-click = "dunstctl set-paused toggle"; 132 | on-click-right = "notify-send -t 1 'swww' '1' & ~/flake/home/desktop/graphical/wms/hyprland/scripts/wall"; 133 | return-type = "json"; 134 | max-length = 50; 135 | format = "{}"; 136 | }; 137 | # "custom/colorpicker" = { 138 | # format = ""; 139 | # on-click = "hyprpicker -a -f hex"; 140 | # on-click-right = "hyprpicker -a -f rgb"; 141 | # }; 142 | }; 143 | } 144 | -------------------------------------------------------------------------------- /home/desktop/addons/waybar/og/style.nix: -------------------------------------------------------------------------------- 1 | { colorscheme }: 2 | with colorscheme.colors; 3 | let 4 | OSLogo = builtins.fetchurl rec { 5 | name = "OSLogo-${sha256}.png"; 6 | sha256 = "14mbpw8jv1w2c5wvfvj8clmjw0fi956bq5xf9s2q3my14far0as8"; 7 | url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nix-snowflake.svg"; 8 | }; 9 | in 10 | '' 11 | * { 12 | /* `otf-font-awesome` is required to be installed for icons */ 13 | font-family: JetBrainsMono Nerd Font; 14 | font-size: 11px; 15 | border-radius: 17px; 16 | } 17 | 18 | #clock, 19 | #custom-notification, 20 | #custom-launcher, 21 | #custom-power-menu, 22 | /*#custom-colorpicker,*/ 23 | #custom-window, 24 | #memory, 25 | #disk, 26 | #network, 27 | #custom-spotify, 28 | #pulseaudio, 29 | #window, 30 | #tray { 31 | padding: 5px 15px; 32 | border-radius: 12px; 33 | /* background: rgba(30, 30, 46, 0.6); */ 34 | background: rgba(22, 22, 22, 0.6); 35 | color: rgb(180, 190, 254); 36 | box-shadow: rgba(17, 17, 27, 0.2) 0px 0px 3px 2px; 37 | margin-top: 4px; 38 | margin-bottom: 4px; 39 | margin-right: 4px; 40 | margin-left: 4px; 41 | transition: all 0.3s ease; 42 | } 43 | 44 | #window { 45 | background-color: transparent; 46 | box-shadow: none; 47 | } 48 | 49 | window#waybar { 50 | background-color: rgba(0, 0, 0, 0.096); 51 | /* background-color: rgb(255, 255, 255); */ 52 | border-radius: 17px; 53 | } 54 | 55 | window * { 56 | background-color: transparent; 57 | border-radius: 17px; 58 | } 59 | 60 | #workspaces button label { 61 | color: rgb(180, 190, 254); 62 | } 63 | 64 | #workspaces button.active label { 65 | /*color: rgba(30, 30, 46, 0.6);*/ 66 | color: rgba(16, 16, 16, 0.6); 67 | font-weight: bolder; 68 | } 69 | 70 | #workspaces button:hover { 71 | box-shadow: rgb(180, 190, 254) 0px 0px 0px 1.5px; 72 | min-width: 50px; 73 | } 74 | 75 | #workspaces { 76 | background-color: transparent; 77 | border-radius: 17px; 78 | padding: 5px 0px; 79 | margin-top: 3px; 80 | margin-bottom: 3px; 81 | } 82 | 83 | #workspaces button { 84 | box-shadow: rgba(17, 17, 27, 0.2) 0px 0px 3px 2px; 85 | /*background-color: rgba(30, 30, 46, 0.6);*/ 86 | background-color: rgba(16, 16, 16, 0.6); 87 | border-radius: 12px; 88 | margin-left: 10px; 89 | transition: all 0.3s ease; 90 | } 91 | 92 | #workspaces button.active { 93 | min-width: 50px; 94 | box-shadow: rgba(0, 0, 0, 0.288) 2px 2px 5px 2px; 95 | background-color: rgb(245, 194, 231); 96 | background-size: 400% 400%; 97 | transition: all 0.3s ease; 98 | background: linear-gradient( 99 | 58deg, 100 | #ff7eb6, 101 | #ff7eb6, 102 | #ff7eb6, 103 | #ee5396, 104 | #ee5396, 105 | #ee5396, 106 | #ff7eb6 107 | ); 108 | /*#936FDC, 109 | #e95678, 110 | #ec6a88, 111 | #efb993, 112 | #efb993, 113 | #3FDAA4, 114 | #78a9ff 115 | */ 116 | background-size: 300% 300%; 117 | animation: colored-gradient 20s ease infinite; 118 | } 119 | 120 | @keyframes colored-gradient { 121 | 0% { 122 | background-position: 71% 0%; 123 | } 124 | 50% { 125 | background-position: 30% 100%; 126 | } 127 | 100% { 128 | background-position: 71% 0%; 129 | } 130 | } 131 | 132 | #custom-power-menu { 133 | margin-right: 10px; 134 | padding-left: 12px; 135 | padding-right: 15px; 136 | padding-top: 3px; 137 | } 138 | 139 | #custom-spotify { 140 | margin-left: 5px; 141 | padding-left: 15px; 142 | padding-right: 15px; 143 | padding-top: 3px; 144 | color: rgba(180, 190, 254, 0.329); 145 | background-color: rgba(16, 16, 16, 0.6); 146 | /*background-color: rgba(30, 30, 46, 0.6);*/ 147 | box-shadow: rgba(17, 17, 27, 0.2) 0px 0px 3px 2px; 148 | transition: all 0.3s ease; 149 | } 150 | 151 | #custom-spotify.playing { 152 | color: rgb(180, 190, 254); 153 | background: rgba(30, 30, 46, 0.6); 154 | background: linear-gradient( 155 | 90deg, 156 | rgb(49, 50, 68), 157 | rgba(30, 30, 46, 0.6), 158 | rgba(30, 30, 46, 0.6), 159 | rgba(30, 30, 46, 0.6), 160 | rgba(30, 30, 46, 0.6), 161 | rgb(49, 50, 68) 162 | ); 163 | background-size: 400% 100%; 164 | animation: grey-gradient 3s linear infinite; 165 | transition: all 0.3s ease; 166 | } 167 | 168 | @keyframes grey-gradient { 169 | 0% { 170 | background-position: 100% 50%; 171 | } 172 | 100% { 173 | background-position: -33% 50%; 174 | } 175 | } 176 | 177 | #tray menu { 178 | background-color: rgba(30, 30, 46, 0.6); 179 | opacity: 0.8; 180 | } 181 | 182 | #pulseaudio.muted { 183 | color: rgb(243, 139, 168); 184 | padding-right: 16px; 185 | } 186 | 187 | #custom-notification.collapsed, 188 | #custom-notification.waiting_done { 189 | min-width: 12px; 190 | padding-right: 17px; 191 | } 192 | 193 | #custom-notification.waiting_start, 194 | #custom-notification.expanded { 195 | background-color: transparent; 196 | background: linear-gradient( 197 | 90deg, 198 | rgb(49, 50, 68), 199 | rgba(30, 30, 46, 0.6), 200 | rgba(30, 30, 46, 0.6), 201 | rgba(30, 30, 46, 0.6), 202 | rgba(30, 30, 46, 0.6), 203 | rgb(49, 50, 68) 204 | ); 205 | background-size: 400% 100%; 206 | animation: grey-gradient 3s linear infinite; 207 | min-width: 500px; 208 | border-radius: 17px; 209 | } 210 | 211 | #custom-notification.collapsed_muted { 212 | min-width: 12px; 213 | color: rgb(243, 139, 168); 214 | padding-right: 17px; 215 | } 216 | 217 | #custom-notification.waiting_done, 218 | #custom-notification.waiting_start { 219 | color: rgba(255, 255, 255, 0); 220 | } 221 | 222 | #custom-notification.wallpaper { 223 | min-width: 12px; 224 | padding-right: 17px; 225 | color: transparent; 226 | background: linear-gradient( 227 | 58deg, 228 | #ff7eb6, 229 | #ff7eb6, 230 | #ff7eb6, 231 | #ee5396, 232 | #ee5396, 233 | #ee5396, 234 | #ff7eb6 235 | ); 236 | /* 237 | #cba6f7, 238 | #f38ba8, 239 | #eba0ac, 240 | #fab387, 241 | #f9e2af, 242 | #a6e3a1, 243 | #94e2d5 244 | */ 245 | background-size: 300% 300%; 246 | animation: colored-gradient 3s ease infinite; 247 | } 248 | 249 | /* #custom-colorpicker { 250 | border-radius: 17px; 251 | } */ 252 | 253 | /* 254 | catppuccin 255 | #workspaces button.active { 256 | min-width: 50px; 257 | box-shadow: rgba(0, 0, 0, 0.288) 2px px2 5px 2px; 258 | background-color: rgb(245, 194, 231); 259 | background-size: 400% 400%; 260 | transition: all 0.3s ease; 261 | background: linear-gradient( 262 | 58deg, 263 | #cba6f7, 264 | #cba6f7, 265 | #cba6f7, 266 | #89B4FA, 267 | #89B4FA, 268 | #CBA6F7, 269 | #F38BA8 270 | ); 271 | background-size: 300% 300%; 272 | animation: colored-gradient 20s ease infinite; 273 | } 274 | 275 | oxocarbon 276 | #workspaces button.active { 277 | min-width: 50px; 278 | box-shadow: rgba(0, 0, 0, 0.288) 2px 2px 5px 2px; 279 | background-color: rgb(245, 194, 231); 280 | background-size: 400% 400%; 281 | transition: all 0.3s ease; 282 | background: linear-gradient( 283 | 58deg, 284 | #ff7eb6, 285 | #ff7eb6, 286 | #ff7eb6, 287 | #ee5396, 288 | #ee5396, 289 | #ee5396, 290 | #ff7eb6 291 | ); 292 | background-size: 300% 300%; 293 | animation: colored-gradient 20s ease infinite; 294 | } 295 | 296 | jabuti 297 | #workspaces button.active { 298 | min-width: 50px; 299 | box-shadow: rgba(0, 0, 0, 0.288) 2px 2px 5px 2px; 300 | background-color: rgb(245, 194, 231); 301 | background-size: 400% 400%; 302 | transition: all 0.3s ease; 303 | background: linear-gradient( 304 | 58deg, 305 | #29d398, 306 | #29d398, 307 | #29d398, 308 | #ec6a88, 309 | #ec6a88, 310 | #ec6a88, 311 | #F38BA8 312 | ); 313 | background-size: 300% 300%; 314 | animation: colored-gradient 20s ease infinite; 315 | } 316 | */ 317 | 318 | '' 319 | -------------------------------------------------------------------------------- /home/desktop/addons/wezterm/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | ... 5 | }: 6 | { 7 | options = { 8 | wezterm.enable = lib.mkEnableOption "Enable Wezterm module"; 9 | }; 10 | config = lib.mkIf config.wezterm.enable { 11 | programs.wezterm = { 12 | enable = true; 13 | extraConfig = '' 14 | return { 15 | cursor_blink_rate = 0, 16 | font = wezterm.font("TX-02", { weight = "Regular", italic = false}), 17 | font_size = 16.0, 18 | hide_tab_bar_if_only_one_tab = true, 19 | max_fps = 120, 20 | webgpu_power_preference = "HighPerformance", 21 | window_background_opacity = 0.8, 22 | warn_about_missing_glyphs = false, 23 | } 24 | ''; 25 | }; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /home/desktop/addons/wofi/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | wofi.enable = lib.mkEnableOption "Enable wofi module"; 10 | }; 11 | config = lib.mkIf config.wofi.enable { 12 | home = { 13 | packages = with pkgs; [ 14 | wofi 15 | ]; 16 | }; 17 | 18 | xdg.configFile = { 19 | "wofi/config" = { 20 | text = '' 21 | width=600 22 | height=400 23 | show=drun 24 | prompt=Search... 25 | filter_rate=100 26 | allow_markup=true 27 | no_actions=true 28 | halign=fill 29 | orientation=vertical 30 | content_halign=fill 31 | insensitive=true 32 | allow_images=true 33 | image_size=40 34 | gtk_dark=true 35 | ''; 36 | }; 37 | "wofi/style.css" = { 38 | text = '' 39 | /* @import ".config/wofi/style.css"; */ 40 | /* @import ".config/wofi/themes/iceberg.css"; */ 41 | 42 | window { 43 | margin: 0px; 44 | border: 5px solid #181926; 45 | border-radius: 15px; 46 | background-color: rgba(24, 25, 38, 1); 47 | font-family: "JetBrainsMono Nerd Font", "Font Awesome 6 Free Solid"; 48 | font-size: 12px; 49 | } 50 | 51 | @keyframes gradient_f { 52 | 0% { 53 | background-position: 0% 200%; 54 | } 55 | 50% { 56 | background-position: 200% 0%; 57 | } 58 | 100% { 59 | background-position: 400% 200%; 60 | } 61 | } 62 | 63 | #input { 64 | all: unset; 65 | min-height: 36px; 66 | padding: 4px 10px; 67 | margin: 4px; 68 | border: none; 69 | color: #cad3f5; 70 | font-weight: bold; 71 | background-color: #1e2030; 72 | outline: none; 73 | border-radius: 15px; 74 | margin: 10px; 75 | margin-bottom: 2px; 76 | } 77 | 78 | #inner-box { 79 | margin: 4px; 80 | padding: 10px; 81 | font-weight: bold; 82 | border-radius: 15px; 83 | } 84 | 85 | #outer-box { 86 | margin: 0px; 87 | padding: 3px; 88 | border: none; 89 | border: 5px solid #1e2030; 90 | border-radius: 15px; 91 | } 92 | 93 | #scroll { 94 | margin-top: 5px; 95 | border: none; 96 | border-radius: 15px; 97 | margin-bottom: 5px; 98 | } 99 | 100 | #text:selected { 101 | color: #1e2030; 102 | margin: 0px 0px; 103 | border: none; 104 | border-radius: 15px; 105 | } 106 | 107 | #entry { 108 | margin: 0px 0px; 109 | border: none; 110 | border-radius: 15px; 111 | background-color: transparent; 112 | } 113 | 114 | #entry:selected { 115 | margin: 0px 0px; 116 | border: none; 117 | border-radius: 15px; 118 | /* background: linear-gradient(90deg, #7dc4e4 0%, #f5bde6 100%); */ 119 | background: radial-gradient( 120 | circle, 121 | rgba(138, 173, 244, 1) 0%, 122 | rgba(138, 173, 244, 1) 12%, 123 | rgba(145, 215, 227, 1) 19%, 124 | rgba(189, 169, 247, 1) 20%, 125 | rgba(182, 171, 247, 1) 24%, 126 | rgba(138, 173, 244, 1) 36%, 127 | rgba(177, 172, 247, 1) 37%, 128 | rgba(170, 173, 248, 1) 48%, 129 | rgba(125, 196, 228, 1) 52%, 130 | rgba(166, 174, 248, 1) 52%, 131 | rgba(160, 175, 248, 1) 59%, 132 | rgba(139, 213, 202, 1) 66%, 133 | rgba(155, 176, 248, 1) 67%, 134 | rgba(152, 177, 248, 1) 68%, 135 | rgba(73, 77, 100, 1) 77%, 136 | rgba(148, 178, 249, 1) 78%, 137 | rgba(144, 179, 250, 1) 82%, 138 | rgba(180, 190, 254, 1) 83%, 139 | rgba(141, 179, 250, 1) 90%, 140 | rgba(137, 180, 250, 1) 100% 141 | ); 142 | background-size: 400% 400%; 143 | animation: gradient_f linear infinite; 144 | animation-delay: 0s; 145 | animation-fill-mode: forwards; 146 | animation-duration: 10s; 147 | } 148 | ''; 149 | }; 150 | "wofi/menu" = { 151 | text = '' 152 | # Config for wofi-wifi-menu 153 | 154 | # position values: 155 | # 1 2 3 156 | # 8 0 4 157 | # 7 6 5 158 | POSITION=3 159 | 160 | #y-offset 161 | YOFF=15 162 | 163 | #x-offset 164 | XOFF=-30 165 | 166 | #fields to be displayed 167 | FIELDS=SSID,IN-USE,BARS,SECURITY 168 | ''; 169 | }; 170 | "wofi/executable_wifi" = { 171 | text = '' 172 | # Config for wofi-wifi-menu 173 | 174 | # position values: 175 | # 1 2 3 176 | # 8 0 4 177 | # 7 6 5 178 | POSITION=3 179 | 180 | #y-offset 181 | YOFF=65 182 | 183 | #x-offset 184 | XOFF=-40 185 | 186 | #fields to be displayed 187 | FIELDS=SSID,SECURITY,BARS 188 | ''; 189 | }; 190 | "wofi/themes/catppuccin-macchiato.css" = { 191 | text = '' 192 | window { 193 | margin: 0px; 194 | border: 5px solid #181926; 195 | background-color: rgba(24, 25, 38, 1.0); 196 | font-family: "JetBrainsMono Nerd Font", "Font Awesome 6 Free Solid"; 197 | font-size: 13px; 198 | } 199 | 200 | @keyframes gradient_f { 201 | 0% { 202 | background-position: 0% 200%; 203 | } 204 | 50% { 205 | background-position: 200% 0%; 206 | } 207 | 100% { 208 | background-position: 400% 200%; 209 | } 210 | } 211 | 212 | #input { 213 | all: unset; 214 | min-height: 36px; 215 | padding: 4px 10px; 216 | margin: 4px; 217 | border: none; 218 | color: #cad3f5; 219 | font-weight: bold; 220 | background-color: #1e2030; 221 | outline: none; 222 | border-radius: 15px; 223 | margin: 10px; 224 | margin-bottom: 2px; 225 | } 226 | 227 | #inner-box { 228 | margin: 4px; 229 | padding: 10px; 230 | font-weight: bold; 231 | border-radius: 15px; 232 | } 233 | 234 | #outer-box { 235 | margin: 0px; 236 | padding: 3px; 237 | border: none; 238 | border: 5px solid #1e2030; 239 | } 240 | 241 | #scroll { 242 | margin-top: 5px; 243 | border: none; 244 | border-radius: 15px; 245 | margin-bottom: 5px; 246 | } 247 | 248 | #text:selected { 249 | color: #1e2030; 250 | margin: 0px 0px; 251 | border: none; 252 | border-radius: 15px; 253 | } 254 | 255 | #entry { 256 | margin: 0px 0px; 257 | border: none; 258 | border-radius: 15px; 259 | background-color: transparent; 260 | } 261 | 262 | #entry:selected { 263 | margin: 0px 0px; 264 | border: none; 265 | border-radius: 15px; 266 | /* background: linear-gradient(90deg, #7dc4e4 0%, #f5bde6 100%); */ 267 | background: radial-gradient(circle, rgba(138, 173, 244,1) 0%, rgba(138, 173, 244,1) 12%, rgba(145, 215, 227,1) 19%, rgba(189,169,247,1) 20%, rgba(182,171,247,1) 24%, rgba(138, 173, 244,1) 36%, rgba(177,172,247,1) 37%, rgba(170,173,248,1) 48%, rgba(125, 196, 228,1) 52%, rgba(166,174,248,1) 52%, rgba(160,175,248,1) 59%, rgba(139, 213, 202,1) 66%, rgba(155,176,248,1) 67%, rgba(152,177,248,1) 68%, rgba(73, 77, 100,1) 77%, rgba(148,178,249,1) 78%, rgba(144,179,250,1) 82%, rgba(180,190,254,1) 83%, rgba(141,179,250,1) 90%, rgba(137,180,250,1) 100%); 268 | background-size: 400% 400%; 269 | animation: gradient_f linear infinite; 270 | animation-delay: 0s; 271 | animation-fill-mode: forwards; 272 | animation-duration: 10.0s; 273 | } 274 | ''; 275 | }; 276 | 277 | "wofi/themes/gruvbox.css" = { 278 | text = '' 279 | window { 280 | margin: 0px; 281 | border: 5px solid #ebdbb2; 282 | background-color: #282828; 283 | font-family: "JetBrainsMono Nerd Font", "Font Awesome 6 Free Solid"; 284 | font-size: 13px; 285 | } 286 | 287 | @keyframes gradient_f { 288 | 0% { 289 | background-position: 0% 200%; 290 | } 291 | 50% { 292 | background-position: 200% 0%; 293 | } 294 | 100% { 295 | background-position: 400% 200%; 296 | } 297 | } 298 | 299 | #input { 300 | all: unset; 301 | min-height: 36px; 302 | padding: 4px 10px; 303 | margin: 4px; 304 | border: none; 305 | color: #fbf1c7; 306 | font-weight: bold; 307 | background-color: #3c3836; 308 | outline: none; 309 | border-radius: 15px; 310 | margin: 10px; 311 | margin-bottom: 2px; 312 | } 313 | 314 | #inner-box { 315 | margin: 4px; 316 | padding: 10px; 317 | font-weight: bold; 318 | border-radius: 15px; 319 | } 320 | 321 | #outer-box { 322 | margin: 0px; 323 | padding: 3px; 324 | border: none; 325 | border-radius: 15px; 326 | border: 5px solid #3c3836; 327 | } 328 | 329 | #scroll { 330 | margin-top: 5px; 331 | border: none; 332 | border-radius: 15px; 333 | margin-bottom: 5px; 334 | } 335 | 336 | #text:selected { 337 | color: #3c3836; 338 | margin: 0px 0px; 339 | border: none; 340 | border-radius: 15px; 341 | } 342 | 343 | #entry { 344 | margin: 0px 0px; 345 | border: none; 346 | border-radius: 15px; 347 | background-color: transparent; 348 | } 349 | 350 | #entry:selected { 351 | margin: 0px 0px; 352 | border: none; 353 | border-radius: 15px; 354 | background: linear-gradient(90deg, #8ec07c 0%, #689d6a 100%); 355 | /* background: radial-gradient(circle, #98971a 0%, #b9bb26 12%, #8ec07c 19%, #689d6a 20%, #83a598 24%, #458588 36%, #458588 37%, #98971a 48%, #b9bb26 52%, #8ec07c 52%, #689d6a 59%, #83a598 66%, #458588 67%, rgba(152,177,248,1) 68%, rgba(73, 77, 100,1) 77%, rgba(148,178,249,1) 78%, rgba(144,179,250,1) 82%, rgba(180,190,254,1) 83%, rgba(141,179,250,1) 90%, rgba(137,180,250,1) 100%); 356 | background-size: 400% 400%; 357 | animation: gradient_f linear infinite; 358 | animation-delay: 0s; 359 | animation-fill-mode: forwards; 360 | animation-duration: 10.0s; */ 361 | } 362 | ''; 363 | }; 364 | }; 365 | }; 366 | } 367 | -------------------------------------------------------------------------------- /home/desktop/default.nix: -------------------------------------------------------------------------------- 1 | { lib, config, ... }: 2 | { 3 | imports = [ 4 | ./addons 5 | ./theme 6 | ./hyprland 7 | ]; 8 | 9 | options = { 10 | desktop.enable = lib.mkEnableOption "Enable desktop module"; 11 | }; 12 | config = lib.mkIf config.desktop.enable { 13 | addons.enable = lib.mkDefault true; 14 | theme.enable = lib.mkDefault true; 15 | hyprland.enable = lib.mkDefault true; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /home/desktop/hyprland/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | inputs, 4 | lib, 5 | config, 6 | nixpkgs-stable, 7 | ... 8 | }: 9 | let 10 | hyprlandFlake = inputs.hyprland.packages.${pkgs.system}.hyprland; 11 | in 12 | { 13 | options = { 14 | hyprland.enable = lib.mkEnableOption "Enable hyprland module"; 15 | }; 16 | config = lib.mkIf config.hyprland.enable { 17 | home.packages = with pkgs; [ 18 | grim # Screenshot tool for hyprland 19 | slurp # Works with grim to screenshot on wayland 20 | swappy # Wayland native snapshot editing tool, inspired by Snappy on macOS 21 | wl-clipboard # Enables copy/paste on wayland 22 | 23 | (writeShellScriptBin "screenshot" '' 24 | grim -g "$(slurp)" - | wl-copy 25 | '') 26 | 27 | (writeShellScriptBin "screenshot-edit" '' 28 | wl-paste | swappy -f - 29 | '') 30 | 31 | (writeShellScriptBin "autostart" '' 32 | # Variables 33 | config=$HOME/.config/hypr 34 | scripts=$config/scripts 35 | 36 | # Waybar (if enabled) 37 | pkill waybar 38 | $scripts/launch_waybar & 39 | $scripts/tools/dynamic & 40 | 41 | # Wallpaper 42 | swww kill 43 | swww init 44 | swww restore 45 | 46 | # Others 47 | /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & 48 | # dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP & 49 | '') 50 | ]; 51 | 52 | wayland.windowManager.hyprland = { 53 | enable = true; 54 | # package = nixpkgs-stable.legacyPackages.x86_64-linux.hyprland; # hyprlandFlake or pkgs.hyprland 55 | package = hyprlandFlake; # hyprlandFlake or pkgs.hyprland 56 | systemd.variables = [ "--all" ]; 57 | xwayland = { 58 | enable = true; 59 | }; 60 | settings = { 61 | "$mainMod" = "SUPER"; 62 | monitor = [ 63 | "DP-3,1920x1080@165,0x0,1" 64 | "Unknown-1,disable" 65 | # ",highrr,auto,auto" 66 | ]; 67 | env = [ 68 | "ELECTRON_OZONE_PLATFORM_HINT,auto" 69 | ]; 70 | 71 | xwayland = { 72 | force_zero_scaling = true; 73 | }; 74 | 75 | input = { 76 | kb_layout = "br"; 77 | kb_variant = ""; 78 | kb_model = ""; 79 | kb_options = ""; 80 | kb_rules = ""; 81 | 82 | follow_mouse = 1; 83 | repeat_delay = 140; 84 | repeat_rate = 30; 85 | numlock_by_default = 1; 86 | accel_profile = "flat"; 87 | sensitivity = 0; 88 | force_no_accel = 1; 89 | touchpad = { 90 | natural_scroll = 1; 91 | }; 92 | }; 93 | 94 | cursor = { 95 | enable_hyprcursor = true; 96 | no_hardware_cursors = true; 97 | }; 98 | 99 | general = { 100 | gaps_in = 2; 101 | gaps_out = 0; 102 | border_size = 0; 103 | # "col.active_border" = "${catppuccin_border}"; 104 | # "col.inactive_border" = "${tokyonight_border}"; 105 | layout = "dwindle"; 106 | # apply_sens_to_raw = true; # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse) 107 | }; 108 | 109 | decoration = { 110 | rounding = 10; 111 | shadow = { 112 | enabled = true; 113 | ignore_window = true; 114 | range = 20; 115 | render_power = 3; 116 | }; 117 | # "col.shadow" = "rgb(${oxocarbon_background})"; 118 | # "col.shadow_inactive" = "${background}"; 119 | blur = { 120 | enabled = true; 121 | size = 4; 122 | passes = 2; 123 | new_optimizations = true; 124 | ignore_opacity = true; 125 | noise = 1.17e-2; 126 | contrast = 1.3; 127 | brightness = 1; 128 | xray = true; 129 | }; 130 | }; 131 | 132 | animations = { 133 | enabled = true; 134 | bezier = [ 135 | "pace,0.46, 1, 0.29, 0.99" 136 | "overshot,0.13,0.99,0.29,1.1" 137 | "md3_decel, 0.05, 0.7, 0.1, 1" 138 | ]; 139 | animation = [ 140 | "windowsIn,1,6,md3_decel,slide" 141 | "windowsOut,1,6,md3_decel,slide" 142 | "windowsMove,1,6,md3_decel,slide" 143 | "fade,1,10,md3_decel" 144 | "workspaces,1,9,md3_decel,slide" 145 | "workspaces, 1, 6, default" 146 | "specialWorkspace,1,8,md3_decel,slide" 147 | "border,1,10,md3_decel" 148 | ]; 149 | }; 150 | 151 | misc = { 152 | vfr = true; # misc:no_vfr -> misc:vfr. bool, heavily recommended to leave at default on. Saves on CPU usage. 153 | vrr = 0; # misc:vrr -> Adaptive sync of your monitor. 0 (off), 1 (on), 2 (fullscreen only). Default 0 to avoid white flashes on select hardware. 154 | disable_hyprland_logo = true; 155 | }; 156 | 157 | dwindle = { 158 | pseudotile = true; # enable pseudotiling on dwindle 159 | force_split = 0; 160 | preserve_split = true; 161 | default_split_ratio = 1.0; 162 | special_scale_factor = 0.8; 163 | split_width_multiplier = 1.0; 164 | use_active_for_splits = true; 165 | }; 166 | 167 | master = { 168 | mfact = 0.5; 169 | orientation = "right"; 170 | special_scale_factor = 0.8; 171 | new_status = "slave"; 172 | }; 173 | 174 | gestures = { 175 | workspace_swipe = false; 176 | }; 177 | 178 | debug = { 179 | damage_tracking = 2; # leave it on 2 (full) unless you hate your GPU and want to make it suffer! 180 | }; 181 | 182 | exec-once = [ 183 | "autostart" 184 | ]; 185 | 186 | bind = [ 187 | "SUPER,Q,killactive," 188 | "SUPER,M,exit," 189 | "SUPER,S,togglefloating," 190 | "SUPER,g,togglegroup" 191 | # "SUPER,tab,changegroupactive" 192 | # "SUPER,P,pseudo," 193 | 194 | # Vim binds 195 | "SUPER,h,movefocus,l" 196 | "SUPER,l,movefocus,r" 197 | "SUPER,k,movefocus,u" 198 | "SUPER,j,movefocus,d" 199 | 200 | "SUPER,left,movefocus,l" 201 | "SUPER,down,movefocus,r" 202 | "SUPER,up,movefocus,u" 203 | "SUPER,right,movefocus,d" 204 | 205 | "SUPER,1,workspace,1" 206 | "SUPER,2,workspace,2" 207 | "SUPER,3,workspace,3" 208 | "SUPER,4,workspace,4" 209 | "SUPER,5,workspace,5" 210 | "SUPER,6,workspace,6" 211 | "SUPER,7,workspace,7" 212 | "SUPER,8,workspace,8" 213 | 214 | ################################## Move ########################################### 215 | "SUPER SHIFT, H, movewindow, l" 216 | "SUPER SHIFT, L, movewindow, r" 217 | "SUPER SHIFT, K, movewindow, u" 218 | "SUPER SHIFT, J, movewindow, d" 219 | "SUPER SHIFT, left, movewindow, l" 220 | "SUPER SHIFT, right, movewindow, r" 221 | "SUPER SHIFT, up, movewindow, u" 222 | "SUPER SHIFT, down, movewindow, d" 223 | 224 | "SUPER $mainMod SHIFT, 1, movetoworkspacesilent, 1" 225 | "SUPER $mainMod SHIFT, 2, movetoworkspacesilent, 2" 226 | "SUPER $mainMod SHIFT, 3, movetoworkspacesilent, 3" 227 | "SUPER $mainMod SHIFT, 4, movetoworkspacesilent, 4" 228 | "SUPER $mainMod SHIFT, 5, movetoworkspacesilent, 5" 229 | "SUPER $mainMod SHIFT, 6, movetoworkspacesilent, 6" 230 | "SUPER $mainMod SHIFT, 7, movetoworkspacesilent, 7" 231 | "SUPER $mainMod SHIFT, 8, movetoworkspacesilent, 8" 232 | 233 | "SUPER,RETURN,exec,wezterm" 234 | "SUPER,n,exec,kitty" 235 | "SUPER,e,exec,emacsclient -c -a 'emacs'" 236 | ",Print,exec,screenshot" 237 | "SUPER,Print,exec,screenshot-edit" 238 | "SUPER,o,exec,obsidian" 239 | "SUPER SHIFT,C,exec,wallpaper" 240 | "SUPER,z,exec,waybar" 241 | "SUPER,space,exec,wofi --show drun -I -s ~/.config/wofi/style.css DP-3" 242 | ]; 243 | 244 | bindm = [ 245 | # Mouse binds 246 | "SUPER,mouse:272,movewindow" 247 | "SUPER,mouse:273,resizewindow" 248 | ]; 249 | 250 | windowrulev2 = [ 251 | "float,class:^(pavucontrol)$" 252 | "float,class:^(file_progress)$" 253 | "float,class:^(confirm)$" 254 | "float,class:^(dialog)$" 255 | "float,class:^(download)$" 256 | "float,class:^(notification)$" 257 | "float,class:^(error)$" 258 | "float,class:^(confirmreset)$" 259 | "float,title:^(Open File)$" 260 | "float,title:^(branchdialog)$" 261 | "float,title:^(Confirm to replace files)$" 262 | "float,title:^(File Operation Progress)$" 263 | "float,title:^(mpv)$" 264 | "opacity 1.0 1.0,class:^(wofi)$" 265 | ]; 266 | 267 | ecosystem = { 268 | no_update_news = true; 269 | }; 270 | }; 271 | }; 272 | 273 | # Hyprland configuration files 274 | xdg.configFile = { 275 | "hypr/scripts/launch_waybar".source = ./scripts/launch_waybar; 276 | "hypr/scripts/tools/dynamic".source = ./scripts/tools/dynamic; 277 | }; 278 | }; 279 | } 280 | -------------------------------------------------------------------------------- /home/desktop/hyprland/scripts/launch_waybar: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #waybar -c $HOME/.config/hypr/component/waybar/config -s $HOME/.config/hypr/component/waybar/style.css & 3 | 4 | waybar -c $HOME/.config/waybar/config -s $HOME/.config/waybar/style.css & 5 | 6 | -------------------------------------------------------------------------------- /home/desktop/hyprland/scripts/lock: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | swaylockd \ 3 | --screenshot \ 4 | --font "Cascadia Code" \ 5 | --clock \ 6 | --indicator \ 7 | --indicator-radius 100 \ 8 | --indicator-thickness 20 \ 9 | --line-color 181825 \ 10 | --ring-color 181825 \ 11 | --inside-color 181825 \ 12 | --key-hl-color cba6f7 \ 13 | --separator-color 00000000 \ 14 | --text-color cdd6f4 \ 15 | --text-caps-lock-color "" \ 16 | --line-ver-color cba6f7 \ 17 | --ring-ver-color cba6f7 \ 18 | --inside-ver-color 181825 \ 19 | --text-ver-color cdd6f4 \ 20 | --ring-wrong-color f38ba8 \ 21 | --text-wrong-color f38ba8 \ 22 | --inside-wrong-color 181825 \ 23 | --inside-clear-color 181825 \ 24 | --text-clear-color cdd6f4 \ 25 | --ring-clear-color cba6f7 \ 26 | --line-clear-color 181825 \ 27 | --line-wrong-color 181825 \ 28 | --bs-hl-color f38ba8 \ 29 | --line-uses-ring false \ 30 | --datestr "%d.%m" \ 31 | --fade-in "0.1" \ 32 | --effect-blur 10x4 & 33 | 34 | -------------------------------------------------------------------------------- /home/desktop/hyprland/scripts/rgb_borders: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import subprocess 4 | import time 5 | from colour import Color 6 | 7 | gradient = [ 8 | "#ff0000", 9 | "#00ff00", 10 | "#0000ff", 11 | ] 12 | 13 | def color_range(*args): 14 | l = [] 15 | for i,color in enumerate(args): 16 | if i == len(args)-1: 17 | break 18 | l.extend(color.range_to(args[i+1], 25)) 19 | return l 20 | 21 | def rgb_to_hex(r,g,b): 22 | return '%02x%02x%02x' % (r,g,b) 23 | 24 | def set_color(r,g,b): 25 | print(rgb_to_hex(r,g,b)) 26 | subprocess.run(f"hyprctl keyword general:col.active_border 0xff{rgb_to_hex(r,g,b)}".split()) 27 | subprocess.run(f"hyprctl keyword general:col.inactive_border 0x66{rgb_to_hex(r,g,b)}".split()) 28 | 29 | colors = color_range(*[Color(i) for i in gradient]) 30 | 31 | while 1: 32 | for col in colors: 33 | set_color(int(col.red*255), int(col.green*255), int(col.blue*255)) 34 | time.sleep(0.05) 35 | for col in colors[::-1]: 36 | set_color(int(col.red*255), int(col.green*255), int(col.blue*255)) 37 | time.sleep(0.05) 38 | -------------------------------------------------------------------------------- /home/desktop/hyprland/scripts/screenshot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | grimblast copysave area ~/Pictures/screenshots/img 3 | notify-send "Screenshot copied to clipboard" -a "ss" 4 | -------------------------------------------------------------------------------- /home/desktop/hyprland/scripts/screenshot.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | grim -g "$(slurp)" - | wl-copy 4 | -------------------------------------------------------------------------------- /home/desktop/hyprland/scripts/tools/dynamic: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import subprocess 4 | from pathlib import Path 5 | import json 6 | import pickle 7 | import time 8 | import threading 9 | 10 | OUT = f"{Path.home()}/.config/hypr/store/dynamic_out.txt" 11 | # PREV_PATH = f"{Path.home()}/.config/hypr/store/prev.txt" 12 | prev = None 13 | 14 | def print(ar): 15 | with open(OUT,"w") as f: 16 | f.write(json.dumps(ar)) 17 | 18 | # with open(f"{Path.home()}/.config/hypr/im_here","w") as f: 19 | # f.write("") 20 | 21 | global PAUSE_MEDIA 22 | PAUSE_MEDIA = False 23 | 24 | def notif_watcher(): 25 | with open(f"{Path.home()}/.config/hypr/store/latest_notif","rb") as f: 26 | new = pickle.load(f) 27 | global prev 28 | if new != prev: 29 | print(json.dumps({"class":"none","text":""})) 30 | global PAUSE_MEDIA 31 | PAUSE_MEDIA = True 32 | urgency = "low" 33 | if new["urgency"] == "CRITICAL": 34 | urgency = "critical" 35 | elif new["urgency"] == "NORMAL": 36 | urgency = "normal" 37 | doc = { 38 | "class":urgency, 39 | "text":f'[{new["app_name"]}] {new["summary"]}', 40 | "tooltip":"notification" 41 | } 42 | print(doc) 43 | time.sleep(3) 44 | print({"class":"none","text":""}) 45 | PAUSE_MEDIA = False 46 | prev = new 47 | 48 | 49 | def start_watcher(): 50 | while 1: 51 | notif_watcher() 52 | time.sleep(0.5) 53 | 54 | 55 | def debug(): 56 | while 1: 57 | print(PAUSE_MEDIA) 58 | time.sleep(0.5) 59 | t = threading.Thread(target=start_watcher) 60 | d = threading.Thread(target=debug) 61 | t.start() 62 | # d.start() 63 | 64 | 65 | 66 | with open("test.log", "wb") as f: 67 | process = subprocess.Popen( 68 | "waybar-mpris --position --autofocus".split(), 69 | stdout=subprocess.PIPE 70 | ) 71 | print(json.dumps({"class":"none","text":""})) 72 | for line in iter(lambda: process.stdout.readline().decode("utf-8"), b""): 73 | dat = json.loads(line) 74 | if not PAUSE_MEDIA: 75 | if "text" in dat: 76 | dat["text"] = dat["text"].replace(" ", "").replace("", "") 77 | print(dat) 78 | else: 79 | print({"class":"none","text":""}) 80 | 81 | t.join() 82 | # d.join() 83 | 84 | -------------------------------------------------------------------------------- /home/desktop/hyprland/scripts/tools/expand: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | TEMP=/tmp/current_wall 3 | 4 | files=(~/.config/hypr/wallpapers/*) 5 | 6 | hypr=~/.config/hypr 7 | scripts=$hypr/scripts 8 | 9 | cooldown=0.1 10 | 11 | 12 | while true 13 | do 14 | case "$1" in 15 | "cycle") 16 | index=$(cat $TEMP) 17 | index=$((index+1)) 18 | if [ $index -ge ${#files[@]} ]; then 19 | index=0 20 | fi 21 | echo $index > $TEMP 22 | $scripts/wall "${files[$index]}" 23 | exit 0 24 | ;; 25 | "arrow-icon") 26 | if $scripts/toolbar_state; then 27 | echo "" 28 | else 29 | echo "" 30 | fi 31 | ;; 32 | "ss-icon") 33 | if $scripts/toolbar_state; then 34 | echo "" 35 | else 36 | echo "" 37 | fi 38 | ;; 39 | # "media") 40 | 41 | *) 42 | if $scripts/toolbar_state; then 43 | echo " " 44 | else 45 | echo "" 46 | fi 47 | ;; 48 | esac 49 | sleep $cooldown 50 | done 51 | -------------------------------------------------------------------------------- /home/desktop/hyprland/scripts/tools/notif: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import pickle 3 | import os 4 | from pathlib import Path 5 | dat = { 6 | "app_name":os.getenv("DUNST_APP_NAME"), 7 | "summary":os.getenv("DUNST_SUMMARY"), 8 | "body":os.getenv("DUNST_BODY"), 9 | "icon":os.getenv("DUNST_ICON_path"), 10 | "urgency":os.getenv("DUNST_URGENCY"), 11 | "id":os.getenv("DUNST_ID"), 12 | "progress":os.getenv("DUNST_PROGRESS"), 13 | "category":os.getenv("DUNST_CATEGORY"), 14 | "stack_tag":os.getenv("DUNST_STACK_TAG"), 15 | "urls":os.getenv("DUNST_URLS"), 16 | "timeout":os.getenv("DUNST_TIMEOUT"), 17 | "timestamp":os.getenv("DUNST_TIMESTAMP"), 18 | "desktop-entry":os.getenv("DUNST_DESKTOP_ENTRY"), 19 | "stack-tag":os.getenv("DUNST_STACK_TAG"), 20 | } 21 | with open(f"{Path.home()}/.config/hypr/store/latest_notif", "wb") as f: 22 | pickle.dump(dat, f) 23 | -------------------------------------------------------------------------------- /home/desktop/hyprland/scripts/tools/start_dyn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | while true 4 | do 5 | # echo "" 6 | out=$(cat ~/.config/hypr/store/dynamic_out.txt) 7 | echo "$out" | jq --unbuffered --compact-output 8 | # cat ~/.config/hypr/scripts/tools/dynamic_out.txt 9 | sleep 0.5 10 | done 11 | -------------------------------------------------------------------------------- /home/desktop/hyprland/scripts/tools/test.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redyf/nixdots/c5084f87801d016af75257ce7a4805d03b888a42/home/desktop/hyprland/scripts/tools/test.log -------------------------------------------------------------------------------- /home/desktop/hyprland/scripts/wall: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | images_path=~/wallpapers/ 4 | variations=(1.jpg 2.jpg jabuti.png cherryblossom.png oxocarbon.png invasion.jpg jabuti2.png catppuccin.png lofi.gif wall.png purple.png anime.png programmer.gif gwen.png nix.png nixos.png kanagawa.png flowers.png wallpaper.png) 5 | number=$(($RANDOM % 20)) 6 | image=${variations[$number]} 7 | wallpaper=$images_path$image 8 | swww init 9 | swww img $wallpaper --transition-type grow --transition-pos 0.9,0.1 --transition-duration 1.5 --transition-fps 90 10 | -------------------------------------------------------------------------------- /home/desktop/theme/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | theme.enable = lib.mkEnableOption "Enable theme module"; 10 | }; 11 | config = lib.mkIf config.theme.enable { 12 | gtk = { 13 | enable = true; 14 | cursorTheme = { 15 | name = "macOS-BigSur"; 16 | package = pkgs.apple-cursor; 17 | size = 36; 18 | }; 19 | 20 | iconTheme = { 21 | name = "WhiteSur"; 22 | package = pkgs.whitesur-icon-theme; 23 | # name = "Papirus-Dark"; 24 | # package = pkgs.papirus-folders; 25 | }; 26 | theme = { 27 | name = lib.mkDefault "WhiteSur"; 28 | package = lib.mkDefault pkgs.whitesur-gtk-theme; 29 | }; 30 | }; 31 | 32 | stylix = lib.mkIf (builtins.hasAttr "stylix" config) { 33 | targets = { 34 | tmux.enable = false; 35 | mako.enable = true; 36 | vesktop.enable = false; 37 | hyprland.enable = false; 38 | waybar.enable = false; 39 | bat.enable = true; 40 | starship.enable = false; 41 | qt = { 42 | enable = true; 43 | platform = "qtct"; 44 | }; 45 | }; 46 | }; 47 | }; 48 | } 49 | -------------------------------------------------------------------------------- /home/home.nix: -------------------------------------------------------------------------------- 1 | { 2 | username, 3 | homeDirectory, 4 | ... 5 | }: 6 | { 7 | home = { 8 | inherit username homeDirectory; 9 | stateVersion = "22.11"; 10 | # Add support for .local/bin 11 | sessionPath = [ 12 | "$HOME/.local/bin" 13 | ]; 14 | }; 15 | 16 | # Let Home Manager install and manage itself. 17 | programs = { 18 | home-manager.enable = true; 19 | }; 20 | 21 | imports = [ 22 | ./apps 23 | ./cli 24 | ./desktop 25 | ./system 26 | ./tools 27 | ]; 28 | 29 | apps.enable = true; 30 | cli.enable = true; 31 | desktop.enable = true; 32 | system.enable = true; 33 | tools.enable = true; 34 | 35 | nixpkgs = { 36 | config = { 37 | allowUnfree = true; 38 | permittedInsecurePackages = [ 39 | "dotnet-sdk-6.0.428" 40 | "beekeeper-studio-5.1.5" 41 | ]; 42 | }; 43 | }; 44 | 45 | } 46 | -------------------------------------------------------------------------------- /home/rpi.nix: -------------------------------------------------------------------------------- 1 | { username, homeDirectory, ... }: 2 | { 3 | home = { 4 | inherit username homeDirectory; 5 | stateVersion = "22.11"; 6 | # Add support for .local/bin 7 | sessionPath = [ "$HOME/.local/bin" ]; 8 | }; 9 | 10 | # Let Home Manager install and manage itself. 11 | programs = { 12 | home-manager.enable = true; 13 | }; 14 | 15 | imports = [ 16 | ./apps 17 | ./cli 18 | ./desktop 19 | ./system 20 | ./tools 21 | ]; 22 | 23 | apps.enable = false; 24 | cli.enable = true; 25 | desktop.enable = false; 26 | system.enable = false; 27 | tools.enable = true; 28 | 29 | nixpkgs = { 30 | config = { 31 | allowUnfree = true; 32 | }; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /home/system/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | ... 5 | }: { 6 | imports = [ 7 | ./nix 8 | ./fonts 9 | ./shell 10 | ]; 11 | 12 | options = { 13 | system.enable = lib.mkEnableOption "Enable system module"; 14 | }; 15 | config = lib.mkIf config.system.enable { 16 | nixy.enable = lib.mkDefault true; 17 | fonts.enable = lib.mkDefault true; 18 | shell.enable = lib.mkDefault true; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /home/system/fonts/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs, 3 | lib, 4 | pkgs, 5 | config, 6 | ... 7 | }: 8 | { 9 | options = { 10 | fonts.enable = lib.mkEnableOption "Enable fonts module"; 11 | }; 12 | config = lib.mkIf config.fonts.enable { 13 | home = { 14 | packages = with pkgs; [ 15 | nerd-fonts.jetbrains-mono 16 | inputs.font-flake.packages.${system}.berkeley 17 | ]; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /home/system/nix/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | nixy.enable = lib.mkEnableOption "Enable nix module"; 10 | }; 11 | config = lib.mkIf config.nixy.enable { 12 | home = { 13 | packages = with pkgs; [ 14 | nixd 15 | statix 16 | nixfmt-rfc-style 17 | nix-init 18 | nix-update 19 | nixpkgs-review 20 | cachix 21 | ]; 22 | }; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /home/system/shell/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | shell.enable = lib.mkEnableOption "Enable Shell module"; 10 | }; 11 | config = lib.mkIf config.shell.enable { 12 | home = { 13 | shell.enableZshIntegration = true; 14 | sessionVariables = { 15 | MANPAGER = "sh -c 'col -bx | bat -l man -p'"; 16 | MANROFFOPT = "-c"; 17 | DIRENV_LOG_FORMAT = ""; # Blank so direnv will shut up 18 | }; 19 | packages = with pkgs; [ 20 | timer 21 | lolcat 22 | ]; 23 | }; 24 | 25 | programs = { 26 | nushell = { 27 | enable = false; 28 | environmentVariables.TERMINAL = "wezterm"; 29 | extraConfig = '' 30 | $env.config = { 31 | show_banner: false, 32 | completions: { 33 | case_sensitive: false # case-sensitive completions 34 | quick: true # set to false to prevent auto-selecting completions 35 | partial: true # set to false to prevent partial filling of the prompt 36 | algorithm: "fuzzy" # prefix or fuzzy 37 | }, 38 | keybindings: [{ 39 | name: unix-line-discard 40 | modifier: control 41 | keycode: char_u 42 | mode: [emacs, vi_insert, vi_normal] 43 | event: { until: [{edit: cutfromlinestart}] } 44 | }, 45 | { 46 | name: insert-file-using-fzf 47 | modifier: control 48 | keycode: char_t 49 | mode: [emacs, vi_insert, vi_normal] 50 | event: { send: ExecuteHostCommand, cmd: "commandline edit --insert (fzf)" } 51 | }, 52 | ] 53 | } 54 | ''; 55 | shellAliases = { 56 | c = "nvim"; 57 | cp = "cp -i"; 58 | grep = "grep --color=auto"; 59 | mv = "mv -i"; 60 | g = "git"; 61 | ga = "git add"; 62 | gaa = "git add ."; 63 | gb = "git branch"; 64 | gc = "git commit"; 65 | gcm = "git commit --message"; 66 | gco = "git checkout"; 67 | gd = "git diff"; 68 | gi = "git init"; 69 | gp = "git pull"; 70 | gs = "git status"; 71 | nb = "nix-build"; 72 | nd = "nix develop"; 73 | nr = "nix run"; 74 | ns = "nix-shell"; 75 | nu = "nix-update"; 76 | wo = "pomodoro 'work'"; 77 | br = "pomodoro 'break'"; 78 | }; 79 | }; 80 | zsh = { 81 | enable = true; 82 | dotDir = ".config/zsh"; 83 | enableCompletion = true; 84 | autosuggestion.enable = true; 85 | syntaxHighlighting.enable = true; 86 | initContent = '' 87 | bindkey -s ^f "tmux-sessionizer-script\n" 88 | export PATH=$PATH:~/.local/bin/ 89 | export PATH=/tmp/lazy-lvim/bin:$PATH 90 | export PATH="$PATH:/home/redyf/.emacs.d/bin" 91 | export PATH="$PATH:/home/redyf/.config/emacs/bin" 92 | export PATH="$PATH:/run/current-system/sw/bin/jdtls" 93 | export PATH="$PATH:/run/current-system/sw/bin/jdt-language-server" 94 | export PATH="$PATH:/etc/profiles/per-user/redyf/bin/flutter" 95 | export PATH="$PATH:/home/redyf/Android/Sdk" 96 | export PATH="$PATH:/home/redyf/Android/Sdk/platform-tools/" 97 | export PATH="$PATH:/home/redyf/Android/Sdk/cmdline-tools/latest/bin" 98 | export WINIT_UNIX_BACKEND=x11 neovide 99 | 100 | # Pomodoro script 101 | declare -A pomo_options 102 | pomo_options["work"]="25" 103 | pomo_options["break"]="5" 104 | 105 | pomodoro () { 106 | if [ -n "$1" -a -n "''${pomo_options["$1"]}" ]; then 107 | val=$1 108 | echo $val | lolcat 109 | timer ''${pomo_options["$val"]}m 110 | spd-say "'$val' session done" 111 | fi 112 | } 113 | 114 | # Autosuggest 115 | ZSH_AUTOSUGGEST_USE_ASYNC="true" 116 | 117 | while read -r option 118 | do 119 | setopt $option 120 | done <<-EOF 121 | AUTO_CD 122 | AUTO_LIST 123 | AUTO_MENU 124 | AUTO_PARAM_SLASH 125 | AUTO_PUSHD 126 | APPEND_HISTORY 127 | ALWAYS_TO_END 128 | COMPLETE_IN_WORD 129 | CORRECT 130 | EXTENDED_HISTORY 131 | HIST_EXPIRE_DUPS_FIRST 132 | HIST_FCNTL_LOCK 133 | HIST_IGNORE_ALL_DUPS 134 | HIST_IGNORE_DUPS 135 | HIST_IGNORE_SPACE 136 | HIST_REDUCE_BLANKS 137 | HIST_SAVE_NO_DUPS 138 | HIST_VERIFY 139 | INC_APPEND_HISTORY 140 | INTERACTIVE_COMMENTS 141 | MENU_COMPLETE 142 | NO_NOMATCH 143 | PUSHD_IGNORE_DUPS 144 | PUSHD_TO_HOME 145 | PUSHD_SILENT 146 | SHARE_HISTORY 147 | EOF 148 | 149 | while read -r option 150 | do 151 | unsetopt $option 152 | done <<-EOF 153 | CORRECT_ALL 154 | HIST_BEEP 155 | MENU_COMPLETE 156 | EOF 157 | 158 | # Group matches and describe. 159 | zstyle ':completion:*' sort false 160 | zstyle ':completion:complete:*:options' sort false 161 | zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 162 | zstyle ':completion:*' special-dirs true 163 | zstyle ':completion:*' rehash true 164 | 165 | zstyle ':completion:*' menu yes select # search 166 | zstyle ':completion:*' list-grouped false 167 | zstyle ':completion:*' list-separator ''' 168 | zstyle ':completion:*' group-name ''' 169 | zstyle ':completion:*' verbose yes 170 | zstyle ':completion:*:matches' group 'yes' 171 | zstyle ':completion:*:warnings' format '%F{red}%B-- No match for: %d --%b%f' 172 | zstyle ':completion:*:messages' format '%d' 173 | zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b' 174 | zstyle ':completion:*:descriptions' format '[%d]' 175 | 176 | # Fuzzy match mistyped completions. 177 | zstyle ':completion:*' completer _complete _match _approximate 178 | zstyle ':completion:*:match:*' original only 179 | zstyle ':completion:*:approximate:*' max-errors 1 numeric 180 | 181 | # Don't complete unavailable commands. 182 | zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))' 183 | 184 | # Array completion element sorting. 185 | zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters 186 | 187 | # fzf-tab 188 | zstyle ':fzf-tab:complete:_zlua:*' query-string input 189 | zstyle ':fzf-tab:complete:kill:argument-rest' fzf-preview 'ps --pid=$word -o cmd --no-headers -w -w' 190 | zstyle ':fzf-tab:complete:kill:argument-rest' fzf-flags '--preview-window=down:3:wrap' 191 | zstyle ':fzf-tab:complete:kill:*' popup-pad 0 3 192 | zstyle ':fzf-tab:complete:cd:*' fzf-preview 'exa -1 --color=always $realpath' 193 | zstyle ':fzf-tab:complete:cd:*' popup-pad 30 0 194 | zstyle ':fzf-tab:*' switch-group ',' '.' 195 | zstyle ":completion:*:git-checkout:*" sort false 196 | zstyle ':completion:*' file-sort modification 197 | zstyle ':completion:*:exa' sort false 198 | zstyle ':completion:files' sort false 199 | ''; 200 | 201 | shellAliases = { 202 | c = "nvim"; 203 | cp = "cp -i"; 204 | grep = "grep --color=auto"; 205 | mv = "mv -i"; 206 | g = "git"; 207 | ga = "git add"; 208 | gaa = "git add ."; 209 | gb = "git branch"; 210 | gc = "git commit"; 211 | gcm = "git commit --message"; 212 | gco = "git checkout"; 213 | gd = "git diff"; 214 | gi = "git init"; 215 | gp = "git pull"; 216 | gs = "git status"; 217 | nb = "nix-build"; 218 | nd = "nix develop"; 219 | nr = "nix run"; 220 | ns = "nix-shell"; 221 | nu = "nix-update"; 222 | wo = "pomodoro 'work'"; 223 | br = "pomodoro 'break'"; 224 | }; 225 | 226 | oh-my-zsh = { 227 | enable = true; 228 | theme = "bira"; 229 | plugins = [ 230 | "git" 231 | "colorize" 232 | "colored-man-pages" 233 | "command-not-found" 234 | "history-substring-search" 235 | ]; 236 | }; 237 | 238 | plugins = 239 | let 240 | themepkg = pkgs.fetchFromGitHub { 241 | owner = "catppuccin"; 242 | repo = "zsh-syntax-highlighting"; 243 | rev = "7926c3d3e17d26b3779851a2255b95ee650bd928"; 244 | hash = "sha256-l6tztApzYpQ2/CiKuLBf8vI2imM6vPJuFdNDSEi7T/o="; 245 | }; 246 | in 247 | with pkgs; 248 | [ 249 | { 250 | name = "zsh-autopair"; 251 | file = "zsh-autopair.plugin.zsh"; 252 | src = zsh-autopair; 253 | } 254 | { 255 | name = "fzf-tab"; 256 | file = "fzf-tab.plugin.zsh"; 257 | src = zsh-fzf-tab; 258 | } 259 | { 260 | name = "ctp-zsh-syntax-highlighting"; 261 | src = themepkg; 262 | file = themepkg + "/themes/catppuccin_mocha-zsh-syntax-highlighting.zsh"; 263 | } 264 | ]; 265 | }; 266 | }; 267 | }; 268 | } 269 | -------------------------------------------------------------------------------- /home/tools/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | ... 5 | }: 6 | { 7 | imports = [ 8 | ./direnv 9 | ./git 10 | ./http 11 | ./languages 12 | ]; 13 | 14 | options = { 15 | tools.enable = lib.mkEnableOption "Enable tools module"; 16 | }; 17 | config = lib.mkIf config.tools.enable { 18 | direnv.enable = lib.mkDefault true; 19 | git.enable = lib.mkDefault true; 20 | http.enable = lib.mkDefault true; 21 | languages.enable = lib.mkDefault true; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /home/tools/direnv/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | ... 5 | }: 6 | { 7 | options = { 8 | direnv.enable = lib.mkEnableOption "Enable direnv module"; 9 | }; 10 | 11 | config = lib.mkIf config.direnv.enable { 12 | programs.direnv = { 13 | enable = true; 14 | nix-direnv.enable = true; 15 | }; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /home/tools/git/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | git.enable = lib.mkEnableOption "Enable git module"; 10 | }; 11 | config = lib.mkIf config.git.enable { 12 | programs.git = { 13 | enable = true; 14 | userName = "redyf"; 15 | userEmail = "mateusalvespereira7@gmail.com"; 16 | extraConfig = { 17 | core = { 18 | editor = "nvim"; 19 | }; 20 | init = { 21 | defaultBranch = "main"; 22 | }; 23 | branch = { 24 | autoSetupRemote = true; 25 | }; 26 | fetch = { 27 | prune = true; 28 | }; 29 | pull = { 30 | ff = false; 31 | commit = false; 32 | rebase = true; 33 | prune = true; 34 | }; 35 | maintenance.repo = "/home/redyf/opensource/nixpkgs"; 36 | safe = { 37 | directory = "/home/redyf/opensource/nixdots"; 38 | }; 39 | }; 40 | }; 41 | home.packages = with pkgs; [ 42 | gh 43 | ]; 44 | }; 45 | } 46 | -------------------------------------------------------------------------------- /home/tools/http/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | http.enable = lib.mkEnableOption "Enable http module"; 10 | }; 11 | config = lib.mkIf config.http.enable { 12 | home.packages = with pkgs; [ 13 | curl 14 | openssl 15 | ]; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /home/tools/languages/c/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | c.enable = lib.mkEnableOption "Enable C module"; 10 | }; 11 | config = lib.mkIf config.c.enable { 12 | home.packages = with pkgs; [ 13 | gcc 14 | gnumake 15 | ]; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /home/tools/languages/default.nix: -------------------------------------------------------------------------------- 1 | { lib, config, ... }: 2 | { 3 | imports = [ 4 | ./c 5 | ./java 6 | ./javascript 7 | ./lua 8 | ./python 9 | ./rust 10 | ]; 11 | options = { 12 | languages.enable = lib.mkEnableOption "Enable programming languages module"; 13 | }; 14 | config = lib.mkIf config.languages.enable { 15 | c.enable = lib.mkDefault true; 16 | java.enable = lib.mkDefault false; 17 | javascript.enable = lib.mkDefault true; 18 | lua.enable = lib.mkDefault true; 19 | python.enable = lib.mkDefault true; 20 | rust.enable = lib.mkDefault true; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /home/tools/languages/java/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | java.enable = lib.mkEnableOption "Enable java module"; 10 | }; 11 | config = lib.mkIf config.java.enable { 12 | # programs.java = { 13 | # enable = true; 14 | # package = pkgs.jdk17_headless; 15 | # }; 16 | home.packages = with pkgs; [ 17 | # jdk17_headless 18 | jdk23_headless 19 | # jdt-language-server # Jdtls integration 20 | maven # Build automation tool for java 21 | spring-boot-cli 22 | vscode-extensions.vscjava.vscode-java-debug 23 | # jetbrains.idea-community 24 | # gradle # Enterprise-grade build system 25 | # checkstyle # Linter 26 | # google-java-format # Formatter 27 | ]; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /home/tools/languages/javascript/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | javascript.enable = lib.mkEnableOption "Enable javascript module"; 10 | }; 11 | config = lib.mkIf config.javascript.enable { 12 | home.packages = with pkgs; [ 13 | pnpm 14 | nodejs 15 | corepack 16 | ]; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /home/tools/languages/lua/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | lua.enable = lib.mkEnableOption "Enable lua module"; 10 | }; 11 | config = lib.mkIf config.lua.enable { 12 | home.packages = with pkgs; [ 13 | lua # Lua programming language 14 | # stylua # Lua formatter 15 | # selene # Lua linter written in rust 16 | # lua-language-server # Lua LSP 17 | ]; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /home/tools/languages/python/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | python.enable = lib.mkEnableOption "Enable python module"; 10 | }; 11 | config = lib.mkIf config.python.enable { 12 | home.packages = with pkgs; [ 13 | python3 14 | ]; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /home/tools/languages/rust/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | lib, 4 | config, 5 | ... 6 | }: 7 | { 8 | options = { 9 | rust.enable = lib.mkEnableOption "Enable rust module"; 10 | }; 11 | config = lib.mkIf config.rust.enable { 12 | home.packages = with pkgs; [ 13 | # cargo # Downloads your Rust project's dependencies and builds your project 14 | # clippy # A bunch of lints to catch common mistakes and improve your Rust code 15 | # lldb # A next-generation high-performance debugger 16 | # rust-analyzer # Lsp for rust 17 | rustc # Compiler for rust 18 | # rustfmt # Formatter for rust language 19 | ]; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /hosts/redyf/configuration.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs, 3 | lib, 4 | pkgs, 5 | username, 6 | ... 7 | }: 8 | { 9 | imports = [ 10 | # Include the results of the hardware scan. 11 | ./hardware-configuration.nix 12 | ../../modules 13 | ]; 14 | 15 | fileSystems."/mnt/windows" = { 16 | device = "UUID=F0FEDBD0FEDB8D6A"; 17 | fsType = "ntfs"; 18 | options = [ 19 | "uid=1000" 20 | "gid=100" 21 | "umask=022" 22 | "rw" 23 | "nofail" 24 | ]; 25 | }; 26 | 27 | # Configure the user with specific groups 28 | myConfig = { 29 | users = { 30 | enable = true; 31 | username = "redyf"; 32 | isNormalUser = true; 33 | description = "redyf"; # Optional - defaults to username if not specified 34 | initialPassword = "123456"; 35 | shell = pkgs.zsh; 36 | 37 | groups = { 38 | # development = true; 39 | virtualisation = true; 40 | # media = true; 41 | input = true; 42 | }; 43 | }; 44 | 45 | gaming = { 46 | enable = true; 47 | steam.enable = true; 48 | }; 49 | 50 | hardware = { 51 | enable = true; 52 | nvidia.enable = true; 53 | }; 54 | 55 | nix = { 56 | enable = true; 57 | nix.enable = true; 58 | }; 59 | 60 | programs = { 61 | enable = true; 62 | hyprland.enable = true; 63 | k3s.enable = true; 64 | nh.enable = true; 65 | zsh.enable = true; 66 | }; 67 | 68 | services = { 69 | enable = true; 70 | services.enable = true; 71 | xserver.enable = true; 72 | }; 73 | 74 | system = { 75 | enable = true; 76 | audio.enable = true; 77 | boot.enable = true; 78 | environment.enable = true; 79 | hardware.enable = true; 80 | keymap.enable = true; 81 | locale.enable = true; 82 | networking.enable = true; 83 | security.enable = true; 84 | ssh.enable = true; 85 | systemd.enable = true; 86 | time.enable = true; 87 | xdg-portal.enable = true; 88 | zram.enable = true; 89 | }; 90 | 91 | themes = { 92 | enable = true; 93 | stylix.enable = true; 94 | }; 95 | 96 | virtualization = { 97 | enable = true; 98 | docker.enable = true; 99 | }; 100 | }; 101 | 102 | # users.users = { 103 | # ${username} = { 104 | # isNormalUser = true; 105 | # description = username; 106 | # initialPassword = "123456"; 107 | # shell = pkgs.zsh; 108 | # extraGroups = [ 109 | # "networkmanager" 110 | # "wheel" 111 | # "input" 112 | # "docker" 113 | # "kvm" 114 | # "libvirtd" 115 | # ]; 116 | # }; 117 | # }; 118 | 119 | nixpkgs.config.allowUnfree = true; 120 | 121 | environment.systemPackages = with pkgs; [ 122 | git 123 | docker-compose 124 | ntfs3g 125 | ]; 126 | 127 | system.stateVersion = "22.11"; # Don't change this 128 | } 129 | -------------------------------------------------------------------------------- /hosts/redyf/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { 5 | config, 6 | lib, 7 | pkgs, 8 | modulesPath, 9 | ... 10 | }: { 11 | imports = [ 12 | (modulesPath + "/installer/scan/not-detected.nix") 13 | ]; 14 | 15 | boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" "sr_mod" "rtsx_usb_sdmmc"]; 16 | boot.initrd.kernelModules = []; 17 | boot.kernelModules = ["kvm-intel"]; 18 | boot.extraModulePackages = []; 19 | 20 | fileSystems."/" = { 21 | device = "/dev/disk/by-uuid/ed3fdfdd-8859-489f-a868-7ea460ac2eda"; 22 | fsType = "ext4"; 23 | }; 24 | 25 | fileSystems."/boot" = { 26 | device = "/dev/disk/by-uuid/521D-F4B4"; 27 | fsType = "vfat"; 28 | }; 29 | 30 | swapDevices = []; 31 | 32 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 33 | # (the default) this is the recommended approach. When using systemd-networkd it's 34 | # still possible to use this option, but it's recommended to use it in conjunction 35 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 36 | networking.useDHCP = lib.mkDefault true; 37 | # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; 38 | # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; 39 | 40 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 41 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 42 | } 43 | -------------------------------------------------------------------------------- /modules/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | options.myConfig.modules = { 5 | enable = lib.mkEnableOption "Enable modules configuration"; 6 | 7 | gaming = { 8 | enable = lib.mkEnableOption "Enable Steam gaming platform"; 9 | }; 10 | hardware = { 11 | enable = lib.mkEnableOption "Enable hardware module"; 12 | }; 13 | nix = { 14 | enable = lib.mkEnableOption "Enable nix module"; 15 | }; 16 | programs = { 17 | enable = lib.mkEnableOption "Enable programs module"; 18 | }; 19 | services = { 20 | enable = lib.mkEnableOption "Enable services module"; 21 | }; 22 | themes = { 23 | enable = lib.mkEnableOption "Enable themes module"; 24 | }; 25 | system = { 26 | enable = lib.mkEnableOption "Enable system module"; 27 | }; 28 | users = { 29 | enable = lib.mkEnableOption "Enable users module"; 30 | }; 31 | virtualization = { 32 | enable = lib.mkEnableOption "Enable virtualization module"; 33 | }; 34 | }; 35 | imports = [ 36 | ./gaming 37 | ./hardware 38 | ./nix 39 | ./programs 40 | ./services 41 | ./themes 42 | ./system 43 | ./users 44 | ./virtualization 45 | ]; 46 | } 47 | -------------------------------------------------------------------------------- /modules/gaming/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | options.myConfig.gaming = { 5 | enable = lib.mkEnableOption "Enable gaming configuration"; 6 | 7 | steam = { 8 | enable = lib.mkEnableOption "Enable Steam gaming platform"; 9 | }; 10 | }; 11 | 12 | imports = [ 13 | ./steam.nix 14 | ]; 15 | } 16 | -------------------------------------------------------------------------------- /modules/gaming/steam.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.gaming.steam; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.gaming.enable && cfg.enable) { 12 | programs = { 13 | steam = { 14 | enable = true; 15 | gamescopeSession.enable = true; 16 | }; 17 | gamemode.enable = true; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/hardware/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | options.myConfig.hardware = { 5 | enable = lib.mkEnableOption "Enable hardware configuration"; 6 | 7 | nvidia = { 8 | enable = lib.mkEnableOption "Enable NVIDIA drivers"; 9 | }; 10 | }; 11 | 12 | imports = [ 13 | ./nvidia.nix 14 | ]; 15 | } 16 | -------------------------------------------------------------------------------- /modules/hardware/nvidia.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs, 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | let 10 | cfg = config.myConfig.hardware.nvidia; 11 | in 12 | { 13 | config = lib.mkIf (config.myConfig.hardware.enable && cfg.enable) { 14 | services = { 15 | xserver = { 16 | videoDrivers = [ "nvidia" ]; 17 | }; 18 | }; 19 | hardware = { 20 | nvidia = { 21 | open = true; 22 | nvidiaSettings = true; 23 | powerManagement.enable = true; 24 | modesetting.enable = true; 25 | package = config.boot.kernelPackages.nvidiaPackages.beta; 26 | }; 27 | graphics = { 28 | extraPackages = [ pkgs.nvidia-vaapi-driver ]; 29 | }; 30 | }; 31 | environment = { 32 | variables = { 33 | LIBVA_DRIVER_NAME = "nvidia"; 34 | XDG_SESSION_TYPE = "wayland"; 35 | GBM_BACKEND = "nvidia-drm"; 36 | __GLX_VENDOR_LIBRARY_NAME = "nvidia"; 37 | __GL_GSYNC_ALLOWED = "1"; 38 | __GL_VRR_ALLOWED = "0"; # Controls if Adaptive Sync should be used. Recommended to set as “0” to avoid having problems on some games. 39 | QT_AUTO_SCREEN_SCALE_FACTOR = "1"; 40 | QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; 41 | CUDA_CACHE_PATH = "$XDG_CACHE_HOME/nv"; 42 | }; 43 | shellAliases = { 44 | nvidia-settings = "nvidia-settings --config='$XDG_CONFIG_HOME'/nvidia/settings"; 45 | }; 46 | }; 47 | }; 48 | } 49 | -------------------------------------------------------------------------------- /modules/nix/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | options.myConfig.nix = { 5 | enable = lib.mkEnableOption "Enable Global Nix configuration"; 6 | 7 | nix = { 8 | enable = lib.mkEnableOption "Enable nix "; 9 | }; 10 | }; 11 | 12 | imports = [ 13 | ./nix.nix 14 | ]; 15 | } 16 | -------------------------------------------------------------------------------- /modules/nix/nix.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | homeDirectory, 4 | lib, 5 | pkgs, 6 | username, 7 | ... 8 | }: 9 | 10 | let 11 | cfg = config.myConfig.nix.nix; 12 | in 13 | { 14 | config = lib.mkIf (config.myConfig.nix.enable && cfg.enable) { 15 | nixpkgs = { 16 | config = { 17 | allowUnfree = true; 18 | }; 19 | }; 20 | nix = { 21 | package = pkgs.nixVersions.stable; 22 | settings = { 23 | experimental-features = [ 24 | "nix-command" 25 | "flakes" 26 | "pipe-operators" 27 | ]; 28 | auto-optimise-store = true; 29 | http-connections = 50; 30 | warn-dirty = false; 31 | log-lines = 50; 32 | sandbox = "relaxed"; 33 | trusted-users = [ 34 | "${username}" 35 | "mateus" 36 | "sonja" 37 | ]; 38 | substituters = [ 39 | "https://hyprland.cachix.org" 40 | "https://nix-community.cachix.org" 41 | "https://cache.nixos.org" 42 | ]; 43 | trusted-substituters = [ "https://hyprland.cachix.org" ]; 44 | trusted-public-keys = [ 45 | "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" 46 | "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" 47 | "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" 48 | ]; 49 | }; 50 | gc = { 51 | automatic = false; 52 | dates = "weekly"; 53 | options = "--delete-older-than 7d"; 54 | }; 55 | distributedBuilds = false; 56 | buildMachines = [ 57 | { 58 | hostName = "raspberry"; 59 | sshUser = "redyf"; 60 | sshKey = "${homeDirectory}/.ssh/id_ed25519"; 61 | systems = [ "aarch64-linux" ]; 62 | protocol = "ssh-ng"; 63 | maxJobs = 1; 64 | speedFactor = 1; 65 | supportedFeatures = [ 66 | "nixos-test" 67 | "benchmark" 68 | "big-parallel" 69 | "kvm" 70 | ]; 71 | } 72 | ]; 73 | }; 74 | }; 75 | } 76 | -------------------------------------------------------------------------------- /modules/programs/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | options.myConfig.programs = { 5 | enable = lib.mkEnableOption "Enable programs configuration"; 6 | 7 | hyprland = { 8 | enable = lib.mkEnableOption "Enable Hyprland"; 9 | }; 10 | 11 | k3s = { 12 | enable = lib.mkEnableOption "Enable K3s"; 13 | }; 14 | 15 | nh = { 16 | enable = lib.mkEnableOption "Enable NH"; 17 | }; 18 | 19 | zsh = { 20 | enable = lib.mkEnableOption "Enable Zsh"; 21 | }; 22 | }; 23 | 24 | imports = [ 25 | ./hyprland.nix 26 | ./zsh.nix 27 | ./k3s.nix 28 | ./nh.nix 29 | ]; 30 | } 31 | -------------------------------------------------------------------------------- /modules/programs/hyprland.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs, 3 | config, 4 | pkgs, 5 | lib, 6 | ... 7 | }: 8 | 9 | let 10 | cfg = config.myConfig.programs.hyprland; 11 | in 12 | { 13 | config = lib.mkIf (config.myConfig.programs.enable && cfg.enable) { 14 | programs.hyprland = { 15 | enable = true; 16 | package = inputs.hyprland.packages.${pkgs.system}.hyprland; 17 | portalPackage = with pkgs; xdg-desktop-portal-hyprland; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/programs/k3s.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.programs.k3s; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.programs.enable && cfg.enable) { 12 | services.k3s = { 13 | enable = true; 14 | }; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /modules/programs/nh.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | homeDirectory, 4 | lib, 5 | ... 6 | }: 7 | 8 | let 9 | cfg = config.myConfig.programs.nh; 10 | in 11 | { 12 | config = lib.mkIf (config.myConfig.programs.enable && cfg.enable) { 13 | programs.nh = { 14 | enable = true; 15 | clean = { 16 | enable = true; 17 | extraArgs = "--keep-since 4d --keep 3"; 18 | }; 19 | flake = "${homeDirectory}/opensource/nixdots"; 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /modules/programs/zsh.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.programs.zsh; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.programs.enable && cfg.enable) { 12 | programs.zsh = { 13 | enable = true; 14 | }; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /modules/services/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | options.myConfig.services = { 5 | enable = lib.mkEnableOption "Enable Services configuration"; 6 | 7 | services = { 8 | enable = lib.mkEnableOption "Enable services "; 9 | }; 10 | 11 | xserver = { 12 | enable = lib.mkEnableOption "Enable services "; 13 | }; 14 | }; 15 | 16 | imports = [ 17 | ./services.nix 18 | ./xserver.nix 19 | ]; 20 | } 21 | -------------------------------------------------------------------------------- /modules/services/services.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | let 9 | cfg = config.myConfig.services.services; 10 | in 11 | { 12 | config = lib.mkIf (config.myConfig.services.enable && cfg.enable) { 13 | # TODO: Split into multiple modules 14 | services = { 15 | fstrim.enable = true; 16 | gnome.gnome-keyring.enable = true; 17 | libinput = { 18 | enable = true; 19 | mouse = { 20 | accelProfile = "flat"; 21 | }; 22 | touchpad = { 23 | accelProfile = "flat"; 24 | }; 25 | }; 26 | displayManager = 27 | if pkgs.stdenv.isx86_64 then 28 | { 29 | enable = true; 30 | ly.enable = true; 31 | } 32 | else 33 | { enable = false; }; 34 | autorandr = { 35 | enable = true; 36 | profiles = { 37 | redyf = { 38 | config = { 39 | DP-0 = { 40 | enable = true; 41 | primary = true; 42 | mode = "1920x1080"; 43 | rate = "165.00"; 44 | position = "0x0"; 45 | }; 46 | }; 47 | }; 48 | }; 49 | }; 50 | }; 51 | }; 52 | } 53 | -------------------------------------------------------------------------------- /modules/services/xserver.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.services.xserver; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.services.enable && cfg.enable) { 12 | services = { 13 | xserver = { 14 | enable = true; 15 | windowManager = { 16 | awesome.enable = true; 17 | }; 18 | displayManager = { 19 | sessionCommands = '' 20 | xset r rate 140 30 21 | xrandr --output DP-0 --mode 1920x1080 --rate 165 --primary 22 | nitrogen --restore 23 | ''; 24 | }; 25 | xkb = { 26 | variant = ""; 27 | layout = "br"; 28 | }; 29 | }; 30 | }; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /modules/system/audio.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.system.audio; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.system.enable && cfg.enable) { 12 | services = { 13 | pipewire = { 14 | enable = true; 15 | alsa = { 16 | enable = true; 17 | support32Bit = true; 18 | }; 19 | wireplumber.enable = true; 20 | jack.enable = false; 21 | pulse.enable = true; 22 | audio.enable = true; 23 | }; 24 | }; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /modules/system/boot.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | config, 4 | lib, 5 | ... 6 | }: 7 | 8 | let 9 | cfg = config.myConfig.system.boot; 10 | in 11 | { 12 | config = lib.mkIf (config.myConfig.system.enable && cfg.enable) { 13 | boot = { 14 | kernelModules = [ "v4l2loopback" ]; # Autostart kernel modules on boot 15 | extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; # loopback module to make OBS virtual camera work 16 | kernelParams = [ "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ]; 17 | supportedFilesystems = [ "ntfs" ]; 18 | loader = { 19 | systemd-boot = { 20 | enable = lib.mkForce false; 21 | # https://github.com/NixOS/nixpkgs/blob/c32c39d6f3b1fe6514598fa40ad2cf9ce22c3fb7/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix#L66 22 | editor = false; 23 | configurationLimit = 10; 24 | # extraEntries = { 25 | # "windows.conf" = '' 26 | # title Windows 10 27 | # efi /EFI/Microsoft/Boot/bootmgfw.efi 28 | # ''; 29 | # }; 30 | }; 31 | timeout = 10; 32 | efi = { 33 | canTouchEfiVariables = true; 34 | efiSysMountPoint = "/boot"; 35 | }; 36 | grub = { 37 | enable = false; 38 | # device = "nodev"; 39 | # efiSupport = true; 40 | # useOSProber = true; 41 | # configurationLimit = 10; 42 | # theme = pkgs.fetchFromGitHub { 43 | # owner = "Lxtharia"; 44 | # repo = "minegrub-theme"; 45 | # rev = "193b3a7c3d432f8c6af10adfb465b781091f56b3"; 46 | # sha256 = "1bvkfmjzbk7pfisvmyw5gjmcqj9dab7gwd5nmvi8gs4vk72bl2ap"; 47 | # }; 48 | }; 49 | }; 50 | lanzaboote = { 51 | enable = true; 52 | pkiBundle = "/var/lib/sbctl"; 53 | }; 54 | }; 55 | environment.systemPackages = [ 56 | pkgs.sbctl 57 | ]; 58 | }; 59 | } 60 | -------------------------------------------------------------------------------- /modules/system/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | options.myConfig.system = { 5 | enable = lib.mkEnableOption "Enable programs configuration"; 6 | 7 | audio = { 8 | enable = lib.mkEnableOption "Enable audio"; 9 | }; 10 | 11 | boot = { 12 | enable = lib.mkEnableOption "Enable boot"; 13 | }; 14 | 15 | environment = { 16 | enable = lib.mkEnableOption "Enable environment"; 17 | }; 18 | 19 | hardware = { 20 | enable = lib.mkEnableOption "Enable hardware"; 21 | }; 22 | 23 | keymap = { 24 | enable = lib.mkEnableOption "Enable keymap"; 25 | }; 26 | 27 | locale = { 28 | enable = lib.mkEnableOption "Enable locale"; 29 | }; 30 | 31 | networking = { 32 | enable = lib.mkEnableOption "Enable networking"; 33 | }; 34 | 35 | security = { 36 | enable = lib.mkEnableOption "Enable security"; 37 | }; 38 | 39 | ssh = { 40 | enable = lib.mkEnableOption "Enable ssh"; 41 | }; 42 | 43 | systemd = { 44 | enable = lib.mkEnableOption "Enable systemd"; 45 | }; 46 | 47 | time = { 48 | enable = lib.mkEnableOption "Enable time"; 49 | }; 50 | 51 | xdg-portal = { 52 | enable = lib.mkEnableOption "Enable xdg-portal"; 53 | }; 54 | 55 | zram = { 56 | enable = lib.mkEnableOption "Enable zram"; 57 | }; 58 | }; 59 | 60 | imports = [ 61 | ./audio.nix 62 | ./boot.nix 63 | ./environment.nix 64 | ./hardware.nix 65 | ./keymap.nix 66 | ./locale.nix 67 | ./networking.nix 68 | ./security.nix 69 | ./ssh.nix 70 | ./systemd.nix 71 | ./time.nix 72 | ./xdg-portal.nix 73 | ./zram.nix 74 | ]; 75 | } 76 | -------------------------------------------------------------------------------- /modules/system/environment.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs, 3 | pkgs, 4 | config, 5 | lib, 6 | ... 7 | }: 8 | 9 | let 10 | cfg = config.myConfig.system.environment; 11 | in 12 | { 13 | config = lib.mkIf (config.myConfig.system.enable && cfg.enable) { 14 | environment = { 15 | variables = { 16 | EDITOR = "nvim"; 17 | XDG_SESSION_TYPE = "wayland"; 18 | QT_AUTO_SCREEN_SCALE_FACTOR = "1"; 19 | QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; 20 | # Add java to path 21 | # JAVA_HOME = "${pkgs.jdk23_headless.home}/lib/openjdk"; 22 | }; 23 | sessionVariables = { 24 | NIXOS_OZONE_WL = "1"; # Hint electron apps to use wayland 25 | DEFAULT_BROWSER = "${inputs.zen-browser.packages."${pkgs.system}".twilight}/bin/zen"; 26 | }; 27 | }; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /modules/system/hardware.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.system.hardware; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.system.enable && cfg.enable) { 12 | hardware = { 13 | graphics = { 14 | enable = true; 15 | enable32Bit = true; 16 | }; 17 | }; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/system/keymap.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.system.keymap; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.system.enable && cfg.enable) { 12 | # Configure console keymap 13 | console = { 14 | keyMap = "br-abnt2"; 15 | }; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /modules/system/locale.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.system.locale; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.system.enable && cfg.enable) { 12 | i18n = { 13 | defaultLocale = "pt_BR.UTF-8"; 14 | extraLocaleSettings = { 15 | LC_ADDRESS = "pt_BR.UTF-8"; 16 | LC_IDENTIFICATION = "pt_BR.UTF-8"; 17 | LC_MEASUREMENT = "pt_BR.UTF-8"; 18 | LC_MONETARY = "pt_BR.UTF-8"; 19 | LC_NAME = "pt_BR.UTF-8"; 20 | LC_NUMERIC = "pt_BR.UTF-8"; 21 | LC_PAPER = "pt_BR.UTF-8"; 22 | LC_TELEPHONE = "pt_BR.UTF-8"; 23 | LC_TIME = "pt_BR.UTF-8"; 24 | }; 25 | }; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /modules/system/networking.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.system.networking; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.system.enable && cfg.enable) { 12 | networking = { 13 | networkmanager.enable = true; 14 | firewall.enable = true; 15 | enableIPv6 = false; 16 | # no need to wait interfaces to have an IP to continue booting 17 | dhcpcd.wait = "background"; 18 | # avoid checking if IP is already taken to boot a few seconds faster 19 | dhcpcd.extraConfig = "noarp"; 20 | # wireless.enable = true; # Enables wireless support via wpa_supplicant. 21 | # Configure network proxy if necessary 22 | # proxy.default = "http://user:password@proxy:port/"; 23 | # proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 24 | }; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /modules/system/security.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.system.security; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.system.enable && cfg.enable) { 12 | security = { 13 | sudo = { 14 | enable = true; 15 | }; 16 | polkit.enable = true; 17 | }; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /modules/system/ssh.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.system.ssh; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.system.enable && cfg.enable) { 12 | programs = { 13 | ssh = { 14 | startAgent = true; 15 | }; 16 | }; 17 | services = { 18 | openssh = { 19 | enable = true; 20 | settings.PermitRootLogin = "yes"; 21 | }; 22 | }; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /modules/system/systemd.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.system.systemd; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.system.enable && cfg.enable) { 12 | # Change systemd stop job timeout in NixOS configuration (Default = 90s) 13 | systemd = { 14 | services.NetworkManager-wait-online.enable = false; 15 | extraConfig = '' 16 | DefaultTimeoutStopSec=10s 17 | ''; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/system/time.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.system.time; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.system.enable && cfg.enable) { 12 | time.timeZone = "America/Bahia"; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /modules/system/xdg-portal.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | let 9 | cfg = config.myConfig.system.xdg-portal; 10 | in 11 | { 12 | config = lib.mkIf (config.myConfig.system.enable && cfg.enable) { 13 | xdg.portal = { 14 | enable = true; 15 | extraPortals = [ 16 | pkgs.xdg-desktop-portal-wlr 17 | ]; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/system/zram.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.system.zram; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.system.enable && cfg.enable) { 12 | zramSwap = { 13 | enable = true; 14 | memoryPercent = 50; 15 | }; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /modules/themes/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | options.myConfig.themes = { 5 | enable = lib.mkEnableOption "Enable Themes configuration"; 6 | 7 | stylix = { 8 | enable = lib.mkEnableOption "Enable stylix "; 9 | }; 10 | }; 11 | 12 | imports = [ 13 | ./stylix.nix 14 | ]; 15 | } 16 | -------------------------------------------------------------------------------- /modules/themes/stylix.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs, 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | let 10 | cfg = config.myConfig.themes.stylix; 11 | themes = { 12 | catppuccin-mocha = "catppuccin-mocha"; 13 | oxocarbon-dark = "oxocarbon-dark"; 14 | tokyo-night-moon = "tokyo-night-moon"; 15 | tokyo-night-dark = "tokyo-night-dark"; 16 | tokyo-night-storm = "tokyo-night-storm"; 17 | }; 18 | # Check if the font-flake input exists in the Flake context 19 | hasFontRepoAccess = builtins.hasAttr "font-flake" inputs && inputs.font-flake ? packages; 20 | in 21 | { 22 | config = lib.mkIf (config.myConfig.themes.enable && cfg.enable) { 23 | stylix = { 24 | enable = true; 25 | autoEnable = true; 26 | base16Scheme = "${pkgs.base16-schemes}/share/themes/${themes.catppuccin-mocha}.yaml"; 27 | cursor = { 28 | name = "macOS"; 29 | package = pkgs.apple-cursor; 30 | size = 36; 31 | }; 32 | fonts = { 33 | monospace = 34 | if hasFontRepoAccess then 35 | { 36 | # package = inputs.font-flake.packages.${pkgs.system}.berkeley; 37 | # name = "TX-02"; 38 | package = pkgs.maple-mono.NF; 39 | name = "Maple Mono Nerd Font"; 40 | } 41 | else 42 | { 43 | package = pkgs.nerd-fonts.jetbrains-mono; 44 | name = "JetBrainsMono Nerd Font"; 45 | }; 46 | sansSerif = { 47 | package = pkgs.dejavu_fonts; 48 | name = "DejaVu Sans"; 49 | }; 50 | serif = { 51 | package = pkgs.dejavu_fonts; 52 | name = "DejaVu Serif"; 53 | }; 54 | sizes = { 55 | applications = 11; 56 | terminal = 12; 57 | desktop = 11; 58 | popups = 11; 59 | }; 60 | }; 61 | opacity = { 62 | applications = 1.0; 63 | terminal = 0.95; 64 | desktop = 1.0; 65 | popups = 1.0; 66 | }; 67 | polarity = "dark"; 68 | targets = { 69 | grub.enable = false; 70 | gnome.enable = false; 71 | gtk.enable = true; 72 | nixos-icons.enable = true; 73 | }; 74 | }; 75 | }; 76 | } 77 | -------------------------------------------------------------------------------- /modules/users/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | # options.myConfig.users = { 5 | # enable = lib.mkEnableOption "Enable users configuration"; 6 | # 7 | # groups = { 8 | # enable = lib.mkEnableOption "Enable groups"; 9 | # }; 10 | # }; 11 | imports = [ 12 | ./groups.nix 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /modules/users/groups.nix: -------------------------------------------------------------------------------- 1 | # modules/users/groups.nix 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | let 10 | cfg = config.myConfig.users; 11 | in 12 | { 13 | options.myConfig.users = { 14 | enable = lib.mkEnableOption "Enable user configuration"; 15 | 16 | username = lib.mkOption { 17 | type = lib.types.str; 18 | description = "Primary username for the system"; 19 | default = "redyf"; # Your default username 20 | }; 21 | 22 | initialPassword = lib.mkOption { 23 | type = lib.types.str; 24 | description = "Initial password for the user"; 25 | default = "123456"; 26 | }; 27 | 28 | description = lib.mkOption { 29 | type = lib.types.str; 30 | description = "User description/full name"; 31 | default = ""; # Will default to username if empty 32 | }; 33 | 34 | isNormalUser = lib.mkOption { 35 | type = lib.types.bool; 36 | description = "Whether this is a normal user account"; 37 | default = true; 38 | }; 39 | 40 | shell = lib.mkOption { 41 | type = lib.types.package; 42 | description = "The user's shell"; 43 | default = pkgs.zsh; 44 | example = "pkgs.bash"; 45 | }; 46 | 47 | groups = { 48 | base = lib.mkOption { 49 | type = lib.types.listOf lib.types.str; 50 | description = "Base groups every user belongs to"; 51 | default = [ 52 | "networkmanager" 53 | "wheel" 54 | ]; 55 | }; 56 | 57 | development = lib.mkEnableOption "Enable development groups"; 58 | virtualisation = lib.mkEnableOption "Enable virtualisation groups"; 59 | media = lib.mkEnableOption "Enable media groups"; 60 | input = lib.mkEnableOption "Enable input groups"; 61 | 62 | additional = lib.mkOption { 63 | type = lib.types.listOf lib.types.str; 64 | description = "Additional groups not covered by other options"; 65 | default = [ ]; 66 | example = [ 67 | "wireshark" 68 | "cdrom" 69 | ]; 70 | }; 71 | }; 72 | }; 73 | 74 | config = lib.mkIf cfg.enable { 75 | users.users.${cfg.username} = { 76 | isNormalUser = cfg.isNormalUser; 77 | description = if cfg.description != "" then cfg.description else cfg.username; 78 | initialPassword = cfg.initialPassword; 79 | shell = cfg.shell; 80 | extraGroups = 81 | cfg.groups.base 82 | ++ (lib.optionals cfg.groups.development [ 83 | "dialout" 84 | "plugdev" 85 | ]) 86 | ++ (lib.optionals cfg.groups.virtualisation [ 87 | "docker" 88 | "kvm" 89 | "libvirtd" 90 | ]) 91 | ++ (lib.optionals cfg.groups.media [ 92 | "audio" 93 | "video" 94 | ]) 95 | ++ (lib.optionals cfg.groups.input [ "input" ]) 96 | ++ cfg.groups.additional; 97 | }; 98 | }; 99 | } 100 | -------------------------------------------------------------------------------- /modules/virtualization/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | 3 | { 4 | options.myConfig.virtualization = { 5 | enable = lib.mkEnableOption "Enable virtualization configuration"; 6 | 7 | docker = { 8 | enable = lib.mkEnableOption "Enable Docker"; 9 | }; 10 | }; 11 | imports = [ 12 | ./docker.nix 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /modules/virtualization/docker.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | ... 5 | }: 6 | 7 | let 8 | cfg = config.myConfig.virtualization.docker; 9 | in 10 | { 11 | config = lib.mkIf (config.myConfig.virtualization.enable && cfg.enable) { 12 | virtualisation = { 13 | docker = { 14 | enable = true; 15 | autoPrune.enable = true; 16 | # rootless = { 17 | # enable = true; 18 | # setSocketVariable = true; 19 | # }; 20 | }; 21 | }; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /pkgs/apidog.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | fetchzip, 4 | appimageTools, 5 | makeWrapper, 6 | imagemagick, 7 | lib, 8 | ... 9 | }: 10 | let 11 | pname = "apidog"; 12 | version = "2.6.30"; 13 | name = "${pname}-${version}"; 14 | 15 | zipFile = fetchzip { 16 | url = "https://web.archive.org/web/20241114142057if_/https://file-assets.apidog.com/download/Apidog-linux-latest.zip"; 17 | sha256 = "sha256-tkGL4+Ol/9H92vemJIe5riyg+l6mGHWK5q5Mz6gK5no="; 18 | stripRoot = false; 19 | }; 20 | 21 | # Extract AppImage to a new derivation 22 | src = pkgs.runCommand "apidog-appimage" { } '' 23 | cp ${zipFile}/Apidog.AppImage $out 24 | chmod +x $out 25 | ''; 26 | 27 | appimageContents = pkgs.appimageTools.extractType2 { inherit name src; }; 28 | in 29 | appimageTools.wrapType2 rec { 30 | inherit name; 31 | inherit src; 32 | 33 | extraInstallCommands = '' 34 | mv $out/bin/${name} $out/bin/${pname} 35 | source "${makeWrapper}/nix-support/setup-hook" 36 | wrapProgram $out/bin/${pname} \ 37 | --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --use-gl=desktop}}" 38 | 39 | # Install desktop file 40 | if [ -f ${appimageContents}/apidog.desktop ]; then 41 | install -m 444 -D ${appimageContents}/apidog.desktop $out/share/applications/${pname}.desktop 42 | substituteInPlace $out/share/applications/${pname}.desktop \ 43 | --replace 'Exec=Apidog' 'Exec=${pname}' 44 | else 45 | echo "[Desktop Entry] 46 | Type=Application 47 | Name=Apidog 48 | Exec=${pname} 49 | Icon=${pname} 50 | Categories=Development;Utility; 51 | " > $out/share/applications/${pname}.desktop 52 | fi 53 | 54 | # Install icon, generate a custom fallback if needed 55 | if [ -f ${appimageContents}/apidog.png ]; then 56 | ${imagemagick}/bin/magick ${appimageContents}/apidog.png -resize 512x512 ${pname}_512.png 57 | install -m 444 -D ${pname}_512.png $out/share/icons/hicolor/512x512/apps/${pname}.png 58 | else 59 | echo "Generating fallback icon..." 60 | mkdir -p $out/share/icons/hicolor/512x512/apps/ 61 | ${imagemagick}/bin/convert -size 512x512 xc:white \ 62 | -gravity center -fill black -pointsize 72 \ 63 | -annotate +0+0 "Apidog" \ 64 | $out/share/icons/hicolor/512x512/apps/${pname}.png 65 | fi 66 | ''; 67 | 68 | meta = { 69 | description = "Platform for building, testing, and documenting APIs"; 70 | homepage = "https://apidog.com/"; 71 | platforms = [ "x86_64-linux" ]; 72 | sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; 73 | license = lib.licenses.unfree; 74 | mainProgram = "apidog"; 75 | }; 76 | } 77 | -------------------------------------------------------------------------------- /pkgs/artixlauncher.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | makeWrapper, 4 | ... 5 | }: 6 | let 7 | pname = "ArtixGamesLauncher"; 8 | version = "2.1.2"; 9 | logo = "ArtixLogo"; 10 | 11 | src = pkgs.fetchurl { 12 | url = "https://launch.artix.com/latest/Artix_Games_Launcher-x86_64.AppImage"; 13 | hash = "sha256-8eVXOm5g92wErWa6lbTXrCL04MWYlObjonHJk+oUI3E="; 14 | }; 15 | 16 | appimageContents = pkgs.appimageTools.extractType2 { 17 | inherit 18 | pname 19 | version 20 | src 21 | logo 22 | ; 23 | }; 24 | in 25 | pkgs.appimageTools.wrapType2 rec { 26 | inherit 27 | pname 28 | version 29 | src 30 | logo 31 | ; 32 | 33 | extraInstallCommands = '' 34 | source "${makeWrapper}/nix-support/setup-hook" 35 | 36 | wrapProgram $out/bin/${pname} \ 37 | --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --use-gl=desktop}}" 38 | 39 | install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications/ 40 | 41 | # Directly use ArtixLogo.png without conversion 42 | install -m 444 -D ${appimageContents}/${logo}.png $out/share/icons/hicolor/512x512/apps/${pname}.png 43 | 44 | substituteInPlace $out/share/applications/${pname}.desktop \ 45 | --replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname} %U' 46 | ''; 47 | 48 | meta = { 49 | homepage = "https://www.artix.com/"; 50 | description = "One app. All your favorite Artix games."; 51 | platforms = [ "x86_64-linux" ]; 52 | }; 53 | } 54 | -------------------------------------------------------------------------------- /pkgs/real-vnc-viewer.nix: -------------------------------------------------------------------------------- 1 | { 2 | stdenv, 3 | fetchurl, 4 | xorg, 5 | patchelf, 6 | makeWrapper, 7 | ... 8 | }: 9 | # Stolen from https://github.com/HanStolpo/nixos-config-public/blob/master/overlays/realvnc-viewer/realvnc-viewer.nix 10 | stdenv.mkDerivation { 11 | name = "realvnc-viewer"; 12 | src = 13 | if stdenv.isAarch64 14 | then 15 | fetchurl 16 | { 17 | url = "https://downloads.realvnc.com/download/file/viewer.files/VNC-Viewer-7.12.0-Linux-ARM64"; 18 | sha256 = "sha256-r/eDIwIrAO/0vyGE/zloJG/sA7tqotJQCkXtpnoO1WE="; 19 | } 20 | else 21 | stdenv.stdenv.isx86_64 { 22 | url = "https://downloads.realvnc.com/download/file/viewer.files/VNC-Viewer-7.12.0-Linux-x64"; 23 | sha256 = "sha256-mFWdM6kYO0LZxF0vsEn4LRBj2hgzgvUqiWDEzMfwBzE="; 24 | }; 25 | dontUnpack = true; 26 | buildInputs = [xorg.libX11 xorg.libXext xorg.libSM xorg.libICE patchelf makeWrapper]; 27 | buildPhase = '' 28 | export INTERPRETER=$(cat $NIX_CC/nix-support/dynamic-linker) 29 | echo "INTERPRETER=$INTERPRETER" 30 | cp $src realvnc-viewer 31 | chmod +wx realvnc-viewer 32 | echo "patching interpreter" 33 | patchelf --set-interpreter \ 34 | "$INTERPRETER" \ 35 | realvnc-viewer 36 | ''; 37 | installPhase = '' 38 | echo "making output directory" 39 | mkdir -p $out/bin 40 | echo "copying to output" 41 | cp realvnc-viewer $out/bin 42 | echo "wrapping program" 43 | wrapProgram $out/bin/realvnc-viewer \ 44 | --set LD_LIBRARY_PATH "${xorg.libX11}/lib:${xorg.libXext}/lib:${xorg.libSM}/lib:${xorg.libICE}/lib" 45 | ''; 46 | } 47 | --------------------------------------------------------------------------------