regular backup
This commit is contained in:
parent
88fb1877ea
commit
eb59759b6f
|
@ -24,8 +24,17 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader = {
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
|
grub = {
|
||||||
|
enable =true;
|
||||||
|
devices = [ "nodev" ];
|
||||||
|
efiSupport = true;
|
||||||
|
useOSProber = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# boot.loader.systemd-boot.enable = true;
|
||||||
|
# boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.hostName = "zbook"; # Define your hostname.
|
networking.hostName = "zbook"; # Define your hostname.
|
||||||
# Pick only one of the below networking options.
|
# Pick only one of the below networking options.
|
||||||
|
@ -33,7 +42,10 @@ in {
|
||||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Asia/Shanghai";
|
time = {
|
||||||
|
timeZone = "Asia/Shanghai";
|
||||||
|
hardwareClockInLocalTime = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
# Configure network proxy if necessary
|
||||||
networking.nameservers = [
|
networking.nameservers = [
|
||||||
|
@ -93,6 +105,13 @@ in {
|
||||||
};
|
};
|
||||||
# services.networking.wireless.userControlled = true;
|
# services.networking.wireless.userControlled = true;
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
|
services.earlyoom = {
|
||||||
|
enable = true;
|
||||||
|
freeMemThreshold = 3;
|
||||||
|
freeSwapThreshold = 3;
|
||||||
|
};
|
||||||
|
services.gvfs.enable = true;
|
||||||
|
services.udisks2.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -119,7 +138,7 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableOffloadCmd = true;
|
enableOffloadCmd = true;
|
||||||
};
|
};
|
||||||
amdgpuBusId = "PCI:101:0:0";
|
amdgpuBusId = "PCI:102:0:0";
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
};
|
};
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
||||||
|
@ -168,6 +187,7 @@ in {
|
||||||
"wireshark"
|
"wireshark"
|
||||||
"vboxusers"
|
"vboxusers"
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
|
"docker"
|
||||||
]; # Enable ‘sudo’ for the user.
|
]; # Enable ‘sudo’ for the user.
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
home-manager
|
home-manager
|
||||||
|
@ -199,6 +219,10 @@ in {
|
||||||
iptables
|
iptables
|
||||||
];
|
];
|
||||||
|
|
||||||
|
environment.etc."fuse.conf".text = ''
|
||||||
|
user_allow_other
|
||||||
|
'';
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
programs.mtr.enable = true;
|
programs.mtr.enable = true;
|
||||||
|
@ -230,15 +254,24 @@ in {
|
||||||
htb = { config = '' config /home/user/Downloads/starting_point_bzw.ovpn ''; };
|
htb = { config = '' config /home/user/Downloads/starting_point_bzw.ovpn ''; };
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.virtualbox = {
|
virtualisation = {
|
||||||
host = {
|
virtualbox = {
|
||||||
enable = true;
|
host = {
|
||||||
enableExtensionPack = true;
|
enable = true;
|
||||||
|
enableExtensionPack = true;
|
||||||
|
};
|
||||||
|
guest = {
|
||||||
|
enable = true;
|
||||||
|
draganddrop = true;
|
||||||
|
clipboard = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
guest = {
|
docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
draganddrop = true;
|
rootless = {
|
||||||
clipboard = true;
|
enable = true;
|
||||||
|
setSocketVariable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -278,6 +311,7 @@ in {
|
||||||
#
|
#
|
||||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||||
system.stateVersion = "24.05"; # Did you read the comment?
|
system.stateVersion = "24.05"; # Did you read the comment?
|
||||||
|
system.autoUpgrade.enable = true;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ struct range_hash {
|
||||||
template <typename T>
|
template <typename T>
|
||||||
range_hash(const T& vec) {
|
range_hash(const T& vec) {
|
||||||
hp.emplace_back();
|
hp.emplace_back();
|
||||||
hash_vec<ll> hs(vec.size());
|
hash_vec<ll> hs(vec.size() + 1);
|
||||||
for (auto&& x : vec) {
|
for (auto&& x : vec) {
|
||||||
hs.push_back(x);
|
hs.push_back(x);
|
||||||
hp.emplace_back(hs.hash());
|
hp.emplace_back(hs.hash());
|
||||||
|
|
Loading…
Reference in New Issue