Running nixos-rebuild switch
or
[root@nixos:~]# nixos-rebuild switch -I nixos-config=/etc/nixos/configuration.nix
building Nix...
building the system configuration...
[root@nixos:~]#
Does not do anything. I have created a configuration.nix using a guide but it does not work
{ modulesPath, config, pkgs, ... }:
{
imports =
[
# Include the default lxc/lxd configuration.
"${modulesPath}/virtualisation/lxc-container.nix"
# Include the container-specific autogenerated configuration.
./terminal-base.nix
#./lxd.nix - this has to be commented out from the system tarball
];
boot.isContainer = true;
# I had to suppress these units, since they do not work inside LXC
systemd.suppressedSystemUnits = [
"dev-mqueue.mount"
"sys-kernel-debug.mount"
"sys-fs-fuse-connections.mount"
];
# A few packages I like to have around
environment.systemPackages = with pkgs; [
openssh
vim
tmux
htop
binutils
man
starship
];
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
# Enable password-based SSH login for root
services.openssh = {
enable = true;
settings = {
AllowUsers = null; # everyone
PasswordAuthentication = true; # this is just a sandbox
PermitRootLogin = "yes";
};
};
# from here on it's the same as the default tarball configuration
networking = {
dhcpcd.enable = false;
useDHCP = false;
useHostResolvConf = false;
};
systemd.network = {
enable = true;
networks."50-eth0" = {
matchConfig.Name = "eth0";
networkConfig = {
DHCP = "ipv4";
IPv6AcceptRA = true;
};
linkConfig.RequiredForOnline = "routable";
};
};
system.stateVersion = "24.11"; # Did you read the comment?
}