diff --git a/common.nix b/common.nix new file mode 100644 index 0000000..dad503c --- /dev/null +++ b/common.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: +{ + nix.settings = { + experimental-features = [ "nix-command" "flakes" ]; + }; + + environment.systemPackages = with pkgs; [ + vim + git + ]; + + services.openssh = { + enable = true; + }; +} \ No newline at end of file diff --git a/configuration-grub.nix b/configuration-grub.nix index 64e4c44..ca8c380 100644 --- a/configuration-grub.nix +++ b/configuration-grub.nix @@ -1,5 +1,5 @@ # This is a small config that can be used to bootstrap a system with ZFS. -{ config, lib, modulesPath, ... }: +{ config, lib, modulesPath, pkgs, ... }: { imports = [ @@ -55,7 +55,4 @@ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; system.stateVersion = "24.05"; - services.openssh = { - enable = true; - }; } diff --git a/flake.nix b/flake.nix index 75bd3bc..aba1192 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,7 @@ specialArgs = { inherit inputs; }; modules = [ ./configuration-grub.nix + ./common.nix disko.nixosModules.disko (import ./disko-nixos.nix { disks = [ "/dev/nvme0n1" ]; }) ]; @@ -28,6 +29,7 @@ specialArgs = { inherit inputs; }; modules = [ ./configuration-systemd.nix + ./common.nix disko.nixosModules.disko (import ./disko-nixos.nix { disks = [ "/dev/nvme0n1" ]; }) ];