├── LICENSE ├── README.md ├── flake.lock ├── flake.nix ├── hyprland ├── config.nix ├── default.nix └── waybar │ ├── config.nix │ ├── default.nix │ └── style.css ├── modules ├── home │ ├── base │ │ ├── default.nix │ │ ├── git.nix │ │ └── shell.nix │ ├── browser │ │ └── default.nix │ ├── desktop │ │ ├── config │ │ │ ├── alacritty │ │ │ │ └── alacritty.toml │ │ │ ├── awesome │ │ │ │ ├── assets │ │ │ │ │ ├── centerpiece.jpg │ │ │ │ │ ├── wallpaper.kra │ │ │ │ │ └── wallpaper.png │ │ │ │ ├── rc.lua │ │ │ │ ├── textbat.lua │ │ │ │ └── theme.lua │ │ │ ├── flameshot │ │ │ │ └── flameshot.ini │ │ │ └── rofi │ │ │ │ └── config.rasi │ │ ├── configs.nix │ │ ├── default.nix │ │ ├── software.nix │ │ └── theme.nix │ └── develop │ │ ├── default.nix │ │ ├── neovim.nix │ │ └── software.nix └── system │ ├── base │ ├── default.nix │ ├── keyboard.nix │ ├── nixos.nix │ └── software.nix │ ├── desktop │ ├── awesome.nix │ ├── default.nix │ └── i18n.nix │ ├── runtimes │ ├── default.nix │ └── java.nix │ └── virtualisation │ └── default.nix ├── rebuild.sh ├── shell.nix ├── system ├── haumea │ ├── configuration.nix │ ├── hardware-configuration.nix │ ├── users │ │ └── cody │ │ │ ├── home.nix │ │ │ └── waybar │ │ │ ├── config │ │ │ └── style.css │ ├── vm.nix │ └── win10.xml └── thonkpad │ ├── configuration.nix │ ├── hardware-configuration.nix │ └── users │ └── cody │ └── home.nix └── update.sh /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Cody Q 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 | # System Flakes 2 | 3 | These are the flakes for my system 4 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "discordfetch": { 4 | "inputs": { 5 | "flake-utils": "flake-utils", 6 | "nixpkgs": [ 7 | "nixpkgs" 8 | ] 9 | }, 10 | "locked": { 11 | "lastModified": 1715564818, 12 | "narHash": "sha256-b+VD1i6kQv1APQ0E84ZrCSNVgCSLndwIStFijH3KulY=", 13 | "owner": "cody-quinn", 14 | "repo": "discordfetch", 15 | "rev": "0216de4bc93baf8948fd4d3eceb43fd1e0a3c5db", 16 | "type": "github" 17 | }, 18 | "original": { 19 | "owner": "cody-quinn", 20 | "repo": "discordfetch", 21 | "type": "github" 22 | } 23 | }, 24 | "flake-utils": { 25 | "inputs": { 26 | "systems": "systems" 27 | }, 28 | "locked": { 29 | "lastModified": 1710146030, 30 | "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", 31 | "owner": "numtide", 32 | "repo": "flake-utils", 33 | "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", 34 | "type": "github" 35 | }, 36 | "original": { 37 | "owner": "numtide", 38 | "repo": "flake-utils", 39 | "type": "github" 40 | } 41 | }, 42 | "home-manager": { 43 | "inputs": { 44 | "nixpkgs": [ 45 | "nixpkgs" 46 | ] 47 | }, 48 | "locked": { 49 | "lastModified": 1746413188, 50 | "narHash": "sha256-i6BoiQP0PasExESQHszC0reQHfO6D4aI2GzOwZMOI20=", 51 | "owner": "nix-community", 52 | "repo": "home-manager", 53 | "rev": "8a318641ac13d3bc0a53651feaee9560f9b2d89a", 54 | "type": "github" 55 | }, 56 | "original": { 57 | "owner": "nix-community", 58 | "repo": "home-manager", 59 | "type": "github" 60 | } 61 | }, 62 | "nixos-hardware": { 63 | "locked": { 64 | "lastModified": 1746468201, 65 | "narHash": "sha256-hSOSlrvMJwGr8hX/gc0mnhUf5UIClMDUAadfXlSXzfc=", 66 | "owner": "NixOS", 67 | "repo": "nixos-hardware", 68 | "rev": "6aabf68429c0a414221d1790945babfb6a0bd068", 69 | "type": "github" 70 | }, 71 | "original": { 72 | "owner": "NixOS", 73 | "ref": "master", 74 | "repo": "nixos-hardware", 75 | "type": "github" 76 | } 77 | }, 78 | "nixpkgs": { 79 | "locked": { 80 | "lastModified": 1746461020, 81 | "narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=", 82 | "owner": "nixos", 83 | "repo": "nixpkgs", 84 | "rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae", 85 | "type": "github" 86 | }, 87 | "original": { 88 | "owner": "nixos", 89 | "ref": "nixos-unstable", 90 | "repo": "nixpkgs", 91 | "type": "github" 92 | } 93 | }, 94 | "nixpkgs-stable": { 95 | "locked": { 96 | "lastModified": 1746422338, 97 | "narHash": "sha256-NTtKOTLQv6dPfRe00OGSywg37A1FYqldS6xiNmqBUYc=", 98 | "owner": "nixos", 99 | "repo": "nixpkgs", 100 | "rev": "5b35d248e9206c1f3baf8de6a7683fee126364aa", 101 | "type": "github" 102 | }, 103 | "original": { 104 | "owner": "nixos", 105 | "ref": "nixos-24.11", 106 | "repo": "nixpkgs", 107 | "type": "github" 108 | } 109 | }, 110 | "nixpkgs_2": { 111 | "locked": { 112 | "lastModified": 1745377448, 113 | "narHash": "sha256-jhZDfXVKdD7TSEGgzFJQvEEZ2K65UMiqW5YJ2aIqxMA=", 114 | "owner": "nixos", 115 | "repo": "nixpkgs", 116 | "rev": "507b63021ada5fee621b6ca371c4fca9ca46f52c", 117 | "type": "github" 118 | }, 119 | "original": { 120 | "owner": "nixos", 121 | "ref": "nixpkgs-unstable", 122 | "repo": "nixpkgs", 123 | "type": "github" 124 | } 125 | }, 126 | "root": { 127 | "inputs": { 128 | "discordfetch": "discordfetch", 129 | "home-manager": "home-manager", 130 | "nixos-hardware": "nixos-hardware", 131 | "nixpkgs": "nixpkgs", 132 | "nixpkgs-stable": "nixpkgs-stable", 133 | "treefmt-nix": "treefmt-nix" 134 | } 135 | }, 136 | "systems": { 137 | "locked": { 138 | "lastModified": 1681028828, 139 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 140 | "owner": "nix-systems", 141 | "repo": "default", 142 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 143 | "type": "github" 144 | }, 145 | "original": { 146 | "owner": "nix-systems", 147 | "repo": "default", 148 | "type": "github" 149 | } 150 | }, 151 | "treefmt-nix": { 152 | "inputs": { 153 | "nixpkgs": "nixpkgs_2" 154 | }, 155 | "locked": { 156 | "lastModified": 1746216483, 157 | "narHash": "sha256-4h3s1L/kKqt3gMDcVfN8/4v2jqHrgLIe4qok4ApH5x4=", 158 | "owner": "numtide", 159 | "repo": "treefmt-nix", 160 | "rev": "29ec5026372e0dec56f890e50dbe4f45930320fd", 161 | "type": "github" 162 | }, 163 | "original": { 164 | "owner": "numtide", 165 | "repo": "treefmt-nix", 166 | "type": "github" 167 | } 168 | } 169 | }, 170 | "root": "root", 171 | "version": 7 172 | } 173 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "Cody's System Flakes"; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 6 | nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; 7 | nixos-hardware.url = "github:NixOS/nixos-hardware/master"; 8 | home-manager = { 9 | url = "github:nix-community/home-manager"; 10 | inputs.nixpkgs.follows = "nixpkgs"; 11 | }; 12 | 13 | treefmt-nix.url = "github:numtide/treefmt-nix"; 14 | 15 | discordfetch = { 16 | url = "github:cody-quinn/discordfetch"; 17 | inputs.nixpkgs.follows = "nixpkgs"; 18 | }; 19 | }; 20 | 21 | outputs = 22 | { 23 | self, 24 | nixpkgs, 25 | nixpkgs-stable, 26 | nixos-hardware, 27 | home-manager, 28 | treefmt-nix, 29 | ... 30 | }@inputs: 31 | let 32 | username = "cody"; 33 | system = "x86_64-linux"; 34 | pkgs = import nixpkgs { 35 | inherit system; 36 | config = { 37 | allowUnfree = true; 38 | }; 39 | }; 40 | 41 | formatter = treefmt-nix.lib.evalModule pkgs { 42 | projectRootFile = "flake.nix"; 43 | programs.nixfmt.enable = true; 44 | }; 45 | 46 | overlays = [ ]; 47 | in 48 | { 49 | formatter.${system} = formatter.config.build.wrapper; 50 | checks.${system} = { 51 | formatting = formatter.config.build.check self; 52 | }; 53 | 54 | nixosConfigurations = { 55 | # My laptop 56 | thonkpad = nixpkgs.lib.nixosSystem { 57 | inherit system; 58 | 59 | specialArgs = { inherit inputs; }; 60 | modules = [ 61 | { 62 | nixpkgs.overlays = overlays; 63 | } 64 | 65 | nixos-hardware.nixosModules.lenovo-thinkpad-p50 66 | home-manager.nixosModules.home-manager 67 | (import ./system/thonkpad/configuration.nix) 68 | ]; 69 | }; 70 | 71 | # My desktop PC 72 | haumea = nixpkgs.lib.nixosSystem { 73 | inherit system; 74 | 75 | specialArgs = { inherit inputs username; }; 76 | modules = [ 77 | { 78 | nixpkgs.overlays = overlays; 79 | } 80 | 81 | home-manager.nixosModules.home-manager 82 | (import ./system/haumea/configuration.nix) 83 | (import ./hyprland) 84 | ]; 85 | }; 86 | }; 87 | }; 88 | } 89 | -------------------------------------------------------------------------------- /hyprland/config.nix: -------------------------------------------------------------------------------- 1 | '' 2 | # See https://wiki.hyprland.org/Configuring/Monitors/ 3 | #monitor=DP-2,2560x1080@60,0x0,1 4 | #monitor=HDMI-A-2,2560x1080@75,0x1080,1 5 | monitor=,preferred,auto,1 6 | 7 | # See https://wiki.hyprland.org/Configuring/Keywords/ for more 8 | exec-once = hyprpaper 9 | 10 | # Some default env vars. 11 | env = XCURSOR_SIZE,24 12 | 13 | # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ 14 | input { 15 | kb_layout = us 16 | kb_options = caps:swapescape, compose:ralt 17 | 18 | follow_mouse = 1 19 | touchpad { 20 | natural_scroll = no 21 | } 22 | 23 | sensitivity = 0 24 | } 25 | 26 | general { 27 | # See https://wiki.hyprland.org/Configuring/Variables/ for more 28 | 29 | gaps_in = 0 30 | gaps_out = 0 31 | border_size = 0 32 | col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg 33 | col.inactive_border = rgba(595959aa) 34 | 35 | layout = master 36 | } 37 | 38 | decoration { 39 | # See https://wiki.hyprland.org/Configuring/Variables/ for more 40 | 41 | rounding = 0 42 | 43 | blur { 44 | enabled = no 45 | size = 3 46 | passes = 1 47 | new_optimizations = on 48 | } 49 | 50 | shadow { 51 | enabled = no 52 | range = 4 53 | render_power = 3 54 | color = rgba(1a1a1aee) 55 | } 56 | } 57 | 58 | animations { 59 | enabled = no 60 | 61 | # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more 62 | 63 | bezier = myBezier, 0.05, 0.9, 0.1, 1.05 64 | 65 | animation = windows, 1, 7, myBezier 66 | animation = windowsOut, 1, 7, default, popin 80% 67 | animation = border, 1, 10, default 68 | animation = borderangle, 1, 8, default 69 | animation = fade, 1, 7, default 70 | animation = workspaces, 1, 6, default 71 | } 72 | 73 | dwindle { 74 | # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more 75 | pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below 76 | preserve_split = yes # you probably want this 77 | } 78 | 79 | master { 80 | allow_small_split = true 81 | new_status = slave 82 | new_on_top = no 83 | orientation = center 84 | slave_count_for_center_master = 0 85 | mfact = 0.65 86 | } 87 | 88 | # bind = SUPER, [, removemaster 89 | # bind = SUPER, ], addmaster 90 | 91 | gestures { 92 | # See https://wiki.hyprland.org/Configuring/Variables/ for more 93 | workspace_swipe = off 94 | } 95 | 96 | # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more 97 | # -- Fix odd behaviors in IntelliJ IDEs -- 98 | #! Fix focus issues when dialogs are opened or closed 99 | #windowrulev2 = windowdance,class:^(jetbrains-.*)$,floating:1 100 | #! Fix splash screen showing in weird places and prevent annoying focus takeovers 101 | windowrulev2 = center,class:^(jetbrains-.*)$,title:^(splash)$,floating:1 102 | windowrulev2 = nofocus,class:^(jetbrains-.*)$,title:^(splash)$,floating:1 103 | windowrulev2 = noborder,class:^(jetbrains-.*)$,title:^(splash)$,floating:1 104 | 105 | #! Center popups/find windows 106 | windowrulev2 = center,class:^(jetbrains-.*)$,title:^( )$,floating:1 107 | windowrulev2 = stayfocused,class:^(jetbrains-.*)$,title:^( )$,floating:1 108 | windowrulev2 = noborder,class:^(jetbrains-.*)$,title:^( )$,floating:1 109 | #! Disable window flicker when autocomplete or tooltips appear 110 | windowrulev2 = nofocus,class:^(jetbrains-.*)$,title:^(win.*)$,floating:1 111 | 112 | # Media controls for keyboards without dedicated keys 113 | binde = , XF86MonBrightnessUp , exec, brightnessctl set +5% 114 | binde = , XF86MonBrightnessDown, exec, brightnessctl set 5%- 115 | 116 | binde = , XF86AudioMute , exec, pamixer -t 117 | binde = , XF86AudioRaiseVolume, exec, pamixer -i 5 118 | binde = , XF86AudioLowerVolume, exec, pamixer -d 5 119 | binde = , XF86AudioMicMute , exec, pamixer --default-source -t 120 | 121 | bind = , XF86AudioPrev , exec, playerctl previous 122 | bind = , XF86AudioNext , exec, playerctl next 123 | bind = , XF86AudioPlay , exec, playerctl play-pause 124 | bind = , XF86AudioPause, exec, playerctl play-pause 125 | 126 | bind = SUPER, Left , exec, playerctl previous 127 | bind = SUPER, Right, exec, playerctl next 128 | bind = SUPER, Down , exec, playerctl play-pause 129 | 130 | # Program related keybindings 131 | bind = SUPER , P , exec, wofi --show drun 132 | bind = SUPER , O , exec, wofi --show run 133 | 134 | bind = SUPER_SHIFT, Return, exec, alacritty 135 | bind = SUPER_SHIFT, H , exec, alacritty -e htop 136 | bind = SUPER_SHIFT, P , exec, alacritty -e python 137 | bind = SUPER_SHIFT, E , exec, qutebrowser 138 | bind = SUPER_SHIFT, D , exec, discord 139 | bind = SUPER_SHIFT, L , exec, hyprlock 140 | bind = SUPER_SHIFT, M , exec, prismlauncher 141 | bind = SUPER_SHIFT, F , exec, nemo 142 | 143 | # Basic window management binds 144 | bind = SUPER_CONTROL_SHIFT, Q , exit 145 | bind = SUPER_SHIFT , C , killactive, 146 | bind = SUPER , Space , togglefloating, 147 | bind = SUPER_CONTROL , F , fullscreen, 148 | 149 | bind = SUPER , H , resizeactive, -50 0 150 | bind = SUPER , L , resizeactive, 50 0 151 | bind = SUPER , J , layoutmsg, cyclenext 152 | bind = SUPER , K , layoutmsg, cycleprev 153 | bind = SUPER , M , layoutmsg, swapwithmaster 154 | bind = SUPER , F , layoutmsg, focusmaster 155 | 156 | # Utility binds 157 | bind = SUPER , S, exec, grim - | wl-copy 158 | bind = SUPER_SHIFT , S, exec, grim -g "$(slurp)" - | wl-copy 159 | bind = SUPER_CONTROL, S, exec, grim -g "$(slurp -o)" - | wl-copy 160 | 161 | # Switch workspaces with mainMod + [0-9] 162 | bind = SUPER, 1, workspace, 1 163 | bind = SUPER, 2, workspace, 2 164 | bind = SUPER, 3, workspace, 3 165 | bind = SUPER, 4, workspace, 4 166 | bind = SUPER, 5, workspace, 5 167 | bind = SUPER, 6, workspace, 6 168 | bind = SUPER, 7, workspace, 7 169 | bind = SUPER, 8, workspace, 8 170 | bind = SUPER, 9, workspace, 9 171 | bind = SUPER, 0, workspace, 10 172 | 173 | # Move active window to a workspace with mainMod + SHIFT + [0-9] 174 | bind = SUPER_SHIFT, 1, movetoworkspacesilent, 1 175 | bind = SUPER_SHIFT, 2, movetoworkspacesilent, 2 176 | bind = SUPER_SHIFT, 3, movetoworkspacesilent, 3 177 | bind = SUPER_SHIFT, 4, movetoworkspacesilent, 4 178 | bind = SUPER_SHIFT, 5, movetoworkspacesilent, 5 179 | bind = SUPER_SHIFT, 6, movetoworkspacesilent, 6 180 | bind = SUPER_SHIFT, 7, movetoworkspacesilent, 7 181 | bind = SUPER_SHIFT, 8, movetoworkspacesilent, 8 182 | bind = SUPER_SHIFT, 9, movetoworkspacesilent, 9 183 | bind = SUPER_SHIFT, 0, movetoworkspacesilent, 10 184 | 185 | # Move/resize windows with mainMod + LMB/RMB and dragging 186 | bindm = SUPER, mouse:272, movewindow 187 | bindm = SUPER, mouse:273, resizewindow 188 | 189 | exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP 190 | '' 191 | -------------------------------------------------------------------------------- /hyprland/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, username, ... }: 2 | 3 | { 4 | imports = [ 5 | ./waybar 6 | ]; 7 | 8 | environment.systemPackages = with pkgs; [ 9 | hyprpaper 10 | hyprlock 11 | wl-clipboard 12 | grim 13 | slurp 14 | ]; 15 | 16 | programs.hyprland.enable = true; 17 | 18 | environment.sessionVariables.NIXOS_OZONE_WL = "1"; 19 | 20 | xdg.portal = { 21 | enable = true; 22 | extraPortals = with pkgs; [ 23 | xdg-desktop-portal-hyprland 24 | ]; 25 | }; 26 | 27 | home-manager.users.${username} = { 28 | wayland.windowManager.hyprland = { 29 | enable = true; 30 | 31 | package = null; 32 | portalPackage = null; 33 | 34 | extraConfig = import ./config.nix; 35 | }; 36 | 37 | home.file.".config/hypr/hyprpaper.conf".text = '' 38 | preload = /home/${username}/Pictures/wallpaper.jpg 39 | wallpaper = ,/home/${username}/Pictures/wallpaper.jpg 40 | ''; 41 | 42 | home.file.".config/hypr/hyprlock.conf".text = '' 43 | general { 44 | hide_cursor = yes 45 | no_fade_in = yes 46 | no_fade_out = yes 47 | } 48 | 49 | background { 50 | color = rgba(0, 0, 0, 1.0) 51 | } 52 | 53 | input-field { 54 | position = 0, 0 55 | } 56 | ''; 57 | }; 58 | } 59 | -------------------------------------------------------------------------------- /hyprland/waybar/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | modulesLeft ? [ ], 3 | modulesCenter ? [ ], 4 | modulesRight ? [ ], 5 | }: 6 | 7 | '' 8 | { 9 | "layer": "top", 10 | "position": "top", 11 | 12 | "modules-left": ${builtins.toJSON modulesLeft}, 13 | "modules-center": ${builtins.toJSON modulesCenter}, 14 | "modules-right": ${builtins.toJSON modulesRight}, 15 | 16 | "custom/padding": { 17 | "format": " " 18 | }, 19 | 20 | "custom/minehub": { 21 | "exec": "mcstatus play.minehub.live status | grep players | awk '{ print \"Players: \" $2 }'", 22 | "interval": 30 23 | }, 24 | 25 | "hyprland/workspaces": { 26 | "on-click": "activate", 27 | "on-scroll-up": "hyprctl dispatch workspace e+1", 28 | "on-scroll-down": "hyprctl dispatch workspace e-1", 29 | "format": "{icon}", 30 | "format-icons": { 31 | "11": "1", 32 | "12": "2", 33 | "13": "3", 34 | "14": "4", 35 | "15": "5", 36 | "16": "6", 37 | "17": "7", 38 | "18": "8", 39 | "19": "9", 40 | "20": "10" 41 | }, 42 | "persistent-workspaces": { 43 | "*": 10 44 | } 45 | }, 46 | 47 | "hyprland/window": { 48 | "separate-outputs": true 49 | }, 50 | 51 | "pulseaudio": { 52 | "format": "{icon} {volume:2}%", 53 | "format-bluetooth": "{icon} {volume}%", 54 | "format-muted": "MUTE", 55 | "format-icons": { 56 | "headphones": "", 57 | "default": ["", ""] 58 | }, 59 | "scroll-step": 5, 60 | "on-click": "pamixer -t", 61 | "on-click-right": "pavucontrol" 62 | }, 63 | "memory": { 64 | "interval": 5, 65 | "format": "Mem {}%" 66 | }, 67 | "cpu": { 68 | "interval": 5, 69 | "format": "CPU {usage}%" 70 | }, 71 | "battery": { 72 | "states": { 73 | "good": 95, 74 | "warning": 30, 75 | "critical": 15 76 | }, 77 | "format": "{icon} {capacity}%", 78 | "format-icons": ["", "", "", "", ""] 79 | }, 80 | "disk": { 81 | "interval": 5, 82 | "tooltip-format": "Disk {percentage_used}%", 83 | "format": "{specific_used} out of {specific_total} used ({percentage_used}%)", 84 | "unit": "GB", 85 | "path": "/" 86 | }, 87 | "clock": { 88 | "interval": 1, 89 | "format": "{:%I:%M:%S %p}", 90 | "tooltip": true 91 | } 92 | } 93 | '' 94 | -------------------------------------------------------------------------------- /hyprland/waybar/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, username, ... }: 2 | 3 | { 4 | programs.waybar = { 5 | enable = true; 6 | package = pkgs.waybar.overrideAttrs (prev: { 7 | buildInputs = prev.buildInputs ++ [ pkgs.wireplumber ]; 8 | }); 9 | }; 10 | 11 | home-manager.users.${username} = { 12 | home.file.".config/waybar/style.css".source = ./style.css; 13 | home.file.".config/waybar/config".text = ( 14 | import ./config.nix { 15 | modulesLeft = [ 16 | "custom/padding" 17 | "hyprland/workspaces" 18 | "hyprland/window" 19 | ]; 20 | 21 | modulesRight = [ 22 | "custom/minehub" 23 | "battery" 24 | "pulseaudio" 25 | "clock" 26 | "custom/padding" 27 | ]; 28 | } 29 | ); 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /hyprland/waybar/style.css: -------------------------------------------------------------------------------- 1 | @define-color gray #928374; 2 | @define-color red #fb4934; 3 | @define-color green #b8bb26; 4 | @define-color yellow #fabd2f; 5 | @define-color blue #83a598; 6 | @define-color purple #d3869b; 7 | @define-color aqua #8ec07c; 8 | @define-color orange #fe8019; 9 | 10 | @define-color bg-red #cc241d; 11 | @define-color bg-green #98971a; 12 | @define-color bg-yellow #d79921; 13 | @define-color bg-blue #458588; 14 | @define-color bg-purple #b16286; 15 | @define-color bg-aqua #689d6a; 16 | 17 | @define-color bg0 #1d2021; 18 | @define-color bg1 #282828; 19 | @define-color bg2 #3c3836; 20 | @define-color bg3 #504945; 21 | @define-color bg4 #665c54; 22 | @define-color bg5 #7c6f64; 23 | 24 | @define-color fg0 #fbf1c7; 25 | @define-color fg1 #ebdbb2; 26 | @define-color fg2 #d5c4a1; 27 | @define-color fg3 #bdae93; 28 | @define-color fg4 #a89984; 29 | 30 | * { 31 | font-size: 13.5px; 32 | font-family: monospace; 33 | } 34 | 35 | window#waybar { 36 | background: @bg0; 37 | color: @fg1; 38 | } 39 | 40 | #custom-padding { 41 | background: @bg0; 42 | min-width: 1200px; 43 | } 44 | 45 | #workspaces { 46 | background: @bg0; 47 | } 48 | 49 | #workspaces button { 50 | background: @bg1; 51 | color: @fg1; 52 | border-radius: 0; 53 | padding: 0; 54 | } 55 | 56 | #workspaces button.empty { 57 | background: @bg0; 58 | } 59 | 60 | #workspaces button.active { 61 | background: @bg-blue; 62 | } 63 | 64 | #workspaces button.urgent { 65 | background: @bg-red; 66 | } 67 | 68 | #window { 69 | /* background: @bg1; */ 70 | padding: 0 8px; 71 | } 72 | 73 | #pulseaudio, 74 | #memory, 75 | #cpu, 76 | #disk, 77 | #battery, 78 | #tray, 79 | #clock { 80 | background: @bg0; 81 | padding: 0 8px; 82 | } 83 | 84 | #pulseaudio { 85 | color: @red; 86 | } 87 | #memory { 88 | color: @green; 89 | } 90 | #cpu { 91 | color: @yellow; 92 | } 93 | #disk { 94 | color: @blue; 95 | } 96 | #battery { 97 | color: @purple; 98 | } 99 | #clock { 100 | color: @fg1; 101 | } 102 | -------------------------------------------------------------------------------- /modules/home/base/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | imports = [ 10 | ./git.nix 11 | ./shell.nix 12 | ]; 13 | } 14 | -------------------------------------------------------------------------------- /modules/home/base/git.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | programs.git.enable = true; 10 | programs.git.extraConfig = { 11 | core.editor = "nvim"; 12 | commit.gpgsign = true; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /modules/home/base/shell.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | with lib; 9 | let 10 | cfg = config.shell.prompt; 11 | in 12 | { 13 | options.shell.prompt = { 14 | prefix = mkOption { 15 | type = types.str; 16 | default = ""; 17 | }; 18 | 19 | suffix = mkOption { 20 | type = types.str; 21 | default = ""; 22 | }; 23 | }; 24 | 25 | config = { 26 | programs.zsh = { 27 | enable = true; 28 | autosuggestion.enable = true; 29 | syntaxHighlighting.enable = true; 30 | dirHashes = { 31 | p = "$HOME/Projects"; 32 | doc = "$HOME/Documents"; 33 | dwn = "$HOME/Downloads"; 34 | }; 35 | shellAliases = { 36 | o = "xdg-open"; 37 | l = "eza"; 38 | ls = "eza -l --icons --group-directories-first"; 39 | la = "eza -la --icons --group-directories-first"; 40 | lt = "eza -T -I \"node_modules|venv|Build\""; 41 | gs = "git status"; 42 | ga = "git add ."; 43 | gc = "git commit -S"; 44 | gp = "git push"; 45 | bat = "cat /sys/class/power_supply/BAT*/energy_now"; 46 | k = "kubectl"; 47 | kg = "kubectl get"; 48 | mk = "minikube"; 49 | d = "docker"; 50 | dc = "docker compose"; 51 | }; 52 | history = { 53 | size = 1000; 54 | path = "${config.xdg.dataHome}/zsh/history"; 55 | }; 56 | localVariables = { 57 | PROMPT = cfg.prefix + " ▲ %c " + cfg.suffix; 58 | }; 59 | initExtra = '' 60 | eval "$(direnv hook zsh)" 61 | ''; 62 | }; 63 | }; 64 | } 65 | -------------------------------------------------------------------------------- /modules/home/browser/default.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | home.packages = with pkgs; [ 5 | (qutebrowser.override { 6 | enableWideVine = true; 7 | }) 8 | ]; 9 | 10 | home.file.".config/qutebrowser/config.py".text = '' 11 | c.colors.statusbar.passthrough.bg = "darkblue" 12 | c.colors.tabs.even.bg = "black" 13 | c.colors.tabs.odd.bg = "black" 14 | c.colors.tabs.selected.even.bg = "#000000" 15 | c.colors.tabs.selected.even.fg = "lime" 16 | c.colors.tabs.selected.odd.bg = "#000000" 17 | c.colors.tabs.selected.odd.fg = "lime" 18 | c.colors.webpage.preferred_color_scheme = "dark" 19 | 20 | c.tabs.new_position.unrelated = "first" 21 | c.tabs.position = "bottom" 22 | c.statusbar.position = "bottom" 23 | c.window.title_format = "{perc}{current_title}" 24 | 25 | c.fonts.default_family = "DejaVu Sans Mono" 26 | c.fonts.default_size = "10pt" 27 | 28 | c.content.geolocation = False 29 | c.content.notifications.enabled = False 30 | c.content.javascript.clipboard = "access-paste" 31 | c.content.pdfjs = True 32 | 33 | c.content.blocking.enabled = True 34 | c.content.blocking.method = "both" 35 | 36 | c.qt.chromium.low_end_device_mode = "never" 37 | 38 | c.url.searchengines = {"DEFAULT": "https://kagi.com/search?q={}"} 39 | c.url.default_page = "https://kagi.com" 40 | c.url.start_pages = "https://kagi.com" 41 | 42 | config.load_autoconfig(True) 43 | ''; 44 | 45 | home.file.".config/qutebrowser/greasemonkey/return-youtube-dislike.user.js".source = pkgs.fetchurl { 46 | url = "https://raw.githubusercontent.com/Anarios/return-youtube-dislike/b133adeecbe6e7fb321c615c8ac9727466f6103c/Extensions/UserScript/Return%20Youtube%20Dislike.user.js"; 47 | hash = "sha256-5JC3vrPj+kJq68AFtEWwriyCc7sD8nIpqc6dLbjPGso="; 48 | }; 49 | } 50 | -------------------------------------------------------------------------------- /modules/home/desktop/config/alacritty/alacritty.toml: -------------------------------------------------------------------------------- 1 | [colors.bright] 2 | black = "0x928374" 3 | blue = "0x83a598" 4 | cyan = "0x8ec07c" 5 | green = "0xb8bb26" 6 | magenta = "0xd3869b" 7 | red = "0xfb4934" 8 | white = "0xebdbb2" 9 | yellow = "0xfabd2f" 10 | 11 | [colors.normal] 12 | black = "0x282828" 13 | blue = "0x458588" 14 | cyan = "0x689d6a" 15 | green = "0x98971a" 16 | magenta = "0xb16286" 17 | red = "0xcc241d" 18 | white = "0xa89984" 19 | yellow = "0xd79921" 20 | 21 | [colors.primary] 22 | background = "0x1d2021" 23 | foreground = "0xebdbb2" 24 | 25 | [env] 26 | WINIT_X11_SCALE_FACTOR = "1.0" 27 | 28 | [font] 29 | size = 10 30 | 31 | [font.normal] 32 | family = "JetBrains Mono" 33 | 34 | [terminal.shell] 35 | program = "zsh" 36 | -------------------------------------------------------------------------------- /modules/home/desktop/config/awesome/assets/centerpiece.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cody-quinn/dotfiles/a6a02db24c1ad7180626dc9d691cc92734125400/modules/home/desktop/config/awesome/assets/centerpiece.jpg -------------------------------------------------------------------------------- /modules/home/desktop/config/awesome/assets/wallpaper.kra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cody-quinn/dotfiles/a6a02db24c1ad7180626dc9d691cc92734125400/modules/home/desktop/config/awesome/assets/wallpaper.kra -------------------------------------------------------------------------------- /modules/home/desktop/config/awesome/assets/wallpaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cody-quinn/dotfiles/a6a02db24c1ad7180626dc9d691cc92734125400/modules/home/desktop/config/awesome/assets/wallpaper.png -------------------------------------------------------------------------------- /modules/home/desktop/config/awesome/rc.lua: -------------------------------------------------------------------------------- 1 | -- If LuaRocks is installed, make sure that packages installed through it are 2 | -- found (e.g. lgi). If LuaRocks is not installed, do nothing. 3 | pcall(require, "luarocks.loader") 4 | 5 | -- Standard awesome library 6 | local gears = require("gears") 7 | local awful = require("awful") 8 | require("awful.autofocus") 9 | 10 | local wibox = require("wibox") -- Widget and layout library 11 | local beautiful = require("beautiful") -- Theme handling library 12 | local naughty = require("naughty") -- Notification library 13 | 14 | -- Widgets I plan on using 15 | local textbat = require("textbat") 16 | local textclock = wibox.widget.textclock 17 | 18 | -- {{{ Error handling 19 | -- Check if awesome encountered an error during startup and fell back to 20 | -- another config (This code will only ever execute for the fallback config) 21 | if awesome.startup_errors then 22 | naughty.notify({ preset = naughty.config.presets.critical, title = "Oops, there were errors during startup!", text = awesome.startup_errors }) 23 | end 24 | 25 | -- Handle runtime errors after startup 26 | do 27 | local in_error = false 28 | awesome.connect_signal("debug::error", function (err) 29 | -- Make sure we don't go into an endless error loop 30 | if in_error then return end 31 | in_error = true 32 | 33 | naughty.notify({ preset = naughty.config.presets.critical, title = "Oops, an error happened!", text = tostring(err) }) 34 | in_error = false 35 | end) 36 | end 37 | -- }}} 38 | 39 | -- {{{ Variable definitions 40 | -- Themes define colours, icons, font and wallpapers. 41 | -- beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua") 42 | beautiful.init(gears.filesystem.get_configuration_dir() .. "theme.lua") 43 | 44 | -- This is used later as the default terminal and editor to run. 45 | terminal = "alacritty" 46 | browser = "qutebrowser" 47 | editor = os.getenv("EDITOR") or "vim" 48 | editor_cmd = terminal .. " -e " .. editor 49 | 50 | modkey = "Mod4" 51 | 52 | -- Table of layouts to cover with awful.layout.inc, order matters. 53 | awful.layout.layouts = { awful.layout.suit.tile } 54 | -- }}} 55 | 56 | -- {{{ Wibar 57 | -- Create a wibox for each screen and add it 58 | local taglist_buttons = gears.table.join( 59 | awful.button({ }, 1, function(t) t:view_only() end), 60 | awful.button({ }, 3, awful.tag.viewtoggle), 61 | awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end), 62 | awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end) 63 | ) 64 | 65 | local tasklist_buttons = gears.table.join( 66 | awful.button({ }, 1, function(c) c:emit_signal("request::activate", "tasklist", {raise = true}) end) 67 | ) 68 | 69 | local function set_wallpaper(s) 70 | -- Wallpaper 71 | if beautiful.wallpaper then 72 | local wallpaper = beautiful.wallpaper 73 | -- If wallpaper is a function, call it with the screen 74 | if type(wallpaper) == "function" then 75 | wallpaper = wallpaper(s) 76 | end 77 | gears.wallpaper.centered(wallpaper, s) 78 | end 79 | end 80 | 81 | -- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) 82 | screen.connect_signal("property::geometry", set_wallpaper) 83 | 84 | awful.screen.connect_for_each_screen(function(s) 85 | -- Wallpaper 86 | set_wallpaper(s) 87 | 88 | -- Each screen has its own tag table. 89 | awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1]) 90 | 91 | -- Create a promptbox for each screen 92 | s.mypromptbox = awful.widget.prompt() 93 | -- Create a taglist widget 94 | s.mytaglist = awful.widget.taglist { 95 | screen = s, 96 | filter = awful.widget.taglist.filter.all, 97 | buttons = taglist_buttons 98 | } 99 | 100 | -- Create a tasklist widget 101 | s.mytasklist = awful.widget.tasklist { 102 | screen = s, 103 | filter = awful.widget.tasklist.filter.currenttags, 104 | buttons = tasklist_buttons, 105 | widget_template = { 106 | { 107 | { 108 | { 109 | id = 'text_role', 110 | widget = wibox.widget.textbox, 111 | }, 112 | layout = wibox.layout.fixed.horizontal, 113 | }, 114 | left = 10, 115 | right = 10, 116 | widget = wibox.container.margin 117 | }, 118 | id = 'background_role', 119 | widget = wibox.container.background, 120 | } 121 | } 122 | 123 | -- Create the wibox 124 | s.mywibox = awful.wibar({ position = "top", screen = s }) 125 | 126 | -- Add widgets to the wibox 127 | s.mywibox:setup { 128 | layout = wibox.layout.align.horizontal, 129 | { -- Left widgets 130 | layout = wibox.layout.fixed.horizontal, 131 | s.mytaglist, 132 | s.mypromptbox, 133 | }, 134 | s.mytasklist, -- Middle widget 135 | { -- Right widgets 136 | layout = wibox.layout.fixed.horizontal, 137 | textbat("BAT0", "%d%%  "), 138 | textclock(" %a %b %d, %I:%M:%S %p ", 1), 139 | }, 140 | } 141 | end) 142 | -- }}} 143 | 144 | function spawn_proc(s) 145 | return function() 146 | awful.spawn(s) 147 | end 148 | end 149 | 150 | -- {{{ Key bindings 151 | globalkeys = gears.table.join( 152 | -- AwesomeWM Specific 153 | awful.key({ modkey, "Control", "Shift" }, "r", awesome.restart), 154 | awful.key({ modkey, "Control", "Shift" }, "q", awesome.quit), 155 | 156 | -- Brightness & media controls 157 | awful.key({ }, "XF86MonBrightnessUp", spawn_proc("brightnessctl set +5%")), 158 | awful.key({ }, "XF86MonBrightnessDown", spawn_proc("brightnessctl set 5%-")), 159 | 160 | awful.key({ }, "XF86AudioMute", spawn_proc("pamixer -t")), 161 | awful.key({ }, "XF86AudioRaiseVolume", spawn_proc("pamixer -i 5")), 162 | awful.key({ }, "XF86AudioLowerVolume", spawn_proc("pamixer -d 5")), 163 | awful.key({ }, "XF86AudioMicMute", spawn_proc("pamixer --default-source -t")), 164 | 165 | awful.key({ }, "XF86AudioPrev", spawn_proc("playerctl previous")), 166 | awful.key({ }, "XF86AudioNext", spawn_proc("playerctl next")), 167 | awful.key({ }, "XF86AudioPlay", spawn_proc("playerctl play-pause")), 168 | awful.key({ }, "XF86AudioPause", spawn_proc("playerctl play-pause")), 169 | 170 | -- Media controls for keyboards without dedicated keys 171 | awful.key({ modkey, }, "Left", spawn_proc("playerctl previous")), 172 | awful.key({ modkey, }, "Right", spawn_proc("playerctl next")), 173 | awful.key({ modkey, }, "Down", spawn_proc("playerctl play-pause")), 174 | 175 | -- Focused window changing 176 | awful.key({ modkey, }, "j", function () awful.client.focus.byidx( 1) end), 177 | awful.key({ modkey, }, "k", function () awful.client.focus.byidx(-1) end), 178 | 179 | -- Layout manipulation 180 | awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), 181 | awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), 182 | awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), 183 | awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), 184 | awful.key({ modkey, }, "u", awful.client.urgent.jumpto), 185 | 186 | -- Standard programs 187 | awful.key({ modkey, "Shift" }, "Return", spawn_proc(terminal)), 188 | awful.key({ modkey, "Shift" }, "h", spawn_proc(terminal.." -e htop")), 189 | awful.key({ modkey, "Shift" }, "p", spawn_proc(terminal.." -e python")), 190 | awful.key({ modkey, "Shift" }, "e", spawn_proc(browser)), 191 | awful.key({ modkey, "Shift" }, "s", spawn_proc("flameshot gui")), 192 | awful.key({ modkey, "Shift" }, "d", spawn_proc("discord")), 193 | awful.key({ modkey, "Shift" }, "l", spawn_proc("slock")), 194 | awful.key({ modkey, "Shift" }, "m", spawn_proc("polymc")), 195 | awful.key({ modkey, "Shift" }, "f", spawn_proc("nemo")), 196 | awful.key({ modkey, "Shift" }, "n", spawn_proc("neovide")), 197 | 198 | awful.key({ modkey }, "p", spawn_proc("rofi -show drun")), 199 | awful.key({ modkey }, "o", spawn_proc("rofi -show run")), 200 | awful.key({ modkey }, "e", spawn_proc("rofimoji -a copy")), 201 | 202 | -- Master/stack sizing manipulation 203 | awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end), 204 | awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end), 205 | awful.key({ modkey, "Mod1" }, "h", function () awful.tag.incnmaster( 1, nil, true) end), 206 | awful.key({ modkey, "Mod1" }, "l", function () awful.tag.incnmaster(-1, nil, true) end), 207 | awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end), 208 | awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end) 209 | ) 210 | 211 | clientkeys = gears.table.join( 212 | awful.key({ modkey, "Control" }, "f", 213 | function (c) 214 | c.fullscreen = not c.fullscreen 215 | c:raise() 216 | end), 217 | awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end), 218 | awful.key({ modkey, }, "Return", function (c) c:swap(awful.client.getmaster()) end), 219 | awful.key({ modkey, }, "space", awful.client.floating.toggle), 220 | awful.key({ modkey, }, "o", function (c) c:move_to_screen() end), 221 | awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end), 222 | awful.key({ modkey, }, "m", 223 | function (c) 224 | c.maximized = not c.maximized 225 | c:raise() 226 | end) 227 | ) 228 | 229 | -- Bind all key numbers to tags. 230 | -- Be careful: we use keycodes to make it work on any keyboard layout. 231 | -- This should map on the top row of your keyboard, usually 1 to 9. 232 | function tag_view(i, inner) 233 | return function () 234 | local screen = awful.screen.focused() 235 | local tag = screen.tags[i] 236 | if tag then 237 | inner(tag) 238 | end 239 | end 240 | end 241 | 242 | function tag_move(i, inner) 243 | return function () 244 | if client.focus then 245 | local tag = client.focus.screen.tags[i] 246 | if tag then 247 | inner(tag) 248 | end 249 | end 250 | end 251 | end 252 | 253 | for i = 1, 9 do 254 | globalkeys = gears.table.join(globalkeys, 255 | awful.key({ modkey }, "#" .. i + 9, tag_view(i, function(tag) tag:view_only() end)), 256 | awful.key({ modkey, "Mod1" }, "#" .. i + 9, tag_view(i, function(tag) awful.tag.viewtoggle(tag) end)), 257 | awful.key({ modkey, "Shift" }, "#" .. i + 9, tag_move(i, function(tag) client.focus:move_to_tag(tag) end)), 258 | awful.key({ modkey, "Shift", "Mod1" }, "#" .. i + 9, tag_move(i, function(tag) client.focus:toggle_tag(tag) end)), 259 | 260 | awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, function() client.focus:move_to_screen(i) end) 261 | ) 262 | end 263 | 264 | clientbuttons = gears.table.join( 265 | awful.button({ }, 1, function(c) c:emit_signal("request::activate", "mouse_click", {raise = true}) end), 266 | awful.button({ modkey }, 2, awful.client.floating.toggle), 267 | awful.button({ modkey }, 1, function(c) 268 | c:emit_signal("request::activate", "mouse_click", {raise = true}) 269 | awful.mouse.client.move(c) 270 | end), 271 | awful.button({ modkey }, 3, function(c) 272 | c:emit_signal("request::activate", "mouse_click", {raise = true}) 273 | awful.mouse.client.resize(c) 274 | end) 275 | ) 276 | 277 | -- Set keys 278 | root.keys(globalkeys) 279 | -- }}} 280 | 281 | -- {{{ Rules 282 | -- Rules to apply to new clients (through the "manage" signal). 283 | awful.rules.rules = { 284 | { 285 | rule = { }, 286 | properties = { 287 | border_width = 0, 288 | focus = awful.client.focus.filter, 289 | raise = true, 290 | keys = clientkeys, 291 | buttons = clientbuttons, 292 | screen = awful.screen.preferred, 293 | placement = awful.placement.no_overlap+awful.placement.no_offscreen, 294 | titlebars_enabled = false 295 | } 296 | }, 297 | { 298 | rule_any = { role = { "pop-up" } }, 299 | properties = { floating = true } 300 | }, 301 | } 302 | -- }}} 303 | 304 | -- {{{ Signals 305 | -- Signal function to execute when a new client appears. 306 | client.connect_signal("manage", function (c) 307 | -- Set the windows at the slave, 308 | -- i.e. put it at the end of others instead of setting it master. 309 | if not awesome.startup then 310 | awful.client.setslave(c) 311 | end 312 | 313 | if awesome.startup 314 | and not c.size_hints.user_position 315 | and not c.size_hints.program_position then 316 | -- Prevent clients from being unreachable after screen count changes. 317 | awful.placement.no_offscreen(c) 318 | end 319 | 320 | c.maximized = false 321 | end) 322 | -- }}} 323 | -------------------------------------------------------------------------------- /modules/home/desktop/config/awesome/textbat.lua: -------------------------------------------------------------------------------- 1 | local setmetatable = setmetatable 2 | local os = os 3 | local textbox = require("wibox.widget.textbox") 4 | local timer = require("gears.timer") 5 | local gtable = require("gears.table") 6 | 7 | local textbat = { mt = {} } 8 | 9 | function textbat:force_update() 10 | self._timer:emit_signal("timeout") 11 | end 12 | 13 | local function calc_timeout(real_timeout) 14 | return real_timeout - os.time() % real_timeout 15 | end 16 | 17 | local function read_file(path) 18 | local file = io.open(path, "r") 19 | local content = file:read("*all") 20 | file:close() 21 | return content 22 | end 23 | 24 | local function new(battery, format, refresh) 25 | local w = textbox() 26 | gtable.crush(w, textbat, true) 27 | 28 | w._private.battery = "/sys/class/power_supply/"..battery.."/" 29 | w._private.format = format or " %d%% " 30 | w._private.refresh = refresh or 60 31 | 32 | function w._private.textbat_update_cb() 33 | local current = tonumber(read_file(w._private.battery.."energy_now")) 34 | local capacity = tonumber(read_file(w._private.battery.."energy_full")) 35 | local str = string.format(w._private.format, (current / capacity) * 100) 36 | w:set_markup(str) 37 | w._timer.timeout = calc_timeout(w._private.refresh) 38 | w._timer:again() 39 | return true -- Continue the timer 40 | end 41 | 42 | w._timer = timer.weak_start_new(refresh, w._private.textbat_update_cb) 43 | w:force_update() 44 | return w 45 | end 46 | 47 | function textbat.mt:__call(...) 48 | return new(...) 49 | end 50 | 51 | return setmetatable(textbat, textbat.mt) 52 | -------------------------------------------------------------------------------- /modules/home/desktop/config/awesome/theme.lua: -------------------------------------------------------------------------------- 1 | local theme_assets = require("beautiful.theme_assets") 2 | local xresources = require("beautiful.xresources") 3 | local dpi = xresources.apply_dpi 4 | 5 | local gfs = require("gears.filesystem") 6 | local themes_path = gfs.get_themes_dir() 7 | 8 | local theme = {} 9 | theme.confdir = os.getenv("HOME") .. "/.config/awesome" 10 | 11 | theme.font = "JetBrains Mono 9" 12 | 13 | theme.bg_normal = "#000000" 14 | theme.bg_focus = "#000000" 15 | theme.bg_urgent = "#ff0000" 16 | theme.bg_minimize = "#444444" 17 | theme.bg_systray = theme.bg_normal 18 | 19 | theme.fg_normal = "#999999" 20 | theme.fg_focus = "#ffffff" 21 | theme.fg_urgent = "#ffffff" 22 | theme.fg_minimize = "#ffffff" 23 | 24 | theme.useless_gap = dpi(0) 25 | theme.border_width = dpi(0) 26 | theme.border_normal = theme.bg_normal 27 | theme.border_focus = theme.bg_focus 28 | theme.border_marked = "#91231c" 29 | 30 | -- Generate taglist squares: 31 | local taglist_square_size = dpi(4) 32 | theme.taglist_squares_sel = theme_assets.taglist_squares_sel(taglist_square_size, theme.fg_normal) 33 | theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(taglist_square_size, theme.fg_normal) 34 | 35 | -- Variables set for theming notifications: 36 | theme.menu_submenu_icon = themes_path.."default/submenu.png" 37 | theme.menu_height = dpi(15) 38 | theme.menu_width = dpi(100) 39 | 40 | -- You can add as many variables as 41 | -- you wish and access them by using 42 | -- beautiful.variable in your rc.lua 43 | --theme.bg_widget = "#cc0000" 44 | 45 | -- Define the image to load 46 | theme.titlebar_close_button_normal = themes_path.."default/titlebar/close_normal.png" 47 | theme.titlebar_close_button_focus = themes_path.."default/titlebar/close_focus.png" 48 | 49 | theme.titlebar_minimize_button_normal = themes_path.."default/titlebar/minimize_normal.png" 50 | theme.titlebar_minimize_button_focus = themes_path.."default/titlebar/minimize_focus.png" 51 | 52 | theme.titlebar_ontop_button_normal_inactive = themes_path.."default/titlebar/ontop_normal_inactive.png" 53 | theme.titlebar_ontop_button_focus_inactive = themes_path.."default/titlebar/ontop_focus_inactive.png" 54 | theme.titlebar_ontop_button_normal_active = themes_path.."default/titlebar/ontop_normal_active.png" 55 | theme.titlebar_ontop_button_focus_active = themes_path.."default/titlebar/ontop_focus_active.png" 56 | 57 | theme.titlebar_sticky_button_normal_inactive = themes_path.."default/titlebar/sticky_normal_inactive.png" 58 | theme.titlebar_sticky_button_focus_inactive = themes_path.."default/titlebar/sticky_focus_inactive.png" 59 | theme.titlebar_sticky_button_normal_active = themes_path.."default/titlebar/sticky_normal_active.png" 60 | theme.titlebar_sticky_button_focus_active = themes_path.."default/titlebar/sticky_focus_active.png" 61 | 62 | theme.titlebar_floating_button_normal_inactive = themes_path.."default/titlebar/floating_normal_inactive.png" 63 | theme.titlebar_floating_button_focus_inactive = themes_path.."default/titlebar/floating_focus_inactive.png" 64 | theme.titlebar_floating_button_normal_active = themes_path.."default/titlebar/floating_normal_active.png" 65 | theme.titlebar_floating_button_focus_active = themes_path.."default/titlebar/floating_focus_active.png" 66 | 67 | theme.titlebar_maximized_button_normal_inactive = themes_path.."default/titlebar/maximized_normal_inactive.png" 68 | theme.titlebar_maximized_button_focus_inactive = themes_path.."default/titlebar/maximized_focus_inactive.png" 69 | theme.titlebar_maximized_button_normal_active = themes_path.."default/titlebar/maximized_normal_active.png" 70 | theme.titlebar_maximized_button_focus_active = themes_path.."default/titlebar/maximized_focus_active.png" 71 | 72 | theme.wallpaper = theme.confdir.."/assets/wallpaper.png" 73 | 74 | -- You can use your own layout icons like this: 75 | theme.layout_fairh = themes_path.."default/layouts/fairhw.png" 76 | theme.layout_fairv = themes_path.."default/layouts/fairvw.png" 77 | theme.layout_floating = themes_path.."default/layouts/floatingw.png" 78 | theme.layout_magnifier = themes_path.."default/layouts/magnifierw.png" 79 | theme.layout_max = themes_path.."default/layouts/maxw.png" 80 | theme.layout_fullscreen = themes_path.."default/layouts/fullscreenw.png" 81 | theme.layout_tilebottom = themes_path.."default/layouts/tilebottomw.png" 82 | theme.layout_tileleft = themes_path.."default/layouts/tileleftw.png" 83 | theme.layout_tile = themes_path.."default/layouts/tilew.png" 84 | theme.layout_tiletop = themes_path.."default/layouts/tiletopw.png" 85 | theme.layout_spiral = themes_path.."default/layouts/spiralw.png" 86 | theme.layout_dwindle = themes_path.."default/layouts/dwindlew.png" 87 | theme.layout_cornernw = themes_path.."default/layouts/cornernww.png" 88 | theme.layout_cornerne = themes_path.."default/layouts/cornernew.png" 89 | theme.layout_cornersw = themes_path.."default/layouts/cornersww.png" 90 | theme.layout_cornerse = themes_path.."default/layouts/cornersew.png" 91 | 92 | -- Generate Awesome icon: 93 | -- theme.awesome_icon = theme_assets.awesome_icon(theme.menu_height, theme.bg_focus, theme.fg_focus) 94 | theme.awesome_icon = theme.confdir.."/assets/logo.png" 95 | 96 | -- Define the icon theme for application icons. If not set then the icons 97 | -- from /usr/share/icons and /usr/share/icons/hicolor will be used. 98 | theme.icon_theme = nil 99 | 100 | return theme 101 | -------------------------------------------------------------------------------- /modules/home/desktop/config/flameshot/flameshot.ini: -------------------------------------------------------------------------------- 1 | [Shortcuts] 2 | TYPE_COPY=Return 3 | -------------------------------------------------------------------------------- /modules/home/desktop/config/rofi/config.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | terminal: "alacritty"; 3 | modi: "window,run,ssh,drun"; 4 | font: "JetBrains Mono 12"; 5 | } 6 | 7 | * { 8 | selected-normal-foreground: rgba( 255, 255, 255, 100 % ); 9 | foreground: #999999; 10 | normal-foreground: @foreground; 11 | red: rgba( 220, 50, 47, 100 % ); 12 | selected-urgent-foreground: rgba( 255, 24, 68, 100 % ); 13 | blue: rgba( 38, 139, 210, 100 % ); 14 | urgent-foreground: rgba( 255, 24, 68, 100 % ); 15 | alternate-urgent-background: rgba( 39, 50, 56, 100 % ); 16 | active-foreground: #ffffff; 17 | lightbg: rgba( 238, 232, 213, 100 % ); 18 | selected-active-foreground: rgba( 128, 203, 196, 100 % ); 19 | alternate-active-background: rgba( 39, 50, 56, 100 % ); 20 | background: #000000; 21 | bordercolor: rgba( 39, 50, 56, 100 % ); 22 | alternate-normal-foreground: @foreground; 23 | lightfg: rgba( 88, 104, 117, 100 % ); 24 | border-color: @foreground; 25 | spacing: 2; 26 | separatorcolor: rgba( 30, 37, 41, 100 % ); 27 | urgent-background: rgba( 39, 50, 56, 100 % ); 28 | selected-urgent-background: rgba( 57, 66, 73, 100 % ); 29 | alternate-urgent-foreground: @urgent-foreground; 30 | background-color: rgba( 0, 0, 0, 0 % ); 31 | alternate-active-foreground: @active-foreground; 32 | active-background: rgba( 39, 50, 56, 100 % ); 33 | selected-active-background: rgba( 57, 66, 73, 100 % ); 34 | } 35 | 36 | #window { 37 | background-color: @background; 38 | border: 1; 39 | padding: 5; 40 | } 41 | 42 | #mainbox { 43 | border: 0; 44 | padding: 0; 45 | } 46 | 47 | #message { 48 | border: 1px dash 0px 0px ; 49 | border-color: @separatorcolor; 50 | padding: 1px ; 51 | } 52 | 53 | #textbox { 54 | text-color: @foreground; 55 | } 56 | 57 | #listview { 58 | fixed-height: 0; 59 | border: 2px dash 0px 0px ; 60 | border-color: @separatorcolor; 61 | spacing: 2px ; 62 | scrollbar: true; 63 | padding: 2px 0px 0px ; 64 | } 65 | 66 | #element { 67 | border: 0; 68 | padding: 1px ; 69 | } 70 | 71 | #element.normal.normal { 72 | background-color: @background; 73 | text-color: @normal-foreground; 74 | } 75 | 76 | #element.normal.urgent { 77 | background-color: @background; 78 | text-color: @urgent-foreground; 79 | } 80 | 81 | #element.normal.active { 82 | background-color: @background; 83 | text-color: @active-foreground; 84 | } 85 | 86 | #element.alternate.normal { 87 | background-color: @background; 88 | text-color: @normal-foreground; 89 | } 90 | 91 | #element.alternate.urgent { 92 | background-color: @background; 93 | text-color: @urgent-foreground; 94 | } 95 | 96 | #element.alternate.active { 97 | background-color: @background; 98 | text-color: @active-foreground; 99 | } 100 | 101 | #element.selected.normal { 102 | background-color: @background; 103 | text-color: @selected-normal-foreground; 104 | } 105 | 106 | #element.selected.urgent { 107 | background-color: @background; 108 | text-color: @selected-urgent-foreground; 109 | } 110 | 111 | #element.selected.active { 112 | background-color: @background; 113 | text-color: @selected-active-foreground; 114 | } 115 | 116 | #scrollbar { 117 | width: 4px ; 118 | border: 0; 119 | handle-width: 8px ; 120 | padding: 0; 121 | } 122 | 123 | #mode-switcher { 124 | border: 2px dash 0px 0px ; 125 | border-color: @separatorcolor; 126 | } 127 | 128 | #button.selected { 129 | background-color: @background; 130 | text-color: @selected-normal-foreground; 131 | } 132 | 133 | #inputbar { 134 | spacing: 0; 135 | text-color: @normal-foreground; 136 | padding: 1px ; 137 | } 138 | 139 | #case-indicator { 140 | spacing: 0; 141 | text-color: @normal-foreground; 142 | } 143 | 144 | #entry { 145 | spacing: 0; 146 | text-color: @normal-foreground; 147 | } 148 | 149 | #prompt { 150 | spacing: 0; 151 | text-color: @normal-foreground; 152 | } 153 | 154 | #inputbar { 155 | children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; 156 | } 157 | 158 | #textbox-prompt-colon { 159 | expand: false; 160 | str: ":"; 161 | margin: 0px 0.3em 0em 0em ; 162 | text-color: @normal-foreground; 163 | } 164 | -------------------------------------------------------------------------------- /modules/home/desktop/configs.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | # Configuring programs installed in ./software.nix :) 10 | xdg.configFile.alacritty = { 11 | source = ./config/alacritty; 12 | recursive = true; 13 | }; 14 | 15 | xdg.configFile.awesome = { 16 | source = ./config/awesome; 17 | recursive = true; 18 | }; 19 | 20 | xdg.configFile.flameshot = { 21 | source = ./config/flameshot; 22 | recursive = true; 23 | }; 24 | 25 | xdg.configFile.rofi = { 26 | source = ./config/rofi; 27 | recursive = true; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /modules/home/desktop/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | imports = [ 10 | ./configs.nix 11 | ./software.nix 12 | ./theme.nix 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /modules/home/desktop/software.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | home.packages = with pkgs; [ 10 | chromium 11 | firefox 12 | thunderbird 13 | alacritty 14 | neovide 15 | nemo 16 | peazip 17 | bitwarden 18 | qbittorrent 19 | libreoffice 20 | 21 | # Launchers 22 | rofi 23 | rofimoji 24 | 25 | wofi 26 | wofi-emoji 27 | 28 | # Utilities 29 | flameshot 30 | pavucontrol 31 | arandr 32 | baobab 33 | xclip 34 | feh 35 | mpv 36 | zathura 37 | 38 | # CLI Tools 39 | pamixer 40 | brightnessctl 41 | playerctl 42 | ]; 43 | } 44 | -------------------------------------------------------------------------------- /modules/home/desktop/theme.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | home.pointerCursor = { 10 | x11.enable = true; 11 | gtk.enable = true; 12 | 13 | package = pkgs.vanilla-dmz; 14 | name = "Vanilla-DMZ"; 15 | size = 24; 16 | }; 17 | 18 | gtk = { 19 | enable = true; 20 | iconTheme = { 21 | package = pkgs.adwaita-icon-theme; 22 | name = "Adwaita"; 23 | }; 24 | 25 | # theme = { 26 | # package = pkgs.gnome.gnome-themes-extra; 27 | # name = "Adwaita-dark"; 28 | # }; 29 | 30 | gtk3 = { 31 | extraConfig = { 32 | gtk-application-prefer-dark-theme = true; 33 | }; 34 | }; 35 | 36 | gtk4 = { 37 | extraConfig = { 38 | gtk-application-prefer-dark-theme = true; 39 | }; 40 | }; 41 | }; 42 | 43 | qt = { 44 | enable = true; 45 | # platformTheme = "gnome"; 46 | # style = { 47 | # package = pkgs.adwaita-qt; 48 | # name = "Adwaita-dark"; 49 | # }; 50 | }; 51 | } 52 | -------------------------------------------------------------------------------- /modules/home/develop/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | imports = [ 10 | ./software.nix 11 | ./neovim.nix 12 | ]; 13 | } 14 | -------------------------------------------------------------------------------- /modules/home/develop/neovim.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | let 9 | fidget-nvim-legacy = pkgs.vimUtils.buildVimPlugin { 10 | pname = "fidget.nvim-legacy"; 11 | version = "2023-06-10"; 12 | src = pkgs.fetchFromGitHub { 13 | owner = "j-hui"; 14 | repo = "fidget.nvim"; 15 | rev = "90c22e47be057562ee9566bad313ad42d622c1d3"; 16 | sha256 = "N3O/AvsD6Ckd62kDEN4z/K5A3SZNR15DnQeZhH6/Rr0="; 17 | }; 18 | meta.homepage = "https://github.com/j-hui/fidget.nvim/"; 19 | }; 20 | sloth-syntax = pkgs.vimUtils.buildVimPlugin { 21 | pname = "sloth-syntax"; 22 | version = "2023-07-30"; 23 | src = pkgs.fetchFromGitHub { 24 | owner = "slothlang"; 25 | repo = "vim"; 26 | rev = "9e331abb25dc17986bbd222fbbe28e76fc3034af"; 27 | sha256 = "kSwV+uMufwyhdHynxaShWHCWAj8Q15EJ+2VoIKFqoqw="; 28 | }; 29 | }; 30 | in 31 | { 32 | # Setting up neovim and making it the default editor 33 | programs.neovim.enable = true; 34 | 35 | programs.neovim.defaultEditor = true; 36 | programs.neovim.viAlias = true; 37 | programs.neovim.vimAlias = true; 38 | 39 | # Installing neovim plugins 40 | programs.neovim.plugins = with pkgs.vimPlugins; [ 41 | plenary-nvim 42 | nui-nvim 43 | 44 | lualine-nvim 45 | indent-blankline-nvim 46 | which-key-nvim 47 | vim-sleuth 48 | fidget-nvim-legacy 49 | comment-nvim 50 | 51 | # Color scheme 52 | gruvbox-nvim 53 | onedark-nvim 54 | 55 | # Nix integration 56 | direnv-vim 57 | 58 | # Terminal integration 59 | vim-floaterm 60 | 61 | # Git Related 62 | vim-fugitive 63 | vim-rhubarb 64 | gitsigns-nvim 65 | 66 | # Treesitter 67 | nvim-treesitter.withAllGrammars 68 | nvim-treesitter-context 69 | nvim-treesitter-textobjects 70 | 71 | # Telescope 72 | telescope-nvim 73 | telescope-fzf-native-nvim 74 | 75 | # Neotree 76 | neo-tree-nvim 77 | nvim-web-devicons 78 | 79 | # Cokeline 80 | nvim-cokeline 81 | 82 | # Language Support 83 | nvim-lspconfig 84 | rust-tools-nvim 85 | sloth-syntax 86 | emmet-vim 87 | 88 | # Autocompletion 89 | luasnip 90 | nvim-cmp 91 | cmp-nvim-lsp 92 | cmp_luasnip 93 | ]; 94 | 95 | # Configuring neovim and installing packages required by our config 96 | programs.neovim.extraPackages = with pkgs; [ 97 | ripgrep 98 | 99 | # LSPs 100 | clang-tools_15 101 | # python310Packages.python-lsp-server 102 | ]; 103 | 104 | programs.neovim.extraLuaConfig = '' 105 | local get_hl_attr = require('cokeline.hlgroups').get_hl_attr 106 | 107 | -- Setting as leader key 108 | vim.g.mapleader = ' ' 109 | vim.g.maplocalleader = ' ' 110 | 111 | -- Setting the color scheme 112 | require('gruvbox').setup { 113 | contrast = "hard" 114 | } 115 | 116 | vim.o.background = 'dark' 117 | vim.cmd.colorscheme 'gruvbox' 118 | 119 | vim.api.nvim_set_hl(0, "SignColumn", { 120 | bg = get_hl_attr("Normal", "bg") 121 | }) 122 | 123 | -- Setting web devicons 124 | require('nvim-web-devicons').setup { 125 | override_by_filename = { 126 | ["license-mit"] = { 127 | icon = "", 128 | color = "#d0bf41", 129 | cterm_color = "185", 130 | name = "License", 131 | }, 132 | ["license-apache"] = { 133 | icon = "", 134 | color = "#d0bf41", 135 | cterm_color = "185", 136 | name = "License", 137 | }, 138 | }; 139 | 140 | override_by_extension = { 141 | ["rs"] = { 142 | icon = "", 143 | }, 144 | }; 145 | } 146 | 147 | -- Generic settings for neovim 148 | vim.o.mouse = 'a' 149 | vim.o.hlsearch = false 150 | vim.o.breakindent = true 151 | 152 | vim.o.clipboard = 'unnamedplus' 153 | vim.o.undofile = true 154 | 155 | vim.o.ignorecase = true 156 | vim.o.smartcase = true 157 | 158 | vim.o.updatetime = 250 159 | vim.o.timeout = true 160 | vim.o.timeoutlen = 300 161 | 162 | vim.o.completeopt = 'menuone,noselect' 163 | vim.o.termguicolors = true 164 | vim.wo.number = true 165 | vim.wo.relativenumber = true 166 | vim.wo.signcolumn = 'yes' 167 | 168 | vim.o.tabstop = 4 169 | vim.o.softtabstop = 4 170 | vim.o.shiftwidth = 4 171 | vim.o.expandtab = true 172 | 173 | -- Settings for graphical environments like neovide 174 | vim.o.guifont = 'JetBrains Mono:h10' 175 | 176 | -- Activating misc plugins 177 | require('fidget').setup {} 178 | require('which-key').setup {} 179 | require('Comment').setup {} 180 | 181 | -- Configure Lualine 182 | require('lualine').setup { 183 | options = { 184 | icons_enabled = false, 185 | component_separators = '|', 186 | section_separators = ''', 187 | }, 188 | } 189 | 190 | -- Configure Indent Blankline 191 | require('ibl').setup { 192 | indent = { char = '┊' }, 193 | } 194 | 195 | -- Configure Floaterm 196 | vim.cmd([[ 197 | nnoremap FloatermToggle 198 | tnoremap FloatermToggle 199 | ]]) 200 | 201 | -- Configure Gitsigns 202 | require('gitsigns').setup { 203 | signs = { 204 | add = { text = '▎' }, 205 | change = { text = '▎' }, 206 | delete = { text = '_' }, 207 | topdelete = { text = '‾' }, 208 | changedelete = { text = '▎' }, 209 | untracked = { text = '▎' }, 210 | } 211 | } 212 | 213 | -- Configure Telescope 214 | require('telescope').setup {} 215 | pcall(require('telescope').load_extension, 'fzf') 216 | 217 | do 218 | -- Set the keybinds 219 | local tsb = require('telescope.builtin') 220 | 221 | vim.keymap.set('n', '?' , tsb.oldfiles , { desc = '[?] Find recently opened files' }) 222 | vim.keymap.set('n', '', tsb.buffers , { desc = '[ ] Find existing buffers' }) 223 | vim.keymap.set('n', 'sf' , tsb.find_files , { desc = '[SF] Search Files' }) 224 | vim.keymap.set('n', 'sF' , tsb.git_files , { desc = '[SF] Search Git Files' }) 225 | vim.keymap.set('n', 'sh' , tsb.help_tags , { desc = '[SH] Search Help' }) 226 | vim.keymap.set('n', 'sg' , tsb.live_grep , { desc = '[SG] Search by Grep' }) 227 | vim.keymap.set('n', 'sd' , tsb.diagnostics, { desc = '[SD] Search Diagnostics' }) 228 | vim.keymap.set('n', 'sr' , tsb.registers , { desc = '[SR] Search Registers' }) 229 | 230 | vim.keymap.set('n', '/', function() 231 | tsb.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { 232 | previewer = false, 233 | }) 234 | end, { desc = '[/] Fuzzily search in current buffer' }) 235 | end 236 | 237 | -- Configure Neotree 238 | require('neo-tree').setup { 239 | filesystem = { 240 | filtered_items = { 241 | hide_dotfiles = false, 242 | hide_gitignored = true, 243 | hide_by_name = { '.git' }, 244 | }, 245 | group_empty_dirs = true, 246 | }, 247 | window = { 248 | mappings = { 249 | ['l'] = "open", 250 | }, 251 | }, 252 | } 253 | 254 | vim.cmd([[ 255 | nnoremap Neotree position=float toggle 256 | tnoremap Neotree position=float toggle 257 | ]]) 258 | 259 | -- Configure Cokeline 260 | require('cokeline').setup { 261 | default_hl = { 262 | fg = function(buffer) 263 | if buffer.is_focused then 264 | return get_hl_attr('ColorColumn', 'bg') 265 | else 266 | return get_hl_attr('Normal', 'fg') 267 | end 268 | end, 269 | bg = function(buffer) 270 | if buffer.is_focused then 271 | return get_hl_attr('Normal', 'fg') 272 | else 273 | return get_hl_attr('ColorColumn', 'bg') 274 | end 275 | end, 276 | }, 277 | components = { 278 | { 279 | text = function(buffer) return ' ' .. buffer.filename .. ' ' end, 280 | }, 281 | }, 282 | } 283 | 284 | -- Configure Treesitter 285 | require('nvim-treesitter.configs').setup { 286 | highlight = { enable = true }, 287 | indent = { enable = true }, 288 | incremental_selection = { 289 | enable = true, 290 | keymaps = { 291 | init_selection = '', 292 | node_incremental = '', 293 | scope_incremental = '', 294 | node_decremental = '', 295 | }, 296 | }, 297 | } 298 | 299 | -- Configure LSP 300 | local lspconfig = require('lspconfig') 301 | 302 | vim.api.nvim_create_autocmd('LspAttach', { 303 | group = vim.api.nvim_create_augroup('UserLspConfig', {}), 304 | callback = function(ev) 305 | local tsb = require('telescope.builtin') 306 | local nmap = function(keys, func, desc) 307 | if desc then 308 | desc = 'LSP: ' .. desc 309 | end 310 | 311 | vim.keymap.set('n', keys, func, { silent = true, buffer = ev.buf, desc = desc }) 312 | end 313 | 314 | nmap('rn', vim.lsp.buf.rename , '[RN] Rename') 315 | nmap('ca', vim.lsp.buf.code_action, '[CA] Code Action') 316 | 317 | nmap('gD', vim.lsp.buf.declaration , '[GD] Goto Declaration') 318 | nmap('gd', vim.lsp.buf.definition , '[GD] Goto Definition') 319 | nmap('gr', tsb.lsp_references , '[GR] Goto References') 320 | nmap('gI', vim.lsp.buf.implementation, '[GI] Goto Implementation') 321 | 322 | nmap('K' , vim.lsp.buf.hover , 'Hover Documentation') 323 | nmap('', vim.lsp.buf.signature_help, 'Signature Documentation') 324 | end, 325 | }) 326 | 327 | vim.api.nvim_create_autocmd('BufWritePre', { 328 | callback = function(ev) 329 | vim.lsp.buf.format() 330 | end, 331 | }) 332 | 333 | -- Configure C/C++ support 334 | lspconfig.clangd.setup { 335 | on_attach = function(_, bufnr) 336 | local nmap = function(keys, func, desc) 337 | if desc then desc = 'LSP: ' .. desc end 338 | vim.keymap.set('n', keys, func, { silent = true, buffer = bufnr, desc = desc }) 339 | end 340 | 341 | nmap('Rr', 'FloatermNew --autoclose=0 make run' , 'Run Project') 342 | end 343 | } 344 | 345 | -- Configure Rust support 346 | require('rust-tools').setup { 347 | tools = { 348 | inlay_hints = { 349 | auto = true, 350 | show_parameter_hints = false, 351 | parameter_hints_prefix = ''', 352 | other_hints_prefix = ''', 353 | }, 354 | }, 355 | server = { 356 | on_attach = function(_, bufnr) 357 | local rt = require('rust-tools') 358 | local nmap = function(keys, func, desc) 359 | if desc then desc = 'LSP: ' .. desc end 360 | vim.keymap.set('n', keys, func, { silent = true, buffer = bufnr, desc = desc }) 361 | end 362 | 363 | nmap('Rr', 'FloatermNew --autoclose=0 cargo run' , 'Run Project') 364 | nmap('Rt', 'FloatermNew --autoclose=0 cargo test' , 'Run Tests') 365 | nmap('Rc', 'FloatermNew --autoclose=0 cargo clippy' , 'Run Clippy') 366 | nmap('RC', 'FloatermNew --autoclose=0 cargo deny check -A warnings', 'Run Cargo Deny') 367 | 368 | nmap('gM', rt.expand_macro.expand_macro, 'Expand Macro') 369 | end, 370 | settings = { 371 | ['rust-analyzer'] = { 372 | check = { 373 | command = "clippy", 374 | }, 375 | procMacro = { 376 | enable = true, 377 | }, 378 | }, 379 | }, 380 | }, 381 | } 382 | 383 | -- TODO: Configure Java support 384 | 385 | -- Configure Python support 386 | lspconfig.pylsp.setup { 387 | on_attach = function() 388 | completion.on_attach() 389 | -- Python specifically isn't setting omnifunc correctly, ftplugin conflict 390 | vim.api.nvim_buf_set_option(0, 'omnifunc', 'v:lua.vim.lsp.omnifunc') 391 | end 392 | } 393 | 394 | -- Configure Auto Complete 395 | local cmp = require('cmp') 396 | local luasnip = require('luasnip') 397 | 398 | luasnip.config.setup {} 399 | 400 | cmp.setup { 401 | snippet = { 402 | expand = function(args) 403 | luasnip.lsp_expand(args.body) 404 | end, 405 | }, 406 | mapping = cmp.mapping.preset.insert { 407 | [''] = cmp.mapping.scroll_docs(-4), 408 | [''] = cmp.mapping.scroll_docs(4), 409 | [''] = cmp.mapping.complete {}, 410 | [''] = cmp.mapping.confirm { 411 | behavior = cmp.ConfirmBehavior.Replace, 412 | select = true, 413 | }, 414 | [''] = cmp.mapping(function(fallback) 415 | if cmp.visible() then 416 | cmp.select_next_item() 417 | elseif luasnip.expand_or_jumpable() then 418 | luasnip.expand_or_jump() 419 | else 420 | fallback() 421 | end 422 | end, { 'i', 's' }), 423 | [''] = cmp.mapping(function(fallback) 424 | if cmp.visible() then 425 | cmp.select_prev_item() 426 | elseif luasnip.jumpable(-1) then 427 | luasnip.jump(-1) 428 | else 429 | fallback() 430 | end 431 | end, { 'i', 's' }), 432 | }, 433 | sources = { 434 | { name = 'nvim_lsp' }, 435 | { name = 'luasnip' }, 436 | }, 437 | } 438 | 439 | -- Diagnostic keymaps 440 | vim.keymap.set('n', '[d' , vim.diagnostic.goto_prev , { desc = "Go to prev diagnostic message" }) 441 | vim.keymap.set('n', ']d' , vim.diagnostic.goto_next , { desc = "Go to next diagnostic message" }) 442 | vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = "Open floating diagnostic message" }) 443 | vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = "Open diagnostic list" }) 444 | 445 | -- Buffer nav keymaps 446 | vim.keymap.set('n', 'bn', 'bn') 447 | vim.keymap.set('n', 'bp', 'bp') 448 | vim.keymap.set('n', 'bc', 'bd') 449 | ''; 450 | } 451 | -------------------------------------------------------------------------------- /modules/home/develop/software.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | home.packages = with pkgs; [ 10 | ]; 11 | } 12 | -------------------------------------------------------------------------------- /modules/system/base/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | imports = [ 10 | ./keyboard.nix 11 | ./nixos.nix 12 | ./software.nix 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /modules/system/base/keyboard.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | # Adding extra modprobe config options, first one making 10 | # the function keys on apple layout keywords actually act as 11 | # function keys and not special ones. 12 | boot.extraModprobeConfig = '' 13 | options hid_apple fnmode=2 14 | ''; 15 | } 16 | -------------------------------------------------------------------------------- /modules/system/base/nixos.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | nix = { 10 | package = pkgs.nixVersions.stable; 11 | extraOptions = '' 12 | experimental-features = nix-command flakes 13 | ''; 14 | gc = { 15 | automatic = false; 16 | dates = "weekly"; 17 | options = "--delete-older-than 14d"; 18 | }; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /modules/system/base/software.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | environment.systemPackages = with pkgs; [ 10 | direnv 11 | ranger 12 | wget 13 | curl 14 | git 15 | htop 16 | killall 17 | tmux 18 | file 19 | gzip 20 | unzip 21 | zip 22 | eza 23 | neofetch 24 | gay 25 | yt-dlp 26 | graphviz 27 | lm_sensors 28 | ]; 29 | 30 | environment.shells = [ 31 | pkgs.zsh 32 | pkgs.bash 33 | ]; 34 | environment.pathsToLink = [ "/share/zsh" ]; 35 | } 36 | -------------------------------------------------------------------------------- /modules/system/desktop/awesome.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | with lib; 9 | let 10 | cfg = config.sys.desktop.awesome; 11 | in 12 | { 13 | options.sys.desktop.awesome = { 14 | enable = mkEnableOption "Enable AwesomeWM desktop support for this machine"; 15 | }; 16 | 17 | config = mkIf cfg.enable { 18 | services.xserver.enable = true; 19 | 20 | services.xserver.displayManager = { 21 | sddm.enable = true; 22 | defaultSession = "none+awesome"; 23 | }; 24 | 25 | services.xserver.windowManager.awesome = { 26 | enable = true; 27 | luaModules = with pkgs.luaPackages; [ 28 | luarocks 29 | ]; 30 | }; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /modules/system/desktop/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | imports = [ 10 | ./awesome.nix 11 | ./i18n.nix 12 | ]; 13 | 14 | config = { 15 | services.xserver.enable = true; 16 | services.xserver.dpi = 96; 17 | services.xserver.xkb.layout = "us"; 18 | services.xserver.xkb.options = "caps:swapescape, compose:ralt"; 19 | 20 | services.libinput = { 21 | enable = true; 22 | touchpad.tapping = false; 23 | mouse.accelProfile = "flat"; 24 | mouse.accelSpeed = "1.4"; 25 | }; 26 | 27 | services.gvfs.enable = true; 28 | 29 | xdg.mime.defaultApplications = { 30 | "inode/directory" = "nemo.desktop"; 31 | 32 | "text/html" = "org.qutebrowser.qutebrowser.desktop"; 33 | "image/svg" = "org.qutebrowser.qutebrowser.desktop"; 34 | "image/svg+xml" = "org.qutebrowser.qutebrowser.desktop"; 35 | "x-scheme-handler/http" = "org.qutebrowser.qutebrowser.desktop"; 36 | "x-scheme-handler/https" = "org.qutebrowser.qutebrowser.desktop"; 37 | "x-scheme-handler/about" = "org.qutebrowser.qutebrowser.desktop"; 38 | "x-scheme-handler/unknown" = "org.qutebrowser.qutebrowser.desktop"; 39 | "application/pdf" = "org.pwmt.zathura.desktop"; 40 | 41 | "image/png" = "feh.desktop"; 42 | "image/jpeg" = "feh.desktop"; 43 | "image/gif" = "feh.desktop"; 44 | "image/webm" = "feh.desktop"; 45 | "video/mp4" = "mpv.desktop"; 46 | }; 47 | 48 | fonts = { 49 | enableDefaultPackages = true; 50 | packages = with pkgs; [ 51 | liberation_ttf 52 | dejavu_fonts 53 | noto-fonts 54 | noto-fonts-lgc-plus 55 | jetbrains-mono 56 | 57 | twitter-color-emoji 58 | font-awesome 59 | 60 | nerd-fonts.jetbrains-mono 61 | ]; 62 | 63 | fontconfig = { 64 | defaultFonts = { 65 | serif = [ 66 | "DejaVu Math TeX Gyre" 67 | "DejaVu Serif" 68 | "Noto Serif" 69 | ]; 70 | sansSerif = [ 71 | "DejaVu Sans" 72 | "Noto Sans" 73 | ]; 74 | monospace = [ 75 | "JetBrainsMono Nerd Font" 76 | "DejaVu Sans Mono" 77 | ]; 78 | emoji = [ 79 | "Twitter Color Emoji" 80 | "Noto Color Emoji" 81 | "Noto Emoji" 82 | ]; 83 | }; 84 | }; 85 | }; 86 | 87 | # environment.variables = { 88 | # GTK_THEME = "Adwaita-dark"; 89 | # }; 90 | }; 91 | } 92 | -------------------------------------------------------------------------------- /modules/system/desktop/i18n.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | i18n.inputMethod.enabled = "fcitx5"; 10 | i18n.inputMethod.fcitx5.addons = with pkgs; [ 11 | fcitx5-chinese-addons 12 | fcitx5-rime 13 | ]; 14 | 15 | services.xserver.displayManager.sessionCommands = '' 16 | export XMODIFIERS=@im=fcitx 17 | export QT_IM_MODULE=fcitx 18 | export GTK_IM_MODULE=fcitx 19 | 20 | fcitx5 -dr 21 | ''; 22 | } 23 | -------------------------------------------------------------------------------- /modules/system/runtimes/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | { 9 | imports = [ 10 | ./java.nix 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /modules/system/runtimes/java.nix: -------------------------------------------------------------------------------- 1 | # Forked from https://github.com/gytis-ivaskevicius/nixfiles/blob/master/config/dev.nix (MIT) 2 | { 3 | config, 4 | pkgs, 5 | lib, 6 | ... 7 | }: 8 | 9 | with lib; 10 | let 11 | javaCfg = config.programs.java; 12 | defaultEnvVariables = { 13 | XDG_DATA_HOME = mkDefault "$HOME/.local/share"; 14 | XDG_CACHE_HOME = mkDefault "$HOME/.cache"; 15 | XDG_CONFIG_HOME = mkDefault "$HOME/.config"; 16 | }; 17 | in 18 | { 19 | options = { 20 | programs.java.additionalRuntimes = mkOption { 21 | description = '' 22 | Java packages to install. Typical values are pkgs.jdk or pkgs.jre. Example: 23 | ``` 24 | programs.java.additionalRuntimes = { 25 | inherit (pkgs) jdk11 jdk14 jdk15; 26 | }; 27 | ``` 28 | This snippet: 29 | 1. Generates environment variables `JAVA_HOME11` and `JAVA_HOME14` 30 | 2. Generates aliases `java11` and `java14` 31 | ''; 32 | default = { }; 33 | type = with types; attrsOf package; 34 | }; 35 | }; 36 | 37 | config = 38 | let 39 | escapeDashes = it: replaceStrings [ "-" ] [ "_" ] it; 40 | 41 | javaPkgs = javaCfg.additionalRuntimes; 42 | javaAliases = mapAttrs' ( 43 | name: value: nameValuePair "java-${name}" "${value.home}/bin/java" 44 | ) javaPkgs; 45 | javaTmpfiles = mapAttrsFlatten (name: value: "L+ /nix/java${name} - - - - ${value.home}") javaPkgs; 46 | javaEnvVariables = mapAttrs' ( 47 | name: value: nameValuePair "JAVA_HOME_${toUpper (escapeDashes name)}" "${value.home}" 48 | ) javaPkgs; 49 | in 50 | { 51 | environment.variables = javaEnvVariables // defaultEnvVariables; 52 | environment.shellAliases = javaAliases; 53 | systemd.tmpfiles.rules = javaTmpfiles; 54 | }; 55 | } 56 | -------------------------------------------------------------------------------- /modules/system/virtualisation/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: 7 | 8 | with lib; 9 | with pkgs; 10 | let 11 | cfg = config.sys.virtualisation; 12 | in 13 | { 14 | options.sys.virtualisation = { 15 | kvm = { 16 | enable = mkEnableOption "Enable KVM virtualisation"; 17 | }; 18 | 19 | docker = { 20 | enable = mkEnableOption "Enable Docker containerization"; 21 | }; 22 | }; 23 | 24 | config = { 25 | environment.systemPackages = with pkgs; [ 26 | (mkIf cfg.kvm.enable quickemu) 27 | ]; 28 | 29 | virtualisation.docker.enable = (mkIf cfg.docker.enable true); 30 | virtualisation.libvirtd = (mkIf cfg.kvm.enable { 31 | enable = true; 32 | qemu = { 33 | package = pkgs.qemu_kvm; 34 | runAsRoot = true; 35 | swtpm.enable = true; 36 | ovmf = { 37 | enable = true; 38 | packages = [(pkgs.OVMF.override { 39 | secureBoot = true; 40 | tpmSupport = true; 41 | }).fd]; 42 | }; 43 | }; 44 | }); 45 | 46 | boot.kernelModules = [ 47 | "kvm-amd" 48 | "kvm-intel" 49 | ]; 50 | }; 51 | } 52 | -------------------------------------------------------------------------------- /rebuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec sudo nixos-rebuild switch --flake '.#' 4 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | (builtins.getFlake ("git+file://" + toString ./.)).devShell 2 | -------------------------------------------------------------------------------- /system/haumea/configuration.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | inputs, 6 | ... 7 | }: 8 | 9 | { 10 | imports = [ 11 | ../../modules/system/base 12 | ../../modules/system/desktop 13 | ../../modules/system/runtimes 14 | ../../modules/system/virtualisation 15 | ./hardware-configuration.nix 16 | ./vm.nix 17 | ]; 18 | 19 | # Allow unfree packages & permit certain packages 20 | nixpkgs.config.allowUnfree = true; 21 | nixpkgs.config.permittedInsecurePackages = [ ]; 22 | 23 | # Manage the user accounts using home manager 24 | home-manager.useGlobalPkgs = true; 25 | home-manager.useUserPackages = true; 26 | home-manager.extraSpecialArgs = { inherit inputs; }; 27 | home-manager.users.cody = import ./users/cody/home.nix; 28 | 29 | # Kernel 30 | boot.kernelModules = [ 31 | "i2c-dev" 32 | "i2c-piix4" 33 | ]; 34 | boot.kernelParams = [ "video=HDMI-A-1:2560x1080@60" ]; 35 | 36 | # Bootloader 37 | boot.loader.grub.enable = true; 38 | boot.loader.grub.device = "nodev"; 39 | boot.loader.grub.efiSupport = true; 40 | boot.loader.grub.useOSProber = true; 41 | boot.loader.efi.canTouchEfiVariables = true; 42 | boot.loader.efi.efiSysMountPoint = "/boot/efi"; 43 | 44 | # Configuring secondary drives 45 | fileSystems."/mnt/drive-a" = { 46 | device = "/dev/disk/by-uuid/aa675732-bebd-4d03-8cfc-680dc9cbd3f9"; 47 | fsType = "ext4"; 48 | options = [ 49 | "defaults" 50 | "nofail" 51 | "x-gvfs-show" 52 | "x-gvfs-name=Drive%20A" 53 | ]; 54 | }; 55 | 56 | fileSystems."/mnt/drive-b" = { 57 | device = "/dev/disk/by-uuid/b868a06a-679d-4c39-bdca-a840ad54caa0"; 58 | fsType = "ext4"; 59 | options = [ 60 | "defaults" 61 | "nofail" 62 | "x-gvfs-show" 63 | "x-gvfs-name=Drive%20B" 64 | ]; 65 | }; 66 | 67 | # Virtualization 68 | sys.vm.windows.enable = false; 69 | 70 | # Networking 71 | networking.hostName = "haumea"; # Define your hostname. 72 | networking.networkmanager.enable = true; 73 | 74 | networking.nameservers = [ 75 | "1.1.1.1" 76 | "1.0.0.1" 77 | ]; 78 | 79 | services.resolved = { 80 | enable = true; 81 | dnssec = "true"; 82 | domains = [ "~." ]; 83 | fallbackDns = [ 84 | "1.1.1.1#one.one.one.one" 85 | "1.0.0.1#one.one.one.one" 86 | ]; 87 | dnsovertls = "true"; 88 | }; 89 | 90 | services.mullvad-vpn.enable = true; 91 | 92 | # networking.networkmanager.dns = "none"; 93 | # networking.resolvconf.enable = pkgs.lib.mkForce false; 94 | # networking.dhcpcd.extraConfig = "nohook resolv.conf"; 95 | 96 | # Wireguard VPN 97 | networking.firewall = { 98 | allowedUDPPorts = [ ]; 99 | allowedTCPPorts = [ 5173 25565 ]; 100 | }; 101 | 102 | networking.wg-quick.interfaces = { 103 | wg0 = { 104 | address = ["192.168.239.6/32"]; 105 | 106 | dns = [ 107 | "1.1.1.1" "1.0.0.1" 108 | "2606:4700:4700::1111" "2606:4700:4700::1001" 109 | ]; 110 | 111 | listenPort = 51820; 112 | mtu = 1300; 113 | 114 | privateKeyFile = "/etc/wireguard/wg0-key.priv"; 115 | 116 | peers = [ 117 | { 118 | publicKey = "RFPYvkr+luT91K+9u+cMKd/gQ/jNv6bQJmARuTrtHQ8="; 119 | 120 | allowedIPs = [ 121 | "192.168.240.0/20" 122 | "192.168.239.0/24" 123 | ]; 124 | 125 | endpoint = "5.161.73.194:51820"; 126 | persistentKeepalive = 21; 127 | } 128 | ]; 129 | }; 130 | }; 131 | 132 | # Bluetooth 133 | hardware.bluetooth.enable = true; 134 | services.blueman.enable = true; 135 | 136 | # Timezone and internationalisation 137 | time.timeZone = "America/Chicago"; 138 | i18n.defaultLocale = "en_US.utf8"; 139 | 140 | # Disabling power management & sleep 141 | powerManagement.enable = false; 142 | systemd.targets.sleep.enable = true; 143 | systemd.targets.suspend.enable = true; 144 | systemd.targets.hibernate.enable = false; 145 | systemd.targets.hybrid-sleep.enable = false; 146 | 147 | # Configure the X11 windowing system. 148 | services.xserver.displayManager.startx.enable = true; 149 | 150 | # Setup drawing tablet 151 | hardware.opentabletdriver.enable = true; 152 | 153 | # Setup keyboard 154 | hardware.keyboard.zsa.enable = true; 155 | 156 | # Enable printing support 157 | services.printing.enable = true; 158 | services.avahi.enable = true; 159 | services.avahi.nssmdns4 = true; 160 | services.avahi.openFirewall = true; 161 | 162 | # Enable hardware acceleration 163 | hardware.opengl.enable = true; 164 | 165 | services.dbus.enable = true; 166 | security.polkit.enable = true; 167 | 168 | # Enabling AwesomeWM 169 | # sys.desktop.awesome.enable = false; 170 | 171 | # Enable sound with pipewire. 172 | hardware.pulseaudio.enable = false; 173 | security.rtkit.enable = true; 174 | services.pipewire = { 175 | enable = true; 176 | alsa.enable = true; 177 | alsa.support32Bit = true; 178 | pulse.enable = true; 179 | jack.enable = true; 180 | }; 181 | 182 | # Define a user account. Don't forget to set a password with ‘passwd’. 183 | users.users.cody = { 184 | isNormalUser = true; 185 | description = "Cody"; 186 | extraGroups = [ 187 | "networkmanager" 188 | "wheel" 189 | "adbusers" 190 | "docker" 191 | "libvirtd" 192 | "kvm" 193 | "i2c" 194 | ]; 195 | packages = with pkgs; [ firefox ]; 196 | shell = pkgs.zsh; 197 | }; 198 | 199 | # Enable RGB 200 | services.hardware.openrgb.enable = true; 201 | services.hardware.openrgb.motherboard = "amd"; 202 | 203 | # Setting up Plex 204 | services.plex.enable = true; 205 | services.plex.openFirewall = true; 206 | 207 | # List packages installed in system profile. 208 | environment.systemPackages = with pkgs; [ 209 | # Unrelated 210 | cloudflare-warp 211 | i2c-tools 212 | 213 | # Mounting iOS devices 214 | libimobiledevice 215 | ifuse 216 | ]; 217 | 218 | services.usbmuxd = { 219 | enable = true; 220 | package = pkgs.usbmuxd2; 221 | }; 222 | 223 | services.flatpak.enable = true; 224 | 225 | # Programs and configurating them 226 | programs.java = { 227 | enable = true; 228 | additionalRuntimes = { 229 | inherit (pkgs) 230 | jdk23 231 | jdk21 232 | jdk17 233 | jdk11 234 | jdk8 235 | temurin-jre-bin-8 236 | ; 237 | }; 238 | package = pkgs.jdk21; 239 | }; 240 | 241 | programs.zsh.enable = true; 242 | programs.dconf.enable = true; 243 | programs.slock.enable = true; 244 | programs.adb.enable = true; 245 | programs.noisetorch.enable = true; 246 | 247 | programs.gamescope.enable = true; 248 | programs.steam = { 249 | enable = true; 250 | gamescopeSession.enable = true; 251 | }; 252 | 253 | # Setup discordfetch 254 | systemd.user.services.discordfetch = { 255 | enable = true; 256 | description = "discordfetch"; 257 | serviceConfig = { 258 | Type = "simple"; 259 | ExecStart = '' 260 | ${inputs.discordfetch.packages.${pkgs.system}.default}/bin/discordfetch \ 261 | --button "GitHub" "https://github.com/cody-quinn" \ 262 | --button "I use NixOS btw" "https://nixos.org" 263 | ''; 264 | }; 265 | after = [ "network.target" ]; 266 | wantedBy = [ "default.target" ]; 267 | }; 268 | 269 | # Setting up docker 270 | sys.virtualisation.kvm.enable = true; 271 | sys.virtualisation.docker.enable = true; 272 | 273 | # This value determines the NixOS release from which the default 274 | # settings for stateful data, like file locations and database versions 275 | # on your system were taken. It‘s perfectly fine and recommended to leave 276 | # this value at the release version of the first install of this system. 277 | # Before changing this value read the documentation for this option 278 | # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 279 | system.stateVersion = "22.11"; 280 | } 281 | -------------------------------------------------------------------------------- /system/haumea/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { 5 | config, 6 | lib, 7 | pkgs, 8 | modulesPath, 9 | ... 10 | }: 11 | 12 | { 13 | imports = [ 14 | (modulesPath + "/installer/scan/not-detected.nix") 15 | ]; 16 | 17 | boot.initrd.availableKernelModules = [ 18 | "nvme" 19 | "xhci_pci" 20 | "ahci" 21 | "usbhid" 22 | "sd_mod" 23 | ]; 24 | boot.initrd.kernelModules = [ ]; 25 | boot.kernelModules = [ "kvm-amd" ]; 26 | boot.extraModulePackages = [ ]; 27 | 28 | fileSystems."/" = { 29 | device = "/dev/disk/by-uuid/a5ba1b82-ec1e-4bcf-8b93-aa6a3b04246c"; 30 | fsType = "ext4"; 31 | }; 32 | 33 | fileSystems."/boot/efi" = { 34 | device = "/dev/disk/by-uuid/6364-F6D6"; 35 | fsType = "vfat"; 36 | options = [ 37 | "fmask=0022" 38 | "dmask=0022" 39 | ]; 40 | }; 41 | 42 | swapDevices = [ ]; 43 | 44 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 45 | # (the default) this is the recommended approach. When using systemd-networkd it's 46 | # still possible to use this option, but it's recommended to use it in conjunction 47 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 48 | networking.useDHCP = lib.mkDefault true; 49 | # networking.interfaces.br-6080db0c7e71.useDHCP = lib.mkDefault true; 50 | # networking.interfaces.docker0.useDHCP = lib.mkDefault true; 51 | # networking.interfaces.enp39s0.useDHCP = lib.mkDefault true; 52 | # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; 53 | 54 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 55 | hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 56 | } 57 | -------------------------------------------------------------------------------- /system/haumea/users/cody/home.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | config, 4 | pkgs, 5 | inputs, 6 | ... 7 | }: 8 | 9 | { 10 | imports = [ 11 | ../../../../modules/home/base 12 | ../../../../modules/home/browser 13 | ../../../../modules/home/desktop 14 | ../../../../modules/home/develop 15 | ]; 16 | 17 | home.username = "cody"; 18 | home.homeDirectory = "/home/cody"; 19 | 20 | home.packages = with pkgs; [ 21 | # Communication 22 | (discord.override { nss = nss_latest; }) 23 | (discord-canary.override { nss = nss_latest; }) 24 | element-desktop 25 | slack 26 | obsidian 27 | 28 | # Misc 29 | krita 30 | obs-studio 31 | libresprite 32 | aseprite 33 | filebot 34 | ffmpeg 35 | keymapp 36 | mcstatus 37 | 38 | inputs.discordfetch.packages.${pkgs.system}.default 39 | 40 | # Gaming 41 | prismlauncher 42 | osu-lazer-bin 43 | 44 | # Development 45 | gnumake 46 | cmake 47 | clang 48 | 49 | jetbrains.idea-ultimate 50 | jetbrains.rider 51 | jetbrains.goland 52 | jetbrains.clion 53 | zed-editor 54 | 55 | godot_4 56 | tiled 57 | renderdoc 58 | bytecode-viewer 59 | 60 | dive 61 | 62 | minikube 63 | docker-machine-kvm2 64 | kubectl 65 | kubernetes-helm 66 | lens 67 | 68 | # Calculator 69 | python310 70 | ]; 71 | 72 | programs.git = { 73 | userName = "Cody"; 74 | userEmail = "cody@codyq.dev"; 75 | signing.key = "1DE927325E9932E7"; 76 | }; 77 | 78 | programs.gpg.enable = true; 79 | services.gpg-agent.enable = true; 80 | services.gpg-agent.pinentryPackage = pkgs.pinentry-qt; 81 | 82 | # This value determines the Home Manager release that your 83 | # configuration is compatible with. This helps avoid breakage 84 | # when a new Home Manager release introduces backwards 85 | # incompatible changes. 86 | # 87 | # You can update Home Manager without changing this value. See 88 | # the Home Manager release notes for a list of state version 89 | # changes in each release. 90 | home.stateVersion = "22.11"; 91 | 92 | # Let Home Manager install and manage itself. 93 | programs.home-manager.enable = true; 94 | } 95 | -------------------------------------------------------------------------------- /system/haumea/users/cody/waybar/config: -------------------------------------------------------------------------------- 1 | { 2 | "layer": "top", 3 | "position": "top", 4 | 5 | "modules-left": [ 6 | "hyprland/workspaces", 7 | "hyprland/window" 8 | ], 9 | 10 | "modules-center": [ 11 | "disk" 12 | ], 13 | 14 | "modules-right": [ 15 | "pulseaudio", 16 | "memory", 17 | "cpu", 18 | "battery", 19 | "clock" 20 | ], 21 | 22 | "hyprland/workspaces": { 23 | "on-click": "activate", 24 | "on-scroll-up": "hyprctl dispatch workspace e+1", 25 | "on-scroll-down": "hyprctl dispatch workspace e-1", 26 | "format": "{icon}", 27 | "format-icons": { 28 | "11": "1", 29 | "12": "2", 30 | "13": "3", 31 | "14": "4", 32 | "15": "5", 33 | "16": "6", 34 | "17": "7", 35 | "18": "8", 36 | "19": "9", 37 | "20": "10", 38 | } 39 | }, 40 | "hyprland/window": { 41 | "separate-outputs": true, 42 | }, 43 | 44 | "pulseaudio": { 45 | "format": "{icon} {volume:2}%", 46 | "format-bluetooth": "{icon} {volume}%", 47 | "format-muted": "MUTE", 48 | "format-icons": { 49 | "headphones": "", 50 | "default": [ 51 | "", 52 | "" 53 | ] 54 | }, 55 | "scroll-step": 5, 56 | "on-click": "pamixer -t", 57 | "on-click-right": "pavucontrol" 58 | }, 59 | "memory": { 60 | "interval": 5, 61 | "format": "Mem {}%" 62 | }, 63 | "cpu": { 64 | "interval": 5, 65 | "format": "CPU {usage}%" 66 | }, 67 | "battery": { 68 | "states": { 69 | "good": 95, 70 | "warning": 30, 71 | "critical": 15 72 | }, 73 | "format": "{icon} {capacity}%", 74 | "format-icons": [ 75 | "", 76 | "", 77 | "", 78 | "", 79 | "" 80 | ] 81 | }, 82 | "disk": { 83 | "interval": 5, 84 | "tooltip-format": "Disk {percentage_used}%", 85 | "format": "{specific_used} out of {specific_total} used ({percentage_used}%)", 86 | "unit": "GB", 87 | "path": "/" 88 | }, 89 | "clock": { 90 | "interval": 1, 91 | "format": "{:%I:%M:%S %p}", 92 | "tooltip": true 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /system/haumea/users/cody/waybar/style.css: -------------------------------------------------------------------------------- 1 | @define-color gray #928374; 2 | @define-color red #fb4934; 3 | @define-color green #b8bb26; 4 | @define-color yellow #fabd2f; 5 | @define-color blue #83a598; 6 | @define-color purple #d3869b; 7 | @define-color aqua #8ec07c; 8 | @define-color orange #fe8019; 9 | 10 | @define-color bg-red #cc241d; 11 | @define-color bg-green #98971a; 12 | @define-color bg-yellow #d79921; 13 | @define-color bg-blue #458588; 14 | @define-color bg-purple #b16286; 15 | @define-color bg-aqua #689d6a; 16 | 17 | @define-color bg0 #1d2021; 18 | @define-color bg1 #282828; 19 | @define-color bg2 #3c3836; 20 | @define-color bg3 #504945; 21 | @define-color bg4 #665c54; 22 | @define-color bg5 #7c6f64; 23 | 24 | @define-color fg0 #fbf1c7; 25 | @define-color fg1 #ebdbb2; 26 | @define-color fg2 #d5c4a1; 27 | @define-color fg3 #bdae93; 28 | @define-color fg4 #a89984; 29 | 30 | * { 31 | font-size: 13.5px; 32 | font-family: monospace; 33 | } 34 | 35 | window#waybar { 36 | background: @bg0; 37 | color: @fg1; 38 | } 39 | 40 | #workspaces { 41 | background: @bg0; 42 | } 43 | 44 | #workspaces button, 45 | #workspaces button:hover { 46 | color: @fg1; 47 | border-radius: 0; 48 | padding: 0; 49 | } 50 | 51 | #workspaces button.active { 52 | background: @bg-blue; 53 | } 54 | 55 | #window { 56 | padding: 0 8px; 57 | } 58 | 59 | #pulseaudio, 60 | #memory, 61 | #cpu, 62 | #disk, 63 | #battery, 64 | #tray, 65 | #clock { 66 | background: @bg0; 67 | padding: 0 8px; 68 | } 69 | 70 | #pulseaudio { color: @red; } 71 | #memory { color: @green; } 72 | #cpu { color: @yellow; } 73 | #disk { color: @blue; } 74 | #battery { color: @purple; } 75 | #clock { color: @fg1; } 76 | 77 | -------------------------------------------------------------------------------- /system/haumea/vm.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | inputs, 6 | ... 7 | }: 8 | 9 | # Running on AMD system with 2 AMD GPUs. 10 | 11 | with lib; 12 | let 13 | cfg = config.sys.vm.windows; 14 | in 15 | { 16 | options.sys.vm.windows = { 17 | enable = mkEnableOption "Enable Windows VM"; 18 | }; 19 | 20 | config = ( 21 | mkIf cfg.enable { 22 | # Kernel Parameters 23 | boot.initrd.kernelModules = [ 24 | "vfio" 25 | "vfio_iommu_type1" 26 | "vfio_pci" 27 | "amdgpu" 28 | ]; 29 | boot.kernelParams = [ 30 | "amd_iommu=on" 31 | "iommu=pt" 32 | "kvm.ignore_msrs=1" 33 | ]; 34 | boot.kernelModules = [ "kvm-amd" ]; 35 | 36 | boot.extraModprobeConfig = '' 37 | options vfio-pci ids=1002:73ff,1002:ab28 38 | ''; 39 | 40 | # Loading vfio-pci before graphics drivers steal my GPU 41 | environment.etc."modprobe.d/vfio.conf".text = '' 42 | softdep drm pre: vfio-pci 43 | ''; 44 | 45 | # Enabling libvirtd 46 | virtualisation.libvirtd = { 47 | enable = true; 48 | onBoot = "start"; 49 | onShutdown = "shutdown"; 50 | 51 | qemu = { 52 | package = pkgs.qemu_kvm; 53 | 54 | ovmf.enable = true; 55 | ovmf.packages = [ pkgs.OVMFFull.fd ]; 56 | }; 57 | }; 58 | 59 | # Installing virt-manager 60 | programs.virt-manager.enable = true; 61 | 62 | # Setting up hooks & installing VM XML file 63 | systemd.tmpfiles.rules = 64 | let 65 | qemuHook = pkgs.writeShellApplication { 66 | name = "qemu-hook"; 67 | runtimeInputs = with pkgs; [ 68 | libvirt 69 | systemd 70 | kmod 71 | ]; 72 | 73 | text = '' 74 | # GUEST_NAME="$1" 75 | # OPERATION="$2" 76 | 77 | # if [ "$GUEST_NAME" != "win10" ]; then 78 | # exit 0 79 | # fi 80 | 81 | # if [ "$OPERATION" == "prepare" ]; then 82 | # fi 83 | 84 | # if [ "$OPERATION" == "release" ]; then 85 | # fi 86 | ''; 87 | }; 88 | in 89 | [ 90 | # TODO 91 | # "L+ /var/lib/libvirt/hooks/qemu - - - - ${getExe qemuHook}" 92 | # "L+ /var/lib/libvirt/qemu/win10.xml - - - - ${./win10.xml}" 93 | 94 | # Setting up looking-glass and installing the client 95 | "f /dev/shm/looking-glass 0660 cody kvm -" 96 | ]; 97 | 98 | # Installing the looking glass client 99 | environment.systemPackages = with pkgs; [ 100 | looking-glass-client 101 | ]; 102 | } 103 | ); 104 | } 105 | -------------------------------------------------------------------------------- /system/haumea/win10.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cody-quinn/dotfiles/a6a02db24c1ad7180626dc9d691cc92734125400/system/haumea/win10.xml -------------------------------------------------------------------------------- /system/thonkpad/configuration.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | home-manager, 6 | ... 7 | }: 8 | 9 | { 10 | imports = [ 11 | ../../modules/system/base 12 | ../../modules/system/desktop 13 | ../../modules/system/runtimes 14 | ../../modules/system/virtualisation 15 | ./hardware-configuration.nix 16 | ]; 17 | 18 | # Allow the installation of non-FOSS packages 19 | nixpkgs.config.allowUnfree = true; 20 | 21 | # Manage the user accounts using home manager 22 | home-manager.useGlobalPkgs = true; 23 | home-manager.useUserPackages = true; 24 | home-manager.users.cody = import ./users/cody/home.nix; 25 | 26 | # Bootloader. 27 | boot.loader.systemd-boot.enable = true; 28 | boot.loader.efi.canTouchEfiVariables = true; 29 | boot.loader.efi.efiSysMountPoint = "/boot/efi"; 30 | 31 | # Networking 32 | networking.hostName = "thonkpad"; # Define your hostname. 33 | networking.networkmanager.enable = true; 34 | networking.nameservers = [ 35 | "1.1.1.1" 36 | "1.0.0.1" 37 | ]; 38 | 39 | # Bluetooth 40 | hardware.bluetooth.enable = true; 41 | services.blueman.enable = true; 42 | 43 | # Timezone and internationalisation 44 | time.timeZone = "America/Chicago"; 45 | i18n.defaultLocale = "en_US.utf8"; 46 | 47 | # Configuring my display drivers & options 48 | services.xserver.videoDrivers = [ "nvidia" ]; 49 | services.logind.lidSwitch = "ignore"; 50 | 51 | hardware.opengl.enable = true; 52 | hardware.nvidia = { 53 | prime.offload.enable = false; 54 | prime.sync.enable = true; 55 | modesetting.enable = false; 56 | powerManagement.enable = true; 57 | }; 58 | 59 | # Enabling AwesomeWM 60 | sys.desktop.awesome.enable = true; 61 | 62 | # Enable CUPS to print documents. 63 | services.printing.enable = true; 64 | 65 | # Enable sound with pipewire. 66 | hardware.pulseaudio.enable = false; 67 | security.rtkit.enable = true; 68 | services.pipewire = { 69 | enable = true; 70 | alsa.enable = true; 71 | alsa.support32Bit = true; 72 | pulse.enable = true; 73 | jack.enable = true; 74 | }; 75 | 76 | # Setup OpenSSH 77 | services.openssh = { 78 | enable = true; 79 | 80 | settings = { 81 | PasswordAuthentication = false; 82 | KbdInteractiveAuthentication = false; 83 | }; 84 | }; 85 | 86 | # Define a user account. Don't forget to set a password with ‘passwd’. 87 | users.users.cody = { 88 | isNormalUser = true; 89 | description = "Cody"; 90 | extraGroups = [ 91 | "networkmanager" 92 | "wheel" 93 | "adbusers" 94 | "docker" 95 | "libvirtd" 96 | "kvm" 97 | ]; 98 | packages = with pkgs; [ ]; 99 | shell = pkgs.zsh; 100 | 101 | openssh.authorizedKeys.keys = [ 102 | "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINEVUY3XYjzUdW6Nm7psFrlIEA0OmRP5CEIWLl9D8dOy cody@codyq.dev" 103 | "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINRKLEellJCKQZ80YXAnMmIegA5WQLGN/P38TO1lxBRJ codyquinn1122@gmail.com" 104 | ]; 105 | }; 106 | 107 | # Packages relegated to the entire system 108 | environment.systemPackages = with pkgs; [ 109 | cloudflare-warp 110 | ]; 111 | 112 | # Programs and configurating them 113 | programs.java = { 114 | enable = true; 115 | additionalRuntimes = { 116 | inherit (pkgs) 117 | jdk21 118 | jdk17 119 | jdk11 120 | jdk8 121 | ; 122 | }; 123 | package = pkgs.jdk21; 124 | }; 125 | 126 | programs.zsh.enable = true; 127 | programs.dconf.enable = true; 128 | programs.slock.enable = true; 129 | programs.adb.enable = true; 130 | programs.steam.enable = true; 131 | programs.noisetorch.enable = true; 132 | 133 | # Setting up docker 134 | sys.virtualisation.kvm.enable = true; 135 | sys.virtualisation.docker.enable = true; 136 | 137 | # This value determines the NixOS release from which the default 138 | # settings for stateful data, like file locations and database versions 139 | # on your system were taken. It‘s perfectly fine and recommended to leave 140 | # this value at the release version of the first install of this system. 141 | # Before changing this value read the documentation for this option 142 | # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 143 | system.stateVersion = "22.05"; # Did you read the comment? 144 | } 145 | -------------------------------------------------------------------------------- /system/thonkpad/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { 5 | config, 6 | lib, 7 | pkgs, 8 | modulesPath, 9 | ... 10 | }: 11 | 12 | { 13 | imports = [ 14 | (modulesPath + "/installer/scan/not-detected.nix") 15 | ]; 16 | 17 | boot.initrd.availableKernelModules = [ 18 | "xhci_pci" 19 | "ahci" 20 | "sd_mod" 21 | "rtsx_pci_sdmmc" 22 | ]; 23 | boot.initrd.kernelModules = [ ]; 24 | boot.kernelModules = [ "kvm-intel" ]; 25 | boot.extraModulePackages = [ ]; 26 | 27 | fileSystems."/" = { 28 | device = "/dev/disk/by-uuid/b5873758-7741-46d4-a438-9d459e582f41"; 29 | fsType = "ext4"; 30 | }; 31 | 32 | fileSystems."/boot/efi" = { 33 | device = "/dev/disk/by-uuid/E90C-B048"; 34 | fsType = "vfat"; 35 | }; 36 | 37 | swapDevices = [ ]; 38 | 39 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 40 | # (the default) this is the recommended approach. When using systemd-networkd it's 41 | # still possible to use this option, but it's recommended to use it in conjunction 42 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 43 | networking.useDHCP = lib.mkDefault true; 44 | # networking.interfaces.docker0.useDHCP = lib.mkDefault true; 45 | # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; 46 | # networking.interfaces.virbr0.useDHCP = lib.mkDefault true; 47 | # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; 48 | 49 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 50 | powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 51 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 52 | } 53 | -------------------------------------------------------------------------------- /system/thonkpad/users/cody/home.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | 3 | { 4 | imports = [ 5 | ../../../../modules/home/base 6 | ../../../../modules/home/browser 7 | ../../../../modules/home/desktop 8 | ../../../../modules/home/develop 9 | ]; 10 | 11 | home.username = "cody"; 12 | home.homeDirectory = "/home/cody"; 13 | 14 | home.packages = with pkgs; [ 15 | # Communication 16 | (discord.override { nss = nss_latest; }) 17 | element-desktop 18 | 19 | # Misc 20 | krita 21 | obs-studio 22 | 23 | # Gaming 24 | prismlauncher 25 | 26 | # Calculator 27 | python310 28 | ]; 29 | 30 | programs.git = { 31 | userName = "Cody"; 32 | userEmail = "cody@codyq.dev"; 33 | signing.key = "1DE927325E9932E7"; 34 | }; 35 | 36 | programs.gpg.enable = true; 37 | services.gpg-agent.enable = true; 38 | 39 | # This value determines the Home Manager release that your 40 | # configuration is compatible with. This helps avoid breakage 41 | # when a new Home Manager release introduces backwards 42 | # incompatible changes. 43 | # 44 | # You can update Home Manager without changing this value. See 45 | # the Home Manager release notes for a list of state version 46 | # changes in each release. 47 | home.stateVersion = "22.05"; 48 | 49 | # Let Home Manager install and manage itself. 50 | programs.home-manager.enable = true; 51 | } 52 | -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec nix flake update 4 | --------------------------------------------------------------------------------