diff --git a/default.nix b/default.nix index 066d5143..2b501d70 100755 --- a/default.nix +++ b/default.nix @@ -20,6 +20,8 @@ device: username: /etc/nixos/cachix.nix ] else []) ++ (if builtins.pathExists(/etc/nixos/hardware-configuration.nix) then [ /etc/nixos/hardware-configuration.nix + ] else []) ++ (if builtins.pathExists(/mnt/etc/nixos/hardware-configuration.nix) then [ + /mnt/etc/nixos/hardware-configuration.nix ] else []); # GARBAGE DAY! diff --git a/hosts/zilch/hardware-configuration.nix b/hosts/hardware-configuration.nix similarity index 100% rename from hosts/zilch/hardware-configuration.nix rename to hosts/hardware-configuration.nix diff --git a/hosts/zilch/default.nix b/hosts/zilch/default.nix index be7a817b..aa5d1cf2 100755 --- a/hosts/zilch/default.nix +++ b/hosts/zilch/default.nix @@ -3,10 +3,6 @@ { config, pkgs, lib, ... }: { - imports = [ - ./hardware-configuration.nix - ]; - nixpkgs.overlays = import ./modules/overlays.nix; # Use the systemd-boot EFI boot loader. @@ -106,6 +102,7 @@ default = "nvim"; emacs.enable = true; neovim.enable = true; + vscode.enable = true; }; services = { diff --git a/modules/desktop/cad.nix b/modules/desktop/cad.nix index d1d4d9a9..12003df4 100755 --- a/modules/desktop/cad.nix +++ b/modules/desktop/cad.nix @@ -1,21 +1,20 @@ -# Even if my designs are computer-aided, it's still horrible. +# Even if my designs are computer-aided, it's still horrible. :( { config, options, lib, pkgs, ... }: with lib; - -let - cfg = config.modules.desktop.music; -in { - options.modules.desktop.music = { +{ + options.modules.desktop.cad = { enable = mkOption { type = types.bool; default = false; }; }; - config = { + config = mkIf config.modules.desktop.cad.enable { my.packages = with pkgs; [ freecad # FREE AS A BIRD, FREE AS A ALL-YOU-CAN-EAT BUFFER! + kicad # The CAD for ki which is a form of energy found everywhere. leocad # A CAD for leos, a well-known brand of toys. + ]; }; } diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index d404a2ed..92eaa330 100755 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -10,5 +10,6 @@ ./graphics.nix ./multimedia.nix ./music.nix + ./research.nix ]; } diff --git a/modules/desktop/research.nix b/modules/desktop/research.nix new file mode 100755 index 00000000..cb27b5d1 --- /dev/null +++ b/modules/desktop/research.nix @@ -0,0 +1,19 @@ +# I'm not in academia but I like managing my library resources. +{ config, options, lib, pkgs, ... }: + +with lib; +{ + options.modules.desktop.research = { + enable = mkOption { + type = types.bool; + default = false; + }; + }; + + config = mkIf config.modules.desktop.research.enable { + my.packages = with pkgs; [ + exiftool # A file metadata reader/writer/helicopter. + zotero # An academic's best friend. + ]; + }; +} diff --git a/modules/editors/default.nix b/modules/editors/default.nix index 9da08434..d66498f1 100755 --- a/modules/editors/default.nix +++ b/modules/editors/default.nix @@ -8,6 +8,7 @@ with lib; imports = [ ./emacs.nix ./neovim.nix + ./vscode.nix ]; options.modules.editors = { diff --git a/modules/editors/vscode.nix b/modules/editors/vscode.nix new file mode 100644 index 00000000..523f0fa3 --- /dev/null +++ b/modules/editors/vscode.nix @@ -0,0 +1,93 @@ +# Visual Studio but for codes... +{ config, options, lib, pkgs, ... }: + +with lib; +let + extensions = (with pkgs.vscode-extensions; [ + bbenoist.Nix + ms-python.python + ms-azuretools.vscode-docker + ms-vscode-remote.remote-ssh + ]) ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ + # Edit muh readable text documents that can convert into multiple formats. + { + name = "asciidoctor-vscode"; + publisher = "asciidoctor"; + version = "2.8.3"; + sha256 = "1jh28qqa0qcycmj3h69dxg49l6zka5yb1vsdqyzc9cqnf8m6ps2a"; + } + + # Your favorite programming language for a game of barnyard darts. + { + name = "dart-code"; + publisher = "Dart-Code"; + version = "3.13.2"; + sha256 = "05pyqijwkqby4q9izkddkrhlfd0jhdc1xqdf6342l1r7p8bwyqyr"; + } + + # RULES RULE, INCONSISTENCY DROOLS! + { + name = "EditorConfig"; + publisher = "EditorConfig"; + version = "0.15.1"; + sha256 = "18r19dn1an81l2nw1h8iwh9x3sy71d4ab0s5fvng5y7dcg32zajd"; + } + + # Flutter like a butter, sting like a b. + { + name = "flutter"; + publisher = "Dart-Code"; + version = "3.13.2"; + sha256 = "1jpb01a3fazwi89b2f59sm8sbzbfaawdxaais53dsay1wbg5hncz"; + } + + # Muh consistent theming. + { + name = "nord-visual-studio-code"; + publisher = "arcticicestudio"; + version = "0.14.0"; + sha256 = "0ni924bm62awk9p39cf297kximy6xldhjjjycswx4qg2w89b505x"; + } + + # Will that make me pretty? + { + name = "prettier-vscode"; + publisher = "esbenp"; + version = "5.5.0"; + sha256 = "0hw68s85w3aqaslzfcbsfskng8i0bvfnmbwk11ldrpdmafk693nc"; + } + + # Edit the remote daemon in you. + { + name = "remote-ssh-edit"; + publisher = "ms-vscode-remote"; + version = "0.47.2"; + sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g"; + } + + # Muh consistent icons. + { + name = "material-icon-theme"; + publisher = "PKief"; + version = "4.2.0"; + sha256 = "1in8lj5gim3jdy33harib9z8qayp5jn8pz6j0zpicbzxx87g2hm1"; + } + ]; + vscode-with-extensions = pkgs.vscode-with-extensions.override { + vscodeExtensions = extensions; + }; +in +{ + options.modules.editors.vscode = { + enable = mkOption { + type = types.bool; + default = false; + }; + }; + + config = mkIf config.modules.editors.vscode.enable { + my.packages = [ + vscode-with-extensions + ]; + }; +}