From e13ad6a8ee09c27d96a42062ae1db5e0a83a185b Mon Sep 17 00:00:00 2001 From: martyTF Date: Thu, 18 Dec 2025 11:47:21 +0100 Subject: [PATCH] toggle physics --- configuration.nix | 4 +- flake.nix | 9 ++-- .../marty-latitude.nix | 2 +- marty-pc.nix => hosts/marty-pc.nix | 2 +- marty-server.nix => hosts/marty-server.nix | 2 +- imports.nix | 15 ------ .../{import_development.nix => default.nix} | 4 ++ modules/development/git.nix | 46 ++++++++--------- modules/development/vscodium.nix | 49 +++++++++---------- modules/home.nix | 1 + modules/import_modules.nix | 13 ----- modules/window_manager/bar.nix | 22 ++++----- modules/window_manager/window_manager.nix | 22 ++++----- 13 files changed, 79 insertions(+), 112 deletions(-) rename marty-latitude.nix => hosts/marty-latitude.nix (97%) rename marty-pc.nix => hosts/marty-pc.nix (96%) rename marty-server.nix => hosts/marty-server.nix (96%) delete mode 100644 imports.nix rename modules/development/{import_development.nix => default.nix} (55%) delete mode 100644 modules/import_modules.nix diff --git a/configuration.nix b/configuration.nix index 4fec599..33433b6 100644 --- a/configuration.nix +++ b/configuration.nix @@ -16,7 +16,9 @@ ]; imports = [ # Include the results of the hardware scan. - ./imports.nix + ./system/import_system.nix + ./user/marty.nix + ]; # programs.walker.enable = true; diff --git a/flake.nix b/flake.nix index 6e0a573..05cda12 100644 --- a/flake.nix +++ b/flake.nix @@ -31,9 +31,8 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ - ./marty-pc.nix + ./hosts/marty-pc.nix ./configuration.nix - ./user/marty.nix home-manager.nixosModules.home-manager ]; }; @@ -41,9 +40,8 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ - ./marty-server.nix + ./hosts/marty-server.nix ./configuration.nix - ./user/marty.nix home-manager.nixosModules.home-manager ]; @@ -52,9 +50,8 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ - ./marty-latitude.nix + ./hosts/marty-latitude.nix ./configuration.nix - ./user/marty.nix home-manager.nixosModules.home-manager ]; }; diff --git a/marty-latitude.nix b/hosts/marty-latitude.nix similarity index 97% rename from marty-latitude.nix rename to hosts/marty-latitude.nix index 1c21454..6ae4789 100644 --- a/marty-latitude.nix +++ b/hosts/marty-latitude.nix @@ -19,7 +19,7 @@ useUserPackages = true; users = { - marty = import ./modules/home.nix; + marty = import ./../modules/home.nix; }; }; diff --git a/marty-pc.nix b/hosts/marty-pc.nix similarity index 96% rename from marty-pc.nix rename to hosts/marty-pc.nix index 416c854..dea9d14 100644 --- a/marty-pc.nix +++ b/hosts/marty-pc.nix @@ -26,7 +26,7 @@ useGlobalPkgs = true; useUserPackages = true; users = { - marty = import ./modules/home.nix; + marty = import ./../modules/home.nix; }; }; diff --git a/marty-server.nix b/hosts/marty-server.nix similarity index 96% rename from marty-server.nix rename to hosts/marty-server.nix index 2152fdd..2b08512 100644 --- a/marty-server.nix +++ b/hosts/marty-server.nix @@ -26,7 +26,7 @@ useGlobalPkgs = true; useUserPackages = true; users = { - marty = import ./modules/home.nix; + marty = import ./../modules/home.nix; }; }; diff --git a/imports.nix b/imports.nix deleted file mode 100644 index 7e6e1a1..0000000 --- a/imports.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - config, - lib, - pkgs, - inputs, - ... -}: - -{ - imports = [ - ./system/import_system.nix - ./modules/import_modules.nix - - ]; -} diff --git a/modules/development/import_development.nix b/modules/development/default.nix similarity index 55% rename from modules/development/import_development.nix rename to modules/development/default.nix index 34c5a08..e17afa2 100644 --- a/modules/development/import_development.nix +++ b/modules/development/default.nix @@ -6,6 +6,10 @@ }: { + development = { + vscodium.enable = true; + git.enable = true; + }; imports = [ ./git.nix ./vscodium.nix diff --git a/modules/development/git.nix b/modules/development/git.nix index ba9ad4c..b9511f7 100644 --- a/modules/development/git.nix +++ b/modules/development/git.nix @@ -4,34 +4,30 @@ pkgs, ... }: -let - enable_git = - if config.networking.hostName == "marty-pc" then - true - else if config.networking.hostName == "marty-latitude" then - true - else if config.networking.hostName == "marty-server" then - true - else - false; -in { - programs = { - git = { - enable = enable_git; - config = { - init = { - defaultBranch = "main"; + options = { + development = { + git.enable = lib.mkEnableOption "enable git"; + }; + }; + + config = lib.mkIf config.development.git.enable { + programs = { + git = { + enable = true; + settings = { + init = { + defaultBranch = "main"; + }; + user = { + email = "marty@marty.tf"; + name = "marty"; + }; + push = { + autoSetupRemote = true; + }; }; - user = { - email = "marty@marty.tf"; - name = "marty"; - }; - push = { - autoSetupRemote = true; - }; - credential.helper = "libsecret"; }; }; }; diff --git a/modules/development/vscodium.nix b/modules/development/vscodium.nix index 9095356..ae67c51 100644 --- a/modules/development/vscodium.nix +++ b/modules/development/vscodium.nix @@ -5,33 +5,28 @@ ... }: -let - enable_vscodium = - if config.networking.hostName == "marty-pc" then - true - else if config.networking.hostName == "marty-latitude" then - true - else if config.networking.hostName == "marty-server" then - false - else - false; -in - { - programs.vscode = { - enable = enable_vscodium; - package = pkgs.vscodium; - defaultEditor = enable_vscodium; - extensions = with pkgs.vscode-extensions; [ - catppuccin.catppuccin-vsc - catppuccin.catppuccin-vsc-icons - jnoortheen.nix-ide - alefragnani.project-manager - naumovs.color-highlight - geequlim.godot-tools - stylelint.vscode-stylelint - ecmel.vscode-html-css - esbenp.prettier-vscode - ]; + options = { + development = { + vscodium.enable = lib.mkEnableOption "enable vscodium"; + }; + }; + + config = lib.mkIf config.development.vscodium.enable { + programs.vscode = { + enable = true; + package = pkgs.vscodium; + profiles.default.extensions = with pkgs.vscode-extensions; [ + catppuccin.catppuccin-vsc + catppuccin.catppuccin-vsc-icons + jnoortheen.nix-ide + alefragnani.project-manager + naumovs.color-highlight + geequlim.godot-tools + stylelint.vscode-stylelint + ecmel.vscode-html-css + esbenp.prettier-vscode + ]; + }; }; } diff --git a/modules/home.nix b/modules/home.nix index ab34a71..d8c1656 100644 --- a/modules/home.nix +++ b/modules/home.nix @@ -83,6 +83,7 @@ imports = [ ./window_manager + ./development inputs.walker.homeManagerModules.default ]; diff --git a/modules/import_modules.nix b/modules/import_modules.nix deleted file mode 100644 index 012425b..0000000 --- a/modules/import_modules.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: - -{ - imports = [ - ./development/import_development.nix - - ]; -} diff --git a/modules/window_manager/bar.nix b/modules/window_manager/bar.nix index 158d934..f29a875 100644 --- a/modules/window_manager/bar.nix +++ b/modules/window_manager/bar.nix @@ -5,17 +5,17 @@ ... }: -# let -# enable_waybar = -# if config.networking.hostName == "marty-pc" then -# true -# else if config.networking.hostName == "marty-latitude" then -# true -# else if config.networking.hostName == "marty-server" then -# false -# else -# false; -# in +let + enable_waybar = + if config.networking.hostName == "marty-pc" then + true + else if config.networking.hostName == "marty-latitude" then + true + else if config.networking.hostName == "marty-server" then + false + else + false; +in { programs = { diff --git a/modules/window_manager/window_manager.nix b/modules/window_manager/window_manager.nix index dfe17a4..db26c66 100644 --- a/modules/window_manager/window_manager.nix +++ b/modules/window_manager/window_manager.nix @@ -5,17 +5,17 @@ ... }: -# let -# enable_hyprland = -# if config.networking.hostName == "marty-pc" then -# true -# else if config.networking.hostName == "marty-latitude" then -# true -# else if config.networking.hostName == "marty-server" then -# false -# else -# false; -# in +let + enable_hyprland = + if config.networking.hostName == "marty-pc" then + true + else if config.networking.hostName == "marty-latitude" then + true + else if config.networking.hostName == "marty-server" then + false + else + false; +in { xdg.portal = {