mirror of
https://gitlab.com/ahoneybun/nix-configs.git
synced 2025-05-12 11:14:02 -06:00
Move VM system flake
This commit is contained in:
parent
e9ec1a1482
commit
a8183bb525
1 changed files with 79 additions and 0 deletions
79
systems/flake.nix
Normal file
79
systems/flake.nix
Normal file
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
description = "VM";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs: {
|
||||
nixosConfigurations = {
|
||||
"vm" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
# Import the configuration.nix we used before, so that the old configuration file can still take effect.
|
||||
# Note: /etc/nixos/configuration.nix itself is also a Nix Module, so you can import it directly here
|
||||
# ./configuration.nix
|
||||
./hardware-configuration.nix
|
||||
|
||||
({config, pkgs, ...}: {
|
||||
nix = {
|
||||
settings.auto-optimise-store = true;
|
||||
settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.consoleMode = "0";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "vm";
|
||||
|
||||
};
|
||||
|
||||
users.users.aaronh = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user.
|
||||
packages = with pkgs; [
|
||||
cargo
|
||||
git
|
||||
git-lfs
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
git-lfs
|
||||
neofetch
|
||||
tree
|
||||
wget
|
||||
];
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "no";
|
||||
};
|
||||
|
||||
system = {
|
||||
stateVersion = "23.05";
|
||||
autoUpgrade.enable = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue