nixos
This commit is contained in:
47
configuration.nix
Normal file
47
configuration.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
nix.settings.substituters =
|
||||
[
|
||||
"https://mirrors.ustc.edu.cn/nix-channels/store"
|
||||
];
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
|
||||
networking.hostName = "kami";
|
||||
|
||||
time.timeZone = "Asia/Shanghai";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
users.users.kami = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel"];
|
||||
hashedPassword = "$y$j9T$RVjZnG9S0wuu0sDCgoo2l1$TOrljjjbcxbJR/WfContG6GV1uLFvHZLxxI.hnR1AZ2";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
nano
|
||||
vim
|
||||
curl
|
||||
openssh
|
||||
htop
|
||||
git
|
||||
neofetch
|
||||
];
|
||||
|
||||
services.openssh.enable = true;
|
||||
services.openssh.settings.PasswordAuthentication = true;
|
||||
|
||||
networking.firewall.enable = false;
|
||||
|
||||
system.copySystemConfiguration = true;
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
|
||||
}
|
||||
28
hardware-configuration.nix
Normal file
28
hardware-configuration.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "ohci_pci" "ehci_pci" "ahci" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/73e7da32-81f4-43b2-b075-6687005ffdbb";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/a843cc6e-365c-4efe-aa60-059dd568d546";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
virtualisation.virtualbox.guest.enable = true;
|
||||
}
|
||||
Reference in New Issue
Block a user