This commit is contained in:
Your Name
2025-07-18 12:33:31 +08:00
parent cab865dff3
commit f21234790e
9 changed files with 307 additions and 58 deletions
+30 -44
View File
@@ -6,22 +6,22 @@
lib,
config,
pkgs,
modulesPath,
...
}: {
# You can import other NixOS modules here
# Import modules including LXC container support
imports = [
# If you want to use modules your own flake exports (from modules/nixos):
# outputs.nixosModules.example
# Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
# You can also split up your configuration and import pieces of it here:
# ./users.nix
# Include the default lxd configuration.
"${modulesPath}/virtualisation/lxc-container.nix"
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
# Import our custom modules
outputs.nixosModules.important-defaults
outputs.nixosModules.incus
outputs.nixosModules.orbstack
outputs.nixosModules.power-user-defaults
];
nixpkgs = {
@@ -68,41 +68,27 @@
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
};
# FIXME: Add the rest of your current configuration
# User configuration
users.users.wongdingfeng = {
uid = 502;
extraGroups = [ "wheel" "orbstack" ];
# TODO: Set your hostname
networking.hostName = "your-hostname";
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
users.users = {
# FIXME: Replace with your username
your-username = {
# TODO: You can set an initial password for your user.
# If you do, you can skip setting a root password by passing '--no-root-passwd' to nixos-install.
# Be sure to change it (using passwd) after rebooting!
initialPassword = "correcthorsebatterystaple";
isNormalUser = true;
openssh.authorizedKeys.keys = [
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
];
# TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc)
extraGroups = ["wheel"];
};
# simulate isNormalUser, but with an arbitrary UID
isSystemUser = true;
group = "users";
createHome = true;
home = "/home/wongdingfeng";
homeMode = "700";
useDefaultShell = true;
};
# This setups a SSH server. Very important if you're setting up a headless system.
# Feel free to remove if you don't need it.
services.openssh = {
enable = true;
settings = {
# Opinionated: forbid root login through SSH.
PermitRootLogin = "no";
# Opinionated: use keys only.
# Remove if you want to SSH using passwords
PasswordAuthentication = false;
};
};
security.sudo.wheelNeedsPassword = false;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.05";
# This being `true` leads to a few nasty bugs, change at your own risk!
users.mutableUsers = false;
time.timeZone = "Asia/Singapore";
# System packages are now handled in power-user-defaults.nix
# environment.systemPackages is defined there with a comprehensive list
}
+1 -1
View File
@@ -8,5 +8,5 @@
};
# Set your system kind (needed for flakes)
nixpkgs.hostPlatform = "x86_64-linux";
nixpkgs.hostPlatform = "aarch64-linux";
}