From 34730d793c03b5d08e3c8f94242fa57d6e7de0b9 Mon Sep 17 00:00:00 2001 From: Doloro1978 Date: Thu, 16 Oct 2025 01:25:34 +0100 Subject: [PATCH] fucking(refactored): everything --- nix/flake.lock | 16 ++++ nix/flake.nix | 83 +++++++++---------- .../hg => hardwares/doloro-wsl/home.nix} | 0 nix/hardwares/doloro-wsl/nixos.nix | 3 + nix/{hosts => hardwares}/doloro/disks.nix | 0 .../doloro/hardware-configuration.nix | 0 nix/hardwares/doloro/home.nix | 3 + nix/hardwares/doloro/nixos.nix | 12 +++ nix/hosts/doloro-wsl/nixos.nix | 23 ----- nix/hosts/doloro/home.nix | 46 ++++++---- nix/hosts/doloro/nixos.nix | 23 ++--- nix/modules/blender/default.nix | 4 + nix/modules/blender/home.nix | 14 +++- nix/modules/chromium/default.nix | 4 + nix/modules/chromium/home.nix | 33 +++++--- nix/modules/default.nix | 7 ++ nix/modules/fish/default.nix | 4 + nix/modules/fish/home.nix | 16 +++- nix/modules/greetd/default.nix | 3 +- nix/modules/greetd/nixos.nix | 2 +- nix/modules/hyprland/default.nix | 4 + nix/modules/hyprland/home.nix | 19 +++-- nix/modules/hyprland/nixos.nix | 16 +++- nix/modules/neovim/home.nix | 18 ---- nix/modules/nixvim/default.nix | 4 + nix/modules/nixvim/home.nix | 18 +++- nix/modules/obs/default.nix | 4 + nix/modules/obs/home.nix | 16 +++- nix/modules/quickshell/default.nix | 4 + nix/modules/quickshell/home.nix | 9 +- nix/modules/spicetify/default.nix | 4 + nix/modules/spicetify/home.nix | 14 +++- nix/modules/steam/default.nix | 4 + nix/modules/steam/nixos.nix | 8 +- nix/modules/stylix/default.nix | 4 + nix/modules/stylix/home.nix | 6 +- nix/modules/stylix/nixos.nix | 6 +- nix/modules/theme/default.nix | 3 +- nix/modules/theme/home.nix | 15 +++- nix/modules/tmux/default.nix | 4 + nix/modules/tmux/home.nix | 10 ++- nix/modules/ytm/a | 0 nix/modules/ytm/default.nix | 4 + nix/modules/ytm/home.nix | 15 +++- 44 files changed, 344 insertions(+), 161 deletions(-) rename nix/{modules/hg => hardwares/doloro-wsl/home.nix} (100%) create mode 100644 nix/hardwares/doloro-wsl/nixos.nix rename nix/{hosts => hardwares}/doloro/disks.nix (100%) rename nix/{hosts => hardwares}/doloro/hardware-configuration.nix (100%) create mode 100644 nix/hardwares/doloro/home.nix create mode 100644 nix/hardwares/doloro/nixos.nix create mode 100644 nix/modules/chromium/default.nix create mode 100644 nix/modules/default.nix create mode 100644 nix/modules/hyprland/default.nix delete mode 100644 nix/modules/neovim/home.nix create mode 100644 nix/modules/nixvim/default.nix create mode 100644 nix/modules/obs/default.nix create mode 100644 nix/modules/quickshell/default.nix create mode 100644 nix/modules/spicetify/default.nix create mode 100644 nix/modules/stylix/default.nix create mode 100644 nix/modules/tmux/default.nix create mode 100644 nix/modules/ytm/a create mode 100644 nix/modules/ytm/default.nix diff --git a/nix/flake.lock b/nix/flake.lock index 09fd243..b679f29 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -738,6 +738,21 @@ "type": "github" } }, + "nix-meow": { + "locked": { + "lastModified": 1760558110, + "narHash": "sha256-mlVxLzq/q9gxhUFsTF47smxhDPheFiShVP9X1qPrlmw=", + "ref": "refs/heads/main", + "rev": "2acc4cbc965397774f4d6c2c1dea70b416fecc8d", + "revCount": 13, + "type": "git", + "url": "https://git.scug.io/nikkuss/nix-meow.git" + }, + "original": { + "type": "git", + "url": "https://git.scug.io/nikkuss/nix-meow.git" + } + }, "nix-warez": { "inputs": { "nixpkgs": "nixpkgs_3" @@ -973,6 +988,7 @@ "home-manager": "home-manager", "hyprland": "hyprland", "neovim-nightly-overlay": "neovim-nightly-overlay", + "nix-meow": "nix-meow", "nix-warez": "nix-warez", "nixpkgs": "nixpkgs_4", "nixpkgs-gamescope": "nixpkgs-gamescope", diff --git a/nix/flake.nix b/nix/flake.nix index 4bd6ff6..d447509 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -8,6 +8,7 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-meow.url = "git+https://git.scug.io/nikkuss/nix-meow.git"; # config manager, meow'd hyprland.url = "github:hyprwm/Hyprland"; quickshell = { url = "git+https://git.outfoxxed.me/outfoxxed/quickshell"; @@ -42,53 +43,47 @@ }; }; outputs = - inputs@{ nixpkgs, home-manager, ... }: + inputs@{ + nixpkgs, + home-manager, + nix-meow, + ... + }: let - system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - config = { + utils = nix-meow.lib.setup { + inherit (inputs) home-manager nixpkgs; + inherit inputs; + flakeRoot = ./.; + hostsFolder = ./hosts; + hardwaresFolder = ./hardwares; + modulesFolder = ./modules; + globalConfig = { allowUnfree = true; }; + globalOverlays = [ ]; + defaultUser = "doloro"; }; - overlays = [ inputs.neovim-nightly-overlay.overlays.default ]; + inherit (utils) mkHost; + configurations = [ + (mkHost { + hardware = "doloro"; + host = "doloro"; + system = "x86_64-linux"; + stateVersion = "25.05"; + nixpkgsConfig = { + rocmSupport = true; + }; + }) + (mkHost { + hardware = "doloro-wsl"; + host = "doloro-wsl"; + system = "aarch64-linux"; + stateVersion = "25.05"; + nixpkgsConfig = { + rocmSupport = true; + }; + }) + ]; in - { - homeConfigurations."doloro" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - extraSpecialArgs = { - inherit inputs system; - }; - modules = [ ./hosts/doloro/home.nix ]; - }; - homeConfigurations."doloro-wsl" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - extraSpecialArgs = { - inherit inputs system; - }; - modules = [ ./hosts/doloro-wsl/home.nix ]; - }; - nixosConfigurations.doloroo-main = nixpkgs.lib.nixosSystem { - specialArgs = { - inherit inputs system; - }; - modules = [ - ./hosts/doloro/configuration.nix - inputs.sops-nix.nixosModules.sops - inputs.disko.nixosModules.disko - { nixpkgs.overlays = overlays; } - ]; - }; - nixosConfigurations.doloroo-laptop-wsl = nixpkgs.lib.nixosSystem { - specialArgs = { - inherit inputs system; - }; - modules = [ - ./hosts/doloro-wsl/configuration.nix - inputs.sops-nix.nixosModules.sops - inputs.disko.nixosModules.disko - { nixpkgs.overlays = overlays; } - ]; - }; - }; + (utils.deepMerge configurations); } diff --git a/nix/modules/hg b/nix/hardwares/doloro-wsl/home.nix similarity index 100% rename from nix/modules/hg rename to nix/hardwares/doloro-wsl/home.nix diff --git a/nix/hardwares/doloro-wsl/nixos.nix b/nix/hardwares/doloro-wsl/nixos.nix new file mode 100644 index 0000000..52c14b8 --- /dev/null +++ b/nix/hardwares/doloro-wsl/nixos.nix @@ -0,0 +1,3 @@ +{ ... }: +{ +} diff --git a/nix/hosts/doloro/disks.nix b/nix/hardwares/doloro/disks.nix similarity index 100% rename from nix/hosts/doloro/disks.nix rename to nix/hardwares/doloro/disks.nix diff --git a/nix/hosts/doloro/hardware-configuration.nix b/nix/hardwares/doloro/hardware-configuration.nix similarity index 100% rename from nix/hosts/doloro/hardware-configuration.nix rename to nix/hardwares/doloro/hardware-configuration.nix diff --git a/nix/hardwares/doloro/home.nix b/nix/hardwares/doloro/home.nix new file mode 100644 index 0000000..52c14b8 --- /dev/null +++ b/nix/hardwares/doloro/home.nix @@ -0,0 +1,3 @@ +{ ... }: +{ +} diff --git a/nix/hardwares/doloro/nixos.nix b/nix/hardwares/doloro/nixos.nix new file mode 100644 index 0000000..7967337 --- /dev/null +++ b/nix/hardwares/doloro/nixos.nix @@ -0,0 +1,12 @@ +{ + lib, + ... +}: +{ + imports = [ + ./disks.nix + ./hardware-configuration.nix + ]; + hardware.enableRedistributableFirmware = true; + boot.loader.grub.useOSProber = lib.mkOverride 0 false; +} diff --git a/nix/hosts/doloro-wsl/nixos.nix b/nix/hosts/doloro-wsl/nixos.nix index 3da1f5d..d1a4c78 100644 --- a/nix/hosts/doloro-wsl/nixos.nix +++ b/nix/hosts/doloro-wsl/nixos.nix @@ -25,27 +25,4 @@ services.tailscale.enable = true; networking.firewall.trustedInterfaces = [ "eth0" ]; systemd.services.firewall.enable = lib.mkForce true; - # modules = { - # users.enable = true; - # secrets.enable = true; - # sshserver.enable = true; - # nix-conf.enable = true; - # shell.enable = true; - # stylix.enable = true; - # hosting = { - # enable = false; - # networking = { - # publicInterface = "eth0"; - # }; - # stacks = { - # test = { - # config = - # { pkgs, ... }: - # { - # environment.systemPackages = with pkgs; [ fastfetch ]; - # }; - # }; - # }; - # }; - # }; } diff --git a/nix/hosts/doloro/home.nix b/nix/hosts/doloro/home.nix index 80281ac..8f83fee 100644 --- a/nix/hosts/doloro/home.nix +++ b/nix/hosts/doloro/home.nix @@ -5,24 +5,36 @@ fetchFromGitHub, ... }: - { - imports = [ - ../../modules/hyprland/home.nix - ../../modules/quickshell/home.nix - ../../modules/chromium/home.nix - #./modules/neovim/home.nix - ../../modules/stylix/home.nix - ../../modules/nixvim/home.nix - ../../modules/tmux/home.nix - ../../modules/theme/home.nix - # ./modules/spicetify/home.nix - ../../modules/obs/home.nix - ../../modules/blender/home.nix - ../../modules/fish/home.nix - ../../modules/ytm/home.nix - ../../overlays.nix - ]; + # imports = [ + # ../../modules/hyprland/home.nix + # ../../modules/quickshell/home.nix + # ../../modules/chromium/home.nix + # #./modules/neovim/home.nix + # ../../modules/stylix/home.nix + # ../../modules/nixvim/home.nix + # ../../modules/tmux/home.nix + # ../../modules/theme/home.nix + # # ./modules/spicetify/home.nix + # ../../modules/obs/home.nix + # ../../modules/blender/home.nix + # ../../modules/fish/home.nix + # ../../modules/ytm/home.nix + # ../../overlays.nix + # ]; + modules = { + Hyprland.enable = true; + quickshell.enable = true; + chromium.enable = true; + nixvim.enable = true; + stylix.enable = true; + tmux.enable = true; + theme.enable = true; + obs.enable = true; + blender.enable = true; + fish.enable = true; + youtube-music.enable = true; + }; # Home Manager needs a bit of information about you and the paths it should # manage. home.username = "doloro"; diff --git a/nix/hosts/doloro/nixos.nix b/nix/hosts/doloro/nixos.nix index 38f4e0c..cf50e12 100644 --- a/nix/hosts/doloro/nixos.nix +++ b/nix/hosts/doloro/nixos.nix @@ -4,22 +4,24 @@ { config, + inputs, lib, pkgs, ... }: - +let + sops = inputs.sops-nix; +in { imports = [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - ../../modules/greetd/nixos.nix - ../../modules/stylix/nixos.nix - ../../modules/steam/nixos.nix - ../../modules/hyprland/nixos.nix - ../../disks.nix - ./overlays.nix + inputs.sops-nix.nixosModules.sops ]; + modules = { + greetd.enable = true; + stylix.enable = true; + steam.enable = true; + Hyprland.enable = true; + }; # Use the systemd-boot EFI boot loader. boot.loader.grub.enable = true; @@ -53,7 +55,7 @@ security.rtkit.enable = true; sops = { - defaultSopsFile = ./secrets/users.yaml; + defaultSopsFile = ../../secrets/users.yaml; secrets = { root-hashed_password = { neededForUsers = true; @@ -190,6 +192,7 @@ vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wget killall + sops ]; # Some programs need SUID wrappers, can be configured further or are diff --git a/nix/modules/blender/default.nix b/nix/modules/blender/default.nix index e69de29..fb4af30 100644 --- a/nix/modules/blender/default.nix +++ b/nix/modules/blender/default.nix @@ -0,0 +1,4 @@ +_: { + home = ./home.nix; + # nixos: ./nixos.nix; +} diff --git a/nix/modules/blender/home.nix b/nix/modules/blender/home.nix index 760d65f..e76f954 100644 --- a/nix/modules/blender/home.nix +++ b/nix/modules/blender/home.nix @@ -1,4 +1,6 @@ { + config, + lib, inputs, pkgs, home, @@ -7,12 +9,18 @@ }: let blenderPkgs = inputs.nix-warez.packages.${system}; + cfg = config.modules.blender; in { + options.modules.blender = { + enable = lib.mkEnableOption "Blender configuration module"; + }; # whole blender config including addons is too fat to include here - home.packages = with pkgs; [ - blenderPkgs.blender_4_5 - ]; + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + blenderPkgs.blender_4_5 + ]; + }; # nix'ing a blender config is most likely not possible # could probs install blender addons through nix since they are fat fat mega fat to install TODO } diff --git a/nix/modules/chromium/default.nix b/nix/modules/chromium/default.nix new file mode 100644 index 0000000..fb4af30 --- /dev/null +++ b/nix/modules/chromium/default.nix @@ -0,0 +1,4 @@ +_: { + home = ./home.nix; + # nixos: ./nixos.nix; +} diff --git a/nix/modules/chromium/home.nix b/nix/modules/chromium/home.nix index 53e0e96..713b08c 100644 --- a/nix/modules/chromium/home.nix +++ b/nix/modules/chromium/home.nix @@ -1,24 +1,31 @@ { + config, + lib, inputs, pkgs, system, ... }: let - + cfg = config.modules.chromium; in { - programs.chromium = { - enable = true; - extensions = [ - { id = "ghmbeldphafepmbegfdlkpapadhbakde"; } # ProtonPass - #{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # Ublok - { id = "ddkjiahejlhfcafbddmgiahcphecmpfh"; } # Ublock lite - { id = "kpmjjdhbcfebfjgdnpjagcndoelnidfj"; } # Control panel for twitter - { id = "aighbdamfnndbemigjcbkdklkegkgmpl"; } # Better twitter embeds - { id = "enamippconapkdmgfgjchkhakpfinmaj"; } # DeArrow - { id = "bjcnpgekponkjpincbcoflgkdomldlnl"; } # Website Blocker - ]; - package = pkgs.chromium.override { enableWideVine = true; }; + options.modules.chromium = { + enable = lib.mkEnableOption "Chromium"; + }; + config = lib.mkIf cfg.enable { + programs.chromium = { + enable = true; + extensions = [ + { id = "ghmbeldphafepmbegfdlkpapadhbakde"; } # ProtonPass + #{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # Ublok + { id = "ddkjiahejlhfcafbddmgiahcphecmpfh"; } # Ublock lite + { id = "kpmjjdhbcfebfjgdnpjagcndoelnidfj"; } # Control panel for twitter + { id = "aighbdamfnndbemigjcbkdklkegkgmpl"; } # Better twitter embeds + { id = "enamippconapkdmgfgjchkhakpfinmaj"; } # DeArrow + { id = "bjcnpgekponkjpincbcoflgkdomldlnl"; } # Website Blocker + ]; + package = pkgs.chromium.override { enableWideVine = true; }; + }; }; } diff --git a/nix/modules/default.nix b/nix/modules/default.nix new file mode 100644 index 0000000..8a42ef2 --- /dev/null +++ b/nix/modules/default.nix @@ -0,0 +1,7 @@ +_: +builtins.listToAttrs ( + map (fn: { + name = fn; + value = import ./${fn} { }; + }) (builtins.filter (fn: fn != "default.nix") (builtins.attrNames (builtins.readDir ./.))) +) diff --git a/nix/modules/fish/default.nix b/nix/modules/fish/default.nix index e69de29..fb4af30 100644 --- a/nix/modules/fish/default.nix +++ b/nix/modules/fish/default.nix @@ -0,0 +1,4 @@ +_: { + home = ./home.nix; + # nixos: ./nixos.nix; +} diff --git a/nix/modules/fish/home.nix b/nix/modules/fish/home.nix index d273c10..7bee096 100644 --- a/nix/modules/fish/home.nix +++ b/nix/modules/fish/home.nix @@ -1,7 +1,15 @@ -{ ... }: +{ config, lib, ... }: +let + cfg = config.modules.fish; +in { - home.shell.enableFishIntegration = true; - programs.fish = { - # enable = true; + options.modules.fish = { + enable = lib.mkEnableOption "Fish"; + }; + config = lib.mkIf cfg.enable { + home.shell.enableFishIntegration = true; + programs.fish = { + # enable = true; + }; }; } diff --git a/nix/modules/greetd/default.nix b/nix/modules/greetd/default.nix index b56de85..ded4213 100644 --- a/nix/modules/greetd/default.nix +++ b/nix/modules/greetd/default.nix @@ -1,3 +1,4 @@ _: { - nixos: ./nixos.nix; + # home = ./home.nix; + nixos = ./nixos.nix; } diff --git a/nix/modules/greetd/nixos.nix b/nix/modules/greetd/nixos.nix index 2459194..ce63474 100644 --- a/nix/modules/greetd/nixos.nix +++ b/nix/modules/greetd/nixos.nix @@ -12,7 +12,7 @@ in options.modules.greetd = { enable = lib.mkEnableOption "Greetd configuration module"; }; - config = { + config = lib.mkIf cfg.enable { services.greetd = { enable = true; settings = { diff --git a/nix/modules/hyprland/default.nix b/nix/modules/hyprland/default.nix new file mode 100644 index 0000000..6c712f7 --- /dev/null +++ b/nix/modules/hyprland/default.nix @@ -0,0 +1,4 @@ +_: { + home = ./home.nix; + nixos = ./nixos.nix; +} diff --git a/nix/modules/hyprland/home.nix b/nix/modules/hyprland/home.nix index 26a9e11..c4bac10 100644 --- a/nix/modules/hyprland/home.nix +++ b/nix/modules/hyprland/home.nix @@ -1,6 +1,12 @@ -{ inputs, pkgs, ... }: +{ + inputs, + config, + lib, + pkgs, + ... +}: let - + cfg = config.modules.Hyprland; in { imports = [ @@ -8,7 +14,10 @@ in ./runner.nix ./screenshot.nix ]; - wayland.windowManager.hyprland = { + options.modules.Hyprland = { + enable = lib.mkEnableOption "Hyprland"; + }; + config.wayland.windowManager.hyprland = lib.mkIf cfg.enable { enable = true; # set the flake package # settings = { }; @@ -17,8 +26,8 @@ in portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; }; - # todo, split this into its own module; - programs.foot = { + # TODO, split this into its own module; + config.programs.foot = lib.mkIf cfg.enable { enable = true; settings = { main = { diff --git a/nix/modules/hyprland/nixos.nix b/nix/modules/hyprland/nixos.nix index 89cc6d6..7626197 100644 --- a/nix/modules/hyprland/nixos.nix +++ b/nix/modules/hyprland/nixos.nix @@ -1,6 +1,18 @@ -{ inputs, pkgs, ... }: { - config = { + inputs, + pkgs, + lib, + config, + ... +}: +let + cfg = config.modules.Hyprland; +in +{ + options.modules.Hyprland = { + enable = lib.mkEnableOption "Hyprland"; + }; + config = lib.mkIf cfg.enable { programs.xwayland.enable = true; programs.hyprland = { enable = true; diff --git a/nix/modules/neovim/home.nix b/nix/modules/neovim/home.nix deleted file mode 100644 index 8517b56..0000000 --- a/nix/modules/neovim/home.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - inputs, - pkgs, - config, - ... -}: -let - -in -{ - home.packages = [ - inputs.neovim-nightly-overlay.packages.${pkgs.system}.default - ]; - xdg.configFile."nvim" = { - recursive = true; - source = config.lib.file.mkOutOfStoreSymlink "/home/doloro/dotfiles/nvim"; - }; -} diff --git a/nix/modules/nixvim/default.nix b/nix/modules/nixvim/default.nix new file mode 100644 index 0000000..d7a90be --- /dev/null +++ b/nix/modules/nixvim/default.nix @@ -0,0 +1,4 @@ +_: { + home = ./home.nix; + # nixos = ./nixos.nix; +} diff --git a/nix/modules/nixvim/home.nix b/nix/modules/nixvim/home.nix index c9328e2..172dba8 100644 --- a/nix/modules/nixvim/home.nix +++ b/nix/modules/nixvim/home.nix @@ -1,13 +1,25 @@ -{ inputs, pkgs, ... }: { + config, + inputs, + pkgs, + lib, + ... +}: +let + cfg = config.modules.nixvim; +in +{ + options.modules.nixvim = { + enable = lib.mkEnableOption "Nixvim"; + }; imports = [ inputs.nixvim.homeModules.nixvim ./plugins ]; - home.packages = with pkgs; [ + config.home.packages = with pkgs; [ nixfmt ]; - programs.nixvim = { + config.programs.nixvim = lib.mkIf cfg.enable { enable = true; defaultEditor = true; colorschemes.tokyonight.enable = true; diff --git a/nix/modules/obs/default.nix b/nix/modules/obs/default.nix new file mode 100644 index 0000000..fb4af30 --- /dev/null +++ b/nix/modules/obs/default.nix @@ -0,0 +1,4 @@ +_: { + home = ./home.nix; + # nixos: ./nixos.nix; +} diff --git a/nix/modules/obs/home.nix b/nix/modules/obs/home.nix index e008b49..ad32c20 100644 --- a/nix/modules/obs/home.nix +++ b/nix/modules/obs/home.nix @@ -1,6 +1,18 @@ -{ inputs, pkgs, ... }: { - programs = { + inputs, + config, + lib, + pkgs, + ... +}: +let + cfg = config.modules.obs; +in +{ + options.modules.obs = { + enable = lib.mkEnableOption "obs"; + }; + config.programs = lib.mkIf cfg.enable { obs-studio = { enable = true; package = ( diff --git a/nix/modules/quickshell/default.nix b/nix/modules/quickshell/default.nix new file mode 100644 index 0000000..fb4af30 --- /dev/null +++ b/nix/modules/quickshell/default.nix @@ -0,0 +1,4 @@ +_: { + home = ./home.nix; + # nixos: ./nixos.nix; +} diff --git a/nix/modules/quickshell/home.nix b/nix/modules/quickshell/home.nix index 6bce8e1..ac9b83c 100644 --- a/nix/modules/quickshell/home.nix +++ b/nix/modules/quickshell/home.nix @@ -1,19 +1,24 @@ { inputs, config, + lib, pkgs, system, ... }: let pkg = inputs.quickshell.packages.${system}.quickshell; + cfg = config.modules.quickshell; in { - xdg.configFile."quickshell" = { + options.modules.quickshell = { + enable = lib.mkEnableOption "quickshell configuration module"; + }; + config.xdg.configFile."quickshell" = lib.mkIf cfg.enable { recursive = true; source = config.lib.file.mkOutOfStoreSymlink "/home/doloro/dotfiles/quickshell/"; }; - systemd.user.services.quickshell = { + config.systemd.user.services.quickshell = { Unit = { Description = "Quickshell daemon"; After = [ "hyprland-session.target" ]; diff --git a/nix/modules/spicetify/default.nix b/nix/modules/spicetify/default.nix new file mode 100644 index 0000000..fb4af30 --- /dev/null +++ b/nix/modules/spicetify/default.nix @@ -0,0 +1,4 @@ +_: { + home = ./home.nix; + # nixos: ./nixos.nix; +} diff --git a/nix/modules/spicetify/home.nix b/nix/modules/spicetify/home.nix index efa4967..a8cc1ae 100644 --- a/nix/modules/spicetify/home.nix +++ b/nix/modules/spicetify/home.nix @@ -1,12 +1,22 @@ -{ inputs, pkgs, ... }: +{ + inputs, + config, + lib, + pkgs, + ... +}: let spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system}; + cfg = config.modules.spicetify; in { + options.modules.spicetify = { + enable = lib.mkEnableOption "spicetify configuration module"; + }; imports = [ inputs.spicetify-nix.homeManagerModules.default ]; - programs.spicetify = { + config.programs.spicetify = lib.mkIf cfg.enable { enable = true; enabledExtensions = with spicePkgs.extensions; [ diff --git a/nix/modules/steam/default.nix b/nix/modules/steam/default.nix index e69de29..26c4b03 100644 --- a/nix/modules/steam/default.nix +++ b/nix/modules/steam/default.nix @@ -0,0 +1,4 @@ +_: { + # home: ./home.nix; + nixos = ./nixos.nix; +} diff --git a/nix/modules/steam/nixos.nix b/nix/modules/steam/nixos.nix index 8a8c948..c9ddd45 100644 --- a/nix/modules/steam/nixos.nix +++ b/nix/modules/steam/nixos.nix @@ -4,8 +4,14 @@ pkgs, ... }: +let + cfg = config.modules.steam; +in { - config = { + options.modules.steam = { + enable = lib.mkEnableOption "steam"; + }; + config = lib.mkIf cfg.enable { programs.steam = { enable = true; remotePlay.openFirewall = true; diff --git a/nix/modules/stylix/default.nix b/nix/modules/stylix/default.nix new file mode 100644 index 0000000..6c712f7 --- /dev/null +++ b/nix/modules/stylix/default.nix @@ -0,0 +1,4 @@ +_: { + home = ./home.nix; + nixos = ./nixos.nix; +} diff --git a/nix/modules/stylix/home.nix b/nix/modules/stylix/home.nix index b10ce34..963f1cf 100644 --- a/nix/modules/stylix/home.nix +++ b/nix/modules/stylix/home.nix @@ -9,12 +9,14 @@ let cfg = config.modules.stylix; in { - + options.modules.stylix = { + enable = lib.mkEnableOption "stylix configuration module"; + }; imports = [ ./shared.nix inputs.stylix.homeModules.stylix ]; - config = { + config = lib.mkIf cfg.enable { stylix.enable = true; stylix.autoEnable = false; # honestly, fuck stylix; stylix.targets.gtk.enable = true; diff --git a/nix/modules/stylix/nixos.nix b/nix/modules/stylix/nixos.nix index 98db79e..fb61f36 100644 --- a/nix/modules/stylix/nixos.nix +++ b/nix/modules/stylix/nixos.nix @@ -9,12 +9,14 @@ let cfg = config.modules.stylix; in { - + options.modules.stylix = { + enable = lib.mkEnableOption "stylix configuration module"; + }; imports = [ ./shared.nix inputs.stylix.nixosModules.stylix ]; - config = { + config = lib.mkIf cfg.enable { stylix.enable = true; stylix.autoEnable = false; # honestly, fuck stylix; #stylix.targets.tmux.enable = false; diff --git a/nix/modules/theme/default.nix b/nix/modules/theme/default.nix index 4bf7f69..fb4af30 100644 --- a/nix/modules/theme/default.nix +++ b/nix/modules/theme/default.nix @@ -1,3 +1,4 @@ _: { - home: ./home.nix + home = ./home.nix; + # nixos: ./nixos.nix; } diff --git a/nix/modules/theme/home.nix b/nix/modules/theme/home.nix index c1abb98..91df181 100644 --- a/nix/modules/theme/home.nix +++ b/nix/modules/theme/home.nix @@ -1,6 +1,17 @@ -{ inputs, ... }: { - services.dunst = { + inputs, + config, + lib, + ... +}: +let + cfg = config.modules.theme; +in +{ + options.modules.theme = { + enable = lib.mkEnableOption "theme"; + }; + config.services.dunst = lib.mkIf cfg.enable { settings = { global = { font = "Noto Nerd Font 8"; diff --git a/nix/modules/tmux/default.nix b/nix/modules/tmux/default.nix new file mode 100644 index 0000000..fb4af30 --- /dev/null +++ b/nix/modules/tmux/default.nix @@ -0,0 +1,4 @@ +_: { + home = ./home.nix; + # nixos: ./nixos.nix; +} diff --git a/nix/modules/tmux/home.nix b/nix/modules/tmux/home.nix index 4a7ad4f..736ac8e 100644 --- a/nix/modules/tmux/home.nix +++ b/nix/modules/tmux/home.nix @@ -1,11 +1,19 @@ { inputs, + config, + lib, pkgs, fetchFromGitHub, ... }: +let + cfg = config.modules.tmux; +in { - programs.tmux = { + options.modules.tmux = { + enable = lib.mkEnableOption "tmux"; + }; + config.programs.tmux = lib.mkIf cfg.enable { enable = true; plugins = with pkgs.tmuxPlugins; [ sensible diff --git a/nix/modules/ytm/a b/nix/modules/ytm/a new file mode 100644 index 0000000..e69de29 diff --git a/nix/modules/ytm/default.nix b/nix/modules/ytm/default.nix new file mode 100644 index 0000000..fb4af30 --- /dev/null +++ b/nix/modules/ytm/default.nix @@ -0,0 +1,4 @@ +_: { + home = ./home.nix; + # nixos: ./nixos.nix; +} diff --git a/nix/modules/ytm/home.nix b/nix/modules/ytm/home.nix index e1596b3..08dd86d 100644 --- a/nix/modules/ytm/home.nix +++ b/nix/modules/ytm/home.nix @@ -1,6 +1,17 @@ -{ pkgs, ... }: { - home.packages = with pkgs; [ + pkgs, + config, + lib, + ... +}: +let + cfg = config.modules.youtube-music; +in +{ + options.modules.youtube-music = { + enable = lib.mkEnableOption "youtube music"; + }; + config.home.packages = with pkgs; [ youtube-music ]; }