diff --git a/flake.lock b/flake.lock index f3171b0..df205b6 100644 --- a/flake.lock +++ b/flake.lock @@ -21,16 +21,17 @@ "base16-fish": { "flake": false, "locked": { - "lastModified": 1622559957, - "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "lastModified": 1754405784, + "narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=", "owner": "tomyun", "repo": "base16-fish", - "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", "type": "github" }, "original": { "owner": "tomyun", "repo": "base16-fish", + "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", "type": "github" } }, @@ -67,6 +68,52 @@ "type": "github" } }, + "blueprint": { + "inputs": { + "nixpkgs": [ + "nixos-facter", + "nixpkgs" + ], + "systems": [ + "nixos-facter", + "systems" + ] + }, + "locked": { + "lastModified": 1761645416, + "narHash": "sha256-wTQzbbQ6XHtvNJVuhJj+ytZDRyNtwUKbrIfIvMvKNfQ=", + "owner": "numtide", + "repo": "blueprint", + "rev": "633af1961cae8e02bc6195e6e599a6b09bf75217", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "blueprint", + "type": "github" + } + }, + "disko": { + "inputs": { + "nixpkgs": [ + "nixos-facter", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1762276996, + "narHash": "sha256-TtcPgPmp2f0FAnc+DMEw4ardEgv1SGNR3/WFGH0N19M=", + "owner": "nix-community", + "repo": "disko", + "rev": "af087d076d3860760b3323f6b583f4d828c1ac17", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "disko", + "type": "github" + } + }, "firefox-gnome-theme": { "flake": false, "locked": { @@ -88,11 +135,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1756770412, - "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", + "lastModified": 1762440070, + "narHash": "sha256-xxdepIcb39UJ94+YydGP221rjnpkDZUlykKuF54PsqI=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "4524271976b625a4a605beefd893f270620fd751", + "rev": "26d05891e14c88eb4a5d5bee659c0db5afb609d8", "type": "github" }, "original": { @@ -101,24 +148,24 @@ "type": "github" } }, - "flake-parts_2": { + "flake-utils": { "inputs": { - "nixpkgs-lib": [ - "stylix", - "nixpkgs" + "systems": [ + "nixos-facter", + "systems" ] }, "locked": { - "lastModified": 1756770412, - "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "4524271976b625a4a605beefd893f270620fd751", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { - "owner": "hercules-ci", - "repo": "flake-parts", + "owner": "numtide", + "repo": "flake-utils", "type": "github" } }, @@ -162,11 +209,11 @@ ] }, "locked": { - "lastModified": 1759106866, - "narHash": "sha256-GjLvAl7qxGxKtop6ghasxjQ1biTT7pA+WU45byzMl/4=", + "lastModified": 1762787259, + "narHash": "sha256-t2U/GLLXHa2+kJkwnFNRVc2fEJ/lUfyZXBE5iKzJdcs=", "owner": "nix-community", "repo": "home-manager", - "rev": "619ae569293b6427d23cce4854eb4f3c33af3eec", + "rev": "37a3d97f2873e0f68711117c34d04b7c7ead8f4e", "type": "github" }, "original": { @@ -175,28 +222,83 @@ "type": "github" } }, - "nixos-hardware": { + "hwinfo": { + "inputs": { + "blueprint": [ + "nixos-facter", + "blueprint" + ], + "nixpkgs": [ + "nixos-facter", + "nixpkgs" + ], + "systems": [ + "nixos-facter", + "systems" + ] + }, "locked": { - "lastModified": 1758663926, - "narHash": "sha256-6CFdj7Xs616t1W4jLDH7IohAAvl5Dyib3qEv/Uqw1rk=", - "owner": "NixOS", - "repo": "nixos-hardware", - "rev": "170ff93c860b2a9868ed1e1102d4e52cb3d934e1", + "lastModified": 1762279079, + "narHash": "sha256-GL3fNCSaU45fNihEksgtPtbuLkc+tVGXtPH05wbrHwI=", + "owner": "numtide", + "repo": "hwinfo", + "rev": "bfeab0b4e38b200c7a62a44d4d01601a86fe1091", "type": "github" }, "original": { - "owner": "NixOS", - "repo": "nixos-hardware", + "owner": "numtide", + "repo": "hwinfo", + "type": "github" + } + }, + "nixos-facter": { + "inputs": { + "blueprint": "blueprint", + "disko": "disko", + "flake-utils": "flake-utils", + "hwinfo": "hwinfo", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1762744937, + "narHash": "sha256-37twpZntKS1NOPDSULAyaUPMCyrvw2vhcyYd1bMT40E=", + "owner": "nix-community", + "repo": "nixos-facter", + "rev": "bfc460a1df6056f97152252bc45c3668b584e068", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-facter", + "type": "github" + } + }, + "nixos-facter-modules": { + "locked": { + "lastModified": 1762264948, + "narHash": "sha256-iaRf6n0KPl9hndnIft3blm1YTAyxSREV1oX0MFZ6Tk4=", + "owner": "nix-community", + "repo": "nixos-facter-modules", + "rev": "fa695bff9ec37fd5bbd7ee3181dbeb5f97f53c96", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-facter-modules", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1758690382, - "narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=", + "lastModified": 1762596750, + "narHash": "sha256-rXXuz51Bq7DHBlfIjN7jO8Bu3du5TV+3DSADBX7/9YQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e643668fd71b949c53f8626614b21ff71a07379d", + "rev": "b6a8526db03f735b89dd5ff348f53f752e7ddc8e", "type": "github" }, "original": { @@ -208,11 +310,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1754788789, - "narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=", + "lastModified": 1761765539, + "narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "a73b9c743612e4244d865a2fdee11865283c04e6", + "rev": "719359f4562934ae99f5443f20aa06c2ffff91fc", "type": "github" }, "original": { @@ -250,7 +352,8 @@ "inputs": { "flake-parts": "flake-parts", "home-manager": "home-manager", - "nixos-hardware": "nixos-hardware", + "nixos-facter": "nixos-facter", + "nixos-facter-modules": "nixos-facter-modules", "nixpkgs": "nixpkgs", "stylix": "stylix" } @@ -262,13 +365,15 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": "flake-parts_2", + "flake-parts": [ + "flake-parts" + ], "gnome-shell": "gnome-shell", "nixpkgs": [ "nixpkgs" ], "nur": "nur", - "systems": "systems", + "systems": "systems_2", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -276,11 +381,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1759069666, - "narHash": "sha256-/oVAVpL4xxR4KG4MlFspi8fiP9wEaSs+zqHkD2tw17g=", + "lastModified": 1762264356, + "narHash": "sha256-QVfC53Ri+8n3e7Ujx9kq6all3+TLBRRPRnc6No5qY5w=", "owner": "nix-community", "repo": "stylix", - "rev": "f23b6c30cc002786a22998caf15312ea01c20654", + "rev": "647bb8dd96a206a1b79c4fd714affc88b409e10b", "type": "github" }, "original": { @@ -304,6 +409,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { @@ -384,6 +504,27 @@ "repo": "base16-zed", "type": "github" } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixos-facter", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1762410071, + "narHash": "sha256-aF5fvoZeoXNPxT0bejFUBXeUjXfHLSL7g+mjR/p5TEg=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "97a30861b13c3731a84e09405414398fbf3e109f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 02322a6..a51c0ed 100644 --- a/flake.nix +++ b/flake.nix @@ -5,16 +5,25 @@ home-manager = { url = "github:nix-community/home-manager"; + + inputs.nixpkgs.follows = "nixpkgs"; + }; + + nixos-facter = { + url = "github:nix-community/nixos-facter"; + inputs.nixpkgs.follows = "nixpkgs"; }; - nixos-hardware = { - url = "github:NixOS/nixos-hardware"; + nixos-facter-modules = { + url = "github:nix-community/nixos-facter-modules"; }; stylix = { url = "github:nix-community/stylix"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-parts.follows = "flake-parts"; }; }; diff --git a/hosts/iso/configuration.nix b/hosts/iso/configuration.nix index 091f6a0..baee515 100644 --- a/hosts/iso/configuration.nix +++ b/hosts/iso/configuration.nix @@ -1,4 +1,5 @@ { + inputs, modulesPath, ... }: @@ -12,10 +13,12 @@ services.displayManager.autoLogin.enable = true; + environment.systemPackages = [ + inputs.nixos-facter.packages.nixos-facter + ]; + console.keyMap = "us"; i18n.defaultLocale = "en_CA.UTF-8"; time.timeZone = "America/Toronto"; - - nixpkgs.config.allowUnfree = true; }; } \ No newline at end of file diff --git a/hosts/iso/hardware-configuration.nix b/hosts/iso/hardware-configuration.nix index 6848c53..feada92 100644 --- a/hosts/iso/hardware-configuration.nix +++ b/hosts/iso/hardware-configuration.nix @@ -1,11 +1,11 @@ { - config, lib, + pkgs, ... }: { config.hardware = { - enableAllFirmware = config.nixpkgs.config.allowUnfree; + enableAllFirmware = pkgs.config.allowUnfree; enableRedistributableFirmware = lib.mkForce true; cpu = lib.genAttrs [ "amd" "intel" ] (_: { diff --git a/hosts/laptop/default.nix b/hosts/laptop/default.nix index 6024a91..323908b 100644 --- a/hosts/laptop/default.nix +++ b/hosts/laptop/default.nix @@ -1,10 +1,11 @@ { imports = [ ./configuration.nix - ./hardware-configuration.nix ]; config = { + facter.reportPath = ./facter.json; + system.stateVersion = "25.05"; }; } \ No newline at end of file diff --git a/hosts/laptop/facter.json b/hosts/laptop/facter.json new file mode 100644 index 0000000..f755e87 --- /dev/null +++ b/hosts/laptop/facter.json @@ -0,0 +1,3361 @@ +{ + "version": 1, + "system": "x86_64-linux", + "virtualisation": "none", + "hardware": { + "bios": { + "apm_info": { + "supported": false, + "enabled": false, + "version": 0, + "sub_version": 0, + "bios_flags": 0 + }, + "vbe_info": { + "version": 0, + "video_memory": 0 + }, + "pnp": false, + "pnp_id": 0, + "lba_support": false, + "low_memory_size": 0, + "smbios_version": 770 + }, + "bluetooth": [ + { + "index": 39, + "attached_to": 37, + "class_list": [ + "usb", + "bluetooth" + ], + "bus_type": { + "hex": "0086", + "name": "USB", + "value": 134 + }, + "slot": { + "bus": 0, + "number": 0 + }, + "base_class": { + "hex": "0115", + "name": "Bluetooth Device", + "value": 277 + }, + "vendor": { + "hex": "8087", + "value": 32903 + }, + "device": { + "hex": "0026", + "value": 38 + }, + "revision": { + "hex": "0000", + "name": "0.02", + "value": 0 + }, + "model": "Bluetooth Device", + "sysfs_id": "/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.0", + "sysfs_bus_id": "3-10:1.0", + "resources": [ + { + "type": "baud", + "speed": 12000000, + "bits": 0, + "stop_bits": 0, + "parity": 0, + "handshake": 0 + } + ], + "detail": { + "device_class": { + "hex": "00e0", + "name": "wireless", + "value": 224 + }, + "device_subclass": { + "hex": "0001", + "name": "audio", + "value": 1 + }, + "device_protocol": 1, + "interface_class": { + "hex": "00e0", + "name": "wireless", + "value": 224 + }, + "interface_subclass": { + "hex": "0001", + "name": "audio", + "value": 1 + }, + "interface_protocol": 1, + "interface_number": 0, + "interface_alternate_setting": 0 + }, + "hotplug": "usb", + "driver": "btusb", + "driver_module": "btusb", + "drivers": [ + "btusb" + ], + "driver_modules": [ + "btusb" + ], + "module_alias": "usb:v8087p0026d0002dcE0dsc01dp01icE0isc01ip01in00" + }, + { + "index": 43, + "attached_to": 37, + "class_list": [ + "usb", + "bluetooth" + ], + "bus_type": { + "hex": "0086", + "name": "USB", + "value": 134 + }, + "slot": { + "bus": 0, + "number": 0 + }, + "base_class": { + "hex": "0115", + "name": "Bluetooth Device", + "value": 277 + }, + "vendor": { + "hex": "8087", + "value": 32903 + }, + "device": { + "hex": "0026", + "value": 38 + }, + "revision": { + "hex": "0000", + "name": "0.02", + "value": 0 + }, + "model": "Bluetooth Device", + "sysfs_id": "/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.1", + "sysfs_bus_id": "3-10:1.1", + "resources": [ + { + "type": "baud", + "speed": 12000000, + "bits": 0, + "stop_bits": 0, + "parity": 0, + "handshake": 0 + } + ], + "detail": { + "device_class": { + "hex": "00e0", + "name": "wireless", + "value": 224 + }, + "device_subclass": { + "hex": "0001", + "name": "audio", + "value": 1 + }, + "device_protocol": 1, + "interface_class": { + "hex": "00e0", + "name": "wireless", + "value": 224 + }, + "interface_subclass": { + "hex": "0001", + "name": "audio", + "value": 1 + }, + "interface_protocol": 1, + "interface_number": 1, + "interface_alternate_setting": 0 + }, + "hotplug": "usb", + "driver": "btusb", + "driver_module": "btusb", + "drivers": [ + "btusb" + ], + "driver_modules": [ + "btusb" + ], + "module_alias": "usb:v8087p0026d0002dcE0dsc01dp01icE0isc01ip01in01" + } + ], + "bridge": [ + { + "index": 12, + "attached_to": 0, + "class_list": [ + "pci", + "bridge" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 28 + }, + "base_class": { + "hex": "0006", + "name": "Bridge", + "value": 6 + }, + "sub_class": { + "hex": "0004", + "name": "PCI bridge", + "value": 4 + }, + "pci_interface": { + "hex": "0000", + "name": "Normal decode", + "value": 0 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "a0bc", + "value": 41148 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0030", + "value": 48 + }, + "model": "Intel PCI bridge", + "sysfs_id": "/devices/pci0000:00/0000:00:1c.0", + "sysfs_bus_id": "0000:00:1c.0", + "detail": { + "function": 0, + "command": 1031, + "header_type": 1, + "secondary_bus": 43, + "prog_if": 0 + }, + "driver": "pcieport", + "driver_module": "pcieportdrv", + "drivers": [ + "pcieport" + ], + "driver_modules": [ + "pcieportdrv" + ], + "module_alias": "pci:v00008086d0000A0BCsv00001028sd00000A89bc06sc04i00" + }, + { + "index": 16, + "attached_to": 0, + "class_list": [ + "pci", + "bridge" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 31 + }, + "base_class": { + "hex": "0006", + "name": "Bridge", + "value": 6 + }, + "sub_class": { + "hex": "0001", + "name": "ISA bridge", + "value": 1 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "a082", + "value": 41090 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0030", + "value": 48 + }, + "model": "Intel ISA bridge", + "sysfs_id": "/devices/pci0000:00/0000:00:1f.0", + "sysfs_bus_id": "0000:00:1f.0", + "detail": { + "function": 0, + "command": 1031, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "module_alias": "pci:v00008086d0000A082sv00001028sd00000A89bc06sc01i00" + }, + { + "index": 20, + "attached_to": 0, + "class_list": [ + "pci", + "bridge" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 7 + }, + "base_class": { + "hex": "0006", + "name": "Bridge", + "value": 6 + }, + "sub_class": { + "hex": "0004", + "name": "PCI bridge", + "value": 4 + }, + "pci_interface": { + "hex": "0000", + "name": "Normal decode", + "value": 0 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "9a23", + "value": 39459 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0002", + "value": 2 + }, + "model": "Intel PCI bridge", + "sysfs_id": "/devices/pci0000:00/0000:00:07.0", + "sysfs_bus_id": "0000:00:07.0", + "detail": { + "function": 0, + "command": 1031, + "header_type": 1, + "secondary_bus": 1, + "prog_if": 0 + }, + "driver": "pcieport", + "driver_module": "pcieportdrv", + "drivers": [ + "pcieport" + ], + "driver_modules": [ + "pcieportdrv" + ], + "module_alias": "pci:v00008086d00009A23sv00001028sd00000A89bc06sc04i00" + }, + { + "index": 23, + "attached_to": 0, + "class_list": [ + "pci", + "bridge" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 0 + }, + "base_class": { + "hex": "0006", + "name": "Bridge", + "value": 6 + }, + "sub_class": { + "hex": "0000", + "name": "Host bridge", + "value": 0 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "9a14", + "value": 39444 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0002", + "value": 2 + }, + "model": "Intel Host bridge", + "sysfs_id": "/devices/pci0000:00/0000:00:00.0", + "sysfs_bus_id": "0000:00:00.0", + "detail": { + "function": 0, + "command": 6, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "module_alias": "pci:v00008086d00009A14sv00001028sd00000A89bc06sc00i00" + } + ], + "camera": [ + { + "index": 38, + "attached_to": 37, + "class_list": [ + "camera", + "usb" + ], + "bus_type": { + "hex": "0086", + "name": "USB", + "value": 134 + }, + "slot": { + "bus": 0, + "number": 0 + }, + "base_class": { + "hex": "010f", + "name": "Camera", + "value": 271 + }, + "vendor": { + "hex": "1bcf", + "name": "SunplusIT Inc", + "value": 7119 + }, + "device": { + "hex": "2a02", + "name": "Integrated_Webcam_HD", + "value": 10754 + }, + "revision": { + "hex": "0000", + "name": "11.15", + "value": 0 + }, + "serial": "01.00.00", + "model": "SunplusIT Integrated_Webcam_HD", + "sysfs_id": "/devices/pci0000:00/0000:00:14.0/usb3/3-6/3-6:1.1", + "sysfs_bus_id": "3-6:1.1", + "resources": [ + { + "type": "baud", + "speed": 480000000, + "bits": 0, + "stop_bits": 0, + "parity": 0, + "handshake": 0 + } + ], + "detail": { + "device_class": { + "hex": "00ef", + "name": "miscellaneous", + "value": 239 + }, + "device_subclass": { + "hex": "0002", + "name": "comm", + "value": 2 + }, + "device_protocol": 1, + "interface_class": { + "hex": "000e", + "name": "video", + "value": 14 + }, + "interface_subclass": { + "hex": "0002", + "name": "comm", + "value": 2 + }, + "interface_protocol": 0, + "interface_number": 1, + "interface_alternate_setting": 0, + "interface_association": { + "function_class": { + "hex": "000e", + "name": "video", + "value": 14 + }, + "function_subclass": { + "hex": "0003", + "name": "hid", + "value": 3 + }, + "function_protocol": 0, + "interface_count": 2, + "first_interface": 0 + } + }, + "hotplug": "usb", + "driver": "uvcvideo", + "driver_module": "uvcvideo", + "drivers": [ + "uvcvideo" + ], + "driver_modules": [ + "uvcvideo" + ], + "module_alias": "usb:v1BCFp2A02d1115dcEFdsc02dp01ic0Eisc02ip00in01" + }, + { + "index": 45, + "attached_to": 37, + "class_list": [ + "camera", + "usb" + ], + "bus_type": { + "hex": "0086", + "name": "USB", + "value": 134 + }, + "slot": { + "bus": 0, + "number": 0 + }, + "base_class": { + "hex": "010f", + "name": "Camera", + "value": 271 + }, + "vendor": { + "hex": "1bcf", + "name": "SunplusIT Inc", + "value": 7119 + }, + "device": { + "hex": "2a02", + "name": "Integrated_Webcam_HD", + "value": 10754 + }, + "revision": { + "hex": "0000", + "name": "11.15", + "value": 0 + }, + "serial": "01.00.00", + "model": "SunplusIT Integrated_Webcam_HD", + "sysfs_id": "/devices/pci0000:00/0000:00:14.0/usb3/3-6/3-6:1.0", + "sysfs_bus_id": "3-6:1.0", + "resources": [ + { + "type": "baud", + "speed": 480000000, + "bits": 0, + "stop_bits": 0, + "parity": 0, + "handshake": 0 + } + ], + "detail": { + "device_class": { + "hex": "00ef", + "name": "miscellaneous", + "value": 239 + }, + "device_subclass": { + "hex": "0002", + "name": "comm", + "value": 2 + }, + "device_protocol": 1, + "interface_class": { + "hex": "000e", + "name": "video", + "value": 14 + }, + "interface_subclass": { + "hex": "0001", + "name": "audio", + "value": 1 + }, + "interface_protocol": 0, + "interface_number": 0, + "interface_alternate_setting": 0, + "interface_association": { + "function_class": { + "hex": "000e", + "name": "video", + "value": 14 + }, + "function_subclass": { + "hex": "0003", + "name": "hid", + "value": 3 + }, + "function_protocol": 0, + "interface_count": 2, + "first_interface": 0 + } + }, + "hotplug": "usb", + "driver": "uvcvideo", + "driver_module": "uvcvideo", + "drivers": [ + "uvcvideo" + ], + "driver_modules": [ + "uvcvideo" + ], + "module_alias": "usb:v1BCFp2A02d1115dcEFdsc02dp01ic0Eisc01ip00in00" + } + ], + "cpu": [ + { + "architecture": "x86_64", + "vendor_name": "GenuineIntel", + "model_name": "11th Gen Intel(R) Core(TM) i7-1195G7 @ 2.90GHz", + "family": 6, + "model": 140, + "stepping": 2, + "features": [ + "fpu", + "vme", + "de", + "pse", + "tsc", + "msr", + "pae", + "mce", + "cx8", + "apic", + "sep", + "mtrr", + "pge", + "mca", + "cmov", + "pat", + "pse36", + "clflush", + "dts", + "acpi", + "mmx", + "fxsr", + "sse", + "sse2", + "ss", + "ht", + "tm", + "pbe", + "syscall", + "nx", + "pdpe1gb", + "rdtscp", + "lm", + "constant_tsc", + "art", + "arch_perfmon", + "pebs", + "bts", + "rep_good", + "nopl", + "xtopology", + "nonstop_tsc", + "cpuid", + "aperfmperf", + "tsc_known_freq", + "pni", + "pclmulqdq", + "dtes64", + "monitor", + "ds_cpl", + "vmx", + "est", + "tm2", + "ssse3", + "sdbg", + "fma", + "cx16", + "xtpr", + "pdcm", + "pcid", + "sse4_1", + "sse4_2", + "x2apic", + "movbe", + "popcnt", + "tsc_deadline_timer", + "aes", + "xsave", + "avx", + "f16c", + "rdrand", + "lahf_lm", + "abm", + "3dnowprefetch", + "cpuid_fault", + "epb", + "cat_l2", + "cdp_l2", + "ssbd", + "ibrs", + "ibpb", + "stibp", + "ibrs_enhanced", + "tpr_shadow", + "flexpriority", + "ept", + "vpid", + "ept_ad", + "fsgsbase", + "tsc_adjust", + "bmi1", + "avx2", + "smep", + "bmi2", + "erms", + "invpcid", + "rdt_a", + "avx512f", + "avx512dq", + "rdseed", + "adx", + "smap", + "avx512ifma", + "clflushopt", + "clwb", + "intel_pt", + "avx512cd", + "sha_ni", + "avx512bw", + "avx512vl", + "xsaveopt", + "xsavec", + "xgetbv1", + "xsaves", + "split_lock_detect", + "user_shstk", + "dtherm", + "ida", + "arat", + "pln", + "pts", + "hwp", + "hwp_notify", + "hwp_act_window", + "hwp_epp", + "hwp_pkg_req", + "vnmi", + "avx512vbmi", + "umip", + "pku", + "ospke", + "avx512_vbmi2", + "gfni", + "vaes", + "vpclmulqdq", + "avx512_vnni", + "avx512_bitalg", + "avx512_vpopcntdq", + "rdpid", + "movdiri", + "movdir64b", + "fsrm", + "avx512_vp2intersect", + "md_clear", + "ibt", + "flush_l1" + ], + "bugs": [ + "spectre_v1", + "spectre_v2", + "spec_store_bypass", + "swapgs", + "eibrs_pbrsb", + "gds", + "bhi", + "its", + "its_native_only" + ], + "power_management": [ + "" + ], + "bogo": 3609, + "cache": 12288, + "units": 16, + "page_size": 4096, + "physical_id": 0, + "siblings": 8, + "cores": 4, + "fpu": false, + "fpu_exception": false, + "cpuid_level": 27, + "write_protect": false, + "tlb_size": 32766, + "clflush_size": 64, + "cache_alignment": 64, + "address_sizes": { + "physical": "0x27", + "virtual": "0x30" + } + } + ], + "disk": [ + { + "index": 34, + "attached_to": 26, + "class_list": [ + "disk", + "block_device", + "nvme" + ], + "bus_type": { + "hex": "0096", + "name": "NVME", + "value": 150 + }, + "slot": { + "bus": 0, + "number": 0 + }, + "base_class": { + "hex": "0106", + "name": "Mass Storage Device", + "value": 262 + }, + "sub_class": { + "hex": "0000", + "name": "Disk", + "value": 0 + }, + "vendor": { + "hex": "1e0f", + "value": 7695 + }, + "sub_vendor": { + "hex": "1e0f", + "value": 7695 + }, + "device": { + "hex": "0001", + "name": "KBG40ZNS512G NVMe KIOXIA 512GB", + "value": 1 + }, + "sub_device": { + "hex": "0001", + "value": 1 + }, + "serial": "X1OPCI8IQXD3", + "model": "KBG40ZNS512G NVMe KIOXIA 512GB", + "sysfs_id": "/class/block/nvme0n1", + "sysfs_bus_id": "nvme0", + "sysfs_device_link": "/devices/pci0000:00/0000:00:1c.0/0000:2b:00.0/nvme/nvme0", + "unix_device_names": [ + "/dev/disk/by-id/nvme-KBG40ZNS512G_NVMe_KIOXIA_512GB_X1OPCI8IQXD3", + "/dev/disk/by-id/nvme-KBG40ZNS512G_NVMe_KIOXIA_512GB_X1OPCI8IQXD3_1", + "/dev/disk/by-id/nvme-eui.01000000000000008ce38e0402fa167e", + "/dev/disk/by-path/pci-0000:2b:00.0-nvme-1", + "/dev/nvme0n1" + ], + "resources": [ + { + "type": "disk_geo", + "cylinders": 61048, + "heads": 64, + "sectors": 32, + "size": "0x0", + "geo_type": "logical" + }, + { + "type": "size", + "unit": "sectors", + "value_1": 125026902, + "value_2": 4096 + } + ], + "driver": "nvme", + "driver_module": "nvme", + "drivers": [ + "nvme" + ], + "driver_modules": [ + "nvme" + ] + } + ], + "graphics_card": [ + { + "index": 28, + "attached_to": 0, + "class_list": [ + "graphics_card", + "pci" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 2 + }, + "base_class": { + "hex": "0003", + "name": "Display controller", + "value": 3 + }, + "sub_class": { + "hex": "0000", + "name": "VGA compatible controller", + "value": 0 + }, + "pci_interface": { + "hex": "0000", + "name": "VGA", + "value": 0 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "9a49", + "value": 39497 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0003", + "value": 3 + }, + "model": "Intel VGA compatible controller", + "sysfs_id": "/devices/pci0000:00/0000:00:02.0", + "sysfs_bus_id": "0000:00:02.0", + "resources": [ + { + "type": "io", + "base": 12288, + "range": 64, + "enabled": true, + "access": "read_write" + } + ], + "detail": { + "function": 0, + "command": 1031, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "driver": "i915", + "driver_module": "i915", + "drivers": [ + "i915" + ], + "driver_modules": [ + "i915" + ], + "module_alias": "pci:v00008086d00009A49sv00001028sd00000A89bc03sc00i00" + } + ], + "hub": [ + { + "index": 37, + "attached_to": 29, + "class_list": [ + "usb", + "hub" + ], + "bus_type": { + "hex": "0086", + "name": "USB", + "value": 134 + }, + "slot": { + "bus": 0, + "number": 0 + }, + "base_class": { + "hex": "010a", + "name": "Hub", + "value": 266 + }, + "vendor": { + "hex": "1d6b", + "name": "Linux 6.12.57 xhci-hcd", + "value": 7531 + }, + "device": { + "hex": "0002", + "name": "xHCI Host Controller", + "value": 2 + }, + "revision": { + "hex": "0000", + "name": "6.12", + "value": 0 + }, + "serial": "0000:00:14.0", + "model": "Linux 6.12.57 xhci-hcd xHCI Host Controller", + "sysfs_id": "/devices/pci0000:00/0000:00:14.0/usb3/3-0:1.0", + "sysfs_bus_id": "3-0:1.0", + "resources": [ + { + "type": "baud", + "speed": 480000000, + "bits": 0, + "stop_bits": 0, + "parity": 0, + "handshake": 0 + } + ], + "detail": { + "device_class": { + "hex": "0009", + "name": "hub", + "value": 9 + }, + "device_subclass": { + "hex": "0000", + "name": "per_interface", + "value": 0 + }, + "device_protocol": 1, + "interface_class": { + "hex": "0009", + "name": "hub", + "value": 9 + }, + "interface_subclass": { + "hex": "0000", + "name": "per_interface", + "value": 0 + }, + "interface_protocol": 0, + "interface_number": 0, + "interface_alternate_setting": 0 + }, + "hotplug": "usb", + "driver": "hub", + "driver_module": "usbcore", + "drivers": [ + "hub" + ], + "driver_modules": [ + "usbcore" + ], + "module_alias": "usb:v1D6Bp0002d0612dc09dsc00dp01ic09isc00ip00in00" + }, + { + "index": 40, + "attached_to": 29, + "class_list": [ + "usb", + "hub" + ], + "bus_type": { + "hex": "0086", + "name": "USB", + "value": 134 + }, + "slot": { + "bus": 0, + "number": 0 + }, + "base_class": { + "hex": "010a", + "name": "Hub", + "value": 266 + }, + "vendor": { + "hex": "1d6b", + "name": "Linux 6.12.57 xhci-hcd", + "value": 7531 + }, + "device": { + "hex": "0003", + "name": "xHCI Host Controller", + "value": 3 + }, + "revision": { + "hex": "0000", + "name": "6.12", + "value": 0 + }, + "serial": "0000:00:14.0", + "model": "Linux 6.12.57 xhci-hcd xHCI Host Controller", + "sysfs_id": "/devices/pci0000:00/0000:00:14.0/usb4/4-0:1.0", + "sysfs_bus_id": "4-0:1.0", + "detail": { + "device_class": { + "hex": "0009", + "name": "hub", + "value": 9 + }, + "device_subclass": { + "hex": "0000", + "name": "per_interface", + "value": 0 + }, + "device_protocol": 3, + "interface_class": { + "hex": "0009", + "name": "hub", + "value": 9 + }, + "interface_subclass": { + "hex": "0000", + "name": "per_interface", + "value": 0 + }, + "interface_protocol": 0, + "interface_number": 0, + "interface_alternate_setting": 0 + }, + "hotplug": "usb", + "driver": "hub", + "driver_module": "usbcore", + "drivers": [ + "hub" + ], + "driver_modules": [ + "usbcore" + ], + "module_alias": "usb:v1D6Bp0003d0612dc09dsc00dp03ic09isc00ip00in00" + }, + { + "index": 42, + "attached_to": 14, + "class_list": [ + "usb", + "hub" + ], + "bus_type": { + "hex": "0086", + "name": "USB", + "value": 134 + }, + "slot": { + "bus": 0, + "number": 0 + }, + "base_class": { + "hex": "010a", + "name": "Hub", + "value": 266 + }, + "vendor": { + "hex": "1d6b", + "name": "Linux 6.12.57 xhci-hcd", + "value": 7531 + }, + "device": { + "hex": "0002", + "name": "xHCI Host Controller", + "value": 2 + }, + "revision": { + "hex": "0000", + "name": "6.12", + "value": 0 + }, + "serial": "0000:00:0d.0", + "model": "Linux 6.12.57 xhci-hcd xHCI Host Controller", + "sysfs_id": "/devices/pci0000:00/0000:00:0d.0/usb1/1-0:1.0", + "sysfs_bus_id": "1-0:1.0", + "resources": [ + { + "type": "baud", + "speed": 480000000, + "bits": 0, + "stop_bits": 0, + "parity": 0, + "handshake": 0 + } + ], + "detail": { + "device_class": { + "hex": "0009", + "name": "hub", + "value": 9 + }, + "device_subclass": { + "hex": "0000", + "name": "per_interface", + "value": 0 + }, + "device_protocol": 1, + "interface_class": { + "hex": "0009", + "name": "hub", + "value": 9 + }, + "interface_subclass": { + "hex": "0000", + "name": "per_interface", + "value": 0 + }, + "interface_protocol": 0, + "interface_number": 0, + "interface_alternate_setting": 0 + }, + "hotplug": "usb", + "driver": "hub", + "driver_module": "usbcore", + "drivers": [ + "hub" + ], + "driver_modules": [ + "usbcore" + ], + "module_alias": "usb:v1D6Bp0002d0612dc09dsc00dp01ic09isc00ip00in00" + }, + { + "index": 46, + "attached_to": 14, + "class_list": [ + "usb", + "hub" + ], + "bus_type": { + "hex": "0086", + "name": "USB", + "value": 134 + }, + "slot": { + "bus": 0, + "number": 0 + }, + "base_class": { + "hex": "010a", + "name": "Hub", + "value": 266 + }, + "vendor": { + "hex": "1d6b", + "name": "Linux 6.12.57 xhci-hcd", + "value": 7531 + }, + "device": { + "hex": "0003", + "name": "xHCI Host Controller", + "value": 3 + }, + "revision": { + "hex": "0000", + "name": "6.12", + "value": 0 + }, + "serial": "0000:00:0d.0", + "model": "Linux 6.12.57 xhci-hcd xHCI Host Controller", + "sysfs_id": "/devices/pci0000:00/0000:00:0d.0/usb2/2-0:1.0", + "sysfs_bus_id": "2-0:1.0", + "detail": { + "device_class": { + "hex": "0009", + "name": "hub", + "value": 9 + }, + "device_subclass": { + "hex": "0000", + "name": "per_interface", + "value": 0 + }, + "device_protocol": 3, + "interface_class": { + "hex": "0009", + "name": "hub", + "value": 9 + }, + "interface_subclass": { + "hex": "0000", + "name": "per_interface", + "value": 0 + }, + "interface_protocol": 0, + "interface_number": 0, + "interface_alternate_setting": 0 + }, + "hotplug": "usb", + "driver": "hub", + "driver_module": "usbcore", + "drivers": [ + "hub" + ], + "driver_modules": [ + "usbcore" + ], + "module_alias": "usb:v1D6Bp0003d0612dc09dsc00dp03ic09isc00ip00in00" + } + ], + "memory": [ + { + "index": 11, + "attached_to": 0, + "class_list": [ + "memory" + ], + "base_class": { + "hex": "0101", + "name": "Internally Used Class", + "value": 257 + }, + "sub_class": { + "hex": "0002", + "name": "Main Memory", + "value": 2 + }, + "model": "Main Memory", + "resources": [ + { + "type": "phys_mem", + "range": 11811160064 + } + ] + } + ], + "monitor": [ + { + "index": 33, + "attached_to": 28, + "class_list": [ + "monitor" + ], + "base_class": { + "hex": "0100", + "name": "Monitor", + "value": 256 + }, + "sub_class": { + "hex": "0002", + "name": "LCD Monitor", + "value": 2 + }, + "vendor": { + "hex": "06af", + "name": "W2D6P B140HAB", + "value": 1711 + }, + "device": { + "hex": "323d", + "value": 12861 + }, + "serial": "0", + "model": "W2D6P B140HAB LCD Monitor", + "resources": [ + { + "type": "monitor", + "width": 1920, + "height": 1080, + "vertical_frequency": 60, + "interlaced": false + }, + { + "type": "size", + "unit": "mm", + "value_1": 309, + "value_2": 174 + } + ], + "detail": { + "manufacture_year": 2020, + "manufacture_week": 6, + "vertical_sync": { + "min": 0, + "max": 0 + }, + "horizontal_sync": { + "min": 0, + "max": 0 + }, + "horizontal_sync_timings": { + "disp": 1920, + "sync_start": 1936, + "sync_end": 1952, + "total": 2180 + }, + "vertical_sync_timings": { + "disp": 1080, + "sync_start": 1083, + "sync_end": 1097, + "total": 1162 + }, + "clock": 121600, + "width": 1920, + "height": 1080, + "width_millimetres": 309, + "height_millimetres": 174, + "horizontal_flag": 45, + "vertical_flag": 43, + "vendor": "W2D6P B140HAB", + "name": "" + } + } + ], + "mouse": [ + { + "index": 49, + "attached_to": 0, + "bus_type": { + "hex": "0081", + "name": "serial", + "value": 129 + }, + "base_class": { + "hex": "0118", + "name": "touchpad", + "value": 280 + }, + "sub_class": { + "hex": "0001", + "name": "bus", + "value": 1 + }, + "vendor": { + "hex": "27c6", + "value": 10182 + }, + "device": { + "hex": "0d41", + "value": 3393 + }, + "sysfs_id": "/devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-DELL0A89:00/0018:27C6:0D41.0005/input/input30", + "unix_device_names": [ + "/dev/input/event17", + "/dev/input/ + handler" + ] + } + ], + "network_controller": [ + { + "index": 18, + "attached_to": 0, + "class_list": [ + "network_controller", + "pci", + "wlan_card" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 20 + }, + "base_class": { + "hex": "0002", + "name": "Network controller", + "value": 2 + }, + "sub_class": { + "hex": "0082", + "name": "WLAN controller", + "value": 130 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "device": { + "hex": "a0f0", + "value": 41200 + }, + "sub_device": { + "hex": "4070", + "value": 16496 + }, + "revision": { + "hex": "0030", + "value": 48 + }, + "model": "Intel WLAN controller", + "sysfs_id": "/devices/pci0000:00/0000:00:14.3", + "sysfs_bus_id": "0000:00:14.3", + "unix_device_names": [ + "wlp0s20f3" + ], + "resources": [ + { + "type": "hwaddr", + "address": 57 + }, + { + "type": "phwaddr", + "address": 100 + }, + { + "type": "wlan", + "channels": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "36", + "40", + "44", + "48", + "52", + "56", + "60", + "64", + "100", + "104", + "108", + "112", + "116", + "120", + "124", + "128", + "132", + "136", + "140" + ], + "frequencies": [ + "2.412", + "2.417", + "2.422", + "2.427", + "2.432", + "2.437", + "2.442", + "2.447", + "2.452", + "2.457", + "2.462", + "2.467", + "2.472", + "5.18", + "5.2", + "5.22", + "5.24", + "5.26", + "5.28", + "5.3", + "5.32", + "5.5", + "5.52", + "5.54", + "5.56", + "5.58", + "5.6", + "5.62", + "5.64", + "5.66", + "5.68", + "5.7" + ], + "auth_modes": [ + "open", + "sharedkey", + "wpa-psk", + "wpa-eap" + ], + "enc_modes": [ + "WEP40", + "WEP104", + "TKIP", + "CCMP" + ] + } + ], + "detail": { + "function": 3, + "command": 1030, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "driver": "iwlwifi", + "driver_module": "iwlwifi", + "drivers": [ + "iwlwifi" + ], + "driver_modules": [ + "iwlwifi" + ], + "module_alias": "pci:v00008086d0000A0F0sv00008086sd00004070bc02sc80i00" + } + ], + "network_interface": [ + { + "index": 47, + "attached_to": 0, + "class_list": [ + "network_interface" + ], + "base_class": { + "hex": "0107", + "name": "Network Interface", + "value": 263 + }, + "sub_class": { + "hex": "0000", + "name": "Loopback", + "value": 0 + }, + "model": "Loopback network interface", + "sysfs_id": "/class/net/lo", + "unix_device_names": [ + "lo" + ] + }, + { + "index": 48, + "attached_to": 18, + "class_list": [ + "network_interface" + ], + "base_class": { + "hex": "0107", + "name": "Network Interface", + "value": 263 + }, + "sub_class": { + "hex": "0001", + "name": "Ethernet", + "value": 1 + }, + "model": "Ethernet network interface", + "sysfs_id": "/class/net/wlp0s20f3", + "sysfs_device_link": "/devices/pci0000:00/0000:00:14.3", + "unix_device_names": [ + "wlp0s20f3" + ], + "resources": [ + { + "type": "hwaddr", + "address": 57 + }, + { + "type": "phwaddr", + "address": 100 + } + ], + "driver": "iwlwifi", + "driver_module": "iwlwifi", + "drivers": [ + "iwlwifi" + ], + "driver_modules": [ + "iwlwifi" + ] + } + ], + "pci": [ + { + "index": 13, + "attached_to": 0, + "class_list": [ + "pci", + "unknown" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 8 + }, + "base_class": { + "hex": "0008", + "name": "Generic system peripheral", + "value": 8 + }, + "sub_class": { + "hex": "0080", + "name": "System peripheral", + "value": 128 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "9a11", + "value": 39441 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0002", + "value": 2 + }, + "model": "Intel System peripheral", + "sysfs_id": "/devices/pci0000:00/0000:00:08.0", + "sysfs_bus_id": "0000:00:08.0", + "detail": { + "function": 0, + "command": 0, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "module_alias": "pci:v00008086d00009A11sv00001028sd00000A89bc08sc80i00" + }, + { + "index": 15, + "attached_to": 0, + "class_list": [ + "pci", + "unknown" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 21 + }, + "base_class": { + "hex": "000c", + "name": "Serial bus controller", + "value": 12 + }, + "sub_class": { + "hex": "0080", + "value": 128 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "a0e9", + "value": 41193 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0030", + "value": 48 + }, + "model": "Intel Serial bus controller", + "sysfs_id": "/devices/pci0000:00/0000:00:15.1", + "sysfs_bus_id": "0000:00:15.1", + "detail": { + "function": 1, + "command": 6, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "driver": "intel-lpss", + "driver_module": "intel_lpss_pci", + "drivers": [ + "intel-lpss" + ], + "driver_modules": [ + "intel_lpss_pci" + ], + "module_alias": "pci:v00008086d0000A0E9sv00001028sd00000A89bc0Csc80i00" + }, + { + "index": 17, + "attached_to": 0, + "class_list": [ + "pci", + "unknown" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 4 + }, + "base_class": { + "hex": "0011", + "name": "Signal processing controller", + "value": 17 + }, + "sub_class": { + "hex": "0080", + "name": "Signal processing controller", + "value": 128 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "9a03", + "value": 39427 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0002", + "value": 2 + }, + "model": "Intel Signal processing controller", + "sysfs_id": "/devices/pci0000:00/0000:00:04.0", + "sysfs_bus_id": "0000:00:04.0", + "detail": { + "function": 0, + "command": 2, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "driver": "proc_thermal", + "driver_module": "processor_thermal_device_pci_legacy", + "drivers": [ + "proc_thermal" + ], + "driver_modules": [ + "processor_thermal_device_pci_legacy" + ], + "module_alias": "pci:v00008086d00009A03sv00001028sd00000A89bc11sc80i00" + }, + { + "index": 19, + "attached_to": 0, + "class_list": [ + "pci", + "unknown" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 22 + }, + "base_class": { + "hex": "0007", + "name": "Communication controller", + "value": 7 + }, + "sub_class": { + "hex": "0080", + "name": "Communication controller", + "value": 128 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "a0e0", + "value": 41184 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0030", + "value": 48 + }, + "model": "Intel Communication controller", + "sysfs_id": "/devices/pci0000:00/0000:00:16.0", + "sysfs_bus_id": "0000:00:16.0", + "detail": { + "function": 0, + "command": 1030, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "driver": "mei_me", + "driver_module": "mei_me", + "drivers": [ + "mei_me" + ], + "driver_modules": [ + "mei_me" + ], + "module_alias": "pci:v00008086d0000A0E0sv00001028sd00000A89bc07sc80i00" + }, + { + "index": 21, + "attached_to": 0, + "class_list": [ + "pci", + "unknown" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 31 + }, + "base_class": { + "hex": "000c", + "name": "Serial bus controller", + "value": 12 + }, + "sub_class": { + "hex": "0080", + "value": 128 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "a0a4", + "value": 41124 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0030", + "value": 48 + }, + "model": "Intel Serial bus controller", + "sysfs_id": "/devices/pci0000:00/0000:00:1f.5", + "sysfs_bus_id": "0000:00:1f.5", + "detail": { + "function": 5, + "command": 1026, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "driver": "intel-spi", + "driver_module": "spi_intel_pci", + "drivers": [ + "intel-spi" + ], + "driver_modules": [ + "spi_intel_pci" + ], + "module_alias": "pci:v00008086d0000A0A4sv00001028sd00000A89bc0Csc80i00" + }, + { + "index": 24, + "attached_to": 0, + "class_list": [ + "pci", + "unknown" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 18 + }, + "base_class": { + "hex": "0007", + "name": "Communication controller", + "value": 7 + }, + "sub_class": { + "hex": "0000", + "name": "Serial controller", + "value": 0 + }, + "pci_interface": { + "hex": "0000", + "name": "8250", + "value": 0 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "a0fc", + "value": 41212 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0030", + "value": 48 + }, + "model": "Intel Serial controller", + "sysfs_id": "/devices/pci0000:00/0000:00:12.0", + "sysfs_bus_id": "0000:00:12.0", + "detail": { + "function": 0, + "command": 6, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "driver": "intel_ish_ipc", + "driver_module": "intel_ish_ipc", + "drivers": [ + "intel_ish_ipc" + ], + "driver_modules": [ + "intel_ish_ipc" + ], + "module_alias": "pci:v00008086d0000A0FCsv00001028sd00000A89bc07sc00i00" + }, + { + "index": 25, + "attached_to": 0, + "class_list": [ + "pci", + "unknown" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 21 + }, + "base_class": { + "hex": "000c", + "name": "Serial bus controller", + "value": 12 + }, + "sub_class": { + "hex": "0080", + "value": 128 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "a0e8", + "value": 41192 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0030", + "value": 48 + }, + "model": "Intel Serial bus controller", + "sysfs_id": "/devices/pci0000:00/0000:00:15.0", + "sysfs_bus_id": "0000:00:15.0", + "detail": { + "function": 0, + "command": 6, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "driver": "intel-lpss", + "driver_module": "intel_lpss_pci", + "drivers": [ + "intel-lpss" + ], + "driver_modules": [ + "intel_lpss_pci" + ], + "module_alias": "pci:v00008086d0000A0E8sv00001028sd00000A89bc0Csc80i00" + }, + { + "index": 27, + "attached_to": 0, + "class_list": [ + "pci", + "unknown" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 20 + }, + "base_class": { + "hex": "0005", + "name": "Memory controller", + "value": 5 + }, + "sub_class": { + "hex": "0000", + "name": "RAM memory", + "value": 0 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "a0ef", + "value": 41199 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0030", + "value": 48 + }, + "model": "Intel RAM memory", + "sysfs_id": "/devices/pci0000:00/0000:00:14.2", + "sysfs_bus_id": "0000:00:14.2", + "detail": { + "function": 2, + "command": 0, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "module_alias": "pci:v00008086d0000A0EFsv00001028sd00000A89bc05sc00i00" + }, + { + "index": 30, + "attached_to": 0, + "class_list": [ + "pci", + "unknown" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 31 + }, + "base_class": { + "hex": "000c", + "name": "Serial bus controller", + "value": 12 + }, + "sub_class": { + "hex": "0005", + "name": "SMBus", + "value": 5 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "a0a3", + "value": 41123 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0030", + "value": 48 + }, + "model": "Intel SMBus", + "sysfs_id": "/devices/pci0000:00/0000:00:1f.4", + "sysfs_bus_id": "0000:00:1f.4", + "resources": [ + { + "type": "io", + "base": 61344, + "range": 32, + "enabled": true, + "access": "read_write" + } + ], + "detail": { + "function": 4, + "command": 3, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "driver": "i801_smbus", + "driver_module": "i2c_i801", + "drivers": [ + "i801_smbus" + ], + "driver_modules": [ + "i2c_i801" + ], + "module_alias": "pci:v00008086d0000A0A3sv00001028sd00000A89bc0Csc05i00" + }, + { + "index": 32, + "attached_to": 0, + "class_list": [ + "pci", + "unknown" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 10 + }, + "base_class": { + "hex": "0011", + "name": "Signal processing controller", + "value": 17 + }, + "sub_class": { + "hex": "0080", + "name": "Signal processing controller", + "value": 128 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "9a0d", + "value": 39437 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0001", + "value": 1 + }, + "model": "Intel Signal processing controller", + "sysfs_id": "/devices/pci0000:00/0000:00:0a.0", + "sysfs_bus_id": "0000:00:0a.0", + "detail": { + "function": 0, + "command": 2, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "driver": "intel_vsec", + "driver_module": "intel_vsec", + "drivers": [ + "intel_vsec" + ], + "driver_modules": [ + "intel_vsec" + ], + "module_alias": "pci:v00008086d00009A0Dsv00001028sd00000A89bc11sc80i00" + } + ], + "sound": [ + { + "index": 22, + "attached_to": 0, + "class_list": [ + "sound", + "pci" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 31 + }, + "base_class": { + "hex": "0004", + "name": "Multimedia controller", + "value": 4 + }, + "sub_class": { + "hex": "0001", + "name": "Multimedia audio controller", + "value": 1 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "a0c8", + "value": 41160 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0030", + "value": 48 + }, + "model": "Intel Multimedia audio controller", + "sysfs_id": "/devices/pci0000:00/0000:00:1f.3", + "sysfs_bus_id": "0000:00:1f.3", + "detail": { + "function": 3, + "command": 1030, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 0 + }, + "driver": "sof-audio-pci-intel-tgl", + "driver_module": "snd_sof_pci_intel_tgl", + "drivers": [ + "sof-audio-pci-intel-tgl" + ], + "driver_modules": [ + "snd_sof_pci_intel_tgl" + ], + "module_alias": "pci:v00008086d0000A0C8sv00001028sd00000A89bc04sc01i00" + } + ], + "storage_controller": [ + { + "index": 26, + "attached_to": 12, + "class_list": [ + "storage_controller", + "pci" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 43, + "number": 0 + }, + "base_class": { + "hex": "0001", + "name": "Mass storage controller", + "value": 1 + }, + "sub_class": { + "hex": "0008", + "value": 8 + }, + "pci_interface": { + "hex": "0002", + "value": 2 + }, + "vendor": { + "hex": "1e0f", + "value": 7695 + }, + "sub_vendor": { + "hex": "1e0f", + "value": 7695 + }, + "device": { + "hex": "0001", + "value": 1 + }, + "sub_device": { + "hex": "0001", + "value": 1 + }, + "model": "Mass storage controller", + "sysfs_id": "/devices/pci0000:00/0000:00:1c.0/0000:2b:00.0", + "sysfs_bus_id": "0000:2b:00.0", + "detail": { + "function": 0, + "command": 1030, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 2 + }, + "driver": "nvme", + "driver_module": "nvme", + "drivers": [ + "nvme" + ], + "driver_modules": [ + "nvme" + ], + "module_alias": "pci:v00001E0Fd00000001sv00001E0Fsd00000001bc01sc08i02" + } + ], + "system": { + "form_factor": "laptop" + }, + "usb": [ + { + "index": 41, + "attached_to": 37, + "class_list": [ + "usb", + "unknown" + ], + "bus_type": { + "hex": "0086", + "name": "USB", + "value": 134 + }, + "slot": { + "bus": 0, + "number": 0 + }, + "base_class": { + "hex": "0000", + "name": "Unclassified device", + "value": 0 + }, + "sub_class": { + "hex": "0000", + "name": "Unclassified device", + "value": 0 + }, + "vendor": { + "hex": "27c6", + "name": "Goodix Technology Co., Ltd.", + "value": 10182 + }, + "device": { + "hex": "639c", + "name": "Goodix USB2.0 MISC", + "value": 25500 + }, + "revision": { + "hex": "0000", + "name": "1.00", + "value": 0 + }, + "serial": "UIDA58B1138_XXXX_MOC_B0", + "model": "Goodix USB2.0 MISC", + "sysfs_id": "/devices/pci0000:00/0000:00:14.0/usb3/3-5/3-5:1.0", + "sysfs_bus_id": "3-5:1.0", + "resources": [ + { + "type": "baud", + "speed": 12000000, + "bits": 0, + "stop_bits": 0, + "parity": 0, + "handshake": 0 + } + ], + "detail": { + "device_class": { + "hex": "00ef", + "name": "miscellaneous", + "value": 239 + }, + "device_subclass": { + "hex": "0000", + "name": "per_interface", + "value": 0 + }, + "device_protocol": 0, + "interface_class": { + "hex": "00ff", + "name": "vendor_spec", + "value": 255 + }, + "interface_subclass": { + "hex": "0000", + "name": "per_interface", + "value": 0 + }, + "interface_protocol": 0, + "interface_number": 0, + "interface_alternate_setting": 0 + }, + "hotplug": "usb", + "module_alias": "usb:v27C6p639Cd0100dcEFdsc00dp00icFFisc00ip00in00" + } + ], + "usb_controller": [ + { + "index": 14, + "attached_to": 0, + "class_list": [ + "usb_controller", + "pci" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 13 + }, + "base_class": { + "hex": "000c", + "name": "Serial bus controller", + "value": 12 + }, + "sub_class": { + "hex": "0003", + "name": "USB Controller", + "value": 3 + }, + "pci_interface": { + "hex": "0030", + "value": 48 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "9a13", + "value": 39443 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0002", + "value": 2 + }, + "model": "Intel USB Controller", + "sysfs_id": "/devices/pci0000:00/0000:00:0d.0", + "sysfs_bus_id": "0000:00:0d.0", + "detail": { + "function": 0, + "command": 1030, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 48 + }, + "driver": "xhci_hcd", + "driver_module": "xhci_pci", + "drivers": [ + "xhci_hcd" + ], + "driver_modules": [ + "xhci_pci" + ], + "module_alias": "pci:v00008086d00009A13sv00001028sd00000A89bc0Csc03i30" + }, + { + "index": 29, + "attached_to": 0, + "class_list": [ + "usb_controller", + "pci" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 20 + }, + "base_class": { + "hex": "000c", + "name": "Serial bus controller", + "value": 12 + }, + "sub_class": { + "hex": "0003", + "name": "USB Controller", + "value": 3 + }, + "pci_interface": { + "hex": "0030", + "value": 48 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "a0ed", + "value": 41197 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0030", + "value": 48 + }, + "model": "Intel USB Controller", + "sysfs_id": "/devices/pci0000:00/0000:00:14.0", + "sysfs_bus_id": "0000:00:14.0", + "detail": { + "function": 0, + "command": 1030, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 48 + }, + "driver": "xhci_hcd", + "driver_module": "xhci_pci", + "drivers": [ + "xhci_hcd" + ], + "driver_modules": [ + "xhci_pci" + ], + "module_alias": "pci:v00008086d0000A0EDsv00001028sd00000A89bc0Csc03i30" + }, + { + "index": 31, + "attached_to": 0, + "class_list": [ + "usb_controller", + "pci" + ], + "bus_type": { + "hex": "0004", + "name": "PCI", + "value": 4 + }, + "slot": { + "bus": 0, + "number": 13 + }, + "base_class": { + "hex": "000c", + "name": "Serial bus controller", + "value": 12 + }, + "sub_class": { + "hex": "0003", + "name": "USB Controller", + "value": 3 + }, + "pci_interface": { + "hex": "0040", + "value": 64 + }, + "vendor": { + "hex": "8086", + "name": "Intel Corporation", + "value": 32902 + }, + "sub_vendor": { + "hex": "1028", + "value": 4136 + }, + "device": { + "hex": "9a1b", + "value": 39451 + }, + "sub_device": { + "hex": "0a89", + "value": 2697 + }, + "revision": { + "hex": "0002", + "value": 2 + }, + "model": "Intel USB Controller", + "sysfs_id": "/devices/pci0000:00/0000:00:0d.2", + "sysfs_bus_id": "0000:00:0d.2", + "detail": { + "function": 2, + "command": 1031, + "header_type": 0, + "secondary_bus": 0, + "prog_if": 64 + }, + "driver": "thunderbolt", + "driver_module": "thunderbolt", + "drivers": [ + "thunderbolt" + ], + "driver_modules": [ + "thunderbolt" + ], + "module_alias": "pci:v00008086d00009A1Bsv00001028sd00000A89bc0Csc03i40" + } + ] + }, + "smbios": { + "bios": { + "handle": 0, + "vendor": "Dell Inc.", + "version": "2.35.0", + "date": "06/30/2025", + "features": [ + "PCI supported", + "PnP supported", + "BIOS flashable", + "BIOS shadowing allowed", + "CD boot supported", + "Selectable boot supported", + "EDD spec supported", + "Print Screen supported", + "8042 Keyboard Services supported", + "Serial Services supported", + "Printer Services supported", + "ACPI supported", + "USB Legacy supported", + "Smart Battery supported", + "BIOS Boot Spec supported", + "F12 Network boot supported" + ], + "start_address": "0x0", + "rom_size": 16777216 + }, + "board": { + "handle": 512, + "manufacturer": "Dell Inc.", + "product": "0TPG56", + "version": "A00", + "board_type": { + "hex": "000a", + "name": "Motherboard", + "value": 10 + }, + "features": [ + "Hosting Board", + "Replaceable" + ], + "location": "", + "chassis": 768 + }, + "cache": [ + { + "handle": 1792, + "socket": "L1 Cache", + "size_max": 192, + "size_current": 192, + "speed": 0, + "mode": { + "hex": "0001", + "name": "Write Back", + "value": 1 + }, + "enabled": true, + "location": { + "hex": "0000", + "name": "Internal", + "value": 0 + }, + "socketed": false, + "level": 0, + "ecc": { + "hex": "0004", + "name": "Parity", + "value": 4 + }, + "cache_type": { + "hex": "0004", + "name": "Data", + "value": 4 + }, + "associativity": { + "hex": "0009", + "name": "Other", + "value": 9 + }, + "sram_type_current": [ + "Synchronous" + ], + "sram_type_supported": [ + "Synchronous" + ] + }, + { + "handle": 1793, + "socket": "L1 Cache", + "size_max": 128, + "size_current": 128, + "speed": 0, + "mode": { + "hex": "0001", + "name": "Write Back", + "value": 1 + }, + "enabled": true, + "location": { + "hex": "0000", + "name": "Internal", + "value": 0 + }, + "socketed": false, + "level": 0, + "ecc": { + "hex": "0004", + "name": "Parity", + "value": 4 + }, + "cache_type": { + "hex": "0003", + "name": "Instruction", + "value": 3 + }, + "associativity": { + "hex": "0007", + "name": "8-way Set-Associative", + "value": 7 + }, + "sram_type_current": [ + "Synchronous" + ], + "sram_type_supported": [ + "Synchronous" + ] + }, + { + "handle": 1794, + "socket": "L2 Cache", + "size_max": 5120, + "size_current": 5120, + "speed": 0, + "mode": { + "hex": "0001", + "name": "Write Back", + "value": 1 + }, + "enabled": true, + "location": { + "hex": "0000", + "name": "Internal", + "value": 0 + }, + "socketed": false, + "level": 1, + "ecc": { + "hex": "0005", + "name": "Single-bit", + "value": 5 + }, + "cache_type": { + "hex": "0005", + "name": "Unified", + "value": 5 + }, + "associativity": { + "hex": "0001", + "name": "Other", + "value": 1 + }, + "sram_type_current": [ + "Synchronous" + ], + "sram_type_supported": [ + "Synchronous" + ] + }, + { + "handle": 1795, + "socket": "L3 Cache", + "size_max": 12288, + "size_current": 12288, + "speed": 0, + "mode": { + "hex": "0001", + "name": "Write Back", + "value": 1 + }, + "enabled": true, + "location": { + "hex": "0000", + "name": "Internal", + "value": 0 + }, + "socketed": false, + "level": 2, + "ecc": { + "hex": "0006", + "name": "Multi-bit", + "value": 6 + }, + "cache_type": { + "hex": "0005", + "name": "Unified", + "value": 5 + }, + "associativity": { + "hex": "0009", + "name": "Other", + "value": 9 + }, + "sram_type_current": [ + "Synchronous" + ], + "sram_type_supported": [ + "Synchronous" + ] + } + ], + "chassis": [ + { + "handle": 768, + "manufacturer": "Dell Inc.", + "version": "", + "chassis_type": { + "hex": "001f", + "name": "Other", + "value": 31 + }, + "lock_present": false, + "bootup_state": { + "hex": "0003", + "name": "Safe", + "value": 3 + }, + "power_state": { + "hex": "0003", + "name": "Safe", + "value": 3 + }, + "thermal_state": { + "hex": "0003", + "name": "Safe", + "value": 3 + }, + "security_state": { + "hex": "0003", + "name": "None", + "value": 3 + }, + "oem": "0x0" + } + ], + "config": { + "handle": 3072, + "options": [ + "J6H1:1-X Boot with Default; J8H1:1-X BIOS RECOVERY" + ] + }, + "group_associations": [ + { + "handle": 3584, + "name": "$MEI", + "handles": [ + 0 + ] + }, + { + "handle": 3585, + "name": "Firmware Version Info", + "handles": [ + 225404178713856, + 225408473681153, + 225412768648450, + 225417063615747, + 225421358583044, + 225425653550341, + 52486 + ] + } + ], + "language": [ + { + "handle": 3328, + "languages": [ + "enUS" + ] + } + ], + "memory_array": [ + { + "handle": 4096, + "location": { + "hex": "0003", + "name": "Motherboard", + "value": 3 + }, + "usage": { + "hex": "0003", + "name": "System memory", + "value": 3 + }, + "ecc": { + "hex": "0003", + "name": "None", + "value": 3 + }, + "max_size": "0x1000000", + "error_handle": 65534, + "slots": 2 + } + ], + "memory_array_mapped_address": [ + { + "handle": 4864, + "array_handle": 4096, + "start_address": "0x0", + "end_address": "0x300000000", + "part_width": 2 + } + ], + "memory_device": [ + { + "handle": 4352, + "location": "DIMM 1", + "bank_location": "BANK 0", + "manufacturer": "80AD000080AD", + "part_number": "HMAA1GS6CJR6N-XN", + "array_handle": 4096, + "error_handle": 65534, + "width": 64, + "ecc_bits": 0, + "size": 8388608, + "form_factor": { + "hex": "000d", + "name": "SODIMM", + "value": 13 + }, + "set": 0, + "memory_type": { + "hex": "001a", + "name": "Other", + "value": 26 + }, + "memory_type_details": [ + "Synchronous" + ], + "speed": 3200 + }, + { + "handle": 4356, + "location": "DIMM 2", + "bank_location": "BANK 0", + "manufacturer": "802C0000802C", + "part_number": "4ATF51264HZ-3G2J1", + "array_handle": 4096, + "error_handle": 65534, + "width": 64, + "ecc_bits": 0, + "size": 4194304, + "form_factor": { + "hex": "000d", + "name": "SODIMM", + "value": 13 + }, + "set": 0, + "memory_type": { + "hex": "001a", + "name": "Other", + "value": 26 + }, + "memory_type_details": [ + "Synchronous" + ], + "speed": 3200 + } + ], + "pointing_device": [ + { + "handle": 5376, + "mouse_type": { + "hex": "0007", + "name": "Touch Pad", + "value": 7 + }, + "interface": { + "hex": "0007", + "name": "Bus Mouse", + "value": 7 + }, + "buttons": 2 + } + ], + "power_controls": [ + { + "handle": 6400, + "month": 0, + "day": 0, + "hour": 0, + "minute": 0, + "second": 0 + } + ], + "processor": [ + { + "handle": 1024, + "socket": "U3E1", + "socket_type": { + "hex": "0001", + "name": "Other", + "value": 1 + }, + "socket_populated": true, + "manufacturer": "Intel(R) Corporation", + "version": "11th Gen Intel(R) Core(TM) i7-1195G7 @ 2.90GHz", + "part": "", + "processor_type": { + "hex": "0003", + "name": "CPU", + "value": 3 + }, + "processor_family": { + "hex": "00c6", + "name": "Other", + "value": 198 + }, + "processor_status": { + "hex": "0001", + "name": "Enabled", + "value": 1 + }, + "clock_ext": 100, + "clock_max": 5000, + "cache_handle_l1": 1793, + "cache_handle_l2": 1794, + "cache_handle_l3": 1795 + } + ], + "slot": [ + { + "handle": 2304, + "designation": "PCI-Express 0", + "slot_type": { + "hex": "00aa", + "name": "Other", + "value": 170 + }, + "bus_width": { + "hex": "000d", + "name": "Other", + "value": 13 + }, + "usage": { + "hex": "0004", + "name": "In Use", + "value": 4 + }, + "length": { + "hex": "0004", + "name": "Long", + "value": 4 + }, + "id": 0, + "features": [ + "3.3 V", + "PME#", + "Hot-Plug" + ] + }, + { + "handle": 2305, + "designation": "PCI-Express 1", + "slot_type": { + "hex": "00a5", + "name": "Other", + "value": 165 + }, + "bus_width": { + "hex": "0008", + "name": "Other", + "value": 8 + }, + "usage": { + "hex": "0003", + "name": "Available", + "value": 3 + }, + "length": { + "hex": "0004", + "name": "Long", + "value": 4 + }, + "id": 1, + "features": [ + "3.3 V", + "PME#", + "Hot-Plug" + ] + }, + { + "handle": 2306, + "designation": "PCI-Express 2", + "slot_type": { + "hex": "00a5", + "name": "Other", + "value": 165 + }, + "bus_width": { + "hex": "0008", + "name": "Other", + "value": 8 + }, + "usage": { + "hex": "0004", + "name": "In Use", + "value": 4 + }, + "length": { + "hex": "0004", + "name": "Long", + "value": 4 + }, + "id": 2, + "features": [ + "3.3 V", + "PME#", + "Hot-Plug" + ] + } + ], + "system": { + "handle": 256, + "manufacturer": "Dell Inc.", + "product": "Inspiron 14 5410 2-in-1", + "version": "", + "wake_up": { + "hex": "0003", + "name": "APM Timer", + "value": 3 + } + } + } +} \ No newline at end of file diff --git a/hosts/laptop/hardware-configuration.nix b/hosts/laptop/hardware-configuration.nix deleted file mode 100644 index 6c770cc..0000000 --- a/hosts/laptop/hardware-configuration.nix +++ /dev/null @@ -1,25 +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" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - # 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.wlp0s20f3.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; -} \ No newline at end of file diff --git a/hosts/laptop/hardware/default.nix b/hosts/laptop/hardware/default.nix index 857b892..8db86b9 100644 --- a/hosts/laptop/hardware/default.nix +++ b/hosts/laptop/hardware/default.nix @@ -3,4 +3,12 @@ ./mounts.nix ./power-savings ]; + + config = { + services = { + thermald.enable = true; + + fprintd.enable = true; + }; + }; } \ No newline at end of file diff --git a/lib/default.nix b/lib/default.nix index fe06b3d..6908471 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -10,6 +10,7 @@ let self' = { flakes = callLib ./flakes.nix; + facter = callLib ./facter; options = callLib ./options.nix // prev.options; path = callLib ./path.nix // prev.path; diff --git a/lib/facter/default.nix b/lib/facter/default.nix new file mode 100644 index 0000000..07c770c --- /dev/null +++ b/lib/facter/default.nix @@ -0,0 +1,23 @@ +{ + lib, + ... +}: +let + callLib = file: import file { + inherit lib; + + # Used by all lib functions to immediately return false if this is false. + facterGuard = config: + config.facter.reportPath != null; + }; + + # NOTE: many of these definitions are incomplete, due to lacking hardware. + # If at any point the definitions can be completed, consider doing so, and + # subsequently consider upstreaming. + self' = { + disk = callLib ./disk.nix; + gpu = callLib ./gpu.nix; + machine = callLib ./machine.nix; + }; +in + self' \ No newline at end of file diff --git a/lib/facter/disk.nix b/lib/facter/disk.nix new file mode 100644 index 0000000..65076ad --- /dev/null +++ b/lib/facter/disk.nix @@ -0,0 +1,14 @@ +{ + lib, + + facterGuard, + ... +}: +let + self' = { + isNVMe = config: facterGuard config && + (config.facter.report.hardware.disk + |> lib.any (x: x.driver == "nvme")); + }; +in + self' \ No newline at end of file diff --git a/lib/facter/gpu.nix b/lib/facter/gpu.nix new file mode 100644 index 0000000..db0e21d --- /dev/null +++ b/lib/facter/gpu.nix @@ -0,0 +1,19 @@ +{ + lib, + + facterGuard, + ... +}: +let + self' = { + isTigerlake = config: facterGuard config && + (config.facter.report.hardware.graphics_card + |> lib.any (x: + # Intel Corporation + x.vendor.hex == "8086" + # TigerLake-LP GT2 + && x.device.hex == "9a49" + )); + }; +in + self' \ No newline at end of file diff --git a/lib/facter/machine.nix b/lib/facter/machine.nix new file mode 100644 index 0000000..9068401 --- /dev/null +++ b/lib/facter/machine.nix @@ -0,0 +1,11 @@ +{ + facterGuard, + ... +}: +let + self' = { + isPhysical = config: facterGuard config && + (config.facter.report.virtualisation == "none"); + }; +in + self' \ No newline at end of file diff --git a/lib/flakes.nix b/lib/flakes.nix index e53fee2..a970cdf 100644 --- a/lib/flakes.nix +++ b/lib/flakes.nix @@ -4,21 +4,80 @@ ... }: let + # TODO: this doesn't clearly communicate the intent of how modules should be + # structured in the shared directory. From just this snippet, it appears that + # modules should be in the form `/{nixos.nix,home-manager.nix}`, + # but I'm doing `/{config,options}/{nixos.nix,home-manager.nix}`. + # + # There should be a strict requirement here, I'm not sure whether I want to + # enforce the `config/options` directory or `nixos/home-manager` as the first + # directory. I can see valid use-cases for both.. + sharedNixOSEntrypoints = [ "nixos.nix" "nixos" ]; + sharedHomeManagerEntrypoints = [ "home-manager.nix" "home-manager" ]; + + levelEntrypoints = [ + "module.nix" + + "config.nix" "config" + "options.nix" "options" + ]; + + # Accept any/all of the entrypoints. This is slightly better than using + # `lib.filesystem.listFilesRecursive` because the recursion can be forcibly + # stopped early when valid imports are found, saving on precious I/O time + # that could be used elsewhere. + # + # NOTE: There is no error or duplication checking. A module can multiple of + # these things, which can possibly cause duplicate definitions. + listFilesRecursive = (modulesPath: moduleEntrypoints: + let + entries = builtins.readDir modulesPath; + importOptional = file: lib.optional (entries ? "${file}") (modulesPath + "/${file}"); + + modules = + map importOptional moduleEntrypoints + |> lib.flatten; + in + # Does not recurse when valid import files are found. + modules ++ lib.optionals (modules == []) (entries + |> lib.filterAttrs (_: value: value == "directory") + |> lib.mapAttrsToList (name: _: listFilesRecursive (modulesPath + "/${name}") moduleEntrypoints) + |> lib.flatten) + ); + + # Wrap in an extremely hacky functor to extend arguments given into the + # module without using the extra upper function of upstream's implementation + # of `lib.importApply`. + importApply = (_file: extraArgs: + let + imported = import _file; + in { + # args = { config, lib, modulesPath, options, pkgs, ... } + __functor = _: args: (imported (args // extraArgs)) // { + inherit _file; # better error reporting in the module system + }; + + __functionArgs = lib.functionArgs imported; + }); + self' = { - mkModules = (modulesPath: { ... } @ extraArgs: { - imports = lib.filesystem.listFilesRecursive modulesPath - |> lib.filter (lib.hasSuffix "module.nix") - |> map (mod: - let - imported = import mod; - in { - # args = { config, lib, modulesPath, options, pkgs, ... } - __functor = _: args: (imported (args // extraArgs)) // { - _file = mod; # better error reporting in the module system - }; - __functionArgs = lib.functionArgs imported; - } - ); + mkModules = (directory: { ... } @ extraArgs: + let + levelNixOS = listFilesRecursive (directory + "/nixos") levelEntrypoints; + levelHomeManager = listFilesRecursive (directory + "/home-manager") levelEntrypoints; + + # TODO: performance penalties for iterating this same directory twice. + # Should it be merged into one operation, and separated later? + sharedNixOS = listFilesRecursive (directory + "/shared") sharedNixOSEntrypoints; + sharedHomeManager = listFilesRecursive (directory + "/shared") sharedHomeManagerEntrypoints; + in { + imports = map (file: + importApply file extraArgs + ) (levelNixOS ++ sharedNixOS); + + config.home-manager.sharedModules = map (file: + importApply file extraArgs + ) (levelHomeManager ++ sharedHomeManager); }); mkNixOSConfigurations = (system: list: list @@ -43,7 +102,7 @@ let mkPackages = (pkgs: directory: builtins.readDir directory |> lib.mapAttrs (name: _: - pkgs.callPackage "${directory}/${name}/nix/package.nix" {} + pkgs.callPackage (directory + "/${name}/nix/package.nix") {} ) ); diff --git a/modules/common/my/persist/module.nix b/modules/common/my/persist/module.nix deleted file mode 100644 index 39f4dc1..0000000 --- a/modules/common/my/persist/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options - ./config - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/app2unit/module.nix b/modules/home-manager/my/programs/app2unit/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/app2unit/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/bat/module.nix b/modules/home-manager/my/programs/bat/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/bat/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/doggo/module.nix b/modules/home-manager/my/programs/doggo/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/doggo/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/duf/module.nix b/modules/home-manager/my/programs/duf/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/duf/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/dust/module.nix b/modules/home-manager/my/programs/dust/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/dust/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/element/module.nix b/modules/home-manager/my/programs/element/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/element/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/fastfetch/module.nix b/modules/home-manager/my/programs/fastfetch/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/fastfetch/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/fd/module.nix b/modules/home-manager/my/programs/fd/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/fd/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/gnupg/module.nix b/modules/home-manager/my/programs/gnupg/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/gnupg/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/hyperfine/module.nix b/modules/home-manager/my/programs/hyperfine/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/hyperfine/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/inxi/module.nix b/modules/home-manager/my/programs/inxi/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/inxi/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/inxi/options.nix b/modules/home-manager/my/programs/inxi/options.nix index 8e9c751..8f6e8bd 100644 --- a/modules/home-manager/my/programs/inxi/options.nix +++ b/modules/home-manager/my/programs/inxi/options.nix @@ -8,7 +8,10 @@ my.programs.inxi = { enable = lib.mkDefaultEnableOption "inxi"; package = lib.mkOption { - default = pkgs.callPackage ./package.nix {}; + default = pkgs.inxi; + apply = inxi: pkgs.callPackage ./package.nix { + inherit inxi; + }; type = with lib.types; package; }; diff --git a/modules/home-manager/my/programs/inxi/package.nix b/modules/home-manager/my/programs/inxi/package.nix index afa9aee..b5b20d5 100644 --- a/modules/home-manager/my/programs/inxi/package.nix +++ b/modules/home-manager/my/programs/inxi/package.nix @@ -5,33 +5,53 @@ inxi, - bluez, + # `inxi --recommnds` system programs bluez-tools, - busybox, dig, dmidecode, + file, + hddtemp, + iproute2, + kmod, lm_sensors, + lvm2, + mdadm, + pciutils, + procps, smartmontools, - toybox, + tree, usbutils, - virtualgl, + + # `inxi --recommends` display information programs + mesa-demos, vulkan-tools, wayland-utils, + wlr-randr, + xrandr, }: let runtimeInputs = [ - bluez bluez-tools - busybox dig dmidecode + file + hddtemp + iproute2 + kmod lm_sensors + lvm2 + mdadm + pciutils + procps smartmontools - toybox + tree usbutils - virtualgl + + mesa-demos vulkan-tools wayland-utils + wlr-randr + xrandr ]; in symlinkJoin { name = "inxi"; diff --git a/modules/home-manager/my/programs/legcord/module.nix b/modules/home-manager/my/programs/legcord/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/legcord/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/libreoffice/module.nix b/modules/home-manager/my/programs/libreoffice/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/libreoffice/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/microsoft-edge/module.nix b/modules/home-manager/my/programs/microsoft-edge/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/microsoft-edge/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/neovim/config.nix b/modules/home-manager/my/programs/neovim/config.nix new file mode 100644 index 0000000..45a7b24 --- /dev/null +++ b/modules/home-manager/my/programs/neovim/config.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + ... +}: +let + cfg = config.my.programs.neovim; +in { + config = lib.mkIf cfg.enable { + my.persist.directories = [{ + path = "~/.local/state/nvim"; + unique = false; + }]; + + + home.packages = [ + cfg.package + ]; + + home.sessionVariables = { + EDITOR = "nvim"; + }; + }; +} \ No newline at end of file diff --git a/modules/home-manager/my/programs/neovim/module.nix b/modules/home-manager/my/programs/neovim/module.nix deleted file mode 100644 index a72f1bb..0000000 --- a/modules/home-manager/my/programs/neovim/module.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - cfg = config.my.programs.neovim; - - pluginSubmodule = { - options = { - bins = lib.mkOption { - default = []; - - type = with lib.types; listOf package; - }; - - plugins = lib.mkOption { - default = null; - - type = with lib.types; listOf package; - }; - - config = lib.mkOption { - default = ""; - - type = with lib.types; lines; - }; - }; - }; -in { - options.my.programs.neovim = { - enable = lib.mkDefaultEnableOption "neovim"; - package = lib.mkOption { - default = pkgs.callPackage ./package.nix { - extraBins = cfg.extraBins ++ - (lib.flatten (map (e: e.bins) cfg.plugins)); - - plugins = lib.flatten (map (e: e.plugins) cfg.plugins); - }; - - type = with lib.types; package; - }; - - extraBins = lib.mkOption { - default = []; - - type = with lib.types; listOf package; - }; - - init = lib.mkOption { - default = ""; - - type = with lib.types; lines; - }; - - plugins = lib.mkOption { - default = []; - - type = with lib.types; listOf (coercedTo package (plugins: { - inherit plugins; - }) (submodule pluginSubmodule)); - }; - }; - - config = lib.mkIf cfg.enable { - my.persist.directories = [{ - path = "~/.local/state/nvim"; - unique = false; - }]; - - xdg.configFile."nvim/init.lua".text = '' - ${cfg.init} - - ${lib.concatStringsSep "\n" (map (e: e.config) cfg.plugins)} - ''; - - home.packages = [ cfg.package ]; - home.sessionVariables = { - EDITOR = "nvim"; - }; - }; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/neovim/options.nix b/modules/home-manager/my/programs/neovim/options.nix new file mode 100644 index 0000000..c917088 --- /dev/null +++ b/modules/home-manager/my/programs/neovim/options.nix @@ -0,0 +1,80 @@ +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.my.programs.neovim; + + pluginsSubmodule = { + options = { + config = lib.mkOption { + default = ""; + + type = with lib.types; lines; + }; + } // lib.genAttrs [ "bins" "plugins" ] (_: lib.mkOption { + default = []; + + type = with lib.types; listOf package; + }); + }; +in { + options = { + my.programs.neovim = { + enable = lib.mkDefaultEnableOption "neovim"; + + package = lib.mkOption { + default = pkgs.neovim-unwrapped; + apply = neovim-unwrapped: pkgs.callPackage ./package.nix { + inherit neovim-unwrapped; + + bins = cfg.extraBins ++ ( + cfg.plugins + |> map (e: e.bins) + |> lib.flatten + ); + + plugins = ( + cfg.plugins + |> map (e: e.plugins) + |> lib.flatten + ); + + config = pkgs.writeText "init.lua" '' + ${cfg.extraConfig} + + ${lib.concatStringsSep "\n" ( + cfg.plugins + |> map (e: e.config) + )} + ''; + }; + + type = with lib.types; package; + }; + + + plugins = lib.mkOption { + default = []; + + type = with lib.types; listOf (coercedTo package (plugins: { + inherit plugins; + }) (submodule pluginsSubmodule)); + }; + + extraBins = lib.mkOption { + default = []; + + type = with lib.types; listOf package; + }; + + extraConfig = lib.mkOption { + default = []; + + type = with lib.types; lines; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/home-manager/my/programs/neovim/package.nix b/modules/home-manager/my/programs/neovim/package.nix index ae14e0e..c86e635 100644 --- a/modules/home-manager/my/programs/neovim/package.nix +++ b/modules/home-manager/my/programs/neovim/package.nix @@ -6,8 +6,9 @@ neovim-unwrapped, # from module - extraBins, + bins, plugins, + config, }: wrapNeovimUnstable neovim-unwrapped (neovimUtils.makeNeovimConfig { # withPython3 = true; @@ -18,5 +19,9 @@ wrapNeovimUnstable neovim-unwrapped (neovimUtils.makeNeovimConfig { wrapRc = false; } // { - wrapperArgs = lib.escapeShellArgs [ "--prefix" "PATH" ":" "${lib.makeBinPath extraBins}" ]; + wrapperArgs = lib.escapeShellArgs [ + "--prefix" "PATH" ":" "${lib.makeBinPath bins}" + "--add-flags" "-u" + "--add-flags" "${config}" + ]; }) \ No newline at end of file diff --git a/modules/home-manager/my/programs/patool/module.nix b/modules/home-manager/my/programs/patool/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/patool/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/ripgrep/module.nix b/modules/home-manager/my/programs/ripgrep/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/ripgrep/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/swayosd/module.nix b/modules/home-manager/my/programs/swayosd/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/swayosd/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/thunar/module.nix b/modules/home-manager/my/programs/thunar/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/thunar/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/vscode/config.nix b/modules/home-manager/my/programs/vscode/config.nix deleted file mode 100644 index f9a6507..0000000 --- a/modules/home-manager/my/programs/vscode/config.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - cfg = config.my.programs.vscode; - fmt = pkgs.formats.json {}; - - vscode = pkgs.callPackage ./package.nix { - withExtensions = cfg.extensions; - withPackages = cfg.packages; - }; -in { - config = lib.mkIf cfg.enable { - my.persist.directories = [ - "~/.config/Code" - ]; - - home.packages = [ - vscode - ]; - - xdg.configFile."Code/User/settings.json".source = - fmt.generate "settings.json" cfg.settings; - }; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/vscode/module.nix b/modules/home-manager/my/programs/vscode/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/home-manager/my/programs/vscode/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/vscode/options.nix b/modules/home-manager/my/programs/vscode/options.nix deleted file mode 100644 index 5b69fc0..0000000 --- a/modules/home-manager/my/programs/vscode/options.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - lib, - pkgs, - ... -}: -let - fmt = pkgs.formats.json {}; -in { - options = { - my.programs.vscode = { - enable = lib.mkEnableOption "vscode"; - - extensions = lib.mkOption { - default = []; - - type = with lib.types; listOf package; - }; - - packages = lib.mkOption { - default = _: []; - - type = with lib.types; functionTo (listOf package); - }; - - settings = lib.mkOption { - default = {}; - - type = fmt.type; - }; - }; - }; -} \ No newline at end of file diff --git a/modules/home-manager/my/programs/vscode/package.nix b/modules/home-manager/my/programs/vscode/package.nix deleted file mode 100644 index 472592d..0000000 --- a/modules/home-manager/my/programs/vscode/package.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - vscode, - vscode-with-extensions, - - withExtensions ? [], - withPackages ? (pkgs: []), -}: -vscode-with-extensions.override { - vscode = vscode.fhsWithPackages withPackages; - - vscodeExtensions = withExtensions; -} \ No newline at end of file diff --git a/modules/home-manager/programs/git/module.nix b/modules/home-manager/programs/git/module.nix index a101d56..fd209f6 100644 --- a/modules/home-manager/programs/git/module.nix +++ b/modules/home-manager/programs/git/module.nix @@ -21,7 +21,7 @@ in { ".envrc" ]; - extraConfig = { + settings = { commit.gpgSign = true; tag.gpgSign = true; diff --git a/modules/home-manager/programs/vscode/module.nix b/modules/home-manager/programs/vscode/module.nix new file mode 100644 index 0000000..91fc5b3 --- /dev/null +++ b/modules/home-manager/programs/vscode/module.nix @@ -0,0 +1,14 @@ +{ + config, + lib, + ... +}: +let + cfg = config.programs.vscode; +in { + config = lib.mkIf cfg.enable { + my.persist.directories = [ + "~/.config/Code" + ]; + }; +} \ No newline at end of file diff --git a/modules/nixos/facter/report/hardware/disk/module.nix b/modules/nixos/facter/report/hardware/disk/module.nix new file mode 100644 index 0000000..a8a4abe --- /dev/null +++ b/modules/nixos/facter/report/hardware/disk/module.nix @@ -0,0 +1,14 @@ +{ + config, + lib, + ... +}: +let + validDisk = lib.facter.disk.isNVMe config; +in { + # TODO: way too opinionated. This is unsuitable for here and should be dropped + # if/when there is a proper upstream module for Intel graphics. + config = lib.mkIf validDisk { + services.fstrim.enable = lib.mkDefault true; + }; +} \ No newline at end of file diff --git a/modules/nixos/facter/report/hardware/graphics_card/module.nix b/modules/nixos/facter/report/hardware/graphics_card/module.nix new file mode 100644 index 0000000..e29e778 --- /dev/null +++ b/modules/nixos/facter/report/hardware/graphics_card/module.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + pkgs, + ... +}: +let + validGPU = lib.facter.gpu.isTigerlake config; +in { + # TODO: way too opinionated. This is unsuitable for here and should be dropped + # if/when there is a proper upstream module for Intel graphics. + config = lib.mkIf validGPU { + boot.kernelParams = [ "i915.enable_guc=3" ]; + + hardware.graphics.extraPackages = with pkgs; [ + intel-media-driver + intel-compute-runtime + vpl-gpu-rt + ]; + }; +} \ No newline at end of file diff --git a/modules/nixos/hardware/module.nix b/modules/nixos/hardware/module.nix index 95bf4d2..4694abe 100644 --- a/modules/nixos/hardware/module.nix +++ b/modules/nixos/hardware/module.nix @@ -1,10 +1,10 @@ { - config, lib, + pkgs, ... }: { - config = lib.mkIf config.nixpkgs.config.allowUnfree { + config = lib.mkIf pkgs.config.allowUnfree { # An easy catch-all to enable all possible firmware needed by the system. hardware.enableAllFirmware = true; }; diff --git a/modules/nixos/home-manager/my/desktops/gnome/module.nix b/modules/nixos/home-manager/my/desktops/gnome/module.nix deleted file mode 100644 index f2dbf63..0000000 --- a/modules/nixos/home-manager/my/desktops/gnome/module.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - ... -}: -{ - config = { - home-manager.sharedModules = [ - ./options.nix - ./config.nix - ]; - }; -} \ No newline at end of file diff --git a/modules/nixos/home-manager/my/desktops/niri/module.nix b/modules/nixos/home-manager/my/desktops/niri/module.nix deleted file mode 100644 index f2dbf63..0000000 --- a/modules/nixos/home-manager/my/desktops/niri/module.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - ... -}: -{ - config = { - home-manager.sharedModules = [ - ./options.nix - ./config.nix - ]; - }; -} \ No newline at end of file diff --git a/modules/nixos/home-manager/my/services/yubico/module.nix b/modules/nixos/home-manager/my/services/yubico/module.nix deleted file mode 100644 index fa54126..0000000 --- a/modules/nixos/home-manager/my/services/yubico/module.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - ... -}: -{ - config = { - home-manager.sharedModules = [ - ./config.nix - ]; - }; -} \ No newline at end of file diff --git a/modules/nixos/home-manager/my/services/yubico/yubikey-manager.nix b/modules/nixos/home-manager/my/services/yubico/yubikey-manager.nix deleted file mode 100644 index 1e68a75..0000000 --- a/modules/nixos/home-manager/my/services/yubico/yubikey-manager.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - python3Packages, - installShellFiles, - procps, -}: - -python3Packages.buildPythonPackage rec { - pname = "yubikey-manager"; - version = "5.7.2"; - pyproject = true; - - src = fetchFromGitHub { - owner = "Yubico"; - repo = "yubikey-manager"; - tag = version; - hash = "sha256-dgOi9gJ7jO3+EjZQjHfx+KDsBtj6b4JWR3Bp9xWM6FI="; - }; - - postPatch = '' - substituteInPlace "ykman/pcsc/__init__.py" \ - --replace 'pkill' '${if stdenv.hostPlatform.isLinux then procps else "/usr"}/bin/pkill' - ''; - - nativeBuildInputs = with python3Packages; [ - poetry-core - installShellFiles - ]; - - propagatedBuildInputs = with python3Packages; [ - cryptography - pyscard - fido2 - click - keyring - ]; - - pythonRelaxDeps = [ - "keyring" - ]; - - postInstall = '' - installManPage man/ykman.1 - - installShellCompletion --cmd ykman \ - --bash <(_YKMAN_COMPLETE=bash_source "$out/bin/ykman") \ - --zsh <(_YKMAN_COMPLETE=zsh_source "$out/bin/ykman") \ - --fish <(_YKMAN_COMPLETE=fish_source "$out/bin/ykman") \ - ''; - - nativeCheckInputs = with python3Packages; [ - pytestCheckHook - makefun - ]; - - meta = { - homepage = "https://developers.yubico.com/yubikey-manager"; - changelog = "https://github.com/Yubico/yubikey-manager/releases/tag/${src.tag}"; - description = "Command line tool for configuring any YubiKey over all USB transports"; - - license = lib.licenses.bsd2; - platforms = lib.platforms.unix; - maintainers = with lib.maintainers; [ - benley - lassulus - pinpox - nickcao - ]; - mainProgram = "ykman"; - }; -} \ No newline at end of file diff --git a/modules/nixos/home-manager/nix/module.nix b/modules/nixos/home-manager/nix/module.nix deleted file mode 100644 index fa54126..0000000 --- a/modules/nixos/home-manager/nix/module.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - ... -}: -{ - config = { - home-manager.sharedModules = [ - ./config.nix - ]; - }; -} \ No newline at end of file diff --git a/modules/nixos/home-manager/programs/zsh/module.nix b/modules/nixos/home-manager/programs/zsh/module.nix deleted file mode 100644 index fa54126..0000000 --- a/modules/nixos/home-manager/programs/zsh/module.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - ... -}: -{ - config = { - home-manager.sharedModules = [ - ./config.nix - ]; - }; -} \ No newline at end of file diff --git a/modules/nixos/home-manager/services/gnome/gnome-keyring/module.nix b/modules/nixos/home-manager/services/gnome/gnome-keyring/module.nix deleted file mode 100644 index fa54126..0000000 --- a/modules/nixos/home-manager/services/gnome/gnome-keyring/module.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - ... -}: -{ - config = { - home-manager.sharedModules = [ - ./config.nix - ]; - }; -} \ No newline at end of file diff --git a/modules/nixos/my/desktops/gnome/module.nix b/modules/nixos/my/desktops/gnome/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/nixos/my/desktops/gnome/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/nixos/my/desktops/niri/module.nix b/modules/nixos/my/desktops/niri/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/nixos/my/desktops/niri/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/nixos/my/programs/libimobiledevice/module.nix b/modules/nixos/my/programs/libimobiledevice/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/nixos/my/programs/libimobiledevice/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/nixos/my/programs/powertop/module.nix b/modules/nixos/my/programs/powertop/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/nixos/my/programs/powertop/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/nixos/my/services/yubico/module.nix b/modules/nixos/my/services/yubico/module.nix deleted file mode 100644 index aa5a227..0000000 --- a/modules/nixos/my/services/yubico/module.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./options.nix - ./config.nix - ]; -} \ No newline at end of file diff --git a/modules/nixos/security/sudo/module.nix b/modules/nixos/security/sudo/module.nix new file mode 100644 index 0000000..8102fa6 --- /dev/null +++ b/modules/nixos/security/sudo/module.nix @@ -0,0 +1,15 @@ +{ + config, + lib, + ... +}: +let + cfg = config.security.sudo; +in { + config = lib.mkIf cfg.enable { + my.persist.directories = [{ + path = "/var/db/sudo/lectured"; + unique = false; + }]; + }; +} \ No newline at end of file diff --git a/modules/nixos/services/fprintd/module.nix b/modules/nixos/services/fprintd/module.nix new file mode 100644 index 0000000..4129f9e --- /dev/null +++ b/modules/nixos/services/fprintd/module.nix @@ -0,0 +1,47 @@ +{ + config, + lib, + ... +}: +let + cfg = config.services.fprintd; + + cfg-gdm = config.services.displayManager.gdm; + cfg-greetd = config.services.greetd; +in { + config = lib.mkIf cfg.enable (lib.mkMerge [ + { + my.persist.directories = [{ + path = "/var/lib/fprint"; + unique = false; + }]; + } + + # Prevent fingerprint login, as it breaks UX expectations and has no + # straightforward solution. + # + # NOTE: this isn't unique to GDM, despite the issue being filed there. + # see: https://gitlab.gnome.org/GNOME/gdm/-/issues/613 + { + programs.dconf.profiles = lib.mkIf cfg-gdm.enable { + gdm.databases = [{ + lockAll = true; + + settings = { + "org/gnome/login-screen" = { + enable-fingerprint-authentication = false; + }; + }; + }]; + }; + + security.pam.services = lib.mkMerge [ + { "login".fprintAuth = false; } + + (lib.mkIf cfg-greetd.enable { + "greetd".fprintAuth = false; + }) + ]; + } + ]); +} \ No newline at end of file diff --git a/modules/nixos/services/fwupd/module.nix b/modules/nixos/services/fwupd/module.nix new file mode 100644 index 0000000..a90340c --- /dev/null +++ b/modules/nixos/services/fwupd/module.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + ... +}: +let + cfg = config.services.fwupd; + + usingFacter = config.facter.reportPath != null; + isBaremetal = config.facter.detected.virtualisation.none.enable; +in { + config = lib.mkMerge [ + (lib.mkIf (usingFacter && isBaremetal) { + # Firmware updates only make sense if we are running on a real device. + services.fwupd.enable = true; + }) + (lib.mkIf cfg.enable { + my.persist.directories = [ + { + path = "/var/cache/fwupd"; + unique = false; + } + { + path = "/var/lib/fwupd"; + unique = false; + } + ]; + }) + ]; +} \ No newline at end of file diff --git a/modules/nixos/home-manager/my/desktops/gnome/config.nix b/modules/shared/my/desktops/gnome/config/home-manager.nix similarity index 100% rename from modules/nixos/home-manager/my/desktops/gnome/config.nix rename to modules/shared/my/desktops/gnome/config/home-manager.nix diff --git a/modules/nixos/my/desktops/gnome/config.nix b/modules/shared/my/desktops/gnome/config/nixos.nix similarity index 79% rename from modules/nixos/my/desktops/gnome/config.nix rename to modules/shared/my/desktops/gnome/config/nixos.nix index 3c49aba..74b214a 100644 --- a/modules/nixos/my/desktops/gnome/config.nix +++ b/modules/shared/my/desktops/gnome/config/nixos.nix @@ -17,6 +17,11 @@ in { displayManager.gdm.enable = true; }; + # TODO: de-duplicate from Niri + environment.sessionVariables = { + "NIXOS_OZONE_WL" = 1; + }; + environment.gnome.excludePackages = with pkgs; [ epiphany ]; diff --git a/modules/nixos/home-manager/my/desktops/gnome/options.nix b/modules/shared/my/desktops/gnome/options/home-manager.nix similarity index 100% rename from modules/nixos/home-manager/my/desktops/gnome/options.nix rename to modules/shared/my/desktops/gnome/options/home-manager.nix diff --git a/modules/nixos/my/desktops/gnome/options.nix b/modules/shared/my/desktops/gnome/options/nixos.nix similarity index 100% rename from modules/nixos/my/desktops/gnome/options.nix rename to modules/shared/my/desktops/gnome/options/nixos.nix diff --git a/modules/nixos/home-manager/my/desktops/niri/config.nix b/modules/shared/my/desktops/niri/config/home-manager.nix similarity index 100% rename from modules/nixos/home-manager/my/desktops/niri/config.nix rename to modules/shared/my/desktops/niri/config/home-manager.nix diff --git a/modules/nixos/my/desktops/niri/config.nix b/modules/shared/my/desktops/niri/config/nixos.nix similarity index 89% rename from modules/nixos/my/desktops/niri/config.nix rename to modules/shared/my/desktops/niri/config/nixos.nix index faea64d..ddc2712 100644 --- a/modules/nixos/my/desktops/niri/config.nix +++ b/modules/shared/my/desktops/niri/config/nixos.nix @@ -35,6 +35,13 @@ in { enable = true; }; + # TODO: resolve this. + # + # see: https://github.com/Frontear/dotfiles/issues/63 + security.pam.services.swaylock = { + fprintAuth = false; + }; + # This is being overriden from what Niri provides by default so that it can # support other file-managers besides Nautilus, since the GNOME Portal only # defaults to Nautilus for the file chooser dialog. diff --git a/modules/nixos/home-manager/my/desktops/niri/options.nix b/modules/shared/my/desktops/niri/options/home-manager.nix similarity index 100% rename from modules/nixos/home-manager/my/desktops/niri/options.nix rename to modules/shared/my/desktops/niri/options/home-manager.nix diff --git a/modules/nixos/my/desktops/niri/options.nix b/modules/shared/my/desktops/niri/options/nixos.nix similarity index 100% rename from modules/nixos/my/desktops/niri/options.nix rename to modules/shared/my/desktops/niri/options/nixos.nix diff --git a/modules/common/my/persist/config/copy-service.nix b/modules/shared/my/persist/config/nixos/copy-service.nix similarity index 100% rename from modules/common/my/persist/config/copy-service.nix rename to modules/shared/my/persist/config/nixos/copy-service.nix diff --git a/modules/common/my/persist/config/default.nix b/modules/shared/my/persist/config/nixos/default.nix similarity index 84% rename from modules/common/my/persist/config/default.nix rename to modules/shared/my/persist/config/nixos/default.nix index 512ebe4..793d304 100644 --- a/modules/common/my/persist/config/default.nix +++ b/modules/shared/my/persist/config/nixos/default.nix @@ -27,10 +27,13 @@ in { path = "/var/log"; unique = true; } - ] ++ lib.optionals config.security.sudo.enable [{ - path = "/var/db/sudo/lectured"; # preferential. - unique = false; - }]; + { + # contrary to the name, it's intended to hold persistent data. + # see: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s15.html + path = "/var/tmp"; + unique = true; + } + ]; files = [ { @@ -54,8 +57,8 @@ in { # save it, which causes the service to fail. # # This doesn't matter at all for our setup because we have the confidence - # in knowing the file is safe. If for some reason it's not, then that was - # a concious decision by the user and they can handle the problems with it. + # in knowing the file is safe. If for some reason it's not, then that was a + # conscious decision by the user and they can handle the problems with it. boot.initrd.systemd.suppressedUnits = [ "systemd-machine-id-commit.service" ]; systemd.suppressedSystemUnits = [ "systemd-machine-id-commit.service" ]; }; diff --git a/modules/common/my/persist/config/initrd-mount-service.nix b/modules/shared/my/persist/config/nixos/initrd-mount-service.nix similarity index 100% rename from modules/common/my/persist/config/initrd-mount-service.nix rename to modules/shared/my/persist/config/nixos/initrd-mount-service.nix diff --git a/modules/common/my/persist/config/remount-service.nix b/modules/shared/my/persist/config/nixos/remount-service.nix similarity index 100% rename from modules/common/my/persist/config/remount-service.nix rename to modules/shared/my/persist/config/nixos/remount-service.nix diff --git a/modules/common/my/persist/options/paths.nix b/modules/shared/my/persist/options/_utils.nix similarity index 50% rename from modules/common/my/persist/options/paths.nix rename to modules/shared/my/persist/options/_utils.nix index 78bcade..b5bfcb0 100644 --- a/modules/common/my/persist/options/paths.nix +++ b/modules/shared/my/persist/options/_utils.nix @@ -1,6 +1,5 @@ { lib, - ... }: let pathSubmodule = coercedType: coercedFunc: { @@ -14,7 +13,7 @@ let }; }; }; - +in { mkOption' = { coercedType, coercedFunc, unique }: lib.genAttrs [ "directories" "files" ] (_: lib.mkOption { default = []; @@ -23,28 +22,4 @@ let inherit path unique; }) (submodule (pathSubmodule coercedType coercedFunc))); }); -in { - options = { - my.persist = mkOption' { - coercedType = with lib.types; systemPath; - coercedFunc = lib.id; - - # System state usually wants to be shared - unique = false; - }; - }; - - config = { - home-manager.sharedModules = [({ config, ... }: { - options = { - my.persist = mkOption' { - coercedType = with lib.types; userPath; - coercedFunc = lib.replaceStrings [ "~" ] [ config.home.homeDirectory ]; - - # User state usually wants to be unique - unique = true; - }; - }; - })]; - }; } \ No newline at end of file diff --git a/modules/shared/my/persist/options/home-manager.nix b/modules/shared/my/persist/options/home-manager.nix new file mode 100644 index 0000000..eee44b2 --- /dev/null +++ b/modules/shared/my/persist/options/home-manager.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + ... +}: +let + utils = import ./_utils.nix { inherit lib; }; +in { + options = { + my.persist = utils.mkOption' { + coercedType = with lib.types; userPath; + coercedFunc = lib.replaceStrings [ "~" ] [ config.home.homeDirectory ]; + + # User state usually wants to be unique + unique = true; + }; + }; +} \ No newline at end of file diff --git a/modules/common/my/persist/options/default.nix b/modules/shared/my/persist/options/nixos/default.nix similarity index 100% rename from modules/common/my/persist/options/default.nix rename to modules/shared/my/persist/options/nixos/default.nix diff --git a/modules/shared/my/persist/options/nixos/paths.nix b/modules/shared/my/persist/options/nixos/paths.nix new file mode 100644 index 0000000..71164c3 --- /dev/null +++ b/modules/shared/my/persist/options/nixos/paths.nix @@ -0,0 +1,17 @@ +{ + lib, + ... +}: +let + utils = import ../_utils.nix { inherit lib; }; +in { + options = { + my.persist = utils.mkOption' { + coercedType = with lib.types; systemPath; + coercedFunc = lib.id; + + # System state usually wants to be shared + unique = false; + }; + }; +} \ No newline at end of file diff --git a/modules/common/my/persist/options/toplevel.nix b/modules/shared/my/persist/options/nixos/toplevel.nix similarity index 100% rename from modules/common/my/persist/options/toplevel.nix rename to modules/shared/my/persist/options/nixos/toplevel.nix diff --git a/modules/nixos/home-manager/my/services/yubico/config.nix b/modules/shared/my/services/yubico/config/home-manager/default.nix similarity index 56% rename from modules/nixos/home-manager/my/services/yubico/config.nix rename to modules/shared/my/services/yubico/config/home-manager/default.nix index 8e78f55..721ecfa 100644 --- a/modules/nixos/home-manager/my/services/yubico/config.nix +++ b/modules/shared/my/services/yubico/config/home-manager/default.nix @@ -7,15 +7,6 @@ }: let cfg = nixosConfig.my.services.yubico; - - # Temporary extension to `pkgs` to fix an upstream incompatibility between - # `yubikey-manager` and `yubioath-flutter`. - # - # TODO: drop with https://github.com/NixOS/nixpkgs/issues/442315 - pkgs' = pkgs.extend (final: prev: { - # from: https://github.com/NixOS/nixpkgs/blob/3a75333d2d9e9114e0d8223f8bcd9d3b32c6401f/pkgs/by-name/yu/yubikey-manager/package.nix - yubikey-manager = prev.callPackage ./yubikey-manager.nix {}; - }); in { config = lib.mkIf cfg.enable { my.persist.directories = [ @@ -29,7 +20,7 @@ in { } ]; - home.packages = with pkgs'; [ + home.packages = with pkgs; [ yubikey-manager yubioath-flutter ]; diff --git a/modules/nixos/my/services/yubico/config.nix b/modules/shared/my/services/yubico/config/nixos.nix similarity index 100% rename from modules/nixos/my/services/yubico/config.nix rename to modules/shared/my/services/yubico/config/nixos.nix diff --git a/modules/nixos/my/services/yubico/options.nix b/modules/shared/my/services/yubico/options/nixos.nix similarity index 100% rename from modules/nixos/my/services/yubico/options.nix rename to modules/shared/my/services/yubico/options/nixos.nix diff --git a/modules/nixos/home-manager/nix/config.nix b/modules/shared/nix/config/home-manager.nix similarity index 100% rename from modules/nixos/home-manager/nix/config.nix rename to modules/shared/nix/config/home-manager.nix diff --git a/modules/nixos/nix/module.nix b/modules/shared/nix/config/nixos/default.nix similarity index 94% rename from modules/nixos/nix/module.nix rename to modules/shared/nix/config/nixos/default.nix index 850930c..e4a2c3b 100644 --- a/modules/nixos/nix/module.nix +++ b/modules/shared/nix/config/nixos/default.nix @@ -31,7 +31,7 @@ in { # Set the system Nix package to our custom wrapper, which provides # instant access to all `pkgs` and `lib` attributes. - nix.package = pkgs.callPackage ./package.nix {}; + nix.package = pkgs.callPackage ./package {}; } { # Throttle the nix-daemon so it doesn't consume @@ -101,8 +101,8 @@ in { debugger-on-trace = true; # debugger-on-warn = true; - download-attempts = 2; - download-speed = 5 * 1000; # 5 MB/s to prevent bandwidth exhaustion. + download-attempts = 5; + # download-speed = 5 * 1000; # TODO: determine a better value # It's useful to know when a substitute is failing! # Can use `--fallback` on the CLI when needed. @@ -112,7 +112,7 @@ in { fsync-metadata = true; # fsync-store-paths = true; TODO: not on Lix - http-connections = 10; # Don't open too many connections at once. + # http-connections = 10; # TODO: determine a better value # Keeping these is very useful for development. keep-build-log = true; @@ -133,7 +133,7 @@ in { sandbox-fallback = false; show-trace = true; - stalled-download-timeout = 30; # wait 30s before cancelling + # stalled-download-timeout = 30; # TODO: determine a better value sync-before-registering = true; # TODO: needed with fsync options? trace-verbose = true; diff --git a/modules/nixos/nix/package.nix b/modules/shared/nix/config/nixos/package/default.nix similarity index 79% rename from modules/nixos/nix/package.nix rename to modules/shared/nix/config/nixos/package/default.nix index 1a7c650..aeaf14b 100644 --- a/modules/nixos/nix/package.nix +++ b/modules/shared/nix/config/nixos/package/default.nix @@ -5,7 +5,9 @@ nix, }: let - wrapper = callPackage ./wrapper { inherit nix; }; + wrapper = callPackage ./package.nix { + inherit nix; + }; in buildEnv { inherit (nix) name version; diff --git a/modules/nixos/nix/wrapper/default.nix b/modules/shared/nix/config/nixos/package/package.nix similarity index 91% rename from modules/nixos/nix/wrapper/default.nix rename to modules/shared/nix/config/nixos/package/package.nix index 6b5b90b..fda140b 100644 --- a/modules/nixos/nix/wrapper/default.nix +++ b/modules/shared/nix/config/nixos/package/package.nix @@ -10,14 +10,14 @@ stdenvNoCC.mkDerivation { src = with lib.fileset; toSource { root = ./.; fileset = unions [ - ./nix.sh + ./src ]; }; installPhase = '' runHook preInstall - install -Dm755 nix.sh $out/bin/nix + install -Dm755 src/nix.sh $out/bin/nix runHook postInstall ''; diff --git a/modules/nixos/nix/wrapper/nix.sh b/modules/shared/nix/config/nixos/package/src/nix.sh similarity index 100% rename from modules/nixos/nix/wrapper/nix.sh rename to modules/shared/nix/config/nixos/package/src/nix.sh diff --git a/modules/nixos/home-manager/programs/zsh/config.nix b/modules/shared/programs/zsh/config/home-manager.nix similarity index 100% rename from modules/nixos/home-manager/programs/zsh/config.nix rename to modules/shared/programs/zsh/config/home-manager.nix diff --git a/modules/nixos/programs/zsh/module.nix b/modules/shared/programs/zsh/config/nixos.nix similarity index 100% rename from modules/nixos/programs/zsh/module.nix rename to modules/shared/programs/zsh/config/nixos.nix diff --git a/modules/nixos/home-manager/services/gnome/gnome-keyring/config.nix b/modules/shared/services/gnome/gnome-keyring/config/home-manager.nix similarity index 100% rename from modules/nixos/home-manager/services/gnome/gnome-keyring/config.nix rename to modules/shared/services/gnome/gnome-keyring/config/home-manager.nix diff --git a/modules/shared/services/pipewire/config/default.nix b/modules/shared/services/pipewire/config/default.nix deleted file mode 100644 index 30f51c5..0000000 --- a/modules/shared/services/pipewire/config/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - imports = [ - ./nixos.nix - ]; - - config.home-manager.sharedModules = [ - ./home-manager.nix - ]; -} \ No newline at end of file diff --git a/modules/shared/services/pipewire/module.nix b/modules/shared/services/pipewire/module.nix deleted file mode 100644 index fac2ea2..0000000 --- a/modules/shared/services/pipewire/module.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./config - ]; -} \ No newline at end of file diff --git a/nix/checks/default.nix b/nix/checks/default.nix index 0709d08..79026ea 100644 --- a/nix/checks/default.nix +++ b/nix/checks/default.nix @@ -16,7 +16,9 @@ nixosConfigurations = (pkgs.linkFarm "all-nixosConfigurations" ( self.nixosConfigurations - |> lib.filterAttrs (_: value: value.pkgs.system == pkgs.system) + |> lib.filterAttrs (_: value: + value.pkgs.stdenv.hostPlatform == pkgs.stdenv.hostPlatform + ) |> lib.mapAttrs (_: value: value.config.system.build) |> lib.mapAttrsToList (name: value: { inherit name; diff --git a/nix/nixosConfigurations/default.nix b/nix/nixosConfigurations/default.nix index ca36cad..b8d7a57 100644 --- a/nix/nixosConfigurations/default.nix +++ b/nix/nixosConfigurations/default.nix @@ -4,10 +4,6 @@ ... }: let - inherit (inputs) - nixos-hardware - ; - inherit (self) lib; in { flake = { @@ -15,9 +11,6 @@ in { { hostName = "LAPTOP-3DT4F02"; modules = [ - nixos-hardware.nixosModules.dell-inspiron-14-5420 - nixos-hardware.nixosModules.common-hidpi - ../../hosts/laptop ]; } @@ -26,6 +19,13 @@ in { modules = [ ../../hosts/iso ]; + + specialArgs = { + inputs = { + nixos-facter = + lib.flakes.stripSystem "x86_64-linux" inputs.nixos-facter; + }; + }; } ]; }; diff --git a/nix/nixosModules/default.nix b/nix/nixosModules/default.nix index f0fe625..1a7c266 100644 --- a/nix/nixosModules/default.nix +++ b/nix/nixosModules/default.nix @@ -6,6 +6,7 @@ let inherit (inputs) home-manager + nixos-facter-modules stylix ; @@ -14,14 +15,12 @@ in { flake = { nixosModules.default = { imports = [ - home-manager.nixosModules.default - - (lib.mkModules ../../modules/common {}) - (lib.mkModules ../../modules/shared {}) - (lib.mkModules ../../modules/nixos { + (lib.mkModules ../../modules { inherit inputs; }) + home-manager.nixosModules.default + nixos-facter-modules.nixosModules.facter ../../users ]; @@ -37,8 +36,6 @@ in { sharedModules = [ stylix.homeModules.stylix { config.stylix.autoEnable = false; } - - (lib.mkModules ../../modules/home-manager {}) ]; }; }; diff --git a/pkgs/nixos-clean/nix/package.nix b/pkgs/nixos-clean/nix/package.nix index d08c7e2..2eb9399 100644 --- a/pkgs/nixos-clean/nix/package.nix +++ b/pkgs/nixos-clean/nix/package.nix @@ -5,6 +5,8 @@ installShellFiles, pandoc, + zsh, + coreutils, }: stdenvNoCC.mkDerivation { @@ -29,6 +31,10 @@ stdenvNoCC.mkDerivation { pandoc ]; + buildInputs = [ + zsh + ]; + buildPhase = '' pandoc src/nixos-clean.1.md -f markdown -t man -s -o nixos-clean.1 ''; diff --git a/pkgs/nixos-clean/src/nixos-clean.sh b/pkgs/nixos-clean/src/nixos-clean.sh index fab9cb9..25d8562 100755 --- a/pkgs/nixos-clean/src/nixos-clean.sh +++ b/pkgs/nixos-clean/src/nixos-clean.sh @@ -1,93 +1,92 @@ -#!/usr/bin/env bash - -set -o errexit -set -o nounset -set -o pipefail +#!/usr/bin/env zsh export PATH="@path@:$PATH" showUsage() { - echo "Usage: $(basename $0) [OPTION]..." - echo "Clean up old NixOS and home-manager generations when applicable." + echo "Usage: nixos-clean [OPTION]..." + echo "Clean up old NixOS generations when applicable." echo "" echo " -d, --dry-run show what would be done without doing it" echo " -v, --verbose increase verbosity of diagnostic messages" echo " -h, --help display this help and exit" - exit 1 } -if [ "$UID" -ne 0 ]; then - echo "Please run this script as root." - exit 1 -fi +zmodload zsh/zutil +zparseopts -D -E -F - \ + d=dryRun -dry-run=dryRun \ + v=verbose -verbose=verbose \ + h=help -help=help \ + || exit 1 -origArgs=("$@") -systemProfiles=/nix/var/nix/profiles -dryRun= -verbose= -cleanStore= +((rmidx=$@[(i)(--|-)])) +set -- "${@[0,rmidx-1]}" "${@[rmidx+1,-1]}" -log() { +debug() { if [ -n "$verbose" ]; then - echo "[nixos-clean] $@" >&2 + echo "[nixos-clean/DEBUG]: $@" fi } +info() { + echo "[nixos-clean/INFO]: $@" +} + +warn() { + echo "[nixos-clean/WARN]: $@" +} + +err() { + echo "[nixos-clean/ERROR]: $@" +} + run() { if [ -n "$dryRun" ]; then echo "$@" elif [ -n "$verbose" ]; then $@ else - local discard=$($@ 2>&1) + $@ 2>/dev/null fi } -while [ "$#" -gt 0 ]; do - i="$1"; shift 1 - case "$i" in - --help|-h) - showUsage - ;; - --dry-run|-d) - dryRun=1 - ;; - --verbose|-v) - verbose=1 - ;; - *) - log "unknown option '$i'" - exit 1 - ;; - esac -done +if [ -n "$help" ]; then + showUsage + exit 0 +fi + +if [ "$EUID" -ne 0 ]; then + err "this program requires root priviledges" + exit 1 +fi + +globalProfiles=/nix/var/nix/profiles cleanNixOS() { - log "cleaning up nixos generations..." + info "cleaning up NixOS generations..." + + local latest="$(readlink -f $globalProfiles/system)" + debug "resolved system profile to '$latest'" - local latest="$(readlink -f $systemProfiles/system)" - for p in $systemProfiles/system*; do - if [ "$(readlink -f $p)" != "$latest" ]; then - log "going to delete $p" - run rm -f "$p" + for profile in $globalProfiles/system*; do + debug "found profile '$profile'" + if [ "$(readlink -f $profile)" != "$latest" ]; then + debug "deleting profile '$profile'" + run rm -f "$profile" fi done - log "regenerating boot entries" + debug "refreshing boot entries" run /run/current-system/bin/switch-to-configuration boot } -cleanNix() { - log "cleaning up the /nix/store" +cleanStore() { + info "cleaning up /nix/store..." run nix-collect-garbage -d } if [ -f /etc/NIXOS ]; then cleanNixOS - cleanStore=1 fi -if [ -n "$cleanStore" ]; then - cleanNix -fi \ No newline at end of file +cleanStore \ No newline at end of file diff --git a/pkgs/sl-darken/.editorconfig b/pkgs/sl-darken/.editorconfig new file mode 100644 index 0000000..3e4d7d3 --- /dev/null +++ b/pkgs/sl-darken/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = false +trim_trailing_whitespace = true \ No newline at end of file diff --git a/pkgs/sl-darken/.gitignore b/pkgs/sl-darken/.gitignore new file mode 100644 index 0000000..8129cd5 --- /dev/null +++ b/pkgs/sl-darken/.gitignore @@ -0,0 +1,6 @@ +.direnv/ +.envrc + +target/ + +result \ No newline at end of file diff --git a/pkgs/sl-darken/Cargo.lock b/pkgs/sl-darken/Cargo.lock new file mode 100644 index 0000000..928f346 --- /dev/null +++ b/pkgs/sl-darken/Cargo.lock @@ -0,0 +1,16 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "hsl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "575fb7f1167f3b88ed825e90eb14918ac460461fdeaa3965c6a50951dee1c970" + +[[package]] +name = "sl-darken" +version = "0.1.0" +dependencies = [ + "hsl", +] diff --git a/pkgs/sl-darken/Cargo.toml b/pkgs/sl-darken/Cargo.toml new file mode 100644 index 0000000..963cf4c --- /dev/null +++ b/pkgs/sl-darken/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "sl-darken" +version = "0.1.0" +edition = "2024" + +[lib] +crate-type = ["cdylib"] + +[dependencies] +hsl = "0.1.1" \ No newline at end of file diff --git a/pkgs/sl-darken/nix/package.nix b/pkgs/sl-darken/nix/package.nix new file mode 100644 index 0000000..030753b --- /dev/null +++ b/pkgs/sl-darken/nix/package.nix @@ -0,0 +1,31 @@ +{ + lib, + rustPlatform, +}: +rustPlatform.buildRustPackage (finalAttrs: { + pname = "sl-darken"; + version = "0.1.0"; + + src = with lib.fileset; toSource { + root = ../.; + fileset = unions [ + ../src + ../Cargo.lock + ../Cargo.toml + ]; + }; + + cargoLock.lockFile = ../Cargo.lock; + + passthru = { + libPath = "lib/libsl_darken.so"; # convenience + }; + + meta = with lib; { + description = "Darken the background image for Swaylock Effects"; + + license = licenses.agpl3Plus; + maintainers = with maintainers; [ frontear ]; + platforms = platforms.linux; + }; +}) \ No newline at end of file diff --git a/pkgs/sl-darken/src/lib.rs b/pkgs/sl-darken/src/lib.rs new file mode 100644 index 0000000..72513f0 --- /dev/null +++ b/pkgs/sl-darken/src/lib.rs @@ -0,0 +1,25 @@ +use std::ffi::c_int; + +mod rgb { + pub fn from_u32(rgb: u32) -> (u8, u8, u8) { + return ( + ((rgb & 0xff0000) >> 16) as u8, + ((rgb & 0x00ff00) >> 8) as u8, + ((rgb & 0x0000ff) >> 0) as u8, + ); + } + + pub fn to_u32((r, g, b): (u8, u8, u8)) -> u32 { + return (r as u32) << 16 | (g as u32) << 8 | (b as u32) << 0; + } +} + +#[unsafe(no_mangle)] +pub extern "C" fn swaylock_pixel(pix: u32, _: c_int, _: c_int, _: c_int, _: c_int) -> u32 { + let (r, g, b) = rgb::from_u32(pix); + let mut hsl = hsl::HSL::from_rgb(&[r, g, b]); + + hsl.l *= 0.7; // dim to 70% + + return rgb::to_u32(hsl.to_rgb()); +} \ No newline at end of file diff --git a/users/frontear/home/default.nix b/users/frontear/home/default.nix index 3d481c1..e68476a 100644 --- a/users/frontear/home/default.nix +++ b/users/frontear/home/default.nix @@ -12,11 +12,6 @@ home.stateVersion = "24.11"; - home.shellAliases = { - # Prevent TERM capabilities leaking into a shitty ssh - "ssh" = "TERM= ssh"; - }; - programs = { direnv = { enable = true; @@ -31,7 +26,7 @@ }; git = { - extraConfig = { + settings = { user.email = "contact@frontear.dev"; user.name = "Ali Rizvi"; user.signingKey = "4BC247743ACFF25E"; diff --git a/users/frontear/home/desktops/gnome/default.nix b/users/frontear/home/desktops/gnome/default.nix index 81d981c..a19229d 100644 --- a/users/frontear/home/desktops/gnome/default.nix +++ b/users/frontear/home/desktops/gnome/default.nix @@ -6,6 +6,10 @@ let cfg = config.my.desktops.gnome; in { + imports = [ + ./stylix + ]; + config = lib.mkIf cfg.enable { my.programs = { microsoft-edge.enable = true; diff --git a/users/frontear/home/desktops/gnome/stylix/assets/bg_dark.jpg b/users/frontear/home/desktops/gnome/stylix/assets/bg_dark.jpg new file mode 100644 index 0000000..3612d14 Binary files /dev/null and b/users/frontear/home/desktops/gnome/stylix/assets/bg_dark.jpg differ diff --git a/users/frontear/home/desktops/gnome/stylix/default.nix b/users/frontear/home/desktops/gnome/stylix/default.nix new file mode 100644 index 0000000..2801be8 --- /dev/null +++ b/users/frontear/home/desktops/gnome/stylix/default.nix @@ -0,0 +1,77 @@ +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.my.desktops.gnome; +in { + config = lib.mkIf cfg.enable { + # TODO: de-duplicate from Niri + stylix = { + enable = true; + + base16Scheme = ./theme.yaml; + + cursor = { + name = "Bibata-Modern-Classic"; + package = pkgs.bibata-cursors; + + size = 24; + }; + + fonts = { + sizes = { + applications = 11; + desktop = 11; + terminal = 11; + popups = 11; + }; + + emoji = { + name = "Noto Color Emoji"; + package = pkgs.noto-fonts-color-emoji; + }; + + monospace = { + name = "Noto Sans Mono"; + package = pkgs.noto-fonts; + }; + + sansSerif = { + name = "Noto Sans"; + package = pkgs.noto-fonts; + }; + + serif = { + name = "Noto Serif"; + package = pkgs.noto-fonts; + }; + }; + + icons = { + enable = true; + package = pkgs.papirus-icon-theme; + + dark = "Papirus-Dark"; + light = "Papirus-Light"; + }; + + image = ./assets/bg_dark.jpg; + imageScalingMode = "fit"; + + polarity = "dark"; + }; + + stylix.targets = { + fontconfig.enable = true; + font-packages.enable = true; + + gtk.enable = true; + qt.enable = true; + + gnome.enable = true; + }; + }; +} \ No newline at end of file diff --git a/users/frontear/home/desktops/gnome/stylix/theme.yaml b/users/frontear/home/desktops/gnome/stylix/theme.yaml new file mode 100644 index 0000000..bbdd5a4 --- /dev/null +++ b/users/frontear/home/desktops/gnome/stylix/theme.yaml @@ -0,0 +1,29 @@ +system: "base24" +name: "Pnevma" +author: "FredHappyface (https://github.com/fredHappyface)" +variant: "dark" +palette: + base00: "#1c1c1c" + base01: "#2f2e2d" + base02: "#4a4845" + base03: "#6b6a67" + base04: "#8d8c8a" + base05: "#aeaead" + base06: "#d0d0d0" + base07: "#efefef" + base08: "#a36666" + base09: "#d7af87" + base0A: "#a1bdce" + base0B: "#90a57d" + base0C: "#8adbb4" + base0D: "#7fa5bd" + base0E: "#c79ec4" + base0F: "#513333" + base10: "#31302e" + base11: "#181817" + base12: "#d78787" + base13: "#e4c9af" + base14: "#afbea2" + base15: "#b1e7dd" + base16: "#a1bdce" + base17: "#d7beda" \ No newline at end of file diff --git a/users/frontear/home/desktops/niri/my/programs/swayosd/fs/default.nix b/users/frontear/home/desktops/niri/my/programs/swayosd/fs/default.nix index c0013ec..fdd644d 100644 --- a/users/frontear/home/desktops/niri/my/programs/swayosd/fs/default.nix +++ b/users/frontear/home/desktops/niri/my/programs/swayosd/fs/default.nix @@ -1,10 +1,10 @@ { lib, - runCommandNoCCLocal, + runCommandLocal, sassc, }: -runCommandNoCCLocal "fs-swayosd" { +runCommandLocal "fs-swayosd" { src = with lib.fileset; toSource { root = ./.; fileset = difference ./. ./default.nix; diff --git a/users/frontear/home/desktops/niri/programs/swaylock/default.nix b/users/frontear/home/desktops/niri/programs/swaylock/default.nix index 1d56ae5..2842cdb 100644 --- a/users/frontear/home/desktops/niri/programs/swaylock/default.nix +++ b/users/frontear/home/desktops/niri/programs/swaylock/default.nix @@ -1,6 +1,7 @@ { config, lib, + pkgs, ... }: let @@ -20,7 +21,8 @@ in { clock = true; datestr = "%a, %b %d, %Y"; - effect-blur = "16x2"; + effect-blur = "7x3"; + effect-custom = "${pkgs.frontear.sl-darken}/${pkgs.frontear.sl-darken.libPath}"; }; }; }; diff --git a/users/frontear/home/desktops/niri/stylix/default.nix b/users/frontear/home/desktops/niri/stylix/default.nix index 56d4439..4727c1f 100644 --- a/users/frontear/home/desktops/niri/stylix/default.nix +++ b/users/frontear/home/desktops/niri/stylix/default.nix @@ -30,7 +30,7 @@ in { emoji = { name = "Noto Color Emoji"; - package = pkgs.noto-fonts-emoji; + package = pkgs.noto-fonts-color-emoji; }; monospace = { diff --git a/users/frontear/home/programs/neovim/default.nix b/users/frontear/home/programs/neovim/default.nix index 283092b..c63f3c5 100644 --- a/users/frontear/home/programs/neovim/default.nix +++ b/users/frontear/home/programs/neovim/default.nix @@ -11,7 +11,7 @@ wl-clipboard ]; - init = '' + extraConfig = '' vim.g.mapleader = ' ' vim.g.localmapleader = ' ' @@ -102,15 +102,16 @@ --lsp_format.setup {} - local lspconfig = require("lspconfig") local capabilities = require("cmp_nvim_lsp").default_capabilities() --local on_attach = lsp_format.on_attach ${lib.concatStringsSep "\n" (map (lsp: '' - lspconfig.${lsp}.setup({ + vim.lsp.config["${lsp}"] = { capabilities = capabilities, --on_attach = on_attach - }) + } + + vim.lsp.enable("${lsp}") '') [ "basedpyright" "clangd" diff --git a/users/frontear/home/programs/vscode/default.nix b/users/frontear/home/programs/vscode/default.nix index fc924c5..2daa3a3 100644 --- a/users/frontear/home/programs/vscode/default.nix +++ b/users/frontear/home/programs/vscode/default.nix @@ -1,34 +1,34 @@ { + lib, pkgs, ... }: { - my.programs.vscode = { - enable = true; - - extensions = pkgs.vscode-utils.extensionsFromVscodeMarketplace (import ./extensions.nix); - - packages = pkgs: with pkgs; [ - # For `ms-vscode.cpptools` - gcc-unwrapped - gdb - - # For `dbaeumer.vscode-eslint` - eslint - - # For `redhat.java - openjdk21 - - # For `jnoortheen.nix-ide` - nixd - - # For `ms-python.python` - python3 - - # For `rust-lang.rust-analyzer` - rust-analyzer - ]; - - settings = import ./settings.nix; + config = { + stylix.targets.vscode.enable = true; + + programs.vscode = { + enable = true; + + profiles."default" = { + enableExtensionUpdateCheck = false; + enableUpdateCheck = false; + + extensions = + pkgs.vscode-utils.extensionsFromVscodeMarketplace (import ./extensions.nix) + ++ (with pkgs.vscode-extensions; [ + # TODO: prefer Nixpkgs extensions when possible + ms-python.python + ms-vscode.cmake-tools + ms-vscode.cpptools + rust-lang.rust-analyzer + ]); + + userSettings = import ./settings.nix // { + # TODO: these colors aren't amazing.. + "workbench.colorTheme" = lib.mkForce "Atomize"; + }; + }; + }; }; } \ No newline at end of file diff --git a/users/frontear/home/programs/vscode/extensions.nix b/users/frontear/home/programs/vscode/extensions.nix index f4efc27..6d04d2d 100644 --- a/users/frontear/home/programs/vscode/extensions.nix +++ b/users/frontear/home/programs/vscode/extensions.nix @@ -293,13 +293,6 @@ publisher = "ms-python"; version = "2025.13.2025091201"; } - { - arch = "linux-x64"; - hash = "sha256-cdPPACBdUKYyClvh3/qV8Te4rfZJieFHeVfgJYGtCUs="; - name = "python"; - publisher = "ms-python"; - version = "2025.15.2025091901"; - } { arch = ""; hash = "sha256-Z2R7gUZw1S2iL3KX/3fB326lFzE39v9LGq17Ec2aHCA="; @@ -307,13 +300,6 @@ publisher = "ms-python"; version = "2025.8.2"; } - { - arch = "linux-x64"; - hash = "sha256-UlSNIfMSQQCFTaJQ/sNzZPcnKcql2V8wP1xPAoOq5os="; - name = "cpptools"; - publisher = "ms-vscode"; - version = "1.27.7"; - } { arch = ""; hash = "sha256-MibP2zqTwlXXVsXQOSuoi5SO8BskJC/AihrhJFg8tac="; @@ -377,13 +363,6 @@ publisher = "redhat"; version = "1.46.2025091808"; } - { - arch = "linux-x64"; - hash = "sha256-d3Qy3efm9AtdY9wRauJfcKYXdrtu0eK1YG5/tfgvQHg="; - name = "rust-analyzer"; - publisher = "rust-lang"; - version = "0.4.2619"; - } { arch = ""; hash = "sha256-zgCqKwnP7Fm655FPUkD5GL+/goaplST8507X890Tnhc="; diff --git a/users/frontear/home/programs/vscode/settings.nix b/users/frontear/home/programs/vscode/settings.nix index 8311835..80f53d4 100644 --- a/users/frontear/home/programs/vscode/settings.nix +++ b/users/frontear/home/programs/vscode/settings.nix @@ -1,12 +1,8 @@ { - "update.mode" = "none"; - "extensions.autoCheckUpdates" = false; - "editor.accessibilitySupport" = "off"; "editor.cursorBlinking" = "phase"; "editor.cursorSmoothCaretAnimation" = "on"; "editor.folding" = false; - "editor.fontFamily" = "Noto Sans Mono, Symbols Nerd Font"; "editor.guides.bracketPairs" = true; "editor.matchBrackets" = "never"; "editor.minimap.enabled" = false; @@ -44,11 +40,11 @@ "editorBracketHighlight.foreground6" = "#abb2c0"; "editorBracketHighlight.unexpectedBracket.foreground" = "#db6165"; }; - "workbench.colorTheme" = "Atomize"; "workbench.iconTheme" = "material-icon-theme"; "workbench.layoutControl.enabled" = false; "workbench.list.smoothScrolling" = true; "workbench.productIconTheme" = "material-product-icons"; + "workbench.secondarySideBar.defaultVisibility" = "hidden"; # stupid LLM chat "workbench.startupEditor" = "newUntitledFile"; # Extensions