├── .github └── workflows │ ├── ci.yaml │ └── lock.yaml ├── .gitignore ├── LICENSE ├── README.md ├── configuration.nix ├── darwin ├── aerospace.nix ├── default.nix ├── homebrew.nix ├── skhd.nix └── yabai.nix ├── derivations ├── binary-ninja │ └── default.nix ├── material-symbols │ └── default.nix └── shutdown-script │ └── default.nix ├── flake.lock ├── flake.nix ├── home ├── ags │ ├── ags │ │ └── .gitignore │ └── default.nix ├── anki │ └── default.nix ├── anyrun │ └── default.nix ├── binary-ninja │ └── default.nix ├── cli-tools │ ├── default.nix │ └── rice.nix ├── development │ ├── common-lisp.nix │ ├── darwin.nix │ ├── default.nix │ └── graphs.nix ├── dunst │ └── default.nix ├── editors │ ├── emacs │ │ ├── default.nix │ │ └── emacs │ │ │ ├── meow.el │ │ │ └── tokyonight.el │ ├── helix │ │ └── default.nix │ ├── kakoune │ │ └── default.nix │ ├── language-servers │ │ └── default.nix │ └── neovim │ │ ├── default.nix │ │ └── nvim │ │ ├── init.lua │ │ └── lua │ │ ├── completion.lua │ │ ├── indent.lua │ │ ├── init_bl.lua │ │ ├── init_ctx.lua │ │ ├── init_gi.lua │ │ ├── init_icons.lua │ │ ├── init_ll.lua │ │ ├── init_lsp.lua │ │ ├── init_sh.lua │ │ └── init_ts.lua ├── email │ └── default.nix ├── eww │ ├── default.nix │ ├── eww │ │ ├── eww.scss │ │ ├── eww.yuck │ │ ├── modules │ │ │ ├── batinfo.yuck │ │ │ ├── brightness.yuck │ │ │ ├── cpuinfo.yuck │ │ │ ├── date.yuck │ │ │ ├── diskinfo.yuck │ │ │ ├── meminfo.yuck │ │ │ ├── network.yuck │ │ │ ├── status.yuck │ │ │ ├── time.yuck │ │ │ └── volume.yuck │ │ ├── scripts │ │ │ └── workspaces.sh │ │ ├── status-three.yuck │ │ └── status-two.yuck │ └── new_eww_hypr │ │ ├── eww.scss │ │ ├── eww.yuck │ │ ├── modules │ │ └── network │ │ │ ├── network.scss │ │ │ └── network.yuck │ │ ├── style │ │ ├── _colors.scss │ │ └── _fonts.scss │ │ └── widgets │ │ └── .gitkeep ├── flatpak │ └── default.nix ├── fuzzel │ └── default.nix ├── ghostty │ └── default.nix ├── gtk-theme │ └── default.nix ├── guix │ └── default.nix ├── jerry │ └── default.nix ├── jj │ └── default.nix ├── kitty │ └── default.nix ├── lazygit │ └── default.nix ├── newsboat │ └── default.nix ├── nyxt │ └── default.nix ├── obs │ └── default.nix ├── pwn │ └── default.nix ├── seto │ └── default.nix ├── shells │ ├── elvish │ │ └── default.nix │ ├── schemesh │ │ └── default.nix │ ├── zellij │ │ └── default.nix │ └── zsh │ │ ├── default.nix │ │ ├── oh-my-posh │ │ ├── tokyonight_ascii.opm.json │ │ └── tokyonight_ascii_nu.opm.json │ │ └── tokyonight_storm.tmTheme ├── spicetify │ └── default.nix ├── spotify-player │ └── default.nix ├── spotify │ └── default.nix ├── stylix │ └── default.nix ├── user-apps │ ├── darwin.nix │ └── default.nix ├── virtual │ └── default.nix ├── wayland │ ├── default.nix │ ├── hyprland │ │ ├── binds.nix │ │ ├── default.nix │ │ └── settings.nix │ └── river │ │ ├── default.nix │ │ ├── init │ │ └── tools.nix ├── wezterm │ └── default.nix ├── work-specific │ └── default.nix └── x11 │ ├── default.nix │ └── picom.nix ├── images ├── background.png ├── background0.jpg ├── background1.jpg ├── background2.png ├── background3.png └── background4.png ├── lib ├── mkdarwin.nix └── mknixos.nix ├── machines ├── battlestation │ └── default.nix ├── combustible │ └── default.nix ├── loqius │ └── default.nix ├── plutonium │ └── default.nix ├── radium │ └── default.nix ├── serotonine │ └── default.nix └── vocatius │ └── default.nix ├── modules ├── arcan │ └── default.nix ├── boot │ ├── default.nix │ └── lanzaboote.nix ├── cachix │ └── default.nix ├── common │ └── default.nix ├── distcc │ └── default.nix ├── experimental │ └── guix.nix ├── font │ └── default.nix ├── greetd │ └── default.nix ├── libvirtd │ └── default.nix ├── ly │ └── default.nix ├── mullvad │ └── default.nix ├── nvidia │ └── default.nix ├── sddm │ └── default.nix ├── sound │ └── default.nix ├── ssh │ └── default.nix ├── steam │ └── default.nix ├── stylix │ └── default.nix ├── time │ └── default.nix ├── user │ └── default.nix ├── variables │ └── default.nix ├── waydroid │ └── default.nix ├── wayland │ └── default.nix ├── wireguard │ └── default.nix └── x11 │ ├── default.nix │ └── xmonad.hs ├── profiles ├── dev │ └── default.nix ├── dreamer │ └── default.nix ├── lemon │ └── default.nix ├── nightmare │ └── default.nix └── spectre │ └── default.nix ├── scripts └── shutdown.ros └── template └── pwninit.py /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- 1 | name: nix flake check 2 | on: 3 | push: 4 | branches: 5 | - main 6 | pull_request: 7 | branches: 8 | - main 9 | check_run: 10 | types: [completed] 11 | 12 | jobs: 13 | check: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4 17 | - uses: cachix/install-nix-action@v27 18 | with: 19 | github_access_token: ${{ secrets.GITHUB_TOKEN }} 20 | - run: nix flake check 21 | -------------------------------------------------------------------------------- /.github/workflows/lock.yaml: -------------------------------------------------------------------------------- 1 | name: update-flake-lock 2 | on: 3 | workflow_dispatch: # allows manual triggering 4 | schedule: 5 | - cron: '0 0 * * 0' # runs weekly on Sunday at 00:00 6 | 7 | jobs: 8 | lockfile: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Checkout repository 12 | uses: actions/checkout@v4 13 | - name: Install Nix 14 | uses: DeterminateSystems/nix-installer-action@main 15 | - name: Update flake.lock 16 | uses: DeterminateSystems/update-flake-lock@main 17 | with: 18 | pr-title: "chore: Update flake.lock" # Title of PR to be created 19 | pr-labels: | # Labels to be set on the PR 20 | dependencies 21 | automated 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | result 2 | .DS_Store 3 | *.zip 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Sora 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # My NixOS Configuration 2 | A collection of my (hopefully) growing NixOS Config 3 | 4 | Shoutout to: 5 | - [@CRTified](https://github.com/crtified) for introducing me to it :) 6 | 7 | - [Wil T](https://www.youtube.com/channel/UCLsaznoh7qsE8sc3XQurubw) as he posts a lot of helpfule videos about Nix(OS) and also is essentially 8 | the reason i could write this tutorial. 9 | 10 | ## Installation from Live-CD 11 | Since my brain is very wonky, i rather want to type this down so that in the case, 12 | when i actually want to swap permanently to Linux (from Windows) i am able to reproduce my full system. 13 | 14 | ### Step 1: Partition drives. 15 | 16 | I would do it the following way: 17 | 18 | Set-up the main (boot) partition as GPT (EFI) which has 2 partitions as follows: 19 | 20 | `/dev/sda1` as boot drive which is +~ 200M in size and formatted as `FAT32` 21 | `/dev/sda2` as 'rest' drive, formatted as `ext4` 22 | 23 | Hint: using `lsblk` shows your connected drives. 24 | 25 | To do this, i preferr using `fdisk`. 26 | 27 | ### Step 2: Formatting 28 | 29 | Simple enough, there is an easy formular to do that: 30 | 31 | ```sh 32 | sudo mkfs.fat -F 32 /dev/sda1 33 | sudo fatlabel /dev/sda1 NIXBOOT 34 | sudo mkfs.ext4 /dev/sda2 -L NIXMAIN 35 | ``` 36 | 37 | The names are as simply described within /nixos-config/nixos/hardware-configuration.nix 38 | 39 | ### Step 3: Mounting 40 | 41 | Straight forward process. 42 | 43 | ```sh 44 | sudo mount /dev/disk/by-label/NIXMAIN /mnt 45 | sudo mkdir /mnt/boot 46 | sudo mount /dev/disk/by-label/NIXBOOT /mnt/boot 47 | ``` 48 | 49 | ### Step 4: Swapfile 50 | 51 | Also very easy to understand, a swapfile is essentially 'extended memory' where the CPU can use the size of the 52 | swapfile as extra Memory once its space runs out. 53 | 54 | ```sh 55 | sudo dd if=/dev/zero of=/mnt/.swapfile bs=1024 count=2097152 56 | sudo chmod 600 /mnt/.swapfile 57 | sudo mkswap /mnt/.swapfile 58 | ``` 59 | 60 | Now this is a bit more interesting. 61 | 62 | To have a better overview of what the `dd` command does: `if` can be unfolded to 'infile' so what i want to use to write the file with. 63 | `/dev/zero` is just zeros as the name implies. 64 | 65 | `of` is the target 'outfile' 66 | 67 | `bs=1024` is the 'blocksize' 68 | 69 | `count=2097152` is a magic number, esentially blocksize and count will be multiplied together, to get the final size of the swapfile. 70 | Multiplying those numbers together will get you around `2GiB`. 71 | 72 | ### Step 5: Actual configuration 73 | 74 | This process is also straight forward: 75 | 76 | ```sh 77 | sudo nixos-generate-config --root /mnt 78 | ``` 79 | 80 | From here, this repository takes over. 81 | 82 | **However**: Do **NOT** overwrite the `hardware-configuration.nix` but rather use the one in this repository as some kind of template. 83 | 84 | Once everything is done, the fun part begins: 85 | 86 | ```sh 87 | sudo nixos-install 88 | ``` 89 | 90 | And that's essentially it. 91 | 92 | After some time you will most likely be prompted to type in a new `superuser` password, just type in the actual password and that's it for the standard configuration. 93 | 94 | ### Step 6: Home-Manager 95 | 96 | Just add the Home-Manager to your `nix-channel` and let it do the magic. 97 | 98 | ```sh 99 | sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-[your-nixos-version].tar.gz home-manager 100 | sudo nix-channel --update 101 | ``` 102 | 103 | For more information regarding the Home-Manager, [use this Link](https://nix-community.github.io/home-manager/index.html) 104 | 105 | ### Step 7: Flakes 106 | 107 | With the recent changes i adopted my configuration to make use of Nix flakes. 108 | 109 | Keep in mind that flakes can only be used with the `nix flake` feature enabled. 110 | e.g.: 111 | ```nix 112 | { 113 | nix = { 114 | package = pkgs.nixUnstable; 115 | extraOptions = '' 116 | experimental-features = nix-command flakes 117 | ''; 118 | }; 119 | } 120 | ``` 121 | 122 | For now the usage of the flakes is (to install a flake profile): 123 | ```sh 124 | sudo nixos-rebuild switch --flake '.#[profile]' 125 | ``` 126 | 127 | This is however most likely not the final version of it, as hardware information configuration are completely absent for now. 128 | -------------------------------------------------------------------------------- /configuration.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | nix = { 3 | package = pkgs.nixVersions.stable; 4 | optimise.automatic = true; 5 | extraOptions = '' 6 | experimental-features = nix-command flakes 7 | ''; 8 | }; 9 | 10 | programs.zsh.enable = true; 11 | environment.shells = [ pkgs.bashInteractive pkgs.zsh ]; 12 | nixpkgs.config.permittedInsecurePackages = [ 13 | "olm-3.2.16" 14 | ]; 15 | 16 | environment.pathsToLink = [ "/share/zsh" ]; 17 | } 18 | -------------------------------------------------------------------------------- /darwin/aerospace.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | services.aerospace = { 3 | enable = true; 4 | settings = { 5 | enable-normalization-flatten-containers = true; 6 | enable-normalization-opposite-orientation-for-nested-containers = true; 7 | accordion-padding = 0; 8 | default-root-container-layout = "tiles"; 9 | default-root-container-orientation = "auto"; 10 | key-mapping.preset = "qwerty"; 11 | on-focused-monitor-changed = ["move-mouse monitor-lazy-center"]; 12 | 13 | gaps = { 14 | inner.horizontal = 6; 15 | inner.vertical = 6; 16 | outer.left = 6; 17 | outer.bottom = 52; # ubersicht stuff 18 | outer.top = 6; 19 | outer.right = 6; 20 | }; 21 | 22 | mode.main.binding = { 23 | alt-slash = "layout tiles horizontal accordion horizontal"; 24 | 25 | alt-h = "focus left"; 26 | alt-j = "focus down"; 27 | alt-k = "focus up"; 28 | alt-l = "focus right"; 29 | 30 | alt-shift-h = "move left"; 31 | alt-shift-j = "move down"; 32 | alt-shift-k = "move up"; 33 | alt-shift-l = "move right"; 34 | 35 | alt-1 = "workspace 1"; 36 | alt-2 = "workspace 2"; 37 | alt-3 = "workspace 3"; 38 | alt-4 = "workspace 4"; 39 | alt-5 = "workspace 5"; 40 | alt-6 = "workspace 6"; 41 | alt-7 = "workspace 7"; 42 | alt-8 = "workspace 8"; 43 | alt-9 = "workspace 9"; 44 | 45 | alt-shift-1 = "move-node-to-workspace 1"; 46 | alt-shift-2 = "move-node-to-workspace 2"; 47 | alt-shift-3 = "move-node-to-workspace 3"; 48 | alt-shift-4 = "move-node-to-workspace 4"; 49 | alt-shift-5 = "move-node-to-workspace 5"; 50 | alt-shift-6 = "move-node-to-workspace 6"; 51 | alt-shift-7 = "move-node-to-workspace 7"; 52 | alt-shift-8 = "move-node-to-workspace 8"; 53 | alt-shift-9 = "move-node-to-workspace 9"; 54 | 55 | alt-shift-minus = "resize smart -100"; 56 | alt-shift-equal = "resize smart +100"; 57 | alt-shift-tab = "move-workspace-to-monitor --wrap-around next"; 58 | alt-shift-semicolon = "mode service"; 59 | 60 | alt-tab = "workspace-back-and-forth"; 61 | alt-equal = "balance-sizes"; 62 | }; 63 | 64 | mode.service.binding = { 65 | esc = ["reload-config" "mode main"]; 66 | space = ["layout floating tiling" "mode main"]; 67 | }; 68 | 69 | on-window-detected = [ 70 | { 71 | "if".app-name-regex-substring = "notes|finder|messages|system settings"; 72 | run = "layout floating"; 73 | } 74 | { 75 | "if".app-name-regex-substring = "mail|calendar"; 76 | run = "move-node-to-workspace 4"; 77 | } 78 | ]; 79 | }; 80 | }; 81 | } 82 | -------------------------------------------------------------------------------- /darwin/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ 3 | ./homebrew.nix 4 | ./aerospace.nix 5 | # ./yabai.nix 6 | # ./skhd.nix 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /darwin/homebrew.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | homebrew = { 3 | enable = true; 4 | onActivation.cleanup = "zap"; 5 | 6 | casks = [ 7 | "bitwarden" 8 | "docker" 9 | "keycastr" 10 | "linearmouse" 11 | "raycast" 12 | "spotify" 13 | "ubersicht" 14 | "utm" 15 | ]; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /darwin/skhd.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | services.skhd = { 3 | enable = true; 4 | skhdConfig = '' 5 | # opens Ghostty spooky owo 6 | alt - return : open -na ~/Applications/Ghostty.app 7 | 8 | # Navigation 9 | alt - h : yabai -m window --focus west 10 | alt - j : yabai -m window --focus south 11 | alt - k : yabai -m window --focus north 12 | alt - l : yabai -m window --focus east 13 | 14 | # Moving windows 15 | shift + alt - h : yabai -m window --warp west 16 | shift + alt - j : yabai -m window --warp south 17 | shift + alt - k : yabai -m window --warp north 18 | shift + alt - l : yabai -m window --warp east 19 | 20 | # Move focus container to workspace 21 | shift + alt - 1 : yabai -m window --space 1; yabai -m space --focus 1 22 | shift + alt - 2 : yabai -m window --space 2; yabai -m space --focus 2 23 | shift + alt - 3 : yabai -m window --space 3; yabai -m space --focus 3 24 | shift + alt - 4 : yabai -m window --space 4; yabai -m space --focus 4 25 | shift + alt - 5 : yabai -m window --space 5; yabai -m space --focus 5 26 | shift + alt - 6 : yabai -m window --space 6; yabai -m space --focus 6 27 | shift + alt - 7 : yabai -m window --space 7; yabai -m space --focus 7 28 | shift + alt - 8 : yabai -m window --space 8; yabai -m space --focus 8 29 | 30 | # Resize windows 31 | lctrl + alt - h : yabai -m window --resize left:-50:0; \ 32 | yabai -m window --resize right:-50:0 33 | lctrl + alt - j : yabai -m window --resize bottom:0:50; \ 34 | yabai -m window --resize top:0:50 35 | lctrl + alt - k : yabai -m window --resize top:0:-50; \ 36 | yabai -m window --resize bottom:0:-50 37 | lctrl + alt - l : yabai -m window --resize right:50:0; \ 38 | yabai -m window --resize left:50:0 39 | 40 | # Equalize size of windows 41 | lctrl + alt - e : yabai -m space --balance 42 | 43 | # Enable / Disable gaps in current workspace 44 | lctrl + alt - g : yabai -m space --toggle padding; yabai -m space --toggle gap 45 | 46 | # Rotate windows clockwise and anticlockwise 47 | alt - r : yabai -m space --rotate 270 48 | shift + alt - r : yabai -m space --rotate 90 49 | 50 | # Rotate on X and Y Axis 51 | shift + alt - x : yabai -m space --mirror x-axis 52 | shift + alt - y : yabai -m space --mirror y-axis 53 | 54 | # Set insertion point for focused container 55 | shift + lctrl + alt - h : yabai -m window --insert west 56 | shift + lctrl + alt - j : yabai -m window --insert south 57 | shift + lctrl + alt - k : yabai -m window --insert north 58 | shift + lctrl + alt - l : yabai -m window --insert east 59 | 60 | # Float / Unfloat window 61 | shift + alt - space : \ 62 | yabai -m window --toggle float; \ 63 | yabai -m window --toggle border 64 | 65 | # Make window native fullscreen 66 | alt - f : yabai -m window --toggle zoom-fullscreen 67 | shift + alt - f : yabai -m window --toggle native-fullscreen 68 | 69 | # reOrder all windows 70 | shift + alt - o : \ 71 | yabai -m query --windows --display | jq -re '.[] | select(.app=="kitty") | "yabai -m window \(.id) --space 1"' | sh ; \ 72 | yabai -m query --windows --display | jq -re '.[] | select(.app=="Arc") | "yabai -m window \(.id) --space 2"' | sh ; \ 73 | yabai -m query --windows --display | jq -re '.[] | select(.app=="Discord Canary") | "yabai -m window \(.id) --space 3"' | sh ; \ 74 | yabai -m query --windows --display | jq -re '.[] | select(.app=="Mail") | "yabai -m window \(.id) --space 4"' | sh ; \ 75 | yabai -m query --windows --display | jq -re '.[] | select(.app=="Spotify") | "yabai -m window \(.id) --space 5"' | sh 76 | ''; 77 | }; 78 | 79 | system.keyboard.enableKeyMapping = true; 80 | } 81 | -------------------------------------------------------------------------------- /darwin/yabai.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | services.yabai = { 3 | enable = true; 4 | config = { 5 | layout = "bsp"; 6 | auto_balance = "off"; 7 | focus_follows_mouse = "autoraise"; 8 | mouse_follows_focus = "off"; 9 | mouse_modifier = "fn"; 10 | mouse_action1 = "move"; 11 | mouse_action2 = "resize"; 12 | top_padding = "6"; 13 | bottom_padding = "52"; 14 | left_padding = "6"; 15 | right_padding = "6"; 16 | window_gap = "6"; 17 | window_shadow = "float"; 18 | window_topmost = "on"; 19 | active_window_border = "0xff7dcfff"; 20 | normal_window_border = "0xff24283b"; 21 | }; 22 | extraConfig = '' 23 | .blacklist { 24 | "League Of Legends" 25 | } 26 | 27 | yabai -m rule --add title='Settings' manage=off layer=above 28 | yabai -m rule --add title='Preferences' manage=off layer=above 29 | yabai -m rule --add title='^(Opening)' manage=off layer=above 30 | yabai -m rule --add title='Library' manage=off layer=above 31 | yabai -m rule --add app='^System Settings$' manage=off layer=above 32 | yabai -m rule --add app='Activity Monitor' manage=off layer=above 33 | yabai -m rule --add app='Finder' manage=off layer=above 34 | yabai -m rule --add app='^System Information$' manage=off layer=above 35 | ''; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /derivations/binary-ninja/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, glib, libglvnd, xlibs, fontconfig, dbus, autoPatchelfHook, }: 2 | stdenv.mkDerivation { 3 | name = "binary-ninja"; 4 | 5 | src = /home/dreamer/temp/binaryninja.zip; 6 | 7 | installPhase = '' 8 | mkdir -p $out/share/binary-ninja 9 | cp -r * $out/share/binary-ninja 10 | ''; 11 | 12 | nativeBuildInputs = [ autoPatchelfHook ]; 13 | buildInputs = [ 14 | stdenv.cc.cc 15 | glib 16 | fontconfig 17 | dbus 18 | libglvnd 19 | xlibs.libX11 20 | xlibs.libXi 21 | xlibs.libXrender 22 | ]; 23 | } 24 | -------------------------------------------------------------------------------- /derivations/material-symbols/default.nix: -------------------------------------------------------------------------------- 1 | # Props to https://github.com/fufexan/dotfiles 2 | # Change when it is available in nixpkgs 3 | { lib, stdenvNoCC, fetchFromGitHub, util-linux, }: 4 | stdenvNoCC.mkDerivation { 5 | pname = "material-symbols"; 6 | version = "unstable-2023-01-07"; 7 | 8 | src = fetchFromGitHub { 9 | owner = "google"; 10 | repo = "material-design-icons"; 11 | rev = "511eea577b20d2b02ad77477750da1e44c66a52c"; 12 | sha256 = "sha256-ENoWeyV9Dw26pgjy0Xst+qpxJ/mjgfqrY2Du2VwzwCE="; 13 | sparseCheckout = [ "variablefont" ]; 14 | }; 15 | 16 | nativeBuildInputs = [ util-linux ]; 17 | 18 | installPhase = '' 19 | runHook preInstall 20 | 21 | rename '[FILL,GRAD,opsz,wght]' "" variablefont/* 22 | install -Dm755 variablefont/*.ttf -t $out/share/fonts/TTF 23 | install -Dm755 variablefont/*.woff2 -t $out/share/fonts/woff2 24 | 25 | runHook postInstall 26 | ''; 27 | 28 | meta = with lib; { 29 | description = "Material Symbols icons by Google"; 30 | homepage = "https://fonts.google.com/icons"; 31 | license = lib.licenses.asl20; 32 | maintainers = with maintainers; [ fufexan ]; 33 | platforms = platforms.all; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /derivations/shutdown-script/default.nix: -------------------------------------------------------------------------------- 1 | { stdenv, roswell, sbcl, fuzzel }: 2 | stdenv.mkDerivation { 3 | pname = "shutdown-menu"; 4 | version = "0.1"; 5 | 6 | src = ../../scripts/shutdown.ros; 7 | 8 | buildInputs = [ 9 | roswell 10 | sbcl 11 | fuzzel 12 | ]; 13 | 14 | unpackPhase = '' 15 | cp $src shutdown.ros 16 | ''; 17 | 18 | installPhase = '' 19 | mkdir -p $out/bin 20 | cp shutdown.ros $out/bin/shutdown-menu 21 | chmod +x $out/bin/shutdown-menu 22 | ''; 23 | } 24 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "My personal NixOS / Darwin flake."; 3 | 4 | inputs = { 5 | nixos-hardware.url = "github:NixOS/nixos-hardware"; 6 | 7 | nixpkgs-nixos.url = "github:NixOS/nixpkgs/nixos-unstable"; 8 | nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 9 | 10 | stylix.url = "github:danth/stylix"; 11 | nur.url = "github:nix-community/NUR"; 12 | 13 | ags = { 14 | url = "github:aylur/ags/v1"; 15 | inputs.nixpkgs.follows = "nixpkgs"; 16 | }; 17 | 18 | nixos-wsl.url = "github:nix-community/NixOS-WSL"; 19 | grub2-theme.url = "github:vinceliuice/grub2-themes"; 20 | nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.1.0"; 21 | 22 | ghostty.url = "github:ghostty-org/ghostty"; 23 | 24 | darwin = { 25 | url = "github:lnl7/nix-darwin/master"; 26 | inputs.nixpkgs.follows = "nixpkgs"; 27 | }; 28 | 29 | home-manager = { 30 | url = "github:nix-community/home-manager"; 31 | inputs.nixpkgs.follows = "nixpkgs"; 32 | }; 33 | 34 | spicetify = { 35 | url = "github:Gerg-L/spicetify-nix"; 36 | inputs.nixpkgs.follows = "nixpkgs"; 37 | }; 38 | 39 | neovim-nightly = { 40 | url = "github:nix-community/neovim-nightly-overlay"; 41 | inputs.nixpkgs.follows = "nixpkgs"; 42 | }; 43 | 44 | helix-master = { 45 | url = "github:SoraTenshi/helix/new-daily-driver"; 46 | inputs.nixpkgs.follows = "nixpkgs"; 47 | }; 48 | 49 | seto = { 50 | url = "github:unixpariah/Seto"; 51 | inputs.nixpkgs.follows = "nixpkgs"; 52 | }; 53 | 54 | zls-master = { 55 | url = "github:zigtools/zls"; 56 | }; 57 | 58 | hyprland = { 59 | url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; 60 | }; 61 | 62 | vfio = { 63 | url = "github:j-brn/nixos-vfio"; 64 | inputs.nixpkgs.follows = "nixpkgs"; 65 | }; 66 | 67 | zen-browser = { 68 | url = "github:maximoffua/zen-browser.nix"; 69 | inputs.nixpkgs.follows = "nixpkgs"; 70 | }; 71 | 72 | binary-ninja = { 73 | url = "github:jchv/nix-binary-ninja"; 74 | }; 75 | 76 | lanzaboote = { 77 | url = "github:nix-community/lanzaboote/v0.4.1"; 78 | }; 79 | 80 | ags-env = { 81 | url = "github:SoraTenshi/ags-env"; 82 | flake = false; 83 | }; 84 | 85 | picom-ibhagwan = { 86 | url = "github:ibhagwan/picom"; 87 | flake = false; 88 | }; 89 | 90 | sddm-theme = { 91 | url = "github:SoraTenshi/tokyo-night-sddm"; 92 | flake = false; 93 | }; 94 | 95 | coplandos = { 96 | url = "github:ioresolution/copland-plymouth-theme"; 97 | flake = false; 98 | }; 99 | }; 100 | 101 | outputs = inputs @ { self, nixpkgs-nixos, nixpkgs, nur, home-manager, nixos-hardware 102 | , sddm-theme, neovim-nightly, zls-master, grub2-theme 103 | , helix-master, picom-ibhagwan, nixos-wsl, darwin, stylix, ags, ags-env 104 | , vfio, nix-flatpak, coplandos, hyprland, zen-browser, binary-ninja, lanzaboote 105 | , ghostty, seto, spicetify }: 106 | let 107 | mkDarwin = import ./lib/mkdarwin.nix; 108 | mkNixOS = import ./lib/mknixos.nix; 109 | 110 | overlays = [ ]; 111 | in { 112 | nixosConfigurations = { 113 | plutonium = mkNixOS "plutonium" { 114 | inherit inputs overlays; 115 | nixpkgs = nixpkgs-nixos; 116 | isHardwareMachine = false; 117 | system = "x86_64-linux"; 118 | username = "nightmare"; 119 | useAndroidEmulation = true; 120 | extraModules = [ 121 | nixos-wsl.nixosModules.wsl 122 | ]; 123 | extraHomeModules = [ 124 | ]; 125 | }; 126 | 127 | battlestation = mkNixOS "battlestation" { 128 | inherit inputs overlays; 129 | nixpkgs = nixpkgs-nixos; 130 | system = "x86_64-linux"; 131 | username = "dreamer"; 132 | useSecureBoot = false; 133 | useArcan = true; 134 | useAndroidEmulation = true; 135 | useChromium = true; 136 | extraModules = [ 137 | ./modules/nvidia 138 | ./modules/ly 139 | ./modules/steam 140 | # ./modules/libvirtd 141 | # vfio.nixosModules.vfio 142 | lanzaboote.nixosModules.lanzaboote 143 | stylix.nixosModules.stylix 144 | ]; 145 | extraHomeModules = [ 146 | ags.homeManagerModules.default 147 | nix-flatpak.homeManagerModules.nix-flatpak 148 | seto.homeManagerModules.default 149 | seto.homeManagerModules.stylix 150 | spicetify.homeManagerModules.default 151 | ]; 152 | monitors = [ 153 | "DP-3,1920x1080@165,0x1080" 154 | "DP-2,1920x1080@75,1920x1080" 155 | "HDMI-A-1,1920x1080@60,960x0" 156 | ]; 157 | autostart = [ 158 | "[workspace 1 silent] ghostty" 159 | "[workspace 2 silent] zen" 160 | "[workspace 8 silent] discordcanary" 161 | ]; 162 | }; 163 | 164 | serotonine = mkNixOS "serotonine" { 165 | inherit inputs overlays; 166 | nixpkgs = nixpkgs-nixos; 167 | system = "x86_64-linux"; 168 | username = "dreamer"; 169 | extraModules = [ 170 | ./modules/greetd 171 | nixos-hardware.nixosModules.lenovo-thinkpad-t470s 172 | stylix.nixosModules.stylix 173 | ]; 174 | extraHomeModules = [ 175 | ags.homeManagerModules.default 176 | seto.homeManagerModules.default 177 | seto.homeManagerModules.stylix 178 | # nix-flatpak.homeManagerModules.nix-flatpak 179 | ]; 180 | }; 181 | 182 | loqius = mkNixOS "loqius" { 183 | inherit inputs overlays; 184 | nixpkgs = nixpkgs-nixos; 185 | system = "x86_64-linux"; 186 | username = "dev"; 187 | useAndroidEmulation = true; 188 | extraModules = [ 189 | # ./modules/greetd 190 | ./modules/ly 191 | stylix.nixosModules.stylix 192 | ]; 193 | extraHomeModules = [ 194 | ags.homeManagerModules.default 195 | seto.homeManagerModules.default 196 | seto.homeManagerModules.stylix 197 | spicetify.homeManagerModules.default 198 | ]; 199 | monitors = [ 200 | "eDP-1,1920x1200@60,0x0" 201 | "HDMI-A-1,1920x1080@120,1920x0" 202 | "DP-1,1920x1080@75,3840x0" 203 | ]; 204 | autostart = [ 205 | "[workspace 1 silent] ghostty" 206 | "[workspace 2 silent] firefox" 207 | "[workspace 9 silent] keepassxc" 208 | "[workspace 4 silent] thunderbird" 209 | "[workspace 5 silent] mumble" 210 | "[workspace 6 silent] zen" 211 | ]; 212 | }; 213 | 214 | vocatius = mkNixOS "vocatius" { 215 | inherit inputs overlays; 216 | nixpkgs = nixpkgs-nixos; 217 | system = "x86_64-linux"; 218 | username = "dev"; 219 | useArcan = true; 220 | useChromium = true; 221 | useAndroidEmulation = true; 222 | extraModules = [ 223 | # ./modules/greetd 224 | ./modules/ly 225 | stylix.nixosModules.stylix 226 | ]; 227 | extraHomeModules = [ 228 | ags.homeManagerModules.default 229 | seto.homeManagerModules.default 230 | seto.homeManagerModules.stylix 231 | spicetify.homeManagerModules.default 232 | ]; 233 | monitors = [ 234 | "HDMI-A-7,1920x1080@60,960x0" 235 | "DP-4,1920x1080@165,0x1080" 236 | "DP-5,1920x1080@60,1920x1080" 237 | ]; 238 | autostart = [ 239 | "[workspace 1 silent] ghostty" 240 | "[workspace 2 silent] firefox" 241 | "[workspace 9 silent] keepassxc" 242 | "[workspace 4 silent] thunderbird" 243 | "[workspace 5 silent] mumble" 244 | "[workspace 6 silent] zen" 245 | ]; 246 | }; 247 | }; 248 | 249 | darwinConfigurations = { 250 | combustible = mkDarwin "combustible" { 251 | inherit inputs overlays nixpkgs; 252 | system = "aarch64-darwin"; 253 | username = "lemon"; 254 | extraModules = [ 255 | # ./modules/mullvad 256 | ]; 257 | }; 258 | }; 259 | }; 260 | } 261 | -------------------------------------------------------------------------------- /home/ags/ags/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | types 3 | package-lock.json 4 | weather_key 5 | setup.sh 6 | -------------------------------------------------------------------------------- /home/ags/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | home.packages = [ 3 | pkgs.bun # Requirement for typescript ;) 4 | pkgs.material-symbols # Generalized symbols for all sorts of display ;) 5 | ]; 6 | 7 | programs.ags = { 8 | enable = true; 9 | # configDir = ags-env; 10 | extraPackages = [ pkgs.libsoup_3 ]; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /home/anki/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | home.packages = [ 3 | pkgs.anki 4 | pkgs.anki-sync-server 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /home/anyrun/default.nix: -------------------------------------------------------------------------------- 1 | { inputs, config, ... }: 2 | let col = sel: config.lib.stylix.colors.withHashtag.${sel}; 3 | in { 4 | programs.anyrun = { 5 | enable = true; 6 | config = { 7 | plugins = with inputs.anyrun.packages."x86_64-linux"; [ 8 | applications 9 | randr 10 | rink 11 | shell 12 | stdin 13 | translate 14 | ]; 15 | x = { fraction = 0.5; }; 16 | y = { fraction = 2.5e-2; }; 17 | height = { fraction = 4.0e-2; }; 18 | width = { fraction = 1.0; }; 19 | layer = "overlay"; 20 | hideIcons = true; 21 | hidePluginInfo = true; 22 | maxEntries = 15; 23 | }; 24 | 25 | extraCss = '' 26 | @define-color text ${col "base05"}; 27 | @define-color alt-text ${col "base04"}; 28 | @define-color bg-active ${col "base01"}99; 29 | @define-color bg-inactive ${col "base00"}99; 30 | @define-color unselected ${col "base00"}99; 31 | @define-color selected ${col "base03"}99; 32 | 33 | * { 34 | transition: 200ms ease; 35 | font-family: "Lilex Nerd Font Mono Regular"; 36 | font-size: 1.6rem; 37 | } 38 | 39 | #main { 40 | background: transparent; 41 | } 42 | 43 | #plugin, 44 | #main { 45 | color: @text; 46 | background-color: @bg-active; 47 | border: 1px solid @bg-inactive; 48 | } 49 | 50 | #entry { 51 | color: @text; 52 | background-color: @bg-inactive; 53 | } 54 | 55 | #match { 56 | color: @text; 57 | background: @unselected; 58 | } 59 | 60 | #match:selected { 61 | color: @alt-text; 62 | background: @selected; 63 | } 64 | ''; 65 | }; 66 | } 67 | -------------------------------------------------------------------------------- /home/binary-ninja/default.nix: -------------------------------------------------------------------------------- 1 | { inputs, system, ... }: 2 | let 3 | filePath = ./binary-ninja-personal.zip; 4 | fileHash = if builtins.pathExists filePath then builtins.hashFile "sha256" filePath else null; 5 | storePath = if fileHash != null then "/nix/store/${fileHash}-binary-ninja-personal.zip" else null; 6 | fileInStore = if storePath != null then builtins.pathExists storePath else false; 7 | in 8 | { 9 | home.packages = (if fileInStore then [ 10 | inputs.binary-ninja.outputs.packages.${system}.binary-ninja-personal-wayland 11 | ] else []); 12 | } 13 | -------------------------------------------------------------------------------- /home/cli-tools/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | imports = [ ./rice.nix ]; 3 | home.packages = with pkgs; [ 4 | ani-cli 5 | bws 6 | cachix 7 | magic-wormhole 8 | ncdu 9 | tiny 10 | tldr 11 | tmate 12 | unzip 13 | ] ++ (if system == "x86_64-linux" then with pkgs; [ 14 | bitwarden-cli 15 | lash cat9 cat9-wrapped 16 | ] else []); 17 | } 18 | -------------------------------------------------------------------------------- /home/cli-tools/rice.nix: -------------------------------------------------------------------------------- 1 | _: { programs.fastfetch = { enable = true; }; } 2 | -------------------------------------------------------------------------------- /home/development/common-lisp.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | let 3 | sbcl' = pkgs.sbcl.withPackages(ps: with ps; [ 4 | # CLI Parser 5 | clingon 6 | 7 | # CLI stuff 8 | trivial-shell cmd 9 | 10 | # Coloured output! 11 | cl-ansi-term 12 | 13 | # Strings & dependencies 14 | str 15 | 16 | # required for cl-lsp 17 | qlot 18 | qlot-cli 19 | ]); 20 | in 21 | { 22 | home.packages = [ 23 | pkgs.roswell pkgs.asdf 24 | 25 | sbcl' 26 | ]; 27 | } 28 | -------------------------------------------------------------------------------- /home/development/darwin.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | imports = [ ./common-lisp.nix ]; 3 | home.packages = with pkgs; [ 4 | # some commonly used compiler stuff 5 | zig 6 | guile 7 | cargo 8 | rustc 9 | go 10 | elixir 11 | python311 # i can't get around it and i'm tired of always using a nix shell 12 | hy 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /home/development/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | imports = [ ./common-lisp.nix ]; 3 | home.packages = with pkgs; [ 4 | # debugger 5 | gdb 6 | 7 | # git 8 | gitu 9 | 10 | # docker 11 | lazydocker 12 | 13 | # compiler 14 | zig 15 | odin 16 | clang 17 | go 18 | 19 | # Rust 20 | # cargo 21 | # rustc 22 | rustup 23 | # clippy 24 | # rustfmt 25 | 26 | # BEAM VM 27 | elixir 28 | erlang 29 | 30 | # Python, :( 31 | python311 # i can't get around it and i'm tired of always using a nix shell 32 | hy 33 | 34 | # cmake 35 | cmake gnumake 36 | 37 | # Qemu 38 | qemu 39 | 40 | # Nixfmt 41 | nixfmt-classic 42 | 43 | # R stuff (graphing) 44 | pkgs.R 45 | ]; 46 | } 47 | -------------------------------------------------------------------------------- /home/development/graphs.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | home.packages = [ 4 | pkgs.R 5 | pkgs.rPackages.ggplot2 6 | pkgs.rPackages.dplyr 7 | ]; 8 | } 9 | { pkgs, ... }: 10 | { 11 | home.packages = [ 12 | pkgs.R 13 | pkgs.rPackages.languageserver 14 | pkgs.rPackages.ggplot2 15 | pkgs.rPackages.dplyr 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /home/dunst/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | services.dunst = { 3 | enable = true; 4 | 5 | settings = { 6 | global = { 7 | follow = "mouse"; 8 | alignment = "left"; 9 | vertical_alignment = "center"; 10 | width = 400; 11 | height = 500; 12 | offset = "50x50"; 13 | origin = "top-right"; 14 | transparency = 30; 15 | scale = 0; 16 | 17 | padding = 8; 18 | horizontal_padding = 8; 19 | text_icon_padding = 0; 20 | 21 | frame_width = 1; 22 | 23 | progress_bar = true; 24 | progress_bar_height = 10; 25 | progress_bar_frame_width = 1; 26 | progress_bar_min_width = 150; 27 | progress_bar_max_width = 300; 28 | 29 | seperator_color = "frame"; 30 | sort = "yes"; 31 | startup_notification = true; 32 | }; 33 | 34 | urgency_normal = { timeout = 3; }; 35 | }; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /home/editors/emacs/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | programs.emacs = { 3 | enable = true; 4 | }; 5 | } 6 | -------------------------------------------------------------------------------- /home/editors/emacs/emacs/meow.el: -------------------------------------------------------------------------------- 1 | (defun meow-setup () 2 | (setq meow-cheatsheet-layout meow-cheatsheet-layout-qwerty) 3 | (meow-motion-overwrite-define-key 4 | '("j" . meow-next) 5 | '("k" . meow-prev) 6 | '("" . ignore)) 7 | (meow-leader-define-key 8 | ;; SPC j/k will run the original command in MOTION state. 9 | '("j" . "H-j") 10 | '("k" . "H-k") 11 | ;; Use SPC (0-9) for digit arguments. 12 | '("1" . meow-digit-argument) 13 | '("2" . meow-digit-argument) 14 | '("3" . meow-digit-argument) 15 | '("4" . meow-digit-argument) 16 | '("5" . meow-digit-argument) 17 | '("6" . meow-digit-argument) 18 | '("7" . meow-digit-argument) 19 | '("8" . meow-digit-argument) 20 | '("9" . meow-digit-argument) 21 | '("0" . meow-digit-argument) 22 | '("/" . meow-keypad-describe-key) 23 | '("?" . meow-cheatsheet)) 24 | (meow-normal-define-key 25 | '("0" . meow-expand-0) 26 | '("9" . meow-expand-9) 27 | '("8" . meow-expand-8) 28 | '("7" . meow-expand-7) 29 | '("6" . meow-expand-6) 30 | '("5" . meow-expand-5) 31 | '("4" . meow-expand-4) 32 | '("3" . meow-expand-3) 33 | '("2" . meow-expand-2) 34 | '("1" . meow-expand-1) 35 | '("-" . negative-argument) 36 | '(";" . meow-reverse) 37 | '("," . meow-inner-of-thing) 38 | '("." . meow-bounds-of-thing) 39 | '("[" . meow-beginning-of-thing) 40 | '("]" . meow-end-of-thing) 41 | '("a" . meow-append) 42 | '("A" . meow-open-below) 43 | '("b" . meow-back-word) 44 | '("B" . meow-back-symbol) 45 | '("c" . meow-change) 46 | '("d" . meow-delete) 47 | '("D" . meow-backward-delete) 48 | '("e" . meow-next-word) 49 | '("E" . meow-next-symbol) 50 | '("f" . meow-find) 51 | '("g" . meow-cancel-selection) 52 | '("G" . meow-grab) 53 | '("h" . meow-left) 54 | '("H" . meow-left-expand) 55 | '("i" . meow-insert) 56 | '("I" . meow-open-above) 57 | '("j" . meow-next) 58 | '("J" . meow-next-expand) 59 | '("k" . meow-prev) 60 | '("K" . meow-prev-expand) 61 | '("l" . meow-right) 62 | '("L" . meow-right-expand) 63 | '("m" . meow-join) 64 | '("n" . meow-search) 65 | '("o" . meow-block) 66 | '("O" . meow-to-block) 67 | '("p" . meow-yank) 68 | '("q" . meow-quit) 69 | '("Q" . meow-goto-line) 70 | '("r" . meow-replace) 71 | '("R" . meow-swap-grab) 72 | '("s" . meow-kill) 73 | '("t" . meow-till) 74 | '("u" . meow-undo) 75 | '("U" . meow-undo-in-selection) 76 | '("v" . meow-visit) 77 | '("w" . meow-mark-word) 78 | '("W" . meow-mark-symbol) 79 | '("x" . meow-line) 80 | '("X" . meow-goto-line) 81 | '("y" . meow-save) 82 | '("Y" . meow-sync-grab) 83 | '("z" . meow-pop-selection) 84 | '("'" . repeat) 85 | '("" . ignore))) 86 | 87 | -------------------------------------------------------------------------------- /home/editors/emacs/emacs/tokyonight.el: -------------------------------------------------------------------------------- 1 | (defun doom-tokyonight-storm () 2 | (set-face-background 'default "#24283b")) 3 | 4 | -------------------------------------------------------------------------------- /home/editors/helix/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ ../language-servers ]; 3 | 4 | programs.helix = { 5 | enable = true; 6 | languages = { 7 | language-server.superhtml-lsp = { 8 | command = "superhtml"; 9 | args = ["lsp"]; 10 | }; 11 | language = [ 12 | { 13 | name = "html"; 14 | scope = "source.html"; 15 | roots = []; 16 | file-types = [ "html" "shtml" ]; 17 | language-servers = [ "superhtml-lsp" ]; 18 | } 19 | { 20 | name = "common-lisp"; 21 | scope = "source.lisp"; 22 | file-types = ["lisp" "asd" "cl" "l" "lsp" "ny" "podsl" "sexp" "ros"]; 23 | shebangs = ["lisp" "sbcl" "ccl" "clisp" "ecl"]; 24 | comment-token = ";"; 25 | indent = { tab-width = 2; unit = " "; }; 26 | language-servers = [ "cl-lsp" ]; 27 | grammar = "scheme"; 28 | } 29 | ]; 30 | }; 31 | settings = { 32 | theme = "tokyonight_storm"; 33 | editor = { 34 | line-number = "relative"; 35 | cursorline = true; 36 | scrolloff = 5; 37 | color-modes = true; 38 | idle-timeout = 1; 39 | true-color = true; 40 | rainbow-brackets = true; 41 | bufferline = "always"; 42 | rulers = [ 100 ]; 43 | popup-border = "all"; 44 | soft-wrap.enable = true; 45 | completion-replace = true; 46 | 47 | sticky-context = { 48 | enable = true; 49 | indicator = false; 50 | }; 51 | 52 | lsp = { 53 | display-messages = true; 54 | display-inlay-hints = true; 55 | }; 56 | 57 | inline-diagnostics = { 58 | cursor-line = "hint"; 59 | other-lines = "error"; 60 | }; 61 | 62 | whitespace.render = "all"; 63 | whitespace.characters = { 64 | space = "·"; 65 | nbsp = "⍽"; 66 | tab = "→"; 67 | newline = "⤶"; 68 | }; 69 | 70 | gutters = [ "diagnostics" "line-numbers" "spacer" "diff" ]; 71 | statusline = { 72 | separator = "of"; 73 | left = [ 74 | "mode" 75 | "selections" 76 | "file-type" 77 | "register" 78 | "spinner" 79 | "diagnostics" 80 | ]; 81 | center = [ "file-name" ]; 82 | right = [ 83 | "file-encoding" 84 | "file-line-ending" 85 | "position-percentage" 86 | "spacer" 87 | "separator" 88 | "total-line-numbers" 89 | ]; 90 | mode = { 91 | normal = "NORMAL"; 92 | insert = "INSERT"; 93 | select = "SELECT"; 94 | }; 95 | }; 96 | indent-guides = { 97 | render = true; 98 | rainbow-option = "normal"; 99 | }; 100 | }; 101 | 102 | keys.normal = { 103 | "X" = "extend_line_above"; 104 | "C-q" = ":bc"; 105 | "C-d" = [ "half_page_down" "align_view_center" ]; 106 | "C-u" = [ "half_page_up" "align_view_center" ]; 107 | }; 108 | 109 | keys.normal."\\" = { "t" = [ ":vs ~/todo.md" ]; }; 110 | }; 111 | }; 112 | } 113 | -------------------------------------------------------------------------------- /home/editors/kakoune/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | programs.kakoune = { 3 | enable = true; 4 | config = { 5 | indentWidth = 2; 6 | showMatching = true; 7 | showWhitespace.enable = true; 8 | numberLines = { 9 | enable = true; 10 | highlightCursor = true; 11 | relative = true; 12 | }; 13 | scrollOff.lines = 3; 14 | 15 | wrapLines = { 16 | enable = true; 17 | indent = true; 18 | marker = "⏎"; 19 | }; 20 | }; 21 | 22 | plugins = with pkgs.kakounePlugins; [ 23 | fzf-kak 24 | kakoune-rainbow 25 | kakoune-buffers 26 | auto-pairs-kak 27 | ]; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /home/editors/language-servers/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, system, ... }: { 2 | home.packages = with pkgs; [ 3 | # Formatting 4 | alejandra 5 | 6 | # Debugging stuff 7 | lldb 8 | 9 | # Language servers 10 | clang-tools # C-Style 11 | cmake-language-server # Cmake, pray to never need to use it 12 | gopls # Go 13 | nil # Nix 14 | # rust-analyzer # Rust 15 | texlab # LaTeX 16 | zls # Zig 17 | elixir_ls # Elixir 18 | clojure-lsp # Clojure 19 | 20 | haskellPackages.haskell-language-server # Haskell 21 | 22 | nodePackages.typescript-language-server # Typescript 23 | nodePackages.vim-language-server # Vim 24 | nodePackages.yaml-language-server # YAML / JSON 25 | 26 | luajitPackages.lua-lsp # Lua 27 | ] ++ (if system == "x86_64-linux" then [ols] else []); # Odin! 28 | 29 | # xdg.configFile."zls.json".text = builtins.toJSON { 30 | # "$schema" = 31 | # "https://raw.githubusercontent.com/zigtools/zls/master/schema.json"; 32 | # enable_ast_check_diagnostics = true; 33 | # enable_autofix = true; 34 | # enable_import_embedfile_argument_completions = true; 35 | # enable_inlay_hints = true; 36 | # inlay_hints_hide_redundant_param_names = true; 37 | # inlay_hints_hide_redundant_param_names_last_token = true; 38 | # enable_semantic_tokens = true; 39 | # enable_snippets = true; 40 | # max_detail_length = 104857; 41 | # operator_completions = true; 42 | # warn_style = true; 43 | # include_at_in_builtins = true; 44 | # zig_exe_path = "${pkgs.zigpkgs.master.outPath}/bin/zig"; 45 | # }; 46 | } 47 | -------------------------------------------------------------------------------- /home/editors/neovim/default.nix: -------------------------------------------------------------------------------- 1 | { inputs, pkgs, ... }: { 2 | imports = [ ../language-servers ]; 3 | 4 | home.packages = [ pkgs.lua54Packages.fennel ]; 5 | 6 | nixpkgs.overlays = inputs.neovim-nightly; 7 | programs.neovim = { 8 | enable = true; 9 | vimAlias = true; 10 | viAlias = true; 11 | vimdiffAlias = true; 12 | 13 | plugins = with pkgs.vimPlugins; [ 14 | aniseed 15 | 16 | # utilities 17 | telescope-nvim 18 | vim-easy-align 19 | vim-css-color 20 | which-key-nvim 21 | vim-cursorword 22 | 23 | # visual 24 | lualine-nvim 25 | lualine-lsp-progress 26 | nvim-web-devicons 27 | 28 | # buffer stuff 29 | bufferline-nvim 30 | 31 | # auto complete 32 | nvim-lspconfig 33 | lsp_signature-nvim 34 | cmp_luasnip 35 | luasnip 36 | cmp-nvim-lsp 37 | nvim-cmp 38 | lspkind-nvim 39 | 40 | nvim-treesitter-context 41 | auto-pairs 42 | 43 | # design stuff 44 | tokyonight-nvim 45 | indent-blankline-nvim 46 | fidget-nvim 47 | 48 | # Toy 49 | guess-indent-nvim 50 | copilot-vim 51 | 52 | # tree sitter 53 | (nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) 54 | rainbow-delimiters-nvim 55 | ]; 56 | }; 57 | 58 | xdg.configFile."nvim" = { 59 | source = "${inputs.self}/home/editors/neovim/nvim"; 60 | recursive = true; 61 | }; 62 | } 63 | -------------------------------------------------------------------------------- /home/editors/neovim/nvim/init.lua: -------------------------------------------------------------------------------- 1 | vim.g.mapleader = ' ' 2 | 3 | local lspconfig = require('lspconfig') 4 | local on_attach = function(_, bufnr) 5 | local opts = { buffer = bufnr } 6 | vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) 7 | vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) 8 | vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) 9 | vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) 10 | vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) 11 | vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) 12 | vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) 13 | vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) 14 | vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, opts) 15 | vim.api.nvim_create_user_command("Format", vim.lsp.buf.formatting, {}) 16 | end 17 | 18 | function map(mode, shortcut, command) 19 | vim.api.nvim_set_keymap(mode, shortcut, command, { noremap = true, silent = true }) 20 | end 21 | 22 | function nmap(shortcut, command) 23 | map('n', shortcut, command) 24 | end 25 | 26 | function imap(shortcut, command) 27 | map('i', shortcut, command) 28 | end 29 | 30 | function vmap(shortcut, command) 31 | map('v', shortcut, command) 32 | end 33 | 34 | require('init_ll') 35 | require('init_ts') 36 | require('init_bl') 37 | require('init_sh') 38 | require('init_gi') 39 | require('init_ctx') 40 | require('init_icons') 41 | 42 | require('indent') 43 | require('completion') 44 | 45 | require('init_lsp') 46 | 47 | -- min width of word 48 | vim.g.cursorword_min_width = 3 49 | 50 | -- max width of word 51 | vim.g.cursorword_max_width = 50 52 | vim.g.multi_cursor_use_default_mapping = 1 53 | vim.g.scrolloff = 7 54 | 55 | vim.g.tokyonight_style = 'storm' 56 | 57 | nmap("n", ":NERDTreeFocus") 58 | nmap("", ":NERDTreeToggle") 59 | nmap("", ":NERDTreeFind") 60 | 61 | nmap("", "zz") 62 | nmap("", "zz") 63 | 64 | vmap("p", '"_dP') 65 | vmap(")<", "", ">gv") 67 | vmap("y", "myy`y") 68 | vmap("Y", "myY`y") 69 | 70 | nmap("k", "lua vim.lsp.buf.signature_help()") 71 | nmap("f", "Telescope find_files") 72 | nmap("t", "Telescope") 73 | nmap("w!", ":SudoWrite") 74 | nmap("e!", ":SudoEdit") 75 | nmap("]b", ":BufferLineCycleNext") 76 | nmap("[b", ":BufferLineCyclePrev") 77 | nmap("bh", ":BufferLineMoveNext") 78 | nmap("bl", ":BufferLineMovePrev") 79 | 80 | vmap("ga", ":EasyAlign") 81 | 82 | vmap("x", '"_x') 83 | nmap("x", '"_x') 84 | 85 | vim.cmd([[ 86 | set clipboard+=unnamedplus 87 | syntax on 88 | set guicursor=i:block 89 | set hidden 90 | set nobackup 91 | set signcolumn=yes:2 92 | set nowritebackup 93 | set cmdheight=2 94 | set updatetime=300 95 | set shortmess+=c 96 | set backspace=2 97 | set visualbell 98 | set t_vb= 99 | set title 100 | set relativenumber 101 | set number 102 | set ruler 103 | set tabstop=2 shiftwidth=2 smarttab expandtab 104 | set noexpandtab 105 | set cursorline 106 | set scrolloff=5 107 | set encoding=UTF-8 108 | set smartcase 109 | set smartindent 110 | set ignorecase 111 | set cursorline 112 | set updatetime=300 113 | set redrawtime=10000 114 | set ve=all 115 | colorscheme tokyonight 116 | ]]) 117 | -------------------------------------------------------------------------------- /home/editors/neovim/nvim/lua/completion.lua: -------------------------------------------------------------------------------- 1 | vim.opt.completeopt = { "menu", "menuone", "noselect" } 2 | 3 | local cmp = require('cmp') 4 | local lspkind = require('lspkind') 5 | local luasnip = require('luasnip') 6 | 7 | cmp.setup({ 8 | snippet = { 9 | expand = function(args) 10 | luasnip.lsp_expand(args.body) -- For `luasnip` users. 11 | end, 12 | }, 13 | mapping = cmp.mapping.preset.insert({ 14 | [''] = cmp.mapping.scroll_docs(-4), 15 | [''] = cmp.mapping.scroll_docs(4), 16 | [''] = cmp.mapping.complete(), 17 | [''] = cmp.mapping.abort(), 18 | [''] = cmp.mapping.confirm { 19 | behavior = cmp.ConfirmBehavior.Replace, 20 | select = true, 21 | }, 22 | [''] = cmp.mapping(function(fallback) 23 | if cmp.visible() then 24 | cmp.select_next_item() 25 | elseif luasnip.expand_or_jumpable() then 26 | luasnip.expand_or_jump() 27 | else 28 | fallback() 29 | end 30 | end, { 'i', 's' }), 31 | [''] = cmp.mapping(function(fallback) 32 | if cmp.visible() then 33 | cmp.select_prev_item() 34 | elseif luasnip.jumpable(-1) then 35 | luasnip.jump(-1) 36 | else 37 | fallback() 38 | end 39 | end, { 'i', 's' }), 40 | }), 41 | sources = cmp.config.sources({ 42 | { name = 'luasnip' }, 43 | { name = 'nvim_lsp' }, 44 | { name = 'path' }, 45 | }, { 46 | { name = 'buffer' }, 47 | }), 48 | view = { 49 | entries = "native" 50 | }, 51 | formatting = { 52 | format = lspkind.cmp_format(), 53 | }, 54 | }) 55 | -------------------------------------------------------------------------------- /home/editors/neovim/nvim/lua/indent.lua: -------------------------------------------------------------------------------- 1 | vim.opt.termguicolors = true 2 | 3 | vim.cmd [[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]] 4 | vim.cmd [[highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine]] 5 | vim.cmd [[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]] 6 | vim.cmd [[highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine]] 7 | vim.cmd [[highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine]] 8 | vim.cmd [[highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine]] 9 | 10 | vim.opt.list = true 11 | vim.opt.listchars:append("space:⋅") 12 | vim.opt.listchars:append("eol:↴") 13 | vim.opt.listchars:append("tab:» ") 14 | 15 | require("indent_blankline").setup { 16 | space_char_blankline = " ", 17 | char_highlight_list = { 18 | "IndentBlanklineIndent1", 19 | "IndentBlanklineIndent2", 20 | "IndentBlanklineIndent3", 21 | "IndentBlanklineIndent4", 22 | "IndentBlanklineIndent5", 23 | "IndentBlanklineIndent6", 24 | }, 25 | } 26 | -------------------------------------------------------------------------------- /home/editors/neovim/nvim/lua/init_bl.lua: -------------------------------------------------------------------------------- 1 | require('bufferline').setup { 2 | options = { 3 | mode = "buffers", 4 | numbers = "both", 5 | numer_style = "superscript", 6 | 7 | close_command = "bdelete! %d", 8 | right_mouse_command = "bdelete! %d", 9 | left_mouse_command = "buffer %d", 10 | middle_mouse_command = "bdelete! %d", 11 | 12 | buffer_close_icon = '', 13 | modified_icon = '●', 14 | close_icon = '', 15 | left_trunc_marker = '', 16 | right_trunc_marker = '', 17 | 18 | name_formatter = function(buf) 19 | if buf.name:match('%.md') then 20 | return vim.fn.fnamemodify(buf.name, ':t:r') 21 | end 22 | end, 23 | 24 | max_name_length = 18, 25 | max_prefix_length = 15, 26 | tab_size = 18, 27 | 28 | diagnostics = "nvim_lsp", 29 | diagnostics_update_in_insert = false, 30 | diagnostics_indicator = function(count, level, diagnostics_dict, context) 31 | return "(" .. count .. ")" 32 | end, 33 | 34 | offsets = { text_align = "center" }, 35 | color_icons = true, 36 | show_buffer_icons = true, 37 | show_buffer_close_icons = false, 38 | show_buffer_default_icon = true, 39 | show_close_icon = true, 40 | show_tab_indicators = true, 41 | 42 | separator_style = "slant", 43 | enforce_regular_tabs = false, 44 | always_show_bufferline = true, 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /home/editors/neovim/nvim/lua/init_ctx.lua: -------------------------------------------------------------------------------- 1 | require('treesitter-context').setup { 2 | enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) 3 | max_lines = 5, -- How many lines the window should span. Values <= 0 mean no limit. 4 | min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. 5 | line_numbers = true, 6 | multiline_threshold = 20, -- Maximum number of lines to collapse for a single context line 7 | trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' 8 | mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline' 9 | -- Separator between context and content. Should be a single character string, like '-'. 10 | -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. 11 | separator = nil, 12 | zindex = 20, -- The Z-index of the context window 13 | on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching 14 | } 15 | -------------------------------------------------------------------------------- /home/editors/neovim/nvim/lua/init_gi.lua: -------------------------------------------------------------------------------- 1 | require('guess-indent').setup { 2 | auto_cmd = true; 3 | buftype_exclude = { 4 | "help", 5 | "nofile", 6 | "terminal", 7 | "prompt", 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /home/editors/neovim/nvim/lua/init_icons.lua: -------------------------------------------------------------------------------- 1 | require('nvim-web-devicons').setup { 2 | color_icons = true; 3 | default = true; 4 | } 5 | -------------------------------------------------------------------------------- /home/editors/neovim/nvim/lua/init_ll.lua: -------------------------------------------------------------------------------- 1 | local config = { 2 | options = { 3 | icons_enabled = true, 4 | theme = 'auto', 5 | component_separators = { '', '' }, 6 | section_separators = { '', '' }, 7 | disabled_filetypes = {} 8 | }, 9 | sections = { 10 | lualine_a = { 'mode' }, 11 | lualine_b = { 'filename' }, 12 | lualine_c = {}, 13 | lualine_x = {}, 14 | lualine_y = { 'encoding', 'fileformat', 'filetype' }, 15 | lualine_z = { { 'branch' }, { 'progress' } }, 16 | }, 17 | inactive_sections = { 18 | lualine_a = {}, 19 | lualine_b = {}, 20 | lualine_c = {}, 21 | lualine_x = { 'location' }, 22 | lualine_y = {}, 23 | lualine_z = {} 24 | }, 25 | tabline = {}, 26 | extensions = {} 27 | } 28 | 29 | -- Inserts a component in lualine_c at left section 30 | local function ins_left(component) 31 | table.insert(config.sections.lualine_c, component) 32 | end 33 | 34 | -- Inserts a component in lualine_x ot right section 35 | local function ins_right(component) 36 | table.insert(config.sections.lualine_x, component) 37 | end 38 | 39 | ins_left { 40 | 'lsp_progress', 41 | display_components = { 'lsp_client_name', { 'title', 'percentage', 'message' } }, 42 | -- With spinner 43 | -- display_components = { 'lsp_client_name', 'spinner', { 'title', 'percentage', 'message' }}, 44 | separators = { 45 | component = ' ', 46 | progress = ' | ', 47 | message = { pre = '(', post = ')' }, 48 | percentage = { pre = '', post = '%% ' }, 49 | title = { pre = '', post = ': ' }, 50 | lsp_client_name = { pre = '[', post = ']' }, 51 | spinner = { pre = '', post = '' }, 52 | }, 53 | timer = { progress_enddelay = 500, spinner = 1000, lsp_client_name_enddelay = 1000 }, 54 | message = { commenced = 'In Progress', completed = 'Completed' }, 55 | } 56 | 57 | require('lualine').setup(config) 58 | -------------------------------------------------------------------------------- /home/editors/neovim/nvim/lua/init_lsp.lua: -------------------------------------------------------------------------------- 1 | local lcfg = require('lspconfig') 2 | 3 | local lsp_defaults = { 4 | flags = { 5 | debounce_text_changes = 100, 6 | }, 7 | capabilities = require('cmp_nvim_lsp').default_capabilities(), 8 | on_attach = function(_, _) 9 | vim.api.nvim_exec_autocmds('User', { pattern = 'LspAttached' }) 10 | end 11 | } 12 | 13 | lcfg.util.default_config = vim.tbl_deep_extend( 14 | 'force', 15 | lcfg.util.default_config, 16 | lsp_defaults 17 | ) 18 | 19 | lcfg.zls.setup {} 20 | lcfg.ccls.setup {} 21 | lcfg.gopls.setup {} 22 | lcfg.rust_analyzer.setup {} 23 | lcfg.cmake.setup {} 24 | lcfg.dockerls.setup {} 25 | lcfg.html.setup {} 26 | lcfg.rnix.setup {} 27 | lcfg.vimls.setup {} 28 | lcfg.lua_lsp.setup {} 29 | lcfg.ghcide.setup {} 30 | lcfg.idris2_lsp.setup {} 31 | lcfg.omnisharp.setup {} 32 | -------------------------------------------------------------------------------- /home/editors/neovim/nvim/lua/init_sh.lua: -------------------------------------------------------------------------------- 1 | require('lsp_signature').setup({ 2 | bind = true, 3 | doc_lines = 20, 4 | floating_window = true, 5 | floating_window_above_cur_line = true, 6 | 7 | fix_pos = false, 8 | hint_enable = true, 9 | hint_scheme = "String", 10 | max_height = 18, 11 | max_width = 86, 12 | 13 | handler_opts = { border = "rounded" }, 14 | always_trigger = false, 15 | auto_close_after = nil, 16 | 17 | zindex = 200, 18 | padding = '', 19 | extra_trigger_chars = { "(", ",", "{" }, 20 | 21 | transparency = nil, 22 | timer_interval = 100 23 | }) 24 | -------------------------------------------------------------------------------- /home/editors/neovim/nvim/lua/init_ts.lua: -------------------------------------------------------------------------------- 1 | require('nvim-treesitter.configs').setup { 2 | highlight = { 3 | enable = true, 4 | additional_vim_regex_highlighting = false, 5 | }, 6 | rainbow = { 7 | enable = true, 8 | extended_mode = true, 9 | max_file_lines = nil, 10 | }, 11 | indent = { 12 | enable = true, 13 | }, 14 | } 15 | -------------------------------------------------------------------------------- /home/email/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { home.packages = [ pkgs.thunderbird ]; } 2 | -------------------------------------------------------------------------------- /home/eww/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | programs.eww = { 3 | enable = true; 4 | configDir = ./eww; 5 | }; 6 | 7 | home.packages = [ pkgs.xclip pkgs.wmctrl pkgs.light pkgs.brightnessctl ]; 8 | } 9 | -------------------------------------------------------------------------------- /home/eww/eww/eww.scss: -------------------------------------------------------------------------------- 1 | $bg: #24283b; 2 | $nd: #1a1b26; 3 | $fg: #a9b1d6; 4 | $bl: #414868; 5 | $gr: #9aa5ce; 6 | $re: #f7768e; 7 | $gr: #73daca; 8 | $ye: #e0af68; 9 | $bu: #7aa2f7; 10 | $ma: #8031ca; 11 | $cy: #7dcfff; 12 | $wh: $fg; 13 | 14 | *{ 15 | all: unset; 16 | font-family: "Lilex Nerd Font Mono Regular"; 17 | } 18 | 19 | .main-bar, .status2, .status3 { 20 | background-color: rgba($bg, 0.8); 21 | color: $fg; 22 | } 23 | 24 | .segment-top, 25 | .segment-middle, 26 | .segment-bottom, 27 | .segment-left, 28 | .segment-right {} 29 | 30 | .color { 31 | } 32 | 33 | .module { 34 | border: 1px solid $ma; 35 | padding: 1px; 36 | } 37 | 38 | .icon-progress { 39 | font-family: "MaterialSymbolsSharp"; 40 | font-size: 1.3rem; 41 | min-width: 30px; 42 | min-height: 30px; 43 | margin-top: 5px; 44 | color: $cy; 45 | } 46 | 47 | .inner-icon { 48 | @extend .icon-progress; 49 | margin-top: 0px; 50 | } 51 | 52 | .icon { 53 | font-family: "MaterialSymbolsSharp"; 54 | color: $cy; 55 | font-size: 1.5rem; 56 | } 57 | 58 | 59 | .battery-progress { 60 | @extend .icon-progress; 61 | color: $ma; 62 | } 63 | 64 | .cpu-progress { 65 | @extend .icon-progress; 66 | color: $re; 67 | } 68 | 69 | .mem-progress { 70 | @extend .icon-progress; 71 | color: $gr; 72 | } 73 | 74 | .disk-progress { 75 | @extend .icon-progress; 76 | color: $bl; 77 | } 78 | 79 | .ampm { 80 | padding: 1px; 81 | color: $bu; 82 | font-size: 1.3rem; 83 | } 84 | 85 | .time, .date { 86 | padding: 1px; 87 | font-size: 1.4rem; 88 | color: $fg; 89 | } 90 | 91 | .weekday { 92 | padding: 1px; 93 | font-size: 1.3rem; 94 | color: $bu; 95 | } 96 | 97 | .info { 98 | color: $cy; 99 | font-size: 1.15rem; 100 | } 101 | 102 | scale trough { 103 | all: unset; 104 | background-color: rgba($bl, 0.4); 105 | border-radius: 5px; 106 | min-height: 80px; 107 | min-width: 15px; 108 | } 109 | 110 | .brightbar, .volumebar { 111 | trough highlight { 112 | border-radius: 5px; 113 | background-color: $cy; 114 | } 115 | } 116 | 117 | .workspaces { 118 | border: 1px solid $ma; 119 | font-size: 1.2rem; 120 | font-family: Ricty Diminished with Fira Code; 121 | button { 122 | padding: 2.5px; 123 | color: $bl; 124 | &.occupied { 125 | color: $fg; 126 | } 127 | &.active { 128 | font-size: 1.4rem; 129 | color: $cy; 130 | } 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /home/eww/eww/eww.yuck: -------------------------------------------------------------------------------- 1 | ;; Variables 2 | (deflisten workspaces 3 | "scripts/workspaces.sh") 4 | 5 | (include "./modules/status.yuck") 6 | (include "./modules/network.yuck") 7 | (include "./modules/brightness.yuck") 8 | (include "./modules/volume.yuck") 9 | (include "./modules/time.yuck") 10 | (include "./modules/date.yuck") 11 | 12 | (include "./status-two.yuck") 13 | (include "./status-three.yuck") 14 | 15 | (defwidget bar [screen] 16 | (centerbox :orientation "v" 17 | (box :valign "start" 18 | :class "segment-top" 19 | (top)) 20 | (box :valign "center" 21 | :class "segment-middle" 22 | (middle)) 23 | (box :valign "end" 24 | :vexpand true 25 | :class "segment-bottom" 26 | (bottom)))) 27 | 28 | (defwidget top [] 29 | (box :class "segment-top" :space-evenly "false" :orientation "v" :spacing 3 :vexpand true 30 | (time :o "v") 31 | (status))) 32 | 33 | (defwidget middle [] 34 | (box :class "segment-middle" :space-evenly "false" :orientation "v" :spacing 3 :vexpand true 35 | (workspaces))) 36 | 37 | (defwidget bottom [] 38 | (box :class "segment-bottom" :space-evenly "false" :orientation "v" :spacing 3 :vexpand true 39 | (volume) 40 | (brightness) 41 | (date :o "v"))) 42 | 43 | (defwidget workspaces [] 44 | (literal :content workspaces)) 45 | 46 | (defwindow main-bar 47 | :monitor 1 48 | :geometry (geometry :x "0" 49 | :y "0" 50 | :width "60px" 51 | :height "100%" 52 | :anchor "center left") 53 | :windowtype "dock" 54 | :wm-ignore true 55 | :hexpand false 56 | :reserve (struts :side "left" :distance "65px") 57 | (bar :screen 0)) 58 | 59 | (defwindow status2 60 | :monitor 2 61 | :geometry (geometry :x "0" 62 | :y "0" 63 | :width "60px" 64 | :height "100%" 65 | :anchor "center right") 66 | :windowtype "dock" 67 | :wm-ignore true 68 | :hexpand false 69 | :reserve (struts :side "right" :distance "65px") 70 | (status-three :screen 1)) 71 | 72 | (defwindow status3 73 | :monitor 0 74 | :geometry (geometry :x "0" 75 | :y "0" 76 | :width "100%" 77 | :height "40px" 78 | :anchor "center top") 79 | :windowtype "dock" 80 | :wm-ignore true 81 | :vexpand false 82 | :reserve (struts :side "top" :distance "40px") 83 | (status-two :screen 2)) 84 | -------------------------------------------------------------------------------- /home/eww/eww/modules/batinfo.yuck: -------------------------------------------------------------------------------- 1 | (defwidget battery [] 2 | (circular-progress 3 | :active {EWW_BATTERY != ""} 4 | :visible {EWW_BATTERY != ""} 5 | :tooltip "Battery: ${EWW_BATTERY["BAT0"]["capacity"]}%" 6 | :class "battery-progress" 7 | :value {EWW_BATTERY["BAT0"]["capacity"]} 8 | :start-at 75 9 | :thickness 4 10 | :clockwise true 11 | (label :class "inner-icon" 12 | :text {EWW_BATTERY["BAT0"]["status"] == "Charging" ? "" : EWW_BATTERY["BAT0"]["capacity"] > 74 ? "" : EWW_BATTERY["BAT0"]["capacity"] > 50 ? "" : EWW_BATTERY["BAT0"]["capacity"] > 25 ? "" : ""}))) 13 | 14 | -------------------------------------------------------------------------------- /home/eww/eww/modules/brightness.yuck: -------------------------------------------------------------------------------- 1 | (defvar show_brightness false) 2 | (defpoll cur_bright :interval "1s" "light -G | grep -o '[0-9]*' | head -1") 3 | 4 | (defwidget brightness [] 5 | (eventbox :onclick "${EWW_CMD} update show_brightness=true" 6 | :onhoverlost "${EWW_CMD} update show_brightness=false" 7 | :active {cur_bright != 0} 8 | :visible {cur_bright != 0} 9 | (box :orientation "v" :class "module" :space-evenly "false" :vexpand true 10 | (revealer :transition "slideup" 11 | :reveal show_brightness 12 | :duration "550ms" 13 | (scale :class "brightbar" 14 | :value cur_bright 15 | :tooltip "Brightness: ${round(cur_bright, 0)}%" 16 | :onchange "brightnessctl set {}%" 17 | :orientation "v" 18 | :flipped true 19 | :max 100 20 | :min 1)) 21 | (label :class "icon" 22 | :text "") 23 | (label :class "info" 24 | :text "${cur_bright}%")))) 25 | -------------------------------------------------------------------------------- /home/eww/eww/modules/cpuinfo.yuck: -------------------------------------------------------------------------------- 1 | (defwidget cpu [] 2 | (circular-progress 3 | :tooltip "CPU: ${round(EWW_CPU["avg"], 0)}%" 4 | :class "cpu-progress" 5 | :value {round(EWW_CPU["avg"], 0)} 6 | :start-at 75 7 | :thickness 4 8 | :clockwise true 9 | (label :class "inner-icon" 10 | :text ""))) 11 | 12 | -------------------------------------------------------------------------------- /home/eww/eww/modules/date.yuck: -------------------------------------------------------------------------------- 1 | (defpoll date_year :interval "24h" "LANG=ja_JP.utf8 date +%Y") 2 | (defpoll date_month :interval "1h" "LANG=ja_JP.utf8 date +%m") 3 | (defpoll date_day :interval "1m" "LANG=ja_JP.utf8 date +%d") 4 | (defpoll weekday :interval "1m" "LANG=ja_JP.utf8 date +%a") 5 | 6 | (defwidget date [] 7 | (box :class "module" :space-evenly "false" :orientation "v" :spacing 3 8 | (label :text "${weekday}" :class "weekday") 9 | (label :text "${date_year}" :class "date") 10 | (label :text "${date_month}" :class "date") 11 | (label :text "${date_day}" :class "date"))) 12 | 13 | (defwidget date_h [] 14 | (box :class "module" :space-evenly false :orientation "h" :spacing 3 15 | (label :text "${weekday}" :class "weekday") 16 | (label :text "年${date_year}" :class "date") 17 | (label :text "月${date_month}" :class "date") 18 | (label :text "日${date_day}" :class "date"))) 19 | -------------------------------------------------------------------------------- /home/eww/eww/modules/diskinfo.yuck: -------------------------------------------------------------------------------- 1 | (defwidget disk [] 2 | (circular-progress 3 | :tooltip "Space used: ${round(EWW_DISK["/"]["used_perc"], 0)}%" 4 | :class "disk-progress" 5 | :value {EWW_DISK["/"]["used_perc"]} 6 | :start-at 75 7 | :thickness 4 8 | :clockwise true 9 | (label :class "inner-icon" 10 | :text ""))) 11 | 12 | -------------------------------------------------------------------------------- /home/eww/eww/modules/meminfo.yuck: -------------------------------------------------------------------------------- 1 | (defwidget mem [] 2 | (circular-progress 3 | :tooltip "MEM: ${round(EWW_RAM["used_mem_perc"], 0)}%" 4 | :class "mem-progress" 5 | :value {EWW_RAM["used_mem_perc"]} 6 | :start-at 75 7 | :thickness 4 8 | :clockwise true 9 | (label :class "inner-icon" 10 | :text ""))) 11 | 12 | -------------------------------------------------------------------------------- /home/eww/eww/modules/network.yuck: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraTenshi/nixos-config/1817d6d31c0317aa57615a9eca03959a8464cdb3/home/eww/eww/modules/network.yuck -------------------------------------------------------------------------------- /home/eww/eww/modules/status.yuck: -------------------------------------------------------------------------------- 1 | (include "./modules/cpuinfo.yuck") 2 | (include "./modules/meminfo.yuck") 3 | (include "./modules/diskinfo.yuck") 4 | (include "./modules/batinfo.yuck") 5 | 6 | (defwidget status [] 7 | (box :class "module" :space-evenly true :orientation "v" :spacing 9 :vexpand false 8 | (battery) 9 | (cpu) 10 | (mem) 11 | (disk))) 12 | 13 | (defwidget status-h [] 14 | (box :class "module" :space-evenly true :orientation "h" :spacing 9 :hexpand false 15 | (battery) 16 | (cpu) 17 | (mem) 18 | (disk))) 19 | 20 | -------------------------------------------------------------------------------- /home/eww/eww/modules/time.yuck: -------------------------------------------------------------------------------- 1 | (defpoll clock_ampm :interval "1s" "LANG=ja_JP.utf8 date +%p") 2 | (defpoll clock_hour :interval "1s" "date +%I") 3 | (defpoll clock_minute :interval "1s" "date +%M") 4 | (defpoll clock_second :interval "1s" "date +%S") 5 | 6 | (defwidget time [] 7 | (box :class "module" :space-evenly "false" :orientation "v" :spacing 3 8 | (label :text "${clock_ampm}" :class "ampm") 9 | (label :text "${clock_hour}" :class "time") 10 | (label :text "${clock_minute}" :class "time") 11 | (label :text "${clock_second}" :class "time"))) 12 | 13 | (defwidget time_h [] 14 | (box :class "module" :space-evenly "false" :orientation "h" :spacing 3 15 | (label :text {replace("${clock_ampm}", '\s', '')} :class "ampm") 16 | (label :text {replace("${clock_hour}:${clock_minute}:${clock_second}", '\s', '')} :class "time"))) 17 | -------------------------------------------------------------------------------- /home/eww/eww/modules/volume.yuck: -------------------------------------------------------------------------------- 1 | (defvar show_volume false) 2 | (defvar prev_volume 0) 3 | 4 | (defpoll cur_volume :interval "1s" "amixer sget Master | grep 'Right:' | awk -F '[][]' '{ print $2 }' | grep -o '[0-9]*'") 5 | 6 | (defwidget volume [] 7 | (eventbox :onclick {show_volume ? "amixer sset Master ${cur_volume > 0 ? 0 : prev_volume}" : "${EWW_CMD} update show_volume=true && ${EWW_CMD} update prev_volume=${cur_volume > 0 ? cur_volume : prev_volume}"} 8 | :onhoverlost "${EWW_CMD} update show_volume=false" 9 | (box :orientation "v" :class "module" :space-evenly "false" :vexpand true 10 | (revealer :transition "slideup" 11 | :reveal show_volume 12 | :duration "350ms" 13 | (scale :class "volumebar" 14 | :value cur_volume 15 | :tooltip "Volume: ${cur_volume}%" 16 | :onchange "amixer sset Master {}% && ${EWW_CMD} update prev_volume=${cur_volume > 0 ? cur_volume : prev_volume}" 17 | :orientation "v" 18 | :flipped true 19 | :max 100 20 | :min 0)) 21 | (label :class "icon" 22 | :text "${cur_volume > 75 ? '' : cur_volume > 25 ? '' : cur_volume > 1 ? '' : ''}") 23 | (label :class "info" 24 | :text "${cur_volume}%")))) 25 | -------------------------------------------------------------------------------- /home/eww/eww/scripts/workspaces.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | monitor="${1}" 4 | 5 | function get_workspaces { 6 | wmctrl -d \ 7 | | awk '{ print $1 " " $2 " " $9 }' \ 8 | | grep -v 'NSP' \ 9 | | grep "${monitor}" 10 | } 11 | 12 | function create_box { 13 | get_workspaces | while read -r id active name; do 14 | name="$(printf '%s\n' "${name}")" 15 | class="" 16 | 17 | test "${active}" = "*" && class="${class:-}${class:+ }active" 18 | case "$(wmctrl -l | awk '{print "(" $2}' | tr '\n' ')')" in 19 | *"(${id})"*) class="${class:-}${class:+ }occupied";; 20 | esac 21 | 22 | if [[ "${active}" = "*" ]]; then 23 | printf '%s' "(button${class:+ :class '${class:-}'} :onclick 'wmctrl -s ${id}' '「${name}」')" 24 | else 25 | printf '%s' "(button${class:+ :class '${class:-}'} :onclick 'wmctrl -s ${id}' '${name}')" 26 | fi 27 | done 28 | } 29 | 30 | xprop -spy -root _NET_CURRENT_DESKTOP | while read -r; do 31 | sleep .01 32 | printf '%s\n' '(box :orientation "v" :class "workspaces" :space-evenly true :vexpand true '"$(create_box)"')' 33 | done -------------------------------------------------------------------------------- /home/eww/eww/status-three.yuck: -------------------------------------------------------------------------------- 1 | (defwidget status-three [screen] 2 | (centerbox :orientation "v" 3 | (box :valign "start" 4 | :class "segment-top" 5 | (right-top)) 6 | (box :valign "center" 7 | :class "segment-middle" 8 | (right-mid)) 9 | (box :valign "end" 10 | :class "segment-bottom" 11 | (right-bot)))) 12 | 13 | (defwidget right-top [] 14 | (box :class "segment-top" :space-evenly false :orientation "v" :spacing 3 15 | (time))) 16 | 17 | (defwidget right-mid [] 18 | (box :class "segment-middle" :space-evenly false :orientation "v" :spacing 3 19 | (workspaces))) 20 | 21 | (defwidget right-bot [] 22 | (box :class "segment-bottom" :space-evenly false :orientation "v" :spacing 3 23 | (date))) 24 | 25 | (defwidget workspaces [] 26 | (literal :content workspaces)) 27 | -------------------------------------------------------------------------------- /home/eww/eww/status-two.yuck: -------------------------------------------------------------------------------- 1 | (defwidget status-two [screen] 2 | (centerbox :orientation "h" :vexpand false 3 | (box :halign "start" 4 | :class "segment-top" 5 | (top-left)) 6 | (box :halign "center" 7 | :class "segment-middle" 8 | (top-mid)) 9 | (box :halign "end" 10 | :vexpand true 11 | :class "segment-bottom" 12 | (top-right)))) 13 | 14 | (defwidget top-left [] 15 | (box :class "segment-left" :space-evenly "false" :orientation "h" :spacing 3 16 | (date_h) 17 | (status-h))) 18 | 19 | (defwidget top-mid [] 20 | (box :class "segment-middle" :space-evenly "false" :orientation "h" :spacing 3 21 | (ws))) 22 | 23 | (defwidget top-right [] 24 | (box :class "segment-right" :space-evenly "false" :orientation "h" :spacing 3 25 | (time_h))) 26 | 27 | (defwidget ws [] 28 | (literal :content {replace(workspaces, '\"v\"', '\"h\"')})) 29 | -------------------------------------------------------------------------------- /home/eww/new_eww_hypr/eww.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraTenshi/nixos-config/1817d6d31c0317aa57615a9eca03959a8464cdb3/home/eww/new_eww_hypr/eww.scss -------------------------------------------------------------------------------- /home/eww/new_eww_hypr/eww.yuck: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraTenshi/nixos-config/1817d6d31c0317aa57615a9eca03959a8464cdb3/home/eww/new_eww_hypr/eww.yuck -------------------------------------------------------------------------------- /home/eww/new_eww_hypr/modules/network/network.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraTenshi/nixos-config/1817d6d31c0317aa57615a9eca03959a8464cdb3/home/eww/new_eww_hypr/modules/network/network.scss -------------------------------------------------------------------------------- /home/eww/new_eww_hypr/modules/network/network.yuck: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraTenshi/nixos-config/1817d6d31c0317aa57615a9eca03959a8464cdb3/home/eww/new_eww_hypr/modules/network/network.yuck -------------------------------------------------------------------------------- /home/eww/new_eww_hypr/style/_colors.scss: -------------------------------------------------------------------------------- 1 | $default-bg: #24283B; 2 | $alter-bg: #16161E; 3 | $select-bg: #343A52; 4 | $alter-txt: #787C99; 5 | $default-txt: #A9B1D6; 6 | $base06: #CBCCD1; 7 | $base07: #D5D6DB; 8 | $red: #C0CAF5; 9 | $orange: #A9B1D6; 10 | $yellow: #0DB9D7; 11 | $green: #9ECE6A; 12 | $cyan: #B4F9F8; 13 | $blue: #2AC3DE; 14 | $purple: #BB9AF7; 15 | $brown: #F7768E; 16 | 17 | -------------------------------------------------------------------------------- /home/eww/new_eww_hypr/style/_fonts.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraTenshi/nixos-config/1817d6d31c0317aa57615a9eca03959a8464cdb3/home/eww/new_eww_hypr/style/_fonts.scss -------------------------------------------------------------------------------- /home/eww/new_eww_hypr/widgets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraTenshi/nixos-config/1817d6d31c0317aa57615a9eca03959a8464cdb3/home/eww/new_eww_hypr/widgets/.gitkeep -------------------------------------------------------------------------------- /home/flatpak/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | services.flatpak = { 3 | enable = true; 4 | update.auto.enable = true; 5 | remotes = [{ 6 | name = "flathub"; # beta!!! 7 | location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo"; 8 | }]; 9 | 10 | packages = [{ 11 | appId = "com.discordapp.Discord"; 12 | origin = "flathub"; 13 | }]; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /home/fuzzel/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | home.packages = [ 3 | pkgs.shutdown-script-ros 4 | ]; 5 | 6 | programs.fuzzel = { 7 | enable = true; 8 | settings = { 9 | main = { 10 | terminal = "${pkgs.ghostty}/bin/ghostty"; 11 | layer = "overlay"; 12 | }; 13 | }; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /home/ghostty/default.nix: -------------------------------------------------------------------------------- 1 | _: 2 | { 3 | programs.ghostty = { 4 | enable = true; 5 | enableZshIntegration = true; 6 | 7 | settings = { 8 | background-opacity = 0.8; 9 | background-blur-radius = 29; 10 | 11 | # because fuck blinking bars. they are obnoxious 12 | shell-integration-features = "no-cursor"; 13 | 14 | font-family = "Lilex Nerd Font Mono"; 15 | font-variation = "wght=100"; 16 | font-size = "16"; 17 | font-feature = [ "cv08" "cv09" "cv10" ]; 18 | font-thicken = false; 19 | 20 | cursor-color = "c0caf5"; 21 | cursor-style = "block"; 22 | cursor-style-blink = false; 23 | 24 | theme = "tokyonight-storm"; 25 | 26 | macos-option-as-alt = true; 27 | macos-non-native-fullscreen = true; 28 | 29 | window-theme = "dark"; 30 | window-decoration = false; 31 | }; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /home/gtk-theme/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | gtk = { 3 | enable = true; 4 | theme = { 5 | name = "Tokyonight-Dark-Storm"; 6 | package = pkgs.tokyo-night-gtk.override { 7 | colorVariants = [ "dark" ]; 8 | tweakVariants = [ "storm" ]; 9 | }; 10 | }; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /home/guix/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | home.packages = [ pkgs.guix ]; 3 | } 4 | -------------------------------------------------------------------------------- /home/jerry/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | programs.jerry = { 3 | enable = true; 4 | config = { 5 | player_arguments = ""; 6 | }; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /home/jj/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | programs.jujutsu = { 3 | enable = true; 4 | settings = { 5 | user = { 6 | name = "SoraTenshi"; 7 | email = "dream@neoncity.dev"; 8 | }; 9 | ui = { 10 | editor = "hx"; 11 | paginate = "never"; 12 | merge-editor = ":builtin"; 13 | default-command = ["log" "--reversed"]; 14 | }; 15 | signing = { 16 | behavior = "own"; 17 | backend = "ssh"; 18 | key = "~/.ssh/id_ed25519.pub"; 19 | }; 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /home/kitty/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | programs.kitty = { 3 | enable = true; 4 | font = { 5 | name = "Lilex Nerd Font Mono Regular"; 6 | size = if pkgs.stdenvNoCC.isDarwin then 24 else 18; 7 | }; 8 | keybindings = { 9 | "ctrl+shift+c" = "copy_to_clipboard"; 10 | "ctrl+shift+v" = "paste_from_clipboard"; 11 | }; 12 | shellIntegration = { 13 | mode = "no-cursor"; 14 | enableZshIntegration = true; 15 | }; 16 | themeFile = "tokyo_night_storm"; 17 | settings = { 18 | scrollback_lines = 10000; 19 | enable_audio_bell = false; 20 | update_check_interval = 0; 21 | 22 | background_opacity = "0.9"; 23 | background_tint = "0.5"; 24 | 25 | confirm_os_window_close = 0; 26 | hide_window_decorations = "titlebar-only"; 27 | 28 | # Tabs 29 | tab_bar_edge = "bottom"; 30 | tab_bar_style = "slant"; 31 | tab_bar_align = "left"; 32 | 33 | # Cursor! 34 | cursor_shape = "block"; 35 | cursor_blink_interval = 0; 36 | }; 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /home/lazygit/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | programs.lazygit = { 3 | enable = true; 4 | settings = { 5 | gui = { 6 | language = 7 | "en"; # i often use JP locale, but yeah, i am not yet fully able to read most kanji :') 8 | nerdFontsVersion = "3"; 9 | border = if pkgs.stdenvNoCC.isDarwin then "rounded" else "single"; 10 | showBottomLine = false; 11 | }; 12 | }; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /home/newsboat/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | programs.newsboat = { 3 | enable = true; 4 | urls = [ 5 | { 6 | url = "http://blog.fefe.de/rss.xml?html"; 7 | title = "Fefe's Blog"; 8 | } 9 | { 10 | url = "https://www.microsoft.com/en-us/research/feed/"; 11 | title = "Microsoft Research"; 12 | } 13 | { 14 | url = "https://research.googleblog.com/feeds/posts/default?alt=rss"; 15 | title = "Google Research"; 16 | } 17 | { 18 | url = "https://github.blog/feed/"; 19 | title = "GitHub Blog"; 20 | } 21 | { 22 | url = "https://github.blog/category/engineering/feed/"; 23 | title = "GitHub Engineering"; 24 | } 25 | { 26 | url = "https://ziglang.org/news/index.xml"; 27 | title = "Ziglang News"; 28 | } 29 | { 30 | url = "https://zig.news/rss"; 31 | title = "zig.news"; 32 | } 33 | { 34 | url = "https://devblogs.microsoft.com/oldnewthing/feed"; 35 | title = "old new thing"; 36 | } 37 | { 38 | url = "http://feeds.feedburner.com/kubkon"; 39 | title = "Kubkon's Blog"; 40 | } 41 | { 42 | url = "https://verdagon.dev/rss.xml"; 43 | title = "Verdragon's Blog"; 44 | } 45 | ]; 46 | maxItems = 20; 47 | extraConfig = '' 48 | unbind-key ENTER 49 | unbind-key j 50 | unbind-key k 51 | unbind-key J 52 | unbind-key K 53 | unbind-key TAB 54 | 55 | bind-key j down 56 | bind-key k up 57 | bind-key l open 58 | bind-key h quit 59 | bind-key TAB next-unread 60 | ''; 61 | }; 62 | } 63 | -------------------------------------------------------------------------------- /home/nyxt/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | home.packages = with pkgs; [ nyxt ]; 3 | 4 | # God, there should be a flake :prayge: 5 | xdg.configFile = { 6 | "nyxt/config.lisp" = { 7 | text = '' 8 | (in-package #:nyxt-user) 9 | (define-configuration nyxt::buffer 10 | ((default-modes `(,@(get-default 'default-modes) 11 | vi-normal-mode)))) 12 | 13 | (nyxt::load-file "theme.lisp") 14 | (nyxt::load-file "keybinding.lisp") 15 | ''; 16 | }; 17 | 18 | "nyxt/theme.lisp" = { 19 | text = '' 20 | (in-package #:nyxt-user) 21 | (define-configuration browser 22 | ((theme (make-instance 'theme:theme 23 | :dark-p t 24 | :background-color "#24283b" 25 | :on-background-color "#a9b1d6" 26 | :primary-color "#f7768e" 27 | :on-primary-color "#ff9e64" 28 | :secondary-color "#e0af68" 29 | :on-secondary-color "#9ece6a" 30 | :accent-color "#73daca" 31 | :on-accent-color "#b4f9f8")))) 32 | (define-configuration nyxt/style-mode:dark-mode 33 | ((style #.(cl-css:css 34 | '((* 35 | :background-color "#24283b !important" 36 | :color "#c0caf5") 37 | (a 38 | :color "#7aa2f7 !important")))))) 39 | ''; 40 | }; 41 | 42 | "nyxt/keybinding.lisp" = { 43 | text = '' 44 | (in-package #:nyxt-user) 45 | (define-configuration 46 | ((nyxt::default-modes `(,@(nyxt::default-modes) 47 | (nyxt::vi-normal-mode 48 | :bindings 49 | (nyxt::make-keymap 50 | :inherit (nyxt::scheme-mode-map 51 | nyxt::vi-normal-mode-map 52 | 53 | "gn" 'buffer-next))))))) 54 | ''; 55 | }; 56 | }; 57 | } 58 | -------------------------------------------------------------------------------- /home/obs/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | programs.obs-studio = { 3 | enable = true; 4 | # plugins = with pkgs.obs-studio-plugins; [ 5 | # obs-backgroundremoval 6 | # ]; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /home/pwn/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | home.packages = [ 3 | # Gdb frontend 4 | pkgs.gef 5 | 6 | # Pwninit 7 | pkgs.pwninit 8 | pkgs.patchelf 9 | 10 | # ----- Big packages, not sure if i want to have them in my list yet ----- # 11 | # pkgs.python312Packages.angr pkgs.python312Packages.z3-solver 12 | 13 | # Pwntools lol 14 | pkgs.pwntools 15 | 16 | # Binary analysis 17 | pkgs.file pkgs.radare2 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /home/seto/default.nix: -------------------------------------------------------------------------------- 1 | { inputs, system, ... }: { 2 | programs.seto = { 3 | enable = true; 4 | package = inputs.seto.packages.${system}.default; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /home/shells/elvish/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { home.packages = [ pkgs.elvish pkgs.murex ]; } 2 | -------------------------------------------------------------------------------- /home/shells/schemesh/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | let 3 | schemesh = pkgs.fetchgit { 4 | url = "https://github.com/cosmos72/schemesh.git"; 5 | rev = "refs/tags/v0.9.0"; 6 | sha256 = "sha256-rNmNpUXsOAsJwSBwmS6XCOMQ4+7lilkteJ8Or9bd+zc="; 7 | }; 8 | in { 9 | home.packages = [ 10 | pkgs.chez 11 | (pkgs.callPackage schemesh {}) 12 | ]; 13 | } 14 | -------------------------------------------------------------------------------- /home/shells/zellij/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | programs.zellij = { 3 | enable = true; 4 | settings = { 5 | ui = { 6 | pane-frames = { 7 | rounded-corners = false; 8 | hide-session-name = true; 9 | }; 10 | }; 11 | 12 | scrollback_editor = "hx"; 13 | simplified-ui = true; 14 | # managed by stylix 15 | # theme = "tokyonight-storm"; 16 | # themes.tokyonight-storm = { 17 | # fg = "#a9b1d6"; 18 | # bg = "#24283b"; 19 | # black = "#383e5a"; 20 | # red = "#f93357"; 21 | # green = "#9ece6a"; 22 | # yellow = "#e0af68"; 23 | # blue = "#7aa2f7"; 24 | # magenta = "#bb9af7"; 25 | # cyan = "#2ac3de"; 26 | # white = "#c0caf5"; 27 | # orange = "#ff9e64"; 28 | # }; 29 | }; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /home/shells/zsh/default.nix: -------------------------------------------------------------------------------- 1 | { inputs, pkgs, ... }: 2 | let 3 | aliases = { 4 | cat = "bat --style=plain --no-pager"; 5 | mv = "mv -i"; 6 | ls = "eza --icons --grid"; 7 | cd = "z"; 8 | termbin = "nc termbin.com 9999"; 9 | grep = "rg"; 10 | lg = "lazygit"; 11 | dgr = "lazydocker"; 12 | du = "du --human-readable"; 13 | readsym = "readlink -f"; 14 | mksym = "ln -sf"; 15 | }; 16 | in { 17 | home.packages = with pkgs; [ 18 | # Shell utils 19 | htop 20 | bottom 21 | eza 22 | ripgrep 23 | gh 24 | jq 25 | gh-dash 26 | ]; 27 | 28 | programs = { 29 | fzf.enable = true; 30 | zoxide.enable = true; 31 | bat = { enable = true; }; 32 | oh-my-posh = { 33 | enable = true; 34 | enableZshIntegration = true; 35 | settings = builtins.fromJSON (builtins.unsafeDiscardStringContext 36 | (builtins.readFile 37 | "${inputs.self}/home/shells/zsh/oh-my-posh/tokyonight_ascii.opm.json")); 38 | }; 39 | 40 | git = { 41 | enable = true; 42 | includes = [{ path = "~/.config/git/userconfig.inc"; }]; 43 | lfs.enable = true; 44 | }; 45 | 46 | # Shell 47 | zsh = { 48 | enable = true; 49 | enableCompletion = true; 50 | autosuggestion.enable = true; 51 | syntaxHighlighting.enable = true; 52 | plugins = [ 53 | { 54 | name = "zsh-you-should-use"; 55 | src = pkgs.zsh-you-should-use; 56 | file = "share/zsh/plugins/you-should-use/you-should-use.plugin.zsh"; 57 | } 58 | { 59 | name = "zig-shell-completions"; 60 | src = pkgs.zig-shell-completions; 61 | } 62 | ]; 63 | 64 | initContent = '' 65 | export PATH=$PATH:~/.cargo/bin:~/.local/bin:~/.roswell/bin 66 | export YSU_HARDCORE=1 67 | 68 | # Define autocomplete for devshell init 69 | devshell() { 70 | nix flake init --template github:the-nix-way/dev-templates#$1 71 | } 72 | 73 | _devshell() { 74 | compadd clojure csharp cue dhall elixir elm gleam go \ 75 | hashi haskell java kotlin latex nickel nim nix node ocaml \ 76 | opa php protobuf purescript python ruby rust-toolchain rust scala shell zig 77 | } 78 | compdef _devshell devshell 79 | # End definition of devshell 80 | 81 | bindkey '^[[1~' beginning-of-line # home 82 | bindkey '^[[4~' end-of-line # end 83 | bindkey '\e[3~' delete-char # delete 84 | bindkey '\eOc' forward-word # ctrl right 85 | bindkey '\eOd' backward-word # ctrl left 86 | bindkey '^[[1;5C' forward-word # ctrl right 87 | bindkey '^[[1;5D' backward-word # ctrl left 88 | bindkey '^H' backward-kill-word # ctrl backspace 89 | ''; 90 | 91 | shellAliases = aliases; 92 | }; 93 | }; 94 | } 95 | -------------------------------------------------------------------------------- /home/shells/zsh/oh-my-posh/tokyonight_ascii.opm.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", 3 | "blocks": [ 4 | { 5 | "type": "prompt", 6 | "alignment": "left", 7 | "filler": "<#414868,transparent>\u2500", 8 | "segments": [ 9 | { 10 | "foreground": "#414868", 11 | "style": "plain", 12 | "template": "\u250c", 13 | "type": "text" 14 | }, 15 | { 16 | "background": "#414868", 17 | "foreground": "#7dcfff", 18 | "leading_diamond": "\u2500\u2500[ ", 19 | "style": "diamond", 20 | "template": "<,transparent>{{ .Icon }}", 21 | "trailing_diamond": " ]", 22 | "type": "os" 23 | }, 24 | { 25 | "background": "#414868", 26 | "foreground": "#7dcfff", 27 | "leading_diamond": "\u2500\u2500[ ", 28 | "style": "diamond", 29 | "template": "<,transparent>{{ .Path }}", 30 | "trailing_diamond": " ]", 31 | "properties": { 32 | "style": "full" 33 | }, 34 | "type": "path" 35 | }, 36 | { 37 | "background": "#414868", 38 | "foreground": "#7dcfff", 39 | "leading_diamond": "\u2500\u2500[ ", 40 | "trailing_diamond": " ]", 41 | "style": "diamond", 42 | "properties": { 43 | "fetch_status": true, 44 | "fetch_upstream_icon": true, 45 | "fetch_worktree_count": true 46 | }, 47 | "template": "<,transparent>{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uF692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }}", 48 | "type": "git" 49 | } 50 | ] 51 | }, 52 | { 53 | "type": "prompt", 54 | "alignment": "right", 55 | "newline": false, 56 | "filler": "<#414868,transparent>\u2500", 57 | "segments": [ 58 | { 59 | "type": "battery", 60 | "leading_diamond": "[ ", 61 | "style": "diamond", 62 | "trailing_diamond": " ]\u2500\u2500", 63 | "background": "#414868", 64 | "foreground": "#7dcfff", 65 | "foreground_templates": [ 66 | "{{if eq \"Charging\" .State.String}}green{{end}}", 67 | "{{if eq \"Discharging\" .State.String}}red{{end}}", 68 | "{{if eq \"Full\" .State.String}}#7dcfff{{end}}" 69 | ], 70 | "template": "<,transparent>{{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}\uF295", 71 | "properties": { 72 | "discharging_icon": "~ ", 73 | "charging_icon": "++ ", 74 | "charged_icon": "= " 75 | } 76 | }, 77 | { 78 | "background": "#414868", 79 | "foreground": "#7dcfff", 80 | "leading_diamond": "[ ", 81 | "properties": { 82 | "time_format": "15:04:05" 83 | }, 84 | "style": "diamond", 85 | "template": "<,transparent>{{ .CurrentDate | date .Format }}", 86 | "trailing_diamond": " ]", 87 | "type": "time" 88 | } 89 | ] 90 | }, 91 | { 92 | "type": "prompt", 93 | "alignment": "left", 94 | "newline": true, 95 | "segments": [ 96 | { 97 | "foreground": "#414868", 98 | "style": "plain", 99 | "template": "\u2514", 100 | "type": "text" 101 | }, 102 | { 103 | "background": "#414868", 104 | "foreground": "#7dcfff", 105 | "leading_diamond": "\u2500\u2500[ ", 106 | "style": "diamond", 107 | "template": "<,transparent>{{ .UserName }}<#414868,transparent>@<,transparent>{{ .HostName }}", 108 | "trailing_diamond": " ]", 109 | "type": "text" 110 | }, 111 | { 112 | "foreground": "#7dcfff", 113 | "style": "plain", 114 | "template": "<#414868>\u2500\u2500\u276f\u276f", 115 | "type": "text" 116 | } 117 | ] 118 | } 119 | ], 120 | "final_space": true, 121 | "version": 2, 122 | "transient_prompt": { 123 | "background": "transparent", 124 | "foreground_templates": [ 125 | "{{ne .Code 0}} #f7768e{{end}}" 126 | ], 127 | "foreground": "#7dcfff", 128 | "template": "\u276f\u276f " 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /home/shells/zsh/oh-my-posh/tokyonight_ascii_nu.opm.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", 3 | "blocks": [ 4 | { 5 | "type": "prompt", 6 | "alignment": "left", 7 | "filler": "<#414868,transparent>\u2500", 8 | "segments": [ 9 | { 10 | "foreground": "#414868", 11 | "style": "plain", 12 | "template": "\u250c", 13 | "type": "text" 14 | }, 15 | { 16 | "background": "#414868", 17 | "foreground": "#7dcfff", 18 | "leading_diamond": "\u2500\u2500[ ", 19 | "style": "diamond", 20 | "template": "<,transparent>{{ .Icon }}", 21 | "trailing_diamond": " ]", 22 | "type": "os" 23 | }, 24 | { 25 | "background": "#414868", 26 | "foreground": "#7dcfff", 27 | "leading_diamond": "\u2500\u2500[ ", 28 | "style": "diamond", 29 | "template": "<,transparent>{{ .Path }}", 30 | "trailing_diamond": " ]", 31 | "properties": { 32 | "style": "full" 33 | }, 34 | "type": "path" 35 | }, 36 | { 37 | "background": "#414868", 38 | "foreground": "#7dcfff", 39 | "leading_diamond": "\u2500\u2500[ ", 40 | "trailing_diamond": " ]", 41 | "style": "diamond", 42 | "properties": { 43 | "fetch_status": true, 44 | "fetch_upstream_icon": true, 45 | "fetch_worktree_count": true 46 | }, 47 | "template": "<,transparent>{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uF692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }}", 48 | "type": "git" 49 | } 50 | ] 51 | }, 52 | { 53 | "type": "prompt", 54 | "alignment": "right", 55 | "newline": false, 56 | "filler": "<#414868,transparent>\u2500", 57 | "segments": [ 58 | { 59 | "type": "battery", 60 | "leading_diamond": "[ ", 61 | "style": "diamond", 62 | "trailing_diamond": " ]\u2500\u2500", 63 | "background": "#414868", 64 | "foreground": "#7dcfff", 65 | "foreground_templates": [ 66 | "{{if eq \"Charging\" .State.String}}green{{end}}", 67 | "{{if eq \"Discharging\" .State.String}}red{{end}}", 68 | "{{if eq \"Full\" .State.String}}#7dcfff{{end}}" 69 | ], 70 | "template": "<,transparent>{{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}\uF295", 71 | "properties": { 72 | "discharging_icon": "~ ", 73 | "charging_icon": "++ ", 74 | "charged_icon": "= " 75 | } 76 | }, 77 | { 78 | "background": "#414868", 79 | "foreground": "#7dcfff", 80 | "leading_diamond": "[ ", 81 | "properties": { 82 | "time_format": "15:04:05" 83 | }, 84 | "style": "diamond", 85 | "template": "<,transparent>{{ .CurrentDate | date .Format }}", 86 | "trailing_diamond": " ]", 87 | "type": "time" 88 | } 89 | ] 90 | }, 91 | { 92 | "type": "prompt", 93 | "alignment": "left", 94 | "newline": true, 95 | "segments": [ 96 | { 97 | "foreground": "#414868", 98 | "style": "plain", 99 | "template": "\u2514", 100 | "type": "text" 101 | }, 102 | { 103 | "background": "#414868", 104 | "foreground": "#7dcfff", 105 | "leading_diamond": "\u2500\u2500[ ", 106 | "style": "diamond", 107 | "template": "<,transparent>{{ .UserName }}<#414868,transparent>@<,transparent>{{ .HostName }} - NUSHELL", 108 | "trailing_diamond": " ]", 109 | "type": "text" 110 | }, 111 | { 112 | "foreground": "#7dcfff", 113 | "style": "plain", 114 | "template": "<#414868>\u2500\u2500\u276f\u276f", 115 | "type": "text" 116 | } 117 | ] 118 | } 119 | ], 120 | "final_space": true, 121 | "version": 2, 122 | "transient_prompt": { 123 | "background": "transparent", 124 | "foreground_templates": [ 125 | "{{ne .Code 0}} #f7768e{{end}}" 126 | ], 127 | "foreground": "#7dcfff", 128 | "template": "\u276f\u276f " 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /home/spicetify/default.nix: -------------------------------------------------------------------------------- 1 | { inputs, pkgs, lib, ... }: { 2 | programs.spicetify = { 3 | enable = true; 4 | colorScheme = lib.mkForce "Storm"; 5 | wayland = true; 6 | experimentalFeatures = true; 7 | theme = { 8 | name = lib.mkForce "Tokyo"; 9 | src = pkgs.fetchFromGitHub { 10 | owner = "evening-hs"; 11 | repo = "Spotify-Tokyo-Night-Theme"; 12 | rev = "main"; 13 | hash = "sha256-cLj9v8qtHsdV9FfzV2Qf4pWO8AOBXu51U/lUMvdEXAk="; 14 | }; 15 | 16 | injectCss = true; 17 | injectThemeJs = true; 18 | replaceColors = true; 19 | sidebarConfig = true; 20 | homeConfig = true; 21 | overwriteAssets = false; 22 | }; 23 | enabledExtensions = with inputs.spicetify.legacyPackages.${pkgs.stdenv.system}.extensions; [ 24 | shuffle lastfm copyLyrics 25 | ]; 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /home/spotify-player/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | programs.spotify-player = { 3 | enable = true; 4 | settings = { 5 | # theme = "tokyonight"; 6 | client_id = "2f073e67c0184423a75e8666ede0c623"; 7 | client_port = 8888; 8 | notify_format = { summary = "{track}"; body = "{artists}"; }; 9 | device = { 10 | volume = 50; 11 | normalization = true; 12 | autoplay = true; 13 | }; 14 | }; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /home/spotify/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | home.packages = with pkgs; 3 | [ 4 | # spotify-tui 5 | spotify 6 | ]; 7 | 8 | # services.spotifyd = { 9 | # enable = true; 10 | # settings = { 11 | # global = { 12 | # device_name = "NixOS"; 13 | # }; 14 | # }; 15 | # }; 16 | } 17 | -------------------------------------------------------------------------------- /home/stylix/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | let 3 | cursorPackage = pkgs.catppuccin-cursors.macchiatoLavender; 4 | cursorName = "catppuccin-macchiato-lavender-cursors"; 5 | cursorSize = 32; 6 | in { 7 | stylix = { 8 | enable = true; 9 | autoEnable = true; 10 | cursor = { 11 | name = cursorName; 12 | package = cursorPackage; 13 | size = cursorSize; 14 | }; 15 | targets = { 16 | fzf.enable = false; 17 | gtk.enable = false; 18 | helix.enable = false; 19 | kitty.enable = false; 20 | ghostty.enable = false; 21 | spicetify.enable = false; 22 | }; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /home/user-apps/darwin.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | home.packages = with pkgs; [ 3 | discord 4 | ]; 5 | } 6 | -------------------------------------------------------------------------------- /home/user-apps/default.nix: -------------------------------------------------------------------------------- 1 | { inputs, pkgs, system, useChromium, ... }: { 2 | home.packages = with pkgs; [ 3 | discord-canary 4 | 5 | cosmic-files 6 | 7 | firefox 8 | mumble 9 | zathura 10 | spacedrive 11 | nheko 12 | mpv 13 | inputs.zen-browser.packages."${system}".default 14 | 15 | bitwarden-desktop 16 | ] ++ (if useChromium then [brave] else []); 17 | } 18 | -------------------------------------------------------------------------------- /home/virtual/default.nix: -------------------------------------------------------------------------------- 1 | _: { } 2 | -------------------------------------------------------------------------------- /home/wayland/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | imports = [ ./hyprland ./river ]; 3 | 4 | environment.variables = { WEBKIT_DISABLE_COMPOSITING_MODE = 1; }; 5 | 6 | xdg.mimeApps = { 7 | enable = true; 8 | defaultApplications = { 9 | "inode/directory" = "com.system76.CosmicFiles.desktop"; 10 | "x-directory/normal" = "com.system76.CosmicFiles.desktop"; 11 | }; 12 | }; 13 | 14 | xdg.configFile = { 15 | "electron-flags.conf" = { 16 | text = '' 17 | --enable-features=WaylandWindowDecorations 18 | --ozone-platform-hint=auto 19 | ''; 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /home/wayland/hyprland/binds.nix: -------------------------------------------------------------------------------- 1 | _: 2 | let 3 | terminal = "kitty"; 4 | other-terminal = "ghostty"; 5 | zipWith = f: xs: ys: 6 | if xs == [ ] || ys == [ ] then 7 | [ ] 8 | else 9 | [ (f (builtins.head xs) (builtins.head ys)) ] 10 | ++ zipWith f (builtins.tail xs) (builtins.tail ys); 11 | 12 | keys = [ "1" "2" "3" "4" "5" "6" "7" "8" "9" ]; 13 | workspaceChange = ws: nr: 14 | "SUPER, ${nr}, focusworkspaceoncurrentmonitor, ${ws}"; 15 | workspaceMove = ws: nr: 16 | "SUPERSHIFT, ${nr}, movetoworkspacesilent, name:${ws}"; 17 | in { 18 | wayland.windowManager.hyprland.settings = { 19 | bindm = [ "SUPER, mouse:272, movewindow" "SUPER, mouse:273, resizewindow" ]; 20 | 21 | bind = [ 22 | #### Execute apps #### 23 | "SUPERSHIFT, D, exec, discord --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime" 24 | "SUPERSHIFT, RETURN, exec, ${terminal}" 25 | "SUPER, RETURN, exec, GDK_DEBUG=gl-disable-gles ${other-terminal}" 26 | # '' 27 | # SUPERSHIFT, P, exec, ags -r "BarState.value = 'shutdown $(($(hyprctl monitors | grep 'focused' | grep -n 'yes' | cut -c1)-1))';"'' 28 | # '' 29 | # SUPER, X, exec, ags -r "BarState.value = 'executor $(($(hyprctl monitors | grep 'focused' | grep -n 'yes' | cut -c1)-1))';"'' 30 | # '' 31 | # SUPER, P, exec, ags -r "BarState.value = 'app-launcher $(($(hyprctl monitors | grep 'focused' | grep -n 'yes' | cut -c1)-1))';" 32 | # '' 33 | ''SUPERSHIFT, P, exec, shutdown-menu'' 34 | ''SUPER, X, exec, fuzzel -T "xterm -e" -p "λ " --lines 0 --line-height=40 -x 20 -y 5 -f "Lilex Nerd Font 80" -r 0'' 35 | ''SUPER, P, exec, fuzzel -f "Lilex Nerd Font" -l 10 --line-height=32 -r 0 -w 60 --match-mode=fzf -p ">_ "'' 36 | ''CONTROL, PRINT, exec, grim -g "$(slurp)" - | wl-copy'' 37 | ''SHIFTCONTROL, PRINT, exec, grim -g "$(slurp)" - | swappy -f - '' 38 | "SUPERSHIFTCONTROL, L, exec, hyprlock" 39 | "SUPERSHIFTCONTROL, Q, exit" 40 | 41 | #### Controls #### 42 | "SUPERSHIFT, Q, killactive" 43 | "SUPER, F, fullscreen" 44 | "SUPER, T, togglefloating" 45 | "SUPER, H, movefocus, l" 46 | "SUPER, L, movefocus, r" 47 | "SUPER, K, movefocus, u" 48 | "SUPER, J, movefocus, d" 49 | "SUPERSHIFT, H, resizeactive, -100 0" 50 | "SUPERSHIFT, L, resizeactive, 100 0" 51 | "SUPERSHIFT, K, resizeactive, 0 100" 52 | "SUPERSHIFT, J, resizeactive, 0 -100" 53 | 54 | #### Multi Monitor stuff #### 55 | "SUPER, bracketleft, focusmonitor, l" 56 | "SUPER, bracketright, focusmonitor, r" 57 | ] ++ 58 | #### Change workspace #### 59 | (zipWith workspaceChange keys keys) ++ 60 | #### Move to workspace #### 61 | (zipWith workspaceMove keys keys); 62 | }; 63 | } 64 | -------------------------------------------------------------------------------- /home/wayland/hyprland/default.nix: -------------------------------------------------------------------------------- 1 | { inputs, pkgs, lib, ... }: { 2 | imports = [ ./settings.nix ./binds.nix ]; 3 | 4 | home.packages = [ 5 | pkgs.swappy 6 | pkgs.wdisplays 7 | pkgs.grim 8 | pkgs.slurp 9 | pkgs.qt6.qtwayland 10 | pkgs.libsForQt5.qt5.qtwayland 11 | pkgs.xdg-desktop-portal-hyprland 12 | pkgs.xdg-desktop-portal-gtk 13 | 14 | pkgs.hyprcursor 15 | ]; 16 | 17 | xdg.portal = { 18 | enable = true; 19 | xdgOpenUsePortal = true; 20 | config = { 21 | common.default = [ "gtk" ]; 22 | hyprland.default = [ "gtk" "hyprland" ]; 23 | }; 24 | 25 | extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; 26 | }; 27 | 28 | programs.hyprlock = { 29 | enable = true; 30 | settings = { 31 | background = { 32 | monitor = ""; 33 | path = lib.mkForce "screenshot"; 34 | color = lib.mkForce "rgb(24283b)"; 35 | blur_passes = 2; 36 | blur_size = 10; 37 | noise = "0.0117"; 38 | brightness = "0.8172"; 39 | }; 40 | }; 41 | }; 42 | 43 | services.wpaperd = { 44 | enable = true; 45 | settings = { 46 | default = { 47 | path = "${inputs.self}/images"; 48 | duration = "10m"; 49 | }; 50 | }; 51 | }; 52 | 53 | wayland.windowManager.hyprland = { 54 | enable = true; 55 | # package = inputs.hyprland.packages.${pkgs.system}.hyprland; 56 | systemd = { 57 | enable = true; 58 | variables = [ "--all" ]; 59 | extraCommands = [ 60 | "systemctl --user stop graphical-session.target" 61 | "systemctl --user start hyprland-session.target" 62 | ]; 63 | }; 64 | xwayland.enable = true; 65 | 66 | settings = { 67 | exec-once = [ 68 | "ags" 69 | "fcitx5-remote -r" 70 | "fcitx5 -d --replace" 71 | "wpaperd" 72 | ]; 73 | }; 74 | }; 75 | } 76 | -------------------------------------------------------------------------------- /home/wayland/hyprland/settings.nix: -------------------------------------------------------------------------------- 1 | { monitors, lib, autostart, ... }: 2 | let 3 | keys = [ "1" "2" "3" "4" "5" "6" "7" "8" "9" ]; 4 | 5 | each-bar = i: [ 6 | "blur, bar-${builtins.toString i}" 7 | "ignorezero, bar-${builtins.toString i}" 8 | "xray 1, ${builtins.toString i}" 9 | ]; 10 | as-monitor = s: [ "${s},1" ]; 11 | workspaces = ws: [ "${ws}, persistent:true, default:true" ]; 12 | in { 13 | wayland.windowManager.hyprland.settings = { 14 | misc = { 15 | disable_autoreload = true; 16 | disable_hyprland_logo = true; 17 | disable_splash_rendering = true; 18 | animate_mouse_windowdragging = false; 19 | }; 20 | 21 | gestures = { 22 | workspace_swipe = true; 23 | workspace_swipe_forever = true; 24 | }; 25 | 26 | input = { 27 | kb_layout = "eu"; 28 | kb_options = "compose:ralt"; 29 | repeat_rate = 60; 30 | follow_mouse = 1; 31 | numlock_by_default = true; 32 | accel_profile = "flat"; 33 | scroll_method = "2fg"; 34 | natural_scroll = false; 35 | scroll_button = 274; 36 | scroll_button_lock = true; 37 | touchpad = { 38 | scroll_factor = 0.3; 39 | natural_scroll = true; 40 | }; 41 | }; 42 | 43 | general = { 44 | gaps_in = 5; 45 | gaps_out = 5; 46 | 47 | allow_tearing = true; 48 | }; 49 | 50 | decoration = { 51 | rounding = 0; 52 | shadow = lib.mkForce {}; 53 | blur = { 54 | enabled = true; 55 | size = 10; 56 | new_optimizations = true; 57 | xray = true; 58 | vibrancy = 0.1; 59 | }; 60 | }; 61 | 62 | cursor = { 63 | no_hardware_cursors = true; 64 | enable_hyprcursor = true; 65 | hide_on_touch = true; 66 | }; 67 | 68 | animations = { enabled = false; }; 69 | debug = { disable_logs = false; }; 70 | xwayland = { force_zero_scaling = true; }; 71 | 72 | windowrulev2 = [ 73 | "float, title:^(Picture-in-Picture)$" 74 | "pin, title:^(Picture-in-Picture)$" 75 | "rounding 0, xwayland:1" 76 | 77 | # Work related settings 78 | "workspace,2,class:^(firefox)$" 79 | "workspace,3,class:^(nheko)$" 80 | "workspace,4,class:^(thunderbird)$" 81 | "workspace,5,class:^(spotify)$" 82 | "workspace,5,class:^(mumble)$" 83 | "workspace,9,class:^(keepassxc)$" 84 | 85 | "opacity 1.0 override,tag:fuzzel" 86 | 87 | # Smart Gaps 88 | "bordersize 1,floating:0,onworkspace:w[tv1]" 89 | "rounding 0,floating:0,onworkspace:w[tv1]" 90 | "bordersize 1,floating:0,onworkspace:f[1]" 91 | "rounding 0,floating:0,onworkspace:f[1]" 92 | ]; 93 | 94 | exec-once = autostart; 95 | 96 | workspace = (builtins.concatMap workspaces keys) ++ [ 97 | # Smart gaps 98 | "w[tv1],gapsout:0,gapsin:0" 99 | "f[1],gapsout:0,gapsin:0" 100 | ]; 101 | 102 | monitor = builtins.concatMap as-monitor monitors; 103 | layerrule = builtins.concatMap each-bar 104 | (builtins.genList (i: i) (builtins.length monitors)); 105 | }; 106 | } 107 | -------------------------------------------------------------------------------- /home/wayland/river/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: { imports = [ ./tools.nix ]; } 2 | -------------------------------------------------------------------------------- /home/wayland/river/init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Get us a cute kitty :3 4 | riverctl map normal Super+Shift Return spawn kitty 5 | 6 | # Wofi? 7 | # riverctl map normal Super P spawn "wofi --show drun --insensitive --gtk-dark --allow-images" 8 | riverctl map normal Super+Shift P spawn "rofi -show menu -modi 'menu:rofi-power-menu'" 9 | 10 | riverctl map normal Super P spawn "fuzzel" 11 | riverctl map normal Super N spawn "networkmanager_dmenu" 12 | riverctl map normal Control Print spawn "grim -g \"\$(slurp)\" - | wl-copy" 13 | 14 | # Super+Q to close the focused view 15 | riverctl map normal Super+Shift Q close 16 | 17 | # Super+Shift+Q to exit river 18 | riverctl map normal Super+Shift+Control Q exit 19 | 20 | # Super+J and Super+K to focus the next/previous view in the layout stack 21 | riverctl map normal Super J focus-view next 22 | riverctl map normal Super K focus-view previous 23 | 24 | # Super+Shift+J and Super+Shift+K to swap the focused view with the next/previous 25 | # view in the layout stack 26 | riverctl map normal Super+Shift J swap next 27 | riverctl map normal Super+Shift K swap previous 28 | 29 | # Super+Period and Super+Comma to focus the next/previous output 30 | riverctl map normal Super Period focus-output previous 31 | riverctl map normal Super Comma focus-output next 32 | 33 | # Super+Shift+{Period,Comma} to send the focused view to the next/previous output 34 | riverctl map normal Super+Shift Period send-to-output next 35 | riverctl map normal Super+Shift Comma send-to-output previous 36 | 37 | # Super+Return to bump the focused view to the top of the layout stack 38 | riverctl map normal Super Return zoom 39 | 40 | # Super+H and Super+L to decrease/increase the main ratio of rivercarro(1) 41 | riverctl map normal Super H send-layout-cmd rivercarro "main-ratio -0.05" 42 | riverctl map normal Super L send-layout-cmd rivercarro "main-ratio +0.05" 43 | 44 | # Super+Shift+H and Super+Shift+L to increment/decrement the main count of rivercarro(1) 45 | riverctl map normal Super+Shift H send-layout-cmd rivercarro "main-count +1" 46 | riverctl map normal Super+Shift L send-layout-cmd rivercarro "main-count -1" 47 | 48 | # Super+Alt+{H,J,K,L} to move views 49 | riverctl map normal Super+Alt H move left 100 50 | riverctl map normal Super+Alt J move down 100 51 | riverctl map normal Super+Alt K move up 100 52 | riverctl map normal Super+Alt L move right 100 53 | 54 | # Super+Alt+Control+{H,J,K,L} to snap views to screen edges 55 | riverctl map normal Super+Alt+Control H snap left 56 | riverctl map normal Super+Alt+Control J snap down 57 | riverctl map normal Super+Alt+Control K snap up 58 | riverctl map normal Super+Alt+Control L snap right 59 | 60 | # Super+Alt+Shift+{H,J,K,L} to resize views 61 | riverctl map normal Super+Alt+Shift H resize horizontal -100 62 | riverctl map normal Super+Alt+Shift J resize vertical 100 63 | riverctl map normal Super+Alt+Shift K resize vertical -100 64 | riverctl map normal Super+Alt+Shift L resize horizontal 100 65 | 66 | # Super + Left Mouse Button to move views 67 | riverctl map-pointer normal Super BTN_LEFT move-view 68 | 69 | # Super + Right Mouse Button to resize views 70 | riverctl map-pointer normal Super BTN_RIGHT resize-view 71 | 72 | # Enable Scratchpad 73 | all_tags=$(((1 << 31) - 1)) 74 | sticky_tag=$((1 << 31)) 75 | all_but_sticky_tag=$(( $all_tags ^ $sticky_tag )) 76 | 77 | riverctl map normal Super S toggle-view-tags $sticky_tag 78 | riverctl spawn-tagmask ${all_but_sticky_tag} 79 | 80 | for i in $(seq 1 9) 81 | do 82 | tags=$((1 << ($i - 1))) 83 | 84 | # Super+[1-9] to focus tag [0-8] 85 | riverctl map normal Super $i set-focused-tags $(($tags + $sticky_tag)) 86 | 87 | # Super+Shift+[1-9] to tag focused view with tag [0-8] 88 | riverctl map normal Super+Shift $i set-view-tags $(($tags + $sticky_tag)) 89 | 90 | # Super+Ctrl+[1-9] to toggle focus of tag [0-8] 91 | riverctl map normal Super+Control $i toggle-focused-tags $(($tags + $sticky_tag)) 92 | 93 | # Super+Shift+Ctrl+[1-9] to toggle tag [0-8] of focused view 94 | riverctl map normal Super+Shift+Control $i toggle-view-tags $(($tags + $sticky_tag)) 95 | done 96 | 97 | # Super+0 to focus all tags 98 | # Super+Shift+0 to tag focused view with all tags 99 | all_tags=$(((1 << 32) - 1)) 100 | riverctl map normal Super 0 set-focused-tags $all_tags 101 | riverctl map normal Super+Shift 0 set-view-tags $all_tags 102 | 103 | # Super+Space to toggle float 104 | riverctl map normal Super Space toggle-float 105 | 106 | # Super+F to toggle fullscreen 107 | riverctl map normal Super F toggle-fullscreen 108 | 109 | # Super+{Up,Right,Down,Left} to change layout orientation 110 | riverctl map normal Super Up send-layout-cmd rivercarro "main-location top" 111 | riverctl map normal Super Right send-layout-cmd rivercarro "main-location right" 112 | riverctl map normal Super Down send-layout-cmd rivercarro "main-location bottom" 113 | riverctl map normal Super Left send-layout-cmd rivercarro "main-location left" 114 | 115 | # Declare a passthrough mode. This mode has only a single mapping to return to 116 | # normal mode. This makes it useful for testing a nested wayland compositor 117 | riverctl declare-mode passthrough 118 | 119 | # Super+F11 to enter passthrough mode 120 | riverctl map normal Super F11 enter-mode passthrough 121 | 122 | # Super+F11 to return to normal mode 123 | riverctl map passthrough Super F11 enter-mode normal 124 | 125 | # Various media key mapping examples for both normal and locked mode which do 126 | # not have a modifier 127 | for mode in normal locked 128 | do 129 | # Eject the optical drive (well if you still have one that is) 130 | riverctl map $mode None XF86Eject spawn 'eject -T' 131 | 132 | # Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer) 133 | riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5' 134 | riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5' 135 | riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute' 136 | 137 | # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl) 138 | riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause' 139 | riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause' 140 | riverctl map $mode None XF86AudioPrev spawn 'playerctl previous' 141 | riverctl map $mode None XF86AudioNext spawn 'playerctl next' 142 | 143 | # Control screen backlight brightness with light (https://github.com/haikarainen/light) 144 | riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5' 145 | riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5' 146 | done 147 | 148 | # Set background and border color 149 | riverctl background-color 0x24283b 150 | riverctl border-color-focused 0x8031ca 151 | riverctl border-color-unfocused 0x4a25aa 152 | 153 | riverctl float-filter-add "flameshot" 154 | 155 | # Set keyboard repeat rate 156 | riverctl set-repeat 50 300 157 | 158 | riverctl border-width 2 159 | 160 | killall waybar 161 | riverctl spawn waybar 162 | 163 | wlr-randr --output DP-1 --off 164 | 165 | wlr-randr \ 166 | --output DP-3 --on --custom-mode 1920x1080@165 --preferred --pos 0,1080 --transform normal \ 167 | --output DP-1 --on --custom-mode 1920x1080@60 --pos 1920,1080 --transform normal \ 168 | --output HDMI-A-1 --on --custom-mode 1920x1080@60 --pos 960,0 --transform normal \ 169 | --output DP-2 --off 170 | 171 | riverctl spawn fcitx5 172 | 173 | # Set the default layout generator to be rivercarro and start it. 174 | # River will send the process group of the init executable SIGTERM on exit. 175 | riverctl default-layout rivercarro 176 | exec rivercarro -inner-gaps 12 -outer-gaps 0 177 | 178 | -------------------------------------------------------------------------------- /home/wayland/river/tools.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | home.packages = with pkgs; [ 3 | fuzzel 4 | 5 | # screenshot stuff 6 | grim 7 | slurp 8 | 9 | wayshot 10 | waylock 11 | wlr-randr 12 | wofi 13 | ]; 14 | 15 | programs.waybar = { 16 | enable = true; 17 | systemd.enable = true; 18 | settings = { 19 | mainBar = { 20 | layer = "top"; 21 | position = "top"; 22 | height = 30; 23 | output = [ 24 | # "eDP-1" 25 | "DP-1" 26 | "DP-3" 27 | "HDMI-A-1" 28 | ]; 29 | modules-left = [ "clock" ]; 30 | modules-center = [ "river/tags" ]; 31 | modules-right = [ "network" "cpu" "memory" "temperature" "battery" ]; 32 | 33 | clock = { 34 | format = "{:%a | 年%Y 月%m 日%d %T}"; 35 | interval = 1; 36 | }; 37 | 38 | battery = { 39 | states = { 40 | good = 95; 41 | warning = 30; 42 | critical = 15; 43 | }; 44 | format = "{icon} {capacity}%"; 45 | format-alt = "{time}"; 46 | format-full = ""; 47 | format-charging = " {capacity}%"; 48 | format-plugged = " {capacity}%"; 49 | format-icons = [ "" "" "" "" "" ]; 50 | }; 51 | 52 | network = { 53 | min-length = 25; 54 | interval = 1; 55 | format-wifi = "﬉ {essid} ({signalStrength}%)"; 56 | format-ethernet = " {ipaddr}/{cidr}"; 57 | format-linked = " {ifname} (No IP)"; 58 | format-disconnected = "Disconnected"; 59 | format-alt = " {bandwidthUpBytes}  {bandwidthDownBytes}"; 60 | tooltip = true; 61 | }; 62 | 63 | cpu = { 64 | format = "﬙{usage:2}%"; 65 | interval = 1; 66 | states = { 67 | warning = 50; 68 | critical = 90; 69 | }; 70 | tooltip = false; 71 | }; 72 | 73 | memory = { 74 | format = " {}%"; 75 | interval = 1; 76 | states = { 77 | warning = 50; 78 | critical = 90; 79 | }; 80 | tooltip = false; 81 | }; 82 | 83 | temperature = { 84 | format = " {temperatureC}°C"; 85 | interval = 1; 86 | hwmon-path = "/sys/class/hwmon/hwmon1/temp1_input"; 87 | critical-threshold = 75; 88 | tooltip = false; 89 | }; 90 | }; 91 | }; 92 | style = '' 93 | * { 94 | border-radius: 0; 95 | font-family: Lilex Light Nerd Font Mono; 96 | min-height: 0; 97 | } 98 | 99 | window#waybar { 100 | background-color: #24283b; 101 | } 102 | 103 | #tags { 104 | font-size: 1.3rem; 105 | margin-bottom: 4px; 106 | background-color: #24283b; /*base02*/ 107 | border: 2px solid #8031ca; /*base1*/ 108 | } 109 | 110 | #tags button { 111 | color: #a9b1d6; 112 | border: 2px solid #24283b; 113 | } 114 | 115 | /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ 116 | #tags button:hover { 117 | box-shadow: inherit; 118 | background: #8031ca; /*base02*/ 119 | color: #7dcfff; 120 | } 121 | 122 | #tags button.focused { 123 | color: #a9b1d6; /*base02*/ 124 | background-color: #8031ca; /*base1*/ 125 | border: 2px solid #24283b; /*base02*/ 126 | } 127 | 128 | #tags button.occupied { 129 | border: 2px solid #8031ca; /*base1*/ 130 | } 131 | 132 | #tags button.urgent { 133 | border: 2px solid #f7768e; /*red*/ 134 | } 135 | 136 | #tags button.occupied.urgent { 137 | border: 2px solid #f7768e; /*red*/ 138 | } 139 | 140 | #tags button.focused.occupied { 141 | color: #24283b; /*base02*/ 142 | background-color: #8031ca; /*base1*/ 143 | border: 2px solid #8031ca; /*base1*/ 144 | } 145 | 146 | #clock, 147 | #mode, 148 | #cpu, 149 | #memory, 150 | #battery, 151 | #temperature { 152 | padding: 8px; 153 | margin-left: 8px; 154 | margin-bottom: 4px; 155 | background-color: #24283b; /*base02*/ 156 | color: #a9b1d6; /*base1*/ 157 | border: 2px solid #8031ca; /*base1*/ 158 | } 159 | 160 | #network { 161 | padding: 8px; 162 | margin-left: 8px; 163 | margin-bottom: 4px; 164 | background-color: #24283b; /*base02*/ 165 | color: #a9b1d6; /*base1*/ 166 | border: 2px solid #8031ca; /*base1*/ 167 | } 168 | 169 | #network button { 170 | color: #a9b1d6; 171 | border: 2px solid #24283b; 172 | } 173 | 174 | #network button:hover { 175 | box-shadow: inherit; 176 | background: #8031ca; 177 | color: #7dcfff; 178 | } 179 | 180 | #clock { 181 | padding: 8px; 182 | margin-left: 0px; 183 | font-size: 1.3rem; 184 | margin-bottom: 4px; 185 | } 186 | 187 | #cpu.warning, 188 | #memory.warning { 189 | border: 2px solid #b58900; /*yellow*/ 190 | } 191 | 192 | #cpu.critical, 193 | #memory.critical, 194 | #temperature.critical { 195 | border: 2px solid #dc322f; /*red*/ 196 | } 197 | ''; 198 | }; 199 | 200 | xdg.configFile = { 201 | "river/init" = { 202 | executable = true; 203 | source = ./init; 204 | }; 205 | "electron-flags.conf" = { 206 | text = '' 207 | --enable-features=WaylandWindowDecorations 208 | --ozone-platform-hint=auto 209 | ''; 210 | }; 211 | # TODO: Migrate to base16 & nix-colors 212 | "fuzzel/fuzzel.ini" = { 213 | text = '' 214 | font='Lilex Nerd Font Mono-16' 215 | prompt='->' 216 | 217 | [dmenu] 218 | mode=text 219 | 220 | [colors] 221 | background=24283bff 222 | text=a9b1d6ff 223 | match=8031caff 224 | selection=8031caff 225 | selection-text=7aa2f7ff 226 | selection-match=2ac3deff 227 | border=8031caff 228 | 229 | [border] 230 | width=2 231 | radius=0 232 | ''; 233 | }; 234 | }; 235 | } 236 | -------------------------------------------------------------------------------- /home/wezterm/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | programs.wezterm = { 3 | enable = true; 4 | extraConfig = '' 5 | local wezterm = require "wezterm" 6 | 7 | return { 8 | font = wezterm.font_with_fallback({ "Lilex Nerd Font Mono", }, { 9 | weight = "Regular", 10 | }), 11 | font_size = 18, 12 | color_scheme = "tokyonight-storm", 13 | enable_scroll_bar = false, 14 | use_fancy_tab_bar = false, 15 | enable_tab_bar = true, 16 | scrollback_lines = 10000, 17 | window_padding = { 18 | left = 15, 19 | right = 15, 20 | top = 15, 21 | bottom = 15, 22 | }, 23 | check_for_updates = false, 24 | default_cursor_style = "BlinkingBlock", 25 | animation_fps = 15, 26 | window_background_opacity = 0.9, 27 | } 28 | ''; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /home/work-specific/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | imports = [ ../obs ]; 3 | 4 | home.packages = [ 5 | pkgs.thunderbird 6 | pkgs.mumble 7 | pkgs.zathura 8 | pkgs.keepassxc 9 | pkgs.dino 10 | ]; 11 | } 12 | -------------------------------------------------------------------------------- /home/x11/default.nix: -------------------------------------------------------------------------------- 1 | { inputs, pkgs, ... }: 2 | let 3 | cursorPackage = pkgs.catppuccin-cursors.macchiatoBlue; 4 | cursorName = "Catppuccin-Macchiato-Blue-Cursors"; 5 | in { 6 | imports = [ ./picom.nix ../eww ]; 7 | 8 | gtk = { 9 | enable = true; 10 | theme = { 11 | name = "Tokyonight-Storm-BL"; 12 | package = pkgs.tokyo-night-gtk; 13 | }; 14 | 15 | cursorTheme = { 16 | package = cursorPackage; 17 | name = cursorName; 18 | }; 19 | }; 20 | 21 | qt = { 22 | enable = true; 23 | platformTheme.name = "gtk"; 24 | }; 25 | 26 | services.random-background = { 27 | enable = true; 28 | imageDirectory = "${inputs.self}/images"; 29 | display = "fill"; 30 | interval = "1h"; 31 | }; 32 | 33 | # home = { 34 | # packages = with pkgs; [ 35 | # # App starter 36 | # rofi 37 | # rofi-power-menu 38 | # rofi-pulse-select 39 | # rofi-file-browser 40 | 41 | # dmenu 42 | # networkmanager_dmenu 43 | 44 | # flameshot 45 | # ]; 46 | # file.".xsession" = { 47 | # text = '' 48 | # GTK_IM_MODULE=fcitx 49 | # QT_IM_MODULE=fcitx 50 | # XMODIFIERS=@im=fcitx 51 | # ''; 52 | # }; 53 | # }; 54 | } 55 | -------------------------------------------------------------------------------- /home/x11/picom.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | services.picom = { 3 | enable = true; 4 | fade = true; 5 | fadeDelta = 5; 6 | backend = "glx"; 7 | 8 | vSync = false; 9 | 10 | opacityRules = [ "100:class_g = 'eww'" ]; 11 | 12 | settings = { 13 | rounded-corners-exclude = [ "window_type = 'dock'" ]; 14 | 15 | blur-kern = "5x5box"; 16 | blur = { 17 | method = "dual_kawase"; 18 | strength = 5; 19 | background = false; 20 | background-frame = false; 21 | background-fixed = false; 22 | kern = "5x5box"; 23 | }; 24 | 25 | blur-background-exclude = [ "class_g ?= 'eww'" "class_g ?= 'peek'" ]; 26 | }; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraTenshi/nixos-config/1817d6d31c0317aa57615a9eca03959a8464cdb3/images/background.png -------------------------------------------------------------------------------- /images/background0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraTenshi/nixos-config/1817d6d31c0317aa57615a9eca03959a8464cdb3/images/background0.jpg -------------------------------------------------------------------------------- /images/background1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraTenshi/nixos-config/1817d6d31c0317aa57615a9eca03959a8464cdb3/images/background1.jpg -------------------------------------------------------------------------------- /images/background2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraTenshi/nixos-config/1817d6d31c0317aa57615a9eca03959a8464cdb3/images/background2.png -------------------------------------------------------------------------------- /images/background3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraTenshi/nixos-config/1817d6d31c0317aa57615a9eca03959a8464cdb3/images/background3.png -------------------------------------------------------------------------------- /images/background4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SoraTenshi/nixos-config/1817d6d31c0317aa57615a9eca03959a8464cdb3/images/background4.png -------------------------------------------------------------------------------- /lib/mkdarwin.nix: -------------------------------------------------------------------------------- 1 | hostname: 2 | { inputs, nixpkgs, system, username, overlays 3 | , extraModules ? [ ], extraHomeModules ? [ ] # extra modules 4 | }: 5 | let 6 | systemSpecificOverlays = [ 7 | (final: prev: { 8 | zls = inputs.zls-master.packages.${system}.default; 9 | helix = inputs.helix-master.packages.${system}.default; 10 | }) 11 | ]; 12 | in inputs.darwin.lib.darwinSystem { 13 | inherit system; 14 | modules = [ 15 | { 16 | nixpkgs.overlays = systemSpecificOverlays ++ overlays; 17 | nixpkgs.config.allowUnfree = true; 18 | } 19 | 20 | ../machines/${hostname} 21 | ../darwin 22 | ../modules/font 23 | ] ++ extraModules ++ [ 24 | inputs.home-manager.darwinModules.home-manager 25 | { 26 | home-manager = { 27 | useGlobalPkgs = true; 28 | useUserPackages = true; 29 | extraSpecialArgs = { inherit inputs username system; }; 30 | users.${username} = { imports = [ ../profiles/${username} ]; }; 31 | }; 32 | } 33 | ]; 34 | } 35 | -------------------------------------------------------------------------------- /lib/mknixos.nix: -------------------------------------------------------------------------------- 1 | hostname: 2 | { inputs, nixpkgs, system, username, overlays 3 | , isHardwareMachine ? true, isVM ? false 4 | , extraModules ? [ ] # default to an empty list if not provided 5 | , extraHomeModules ? [ ], monitors ? [ ] , useStylix ? true 6 | , useSecureBoot ? false, useWireguard ? false, useArcan ? false 7 | , useAndroidEmulation ? false, useChromium ? false, autostart ? [ ] }: 8 | let 9 | systemSpecificOverlays = [ 10 | (final: prev: { 11 | zls = inputs.zls-master.packages.${system}.default; 12 | helix = inputs.helix-master.packages.${system}.default; 13 | picom = prev.picom.overrideAttrs (c: { src = inputs.picom-ibhagwan; }); 14 | material-symbols = prev.callPackage ../derivations/material-symbols { }; 15 | shutdown-script-ros = prev.callPackage ../derivations/shutdown-script { }; 16 | }) 17 | ]; 18 | inherit (nixpkgs) lib; 19 | in lib.nixosSystem { 20 | inherit system; 21 | specialArgs = if isHardwareMachine then { 22 | inherit inputs isVM username; 23 | } else { 24 | inherit username isVM; 25 | }; 26 | modules = [ 27 | { 28 | nixpkgs.overlays = systemSpecificOverlays ++ overlays; 29 | nixpkgs.config.allowUnfree = true; 30 | } 31 | 32 | ../modules/user 33 | ../modules/font 34 | ../modules/time 35 | ../modules/cachix 36 | ../modules/common 37 | ../modules/variables 38 | ../modules/ssh 39 | (if useAndroidEmulation then ../modules/waydroid else {}) 40 | (if useArcan then ../modules/arcan else {}) 41 | (if useWireguard then ../modules/wireguard else {}) 42 | 43 | inputs.nur.modules.nixos.default 44 | ({ pkgs, ... }: { 45 | home-manager.sharedModules = [ 46 | pkgs.nur.repos.rycee.hmModules.emacs-init 47 | ] ++ extraHomeModules; 48 | }) 49 | 50 | # only for hardware 51 | # no WSL as an example 52 | ] ++ (if isHardwareMachine then [ 53 | (if useStylix then ../modules/stylix else {}) 54 | (if useSecureBoot then ../modules/lanzaboote else ../modules/boot) 55 | # ../modules/x11 56 | ../modules/wayland 57 | ../modules/sound 58 | ../modules/mullvad 59 | 60 | # End the scope, and add an additional list of the extra modules 61 | ] else 62 | [ ]) ++ extraModules ++ [ 63 | ../machines/${hostname} 64 | 65 | inputs.home-manager.nixosModules.home-manager 66 | { 67 | home-manager = { 68 | useGlobalPkgs = true; 69 | useUserPackages = true; 70 | extraSpecialArgs = if isHardwareMachine then { 71 | inherit inputs username monitors system useChromium autostart; 72 | } else { 73 | inherit inputs username system; 74 | }; 75 | users.${username} = { imports = [ ../profiles/${username} ]; }; 76 | }; 77 | } 78 | ]; 79 | } 80 | -------------------------------------------------------------------------------- /machines/battlestation/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, pkgs, modulesPath, ... }: { 2 | imports = [ 3 | (modulesPath + "/installer/scan/not-detected.nix") 4 | ../../configuration.nix 5 | ]; 6 | 7 | boot = { 8 | kernelPackages = pkgs.linuxPackages_latest; 9 | initrd = { 10 | availableKernelModules = 11 | [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; 12 | #kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" "vfio_virqfd" "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ]; 13 | kernelModules = [ ]; 14 | }; 15 | kernelModules = [ "kvm-amd" ]; 16 | extraModulePackages = [ ]; 17 | # kernelParams = [ "amd_iommu=on" "vfio-pci.ids=${builtins.concatStringsSep "," ids}" ]; 18 | kernelParams = [ ]; 19 | }; 20 | 21 | security.tpm2 = { 22 | enable = true; 23 | pkcs11.enable = true; 24 | }; 25 | 26 | hardware.bluetooth = { 27 | enable = true; 28 | powerOnBoot = true; 29 | }; 30 | 31 | environment.systemPackages = [ 32 | pkgs.egl-wayland 33 | ]; 34 | 35 | fileSystems."/" = 36 | { device = "/dev/disk/by-uuid/b20bc060-36e0-4197-9038-4b3113064540"; 37 | fsType = "ext4"; 38 | }; 39 | 40 | fileSystems."/boot" = 41 | { device = "/dev/disk/by-uuid/BFC1-4BB5"; 42 | fsType = "vfat"; 43 | options = [ "fmask=0022" "dmask=0022" ]; 44 | }; 45 | 46 | swapDevices = [{ device = "/dev/disk/by-uuid/460f529b-50b8-47e3-aaa8-1b06c28151a5"; }]; 47 | 48 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 49 | # (the default) this is the recommended approach. When using systemd-networkd it's 50 | # still possible to use this option, but it's recommended to use it in conjunction 51 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 52 | networking = { 53 | hostName = "battlestation"; 54 | networkmanager = { 55 | enable = true; 56 | wifi.backend = "iwd"; 57 | }; 58 | useDHCP = false; 59 | interfaces.enp4s0.useDHCP = true; 60 | }; 61 | 62 | hardware.cpu.amd.updateMicrocode = 63 | lib.mkDefault config.hardware.enableRedistributableFirmware; 64 | 65 | system.stateVersion = "24.11"; 66 | } 67 | -------------------------------------------------------------------------------- /machines/combustible/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | imports = [ ../../configuration.nix ]; 3 | 4 | programs.zsh.enable = true; 5 | programs.zsh.shellInit = '' 6 | if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then 7 | . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' 8 | fi 9 | ''; 10 | 11 | system.defaults = { 12 | dock = { 13 | autohide = true; 14 | autohide-time-modifier = 0.0; 15 | expose-animation-duration = 0.0; 16 | orientation = "right"; 17 | }; 18 | finder.CreateDesktop = false; 19 | trackpad = { 20 | Clicking = true; 21 | Dragging = true; 22 | }; 23 | SoftwareUpdate.AutomaticallyInstallMacOSUpdates = true; 24 | NSGlobalDomain."com.apple.mouse.tapBehavior" = 1; 25 | }; 26 | 27 | environment.shells = [ pkgs.bashInteractive pkgs.zsh ]; 28 | 29 | # Used for backwards compatibility, please read the changelog before changing. 30 | # $ darwin-rebuild changelog 31 | system.stateVersion = 5; 32 | } 33 | -------------------------------------------------------------------------------- /machines/loqius/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, config, modulesPath, lib, ... }: { 2 | imports = [ 3 | (modulesPath + "/installer/scan/not-detected.nix") 4 | ../../configuration.nix 5 | ]; 6 | 7 | boot = { 8 | initrd = { 9 | availableKernelModules = 10 | [ "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ]; 11 | 12 | luks.devices = { 13 | "luks-8c09cc4c-b161-41a5-9894-f6b1ee241176".device = 14 | "/dev/disk/by-uuid/8c09cc4c-b161-41a5-9894-f6b1ee241176"; 15 | "luks-f4d4ec1c-5556-4e7f-8eed-de692a3c40f1".device = 16 | "/dev/disk/by-uuid/f4d4ec1c-5556-4e7f-8eed-de692a3c40f1"; 17 | }; 18 | }; 19 | kernelModules = [ "v4l2loopback" "kvm-intel" ]; 20 | extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ]; 21 | }; 22 | 23 | powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 24 | hardware.cpu.intel.updateMicrocode = 25 | lib.mkDefault config.hardware.enableRedistributableFirmware; 26 | 27 | security.tpm2 = { 28 | enable = true; 29 | pkcs11.enable = true; 30 | }; 31 | 32 | services.upower.enable = true; 33 | 34 | hardware.bluetooth = { 35 | enable = true; 36 | powerOnBoot = true; 37 | }; 38 | 39 | networking = { 40 | hostName = "loqius"; 41 | networkmanager = { 42 | enable = true; 43 | wifi.backend = "iwd"; 44 | }; 45 | useDHCP = false; 46 | interfaces = { 47 | enp0s31f6.useDHCP = true; 48 | wlan0.useDHCP = true; 49 | }; 50 | }; 51 | 52 | # touchpad support! 53 | services.xserver = { 54 | enable = true; 55 | videoDrivers = [ "modesetting" ]; # ["displaylink" "modesetting"]; 56 | }; 57 | 58 | services.libinput = { 59 | enable = true; 60 | touchpad.naturalScrolling = true; 61 | }; 62 | 63 | fileSystems."/" = { 64 | device = "/dev/disk/by-uuid/11134cfa-0421-4197-b791-003514a34788"; 65 | fsType = "ext4"; 66 | }; 67 | 68 | fileSystems."/boot" = { 69 | device = "/dev/disk/by-uuid/C7ED-D0DA"; 70 | fsType = "vfat"; 71 | }; 72 | 73 | swapDevices = 74 | [{ device = "/dev/disk/by-uuid/eedd8e17-c04f-4338-8baf-bf6b5ca11688"; }]; 75 | 76 | programs.gnupg.agent = { 77 | enable = true; 78 | pinentryPackage = pkgs.pinentry-tty; 79 | }; 80 | 81 | system.stateVersion = "23.05"; 82 | } 83 | -------------------------------------------------------------------------------- /machines/plutonium/default.nix: -------------------------------------------------------------------------------- 1 | { username, ... }: { 2 | imports = [ ../../configuration.nix ]; 3 | 4 | wsl = { 5 | enable = true; 6 | defaultUser = "${username}"; 7 | startMenuLaunchers = true; 8 | interop.register = false; 9 | }; 10 | networking.hostName = "plutonium"; # because it glows... got it? 11 | 12 | services.tailscale.enable = true; 13 | system.stateVersion = "24.11"; 14 | } 15 | -------------------------------------------------------------------------------- /machines/radium/default.nix: -------------------------------------------------------------------------------- 1 | { modulesPath, ... }: { 2 | imports = 3 | [ (modulesPath + "/profiles/qemu-guest.nix") ../../configuration.nix ]; 4 | 5 | boot = { 6 | initrd.availableKernelModules = 7 | [ "xhci_pci" "virtio_pci" "usbhid" "nvme" "usb_storage" "sr_mod" ]; 8 | kernelModules = [ ]; 9 | extraModulePackages = [ ]; 10 | binfmt.emulatedSystems = [ "x86_64-linux" ]; 11 | }; 12 | 13 | networking = { 14 | hostName = "radium"; 15 | networkmanager = { 16 | enable = true; 17 | wifi.backend = "iwd"; 18 | }; 19 | useDHCP = false; 20 | interfaces.ens160.useDHCP = true; 21 | }; 22 | 23 | fileSystems."/" = { 24 | device = "/dev/disk/by-label/NIXMAIN"; 25 | fsType = "ext4"; 26 | }; 27 | 28 | fileSystems."/boot" = { 29 | device = "/dev/disk/by-label/NIXBOOT"; 30 | fsType = "vfat"; 31 | }; 32 | 33 | swapDevices = [ ]; 34 | 35 | environment.variables.LIBGL_ALWAYS_SOFTWARE = "1"; 36 | 37 | services.xserver = { 38 | # Sucks to be me, i have to adjust it every time i move cable / connections 39 | # Thank you x11... 40 | # Well also under wayland this won't work as intented..... 41 | 42 | # Linux desktop truly is a mess. 43 | displayManager.sessionCommands = '' 44 | xrandr \ 45 | --output Virtual-1 --mode 1512x982 --rate 60 --pos 0x0 \ 46 | ''; 47 | }; 48 | 49 | security.sudo.wheelNeedsPassword = false; 50 | 51 | networking.firewall.enable = false; 52 | 53 | system.stateVersion = "24.11"; 54 | } 55 | -------------------------------------------------------------------------------- /machines/serotonine/default.nix: -------------------------------------------------------------------------------- 1 | { modulesPath, ... }: { 2 | imports = [ 3 | (modulesPath + "/installer/scan/not-detected.nix") 4 | ../../configuration.nix 5 | ]; 6 | 7 | boot = { 8 | initrd.availableKernelModules = 9 | [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ]; 10 | kernelModules = [ "kvm-intel" ]; 11 | extraModulePackages = [ ]; 12 | }; 13 | 14 | security.tpm2 = { 15 | enable = true; 16 | pkcs11.enable = true; 17 | }; 18 | 19 | networking = { 20 | hostName = "serotonine"; 21 | networkmanager = { 22 | enable = true; 23 | wifi.backend = "iwd"; 24 | }; 25 | useDHCP = false; 26 | interfaces = { 27 | enp0s31f6.useDHCP = true; 28 | wlp4s0.useDHCP = true; 29 | }; 30 | }; 31 | 32 | # touchpad support! 33 | services.libinput.enable = true; 34 | 35 | fileSystems."/" = { 36 | device = "/dev/disk/by-uuid/6939f3c9-d0e8-42cf-ab2f-cc2b184f637d"; 37 | fsType = "ext4"; 38 | }; 39 | 40 | fileSystems."/boot/efi" = { 41 | device = "/dev/disk/by-uuid/B1B4-DF6F"; 42 | fsType = "vfat"; 43 | }; 44 | 45 | swapDevices = 46 | [{ device = "/dev/disk/by-uuid/b28aea64-8b57-405d-a64f-d17f425cf472"; }]; 47 | 48 | system.stateVersion = "24.11"; 49 | } 50 | -------------------------------------------------------------------------------- /machines/vocatius/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, config, modulesPath, lib, ... }: { 2 | imports = [ 3 | (modulesPath + "/installer/scan/not-detected.nix") 4 | ../../configuration.nix 5 | ]; 6 | 7 | boot = { 8 | kernelPackages = pkgs.linuxPackages_latest; 9 | initrd = { 10 | kernelModules = [ "i915" ]; 11 | availableKernelModules = 12 | [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; 13 | 14 | luks.devices = { 15 | "luks-06f18c4c-8042-4568-a1da-28f99e41fa1c".device = 16 | "/dev/disk/by-uuid/06f18c4c-8042-4568-a1da-28f99e41fa1c"; 17 | "luks-bc52c8db-7acd-4e9f-81c4-13f442041b24".device = 18 | "/dev/disk/by-uuid/bc52c8db-7acd-4e9f-81c4-13f442041b24"; 19 | }; 20 | }; 21 | kernelModules = [ "v4l2loopback" "kvm-intel" "wireguard" ]; 22 | extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ]; 23 | }; 24 | 25 | powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 26 | hardware = { 27 | enableRedistributableFirmware = true; 28 | cpu.intel.updateMicrocode = true; 29 | intel-gpu-tools.enable = true; 30 | graphics = { 31 | package = pkgs.mesa; 32 | enable32Bit = true; 33 | package32 = pkgs.pkgsi686Linux.mesa; 34 | extraPackages = [ pkgs.intel-media-driver ]; 35 | }; 36 | bluetooth = { 37 | enable = true; 38 | powerOnBoot = true; 39 | }; 40 | }; 41 | 42 | security.tpm2 = { 43 | enable = true; 44 | pkcs11.enable = true; 45 | }; 46 | 47 | environment.systemPackages = [ 48 | pkgs.intel-ocl 49 | pkgs.intel-vaapi-driver 50 | pkgs.vaapiVdpau 51 | pkgs.libvdpau-va-gl 52 | pkgs.egl-wayland 53 | pkgs.libva-utils 54 | ]; 55 | 56 | environment.sessionVariables = { 57 | LIBVA_DRIVER_NAME = "iHD"; 58 | }; 59 | 60 | services.upower.enable = true; 61 | 62 | networking = { 63 | hostName = "vocatius"; 64 | networkmanager = { 65 | enable = true; 66 | wifi.backend = "iwd"; 67 | }; 68 | useDHCP = false; 69 | interfaces = { 70 | eno1.useDHCP = true; 71 | }; 72 | wireguard.enable = true; 73 | firewall = { 74 | allowedUDPPorts = [ 5182 ]; 75 | logReversePathDrops = true; 76 | extraCommands = '' 77 | ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport 5182 -j RETURN 78 | ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport 5182 -j RETURN 79 | ''; 80 | extraStopCommands = '' 81 | ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport 5182 -j RETURN || true 82 | ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 5182 -j RETURN || true 83 | ''; 84 | }; 85 | }; 86 | 87 | fileSystems."/" = { 88 | device = "/dev/disk/by-uuid/f4158a43-6e4c-4c61-8c97-895470eed2d2"; 89 | fsType = "ext4"; 90 | }; 91 | 92 | fileSystems."/boot" = { 93 | device = "/dev/disk/by-uuid/D665-5172"; 94 | fsType = "vfat"; 95 | }; 96 | 97 | swapDevices = 98 | [{ device = "/dev/disk/by-uuid/ec3eb762-055f-4340-8230-58c0395e6edc"; }]; 99 | 100 | programs.gnupg.agent = { 101 | enable = true; 102 | pinentryPackage = pkgs.pinentry-tty; 103 | }; 104 | 105 | system.stateVersion = "24.11"; 106 | } 107 | -------------------------------------------------------------------------------- /modules/arcan/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | environment.systemPackages = [ 3 | # Arcan 4 | pkgs.arcan #pkgs.xarcan 5 | pkgs.arcan-all-wrapped 6 | 7 | # Arcan WM 8 | pkgs.durden 9 | 10 | # Cat9 / Shell / LASH 11 | pkgs.cat9 12 | ]; 13 | } 14 | -------------------------------------------------------------------------------- /modules/boot/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | boot = { 3 | initrd.systemd = { 4 | enable = true; 5 | tpm2.enable = true; 6 | }; 7 | 8 | loader = { 9 | efi.canTouchEfiVariables = true; 10 | systemd-boot = { 11 | enable = true; 12 | memtest86.enable = true; 13 | configurationLimit = 10; 14 | }; 15 | }; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /modules/boot/lanzaboote.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: { 2 | environment.systemPackages = [ 3 | pkgs.sbctl 4 | ]; 5 | 6 | boot.loader.systemd-boot.enable = lib.mkForce false; 7 | 8 | boot.lanzaboote = { 9 | enable = true; 10 | pkiBundle = "/etc/secureboot"; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /modules/cachix/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | programs.dconf.enable = true; 3 | nix.settings = { 4 | # auto-optimise-store = true; 5 | experimental-features = [ "nix-command" "flakes" ]; 6 | 7 | substituters = [ 8 | "https://nix-community.cachix.org" 9 | "https://helix.cachix.org" 10 | "https://nix-gaming.cachix.org" 11 | "https://cosmic.cachix.org" 12 | ]; 13 | 14 | trusted-public-keys = [ 15 | "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" 16 | "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" 17 | "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" 18 | "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" 19 | ]; 20 | 21 | trusted-users = [ "root" "@wheel" ]; 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /modules/common/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, username, ... }: { 2 | 3 | system.switch = { 4 | enable = false; 5 | enableNg = true; 6 | }; 7 | 8 | services.usbmuxd = { 9 | enable = true; 10 | package = pkgs.usbmuxd2; 11 | }; 12 | 13 | environment.sessionVariables = { 14 | NH_FLAKE = "/home/${username}/dev/nixos-config"; 15 | STEEL_HOME = "/home/${username}/.config/steel"; 16 | }; 17 | 18 | environment.systemPackages = with pkgs; [ 19 | # phone 20 | libimobiledevice 21 | ifuse 22 | # 23 | nh 24 | nvd 25 | nix-output-monitor 26 | eza 27 | zoxide 28 | bat 29 | fzf 30 | ripgrep 31 | uutils-coreutils 32 | linuxPackages_latest.perf 33 | ]; 34 | } 35 | -------------------------------------------------------------------------------- /modules/distcc/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | services.distccd = { 3 | enable = true; 4 | openFirewall = true; 5 | allowedClients = [ "127.0.0.1" "192.168.0.0/24" ]; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /modules/experimental/guix.nix: -------------------------------------------------------------------------------- 1 | _: { services.guix = { enable = true; }; } 2 | -------------------------------------------------------------------------------- /modules/font/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, config, ... }: 2 | let 3 | fontList = [ 4 | pkgs.rictydiminished-with-firacode 5 | pkgs.noto-fonts 6 | pkgs.noto-fonts-cjk-sans 7 | pkgs.noto-fonts-cjk-serif 8 | pkgs.wqy_zenhei 9 | pkgs.noto-fonts-emoji-blob-bin 10 | pkgs.lilex 11 | pkgs.nerd-fonts.lilex 12 | pkgs.weather-icons 13 | ]; 14 | setupFonts = system: 15 | if system != "aarch64-darwin" then { 16 | fonts = { packages = fontList; }; 17 | } else { 18 | fonts = { fonts = fontList; }; 19 | }; 20 | 21 | in { 22 | fonts = (setupFonts config.system).fonts; 23 | 24 | environment.systemPackages = [ pkgs.adwaita-icon-theme ]; 25 | } 26 | -------------------------------------------------------------------------------- /modules/greetd/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | environment.systemPackages = [ pkgs.greetd.tuigreet ]; 3 | 4 | services.greetd = { 5 | enable = true; 6 | settings.default_session = { 7 | command = 8 | "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd Hyprland --time --asterisks"; 9 | }; 10 | vt = 7; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /modules/libvirtd/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, username, ... }: { 2 | users.groups.qemu-libvirtd = { }; 3 | users.users.qemu-libvirtd.group = "qemu-libvirtd"; 4 | programs.virt-manager.enable = true; 5 | 6 | virtualisation = { 7 | libvirtd = { 8 | enable = true; 9 | onBoot = "ignore"; 10 | onShutdown = "shutdown"; 11 | qemu.ovmf.enable = true; 12 | qemu.swtpm.enable = true; 13 | 14 | qemu.package = pkgs.qemu_kvm; 15 | qemu.runAsRoot = true; 16 | deviceACL = [ "/dev/vfio/vfio" "/dev/kvm" "/dev/kvmfr0" "/dev/null" ]; 17 | 18 | scopedHooks.qemu = { 19 | "10-rewire-gpu" = { 20 | enable = true; 21 | scope = { 22 | objects = [ "win11" ]; 23 | operations = [ "prepare" ]; 24 | }; 25 | script = '' 26 | echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind 27 | 28 | modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia 29 | 30 | #unbind gpu 31 | virsh nodedev-detach pci_0000_08_00_0 32 | virsh nodedev-detach pci_0000_08_00_1 33 | 34 | modprobe vfio-pci 35 | ''; 36 | }; 37 | 38 | "10-undo-rewire-gpu" = { 39 | enable = true; 40 | scope = { 41 | objects = [ "win11" ]; 42 | operations = [ "release" ]; 43 | }; 44 | script = '' 45 | virsh nodedev-reattach pci_0000_08_00_1 46 | virsh nodedev-reattach pci_0000_08_00_0 47 | 48 | modprobe nvidia 49 | modprobe nvidia_modeset 50 | modprobe nvidia_uvm 51 | modprobe nvidia_drm 52 | 53 | echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind 54 | ''; 55 | }; 56 | }; 57 | }; 58 | 59 | vfio = { 60 | enable = true; 61 | IOMMUType = "amd"; 62 | ignoreMSRs = true; 63 | # devices = [ 64 | # "10de:2216" # rtx 3080 65 | # "10de:1aef" # audio controller (nvidia) 66 | # ]; 67 | }; 68 | 69 | kvmfr = { 70 | enable = true; 71 | devices = [{ 72 | resolution = { 73 | width = 1920; 74 | height = 1080; 75 | pixelFormat = "rgba32"; 76 | }; 77 | 78 | permissions = { 79 | user = username; 80 | group = "qemu-libvirtd"; 81 | mode = "0660"; 82 | }; 83 | }]; 84 | }; 85 | 86 | spiceUSBRedirection.enable = true; 87 | }; 88 | } 89 | -------------------------------------------------------------------------------- /modules/ly/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | services.displayManager.ly = { 3 | enable = true; 4 | settings = { 5 | lang = "jp"; 6 | clear_password = "true"; 7 | }; 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /modules/mullvad/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | services.mullvad-vpn = { 3 | enable = true; 4 | package = pkgs.mullvad-vpn; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /modules/nvidia/default.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: { 2 | hardware.nvidia = { 3 | powerManagement.enable = true; 4 | modesetting.enable = true; 5 | package = config.boot.kernelPackages.nvidiaPackages.latest; 6 | open = true; 7 | nvidiaSettings = true; 8 | }; 9 | 10 | boot.kernelParams = [ "nvidia.NVreg_PreserveVideoMemoryAllocations=1" "nvidia-drm.modeset=1" ]; 11 | 12 | hardware.graphics = { 13 | enable = true; 14 | enable32Bit = true; 15 | extraPackages = [ pkgs.nvidia-vaapi-driver ]; 16 | }; 17 | 18 | services.xserver = { 19 | enable = true; 20 | videoDrivers = [ "nvidia" ]; 21 | }; 22 | 23 | environment.systemPackages = [ 24 | pkgs.libva 25 | pkgs.libva-utils 26 | pkgs.vulkan-tools 27 | ]; 28 | 29 | environment.sessionVariables = { 30 | NVD_BACKEND = "direct"; 31 | LIBVA_DRIVER_NAME = "nvidia"; 32 | GBM_BACKEND = "nvidia-drm"; 33 | VDPAU_DRIVER = "nvidia"; 34 | __GLX_VENDOR_LIBRARY_NAME = "nvidia"; 35 | 36 | MOZ_DISABLE_RDD_SANDBOX = 1; 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /modules/sddm/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, inputs, ... }: { 2 | qt = { 3 | enable = true; 4 | platformTheme = "gtk2"; 5 | style = "gtk2"; 6 | }; 7 | 8 | environment.systemPackages = with pkgs; [ libsForQt5.qt5.qtgraphicaleffects ]; 9 | 10 | services.xserver.displayManager = { 11 | sddm = { 12 | enable = true; 13 | theme = "${inputs.sddm-theme}"; 14 | }; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /modules/sound/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | environment.systemPackages = with pkgs; [ pavucontrol ]; 3 | services.pipewire = { 4 | enable = true; 5 | alsa.enable = true; 6 | pulse.enable = true; 7 | extraConfig.pipewire."99-latency.tuning" = { 8 | "context.properties" = { 9 | "link.max-buffers" = 16; 10 | "log.level" = 2; 11 | "default.clock.rate" = 48000; 12 | "default.clock.allowed-rates" = [ 44100 48000 ]; 13 | "default.clock.quantum" = 2048; 14 | "api.alsa.headroom" = 1024; 15 | "default.clock.min-quantum" = 48; 16 | "default.clock.max-quantum" = 8192; 17 | }; 18 | }; 19 | }; 20 | 21 | # allow realtime priority for audio group 22 | security = { 23 | rtkit.enable = true; 24 | pam.loginLimits = [ 25 | { 26 | domain = "@audio"; 27 | item = "memlock"; 28 | type = "-"; 29 | value = "unlimited"; 30 | } 31 | { 32 | domain = "@audio"; 33 | item = "rtprio"; 34 | type = "-"; 35 | value = "99"; 36 | } 37 | { 38 | domain = "@audio"; 39 | item = "nofile"; 40 | type = "soft"; 41 | value = "99999"; 42 | } 43 | { 44 | domain = "@audio"; 45 | item = "nofile"; 46 | type = "hard"; 47 | value = "99999"; 48 | } 49 | { 50 | domain = "@audio"; 51 | item = "nice"; 52 | type = "-"; 53 | value = "-15"; 54 | } 55 | ]; 56 | }; 57 | } 58 | -------------------------------------------------------------------------------- /modules/ssh/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | environment.systemPackages = with pkgs; [ opensc ]; 3 | 4 | virtualisation.docker.enable = true; 5 | 6 | services.openssh.enable = true; 7 | services.pcscd.enable = true; 8 | 9 | programs.ssh = { 10 | startAgent = true; 11 | agentPKCS11Whitelist = "${pkgs.opensc}/lib/opensc-pkcs11.so"; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/steam/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | programs.steam.enable = true; 3 | hardware.steam-hardware.enable = true; 4 | } 5 | -------------------------------------------------------------------------------- /modules/stylix/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | stylix = { 3 | enable = true; 4 | autoEnable = true; 5 | polarity = "dark"; 6 | base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-storm.yaml"; 7 | image = ../../images/background0.jpg; 8 | opacity = { 9 | terminal = 0.9; 10 | popups = 0.8; 11 | }; 12 | 13 | targets = { 14 | plymouth.enable = false; 15 | grub.enable = false; 16 | }; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /modules/time/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | environment.systemPackages = with pkgs; [ 3 | fcitx5-configtool 4 | openal 5 | harfbuzz 6 | libxkbcommon 7 | ]; 8 | 9 | time = { 10 | timeZone = "Europe/Berlin"; 11 | hardwareClockInLocalTime = true; 12 | }; 13 | 14 | # services.xserver = { 15 | # enable = true; 16 | # xkb = { 17 | # layout = "eu"; 18 | # options = "compose:ralt"; 19 | # }; 20 | # }; 21 | 22 | i18n = { 23 | defaultLocale = "en_US.UTF-8"; 24 | extraLocales = [ "en_US.UTF-8/UTF-8" "ja_JP.UTF-8/UTF-8" ]; 25 | extraLocaleSettings = { 26 | LANGUAGE = "en_US.UTF-8"; 27 | LC_ALL = "en_US.UTF-8"; 28 | LC_ADDRESS = "de_DE.UTF-8"; 29 | LC_IDENTIFICATION = "de_DE.UTF-8"; 30 | LC_MEASUREMENT = "de_DE.UTF-8"; 31 | LC_MONETARY = "de_DE.UTF-8"; 32 | LC_NAME = "de_DE.UTF-8"; 33 | LC_NUMERIC = "de_DE.UTF-8"; 34 | LC_PAPER = "de_DE.UTF-8"; 35 | LC_TELEPHONE = "de_DE.UTF-8"; 36 | LC_TIME = "de_DE.UTF-8"; 37 | }; 38 | inputMethod = { 39 | enable = true; 40 | type = "fcitx5"; 41 | fcitx5.addons = with pkgs; [ 42 | fcitx5-mozc 43 | fcitx5-gtk 44 | fcitx5-rose-pine 45 | fcitx5-configtool 46 | # fcitx5-skk 47 | ]; 48 | }; 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /modules/user/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, username, ... }: { 2 | users.users.${username} = { 3 | home = 4 | "${if pkgs.stdenvNoCC.isDarwin then "/Users" else "/home"}/${username}"; 5 | 6 | shell = pkgs.zsh; 7 | isNormalUser = true; 8 | group = "users"; 9 | password = "12345"; 10 | extraGroups = [ 11 | "wheel" 12 | "networkmanager" 13 | "audio" 14 | "docker" 15 | "qemu-libvirtd" 16 | "libvirtd" 17 | "kvm" 18 | ]; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/variables/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | environment.variables = { 3 | EDITOR = "hx"; 4 | VISUAL = "hx"; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /modules/waydroid/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | virtualisation = { 3 | lxd.enable = true; 4 | waydroid.enable = true; 5 | }; 6 | 7 | # TODO: In future add the waydroid-helper script here 8 | 9 | # Getting started: 10 | # `sudo waydroid init -s GAPPS` 11 | 12 | # control: 13 | # `waydroid session start` 14 | # `waydroid session stop` 15 | # `waydroid show-full-ui` 16 | 17 | # Good as well (for 1920x1080): 18 | # `waydroid prop set waydroid.persist.width 1920` 19 | # `waydroid prop set waydroid.persist.height 1050` # play around with value 20 | 21 | # https://github.com/casualsnek/waydroid_script 22 | # libndk / libhoudini for arm translation 23 | 24 | # Launching BA requires another fix: 25 | # see: 26 | # libhoudini: https://github.com/waydroid/waydroid/issues/788#issuecomment-2162386712 27 | # libndk: https://github.com/waydroid/waydroid/issues/788#issuecomment-2167334937 28 | 29 | # then it should work. 30 | # Worked for me at least XD 31 | } 32 | -------------------------------------------------------------------------------- /modules/wayland/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | xdg.portal = { 4 | enable = true; 5 | xdgOpenUsePortal = true; 6 | 7 | config = { 8 | common.default = [ "gtk" ]; 9 | hyprland.default = [ "gtk" "hyprland" ]; 10 | }; 11 | 12 | extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; 13 | }; 14 | 15 | security.pam.services = { waylock = { unixAuth = true; }; }; 16 | 17 | services.gvfs.enable = true; 18 | environment.systemPackages = with pkgs; [ 19 | libva 20 | 21 | wl-clipboard 22 | 23 | wayland 24 | wayland-utils 25 | 26 | xwayland 27 | 28 | waylock 29 | ]; 30 | 31 | # lol? 32 | services.desktopManager.cosmic = { 33 | enable = true; 34 | xwayland.enable = true; 35 | }; 36 | 37 | programs.hyprland.enable = true; 38 | environment.sessionVariables = { 39 | NIXOS_OZONE_WL = "1"; 40 | GDK_DEBUG = "gl-disable-gles"; 41 | 42 | CLUTTER_BACKEND = "wayland"; 43 | SDL_VIDEODRIVER = "wayland"; 44 | QT_QPA_PLATFORM = "wayland"; 45 | 46 | __GL_GSYNC_ALLOWED = "0"; 47 | __GL_VRR_ALLOWED = "0"; 48 | __GL_MAXFRAMESALLOWED = "1"; 49 | 50 | _JAVA_AWT_WM_NONREPARENTING = "1"; 51 | NO_AT_BRIDGE = "1"; 52 | MOZ_ENABLE_WAYLAND = "1"; 53 | KITTY_ENABLE_WAYLAND = "1"; 54 | QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; 55 | }; 56 | } 57 | -------------------------------------------------------------------------------- /modules/wireguard/default.nix: -------------------------------------------------------------------------------- 1 | _: { 2 | networking.wireguard = { 3 | enable = true; 4 | useNetworkd = true; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /modules/x11/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: { 2 | services.xserver = { 3 | enable = true; 4 | displayManager.defaultSession = "none+xmonad"; 5 | desktopManager.runXdgAutostartIfNone = true; 6 | windowManager.xmonad = { 7 | enable = true; 8 | enableContribAndExtras = true; 9 | extraPackages = haskellPackages: [ pkgs.xmonad-log ]; 10 | config = ./xmonad.hs; 11 | }; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /modules/x11/xmonad.hs: -------------------------------------------------------------------------------- 1 | import Data.Monoid 2 | import Data.Maybe (maybeToList) 3 | import Control.Monad (join, when) 4 | import System.Exit 5 | 6 | import XMonad 7 | 8 | import XMonad.Util.SpawnOnce 9 | import XMonad.Util.Cursor 10 | 11 | import XMonad.Layout.LayoutModifier (ModifiedLayout) 12 | import XMonad.Layout.Spacing (Border (Border), Spacing, spacingRaw) 13 | import XMonad.Layout.BinarySpacePartition 14 | import XMonad.Layout.ToggleLayouts 15 | 16 | import XMonad.Hooks.EwmhDesktops 17 | import XMonad.Hooks.ManageDocks 18 | 19 | import qualified XMonad.StackSet as W 20 | import qualified Data.Map as M 21 | 22 | -- ovrDefaultTerm = "alacritty" 23 | ovrDefaultTerm = "kitty" -- let's try it out! :) 24 | 25 | ovrClickJustFocuses :: Bool 26 | ovrClickJustFocuses = True 27 | 28 | ovrFollowMouseFocus :: Bool 29 | ovrFollowMouseFocus = True 30 | 31 | ovrBorderWidth = 2 32 | 33 | ovrWorkspaces = ["一", "二", "三", "四", "五", "六", "七", "八", "九"] 34 | 35 | ovrFocusedColor = "#8031ca" 36 | ovrNormalColor = "#4a25aa" 37 | 38 | ovrModMask = mod4Mask 39 | 40 | rofiShowRun = spawn "dmenu_run -l 15 -fn 'Lilex Nerd Font Regular-16' -nb '#24283b' -nf '#a9b1d6' -sb '#414868' -sf '#7aa2f7' -p '-> ' &" 41 | rofiShowShutdown = spawn "rofi -show menu -modi 'menu:rofi-power-menu' &" 42 | networkManager = spawn "networkmanager_dmenu -l 15 -fn 'Lilex Nerd Font-16' -nb '#24283b' -nf '#a9b1d6' -sb '#414868' -sf '#7aa2f7' &" 43 | screenshot = spawn "flameshot gui" 44 | newTerm = spawn "/home/dev/.local/bin/ghostty" 45 | 46 | 47 | ovrKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ 48 | [ 49 | ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf) 50 | , ((modm, xK_Return), newTerm) 51 | , ((modm, xK_p ), rofiShowRun) 52 | , ((modm, xK_n ), networkManager) 53 | , ((modm .|. shiftMask, xK_p ), rofiShowShutdown) 54 | , ((modm .|. shiftMask, xK_q ), kill) 55 | , ((modm, xK_space ), sendMessage NextLayout) 56 | , ((modm, xK_f ), sendMessage $ Toggle "Full") 57 | , ((modm .|. shiftMask, xK_n ), refresh) 58 | , ((controlMask, xK_Print ), screenshot) 59 | , ((modm, xK_r ), sendMessage $ Rotate) 60 | , ((modm, xK_j ), windows W.focusDown) 61 | , ((modm, xK_k ), windows W.focusUp) 62 | , ((modm, xK_m ), windows W.focusMaster) 63 | , ((modm, xK_v ), windows W.swapMaster) 64 | , ((modm .|. shiftMask, xK_j ), windows W.swapDown) 65 | , ((modm .|. shiftMask, xK_k ), windows W.swapUp) 66 | , ((modm, xK_h ), sendMessage Shrink) 67 | , ((modm, xK_l ), sendMessage Expand) 68 | , ((modm, xK_t ), withFocused $ windows . W.sink) 69 | , ((modm , xK_comma ), sendMessage (IncMasterN 1)) 70 | , ((modm , xK_period), sendMessage (IncMasterN (-1))) 71 | , ((modm .|. shiftMask .|. controlMask, xK_q ), io (exitWith ExitSuccess)) 72 | , ((modm .|. shiftMask, xK_r ), spawn "xmonad --restart") 73 | , ((modm .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -")) 74 | ] 75 | ++ 76 | 77 | -- mod-[1..9], Switch to workspace N 78 | -- mod-shift-[1..9], Move client to workspace N 79 | [((m .|. modm, k), windows $ f i) 80 | | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] 81 | , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] 82 | ++ 83 | 84 | -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3 85 | -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3 86 | [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f)) 87 | | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..] 88 | , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]] 89 | 90 | ovrMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $ 91 | 92 | -- mod-button1, Set the window to floating mode and move by dragging 93 | [ ((modm, button1), (\w -> focus w >> mouseMoveWindow w 94 | >> windows W.shiftMaster)) 95 | 96 | -- mod-button2, Raise the window to the top of the stack 97 | , ((modm, button2), (\w -> focus w >> windows W.shiftMaster)) 98 | 99 | -- mod-button3, Set the window to floating mode and resize by dragging 100 | , ((modm, button3), (\w -> focus w >> mouseResizeWindow w 101 | >> windows W.shiftMaster)) 102 | ] 103 | 104 | ------------------------------------------------------------------------ 105 | -- Layouts: 106 | 107 | -- You can specify and transform your layouts by modifying these values. 108 | -- If you change layout bindings be sure to use 'mod-shift-space' after 109 | -- restarting (with 'mod-q') to reset your layout state to the new 110 | -- defaults, as xmonad preserves your old layout settings by default. 111 | -- 112 | -- The available layouts. Note that each layout is separated by |||, 113 | -- which denotes layout choice. 114 | -- 115 | 116 | createSpacing :: Integer -> l a -> ModifiedLayout Spacing l a 117 | createSpacing i = spacingRaw True (Border 0 i 0 i) True (Border i 0 i 0) True 118 | 119 | ovrLayout = avoidStruts ((toggleLayouts Full) (createSpacing 8 $ Tall 1 (12/100) (1/2) ||| emptyBSP)) 120 | 121 | -- Essentially just managing 122 | -- e.g. "start MPlayer" -> "as floating" 123 | -- ovrManageHook = mempty 124 | -- composeAll 125 | -- [ className =? "MPlayer" --> doFloat 126 | -- , className =? "Gimp" --> doFloat 127 | -- , resource =? "desktop_window" --> doIgnore 128 | -- , resource =? "kdesktop" --> doIgnore ] 129 | 130 | ovrEventHook = mempty 131 | 132 | ovrLogHook :: X () 133 | ovrLogHook = mempty 134 | 135 | ovrStartupHook :: X () 136 | ovrStartupHook = do 137 | setDefaultCursor xC_left_ptr 138 | spawnOnce "eww daemon" 139 | spawnOnce "picom" 140 | spawnOnce "dunst" 141 | spawnOnce "eww open-many main-bar status2 status3" 142 | 143 | defaults = def { 144 | terminal = ovrDefaultTerm, 145 | focusFollowsMouse = ovrFollowMouseFocus, 146 | clickJustFocuses = ovrClickJustFocuses, 147 | borderWidth = ovrBorderWidth, 148 | modMask = ovrModMask, 149 | workspaces = ovrWorkspaces, 150 | normalBorderColor = ovrNormalColor, 151 | focusedBorderColor = ovrFocusedColor, 152 | 153 | keys = ovrKeys, 154 | mouseBindings = ovrMouseBindings, 155 | 156 | layoutHook = ovrLayout, 157 | -- manageHook = ovrManageHook, 158 | handleEventHook = ovrEventHook, 159 | logHook = ovrLogHook, 160 | startupHook = ovrStartupHook 161 | } 162 | 163 | help :: String 164 | help = unlines ["Help:"] 165 | 166 | main :: IO () 167 | main = do 168 | xmonad $ docks $ ewmh $ ewmhFullscreen $ defaults 169 | -------------------------------------------------------------------------------- /profiles/dev/default.nix: -------------------------------------------------------------------------------- 1 | _: 2 | let asPath = paths: map (path: ../../home + "/${path}") paths; 3 | in { 4 | home.stateVersion = "24.05"; 5 | xdg.enable = true; 6 | 7 | imports = asPath [ 8 | "stylix" 9 | 10 | "ags" 11 | "anki" 12 | "cli-tools" 13 | "development" 14 | "dunst" 15 | "editors/emacs" 16 | "email" 17 | "fuzzel" 18 | "ghostty" 19 | "gtk-theme" 20 | "guix" 21 | "jj" 22 | "kitty" 23 | "lazygit" 24 | "newsboat" 25 | "seto" 26 | "shells/zsh" 27 | "spicetify" 28 | # "spotify" 29 | "spotify-player" 30 | "user-apps" 31 | "work-specific" 32 | 33 | "editors/helix" 34 | "wayland/hyprland" 35 | ]; 36 | } 37 | -------------------------------------------------------------------------------- /profiles/dreamer/default.nix: -------------------------------------------------------------------------------- 1 | _: 2 | let asPath = paths: map (path: ../../home + "/${path}") paths; 3 | in { 4 | home.stateVersion = "23.11"; 5 | xdg.enable = true; 6 | 7 | imports = asPath [ 8 | "stylix" 9 | 10 | "ags" 11 | "anki" 12 | # "binary-ninja" 13 | "cli-tools" 14 | "development" 15 | "dunst" 16 | "fuzzel" 17 | "ghostty" 18 | "gtk-theme" 19 | "guix" 20 | # "kitty" 21 | # "lazygit" 22 | "jj" 23 | "newsboat" 24 | "spicetify" 25 | # "spotify" 26 | "spotify-player" 27 | "user-apps" 28 | "virtual" 29 | 30 | "editors/emacs" 31 | "editors/helix" 32 | "shells/zsh" 33 | "wayland/hyprland" 34 | ]; 35 | } 36 | -------------------------------------------------------------------------------- /profiles/lemon/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | let asPath = paths: map (path: ../../home + "/${path}") paths; 3 | in { 4 | home.stateVersion = "24.11"; 5 | home.homeDirectory = lib.mkForce "/Users/lemon"; 6 | xdg.enable = true; 7 | 8 | imports = asPath [ 9 | # "anki" 10 | "cli-tools" 11 | # "ghostty" # currently broken on macos 12 | "kitty" 13 | "jj" 14 | "newsboat" 15 | 16 | "development/darwin.nix" 17 | "editors/helix" 18 | "shells/zsh" 19 | "user-apps/darwin.nix" 20 | ]; 21 | } 22 | -------------------------------------------------------------------------------- /profiles/nightmare/default.nix: -------------------------------------------------------------------------------- 1 | _: 2 | let asPath = paths: map (path: ../../home + "/${path}") paths; 3 | in { 4 | home.stateVersion = "23.11"; 5 | xdg.enable = true; 6 | 7 | imports = asPath [ 8 | "cli-tools" 9 | "ghostty" 10 | "development" 11 | # "lazygit" 12 | "spotify-player" 13 | "jj" 14 | "pwn" 15 | 16 | "editors/helix" 17 | "shells/zsh" 18 | "shells/schemesh" 19 | ]; 20 | } 21 | -------------------------------------------------------------------------------- /profiles/spectre/default.nix: -------------------------------------------------------------------------------- 1 | _: 2 | let asPath = paths: map (path: ../../home + "/${path}") paths; 3 | in { 4 | home.stateVersion = "23.11"; 5 | xdg.enable = true; 6 | 7 | imports = asPath [ 8 | "cli-tools" 9 | "kitty" 10 | "lazygit" 11 | "x11" 12 | 13 | "development/darwin.nix" 14 | "editors/helix" 15 | "shells/zsh" 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /scripts/shutdown.ros: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | #|-*- mode:lisp -*-|# 3 | #| 4 | exec ros -Q -- $0 "$@" 5 | |# 6 | (progn ;;init forms 7 | (ros:ensure-asdf) 8 | #+quicklisp(ql:quickload '(uiop) :silent t) 9 | ) 10 | 11 | (defpackage :ros.script.shutdown 12 | (:use :cl)) 13 | (in-package :ros.script.shutdown) 14 | 15 | (defun show-power-menu () 16 | (let* ((menu-options '("Lock" 17 | "Hibernate" 18 | "Suspend" 19 | "Log Out" 20 | "Reboot" 21 | "Hard Reboot" 22 | "Shutdown")) 23 | (menu (format nil "~{~A~^~%~}" menu-options)) 24 | (menu-stream (make-string-input-stream menu)) 25 | (selection (uiop:run-program 26 | (list "fuzzel" 27 | "--dmenu" 28 | "-f" "Lilex Nerd Font" 29 | "-l" (write-to-string (length menu-options)) 30 | "--line-height=32" 31 | "-r" "0" 32 | "-w" "60" 33 | "--match-mode=fzf" 34 | "-p" "Power Menu: ") 35 | :input menu-stream 36 | :output :string 37 | :ignore-error-status t))) 38 | 39 | (cond 40 | ((search "Lock" selection) (uiop:run-program "hyprlock")) 41 | ((search "Hibernate" selection) (uiop:run-program (list "systemctl" "hibernate"))) 42 | ((search "Suspend" selection) (uiop:run-program (list "systemctl" "suspend"))) 43 | ((search "Log Out" selection) (uiop:run-program (list "hyprctl" "dispatch" "exit"))) 44 | ((search "Reboot" selection) (uiop:run-program (list "systemctl" "reboot"))) 45 | ((search "Hard reboot" selection) (uiop:run-program (list "pkexec" "echo" "b" ">" "/proc/sysrq-trigger"))) 46 | ((search "Shutdown" selection) (uiop:run-program (list "systemctl" "poweroff")))))) 47 | 48 | (defun main (&rest argv) 49 | (declare (ignorable argv)) 50 | (show-power-menu)) 51 | 52 | ;;; vim: set ft=lisp lisp: 53 | -------------------------------------------------------------------------------- /template/pwninit.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from pwn import * 3 | import warnings 4 | 5 | warnings.filterwarnings(action='ignore', category=BytesWarning) 6 | 7 | {bindings} 8 | 9 | context.binary = {bin_name} 10 | 11 | IP, PORT = "address", 12345 12 | 13 | gdbscript = ''' 14 | tbreak main 15 | continue 16 | ''' 17 | 18 | def start(): 19 | if args.GDB: 20 | return gdb.debug([elf.path], gdbscript) 21 | elif args.REMOTE: 22 | return remote(IP, PORT) 23 | else: 24 | return elf.process() 25 | 26 | p = start() 27 | 28 | # ----- Exploit ----- # 29 | 30 | p.interactive() 31 | --------------------------------------------------------------------------------