From 0707552edfbf64e96589535111588499840ae154 Mon Sep 17 00:00:00 2001 From: Paul-Henri Froidmont Date: Fri, 2 Jul 2021 01:52:14 +0200 Subject: [PATCH] Remove unused old configs --- configs/home/email.nix | 30 --- configs/home/full.nix | 1 - configs/home/ubuntu-full.nix | 10 - .../ingenico-laptop-ubuntu/configuration.nix | 73 ------ hosts/ingenico-laptop-ubuntu/fonts.conf | 8 - hosts/ingenico-laptop/configuration.nix | 242 ------------------ .../hardware-configuration.nix | 31 --- hosts/work-laptop/configuration.nix | 117 --------- hosts/work-laptop/hardware-configuration.nix | 34 --- 9 files changed, 546 deletions(-) delete mode 100644 configs/home/email.nix delete mode 100644 configs/home/ubuntu-full.nix delete mode 100644 hosts/ingenico-laptop-ubuntu/configuration.nix delete mode 100644 hosts/ingenico-laptop-ubuntu/fonts.conf delete mode 100644 hosts/ingenico-laptop/configuration.nix delete mode 100644 hosts/ingenico-laptop/hardware-configuration.nix delete mode 100644 hosts/work-laptop/configuration.nix delete mode 100644 hosts/work-laptop/hardware-configuration.nix diff --git a/configs/home/email.nix b/configs/home/email.nix deleted file mode 100644 index edbe702..0000000 --- a/configs/home/email.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ config, lib, pkgs, ... }: -let - davMailArhsConf = pkgs.writeText "davmail-arhs.propertries" '' - davmail.server=true - davmail.url=https\://webmail.arhs-developments.com/owa/ - davmail.caldavPort=1080 - davmail.imapPort=1143 - davmail.ldapPort=1389 - davmail.popPort=1110 - davmail.smtpPort=1025 - davmail.disableUpdateCheck=true - ''; -in { - home.packages = with pkgs; [ - davmail - ]; - systemd.user.services = { - davmail-arhs = { - Unit = { - Description = "DavMail ARhS Exchange"; - }; - - Service = { - Type = "simple"; - RemainAfterExit = "no"; - ExecStart = "${pkgs.davmail}/bin/davmail ${davMailArhsConf}"; - }; - }; - }; -} diff --git a/configs/home/full.nix b/configs/home/full.nix index 52ae625..11a42ef 100644 --- a/configs/home/full.nix +++ b/configs/home/full.nix @@ -5,7 +5,6 @@ ./xmonad.nix ./gui.nix ./dev.nix -# ./email.nix ]; home.packages = with pkgs; [ diff --git a/configs/home/ubuntu-full.nix b/configs/home/ubuntu-full.nix deleted file mode 100644 index 4a6c17a..0000000 --- a/configs/home/ubuntu-full.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, lib, pkgs, ... }: -{ - imports = [ - ./cli.nix - ./xmonad.nix - ./gui.nix - ./dev.nix - ./email.nix - ]; -} diff --git a/hosts/ingenico-laptop-ubuntu/configuration.nix b/hosts/ingenico-laptop-ubuntu/configuration.nix deleted file mode 100644 index 5e6d24a..0000000 --- a/hosts/ingenico-laptop-ubuntu/configuration.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ 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 \"\" -A glibcLocales)/lib/locale/locale-archive"; - LOCALE_ARCHIVE_2_27 = "$(nix-build --no-out-link \"\" -A glibcLocales)/lib/locale/locale-archive"; - LOCALE_ARCHIVE = "/usr/bin/locale"; - }; - file = { - ".config/fontconfig/fonts.conf" = { - source = ./fonts.conf; - }; - }; - }; - - home.stateVersion = "20.09"; -} - diff --git a/hosts/ingenico-laptop-ubuntu/fonts.conf b/hosts/ingenico-laptop-ubuntu/fonts.conf deleted file mode 100644 index 3f16b26..0000000 --- a/hosts/ingenico-laptop-ubuntu/fonts.conf +++ /dev/null @@ -1,8 +0,0 @@ - - - - - monospace - MesloLGMDZ Nerd Font Mono - - \ No newline at end of file diff --git a/hosts/ingenico-laptop/configuration.nix b/hosts/ingenico-laptop/configuration.nix deleted file mode 100644 index 1cc940e..0000000 --- a/hosts/ingenico-laptop/configuration.nix +++ /dev/null @@ -1,242 +0,0 @@ -{ 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 = [ - - ./hardware-configuration.nix - ../../configs/system.nix - ../../configs/network.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.efi.canTouchEfiVariables = true; - boot.initrd.luks.devices = { - crypted = { - device = "/dev/disk/by-uuid/50f8d5be-eabc-4b80-a36f-b8e5646c4fc1"; - preLVM = true; - }; - }; - - boot.kernel.sysctl = { - # Turn on execshield - "kernel.exec-shield" = 1; - "kkernel.randomize_va_space" = 1; - # Enable IP spoofing protection - "net.ipv4.conf.all.rp_filter" = 1; - # Disable IP source routing - "knet.ipv4.conf.all.accept_source_route" = 0; - # Ignoring broadcasts request - "net.ipv4.icmp_echo_ignore_broadcasts" = 1; - "fnet.ipv4.icmp_ignore_bogus_error_messages" = 1; - # Make sure spoofed packets get logged - "net.ipv4.conf.all.log_martians" = 1; - # SYN flood protection - "net.ipv4.tcp_syncookies" = 1; - # Control IP packet forwarding - "net.ipv4.ip_forward" = 1; - }; - - networking = { - hostName = "enix016"; - networkmanager = { - enable = true; - dns = "dnsmasq"; - # extraConfig = '' - # rc-manager=unmanaged - # ''; - }; - }; - - #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 = { - 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 - ''; - "NetworkManager/dnsmasq.d/hosts.conf".text = '' - addn-hosts=/etc/hosts - ''; - "NetworkManager/dnsmasq.d/ingenico.conf".text = '' - server=/.its/172.21.1.131 - server=/.its/172.21.1.146 - server=/.lab.ingenico.com/172.24.15.1 - server=/.lab.ingenico.com/172.24.15.2 - server=/.sandbox.global.ingenico.com/10.138.24.53 - server=/sb.eu.ginfra.net/10.138.24.53 - ''; - "NetworkManager/dnsmasq.d/default.conf".text = '' - server=/~./1.1.1.1 - server=1.1.1.1 - server=/~./1.0.0.1 - server=1.0.0.1 - ''; - "docker/daemon.json".text = '' - { - "dns": [ - "10.138.24.53", - "172.17.0.1" - ], - "insecure-registries": [ - "docker-registry.services.lab.ingenico.com" - ] - } - ''; - "NetworkManager/dnsmasq.d/docker-bridge.conf".text = '' - interface=lo - interface=docker0 - listen-address=172.17.0.1 - ''; - }; - - hardware.bluetooth = { - enable = true; - # Enable A2DP Sink - settings = { - 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 dock"; - outputs_connected = [ "DP-1-2" ]; - configure_single = "DP-1-2"; - 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 = false; - pinentryFlavor = "gtk2"; - }; - }; - - programs = { - git = { - enable = true; - userName = "Paul-Henri Froidmont"; - userEmail = "paul-henri.froidmont@ingenico.com"; - signing = { - key = "589ECB6FAA8FF1F40E579C9E1479473F99393013"; - signByDefault = true; - }; - lfs.enable = true; - }; - gpg.enable = true; - }; - }; - # Enable touchpad support. - 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"; -} - diff --git a/hosts/ingenico-laptop/hardware-configuration.nix b/hosts/ingenico-laptop/hardware-configuration.nix deleted file mode 100644 index 504905b..0000000 --- a/hosts/ingenico-laptop/hardware-configuration.nix +++ /dev/null @@ -1,31 +0,0 @@ -# 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"; -} diff --git a/hosts/work-laptop/configuration.nix b/hosts/work-laptop/configuration.nix deleted file mode 100644 index 6f3a88c..0000000 --- a/hosts/work-laptop/configuration.nix +++ /dev/null @@ -1,117 +0,0 @@ -{ config, lib, pkgs, ... }: -{ - imports = [ - - ./hardware-configuration.nix - ../../configs/system.nix - ../../configs/network.nix - ../../configs/virtualisation.nix - ]; - - # Use older kernel thanks to Intel - boot.kernelPackages = pkgs.linuxPackages_4_19; - boot.kernelParams = [ "intel_idle.max_cstate=1" ]; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - networking = { - hostName = "froidmpa-linux"; - networkmanager.enable = true; - }; - - networking.interfaces.enp0s31f6.useDHCP = true; - networking.interfaces.wlp2s0.useDHCP = true; - - console = { - font = "Lat2-Terminus16"; - keyMap = "fr"; - }; - - i18n = { - defaultLocale = "en_US.UTF-8"; - }; - - time.timeZone = "Europe/Amsterdam"; - - environment.systemPackages = with pkgs; [ - ]; - - hardware.bluetooth = { - enable = true; - # Enable A2DP Sink - settings = { - General = { - Enable = "Source,Sink,Media,Socket"; - }; - }; - }; - hardware.pulseaudio = { - enable = true; - - # Use full build to have Bluetooth support - package = pkgs.pulseaudioFull; - }; - services.blueman.enable = true; - - home-manager.users.froidmpa = {pkgs, config, ...}: { - imports = [ - ../../configs/home/full.nix - ]; - services.network-manager-applet.enable = true; - services.blueman-applet.enable = true; - services.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"; - } - ]; - }; - }; - # Enable touchpad support. - services.xserver.libinput.enable = true; - - fileSystems."/home/froidmpa/Projectlib" = { - device = "//fs-common.aris-lux.lan/projectlib"; - fsType = "cifs"; - options = let - # this line prevents hanging on network split - automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; - in ["${automount_opts},credentials=/etc/nixos/smb-secrets"]; - }; - fileSystems."/home/froidmpa/Projectlib2" = { - device = "//fs-projects.aris-lux.lan/projectlib2"; - fsType = "cifs"; - options = let - # this line prevents hanging on network split - automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; - in ["${automount_opts},credentials=/etc/nixos/smb-secrets"]; - }; - fileSystems."/home/froidmpa/NetworkDrive" = { - device = "//fs-users.aris-lux.lan/users/froidmpa"; - fsType = "cifs"; - options = let - # this line prevents hanging on network split - automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; - in ["${automount_opts},credentials=/etc/nixos/smb-secrets"]; - }; - - system.stateVersion = "19.09"; -} - diff --git a/hosts/work-laptop/hardware-configuration.nix b/hosts/work-laptop/hardware-configuration.nix deleted file mode 100644 index e53b97f..0000000 --- a/hosts/work-laptop/hardware-configuration.nix +++ /dev/null @@ -1,34 +0,0 @@ -# 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, ... }: - -{ - imports = - [ - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/8d4daa0a-a42c-4765-aaae-a800b24aaf13"; - fsType = "ext4"; - }; - - boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/1d201869-259a-4bd3-b40a-0b19b218a65e"; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/669D-7DB4"; - fsType = "vfat"; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/78f08e5a-3ec6-4bb6-b168-d18fdf63ce2f"; } - ]; - - nix.maxJobs = lib.mkDefault 8; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; -}