commit ae63e2b509fb79c843c82f49628267bd5970def2 Author: skimrme Date: Thu Feb 19 09:58:10 2026 +0800 nixos diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..67a0cee --- /dev/null +++ b/configuration.nix @@ -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"; + +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..09321e4 --- /dev/null +++ b/hardware-configuration.nix @@ -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; +}