mirror of
https://github.com/sstent/vmimages.git
synced 2025-12-06 06:01:51 +00:00
49 lines
1.3 KiB
Nix
49 lines
1.3 KiB
Nix
# This is your system's configuration file.
|
|
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
|
{
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
modulesPath,
|
|
...
|
|
}: {
|
|
# You can import other NixOS modules here
|
|
|
|
imports = [
|
|
# Include my hardware settings.
|
|
./hardware.nix
|
|
# Include static network settings.
|
|
./networking.nix
|
|
"${modulesPath}/virtualisation/hyperv-image.nix"
|
|
];
|
|
|
|
nixpkgs = {config = {allowUnfree = true;};};
|
|
|
|
nix = {
|
|
settings = {
|
|
experimental-features = "nix-command flakes";
|
|
auto-optimise-store = true;
|
|
};
|
|
};
|
|
|
|
networking.hostName = "HyperV";
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
system.stateVersion = "23.05";
|
|
|
|
mymods = {
|
|
gnome.enable = true;
|
|
user_sstent.enable = true;
|
|
sshd.enable = true;
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [22];
|
|
|
|
environment.etc."ssh/ssh_host_rsa_key".source = ./ssh/ssh_host_rsa_key;
|
|
environment.etc."ssh/ssh_host_rsa_key".mode = "0400";
|
|
environment.etc."ssh/ssh_host_rsa_key.pub".source = ./ssh/ssh_host_rsa_key.pub;
|
|
environment.etc."ssh/ssh_host_ed25519_key".source = ./ssh/ssh_host_ed25519_key;
|
|
environment.etc."ssh/ssh_host_ed25519_key".mode = "0400";
|
|
environment.etc."ssh/ssh_host_ed25519_key.pub".source = ./ssh/ssh_host_ed25519_key.pub;
|
|
}
|