configure laptop (thunderbolt, ip, sleep, wol)
This commit is contained in:
10
flake.nix
10
flake.nix
@@ -38,6 +38,7 @@
|
|||||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
||||||
./systems/server/configuration.nix
|
./systems/server/configuration.nix
|
||||||
### Modules ###
|
### Modules ###
|
||||||
|
./modules/static-ip.nix
|
||||||
./modules/hdd-spindown.nix
|
./modules/hdd-spindown.nix
|
||||||
./modules/minecraft-server.nix
|
./modules/minecraft-server.nix
|
||||||
./modules/motd.nix
|
./modules/motd.nix
|
||||||
@@ -83,7 +84,11 @@
|
|||||||
./laptop/configuration.nix
|
./laptop/configuration.nix
|
||||||
./modules/virt-manager.nix
|
./modules/virt-manager.nix
|
||||||
./modules/ssh.nix
|
./modules/ssh.nix
|
||||||
./modules/wake-on-lan.nix
|
#./modules/static-ip.nix
|
||||||
|
#./modules/no-sleep-lid-closed.nix
|
||||||
|
#./modules/wake-on-lan.nix
|
||||||
|
./modules/thunderbolt.nix
|
||||||
|
./modules/rdp.nix
|
||||||
nixos-hardware.nixosModules.dell-xps-15-7590-nvidia
|
nixos-hardware.nixosModules.dell-xps-15-7590-nvidia
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
@@ -102,6 +107,9 @@
|
|||||||
./modules/virt-manager.nix
|
./modules/virt-manager.nix
|
||||||
./modules/ssh.nix
|
./modules/ssh.nix
|
||||||
./modules/wake-on-lan.nix
|
./modules/wake-on-lan.nix
|
||||||
|
./modules/static-ip.nix
|
||||||
|
./modules/no-sleep-lid-closed.nix
|
||||||
|
./modules/thunderbolt.nix
|
||||||
nixos-hardware.nixosModules.dell-xps-15-7590
|
nixos-hardware.nixosModules.dell-xps-15-7590
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
|
|||||||
4
modules/no-sleep-lid-closed.nix
Normal file
4
modules/no-sleep-lid-closed.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
{
|
||||||
|
services.logind.lidSwitchExternalPower = "ignore";
|
||||||
|
}
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
|
{ config, pkgs, lib, vars, ... }:
|
||||||
|
let
|
||||||
|
wm = vars.wm;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
services.xrdp.enable = true;
|
services.xrdp.enable = true;
|
||||||
services.xrdp.defaultWindowManager = "startplasma-x11";
|
services.xrdp.defaultWindowManager = wm;
|
||||||
services.xrdp.openFirewall = true;
|
services.xrdp.openFirewall = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{ config, vars, ...}:
|
{ config, vars, ...}:
|
||||||
let
|
let
|
||||||
ip = vars.ipv4;
|
ip = vars.ipv4;
|
||||||
|
dns = vars.dns;
|
||||||
interface = vars.interface;
|
interface = vars.interface;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -12,7 +13,7 @@ in
|
|||||||
allowedUDPPorts = [ 5000 ];
|
allowedUDPPorts = [ 5000 ];
|
||||||
};
|
};
|
||||||
nameservers = [
|
nameservers = [
|
||||||
"127.0.0.1"
|
dns
|
||||||
"1.1.1.1"
|
"1.1.1.1"
|
||||||
];
|
];
|
||||||
interfaces = {
|
interfaces = {
|
||||||
7
modules/thunderbolt.nix
Normal file
7
modules/thunderbolt.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
# Always authorize thunderbolt connections when they are plugged in.
|
||||||
|
# This is to make sure the USB hub of Thunderbolt is working.
|
||||||
|
ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{authorized}=="0", ATTR{authorized}="1"
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -3,5 +3,5 @@ let
|
|||||||
interface = vars.interface;
|
interface = vars.interface;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking.interfaces.${interface}.wakeOnLan.enable;
|
networking.interfaces.${interface}.wakeOnLan.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
interface = "enp0s31f6";
|
interface = "enp10s0u1u2";
|
||||||
|
ipv4 = "192.168.0.4";
|
||||||
|
dns = "192.168.0.6";
|
||||||
|
wm = "gnome-shell";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ in{
|
|||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./static-ip.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
interface = "enp0s31f6";
|
interface = "enp0s31f6";
|
||||||
ipv4 = "192.168.0.6";
|
ipv4 = "192.168.0.6";
|
||||||
|
dns = "127.0.0.1";
|
||||||
wireguardIp = "192.168.2.1";
|
wireguardIp = "192.168.2.1";
|
||||||
|
wm = "startplasma-x11";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user