Use NixOs on Ingenico laptop
This commit is contained in:
parent
b43c58c514
commit
d42a484f06
5 changed files with 217 additions and 65 deletions
73
hosts/ingenico-laptop-ubuntu/configuration.nix
Normal file
73
hosts/ingenico-laptop-ubuntu/configuration.nix
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../configs/home/ubuntu-full.nix
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
home.username = "froidmpa";
|
||||
home.homeDirectory = "/home/froidmpa";
|
||||
|
||||
services = {
|
||||
network-manager-applet.enable = true;
|
||||
blueman-applet.enable = true;
|
||||
grobi = {
|
||||
enable = true;
|
||||
executeAfter = ["${pkgs.systemd}/bin/systemctl --user restart stalonetray" "${pkgs.feh}/bin/feh --bg-fill ~/.wallpaper.png"];
|
||||
rules = [
|
||||
{
|
||||
name = "Work HDMI";
|
||||
outputs_connected = [ "HDMI-1" ];
|
||||
configure_single = "HDMI-1";
|
||||
primary = true;
|
||||
atomic = true;
|
||||
}
|
||||
{
|
||||
name = "Work USBC";
|
||||
outputs_connected = [ "DP-1" ];
|
||||
configure_single = "DP-1";
|
||||
primary = true;
|
||||
atomic = true;
|
||||
}
|
||||
{
|
||||
name = "Fallback";
|
||||
configure_single = "eDP-1";
|
||||
}
|
||||
];
|
||||
};
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
#pinentryFlavor = "tty";
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "Paul-Henri Froidmont";
|
||||
userEmail = "paul-henri.froidmont@ingenico.com";
|
||||
signing = {
|
||||
key = "589ECB6FAA8FF1F40E579C9E1479473F99393013";
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
gpg.enable = true;
|
||||
};
|
||||
fonts.fontconfig.enable = true;
|
||||
home = {
|
||||
sessionVariables = {
|
||||
QT_XCB_GL_INTEGRATION = "none"; # Fix "Could not initialize GLX" segfault
|
||||
LOCALE_ARCHIVE_2_11 = "$(nix-build --no-out-link \"<nixpkgs>\" -A glibcLocales)/lib/locale/locale-archive";
|
||||
LOCALE_ARCHIVE_2_27 = "$(nix-build --no-out-link \"<nixpkgs>\" -A glibcLocales)/lib/locale/locale-archive";
|
||||
LOCALE_ARCHIVE = "/usr/bin/locale";
|
||||
};
|
||||
file = {
|
||||
".config/fontconfig/fonts.conf" = {
|
||||
source = ./fonts.conf;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.stateVersion = "20.09";
|
||||
}
|
||||
|
||||
|
|
@ -1,73 +1,123 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../configs/home/ubuntu-full.nix
|
||||
<home-manager/nixos>
|
||||
./hardware-configuration.nix
|
||||
../../configs/system.nix
|
||||
../../configs/network.nix
|
||||
../../configs/virtualisation.nix
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
home.username = "froidmpa";
|
||||
home.homeDirectory = "/home/froidmpa";
|
||||
|
||||
services = {
|
||||
network-manager-applet.enable = true;
|
||||
blueman-applet.enable = true;
|
||||
grobi = {
|
||||
enable = true;
|
||||
executeAfter = ["${pkgs.systemd}/bin/systemctl --user restart stalonetray" "${pkgs.feh}/bin/feh --bg-fill ~/.wallpaper.png"];
|
||||
rules = [
|
||||
{
|
||||
name = "Work HDMI";
|
||||
outputs_connected = [ "HDMI-1" ];
|
||||
configure_single = "HDMI-1";
|
||||
primary = true;
|
||||
atomic = true;
|
||||
}
|
||||
{
|
||||
name = "Work USBC";
|
||||
outputs_connected = [ "DP-1" ];
|
||||
configure_single = "DP-1";
|
||||
primary = true;
|
||||
atomic = true;
|
||||
}
|
||||
{
|
||||
name = "Fallback";
|
||||
configure_single = "eDP-1";
|
||||
}
|
||||
];
|
||||
};
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
#pinentryFlavor = "tty";
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "Paul-Henri Froidmont";
|
||||
userEmail = "paul-henri.froidmont@ingenico.com";
|
||||
signing = {
|
||||
key = "589ECB6FAA8FF1F40E579C9E1479473F99393013";
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
gpg.enable = true;
|
||||
};
|
||||
fonts.fontconfig.enable = true;
|
||||
home = {
|
||||
sessionVariables = {
|
||||
QT_XCB_GL_INTEGRATION = "none"; # Fix "Could not initialize GLX" segfault
|
||||
LOCALE_ARCHIVE_2_11 = "$(nix-build --no-out-link \"<nixpkgs>\" -A glibcLocales)/lib/locale/locale-archive";
|
||||
LOCALE_ARCHIVE_2_27 = "$(nix-build --no-out-link \"<nixpkgs>\" -A glibcLocales)/lib/locale/locale-archive";
|
||||
LOCALE_ARCHIVE = "/usr/bin/locale";
|
||||
};
|
||||
file = {
|
||||
".config/fontconfig/fonts.conf" = {
|
||||
source = ./fonts.conf;
|
||||
};
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.initrd.luks.devices = {
|
||||
crypted = {
|
||||
device = "/dev/disk/by-uuid/50f8d5be-eabc-4b80-a36f-b8e5646c4fc1";
|
||||
preLVM = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.stateVersion = "20.09";
|
||||
networking = {
|
||||
hostName = "enix016";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
networking.interfaces.wlp59s0.useDHCP = true;
|
||||
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "fr";
|
||||
};
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
environment.etc."openfortivpn/config" = {
|
||||
text = ''
|
||||
host = devsslvpn.global.ingenico.com
|
||||
port = 443
|
||||
trusted-cert = e09de6da3902e58b9061f28e13d33088d929f3451367d21f1721a0ed6361a883
|
||||
trusted-cert = 33069b6d904330b3fde5c002ca4964b7f413003665e78963d73098fe5f6f7c05
|
||||
trusted-cert = 599dba9bee8a920836b68ca5603a11ceee5ec0450201c7a7651f5575d6bbcd3a
|
||||
set-dns = 0
|
||||
set-routes = 1
|
||||
insecure-ssl = 0
|
||||
cipher-list = HIGH:!aNULL:!kRSA:!PSK:!SRP:!MD5:!RC4
|
||||
'';
|
||||
};
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
# Enable A2DP Sink
|
||||
extraConfig = "
|
||||
[General]
|
||||
Enable=Source,Sink,Media,Socket
|
||||
";
|
||||
};
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
|
||||
# Use full build to have Bluetooth support
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
|
||||
home-manager.users.froidmpa = {pkgs, config, ...}: {
|
||||
imports = [
|
||||
../../configs/home/full.nix
|
||||
];
|
||||
services = {
|
||||
network-manager-applet.enable = true;
|
||||
blueman-applet.enable = true;
|
||||
grobi = {
|
||||
enable = true;
|
||||
executeAfter = ["${pkgs.systemd}/bin/systemctl --user restart stalonetray" "${pkgs.feh}/bin/feh --bg-fill ~/.wallpaper.png"];
|
||||
rules = [
|
||||
{
|
||||
name = "Work HDMI";
|
||||
outputs_connected = [ "HDMI-1" ];
|
||||
configure_single = "HDMI-1";
|
||||
primary = true;
|
||||
atomic = true;
|
||||
}
|
||||
{
|
||||
name = "Work USBC";
|
||||
outputs_connected = [ "DP-1" ];
|
||||
configure_single = "DP-1";
|
||||
primary = true;
|
||||
atomic = true;
|
||||
}
|
||||
{
|
||||
name = "Fallback";
|
||||
configure_single = "eDP-1";
|
||||
}
|
||||
];
|
||||
};
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
#pinentryFlavor = "tty";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "Paul-Henri Froidmont";
|
||||
userEmail = "paul-henri.froidmont@ingenico.com";
|
||||
signing = {
|
||||
key = "589ECB6FAA8FF1F40E579C9E1479473F99393013";
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
gpg.enable = true;
|
||||
};
|
||||
};
|
||||
# Enable touchpad support.
|
||||
services.xserver.libinput.enable = true;
|
||||
|
||||
system.stateVersion = "20.09";
|
||||
}
|
||||
|
||||
|
|
|
|||
31
hosts/ingenico-laptop/hardware-configuration.nix
Normal file
31
hosts/ingenico-laptop/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# 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")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/13d0d334-9ab2-4a09-adb2-857fe62582d9";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/4A68-AF52";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/9078e48a-7481-4a9f-92e6-a1f222f58ef5"; }
|
||||
];
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue