diff --git a/flake.nix b/flake.nix index 9b213ba..ac0a074 100644 --- a/flake.nix +++ b/flake.nix @@ -74,7 +74,7 @@ }; ymir = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs outputs;}; - modules = [ ./hosts/ymir/configuration.nix ]; + modules = [./hosts/ymir/configuration.nix]; }; harmonica = nixpkgs.lib.nixosSystem { modules = [ @@ -131,7 +131,5 @@ }; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.alejandra; - - description = "My system configuration"; }; } diff --git a/hosts/pochita/configuration.nix b/hosts/pochita/configuration.nix index 2cf3c67..561fc34 100644 --- a/hosts/pochita/configuration.nix +++ b/hosts/pochita/configuration.nix @@ -21,14 +21,13 @@ in { sshUser = "osbm"; } ]; - - enableKDE = false; - enableFonts = false; - - blockYoutube = false; - blockTwitter = false; - - enableTailscale = true; + myModules = { + enableKDE = false; + enableFonts = false; + blockYoutube = false; + blockTwitter = false; + enableTailscale = true; + }; i18n.inputMethod.enable = lib.mkForce false; # no need for japanese input method programs.firefox.enable = lib.mkForce false; # no need for firefox diff --git a/hosts/tartarus/configuration.nix b/hosts/tartarus/configuration.nix index 75a933f..a2efdfa 100644 --- a/hosts/tartarus/configuration.nix +++ b/hosts/tartarus/configuration.nix @@ -13,13 +13,13 @@ in { ../../modules ]; - blockYoutube = false; - blockTwitter = true; - blockBluesky = false; - - enableKDE = true; - - enableTailscale = true; + myModules = { + blockYoutube = false; + blockTwitter = true; + blockBluesky = false; + enableKDE = true; + enableTailscale = true; + }; boot.binfmt.emulatedSystems = ["aarch64-linux"]; nix.settings.extra-platforms = config.boot.binfmt.emulatedSystems; diff --git a/hosts/ymir/configuration.nix b/hosts/ymir/configuration.nix index d03f7ad..adb87c3 100644 --- a/hosts/ymir/configuration.nix +++ b/hosts/ymir/configuration.nix @@ -17,13 +17,13 @@ in { inputs.home-manager.nixosModules.home-manager ]; - blockYoutube = false; - blockTwitter = true; - blockBluesky = false; - - enableKDE = true; - - enableTailscale = true; + myModules = { + blockYoutube = false; + blockTwitter = true; + blockBluesky = false; + enableKDE = true; + enableTailscale = true; + }; # Bootloader. boot.loader.systemd-boot.enable = true; diff --git a/modules/arduino.nix b/modules/arduino.nix index 34a86f6..c3d87c7 100644 --- a/modules/arduino.nix +++ b/modules/arduino.nix @@ -5,7 +5,7 @@ ... }: { options = { - arduinoSetup = lib.mkOption { + myModules.arduinoSetup = lib.mkOption { type = lib.types.bool; default = false; description = "Installs arduino-ide and adafruit-nrfutil and sets udev rules"; @@ -13,7 +13,7 @@ }; config = lib.mkMerge [ - (lib.mkIf config.arduinoSetup { + (lib.mkIf config.myModules.arduinoSetup { environment.systemPackages = with pkgs; [ arduino-ide adafruit-nrfutil diff --git a/modules/concentration.nix b/modules/concentration.nix index 9545c58..8bb83aa 100644 --- a/modules/concentration.nix +++ b/modules/concentration.nix @@ -5,25 +5,27 @@ ... }: { options = { - blockYoutube = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Disables youtube using /etc/hosts file"; - }; - blockTwitter = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Disables twitter using /etc/hosts file"; - }; - blockBluesky = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Disables bluesky using /etc/hosts file"; + myModules = { + blockYoutube = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Disables youtube using /etc/hosts file"; + }; + blockTwitter = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Disables twitter using /etc/hosts file"; + }; + blockBluesky = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Disables bluesky using /etc/hosts file"; + }; }; }; config = lib.mkMerge [ - (lib.mkIf config.blockYoutube { + (lib.mkIf config.myModules.blockYoutube { networking.extraHosts = '' 0.0.0.0 youtube.com ::0 youtube.com @@ -32,7 +34,7 @@ ::0 www.youtube.com ''; }) - (lib.mkIf config.blockTwitter { + (lib.mkIf config.myModules.blockTwitter { networking.extraHosts = '' 0.0.0.0 twitter.com ::0 twitter.com @@ -41,7 +43,7 @@ ::0 www.twitter.com ''; }) - (lib.mkIf config.blockBluesky { + (lib.mkIf config.myModules.blockBluesky { networking.extraHosts = '' 0.0.0.0 bsky.app ::0 bsky.app diff --git a/modules/fonts.nix b/modules/fonts.nix index a8907b1..892220e 100644 --- a/modules/fonts.nix +++ b/modules/fonts.nix @@ -5,7 +5,7 @@ ... }: { options = { - enableFonts = lib.mkOption { + myModules.enableFonts = lib.mkOption { type = lib.types.bool; default = true; description = "Enable my favorite fonts"; @@ -13,7 +13,7 @@ }; config = lib.mkMerge [ - (lib.mkIf config.enableFonts { + (lib.mkIf config.myModules.enableFonts { fonts.packages = with pkgs; [ noto-fonts noto-fonts-cjk-sans diff --git a/modules/graphical-interface.nix b/modules/graphical-interface.nix index b3ef62d..fb7ed77 100644 --- a/modules/graphical-interface.nix +++ b/modules/graphical-interface.nix @@ -5,7 +5,7 @@ ... }: { options = { - enableKDE = lib.mkOption { + myModules.enableKDE = lib.mkOption { type = lib.types.bool; default = false; description = "Enable KDE Plasma Desktop Environment with my favorite packages"; @@ -13,7 +13,7 @@ }; config = lib.mkMerge [ - (lib.mkIf config.enableKDE { + (lib.mkIf config.myModules.enableKDE { # Enable the X11 windowing system. # You can disable this if you're only using the Wayland session. services.xserver.enable = true; diff --git a/modules/tailscale.nix b/modules/tailscale.nix index 0c1a9e7..0037beb 100644 --- a/modules/tailscale.nix +++ b/modules/tailscale.nix @@ -5,7 +5,7 @@ ... }: { options = { - enableTailscale = lib.mkOption { + myModules.enableTailscale = lib.mkOption { type = lib.types.bool; default = false; description = "Enable Tailscale VPN"; @@ -19,7 +19,7 @@ # and i have a laptop named tartarus config = lib.mkMerge [ - (lib.mkIf config.enableTailscale { + (lib.mkIf config.myModules.enableTailscale { services.tailscale = { enable = true; port = 51513;