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