Compare commits
3 Commits
579341cb38
...
4fac466813
| Author | SHA1 | Date | |
|---|---|---|---|
| 4fac466813 | |||
| d7edba62a1 | |||
| ae63e2b509 |
@@ -1,74 +1,47 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
nix.settings.substituters =
|
nix.settings.substituters =
|
||||||
[
|
[
|
||||||
"https://mirrors.ustc.edu.cn/nix-channels/store"
|
"https://mirrors.ustc.edu.cn/nix-channels/store"
|
||||||
];
|
|
||||||
nix.settings.trusted-public-keys = [
|
|
||||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
||||||
];
|
];
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
./pkgs.configuration.nix
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.device = "/dev/sdb";
|
boot.loader.grub.device = "/dev/sda";
|
||||||
|
|
||||||
networking.hostName = "kami";
|
networking.hostName = "kami";
|
||||||
|
|
||||||
time.timeZone = "Asia/Shanghai";
|
time.timeZone = "Asia/Shanghai";
|
||||||
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
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 = {
|
users.users.kami = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "docker"];
|
extraGroups = ["wheel"];
|
||||||
hashedPassword = "$6$K3dbe2DC/9mq7Y8h$0Uy/lNwnFTHAjC61imz1wWQvDo12BUtOsgbP4vRAgN9gR.RFV8ZHw/6ns16.QO1KoXNuPxxNSoYMDk1HSYq/O/";
|
hashedPassword = "$y$j9T$RVjZnG9S0wuu0sDCgoo2l1$TOrljjjbcxbJR/WfContG6GV1uLFvHZLxxI.hnR1AZ2";
|
||||||
};
|
};
|
||||||
|
|
||||||
# environment.systemPackages = with pkgs; [
|
|
||||||
# vim
|
|
||||||
# curl
|
|
||||||
# openssh
|
|
||||||
# htop
|
|
||||||
# git
|
|
||||||
# neofetch
|
|
||||||
# ];
|
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs;
|
||||||
|
[
|
||||||
|
nano
|
||||||
|
vim
|
||||||
|
curl
|
||||||
|
openssh
|
||||||
|
htop
|
||||||
|
git
|
||||||
|
neofetch
|
||||||
|
];
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
services.openssh.settings.PasswordAuthentication = true;
|
services.openssh.settings.PasswordAuthentication = true;
|
||||||
|
|
||||||
networking.firewall.enable = false;
|
networking.firewall.enable = false;
|
||||||
|
|
||||||
system.copySystemConfiguration = true;
|
system.copySystemConfiguration = true;
|
||||||
|
|
||||||
system.stateVersion = "25.05";
|
system.stateVersion = "25.11";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,28 +4,25 @@
|
|||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ ];
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
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.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
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";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
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.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.ens3.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
virtualisation.virtualbox.guest.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
vim
|
|
||||||
curl
|
|
||||||
openssh
|
|
||||||
htop
|
|
||||||
git
|
|
||||||
neofetch
|
|
||||||
];
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user