Update ingenico-laptop
This commit is contained in:
parent
661031a2c3
commit
1c406ebd5c
1 changed files with 77 additions and 14 deletions
|
|
@ -1,4 +1,13 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
|
||||||
|
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||||
|
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
|
||||||
|
export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||||
|
export __VK_LAYER_NV_optimus=NVIDIA_only
|
||||||
|
exec -a "$0" "$@"
|
||||||
|
'';
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
<home-manager/nixos>
|
<home-manager/nixos>
|
||||||
|
|
@ -8,6 +17,17 @@
|
||||||
../../configs/virtualisation.nix
|
../../configs/virtualisation.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
hardware.nvidia.prime = {
|
||||||
|
offload.enable = true;
|
||||||
|
|
||||||
|
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
|
||||||
|
intelBusId = "PCI:0:2:0";
|
||||||
|
|
||||||
|
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
|
||||||
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
|
};
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.initrd.luks.devices = {
|
boot.initrd.luks.devices = {
|
||||||
|
|
@ -41,10 +61,34 @@
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dns = "dnsmasq";
|
dns = "dnsmasq";
|
||||||
|
# extraConfig = ''
|
||||||
|
# rc-manager=unmanaged
|
||||||
|
# '';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.interfaces.wlp59s0.useDHCP = true;
|
#services.dnsmasq = {
|
||||||
|
# enable = true;
|
||||||
|
# servers = [
|
||||||
|
# "1.1.1.1"
|
||||||
|
# "1.0.0.1"
|
||||||
|
# "/.its/172.21.1.131"
|
||||||
|
# "/.its/172.21.1.146"
|
||||||
|
# "/.lab.ingenico.com/172.24.15.1"
|
||||||
|
# "/.lab.ingenico.com/172.24.15.2"
|
||||||
|
# "/.sandbox.global.ingenico.com/10.138.24.53"
|
||||||
|
# "/sb.eu.ginfra.net/10.138.24.53"
|
||||||
|
# ];
|
||||||
|
# extraConfig = ''
|
||||||
|
# addn-hosts=/etc/hosts
|
||||||
|
# interface=lo
|
||||||
|
# interface=docker0
|
||||||
|
# bind-dynamic
|
||||||
|
# listen-address=172.17.0.1
|
||||||
|
# '';
|
||||||
|
#};
|
||||||
|
|
||||||
|
# networking.interfaces.wlp59s0.useDHCP = true;
|
||||||
|
|
||||||
console = {
|
console = {
|
||||||
font = "Lat2-Terminus16";
|
font = "Lat2-Terminus16";
|
||||||
|
|
@ -69,10 +113,6 @@
|
||||||
insecure-ssl = 0
|
insecure-ssl = 0
|
||||||
cipher-list = HIGH:!aNULL:!kRSA:!PSK:!SRP:!MD5:!RC4
|
cipher-list = HIGH:!aNULL:!kRSA:!PSK:!SRP:!MD5:!RC4
|
||||||
'';
|
'';
|
||||||
"NetworkManager/conf.d/ingenico.conf".text = ''
|
|
||||||
[main]
|
|
||||||
dns=dnsmasq
|
|
||||||
'';
|
|
||||||
"NetworkManager/dnsmasq.d/hosts.conf".text = ''
|
"NetworkManager/dnsmasq.d/hosts.conf".text = ''
|
||||||
addn-hosts=/etc/hosts
|
addn-hosts=/etc/hosts
|
||||||
'';
|
'';
|
||||||
|
|
@ -93,6 +133,7 @@
|
||||||
"docker/daemon.json".text = ''
|
"docker/daemon.json".text = ''
|
||||||
{
|
{
|
||||||
"dns": [
|
"dns": [
|
||||||
|
"10.138.24.53",
|
||||||
"172.17.0.1"
|
"172.17.0.1"
|
||||||
],
|
],
|
||||||
"insecure-registries": [
|
"insecure-registries": [
|
||||||
|
|
@ -101,6 +142,8 @@
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
"NetworkManager/dnsmasq.d/docker-bridge.conf".text = ''
|
"NetworkManager/dnsmasq.d/docker-bridge.conf".text = ''
|
||||||
|
interface=lo
|
||||||
|
interface=docker0
|
||||||
listen-address=172.17.0.1
|
listen-address=172.17.0.1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -108,10 +151,11 @@
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# Enable A2DP Sink
|
# Enable A2DP Sink
|
||||||
extraConfig = "
|
settings = {
|
||||||
[General]
|
General = {
|
||||||
Enable=Source,Sink,Media,Socket
|
Enable = "Source,Sink,Media,Socket";
|
||||||
";
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
hardware.pulseaudio = {
|
hardware.pulseaudio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -138,6 +182,13 @@
|
||||||
primary = true;
|
primary = true;
|
||||||
atomic = true;
|
atomic = true;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "Work dock";
|
||||||
|
outputs_connected = [ "DP-1-2" ];
|
||||||
|
configure_single = "DP-1-2";
|
||||||
|
primary = true;
|
||||||
|
atomic = true;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
name = "Work USBC";
|
name = "Work USBC";
|
||||||
outputs_connected = [ "DP-1" ];
|
outputs_connected = [ "DP-1" ];
|
||||||
|
|
@ -167,6 +218,7 @@
|
||||||
key = "589ECB6FAA8FF1F40E579C9E1479473F99393013";
|
key = "589ECB6FAA8FF1F40E579C9E1479473F99393013";
|
||||||
signByDefault = true;
|
signByDefault = true;
|
||||||
};
|
};
|
||||||
|
lfs.enable = true;
|
||||||
};
|
};
|
||||||
gpg.enable = true;
|
gpg.enable = true;
|
||||||
};
|
};
|
||||||
|
|
@ -174,6 +226,17 @@
|
||||||
# Enable touchpad support.
|
# Enable touchpad support.
|
||||||
services.xserver.libinput.enable = true;
|
services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
|
services.printing.enable = true;
|
||||||
|
services.printing.drivers = [ pkgs.gutenprint ];
|
||||||
|
services.avahi.enable = true;
|
||||||
|
services.avahi.nssmdns = true;
|
||||||
|
# eid
|
||||||
|
services.pcscd.enable = true;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
eid-mw
|
||||||
|
nvidia-offload
|
||||||
|
];
|
||||||
|
|
||||||
system.stateVersion = "20.09";
|
system.stateVersion = "20.09";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue