diff --git a/hosts/sakotop/configuration.nix b/hosts/sakotop/configuration.nix index 5638fe98..8c6d06e5 100644 --- a/hosts/sakotop/configuration.nix +++ b/hosts/sakotop/configuration.nix @@ -8,6 +8,7 @@ ./hardware-configuration.nix ../../default.nix ]; + # required for hostname specific configurations networking.hostName = "sakotop"; # Define your hostname. @@ -39,6 +40,10 @@ editors = { nvim.enable = true; }; + cc.enable = true; + javascript.enable = true; + python.enable = true; + rust.enable = true; }; shell = { nix = { @@ -63,13 +68,6 @@ isNormalUser = true; extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. packages = with pkgs; [ - gcc - python3 - python310Packages.pip - rustup - cargo - nodejs - yarn newsboat ]; }; diff --git a/modules/dev/cc.nix b/modules/dev/cc.nix new file mode 100644 index 00000000..db781fae --- /dev/null +++ b/modules/dev/cc.nix @@ -0,0 +1,20 @@ +{ outputs, options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.dev.cc; +in +{ + options.modules.dev.cc = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + users.users.sako.packages = with pkgs; [ + gcc + gnumake + cmake + clang + gdb + ]; + }; +} diff --git a/modules/dev/default.nix b/modules/dev/default.nix index 1aa46afa..146c16a3 100644 --- a/modules/dev/default.nix +++ b/modules/dev/default.nix @@ -1,5 +1,9 @@ { imports = [ ./editors + ./cc.nix + ./javascript.nix + ./python.nix + ./rust.nix ]; } diff --git a/modules/dev/javascript.nix b/modules/dev/javascript.nix new file mode 100644 index 00000000..1b0eb4e9 --- /dev/null +++ b/modules/dev/javascript.nix @@ -0,0 +1,17 @@ +{ outputs, options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.dev.javascript; +in +{ + options.modules.dev.javascript = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + users.users.sako.packages = with pkgs; [ + nodejs + yarn + ]; + }; +} diff --git a/modules/dev/python.nix b/modules/dev/python.nix new file mode 100644 index 00000000..927c7992 --- /dev/null +++ b/modules/dev/python.nix @@ -0,0 +1,17 @@ +{ outputs, options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.dev.python; +in +{ + options.modules.dev.python = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + users.users.sako.packages = with pkgs; [ + python3 + python310Packages.pip + ]; + }; +} diff --git a/modules/dev/rust.nix b/modules/dev/rust.nix new file mode 100644 index 00000000..dceca5d6 --- /dev/null +++ b/modules/dev/rust.nix @@ -0,0 +1,17 @@ +{ outputs, options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.dev.rust; +in +{ + options.modules.dev.rust= { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + users.users.sako.packages = with pkgs; [ + rustup + cargo + ]; + }; +}