From ae63e2b509fb79c843c82f49628267bd5970def2 Mon Sep 17 00:00:00 2001 From: skimrme Date: Thu, 19 Feb 2026 09:58:10 +0800 Subject: [PATCH 1/2] nixos --- configuration.nix | 47 ++++++++++++++++++++++++++++++++++++++ hardware-configuration.nix | 28 +++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 configuration.nix create mode 100644 hardware-configuration.nix 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; +} From d7edba62a13717608e96f8f26ebdc5c30e16db7b Mon Sep 17 00:00:00 2001 From: skimrme Date: Thu, 19 Feb 2026 10:03:42 +0800 Subject: [PATCH 2/2] add LICENSE and README.md --- LICENSE | 18 ++++++++++++++++++ README.md | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1973220 --- /dev/null +++ b/LICENSE @@ -0,0 +1,18 @@ +MIT License + +Copyright (c) 2025 skimrme + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO +EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..6e2f0ed --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# nixos + +nixos \ No newline at end of file