diff --git a/configuration.nix b/configuration.nix index a9ba3b8..67a0cee 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,74 +1,47 @@ { config, lib, pkgs, ... }: + { nix.settings.substituters = - [ - "https://mirrors.ustc.edu.cn/nix-channels/store" - ]; - nix.settings.trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + [ + "https://mirrors.ustc.edu.cn/nix-channels/store" ]; imports = [ - ./pkgs.configuration.nix ./hardware-configuration.nix ]; boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/sdb"; - + boot.loader.grub.device = "/dev/sda"; + networking.hostName = "kami"; - + time.timeZone = "Asia/Shanghai"; - i18n.defaultLocale = "en_US.UTF-8"; - - systemd.tmpfiles.rules = [ - "d /docker-compose 0755 root root -" - "d /docker-compose/docker-root 0755 root root -" - ]; - - virtualisation.docker.enable = true; - - virtualisation.docker.daemon.settings = { - registry-mirrors = [ - "https://docker.m.daocloud.io" - "https://docker.1panel.live" - "https://hub.rat.dev" - "https://registry.docker.jp" - "https://kr.registry.ktcloud.com" - "https://docker.sg.mirror" - "https://my.mirror.docker.io" - "https://dockerhub.mirror.tw" - "https://docker.1ms.run" - ]; - - data-root = "/docker-compose/docker-root"; - }; - + users.users.kami = { - isNormalUser = true; - extraGroups = [ "wheel" "docker"]; - hashedPassword = "$6$K3dbe2DC/9mq7Y8h$0Uy/lNwnFTHAjC61imz1wWQvDo12BUtOsgbP4vRAgN9gR.RFV8ZHw/6ns16.QO1KoXNuPxxNSoYMDk1HSYq/O/"; - }; - - # environment.systemPackages = with pkgs; [ - # vim - # curl - # openssh - # htop - # git - # neofetch - # ]; + 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.05"; + + system.stateVersion = "25.11"; } - - diff --git a/hardware-configuration.nix b/hardware-configuration.nix index f053870..09321e4 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -4,28 +4,25 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; + imports = [ ]; - boot.initrd.availableKernelModules = [ "ata_piix" "floppy" "sd_mod" "sr_mod" ]; + 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/e711aad0-33cb-4635-be8c-f06e49889419"; + { 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 = [ ]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.ens3.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + virtualisation.virtualbox.guest.enable = true; } diff --git a/pkgs.configuration.nix b/pkgs.configuration.nix deleted file mode 100644 index e910e2d..0000000 --- a/pkgs.configuration.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, pkgs, ... }: - -{ -environment.systemPackages = with pkgs; [ - vim - curl - openssh - htop - git - neofetch -]; -}