formatting
This commit is contained in:
parent
dec08be98b
commit
0fb3129d03
4 changed files with 55 additions and 54 deletions
|
|
@ -17,8 +17,8 @@ in {
|
|||
nix.buildMachines = [
|
||||
{
|
||||
hostName = "192.168.0.2";
|
||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
supportedFeatures = [ "big-parallel" "kvm"];
|
||||
systems = ["x86_64-linux" "aarch64-linux"];
|
||||
supportedFeatures = ["big-parallel" "kvm"];
|
||||
sshKey = "/home/osbm/.ssh/id_ed25519";
|
||||
sshUser = "osbm";
|
||||
}
|
||||
|
|
@ -60,7 +60,6 @@ in {
|
|||
#kernel-version = "v6_10_12";
|
||||
};
|
||||
|
||||
|
||||
system.nixos.label = system-label;
|
||||
# DO NOT TOUCH THIS
|
||||
system.stateVersion = stateVersion;
|
||||
|
|
|
|||
|
|
@ -48,13 +48,13 @@ in {
|
|||
# see https://github.com/NixOS/nixpkgs/issues/91352
|
||||
systemd.services.wakeonlan = {
|
||||
description = "Reenable wake on lan every boot";
|
||||
after = [ "network.target" ];
|
||||
after = ["network.target"];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
RemainAfterExit = "true";
|
||||
ExecStart = "${pkgs.ethtool}/sbin/ethtool -s enp3s0 wol g";
|
||||
};
|
||||
wantedBy = [ "default.target" ];
|
||||
wantedBy = ["default.target"];
|
||||
};
|
||||
|
||||
hardware.nvidia-container-toolkit.enable = true;
|
||||
|
|
@ -65,7 +65,6 @@ in {
|
|||
programs.nix-required-mounts.enable = true;
|
||||
programs.nix-required-mounts.presets.nvidia-gpu.enable = true;
|
||||
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
|
|
@ -162,7 +161,6 @@ in {
|
|||
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
nix.settings.extra-platforms = config.boot.binfmt.emulatedSystems;
|
||||
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
|
|
|||
|
|
@ -1,32 +1,36 @@
|
|||
# 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 =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/fd6792b4-d1ec-493c-a686-64dbeaac3371";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/fd6792b4-d1ec-493c-a686-64dbeaac3371";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/383D-1E8A";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/383D-1E8A";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/33c6277d-eb0a-487d-8be0-829829a8a308"; }
|
||||
];
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/33c6277d-eb0a-487d-8be0-829829a8a308";}
|
||||
];
|
||||
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -1,32 +1,32 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
enableTailscale = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Tailscale VPN";
|
||||
};
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
enableTailscale = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Tailscale VPN";
|
||||
};
|
||||
};
|
||||
|
||||
# i have 4 machines, 2 of them are always at home
|
||||
# pochita (raspberry pi 5) and ymir (desktop)
|
||||
# pochita will be on all the time, ymir can be wake on lan
|
||||
# i have 4 machines, 2 of them are always at home
|
||||
# pochita (raspberry pi 5) and ymir (desktop)
|
||||
# pochita will be on all the time, ymir can be wake on lan
|
||||
|
||||
# and i have a laptop named tartarus
|
||||
# and i have a laptop named tartarus
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.enableTailscale {
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
port = 51513;
|
||||
};
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.enableTailscale {
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
port = 51513;
|
||||
};
|
||||
|
||||
networking.firewall.allowedUDPPorts = [ config.services.tailscale.port ];
|
||||
environment.systemPackages = [ pkgs.tailscale ];
|
||||
})
|
||||
];
|
||||
}
|
||||
networking.firewall.allowedUDPPorts = [config.services.tailscale.port];
|
||||
environment.systemPackages = [pkgs.tailscale];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue