From 88dba04cd410e68f0f9ae2c4db03b9febfb0bdd2 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Sun, 3 Sep 2023 01:19:20 +0200 Subject: [PATCH] Code correction in Kanshi nix file --- hosts/lucy/hardware-configuration.nix | 54 +++++++++++++++++++++++++++ modules/home/desktop/sway/kanshi.nix | 6 +-- 2 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 hosts/lucy/hardware-configuration.nix diff --git a/hosts/lucy/hardware-configuration.nix b/hosts/lucy/hardware-configuration.nix new file mode 100644 index 0000000..5b5fb11 --- /dev/null +++ b/hosts/lucy/hardware-configuration.nix @@ -0,0 +1,54 @@ +# 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" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" "i915" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" "i915" ]; + boot.extraModulePackages = [ ]; + + boot.initrd.luks.devices."nixos".device = "/dev/disk/by-uuid/ee06e049-e738-4f1f-84ab-e8066e0f1640"; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/97c3403a-fdad-4dc8-a103-a666d5fd8d6c"; + fsType = "btrfs"; + options = [ "subvol=root" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/97c3403a-fdad-4dc8-a103-a666d5fd8d6c"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/97c3403a-fdad-4dc8-a103-a666d5fd8d6c"; + fsType = "btrfs"; + options = [ "subvol=nix" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/B77A-53B1"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # 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 + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/home/desktop/sway/kanshi.nix b/modules/home/desktop/sway/kanshi.nix index cf6ef7a..00d29fa 100644 --- a/modules/home/desktop/sway/kanshi.nix +++ b/modules/home/desktop/sway/kanshi.nix @@ -1,5 +1,5 @@ _: { - service.kanshi = { + services.kanshi = { enable = true; profiles = { home = { @@ -8,14 +8,14 @@ _: { criteria = "Iiyama North America PL2792UH 1166310803122"; mode = "3840x2160"; position = "0,0"; - scale = 2; + scale = 2.0; } { criteria = "Iiyama North America PL2792UH 1176923201598"; mode = "3840x2160"; position = "1920,0"; transform = "270"; - scale = "2"; + scale = 2.0; } { criteria = "eDP-1";