feat: Added formatter to default template.

This commit is contained in:
Spencer Brower
2022-09-02 15:53:16 -04:00
parent a2dee1af8b
commit ad596709a7
2 changed files with 26 additions and 18 deletions

View File

@@ -25,8 +25,8 @@ Vagrant.configure("2") do |config|
end end
config.vm.provision "shell", inline: <<-SHELL config.vm.provision "shell", inline: <<-SHELL
# nix develop 'nixpkgs#git' --command "sudo nixos-rebuild switch --flake /vagrant" # nix develop 'nixpkgs#git' --command "sudo nixos-rebuild switch --flake /vagrant#vagrant"
nix-shell -p git --command "sudo nixos-rebuild switch --flake /vagrant" nix-shell -p git --command "sudo nixos-rebuild switch --flake /vagrant#vagrant"
SHELL SHELL
end end

View File

@@ -2,25 +2,33 @@
description = "A very basic flake"; description = "A very basic flake";
inputs = { inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/22.05";
sbrow.url = "github:sbrow/nix"; sbrow.url = "github:sbrow/nix";
flake-utils.url = "github:numtide/flake-utils";
}; };
outputs = { self, nixpkgs, sbrow }: { outputs = { self, nixpkgs, sbrow }:
nixosModules.default = { config, nixpkgs, ... }: { flake-utils.lib.eachSystem flake-utils.lib.allSystems
config = { (system: {
environment.systemPackages = with nixpkgs; [ git ]; formatter = nixpkgs.legacyPackages.${system}.nixpkgs-fmt;
/* Your config here */ }) // {
nixosModules.default = { config, nixpkgs, ... }: {
config = {
environment.systemPackages = with nixpkgs; [ git ];
/* Your config here */
};
};
# A Vagrant box for testing
nixosConfigurations.vagrant = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(nixpkgs + "/nixos/modules/virtualisation/virtualbox-image.nix")
sbrow.nixosModules.vagrant
self.nixosModules.default
];
}; };
}; };
# A Vagrant box for testing
nixosConfigurations.vagrant = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(nixpkgs + "/nixos/modules/virtualisation/virtualbox-image.nix")
sbrow.nixosModules.vagrant
self.nixosModules.default
];
};
};
} }