diff --git a/README.md b/README.md deleted file mode 100644 index 1dfabaa..0000000 --- a/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# linuxware - -This repository contains the configuration of my main Linux based system(s), currently this repository consist of a -[NixOS] system configuration alongside [dotfiles] generated by [Home Manager] and [dotfiles] maintained by me. - -## Navigation guide - -In this section I will detail how you can navigate and make the most use out of my configuration. - -### File structure - -- [`flake.nix` & `flake.lock`](#flake) - - _This is the "entry-point" of the [NixOS] configuration._ -- [`hosts/`](/hosts/) - - _Inside you can find the per-system customizations I've made._ -- [`modules/`](/modules/) - - _These contain the modules I export in the [flake](#flake)._ -- [`packages/`](/packages/) - - _Encompasses the packages I maintain outside or in tandem with [nixpkgs]._ -- [`shared/`](/shared/) - - _The [NixOS] and [Home Manager] configuration that's shared across hosts._ -- [`assets/`](/assets/) - - _All media used in this configuration or shown inside READMEs._ - -> _Be sure to click the hyperlinks for the relevant documentation._ - -#### Flake - -A flake basically contains what you want to consume in your environment and what you want to export to be consumed, on -top of having a lockfile to pin the versions of what you are consuming. - -Personally, the best way to learn how to use it as a beginner is the [Unofficial NixOS & Flakes -Book](https://nixos-and-flakes.thiscute.world/). I will not explain how to configure or use my flake as that would be -lenghty. - -I export four modules that you can use in your configuration: -- [Hyprland NixOS configuration](/modules/hyprland/README.md) - - _Accessed through `.nixosModules.hyprland`._ -- [Hyprland home-manager configuration](/modules/hyprland/README.md#configuration) - - _Accessed through `.homeManagerModules.hyprland`._ -- [Emacs home-manager configuration & dotfiles](/modules/emacs/README.md) - - _Accessed through `.homeManagerModules.emacs`_ -- [Neovim home-manager configuration & dotfiles](/modules/neovim/README.md) - - _Accessed through `.homeManagerModules.neovim`._ - -> _Be sure to click the hyperlinks for the relevant documentation._ - -To facilitate on-boarding, once you've set-up the experimental features needed for flakes I have provided a template -with this repository for you to use; it comes with a [NixOS] system configuration, [Home Manager] configuration -alongside the modules that I provide. - -All you have to do is enter the directory you want your configuration to reside and execute -`nix flake init -t github:wizardlink/linuxware`. Be sure to read the `README.md` file! - -## Desktop screenshot - -![image](/assets/screenshots/full-system.png) - -> _All screenshots of the system and it's components are available [here](/assets/README.md)._ - - - - -[dotfiles]: https://wiki.archlinux.org/title/Dotfiles -[home manager]: https://github.com/nix-community/home-manager -[nixos]: https://nixos.org/ -[nixpkgs]: https://github.com/NixOS/nixpkgs/ diff --git a/assets/screenshots/doomemacs.png b/assets/screenshots/doomemacs.png deleted file mode 100644 index b481f63..0000000 Binary files a/assets/screenshots/doomemacs.png and /dev/null differ diff --git a/assets/screenshots/fastfetch-wizdesk.png b/assets/screenshots/fastfetch-wizdesk.png deleted file mode 100644 index 0a1b2c4..0000000 Binary files a/assets/screenshots/fastfetch-wizdesk.png and /dev/null differ diff --git a/assets/screenshots/full-system.png b/assets/screenshots/full-system.png deleted file mode 100644 index b5000f2..0000000 Binary files a/assets/screenshots/full-system.png and /dev/null differ diff --git a/assets/screenshots/hyprland-active.png b/assets/screenshots/hyprland-active.png deleted file mode 100644 index 9f7240a..0000000 Binary files a/assets/screenshots/hyprland-active.png and /dev/null differ diff --git a/assets/screenshots/hyprland-gaps.png b/assets/screenshots/hyprland-gaps.png deleted file mode 100644 index 65f0507..0000000 Binary files a/assets/screenshots/hyprland-gaps.png and /dev/null differ diff --git a/assets/screenshots/hyprland-inactive.png b/assets/screenshots/hyprland-inactive.png deleted file mode 100644 index ddf018a..0000000 Binary files a/assets/screenshots/hyprland-inactive.png and /dev/null differ diff --git a/assets/screenshots/rofi.png b/assets/screenshots/rofi.png deleted file mode 100644 index 5bd81c3..0000000 Binary files a/assets/screenshots/rofi.png and /dev/null differ diff --git a/assets/screenshots/waybar.png b/assets/screenshots/waybar.png deleted file mode 100644 index e024b03..0000000 Binary files a/assets/screenshots/waybar.png and /dev/null differ diff --git a/flake.lock b/flake.lock index 0617913..5ab8402 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1739298463, - "narHash": "sha256-oAFv9jKwwA7d7384d2LeywDSgwhvb3ZnrwbfoWPhXsI=", + "lastModified": 1739103745, + "narHash": "sha256-c53dcRaw0F4Os9WD05HwIRs9kTDZw4Mxe1XK4edEALo=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "f239e5aadd6d23c48e085c2de3397e2058e54d16", + "rev": "a3dda0d10ce9aa1d1dfb7a6c139ea8c2872c74bd", "type": "github" }, "original": { @@ -69,25 +69,6 @@ "type": "github" } }, - "gakuen-cosplay": { - "inputs": { - "nixpkgs": "nixpkgs", - "utils": "utils" - }, - "locked": { - "lastModified": 1741220025, - "narHash": "sha256-Eib4BQfSCQ0XSB0OJ+IahFIf5WN3VyJ2Zx0AAvID5z8=", - "ref": "refs/heads/main", - "rev": "c5fcfedf91b8a34014132902fc76eac6674ed49a", - "revCount": 15, - "type": "git", - "url": "file:///mnt/internal/shared/work/gakuen/projects/cosplayer_submission" - }, - "original": { - "type": "git", - "url": "file:///mnt/internal/shared/work/gakuen/projects/cosplayer_submission" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -117,11 +98,11 @@ ] }, "locked": { - "lastModified": 1741217763, - "narHash": "sha256-g/TrltIjFHIjtzKY5CJpoPANfHQWDD43G5U1a/v5oVg=", + "lastModified": 1739913864, + "narHash": "sha256-WhzgQjadrwnwPJQLLxZUUEIxojxa7UWDkf7raAkB1Lw=", "owner": "nix-community", "repo": "home-manager", - "rev": "486b066025dccd8af7fbe5dd2cc79e46b88c80da", + "rev": "97ac0801d187b2911e8caa45316399de12f6f199", "type": "github" }, "original": { @@ -133,8 +114,8 @@ "hydractify-bot": { "inputs": { "naersk": "naersk", - "nixpkgs": "nixpkgs_3", - "utils": "utils_2" + "nixpkgs": "nixpkgs_2", + "utils": "utils" }, "locked": { "lastModified": 1736510643, @@ -218,17 +199,17 @@ "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems_3", + "systems": "systems_2", "xdph": "xdph" }, "locked": { - "lastModified": 1741218628, - "narHash": "sha256-Z+jPT8nijCV1EzCZ5XkLr8x82WPCX/GKk8OKg8Kr+s4=", + "lastModified": 1739892000, + "narHash": "sha256-Dm/FHOSmOPX2yBiM0Ezd+SadhhHn2kaSNmoh12TgGis=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "243376078655f304b01e5097c59108745bbb9da9", + "rev": "0137a5f6cdd24d5a10f813572791f1e641221a5b", "type": "github" }, "original": { @@ -371,11 +352,11 @@ ] }, "locked": { - "lastModified": 1739891528, - "narHash": "sha256-h8HOCZ/rw2Buzku+GKF77VXxrGjCSOQkLhptiEKMYg0=", + "lastModified": 1739048933, + "narHash": "sha256-ck6MaoYvISBQKqZR+HcxXnx0wOhyCauxfVMaV5zhJxQ=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "61a5382f4b1ab578064d470b1b3d3f0df396b8ba", + "rev": "e4e018a2ca6f5a9c33511973454199e1c7c85499", "type": "github" }, "original": { @@ -411,7 +392,7 @@ }, "naersk": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1721727458, @@ -429,18 +410,6 @@ } }, "nixpkgs": { - "locked": { - "lastModified": 0, - "narHash": "sha256-zON2GNBkzsIyALlOCFiEBcIjI4w38GYOb+P+R4S8Jsw=", - "path": "/nix/store/s1fbk6a410xn8vcaj54iqv22agyn0ria-source", - "type": "path" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 0, "narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=", @@ -452,7 +421,7 @@ "type": "indirect" } }, - "nixpkgs_3": { + "nixpkgs_2": { "locked": { "lastModified": 1729850857, "narHash": "sha256-WvLXzNNnnw+qpFOmgaM3JUlNEH+T4s22b5i2oyyCpXE=", @@ -468,7 +437,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1739020877, "narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=", @@ -484,13 +453,13 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { - "lastModified": 1741010256, - "narHash": "sha256-WZNlK/KX7Sni0RyqLSqLPbK8k08Kq7H7RijPJbq9KHM=", + "lastModified": 1739736696, + "narHash": "sha256-zON2GNBkzsIyALlOCFiEBcIjI4w38GYOb+P+R4S8Jsw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", + "rev": "d74a2335ac9c133d6bbec9fc98d91a77f1604c1f", "type": "github" }, "original": { @@ -526,11 +495,10 @@ "root": { "inputs": { "clipboard-sync": "clipboard-sync", - "gakuen-cosplay": "gakuen-cosplay", "home-manager": "home-manager", "hydractify-bot": "hydractify-bot", "hyprland": "hyprland", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_4", "spicetify-nix": "spicetify-nix" } }, @@ -539,14 +507,14 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_4" + "systems": "systems_3" }, "locked": { - "lastModified": 1740889006, - "narHash": "sha256-A1iyKVvZrLdLwqWPC9OvPjC85ADQn2R1EGfCzJBl+wI=", + "lastModified": 1739679385, + "narHash": "sha256-Pu6gN/indwmI5OIKS5Q+Ffr7/yaOfDDWn5av4gshuNM=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "f8d3757d4ae3af2175a631fb9598a42d30ee75fc", + "rev": "8bac1688d527ec3b107353b8ea55b929af5193d4", "type": "github" }, "original": { @@ -571,21 +539,6 @@ } }, "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -600,7 +553,7 @@ "type": "github" } }, - "systems_4": { + "systems_3": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -619,24 +572,6 @@ "inputs": { "systems": "systems" }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_2": { - "inputs": { - "systems": "systems_2" - }, "locked": { "lastModified": 1726560853, "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", diff --git a/flake.nix b/flake.nix index d60ceef..cea4163 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,7 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + spicetify-nix = { url = "github:Gerg-L/spicetify-nix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -21,8 +22,6 @@ hyprland.url = "github:hyprwm/Hyprland"; hydractify-bot.url = "github:hydractify/hydractify-bot"; - - gakuen-cosplay.url = "git+file:///mnt/internal/shared/work/gakuen/projects/cosplayer_submission"; }; outputs = @@ -41,13 +40,13 @@ let specialArgs = inputs; modules = [ - ./hosts/wizdesk/nixos.nix + ./specific/desktop/nixos.nix home-manager.nixosModules.home-manager { home-manager.extraSpecialArgs = inputs; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.wizardlink = import ./hosts/wizdesk/home-manager.nix; + home-manager.users.wizardlink = import ./specific/desktop/home-manager.nix; } ]; in @@ -57,13 +56,13 @@ let specialArgs = inputs; modules = [ - ./hosts/wizlap/nixos.nix + ./specific/laptop/nixos.nix home-manager.nixosModules.home-manager { home-manager.extraSpecialArgs = inputs; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.wizardlink = import ./hosts/wizlap/home-manager.nix; + home-manager.users.wizardlink = import ./specific/laptop/home-manager.nix; } ]; in @@ -72,25 +71,10 @@ formatter."${system}" = pkgs.nixfmt-rfc-style; - packages."${system}" = { - wb32dfu-udev-rules = pkgs.callPackage ./packages/wb32dfu-udev-rules { }; - zenergy = pkgs.callPackage ./packages/zenergy.nix { }; - }; - - nixosModules = { - hyprland = import ./modules/hyprland/nixos.nix; - }; - homeManagerModules = { - emacs = import ./modules/emacs; - hyprland = import ./modules/hyprland/home-manager.nix; - neovim = import ./modules/neovim; - }; - - templates.default = { - path = ./modules/template; - description = "A NixOS & Home-Manager template to get started with the https://github.com/wizardlink/linuxware - configuration."; + emacsConfig = import ./modules/home-manager/programs/emacs; + hyprlandConfig = import ./modules/home-manager/programs/hyprland; + neovim = import ./modules/home-manager/programs/neovim; }; }; } diff --git a/hosts/README.md b/hosts/README.md deleted file mode 100644 index c9c75ee..0000000 --- a/hosts/README.md +++ /dev/null @@ -1,15 +0,0 @@ -## wizdesk - -My main machine, this is where I host everything that's accessible through the `thewizard.link` domain. - -### Specs - -![image](/assets/screenshots/fastfetch-wizdesk.png) - -## wizlap - -My ASUS Vivobook 15 (M1502IA), I mostly use it when I have to travel so there isn't much to say about it. - -### Specs - -They can be found in ASUS' store/support page, I haven't modified it yet. diff --git a/hosts/wizdesk/services/home-manager/default.nix b/hosts/wizdesk/services/home-manager/default.nix deleted file mode 100644 index 9cc2172..0000000 --- a/hosts/wizdesk/services/home-manager/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ ... }: - -{ - imports = [ - ./gakuen-cosplay-api.nix - ./hydractify-bot.nix - ./openttd.nix - ./terraria.nix - ]; -} diff --git a/hosts/wizdesk/services/home-manager/gakuen-cosplay-api.nix b/hosts/wizdesk/services/home-manager/gakuen-cosplay-api.nix deleted file mode 100644 index ede2c1d..0000000 --- a/hosts/wizdesk/services/home-manager/gakuen-cosplay-api.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ gakuen-cosplay, pkgs, ... }: - -{ - systemd.user.services.gakuen-cosplay-api = { - Install.WantedBy = [ "default.target" ]; - - Unit.Description = "Gakuen Cosplay API"; - - Service = { - ExecStart = "${gakuen-cosplay.packages.${pkgs.system}.backend}/bin/cosplayer_submission"; - Restart = "on-failure"; - Type = "simple"; - WorkingDirectory = "/mnt/internal/shared/work/gakuen/projects/cosplayer_submission/packages/backend"; - }; - }; -} diff --git a/hosts/wizdesk/services/nixos/default.nix b/hosts/wizdesk/services/nixos/default.nix deleted file mode 100644 index fcdcf83..0000000 --- a/hosts/wizdesk/services/nixos/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ ... }: - -{ - imports = [ - ./archi.nix - ./caddy.nix - ./forgejo.nix - ./jellyfin.nix - ./nix-serve.nix - ./postgresql.nix - ]; -} diff --git a/hosts/wizdesk/services/nixos/nix-serve.nix b/hosts/wizdesk/services/nixos/nix-serve.nix deleted file mode 100644 index d464767..0000000 --- a/hosts/wizdesk/services/nixos/nix-serve.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ ... }: - -{ - services.nix-serve = { - enable = true; - port = 7373; - secretKeyFile = "/etc/keys/nix-store-wizdesk-1"; - }; -} diff --git a/modules/README.md b/modules/README.md deleted file mode 100644 index 70ef9b1..0000000 --- a/modules/README.md +++ /dev/null @@ -1,8 +0,0 @@ -This directory encompasses all modules/resources that are exported by this repository's flake. - -## Currently maintained modules - -- [hyprland](./hyprland) -- [neovim](./neovim) -- [emacs](./emacs) -- [template](./template) diff --git a/modules/emacs/README.md b/modules/emacs/README.md deleted file mode 100644 index ea139eb..0000000 --- a/modules/emacs/README.md +++ /dev/null @@ -1,6 +0,0 @@ -This module has no options, it simply just adds the necessary packages to run -[DOOM Emacs](https://github.com/doomemacs/doomemacs) and writes contents inside [./doom](./doom) into `$XDG_CONFIG_HOME/doom`. - -## Screenshots - -![image](/assets/screenshots/doomemacs.png) diff --git a/shared/home-manager/common.nix b/modules/home-manager/common.nix similarity index 59% rename from shared/home-manager/common.nix rename to modules/home-manager/common.nix index 1e099bc..5365028 100644 --- a/shared/home-manager/common.nix +++ b/modules/home-manager/common.nix @@ -1,18 +1,24 @@ -{ pkgs, clipboard-sync, ... }: +{ pkgs, ... }: { + # Let Home Manager install and manage itself. programs.home-manager.enable = true; + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + home.sessionVariables = { + NIXOS_OZONE_WL = "1"; + QT_QPA_PLATFORM = "wayland"; + }; + home.file = { - # My utility scripts - ".local/share/scripts" = { - source = ./scripts; - recursive = true; - }; + # Configuration for gamemode, for running games with optimizations. + ".config/gamemode.ini".source = ./programs/gamemode.ini; # Configuration for mako, a notification daemon. - ".config/mako".source = ./dotfiles/mako; + ".config/mako".source = ./programs/mako; # Configure pipewire for microphone noise supression. ".config/pipewire/pipewire.conf.d/99-input-denoising.conf".text = '' @@ -50,6 +56,17 @@ } ] ''; + + # Configure DXVK + ".config/dxvk.conf".text = '' + dxvk.enableGraphicsPipelineLibrary = Auto + ''; + + # My utility scripts + ".local/share/scripts" = { + source = ./scripts; + recursive = true; + }; }; # Configure XDG @@ -63,74 +80,4 @@ "x-scheme-handler/https" = [ "firefox.desktop" ]; "x-scheme-handler/unknown" = [ "firefox.desktop" ]; }; - - home.packages = with pkgs; [ - # # You can also create simple shell scripts directly inside your - # # configuration. For example, this adds a command 'my-hello' to your - # # environment: - # (pkgs.writeShellScriptBin "my-hello" '' - # echo "Hello, ${config.home.username}!" - # '') - - ## Tools - # Utilities - fastfetch - firefox - pavucontrol - protonvpn-gui - qbittorrent - qdirstat - speedcrunch - vlc - yt-dlp - zathura - - # Personal utilities - anki - ledger - (vesktop.override { - # FIXME: Need to pin until https://github.com/NixOS/nixpkgs/issues/380429 gets resolved. - electron = electron_33; - }) - - # Editing - libreoffice - - # Creative work - aseprite - blender - krita - lmms - orca-slicer - shotcut - vcv-rack - vhs - - ## Entertainment - jellyfin-media-player - - ## Libraries - libsForQt5.kdegraphics-thumbnailers - libsForQt5.kio-extras - rnnoise-plugin - - ## Development - beekeeper-studio - godot_4 - hoppscotch - lazygit - - ## Desktop environment - clipboard-sync.packages.${pkgs.stdenv.hostPlatform.system}.default - cliphist - grim - libsForQt5.ark - loupe - mako - slurp - swww - - # Mail client - thunderbird - ]; } diff --git a/shared/home-manager/default.nix b/modules/home-manager/default.nix similarity index 68% rename from shared/home-manager/default.nix rename to modules/home-manager/default.nix index e0205e4..50b9785 100644 --- a/shared/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -3,8 +3,7 @@ { imports = [ ./common.nix - ./dotfiles - ./gaming.nix + ./packages.nix ./theming.nix ]; } diff --git a/modules/home-manager/packages.nix b/modules/home-manager/packages.nix new file mode 100644 index 0000000..41afbc0 --- /dev/null +++ b/modules/home-manager/packages.nix @@ -0,0 +1,89 @@ +{ pkgs, clipboard-sync, ... }: + +{ + imports = [ + ./programs + ]; + + # The home.packages option allows you to install Nix packages into your + # environment. + home.packages = with pkgs; [ + # # You can also create simple shell scripts directly inside your + # # configuration. For example, this adds a command 'my-hello' to your + # # environment: + # (pkgs.writeShellScriptBin "my-hello" '' + # echo "Hello, ${config.home.username}!" + # '') + + ## Tools + # Utilities + fastfetch + firefox + pavucontrol + protonvpn-gui + qbittorrent + qdirstat + speedcrunch + vlc + yt-dlp + zathura + + # Personal utilities + anki + ledger + vesktop + + # Editing + libreoffice + + # Creative work + aseprite + blender + krita + lmms + orca-slicer + shotcut + vcv-rack + vhs + + ## Entertainment + jellyfin-media-player + + # Gaming + gamescope + heroic + protontricks + wineWowPackages.unstableFull + winetricks + + # Games + openttd + prismlauncher + shattered-pixel-dungeon + xonotic + + ## Libraries + libsForQt5.kdegraphics-thumbnailers + libsForQt5.kio-extras + rnnoise-plugin + + ## Development + beekeeper-studio + godot_4 + hoppscotch + lazygit + + ## Desktop environment + clipboard-sync.packages.${pkgs.stdenv.hostPlatform.system}.default + cliphist + grim + libsForQt5.ark + loupe + mako + slurp + swww + + # Mail client + thunderbird + ]; +} diff --git a/shared/home-manager/dotfiles/alacritty.nix b/modules/home-manager/programs/alacritty.nix similarity index 100% rename from shared/home-manager/dotfiles/alacritty.nix rename to modules/home-manager/programs/alacritty.nix diff --git a/shared/home-manager/dotfiles/default.nix b/modules/home-manager/programs/default.nix similarity index 82% rename from shared/home-manager/dotfiles/default.nix rename to modules/home-manager/programs/default.nix index e08e113..e18c2d7 100644 --- a/shared/home-manager/dotfiles/default.nix +++ b/modules/home-manager/programs/default.nix @@ -4,9 +4,12 @@ imports = [ ./alacritty.nix ./direnv + ./emacs ./fish ./git.nix + ./hyprland ./mangohud.nix + ./neovim ./obs-studio.nix ./rofi ./spotify diff --git a/shared/home-manager/dotfiles/direnv/default.nix b/modules/home-manager/programs/direnv/default.nix similarity index 100% rename from shared/home-manager/dotfiles/direnv/default.nix rename to modules/home-manager/programs/direnv/default.nix diff --git a/modules/emacs/default.nix b/modules/home-manager/programs/emacs/default.nix similarity index 100% rename from modules/emacs/default.nix rename to modules/home-manager/programs/emacs/default.nix diff --git a/modules/emacs/doom/config.el b/modules/home-manager/programs/emacs/doom/config.el similarity index 100% rename from modules/emacs/doom/config.el rename to modules/home-manager/programs/emacs/doom/config.el diff --git a/modules/emacs/doom/init.el b/modules/home-manager/programs/emacs/doom/init.el similarity index 100% rename from modules/emacs/doom/init.el rename to modules/home-manager/programs/emacs/doom/init.el diff --git a/modules/emacs/doom/packages.el b/modules/home-manager/programs/emacs/doom/packages.el similarity index 100% rename from modules/emacs/doom/packages.el rename to modules/home-manager/programs/emacs/doom/packages.el diff --git a/modules/emacs/doom/snippets/org-mode/daily.org b/modules/home-manager/programs/emacs/doom/snippets/org-mode/daily.org similarity index 100% rename from modules/emacs/doom/snippets/org-mode/daily.org rename to modules/home-manager/programs/emacs/doom/snippets/org-mode/daily.org diff --git a/modules/emacs/doom/templates/roam/daily.org b/modules/home-manager/programs/emacs/doom/templates/roam/daily.org similarity index 100% rename from modules/emacs/doom/templates/roam/daily.org rename to modules/home-manager/programs/emacs/doom/templates/roam/daily.org diff --git a/shared/home-manager/dotfiles/fish/Catppuccin-Frappe.theme b/modules/home-manager/programs/fish/Catppuccin-Frappe.theme similarity index 100% rename from shared/home-manager/dotfiles/fish/Catppuccin-Frappe.theme rename to modules/home-manager/programs/fish/Catppuccin-Frappe.theme diff --git a/shared/home-manager/dotfiles/fish/default.nix b/modules/home-manager/programs/fish/default.nix similarity index 89% rename from shared/home-manager/dotfiles/fish/default.nix rename to modules/home-manager/programs/fish/default.nix index aef3482..da4f342 100644 --- a/shared/home-manager/dotfiles/fish/default.nix +++ b/modules/home-manager/programs/fish/default.nix @@ -1,11 +1,6 @@ -{ ... }: +{ pkgs, ... }: { - home.file = { - # Cattpuccin theme for fish shell. - ".config/fish/themes/Catppuccin-Frappe.theme".source = ./Catppuccin-Frappe.theme; - }; - programs.fish = { enable = true; @@ -46,7 +41,7 @@ del = "trash_file"; dev = "nix develop -c fish"; doom = "~/.config/emacs/bin/doom"; - repl = "NIXPKGS_ALLOW_UNFREE=1 nix repl --impure --extra-experimental-features 'flakes' nixpkgs#legacyPackages.x86_64-linux"; + repl = "NIXPKGS_ALLOW_UNFREE=1 nix repl --impure --extra-experimental-features 'flakes' nixpkgs.legacyPackages.x86_64-linux"; }; functions = { diff --git a/shared/home-manager/dotfiles/gamemode.ini b/modules/home-manager/programs/gamemode.ini similarity index 100% rename from shared/home-manager/dotfiles/gamemode.ini rename to modules/home-manager/programs/gamemode.ini diff --git a/shared/home-manager/dotfiles/git.nix b/modules/home-manager/programs/git.nix similarity index 95% rename from shared/home-manager/dotfiles/git.nix rename to modules/home-manager/programs/git.nix index f74e79b..c7d6e42 100644 --- a/shared/home-manager/dotfiles/git.nix +++ b/modules/home-manager/programs/git.nix @@ -86,6 +86,10 @@ init = { defaultBranch = "main"; }; + + credential = { + helper = "/usr/libexec/git-core/git-credential-libsecret"; + }; }; }; } diff --git a/modules/hyprland/home-manager.nix b/modules/home-manager/programs/hyprland/default.nix similarity index 92% rename from modules/hyprland/home-manager.nix rename to modules/home-manager/programs/hyprland/default.nix index 5a83cfe..6f82512 100644 --- a/modules/hyprland/home-manager.nix +++ b/modules/home-manager/programs/hyprland/default.nix @@ -21,18 +21,6 @@ in description = "Configuration to be appended to my own."; }; - hypridle.enable = lib.mkEnableOption "hypridle"; - - hyprlock = { - enable = lib.mkEnableOption "hyprlock"; - background = lib.mkOption { - type = lib.types.path; - default = ""; - example = "~/wallpapers/abc.png"; - description = "The image to be used as background for hyprlock."; - }; - }; - scripts = { screenshot.enable = lib.mkEnableOption "screenshot"; startup.enable = lib.mkEnableOption "startup"; @@ -40,18 +28,13 @@ in }; config = { - home.sessionVariables = { - NIXOS_OZONE_WL = "1"; - QT_QPA_PLATFORM = "wayland"; - }; - xdg.configFile."hypr/frappe.conf".source = builtins.fetchurl { url = "https://raw.githubusercontent.com/catppuccin/hyprland/main/themes/frappe.conf"; sha256 = "1clw669i1n3dhawdw4clmjv75fy3smycb5iqk3sanzpr3y0i4vwx"; }; # Enable hypridle and hyprlock - services.hypridle = lib.mkIf cfg.hypridle.enable { + services.hypridle = { enable = true; settings = { general = { @@ -60,24 +43,21 @@ in lock_cmd = "hyprlock"; }; - listener = - [ - { - timeout = 180; - on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; - } - ] - ++ lib.optionals cfg.hyprlock.enable [ - { - timeout = 120; - on-timeout = "hyprlock"; - } - ]; + listener = [ + { + timeout = 120; + on-timeout = "hyprlock"; + } + { + timeout = 180; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; }; }; - programs.hyprlock = lib.mkIf cfg.hyprlock.enable { + programs.hyprlock = { enable = true; extraConfig = # hyprlang '' @@ -96,7 +76,7 @@ in # BACKGROUND background { monitor = - path = ${cfg.hyprlock.background} + path = $HOME/internal/personal/wallpapers/wallhaven-2em8y6.jpg blur_passes = 0 color = $base } diff --git a/modules/hyprland/scripts/screenshot.sh b/modules/home-manager/programs/hyprland/scripts/screenshot.sh similarity index 100% rename from modules/hyprland/scripts/screenshot.sh rename to modules/home-manager/programs/hyprland/scripts/screenshot.sh diff --git a/modules/hyprland/scripts/screenshot_area.sh b/modules/home-manager/programs/hyprland/scripts/screenshot_area.sh similarity index 100% rename from modules/hyprland/scripts/screenshot_area.sh rename to modules/home-manager/programs/hyprland/scripts/screenshot_area.sh diff --git a/modules/hyprland/scripts/start_apps.nix b/modules/home-manager/programs/hyprland/scripts/start_apps.nix similarity index 100% rename from modules/hyprland/scripts/start_apps.nix rename to modules/home-manager/programs/hyprland/scripts/start_apps.nix diff --git a/modules/hyprland/scripts/start_services.nix b/modules/home-manager/programs/hyprland/scripts/start_services.nix similarity index 100% rename from modules/hyprland/scripts/start_services.nix rename to modules/home-manager/programs/hyprland/scripts/start_services.nix diff --git a/shared/home-manager/dotfiles/mako/config b/modules/home-manager/programs/mako/config similarity index 100% rename from shared/home-manager/dotfiles/mako/config rename to modules/home-manager/programs/mako/config diff --git a/shared/home-manager/dotfiles/mangohud.nix b/modules/home-manager/programs/mangohud.nix similarity index 100% rename from shared/home-manager/dotfiles/mangohud.nix rename to modules/home-manager/programs/mangohud.nix diff --git a/.neoconf.json b/modules/home-manager/programs/neovim/.neoconf.json similarity index 100% rename from .neoconf.json rename to modules/home-manager/programs/neovim/.neoconf.json diff --git a/.stylua.toml b/modules/home-manager/programs/neovim/.stylua.toml similarity index 100% rename from .stylua.toml rename to modules/home-manager/programs/neovim/.stylua.toml diff --git a/modules/home-manager/programs/neovim/README.md b/modules/home-manager/programs/neovim/README.md new file mode 100644 index 0000000..7c567f9 --- /dev/null +++ b/modules/home-manager/programs/neovim/README.md @@ -0,0 +1,73 @@ +# My [Home Manager] module for neovim configuration + +This is my personal configuration for _[neovim]_ using [Nix](https://nixos.org/), so this will not work outside of it - though it can be made to be. + +In this case, I am outputting a [Home Manager] module to be used directly in your configuration, it currently barely has +any +options and is opinionated due to it being my personal configuration for daily use... But I plan to slowly add options +to make it usable by other people. + +## Installing + +First you add this repository as a flake input: + +```nix +{ + inputs = { + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + wizardlink.url = "git+https://git.thewizard.link/wizardlink/linuxware"; + }; + + outputs = { home-manager, ... }@inputs: { + homeConfigurations.YOURHOSTNAME = home-manager.lib.homeManagerConfiguration { + # ... + extraSPecialArgs = inputs; + }; + }; +} +``` + +Then in your [Home Manager] configuration you can just import it: + +```nix +{ wizardlink }: + +{ + imports = [ + wizardlink.homeManagerModules.neovim + ]; +} +``` + +## Configuring + +### [nixd](https://github.com/nix-community/nixd/) + +```nix +programs.neovim.flake = { + hostname = "nixos"; # Your hostname used to build your system. + location = "git+file:///home/wizardlink/.system"; # Where you store your flake. +}; +``` + +## My neovim failed because of package X not existing + +My configuration is based off of `nixos-unstable` so sometimes your package may not exist or have a different name, I +apologise for that but I don't plan on maintaining backwards compatibility. :( + +## How it looks + +Here's some screenshots of how it currently looks like: + +![image](./docs/example_1.png) +![image](./docs/example_2.png) +![image](./docs/example_3.png) + +The theme I'm using is [catppuccin](https://github.com/catppuccin) in case you're curious. + +[neovim]: https://neovim.io/ +[Home Manager]: https://github.com/nix-community/home-manager diff --git a/modules/neovim/default.nix b/modules/home-manager/programs/neovim/default.nix similarity index 57% rename from modules/neovim/default.nix rename to modules/home-manager/programs/neovim/default.nix index 1071932..49e17f3 100644 --- a/modules/neovim/default.nix +++ b/modules/home-manager/programs/neovim/default.nix @@ -56,89 +56,81 @@ in }; config = { - home.sessionVariables = { - EDITOR = "nvim"; - MANPAGER = "nvim +Man!"; - }; - programs.neovim = { withNodeJs = true; withPython3 = true; extraLuaConfig = builtins.readFile ./init.lua; - extraPackages = - with pkgs; - [ - # Needed by LuaSnip - luajitPackages.jsregexp + extraPackages = with pkgs; [ + # Needed by ollama.nvim + curl + ollamaPackage - # Treesitter - gcc # For compiling languages + # Needed by LuaSnip + luajitPackages.jsregexp - # CMAKE - neocmakelsp + # Treesitter + gcc # For compiling languages - # C/C++ - clang-tools - vscode-extensions.ms-vscode.cpptools + # CMAKE + neocmakelsp - # C# - #csharp-ls Testing roslyn.nvim - roslyn-ls - rzls - csharpier - netcoredbg + # C/C++ + clang-tools + vscode-extensions.ms-vscode.cpptools - # HTML/CSS/JSON - emmet-ls - vscode-langservers-extracted + # C# + #csharp-ls Testing roslyn.nvim + roslyn-ls + rzls + csharpier + netcoredbg - # LUA - lua-language-server - stylua + # HTML/CSS/JSON + emmet-ls + vscode-langservers-extracted - # Markdown - markdownlint-cli - marksman + # LUA + lua-language-server + stylua - # Nix - deadnix - nixd - nixfmt-rfc-style - statix + # Markdown + markdownlint-cli + marksman - # Python - basedpyright - python312Packages.flake8 - ruff + # Nix + deadnix + nixd + nixfmt-rfc-style + statix - # TypeScript/JavaScript - vtsls - deno - vscode-js-debug + # Python + basedpyright + python312Packages.flake8 + ruff - # Rust - rust-analyzer - cargo # Needed by blink-cmp - taplo - vscode-extensions.vadimcn.vscode-lldb + # TypeScript/JavaScript + vtsls + deno + vscode-js-debug - # Vue - prettierd - vue-language-server + # Rust + rust-analyzer + cargo # Needed by blink-cmp + taplo + vscode-extensions.vadimcn.vscode-lldb - # Svelte - nodePackages.svelte-language-server + # Vue + prettierd + vue-language-server - # YAML - yaml-language-server - ] - ++ pkgs.lib.optionals config.programs.neovim.ollama.enable [ - # Needed by ollama.nvim - curl - ollamaPackage - ]; + # Svelte + nodePackages.svelte-language-server + + # YAML + yaml-language-server + ]; }; xdg.configFile."nvim/lua" = { diff --git a/assets/screenshots/neovim-dashboard.png b/modules/home-manager/programs/neovim/docs/example_1.png similarity index 100% rename from assets/screenshots/neovim-dashboard.png rename to modules/home-manager/programs/neovim/docs/example_1.png diff --git a/assets/screenshots/neovim-nix.png b/modules/home-manager/programs/neovim/docs/example_2.png similarity index 100% rename from assets/screenshots/neovim-nix.png rename to modules/home-manager/programs/neovim/docs/example_2.png diff --git a/assets/screenshots/neovim-rust.png b/modules/home-manager/programs/neovim/docs/example_3.png similarity index 100% rename from assets/screenshots/neovim-rust.png rename to modules/home-manager/programs/neovim/docs/example_3.png diff --git a/modules/neovim/ftplugin/cs.lua b/modules/home-manager/programs/neovim/ftplugin/cs.lua similarity index 100% rename from modules/neovim/ftplugin/cs.lua rename to modules/home-manager/programs/neovim/ftplugin/cs.lua diff --git a/modules/neovim/init.lua b/modules/home-manager/programs/neovim/init.lua similarity index 100% rename from modules/neovim/init.lua rename to modules/home-manager/programs/neovim/init.lua diff --git a/modules/neovim/lsp.lua b/modules/home-manager/programs/neovim/lsp.lua similarity index 100% rename from modules/neovim/lsp.lua rename to modules/home-manager/programs/neovim/lsp.lua diff --git a/modules/neovim/lua/community.lua b/modules/home-manager/programs/neovim/lua/community.lua similarity index 100% rename from modules/neovim/lua/community.lua rename to modules/home-manager/programs/neovim/lua/community.lua diff --git a/modules/neovim/lua/lazy_setup.lua b/modules/home-manager/programs/neovim/lua/lazy_setup.lua similarity index 91% rename from modules/neovim/lua/lazy_setup.lua rename to modules/home-manager/programs/neovim/lua/lazy_setup.lua index 4294456..2abb3b7 100644 --- a/modules/neovim/lua/lazy_setup.lua +++ b/modules/home-manager/programs/neovim/lua/lazy_setup.lua @@ -28,11 +28,4 @@ require("lazy").setup({ }, }, }, - dev = { - path = "/mnt/internal/repos", - patterns = { - "nvim-ufo", - "nix-store.nvim", - }, - }, } --[[@as LazyConfig]]) diff --git a/modules/neovim/lua/plugins/astrocore.lua b/modules/home-manager/programs/neovim/lua/plugins/astrocore.lua similarity index 100% rename from modules/neovim/lua/plugins/astrocore.lua rename to modules/home-manager/programs/neovim/lua/plugins/astrocore.lua diff --git a/modules/neovim/lua/plugins/astroui.lua b/modules/home-manager/programs/neovim/lua/plugins/astroui.lua similarity index 100% rename from modules/neovim/lua/plugins/astroui.lua rename to modules/home-manager/programs/neovim/lua/plugins/astroui.lua diff --git a/modules/neovim/lua/plugins/luasnip.lua b/modules/home-manager/programs/neovim/lua/plugins/luasnip.lua similarity index 100% rename from modules/neovim/lua/plugins/luasnip.lua rename to modules/home-manager/programs/neovim/lua/plugins/luasnip.lua diff --git a/modules/neovim/lua/plugins/mason.lua b/modules/home-manager/programs/neovim/lua/plugins/mason.lua similarity index 100% rename from modules/neovim/lua/plugins/mason.lua rename to modules/home-manager/programs/neovim/lua/plugins/mason.lua diff --git a/modules/neovim/lua/plugins/nix-store.lua b/modules/home-manager/programs/neovim/lua/plugins/nix-store.lua similarity index 100% rename from modules/neovim/lua/plugins/nix-store.lua rename to modules/home-manager/programs/neovim/lua/plugins/nix-store.lua diff --git a/modules/neovim/lua/plugins/none-ls.lua b/modules/home-manager/programs/neovim/lua/plugins/none-ls.lua similarity index 100% rename from modules/neovim/lua/plugins/none-ls.lua rename to modules/home-manager/programs/neovim/lua/plugins/none-ls.lua diff --git a/modules/neovim/lua/plugins/nvim-dap.lua b/modules/home-manager/programs/neovim/lua/plugins/nvim-dap.lua similarity index 100% rename from modules/neovim/lua/plugins/nvim-dap.lua rename to modules/home-manager/programs/neovim/lua/plugins/nvim-dap.lua diff --git a/modules/neovim/lua/plugins/nvim-lint.lua b/modules/home-manager/programs/neovim/lua/plugins/nvim-lint.lua similarity index 100% rename from modules/neovim/lua/plugins/nvim-lint.lua rename to modules/home-manager/programs/neovim/lua/plugins/nvim-lint.lua diff --git a/modules/neovim/lua/plugins/nvim-ufo.lua b/modules/home-manager/programs/neovim/lua/plugins/nvim-ufo.lua similarity index 100% rename from modules/neovim/lua/plugins/nvim-ufo.lua rename to modules/home-manager/programs/neovim/lua/plugins/nvim-ufo.lua diff --git a/modules/neovim/lua/plugins/roslyn-nvim.lua b/modules/home-manager/programs/neovim/lua/plugins/roslyn-nvim.lua similarity index 100% rename from modules/neovim/lua/plugins/roslyn-nvim.lua rename to modules/home-manager/programs/neovim/lua/plugins/roslyn-nvim.lua diff --git a/modules/neovim/lua/plugins/treesitter.lua b/modules/home-manager/programs/neovim/lua/plugins/treesitter.lua similarity index 100% rename from modules/neovim/lua/plugins/treesitter.lua rename to modules/home-manager/programs/neovim/lua/plugins/treesitter.lua diff --git a/modules/neovim/lua/plugins/user.lua b/modules/home-manager/programs/neovim/lua/plugins/user.lua similarity index 100% rename from modules/neovim/lua/plugins/user.lua rename to modules/home-manager/programs/neovim/lua/plugins/user.lua diff --git a/modules/neovim/lua/polish.lua b/modules/home-manager/programs/neovim/lua/polish.lua similarity index 100% rename from modules/neovim/lua/polish.lua rename to modules/home-manager/programs/neovim/lua/polish.lua diff --git a/modules/neovim/lua/util.lua b/modules/home-manager/programs/neovim/lua/util.lua similarity index 100% rename from modules/neovim/lua/util.lua rename to modules/home-manager/programs/neovim/lua/util.lua diff --git a/modules/neovim/queries/c_sharp/folds.scm b/modules/home-manager/programs/neovim/queries/c_sharp/folds.scm similarity index 100% rename from modules/neovim/queries/c_sharp/folds.scm rename to modules/home-manager/programs/neovim/queries/c_sharp/folds.scm diff --git a/shared/home-manager/dotfiles/obs-studio.nix b/modules/home-manager/programs/obs-studio.nix similarity index 100% rename from shared/home-manager/dotfiles/obs-studio.nix rename to modules/home-manager/programs/obs-studio.nix diff --git a/shared/home-manager/dotfiles/rofi/catppuccin-frappe.rasi b/modules/home-manager/programs/rofi/catppuccin-frappe.rasi similarity index 100% rename from shared/home-manager/dotfiles/rofi/catppuccin-frappe.rasi rename to modules/home-manager/programs/rofi/catppuccin-frappe.rasi diff --git a/shared/home-manager/dotfiles/rofi/default.nix b/modules/home-manager/programs/rofi/default.nix similarity index 100% rename from shared/home-manager/dotfiles/rofi/default.nix rename to modules/home-manager/programs/rofi/default.nix diff --git a/shared/home-manager/dotfiles/spotify/default.nix b/modules/home-manager/programs/spotify/default.nix similarity index 100% rename from shared/home-manager/dotfiles/spotify/default.nix rename to modules/home-manager/programs/spotify/default.nix diff --git a/shared/home-manager/dotfiles/tmux/default.nix b/modules/home-manager/programs/tmux/default.nix similarity index 100% rename from shared/home-manager/dotfiles/tmux/default.nix rename to modules/home-manager/programs/tmux/default.nix diff --git a/shared/home-manager/dotfiles/waybar.nix b/modules/home-manager/programs/waybar.nix similarity index 100% rename from shared/home-manager/dotfiles/waybar.nix rename to modules/home-manager/programs/waybar.nix diff --git a/shared/home-manager/scripts/create_feedback_sink.sh b/modules/home-manager/scripts/create_feedback_sink.sh similarity index 100% rename from shared/home-manager/scripts/create_feedback_sink.sh rename to modules/home-manager/scripts/create_feedback_sink.sh diff --git a/shared/home-manager/scripts/delete_feedback_sink.sh b/modules/home-manager/scripts/delete_feedback_sink.sh similarity index 100% rename from shared/home-manager/scripts/delete_feedback_sink.sh rename to modules/home-manager/scripts/delete_feedback_sink.sh diff --git a/shared/home-manager/scripts/games/launch.sh b/modules/home-manager/scripts/games/launch.sh similarity index 100% rename from shared/home-manager/scripts/games/launch.sh rename to modules/home-manager/scripts/games/launch.sh diff --git a/shared/home-manager/theming.nix b/modules/home-manager/theming.nix similarity index 83% rename from shared/home-manager/theming.nix rename to modules/home-manager/theming.nix index 0ae790d..470a0bd 100644 --- a/shared/home-manager/theming.nix +++ b/modules/home-manager/theming.nix @@ -12,6 +12,9 @@ ]; home.file = { + # Cattpuccin theme for fish shell. + ".config/fish/themes/Catppuccin-Frappe.theme".source = ./theming/Catppuccin-Frappe.theme; + ## Kvantum's theme configuration. ".config/Kvantum/catppuccin-frappe-lavender" = { source = "${ @@ -28,10 +31,10 @@ ''; ## - ## Theming configuration for qt5 and qt6 - ".config/qt5ct/colors".source = ./dotfiles/qt5ct; + ## Themeing configuration for qt5 and qt6 + ".config/qt5ct/colors".source = ./theming/qt5ct; - ".config/qt6ct/colors".source = ./dotfiles/qt5ct; # We use the qt5ct because it's the SAME spec + ".config/qt6ct/colors".source = ./theming/qt5ct; # We use the qt5ct because it's the SAME spec ## ".local/share/SpeedCrunch/color-schemes/catppuccin-frappe.json" = { diff --git a/assets/README.md b/modules/home-manager/theming/Catppuccin-Frappe.theme similarity index 100% rename from assets/README.md rename to modules/home-manager/theming/Catppuccin-Frappe.theme diff --git a/shared/home-manager/dotfiles/qt5ct/Catppuccin-Frappe.conf b/modules/home-manager/theming/qt5ct/Catppuccin-Frappe.conf similarity index 100% rename from shared/home-manager/dotfiles/qt5ct/Catppuccin-Frappe.conf rename to modules/home-manager/theming/qt5ct/Catppuccin-Frappe.conf diff --git a/shared/home-manager/dotfiles/qt5ct/Catppuccin-Latte.conf b/modules/home-manager/theming/qt5ct/Catppuccin-Latte.conf similarity index 100% rename from shared/home-manager/dotfiles/qt5ct/Catppuccin-Latte.conf rename to modules/home-manager/theming/qt5ct/Catppuccin-Latte.conf diff --git a/shared/home-manager/dotfiles/qt5ct/Catppuccin-Macchiato.conf b/modules/home-manager/theming/qt5ct/Catppuccin-Macchiato.conf similarity index 100% rename from shared/home-manager/dotfiles/qt5ct/Catppuccin-Macchiato.conf rename to modules/home-manager/theming/qt5ct/Catppuccin-Macchiato.conf diff --git a/shared/home-manager/dotfiles/qt5ct/Catppuccin-Mocha.conf b/modules/home-manager/theming/qt5ct/Catppuccin-Mocha.conf similarity index 100% rename from shared/home-manager/dotfiles/qt5ct/Catppuccin-Mocha.conf rename to modules/home-manager/theming/qt5ct/Catppuccin-Mocha.conf diff --git a/modules/hyprland/README.md b/modules/hyprland/README.md deleted file mode 100644 index 6d2ca48..0000000 --- a/modules/hyprland/README.md +++ /dev/null @@ -1,60 +0,0 @@ -The [NixOS] module installs [Hyprland] onto the system. - -Whilst the [Home Manager] module generates the dotfiles for [Hyprland] and optionally [hyprlock] and [hypridle]. - -It can be configured through `modules.hyprland`. - -## Module options - -### extraConfig - -`modules.hyprland.extraConfig` when set will be appended to the top of the configuration I generate, you can see where -that is [here](./home-manager.nix#L189). - -There are no monitors configured by default, so you should use this option to do so. - -### hypridle.enable - -Whether to configure and enable the [hypridle] package. Be mindful that it may not auto-start, I have yet to find why but -even though it configures to start after `graphical-session.target`, that isn't reached in Hyprland sometimes. - -### hyprlock.enable - -Whether to configure and enable the [hyprlock] package, by itself it does nothing but when [hypridle] is also enabled it -will automatically call [hyprlock] after a 120 second timeout. - -### hyprlock.background - -A path to an image that will be used as background when [hyprlock] is invoked. - -### scripts.screenshot.enable - -When enabled it will create two script files in `$XDG_DATA_HOME/scripts/hyprland` and two keybinds for you to run these -scripts, allowing you to take screenshots of a region and the entire screen of your first monitor. - -### scripts.startup.enable - -Not my proudest option, this will add two packages containing a startup script for apps that I use in the daily & -services. If this module ever gets actually used by someone, then I'll refine it. - -## Visuals - -### Active window - -![image](/assets/screenshots/hyprland-active.png) - -### Inactive window - -![image](/assets/screenshots/hyprland-inactive.png) - -### Gaps - -![image](/assets/screenshots/hyprland-gaps.png) - - - -[hyprland]: https://hyprland.org/ -[hyprlock]: https://github.com/hyprwm/hyprlock -[hypridle]: https://github.com/hyprwm/hypridle -[home manager]: https://github.com/nix-community/home-manager -[nixos]: https://nixos.org diff --git a/modules/hyprland/nixos.nix b/modules/hyprland/nixos.nix deleted file mode 100644 index 13be110..0000000 --- a/modules/hyprland/nixos.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ pkgs, hyprland, ... }: - -let - hyprland-pkgs = hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}; -in -{ - # Enable Hyprland's cachix - nix.settings.substituters = [ "https://hyprland.cachix.org" ]; - nix.settings.trusted-public-keys = [ - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - ]; - - # Enable Hyprland - programs.hyprland = { - enable = true; - - package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; - portalPackage = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; - }; - - # Overwrite the Mesa packages with Hyprland's for consitency - hardware.graphics = { - package = hyprland-pkgs.mesa.drivers; - package32 = hyprland-pkgs.pkgsi686Linux.mesa.drivers; - }; -} diff --git a/modules/neovim/README.md b/modules/neovim/README.md deleted file mode 100644 index 90c2cb3..0000000 --- a/modules/neovim/README.md +++ /dev/null @@ -1,43 +0,0 @@ -This module generates dotfiles for [neovim]. - -The module extends `programs.neovim`. - -## Module options - -### programs.neovim.nixd.hostname - -By default [nixd] is enabled, you **need** to pass the current machine's -hostname that is used to generate your system. - -### programs.neovim.nixd.location - -The location of your system's flake, [nixd] will execute an expression defined in the LSP's configuration that reads -the flake's contents to evaluate [NixOS] and [Home Manager] options. - -### programs.neovim.ollama.enable - -Whether to add an [ollama] package to be used with [ollama.nvim](https://github.com/nomnivore/ollama.nvim). - -### programs.neovim.ollama.type - -The type of [ollama] package to be added, valid options are: `amd`, `nvidia` or `cpu`. - -## My neovim failed because of package X not existing - -My configuration is based off of `nixos-unstable` so sometimes your package may not exist or have a different name, I -apologise for that but I don't plan on maintaining backwards compatibility. :( - -## How it looks - -Here's some screenshots of how it currently looks like: - -![image](/assets/screenshots/neovim-dashboard.png) -![image](/assets/screenshots/neovim-nix.png) -![image](/assets/screenshots/neovim-rust.png) - -The theme I'm using is [catppuccin](https://github.com/catppuccin) in case you're curious. - -[neovim]: https://neovim.io/ -[Home Manager]: https://github.com/nix-community/home-manager -[nixd]: https://github.com/nix-community/nixd/ -[ollama]: https://ollama.com/ diff --git a/shared/nixos/common.nix b/modules/nixos/common.nix similarity index 50% rename from shared/nixos/common.nix rename to modules/nixos/common.nix index f03844d..59d65d9 100644 --- a/shared/nixos/common.nix +++ b/modules/nixos/common.nix @@ -1,4 +1,4 @@ -{ pkgs, nixpkgs, ... }: +{ ... }: { # Enable experimental features @@ -7,18 +7,6 @@ "flakes" ]; - # Optimize storage - nix.optimise.automatic = true; - nix.settings.auto-optimise-store = true; - - # Pin the nix registry - nix.registry = { - nixpkgs.flake = nixpkgs; - }; - - # Allow unfree packages - nixpkgs.config.allowUnfree = true; - # Enable nh, a bundle of CLI utilities for NixOS programs.nh = { enable = true; @@ -31,40 +19,16 @@ flake = "/home/wizardlink/.system"; }; - # Enable flatpak to all users. - services.flatpak.enable = true; + # Optimize storage + nix.optimise.automatic = true; + nix.settings.auto-optimise-store = true; - environment.systemPackages = with pkgs; [ - ## Tools - # Utilities - bat - duf - fuseiso - lm_sensors - p7zip - tree - unrar - unzip - wget - zip - - # File managing - sshfs - yazi - - # Networking - gping - nmap - - # Processes - (btop.override { - # AMD GPU support - rocmSupport = true; - }) - killall - - # Filter - fzf - ripgrep + # Enable Hyprland's cachix + nix.settings.substituters = [ "https://hyprland.cachix.org" ]; + nix.settings.trusted-public-keys = [ + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ]; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; } diff --git a/shared/nixos/default.nix b/modules/nixos/default.nix similarity index 59% rename from shared/nixos/default.nix rename to modules/nixos/default.nix index 7662091..796ca94 100644 --- a/shared/nixos/default.nix +++ b/modules/nixos/default.nix @@ -4,9 +4,11 @@ imports = [ ./common.nix ./desktop.nix - ./gaming.nix ./hardware.nix + ./packages.nix + ./services.nix + ./sound.nix ./system.nix - ./virtualization.nix + ./theming.nix ]; } diff --git a/shared/nixos/desktop.nix b/modules/nixos/desktop.nix similarity index 65% rename from shared/nixos/desktop.nix rename to modules/nixos/desktop.nix index 1a64096..cf582a8 100644 --- a/shared/nixos/desktop.nix +++ b/modules/nixos/desktop.nix @@ -1,9 +1,18 @@ { pkgs, + hyprland, ... }: +let + hyprland-pkgs = hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}; +in { + environment.sessionVariables = { + # Set env for Fcitx5 + QMODIFIERS = "@im=fcitx5"; + }; + # Enable SDDM. services.displayManager.sddm = { enable = true; @@ -12,6 +21,14 @@ package = pkgs.kdePackages.sddm; }; + # Enable Hyprland + programs.hyprland = { + enable = true; + + package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + portalPackage = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; + }; + # Enable XDG Desktop Portals. xdg.portal = { enable = true; @@ -34,20 +51,14 @@ enable = true; enable32Bit = true; + package = hyprland-pkgs.mesa.drivers; + package32 = hyprland-pkgs.pkgsi686Linux.mesa.drivers; + extraPackages = with pkgs; [ rocmPackages.clr.icd # OpenGL hwa ]; }; - # Set the default fonts for the system. - fonts.fontconfig = { - defaultFonts = { - serif = [ "IBM Plex Serif" ]; - sansSerif = [ "IBM Plex Sans" ]; - monospace = [ "IBM Plex Mono" ]; - }; - }; - # Enable Thunar and it's dependencies programs.thunar = { enable = true; @@ -57,12 +68,6 @@ services.gvfs.enable = true; # For mounting drives, trash, etc. services.tumbler.enable = true; # Thumbnail support - # Enable KDEConnect - programs.kdeconnect = { - enable = true; - package = pkgs.kdePackages.kdeconnect-kde; - }; - # Enable the Fcitx5 IME i18n.inputMethod = { enable = true; @@ -82,28 +87,4 @@ waylandFrontend = true; }; }; - - environment.sessionVariables = { - # Set env for Fcitx5 - QMODIFIERS = "@im=fcitx5"; - }; - - environment.systemPackages = with pkgs; [ - wl-clipboard - xclip - zoxide - (catppuccin-sddm.override # So SDDM finds the theme files. - { - flavor = "frappe"; - font = "IBM Plex Sans"; - fontSize = "11"; - background = "${../../assets/sddm/Background.jpg}"; - loginBackground = true; - } - ) - - ## Libraries - libsForQt5.qt5.qtgraphicaleffects - libsForQt5.qt5.qtquickcontrols2 - ]; } diff --git a/shared/nixos/hardware.nix b/modules/nixos/hardware.nix similarity index 75% rename from shared/nixos/hardware.nix rename to modules/nixos/hardware.nix index 184f32f..9df7970 100644 --- a/shared/nixos/hardware.nix +++ b/modules/nixos/hardware.nix @@ -1,11 +1,6 @@ { ... }: { - # Add AMD drivers - boot.initrd.kernelModules = [ - "amdgpu" - ]; - # Enable Bluetooth hardware.bluetooth = { enable = true; diff --git a/modules/nixos/packages.nix b/modules/nixos/packages.nix new file mode 100644 index 0000000..ef52519 --- /dev/null +++ b/modules/nixos/packages.nix @@ -0,0 +1,111 @@ +{ pkgs, ... }: + +{ + # Enable GPG. + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + # Enable fish system-wide to integrate with nixpkgs. + programs.fish.enable = true; + + # Enable Steam. + programs.steam = { + enable = true; + + remotePlay.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + # ^ Enables so we can transfer games to other computers in the network. + + # Add Proton-GE to 'compatibilitytools.d'. + extraCompatPackages = with pkgs; [ proton-ge-bin ]; + }; + + # Enable and configure gamemode. + programs.gamemode = { + enable = true; + enableRenice = true; + settings = { + gpu = { + apply_gpu_optimisations = "accept-responsibility"; + gpu_device = 1; + amd_performance_level = "auto"; + }; + }; + }; + + # Enable KDEConnect + programs.kdeconnect = { + enable = true; + package = pkgs.kdePackages.kdeconnect-kde; + }; + + # Enable Docker. + virtualisation.docker.enable = true; + + # Enable virt-manager + programs.virt-manager.enable = true; + + # Enable virtd and spice USB redirection + virtualisation.spiceUSBRedirection.enable = true; + virtualisation.libvirtd.enable = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + ## Tools + # Utilities + bat + duf + fuseiso + lm_sensors + p7zip + tree + unrar + unzip + wget + zip + + # File managing + sshfs + yazi + + # Virtualization + docker-compose + quickemu + + # Desktop + wl-clipboard + xclip + zoxide + (catppuccin-sddm.override # So SDDM finds the theme files. + { + flavor = "frappe"; + font = "IBM Plex Sans"; + fontSize = "11"; + background = "${./theming/sddm/Background.jpg}"; + loginBackground = true; + } + ) + + # Networking + gping + nmap + + # Processes + (btop.override { + # AMD GPU support + rocmSupport = true; + }) + killall + + # Filter + fzf + ripgrep + + ## Libraries + libsForQt5.qt5.qtgraphicaleffects + libsForQt5.qt5.qtquickcontrols2 + ]; +} diff --git a/modules/nixos/services.nix b/modules/nixos/services.nix new file mode 100644 index 0000000..4b857a8 --- /dev/null +++ b/modules/nixos/services.nix @@ -0,0 +1,41 @@ +{ + pkgs, + lib, + config, + ... +}: + +{ + # Enable polkit, + security.polkit.enable = true; + + # install an agent to interface with it, + environment.systemPackages = with pkgs; [ polkit_gnome ]; + + # And enable GNOME keyring for registering keys. + services.gnome.gnome-keyring.enable = true; + + # Enable flatpak to all users. + services.flatpak.enable = true; + + services.postgresql = { + identMap = lib.mkIf config.services.postgresql.enable '' + # MAP_NAME SYSTEM_USER DB_USER + superuser_map root postgres + superuser_map postgres postgres + superuser_map /^(.*)$ \1 + ''; + + authentication = lib.mkIf config.services.postgresql.enable ( + lib.mkOverride 10 '' + # TYPE DATABASE USER ADDRESS METHOD MAP + local all all peer map=superuser_map + host all all 127.0.0.1/32 md5 + host all all ::1/128 md5 + local replication all peer map=superuser_map + host replication all 127.0.0.1/32 ident map=superuser_map + host replication all ::1/128 ident map=superuser_map + '' + ); + }; +} diff --git a/modules/nixos/sound.nix b/modules/nixos/sound.nix new file mode 100644 index 0000000..3616d7d --- /dev/null +++ b/modules/nixos/sound.nix @@ -0,0 +1,15 @@ +{ ... }: + +{ + # Enable sound with pipewire. + services.pulseaudio.enable = false; + services.pipewire = { + enable = true; + audio.enable = true; + + alsa.enable = true; + alsa.support32Bit = true; + + pulse.enable = true; + }; +} diff --git a/shared/nixos/system.nix b/modules/nixos/system.nix similarity index 55% rename from shared/nixos/system.nix rename to modules/nixos/system.nix index 6102d20..d70060d 100644 --- a/shared/nixos/system.nix +++ b/modules/nixos/system.nix @@ -4,17 +4,16 @@ # Kernel boot.kernelPackages = pkgs.linuxPackages_zen; + # Add AMD drivers. boot.initrd.kernelModules = [ + "amdgpu" "v4l2loopback" - "zenergy" ]; boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback - config.boot.kernelPackages.zenergy # Allows fetching power draw information on AMD CPUs ]; - # Configure v4l2loopback boot.extraModprobeConfig = '' options v4l2loopback devices=1 video_nr=1 card_label="Virtual camera" exclusive_caps=1 ''; @@ -35,21 +34,6 @@ # Enable networking networking.networkmanager.enable = true; - # Enable sound with pipewire. - services.pulseaudio.enable = false; - services.pipewire = { - enable = true; - audio.enable = true; - - alsa.enable = true; - alsa.support32Bit = true; - - pulse.enable = true; - }; - - # Enable fish system-wide to integrate with nixpkgs. - programs.fish.enable = true; - # Set fish as the default shell for all users. users.defaultUserShell = pkgs.fish; @@ -66,19 +50,4 @@ StreamLocalBindUnlink = "yes"; }; }; - - # Enable GPG. - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - - # Enable polkit, - security.polkit.enable = true; - - # install an agent to interface with it, - environment.systemPackages = with pkgs; [ polkit_gnome ]; - - # And enable GNOME keyring for registering keys. - services.gnome.gnome-keyring.enable = true; } diff --git a/modules/nixos/theming.nix b/modules/nixos/theming.nix new file mode 100644 index 0000000..96f2b24 --- /dev/null +++ b/modules/nixos/theming.nix @@ -0,0 +1,12 @@ +{ ... }: + +{ + # Set the default fonts for the system. + fonts.fontconfig = { + defaultFonts = { + serif = [ "IBM Plex Serif" ]; + sansSerif = [ "IBM Plex Sans" ]; + monospace = [ "IBM Plex Mono" ]; + }; + }; +} diff --git a/assets/sddm/Background.jpg b/modules/nixos/theming/sddm/Background.jpg similarity index 100% rename from assets/sddm/Background.jpg rename to modules/nixos/theming/sddm/Background.jpg diff --git a/modules/template/README.md b/modules/template/README.md deleted file mode 100644 index dece098..0000000 --- a/modules/template/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# READ THIS BEFORE PROCEEDING - -Below is a checklist of changes you need to do before rebuilding your system. - -## Generate your system configuration and replace the placeholders. - -You can achieve this by running `sudo nixos-generate-config`, then overwrite `hardware-configuration.nix` and -`configuration.nix` with the contents of the files found in `/etc/nixos`. - -## Replace placeholder text - -In `flake.nix` you will find `your-hostname-here`, replace with your machine's current hostname. - -In `home-manager.nix` you have to replace: -- `your-username-here` with your user's username; -- `your-home-directory-here` with the path of your home directory, usually the same as your username; -- `your-hostname-here` with your machine's current hostname; -- `your-flake-location-here` with where you are storing the flake. diff --git a/modules/template/configuration.nix b/modules/template/configuration.nix deleted file mode 100644 index c915eb0..0000000 --- a/modules/template/configuration.nix +++ /dev/null @@ -1 +0,0 @@ -{ ... }: { } diff --git a/modules/template/flake.nix b/modules/template/flake.nix deleted file mode 100644 index 447a388..0000000 --- a/modules/template/flake.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ - description = "NixOS System Flake"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - # Ideally using nixos-unstable since my configuration - # is based off of this channel. - - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - linuxware = { - url = "github:wizardlink/linuxware"; - inputs.nixpkgs.follows = "nixpkgs"; # Pin to your local `nixpkgs` if you use the unstable channel. - }; - }; - - outputs = - { - home-manager, - nixpkgs, - linuxware, - ... - }@inputs: - let - system = "x86_64-linux"; - in - { - your-hostname-here = - let - specialArgs = inputs; - modules = [ - ./configuration.nix - home-manager.nixosModules.home-manager - { - home-manager.extraSpecialArgs = inputs; - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.wizardlink = import ./home-manager.nix; - } - linuxware.nixosModules.hyprland - ]; - in - nixpkgs.lib.nixosSystem { inherit system specialArgs modules; }; - }; -} diff --git a/modules/template/hardware-configuration.nix b/modules/template/hardware-configuration.nix deleted file mode 100644 index c915eb0..0000000 --- a/modules/template/hardware-configuration.nix +++ /dev/null @@ -1 +0,0 @@ -{ ... }: { } diff --git a/modules/template/home-manager.nix b/modules/template/home-manager.nix deleted file mode 100644 index 33d8b7c..0000000 --- a/modules/template/home-manager.nix +++ /dev/null @@ -1,98 +0,0 @@ -{ - config, - pkgs, - linuxware, - ... -}: - -{ - imports = [ - linuxware.homeManagerModules.emacs - linuxware.homeManagerModules.hyprland - linuxware.homeManagerModules.neovim - ]; - - # Home Manager needs a bit of information about you and the paths it should - # manage. - home.username = "your-username-here"; - home.homeDirectory = "/home/your-home-directory-here"; - - # This value determines the Home Manager release that your configuration is - # compatible with. This helps avoid breakage when a new Home Manager release - # introduces backwards incompatible changes. - # - # You should not change this value, even if you update Home Manager. If you do - # want to update the value, then make sure to first check the Home Manager - # release notes. - home.stateVersion = "24.11"; # Please read the comment before changing. - - # The home.packages option allows you to install Nix packages into your - # environment. - home.packages = [ - # # Adds the 'hello' command to your environment. It prints a friendly - # # "Hello, world!" when run. - # pkgs.hello - - # # It is sometimes useful to fine-tune packages, for example, by applying - # # overrides. You can do that directly here, just don't forget the - # # parentheses. Maybe you want to install Nerd Fonts with a limited number of - # # fonts? - # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) - - # # You can also create simple shell scripts directly inside your - # # configuration. For example, this adds a command 'my-hello' to your - # # environment: - # (pkgs.writeShellScriptBin "my-hello" '' - # echo "Hello, ${config.home.username}!" - # '') - ]; - - # Home Manager is pretty good at managing dotfiles. The primary way to manage - # plain files is through 'home.file'. - home.file = { - # # Building this configuration will create a copy of 'dotfiles/screenrc' in - # # the Nix store. Activating the configuration will then make '~/.screenrc' a - # # symlink to the Nix store copy. - # ".screenrc".source = dotfiles/screenrc; - - # # You can also set the file content immediately. - # ".gradle/gradle.properties".text = '' - # org.gradle.console=verbose - # org.gradle.daemon.idletimeout=3600000 - # ''; - }; - - # Home Manager can also manage your environment variables through - # 'home.sessionVariables'. These will be explicitly sourced when using a - # shell provided by Home Manager. If you don't want to manage your shell - # through Home Manager then you have to manually source 'hm-session-vars.sh' - # located at either - # - # ~/.nix-profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # /etc/profiles/per-user/wizardlink/etc/profile.d/hm-session-vars.sh - # - home.sessionVariables = { - # EDITOR = "emacs"; - }; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; - - programs.neovim = { - # Enable Neovim, pre-configured by `linuxware`. - enable = true; - - # Configure nixd - nixd = { - hostname = "your-hostname-here"; - location = "your-flake-location-here"; - }; - }; -} diff --git a/packages/README.md b/packages/README.md deleted file mode 100644 index 1bfcb3e..0000000 --- a/packages/README.md +++ /dev/null @@ -1,17 +0,0 @@ -## [zenergy](https://github.com/BoukeHaarsma23/zenergy/) - -This is a kernel driver that adds the ability for user to fetch power draw data from AMD CPUs. I maintain it in -[nixpkgs], so you shouldn't use this package _unless_ it is broken in your current -version of [nixpkgs]. - -## wb32dfu-udev-rules - -This package installs the udev rules necessary to allow flashing QMK/Vial onto keyboards that use WB32-DFU bootloaders. - -It is also meant to be used in tandem with [NixOS] using the -[`services.udev.packages`](https://search.nixos.org/options?query=services.udev.packages) configuration. - - - -[nixpkgs]: https://github.com/NixOS/nixpkgs/ -[nixos]: https://nixos.org diff --git a/shared/README.md b/shared/README.md deleted file mode 100644 index 548a28c..0000000 --- a/shared/README.md +++ /dev/null @@ -1,51 +0,0 @@ -In this directory you will find the configuration for [NixOS] and [Home Manager] that I share across multiple machines. - -## File structure - -### ./nixos - -- `default.nix` - - _Entry point._ -- `common.nix` - - _General configuration and packages._ -- `desktop.nix` - - _Desktop specific configuration._ -- `gaming.nix` - - _Gaming related configuration._ -- `hardware.nix` - - _Hardware specific configuration._ -- `system.nix` - - _Configuration pertaining the system._ -- `virtualization.nix` - - _Virtualization packages and configuration._ - -### ./home-manager - -- `default.nix` - - _Entry point._ -- `common.nix` - - _General and misc. packages alongside uncategorized dotfiles._ -- `gaming.nix` - - _Packages and dotfiles pertaining games/gaming._ -- `theming.nix` - - _Theming of the system and it's packages._ -- `dotfiles/` - - _Program specific user configuration._ -- `scripts/` - - _Contains scripts that I may use day to day._ - -#### Screenshots - -Waybar: - -![image](/assets/screenshots/waybar.png) - -Rofi: - -![image](/assets/screenshots/rofi.png) - - - - -[nixos]: https://nixos.org -[home manager]: https://github.com/nix-community/home-manager diff --git a/shared/home-manager/gaming.nix b/shared/home-manager/gaming.nix deleted file mode 100644 index a73195e..0000000 --- a/shared/home-manager/gaming.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ pkgs, ... }: - -{ - - home.file = { - # Configuration for gamemode, for running games with optimizations. - ".config/gamemode.ini".source = ./dotfiles/gamemode.ini; - - # Configure DXVK - ".config/dxvk.conf".text = '' - dxvk.enableGraphicsPipelineLibrary = Auto - ''; - }; - - home.packages = with pkgs; [ - gamescope - heroic - protontricks - wineWowPackages.unstableFull - winetricks - - # Games - openttd - prismlauncher - shattered-pixel-dungeon - xonotic - ]; -} diff --git a/shared/nixos/gaming.nix b/shared/nixos/gaming.nix deleted file mode 100644 index 5ccdf3e..0000000 --- a/shared/nixos/gaming.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ pkgs, ... }: - -{ - # Enable Steam. - programs.steam = { - enable = true; - - remotePlay.openFirewall = true; - localNetworkGameTransfers.openFirewall = true; - # ^ Enables so we can transfer games to other computers in the network. - - # Add Proton-GE to 'compatibilitytools.d'. - extraCompatPackages = with pkgs; [ proton-ge-bin ]; - }; - - # Enable and configure gamemode. - programs.gamemode = { - enable = true; - enableRenice = true; - settings = { - gpu = { - apply_gpu_optimisations = "accept-responsibility"; - gpu_device = 1; - amd_performance_level = "auto"; - }; - }; - }; -} diff --git a/shared/nixos/virtualization.nix b/shared/nixos/virtualization.nix deleted file mode 100644 index 6cec7a6..0000000 --- a/shared/nixos/virtualization.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ pkgs, ... }: - -{ - # Enable Docker. - virtualisation.docker.enable = true; - - # Enable virt-manager - programs.virt-manager.enable = true; - - # Enable virtd and spice USB redirection - virtualisation.spiceUSBRedirection.enable = true; - virtualisation.libvirtd.enable = true; - - environment.systemPackages = with pkgs; [ - docker-compose - quickemu - ]; -} diff --git a/hosts/wizdesk/hardware-configuration.nix b/specific/desktop/hardware-configuration.nix similarity index 100% rename from hosts/wizdesk/hardware-configuration.nix rename to specific/desktop/hardware-configuration.nix diff --git a/specific/desktop/hardware.nix b/specific/desktop/hardware.nix new file mode 100644 index 0000000..006ce2c --- /dev/null +++ b/specific/desktop/hardware.nix @@ -0,0 +1,31 @@ +{ pkgs, config, ... }: + +{ + # Enable Zenergy + boot.initrd.kernelModules = [ + "zenergy" + ]; + boot.extraModulePackages = [ + config.boot.kernelPackages.zenergy + ]; + + # Enable openrazer for managing Razer products' configuration + hardware.openrazer = { + enable = true; + users = [ "wizardlink" ]; + }; + + services.udev = { + # Vial udev rule for Monsgeek M1 + extraRules = '' + # Monsgeek M1 + KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="fffe", ATTRS{idProduct}=="0005", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" + ''; + + # WB32 DFU rules - needed for flashing + packages = [ (pkgs.callPackage ./services/udev/wb32dfu.nix { }) ]; + }; + + # enable a better driver for wireless xbox controllers. + hardware.xpadneo.enable = true; +} diff --git a/hosts/wizdesk/home-manager.nix b/specific/desktop/home-manager.nix similarity index 91% rename from hosts/wizdesk/home-manager.nix rename to specific/desktop/home-manager.nix index b6a0de7..0b20301 100644 --- a/hosts/wizdesk/home-manager.nix +++ b/specific/desktop/home-manager.nix @@ -7,11 +7,10 @@ # Import configurations for better modularity. imports = [ - ../../modules/emacs - ../../modules/hyprland/home-manager.nix - ../../modules/neovim - ../../shared/home-manager - ./services/home-manager + ../../modules/home-manager + ./services/openttd.nix + ./services/terraria.nix + ./services/hydractify-bot.nix ]; # Home Manager needs a bit of information about you and the paths it should @@ -28,6 +27,11 @@ # release notes. home.stateVersion = "23.05"; # Please read the comment before changing. + home.sessionVariables = { + EDITOR = "nvim"; + MANPAGER = "nvim +Man!"; + }; + home.file = { # Create wallpaper script to be read by the start_services.sh script. ".local/share/scripts/wallpaper.sh" = { @@ -67,7 +71,6 @@ prefix = [ "/mnt/internal/hydractify/GitHub" "/mnt/internal/personal/projects" - "/mnt/internal/personal/study" "/mnt/internal/repos" "/mnt/internal/shared/projects" "/mnt/internal/shared/work" @@ -132,13 +135,6 @@ screenshot.enable = true; }; - # Enable hypridle and hyprlock - hypridle.enable = true; - hyprlock = { - enable = true; - background = "/mnt/internal/personal/wallpapers/wallhaven-2em8y6.jpg"; - }; - # Add monitor configuration to hyprland extraConfig = # hyprlang '' diff --git a/hosts/wizdesk/nixos.nix b/specific/desktop/nixos.nix similarity index 79% rename from hosts/wizdesk/nixos.nix rename to specific/desktop/nixos.nix index 08ec555..de5dbe0 100644 --- a/hosts/wizdesk/nixos.nix +++ b/specific/desktop/nixos.nix @@ -1,11 +1,11 @@ -{ pkgs, config, ... }: +{ pkgs, ... }: { imports = [ - ../../modules/hyprland/nixos.nix - ../../shared/nixos + ../../modules/nixos ./hardware-configuration.nix - ./services/nixos + ./hardware.nix + ./services.nix ]; # @@ -134,36 +134,11 @@ }; # - # HARDWARE # + # NETWORK # # - # Enable Zenergy - boot.initrd.kernelModules = [ - "zenergy" - ]; - boot.extraModulePackages = [ - config.boot.kernelPackages.zenergy - ]; - - # Enable openrazer for managing Razer products' configuration - hardware.openrazer = { - enable = true; - users = [ "wizardlink" ]; - }; - - services.udev = { - # Vial udev rule for Monsgeek M1 - extraRules = '' - # Monsgeek M1 - KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="fffe", ATTRS{idProduct}=="0005", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" - ''; - - # WB32 DFU rules - needed for flashing - packages = [ (pkgs.callPackage ../../packages/wb32dfu-udev-rules { }) ]; - }; - - # enable a better driver for wireless xbox controllers. - hardware.xpadneo.enable = true; + # Enable WOL on my ethernet interface. + networking.interfaces.enp5s0.wakeOnLan.enable = true; # # PACKAGES # diff --git a/hosts/wizdesk/services/nixos/postgresql.nix b/specific/desktop/services.nix similarity index 73% rename from hosts/wizdesk/services/nixos/postgresql.nix rename to specific/desktop/services.nix index 06ed2bb..b696832 100644 --- a/hosts/wizdesk/services/nixos/postgresql.nix +++ b/specific/desktop/services.nix @@ -1,6 +1,13 @@ { pkgs, ... }: { + imports = [ + ./services/archi.nix + ./services/caddy.nix + ./services/forgejo.nix + ./services/jellyfin.nix + ]; + services.postgresql = { enable = true; diff --git a/hosts/wizdesk/services/nixos/archi.nix b/specific/desktop/services/archi.nix similarity index 100% rename from hosts/wizdesk/services/nixos/archi.nix rename to specific/desktop/services/archi.nix diff --git a/specific/desktop/services/authentication.nix b/specific/desktop/services/authentication.nix new file mode 100644 index 0000000..64a2b2c --- /dev/null +++ b/specific/desktop/services/authentication.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: + +{ + # Enable polkit, + security.polkit.enable = true; + + # Install a keyring service and manager. + environment.systemPackages = with pkgs; [ + libsForQt5.kwallet + libsForQt5.kwalletmanager + ]; +} diff --git a/hosts/wizdesk/services/nixos/caddy.nix b/specific/desktop/services/caddy.nix similarity index 80% rename from hosts/wizdesk/services/nixos/caddy.nix rename to specific/desktop/services/caddy.nix index 7fbce66..c421273 100644 --- a/hosts/wizdesk/services/nixos/caddy.nix +++ b/specific/desktop/services/caddy.nix @@ -42,16 +42,5 @@ virtualHosts."shoko.thewizard.link".extraConfig = '' reverse_proxy 127.0.0.1:8111 ''; - - virtualHosts."api.cosplay.thewizard.link".extraConfig = '' - reverse_proxy 127.0.0.1:3000 - ''; - - virtualHosts."cosplay.thewizard.link".extraConfig = '' - root * /srv/cosplay - encode - try_files {path} /index.html - file_server - ''; }; } diff --git a/hosts/wizdesk/services/nixos/forgejo.nix b/specific/desktop/services/forgejo.nix similarity index 100% rename from hosts/wizdesk/services/nixos/forgejo.nix rename to specific/desktop/services/forgejo.nix diff --git a/hosts/wizdesk/services/home-manager/hydractify-bot.nix b/specific/desktop/services/hydractify-bot.nix similarity index 100% rename from hosts/wizdesk/services/home-manager/hydractify-bot.nix rename to specific/desktop/services/hydractify-bot.nix diff --git a/hosts/wizdesk/services/nixos/jellyfin.nix b/specific/desktop/services/jellyfin.nix similarity index 100% rename from hosts/wizdesk/services/nixos/jellyfin.nix rename to specific/desktop/services/jellyfin.nix diff --git a/hosts/wizdesk/services/home-manager/openttd.nix b/specific/desktop/services/openttd.nix similarity index 100% rename from hosts/wizdesk/services/home-manager/openttd.nix rename to specific/desktop/services/openttd.nix diff --git a/hosts/wizdesk/services/home-manager/terraria.nix b/specific/desktop/services/terraria.nix similarity index 100% rename from hosts/wizdesk/services/home-manager/terraria.nix rename to specific/desktop/services/terraria.nix diff --git a/packages/wb32dfu-udev-rules/default.nix b/specific/desktop/services/udev/wb32dfu.nix similarity index 100% rename from packages/wb32dfu-udev-rules/default.nix rename to specific/desktop/services/udev/wb32dfu.nix diff --git a/packages/wb32dfu-udev-rules/wb32dfu.rules b/specific/desktop/services/udev/wb32dfu.rules similarity index 100% rename from packages/wb32dfu-udev-rules/wb32dfu.rules rename to specific/desktop/services/udev/wb32dfu.rules diff --git a/packages/zenergy.nix b/specific/kernel/zenergy.nix similarity index 100% rename from packages/zenergy.nix rename to specific/kernel/zenergy.nix diff --git a/hosts/wizlap/hardware-configuration.nix b/specific/laptop/hardware-configuration.nix similarity index 100% rename from hosts/wizlap/hardware-configuration.nix rename to specific/laptop/hardware-configuration.nix diff --git a/specific/laptop/hardware.nix b/specific/laptop/hardware.nix new file mode 100644 index 0000000..1853979 --- /dev/null +++ b/specific/laptop/hardware.nix @@ -0,0 +1,14 @@ +{ config, ... }: + +{ + # Enable Zenergy + boot.initrd.kernelModules = [ + "zenergy" + ]; + boot.extraModulePackages = [ + config.boot.kernelPackages.zenergy + ]; + + # enable a better driver for wireless xbox controllers. + hardware.xpadneo.enable = true; +} diff --git a/hosts/wizlap/home-manager.nix b/specific/laptop/home-manager.nix similarity index 96% rename from hosts/wizlap/home-manager.nix rename to specific/laptop/home-manager.nix index 3bd259d..4d127fc 100644 --- a/hosts/wizlap/home-manager.nix +++ b/specific/laptop/home-manager.nix @@ -7,10 +7,7 @@ # Import configurations for better modularity. imports = [ - ../../modules/emacs - ../../modules/hyprland/home-manager.nix - ../../modules/neovim - ../../shared/home-manager + ../../modules/home-manager ]; # Home Manager needs a bit of information about you and the paths it should @@ -27,6 +24,11 @@ # release notes. home.stateVersion = "23.05"; # Please read the comment before changing. + home.sessionVariables = { + EDITOR = "nvim"; + MANPAGER = "nvim +Man!"; + }; + home.file = { # Create wallpaper script to be read by the start_services.sh script. ".local/share/scripts/wallpaper.sh" = { diff --git a/hosts/wizlap/nixos.nix b/specific/laptop/nixos.nix similarity index 76% rename from hosts/wizlap/nixos.nix rename to specific/laptop/nixos.nix index 61437fc..e607877 100644 --- a/hosts/wizlap/nixos.nix +++ b/specific/laptop/nixos.nix @@ -1,10 +1,10 @@ -{ config, ... }: +{ ... }: { imports = [ - ../../modules/hyprland/nixos.nix - ../../shared/nixos + ../../modules/nixos ./hardware-configuration.nix + ./hardware.nix ]; # @@ -19,14 +19,6 @@ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "23.05"; - # Consume my desktop's binary cache. This is specially useful since (in theory) - # I will always update the flake and desktop machine first, so when I pull the changes, - # my desktop will have all the binaries my laptop needs. - nix.settings.substituters = [ "http://192.168.0.100:7373" ]; - nix.settings.trusted-public-keys = [ - "wizdesk-1:2UvctPjiMwMs7r2r7VPvoPmh4OcUjY3JmaRDJnOTZY8=" - ]; - # # SYSTEM # # @@ -100,19 +92,4 @@ LC_TIME = "en_GB.UTF-8"; }; }; - - # - # HARDWARE # - # - - # Enable Zenergy - boot.initrd.kernelModules = [ - "zenergy" - ]; - boot.extraModulePackages = [ - config.boot.kernelPackages.zenergy - ]; - - # enable a better driver for wireless xbox controllers. - hardware.xpadneo.enable = true; }