├── secrets ├── key.age ├── drive.age ├── mihomo.age ├── vault.age ├── cache │ ├── cave │ │ └── 8dd4c5a81a8917c333c889f503075d984fc8853f91c19e5327452cdc67ce4544 │ ├── chi │ │ ├── 21ce09ce06a6e23309c1c7ea0654f8bf6d690487271add1c94cc4ef623fcb4aa │ │ └── 797b1b1371e1abbd909335ac48f33a426b8c3ea17026f9bdd813200df6c739d7 │ └── laplace │ │ ├── 1f57ae83ba4052b1a35c5fe95dcacc2689a3de4d6ece6ccf2c8244f7564395a6 │ │ └── aee60669d42a16f541c32ec47eb4fa9a705b2a3a3c2b437f2b741ed205de9334 └── age-yubikey-identity-de5ab175.txt ├── modules ├── systems.nix ├── disko.nix ├── facter.nix ├── config │ ├── networkmanager.nix │ ├── mpv.nix │ ├── foot.nix │ ├── git.nix │ ├── mako.nix │ ├── nix.nix │ ├── gtk.nix │ ├── xdg.nix │ ├── i18n.nix │ ├── waybar │ │ ├── waybar.css │ │ └── default.nix │ ├── fish.nix │ ├── helix.nix │ └── sway.nix ├── audio.nix ├── vaultix.nix ├── android.nix ├── hosts │ ├── default.nix │ ├── laplace │ │ ├── disko.nix │ │ ├── default.nix │ │ └── facter.json │ ├── brick │ │ ├── default.nix │ │ └── disko.nix │ ├── wall │ │ ├── default.nix │ │ └── disko.nix │ ├── cave │ │ └── default.nix │ ├── clare │ │ └── default.nix │ └── mizu │ │ └── default.nix ├── network │ ├── networkd.nix │ └── dns.nix ├── desktop.nix ├── boot.nix ├── base.nix ├── flake-parts.nix ├── lib │ └── nixos.nix └── users.nix ├── pkgs ├── recorder-status.nix ├── player-metadata.nix ├── recorder-toggle.nix ├── powermenu.nix ├── swaylock.nix ├── monitor-toggle.nix ├── lxgw-zhisong.nix ├── lxgw-neoxihei.nix ├── mpv-handler.nix └── macshot.nix ├── readme.md ├── flake.nix └── flake.lock /secrets/key.age: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ocfox/den/HEAD/secrets/key.age -------------------------------------------------------------------------------- /secrets/drive.age: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ocfox/den/HEAD/secrets/drive.age -------------------------------------------------------------------------------- /secrets/mihomo.age: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ocfox/den/HEAD/secrets/mihomo.age -------------------------------------------------------------------------------- /secrets/vault.age: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ocfox/den/HEAD/secrets/vault.age -------------------------------------------------------------------------------- /modules/systems.nix: -------------------------------------------------------------------------------- 1 | { 2 | systems = [ 3 | "aarch64-linux" 4 | "x86_64-linux" 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/disko.nix: -------------------------------------------------------------------------------- 1 | { inputs, ... }: 2 | { 3 | flake.modules.nixos.disko.imports = [ 4 | inputs.disko.nixosModules.default 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /modules/facter.nix: -------------------------------------------------------------------------------- 1 | { inputs, ... }: 2 | { 3 | flake.modules.nixos.facter.imports = [ 4 | inputs.nixos-facter.nixosModules.facter 5 | ]; 6 | } 7 | -------------------------------------------------------------------------------- /secrets/cache/cave/8dd4c5a81a8917c333c889f503075d984fc8853f91c19e5327452cdc67ce4544: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ocfox/den/HEAD/secrets/cache/cave/8dd4c5a81a8917c333c889f503075d984fc8853f91c19e5327452cdc67ce4544 -------------------------------------------------------------------------------- /secrets/cache/chi/21ce09ce06a6e23309c1c7ea0654f8bf6d690487271add1c94cc4ef623fcb4aa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ocfox/den/HEAD/secrets/cache/chi/21ce09ce06a6e23309c1c7ea0654f8bf6d690487271add1c94cc4ef623fcb4aa -------------------------------------------------------------------------------- /secrets/cache/chi/797b1b1371e1abbd909335ac48f33a426b8c3ea17026f9bdd813200df6c739d7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ocfox/den/HEAD/secrets/cache/chi/797b1b1371e1abbd909335ac48f33a426b8c3ea17026f9bdd813200df6c739d7 -------------------------------------------------------------------------------- /secrets/cache/laplace/1f57ae83ba4052b1a35c5fe95dcacc2689a3de4d6ece6ccf2c8244f7564395a6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ocfox/den/HEAD/secrets/cache/laplace/1f57ae83ba4052b1a35c5fe95dcacc2689a3de4d6ece6ccf2c8244f7564395a6 -------------------------------------------------------------------------------- /secrets/cache/laplace/aee60669d42a16f541c32ec47eb4fa9a705b2a3a3c2b437f2b741ed205de9334: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ocfox/den/HEAD/secrets/cache/laplace/aee60669d42a16f541c32ec47eb4fa9a705b2a3a3c2b437f2b741ed205de9334 -------------------------------------------------------------------------------- /modules/config/networkmanager.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.networkmanager = { 3 | networking.networkmanager.enable = true; 4 | programs.nm-applet.enable = true; 5 | networking.useDHCP = false; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /modules/audio.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.audio = { 3 | services.pipewire = { 4 | enable = true; 5 | alsa.enable = true; 6 | alsa.support32Bit = true; 7 | pulse.enable = true; 8 | }; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /pkgs/recorder-status.nix: -------------------------------------------------------------------------------- 1 | { pkgs }: 2 | pkgs.writeShellScriptBin "record-status" '' 3 | pid=`${pkgs.procps}/bin/pgrep wf-recorder` 4 | status=$? 5 | 6 | if [ $status != 0 ] 7 | then 8 | echo ''; 9 | else 10 | echo ''; 11 | fi; 12 | '' 13 | -------------------------------------------------------------------------------- /modules/vaultix.nix: -------------------------------------------------------------------------------- 1 | { inputs, ... }: 2 | { 3 | imports = [ inputs.vaultix.flakeModules.default ]; 4 | flake = { 5 | vaultix = { 6 | identity = inputs.self + "/secrets/age-yubikey-identity-de5ab175.txt"; 7 | nodes = inputs.self.nixosConfigurations; 8 | }; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | [![built with garnix](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgarnix.io%2Fapi%2Fbadges%2Focfox%2Fden)](https://garnix.io/repo/ocfox/den) 2 | [![built with nix](https://img.shields.io/static/v1?logo=nixos&logoColor=white&label=&message=Built%20with%20Nix&color=41439a)](https://builtwithnix.org) 3 | -------------------------------------------------------------------------------- /modules/android.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.android = 3 | { pkgs, ... }: 4 | { 5 | programs.adb.enable = true; 6 | users.users.ocfox.extraGroups = [ "adbusers" ]; 7 | environment.systemPackages = [ 8 | pkgs.android-studio 9 | ]; 10 | # nixpkgs.config.android_sdk.accept_license = true; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /pkgs/player-metadata.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs }: 2 | pkgs.writeShellScript "player-metadata" '' 3 | if [[ $(${lib.getExe pkgs.playerctl} metadata artist) ]] 4 | then 5 | echo $(${lib.getExe pkgs.playerctl} metadata artist) - $(${lib.getExe pkgs.playerctl} metadata title) 6 | else 7 | echo $(${lib.getExe pkgs.playerctl} metadata title) 8 | fi 9 | '' 10 | -------------------------------------------------------------------------------- /modules/hosts/default.nix: -------------------------------------------------------------------------------- 1 | { config, ... }: 2 | let 3 | inherit (config.flake.lib) mkNixosFromAttrs; 4 | in 5 | { 6 | flake.nixosConfigurations = mkNixosFromAttrs { 7 | brick = "x86_64-linux"; 8 | wall = "x86_64-linux"; 9 | clare = "x86_64-linux"; 10 | mizu = "x86_64-linux"; 11 | cave = "aarch64-linux"; 12 | laplace = "aarch64-linux"; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /modules/network/networkd.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.networkd = { 3 | networking.dhcpcd.enable = false; 4 | networking.useNetworkd = true; 5 | networking.wireless.iwd.enable = true; 6 | 7 | systemd.network = { 8 | enable = true; 9 | networks."20-wired" = { 10 | matchConfig.Name = "en*"; 11 | networkConfig.DHCP = "yes"; 12 | }; 13 | }; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /pkgs/recorder-toggle.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs }: 2 | pkgs.writeShellScriptBin "screen-recorder-toggle" '' 3 | pid=`${pkgs.procps}/bin/pgrep wf-recorder` 4 | status=$? 5 | 6 | if [ $status != 0 ] 7 | then 8 | ${lib.getExe' pkgs.wf-recorder "wf-recorder"} -g "$(${lib.getExe pkgs.slurp})" -f $HOME/Videos/record/$(date +'recording_%Y-%m-%d-%H%M%S.mp4'); 9 | else 10 | ${pkgs.procps}/bin/pkill --signal SIGINT wf-recorder 11 | fi; 12 | '' 13 | -------------------------------------------------------------------------------- /secrets/age-yubikey-identity-de5ab175.txt: -------------------------------------------------------------------------------- 1 | # Serial: 23533268, Slot: 1 2 | # Name: sops-nix 3 | # Created: Sat, 09 Nov 2024 05:53:16 +0000 4 | # PIN policy: Never (A PIN is NOT required to decrypt) 5 | # Touch policy: Cached (A physical touch is required for decryption, and is cached for 15 seconds) 6 | # Recipient: age1yubikey1qft4tssgvt0ne7tvu3wjmwxn8w2uwggw5drwz8z3y62hcxhzgfyesv6wnad 7 | AGE-PLUGIN-YUBIKEY-16STXWQVZMEDTZAGZVHYWC 8 | -------------------------------------------------------------------------------- /pkgs/powermenu.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs }: 2 | pkgs.writeShellScriptBin "powermenu" '' 3 | echo -e " Poweroff\n Reboot\n Suspend\n Hibernate" | \ 4 | ${lib.getExe pkgs.fuzzel} -d | \ 5 | case "$(cat -)" in 6 | *Poweroff) 7 | systemctl poweroff ;; 8 | *Reboot) 9 | systemctl reboot ;; 10 | *Suspend) 11 | systemctl suspend ;; 12 | *Hibernate) 13 | systemctl hibernate ;; 14 | esac 15 | '' 16 | -------------------------------------------------------------------------------- /modules/desktop.nix: -------------------------------------------------------------------------------- 1 | { config, ... }: 2 | { 3 | flake.modules.nixos.desktop = 4 | { pkgs, ... }: 5 | { 6 | programs.sway.enable = true; 7 | environment.systemPackages = [ pkgs.yazi ]; 8 | imports = with config.flake.modules.nixos; [ 9 | xdg 10 | fonts 11 | fcitx 12 | audio 13 | 14 | networkd 15 | dns 16 | 17 | foot 18 | mako 19 | waybar 20 | gtk 21 | mpv 22 | sway 23 | ]; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /pkgs/swaylock.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs }: 2 | pkgs.writeShellScriptBin "swaylock" '' 3 | ${lib.getExe pkgs.swaylock-effects} \ 4 | --screenshots \ 5 | --clock \ 6 | --indicator \ 7 | --indicator-radius 100 \ 8 | --indicator-thickness 7 \ 9 | --effect-blur 7x5 \ 10 | --effect-vignette 0.5:0.5 \ 11 | --ring-color bb00cc \ 12 | --key-hl-color 880033 \ 13 | --line-color 00000000 \ 14 | --inside-color 00000088 \ 15 | --separator-color 00000000 \ 16 | --grace 2 \ 17 | --fade-in 0.2 18 | '' 19 | -------------------------------------------------------------------------------- /pkgs/monitor-toggle.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs }: 2 | let 3 | jq = lib.getExe pkgs.jq; 4 | swaymsg = lib.getExe' pkgs.sway "swaymsg"; 5 | in 6 | pkgs.writeShellScriptBin "sway-monitor-toggle" '' 7 | read -r output active <<< \ 8 | "$(${swaymsg} -t get_outputs -r | ${jq} -r '.[] | select(.focused) | "\(.name) \(.active)"')" 9 | 10 | if [ -z "$output" ]; then 11 | ${swaymsg} output '*' enable 12 | else 13 | if [ "$active" != "true" ]; then 14 | ${swaymsg} output "$output" enable 15 | else 16 | ${swaymsg} output "$output" disable 17 | fi 18 | fi 19 | '' 20 | -------------------------------------------------------------------------------- /pkgs/lxgw-zhisong.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenv, 4 | fetchurl, 5 | }: 6 | 7 | stdenv.mkDerivation rec { 8 | pname = "lxgw-zhisong"; 9 | version = "0.515"; 10 | 11 | src = fetchurl { 12 | url = "https://github.com/lxgw/LxgwZhiSong/releases/download/v${version}/LXGWZhiSongMN.ttf"; 13 | hash = "sha256-llzn+lRYmYPazsmaYO4/vMwOUSH1B4PAHNIt2o8yqDU="; 14 | }; 15 | 16 | dontUnpack = true; 17 | 18 | installPhase = '' 19 | runHook preInstall 20 | 21 | install -Dm444 "$src" "$out/share/fonts/truetype/LXGWZhiSongMN.ttf" 22 | 23 | runHook postInstall 24 | ''; 25 | } 26 | -------------------------------------------------------------------------------- /pkgs/lxgw-neoxihei.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenv, 4 | fetchurl, 5 | }: 6 | 7 | stdenv.mkDerivation rec { 8 | pname = "lxgw-neoxihei"; 9 | version = "1.235"; 10 | 11 | src = fetchurl { 12 | url = "https://github.com/lxgw/LxgwNeoXiHei/releases/download/v${version}/LXGWNeoXiHeiPlus.ttf"; 13 | hash = "sha256-tYIL+UbRR9Q3hLLhmTE4JHiDuiynVCOPVEvSu+PMj2M="; 14 | }; 15 | 16 | dontUnpack = true; 17 | 18 | installPhase = '' 19 | runHook preInstall 20 | 21 | install -Dm444 "$src" "$out/share/fonts/truetype/LXGWNeoXiHeiPlus.ttf" 22 | 23 | runHook postInstall 24 | ''; 25 | } 26 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "ocfox's flake"; 3 | 4 | outputs = 5 | inputs: 6 | inputs.flake-parts.lib.mkFlake { 7 | inherit inputs; 8 | } (inputs.import-tree ./modules); 9 | 10 | inputs = { 11 | nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 12 | # vaultix.url = "github:milieuim/vaultix"; 13 | vaultix.url = "github:ocfox/vaultix"; 14 | flake-parts.url = "github:hercules-ci/flake-parts"; 15 | import-tree.url = "github:vic/import-tree"; 16 | nixos-facter.url = "github:numtide/nixos-facter-modules"; 17 | disko = { 18 | url = "github:nix-community/disko"; 19 | inputs.nixpkgs.follows = "nixpkgs"; 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /modules/config/mpv.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.mpv = 3 | { 4 | lib, 5 | pkgs, 6 | config, 7 | ... 8 | }: 9 | { 10 | my.packages = [ 11 | (pkgs.mpv.override { scripts = [ pkgs.mpvScripts.uosc ]; }) 12 | ]; 13 | 14 | my.config = { 15 | mpv = { 16 | "mpv.conf" = pkgs.writeText "mpv.conf" ( 17 | lib.generators.toKeyValue { } { 18 | vo = "gpu-next"; 19 | gpu-api = "vulkan"; 20 | hwdec = "vaapi"; 21 | gpu-context = "waylandvk"; 22 | cache = "yes"; 23 | "demuxer-max-back-bytes" = "1G"; 24 | "demuxer-max-bytes" = "2G"; 25 | } 26 | ); 27 | }; 28 | }; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /modules/boot.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.boot = 3 | { config, pkgs, ... }: 4 | { 5 | boot.loader = { 6 | timeout = 30; 7 | limine = { 8 | enable = true; 9 | }; 10 | efi.canTouchEfiVariables = true; 11 | }; 12 | 13 | system.nixos-init.enable = true; 14 | system.etc.overlay.enable = true; 15 | system.etc.overlay.mutable = false; 16 | boot.initrd.systemd.enable = true; 17 | 18 | boot.kernelPackages = pkgs.linuxPackages_latest; 19 | 20 | zramSwap.enable = true; 21 | services.scx = { 22 | enable = true; 23 | scheduler = "scx_rustland"; 24 | }; 25 | 26 | environment.etc = { 27 | "machine-id".text = builtins.hashString "md5" (config.networking.hostName) + "\n"; 28 | "NIXOS".text = ""; 29 | }; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /modules/config/foot.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.foot = 3 | { 4 | lib, 5 | pkgs, 6 | config, 7 | ... 8 | }: 9 | let 10 | settingsFormat = pkgs.formats.ini { }; 11 | 12 | footSettings = { 13 | url.launch = "foot -e xdg-open \${url}"; 14 | main = { 15 | term = "xterm-256color"; 16 | font = "JetBrainsMono Nerd Font:size=16"; 17 | "dpi-aware" = "yes"; 18 | }; 19 | mouse = { 20 | "hide-when-typing" = "yes"; 21 | }; 22 | colors = { 23 | background = "2b3339"; 24 | foreground = "d8caac"; 25 | }; 26 | }; 27 | in 28 | { 29 | my.packages = [ pkgs.foot ]; 30 | 31 | my.config.foot = { 32 | "foot.ini" = settingsFormat.generate "foot.ini" footSettings; 33 | }; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /modules/network/dns.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.dns = { 3 | services.resolved.enable = false; 4 | networking.resolvconf.enable = false; 5 | services.dnsproxy = { 6 | enable = true; 7 | flags = [ 8 | "--cache" 9 | "--cache-optimistic" 10 | "--edns" 11 | ]; 12 | settings = { 13 | bootstrap = [ 14 | "8.8.8.8" 15 | "119.29.29.29" 16 | "114.114.114.114" 17 | "223.6.6.6" 18 | ]; 19 | listen-addrs = [ "::" ]; 20 | listen-ports = [ 53 ]; 21 | upstream-mode = "parallel"; 22 | upstream = [ 23 | "tls://1.1.1.1" 24 | "quic://dns.alidns.com" 25 | "h3://dns.alidns.com/dns-query" 26 | "tls://dot.pub" 27 | "https://doh.pub/dns-query" 28 | ]; 29 | }; 30 | }; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /pkgs/mpv-handler.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | rustPlatform, 4 | fetchFromGitHub, 5 | }: 6 | 7 | rustPlatform.buildRustPackage rec { 8 | pname = "mpv-handler"; 9 | version = "0.3.12"; 10 | 11 | src = fetchFromGitHub { 12 | owner = "akiirui"; 13 | repo = "mpv-handler"; 14 | rev = "v${version}"; 15 | hash = "sha256-K+1yF3QrItn2HEnQYayAc48Qp2lPSKzwqCKX1MiSvnk="; 16 | }; 17 | 18 | cargoHash = "sha256-pYM7wrDDeT++NOl08zKuD0aUUbTiWJfGh9/dbdv69pk="; 19 | 20 | postInstall = '' 21 | install -Dm444 -t $out/share/applications share/linux/mpv-handler.desktop 22 | ''; 23 | 24 | meta = { 25 | description = "A protocol handler for mpv. Use mpv and yt-dlp to play video and music from the websites"; 26 | homepage = "https://github.com/akiirui/mpv-handler"; 27 | license = lib.licenses.mit; 28 | mainProgram = "mpv-handler"; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /modules/base.nix: -------------------------------------------------------------------------------- 1 | { config, ... }: 2 | let 3 | base = with config.flake.modules.nixos; [ 4 | users 5 | nix 6 | i18n 7 | git 8 | helix 9 | shell 10 | ]; 11 | in 12 | { 13 | flake.modules.nixos.base = 14 | { pkgs, ... }: 15 | { 16 | imports = base; 17 | services = { 18 | pcscd.enable = true; 19 | openssh = { 20 | enable = true; 21 | hostKeys = [ 22 | { 23 | path = "/var/lib/ssh/ssh_host_ed25519_key"; 24 | type = "ed25519"; 25 | } 26 | ]; 27 | }; 28 | tailscale.enable = true; 29 | }; 30 | hardware.enableRedistributableFirmware = true; 31 | environment.systemPackages = with pkgs; [ 32 | git 33 | curl 34 | bind 35 | htop 36 | ripgrep 37 | age-plugin-yubikey 38 | ]; 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /modules/config/git.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.git = 3 | { 4 | lib, 5 | pkgs, 6 | config, 7 | ... 8 | }: 9 | let 10 | settingsFormat = pkgs.formats.ini { }; 11 | 12 | gitSettings = { 13 | gpg = { 14 | format = "ssh"; 15 | }; 16 | user = { 17 | name = "ocfox"; 18 | email = "i@ocfox.me"; 19 | signingKey = "key::sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIHnLWTS5/vPyPFY+tCVYn3Ejf3NQpQzcGnWLQTyE7lbzAAAAC3NzaDpwYXNzZm94 ssh:passfox"; 20 | }; 21 | commit = { 22 | gpgSign = true; 23 | }; 24 | }; 25 | in 26 | { 27 | my.packages = [ 28 | pkgs.git 29 | pkgs.lazygit 30 | ]; 31 | 32 | my.config.git = { 33 | "config" = settingsFormat.generate "git-config" gitSettings; 34 | }; 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /modules/hosts/laplace/disko.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.laplace.disko.devices = { 3 | disk.disk1 = { 4 | device = "/dev/sda"; 5 | type = "disk"; 6 | content = { 7 | type = "gpt"; 8 | partitions = { 9 | MBR = { 10 | type = "EF02"; 11 | size = "1M"; 12 | priority = 1; 13 | }; 14 | ESP = { 15 | type = "EF00"; 16 | size = "500M"; 17 | content = { 18 | type = "filesystem"; 19 | format = "vfat"; 20 | mountpoint = "/boot"; 21 | }; 22 | }; 23 | root = { 24 | size = "100%"; 25 | content = { 26 | type = "filesystem"; 27 | format = "ext4"; 28 | mountpoint = "/"; 29 | }; 30 | }; 31 | }; 32 | }; 33 | }; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /pkgs/macshot.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs }: 2 | with pkgs; 3 | pkgs.writeShellScriptBin "macshot" '' 4 | file=/tmp/xxx.png 5 | ${lib.getExe' sway-contrib.grimshot "grimshot"} --notify save area /tmp/src.png >> /dev/null 2>&1 6 | 7 | ${imagemagick}/bin/convert /tmp/src.png \ 8 | \( +clone -alpha extract \ 9 | -draw 'fill black polygon 0,0 0,8 8,0 fill white circle 8,8 8,0' \ 10 | \( +clone -flip \) -compose Multiply -composite \ 11 | \( +clone -flop \) -compose Multiply -composite \ 12 | \) -alpha off -compose CopyOpacity -composite /tmp/output.png 13 | 14 | ${imagemagick}/bin/convert /tmp/output.png -bordercolor none -border 20 \ 15 | \( +clone -background black -shadow 80x8+15+15 \) \ 16 | +swap -background transparent -layers merge +repage $file 17 | 18 | ${wl-clipboard}/bin/wl-copy -t image/png < $file 19 | ${libnotify}/bin/notify-send "macshot copied" 20 | rm /tmp/src.png /tmp/output.png 21 | '' 22 | -------------------------------------------------------------------------------- /modules/flake-parts.nix: -------------------------------------------------------------------------------- 1 | { inputs, withSystem, ... }: 2 | { 3 | imports = [ inputs.flake-parts.flakeModules.modules ]; 4 | 5 | perSystem = 6 | { 7 | system, 8 | config, 9 | lib, 10 | pkgs, 11 | ... 12 | }: 13 | { 14 | _module.args.pkgs = import inputs.nixpkgs { 15 | inherit system; 16 | config = { 17 | allowUnfreePredicate = _pkg: true; 18 | }; 19 | overlays = [ 20 | inputs.self.overlays.default 21 | ]; 22 | }; 23 | packages = lib.packagesFromDirectoryRecursive { 24 | callPackage = lib.callPackageWith pkgs; 25 | directory = ../pkgs; 26 | }; 27 | }; 28 | 29 | flake = { 30 | overlays.default = 31 | _final: prev: 32 | withSystem prev.stdenv.hostPlatform.system ( 33 | { config, ... }: 34 | { 35 | local = config.packages; 36 | } 37 | ); 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /modules/config/mako.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.mako = 3 | { 4 | lib, 5 | pkgs, 6 | config, 7 | ... 8 | }: 9 | let 10 | makoSettings = { 11 | "border-size" = 0; 12 | "ignore-timeout" = 1; 13 | "default-timeout" = 0; 14 | "border-color" = "#83b6af00"; 15 | "background-color" = "#2b3339CC"; 16 | font = "Sarasa Gothic J 12"; 17 | }; 18 | in 19 | { 20 | my.packages = [ pkgs.mako ]; 21 | 22 | systemd.user.services.mako = { 23 | description = "Mako Notification Daemon"; 24 | wantedBy = [ "graphical-session.target" ]; 25 | partOf = [ "graphical-session.target" ]; 26 | serviceConfig = { 27 | ExecStart = "${pkgs.mako}/bin/mako"; 28 | Restart = "on-failure"; 29 | RestartSec = 1; 30 | }; 31 | }; 32 | 33 | my.config.mako = { 34 | "config" = pkgs.writeText "mako-config" (lib.generators.toKeyValue { } makoSettings); 35 | }; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /modules/hosts/brick/default.nix: -------------------------------------------------------------------------------- 1 | { config, ... }: 2 | let 3 | inherit (config.flake.lib) mkHostModule; 4 | nixosModules = config.flake.modules.nixos; 5 | in 6 | { 7 | flake.modules.nixos.brick = 8 | { 9 | pkgs, 10 | ... 11 | }: 12 | { 13 | imports = mkHostModule { 14 | stateVersion = "25.11"; 15 | # hostKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIoT6gPSX5fd1bGnANf5xj1HMKEhNgA3CAN0TgiAP6lJ root@brick"; 16 | modules = with nixosModules; [ 17 | # Base system modules 18 | boot 19 | disko 20 | facter 21 | # android 22 | 23 | desktop 24 | 25 | { facter.reportPath = ./facter.json; } 26 | { my.packages = [ pkgs.qbittorrent ]; } 27 | { services.blueman.enable = true; } 28 | { networking.nameservers = [ "10.10.0.157" ]; } 29 | { networking.firewall.enable = false; } 30 | { boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; } 31 | ]; 32 | }; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /modules/config/nix.nix: -------------------------------------------------------------------------------- 1 | { inputs, ... }: 2 | { 3 | flake.modules.nixos.nix = 4 | { pkgs, ... }: 5 | { 6 | nix = { 7 | registry = { 8 | nixpkgs.flake = inputs.nixpkgs; 9 | }; 10 | 11 | extraOptions = '' 12 | experimental-features = nix-command flakes 13 | keep-outputs = true 14 | keep-derivations = true 15 | ''; 16 | 17 | gc = { 18 | automatic = true; 19 | options = "--delete-older-than 30d"; 20 | dates = "Sun 14:00"; 21 | }; 22 | 23 | settings = { 24 | trusted-users = [ 25 | "root" 26 | "ocfox" 27 | ]; 28 | warn-dirty = false; 29 | 30 | substituters = [ 31 | "https://cache.nixos.org" 32 | "https://cache.garnix.io" 33 | ]; 34 | trusted-public-keys = [ 35 | "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" 36 | "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" 37 | ]; 38 | nix-path = [ "nixpkgs=${inputs.nixpkgs}" ]; 39 | auto-optimise-store = true; 40 | }; 41 | }; 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /modules/lib/nixos.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs, 3 | config, 4 | withSystem, 5 | ... 6 | }: 7 | let 8 | inherit (inputs.nixpkgs.lib) mapAttrs nixosSystem; 9 | in 10 | { 11 | flake.lib = { 12 | mkHostModule = 13 | { 14 | modules ? [ ], 15 | stateVersion, 16 | hostKey ? "", 17 | }: 18 | [ 19 | config.flake.modules.nixos.base 20 | { system.stateVersion = stateVersion; } 21 | ] 22 | ++ ( 23 | if hostKey != "" then 24 | [ 25 | { 26 | imports = [ inputs.vaultix.nixosModules.default ]; 27 | vaultix.settings.hostPubkey = hostKey; 28 | } 29 | ] 30 | else 31 | [ ] 32 | ) 33 | ++ modules; 34 | 35 | mkNixos = 36 | system: name: 37 | withSystem system ( 38 | { pkgs, ... }: 39 | nixosSystem { 40 | inherit system pkgs; 41 | specialArgs = { inherit inputs; }; 42 | modules = [ 43 | config.flake.modules.nixos.${name} 44 | { 45 | networking.hostName = name; 46 | nixpkgs.hostPlatform = system; 47 | } 48 | ]; 49 | } 50 | ); 51 | 52 | mkNixosFromAttrs = hosts: mapAttrs (name: system: config.flake.lib.mkNixos system name) hosts; 53 | }; 54 | } 55 | -------------------------------------------------------------------------------- /modules/config/gtk.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.gtk = 3 | { 4 | lib, 5 | pkgs, 6 | config, 7 | ... 8 | }: 9 | let 10 | settingsIniContent = lib.generators.toINI { } { 11 | Settings = { 12 | gtk-theme-name = "Adwaita-dark"; 13 | gtk-icon-theme-name = "Numix-Circle"; 14 | gtk-cursor-theme-name = "macOS"; 15 | gtk-application-prefer-dark-theme = 1; 16 | gtk-cursor-theme-size = 24; 17 | gtk-xft-hinting = 1; 18 | gtk-xft-hintstyle = "hintslight"; 19 | }; 20 | }; 21 | 22 | gtk2Content = '' 23 | gtk-theme-name = "Adwaita-dark" 24 | gtk-icon-theme-name = "Numix-Circle" 25 | gtk-cursor-theme-name = "macOS" 26 | gtk-cursor-theme-size = 24 27 | ''; 28 | in 29 | { 30 | my.packages = [ 31 | pkgs.gnome-themes-extra 32 | pkgs.numix-icon-theme-circle 33 | pkgs.apple-cursor 34 | ]; 35 | 36 | my.config = { 37 | "gtk-3.0" = { 38 | "settings.ini" = pkgs.writeText "gtk3-settings.ini" settingsIniContent; 39 | }; 40 | "gtk-4.0" = { 41 | "settings.ini" = pkgs.writeText "gtk4-settings.ini" settingsIniContent; 42 | }; 43 | "gtk-2.0" = { 44 | "gtkrc" = pkgs.writeText "gtkrc-2.0" gtk2Content; 45 | }; 46 | }; 47 | }; 48 | } 49 | -------------------------------------------------------------------------------- /modules/config/xdg.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.xdg = 3 | { pkgs, lib, ... }: 4 | { 5 | environment.systemPackages = [ 6 | pkgs.local.mpv-handler 7 | pkgs.nautilus 8 | pkgs.sioyek 9 | ]; 10 | services.gnome.sushi.enable = true; 11 | xdg = { 12 | terminal-exec.enable = true; 13 | terminal-exec.settings.default = [ "foot.desktop" ]; 14 | mime = { 15 | enable = true; 16 | defaultApplications = { 17 | "application/x-xdg-protocol-tg" = [ "org.telegram.desktop.desktop" ]; 18 | "x-scheme-handler/tg" = [ "org.telegram.desktop.desktop" ]; 19 | "x-scheme-handler/mpv" = [ "mpv-handler.desktop" ]; 20 | "inode/directory" = [ "org.gnome.Nautilus.desktop" ]; 21 | "application/pdf" = [ "sioyek.desktop" ]; 22 | "text/plain" = [ "helix.desktop" ]; 23 | } 24 | // lib.genAttrs [ 25 | "x-scheme-handler/unknown" 26 | "x-scheme-handler/about" 27 | "x-scheme-handler/http" 28 | "x-scheme-handler/https" 29 | "x-scheme-handler/mailto" 30 | "text/html" 31 | ] (_: "firefox.desktop"); 32 | }; 33 | portal = { 34 | enable = true; 35 | wlr.enable = true; 36 | config.common.default = "wlr"; 37 | }; 38 | }; 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /modules/config/i18n.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.i18n = { 3 | time.timeZone = "Asia/Shanghai"; 4 | i18n = { 5 | defaultLocale = "en_US.UTF-8"; 6 | extraLocales = "all"; 7 | }; 8 | }; 9 | 10 | flake.modules.nixos.fcitx = 11 | { pkgs, ... }: 12 | { 13 | i18n.inputMethod = { 14 | enable = true; 15 | type = "fcitx5"; 16 | fcitx5.addons = with pkgs; [ 17 | qt6Packages.fcitx5-chinese-addons 18 | fcitx5-mozc 19 | qt6Packages.fcitx5-configtool 20 | ]; 21 | }; 22 | }; 23 | 24 | flake.modules.nixos.fonts = 25 | { pkgs, ... }: 26 | { 27 | fonts = { 28 | fontDir.enable = true; 29 | fontconfig = { 30 | enable = true; 31 | antialias = true; 32 | 33 | defaultFonts = { 34 | emoji = [ "Noto Color Emoji" ]; 35 | sansSerif = [ 36 | "Inter" 37 | "Sarasa Gothic J" 38 | ]; 39 | serif = [ 40 | "Sarasa Gothic J" 41 | ]; 42 | monospace = [ 43 | "JetBrainsMono Nerd Font" 44 | "Sarasa Mono J" 45 | ]; 46 | }; 47 | }; 48 | 49 | packages = with pkgs; [ 50 | inter 51 | sarasa-gothic 52 | local.lxgw-zhisong 53 | local.lxgw-neoxihei 54 | noto-fonts-color-emoji 55 | nerd-fonts.jetbrains-mono 56 | ]; 57 | }; 58 | }; 59 | } 60 | -------------------------------------------------------------------------------- /modules/hosts/wall/default.nix: -------------------------------------------------------------------------------- 1 | { config, ... }: 2 | let 3 | inherit (config.flake.lib) mkHostModule; 4 | nixosModules = config.flake.modules.nixos; 5 | in 6 | { 7 | flake.modules.nixos.wall = 8 | { pkgs, ... }: 9 | { 10 | imports = mkHostModule { 11 | modules = 12 | with nixosModules; 13 | [ 14 | boot 15 | disko 16 | facter 17 | desktop 18 | ] 19 | ++ [ 20 | { facter.reportPath = ./facter.json; } 21 | { services.blueman.enable = true; } 22 | { networking.firewall.enable = false; } 23 | { networking.nameservers = [ "10.10.0.157" ]; } 24 | { networking.proxy.default = "http://10.10.0.157:7890"; } 25 | { hardware.graphics.extraPackages = [ pkgs.intel-media-driver ]; } 26 | { hardware.enableRedistributableFirmware = true; } 27 | { 28 | boot.kernelParams = [ 29 | "i915.force_probe=46d0" 30 | "i915.enable_guc=3" 31 | ]; 32 | } 33 | { 34 | environment.systemPackages = [ 35 | pkgs.kodi-gbm 36 | ]; 37 | users.users.ocfox.extraGroups = [ "input" ]; 38 | } 39 | # { 40 | # vaultix.secrets.vault = { 41 | # file = ../../secrets/vault.age; 42 | # mode = "640"; 43 | # }; 44 | # } 45 | ]; 46 | stateVersion = "25.11"; 47 | # hostKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII3bQFO5LoC420iUupO9kJBBLnujh/QCURi64LvT5mmT root@brick"; 48 | }; 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /modules/hosts/brick/disko.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.brick.disko.devices = { 3 | disk = { 4 | main = { 5 | type = "disk"; 6 | device = "/dev/nvme0n1"; 7 | content = { 8 | type = "gpt"; 9 | partitions = { 10 | ESP = { 11 | priority = 1; 12 | name = "ESP"; 13 | start = "1M"; 14 | end = "1G"; 15 | type = "EF00"; 16 | content = { 17 | type = "filesystem"; 18 | format = "vfat"; 19 | mountpoint = "/boot"; 20 | mountOptions = [ "umask=0077" ]; 21 | }; 22 | }; 23 | root = { 24 | size = "100%"; 25 | content = { 26 | type = "btrfs"; 27 | extraArgs = [ "-f" ]; 28 | subvolumes = { 29 | "/rootfs" = { 30 | mountpoint = "/"; 31 | }; 32 | "/home" = { 33 | mountOptions = [ "compress=zstd" ]; 34 | mountpoint = "/home"; 35 | }; 36 | "/nix" = { 37 | mountOptions = [ 38 | "compress=zstd" 39 | "noatime" 40 | ]; 41 | mountpoint = "/nix"; 42 | }; 43 | "/swap" = { 44 | mountpoint = "/.swapvol"; 45 | swap = { 46 | swapfile.size = "2G"; 47 | }; 48 | }; 49 | }; 50 | 51 | mountpoint = "/partition-root"; 52 | swap = { 53 | swapfile = { 54 | size = "2G"; 55 | }; 56 | }; 57 | }; 58 | }; 59 | }; 60 | }; 61 | }; 62 | }; 63 | }; 64 | } 65 | -------------------------------------------------------------------------------- /modules/hosts/wall/disko.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.wall.disko.devices = { 3 | disk = { 4 | main = { 5 | type = "disk"; 6 | device = "/dev/nvme0n1"; 7 | content = { 8 | type = "gpt"; 9 | partitions = { 10 | ESP = { 11 | priority = 1; 12 | name = "ESP"; 13 | start = "1M"; 14 | end = "1G"; 15 | type = "EF00"; 16 | content = { 17 | type = "filesystem"; 18 | format = "vfat"; 19 | mountpoint = "/boot"; 20 | mountOptions = [ "umask=0077" ]; 21 | }; 22 | }; 23 | root = { 24 | size = "100%"; 25 | content = { 26 | type = "btrfs"; 27 | extraArgs = [ "-f" ]; 28 | subvolumes = { 29 | "/rootfs" = { 30 | mountpoint = "/"; 31 | }; 32 | "/home" = { 33 | mountOptions = [ "compress=zstd" ]; 34 | mountpoint = "/home"; 35 | }; 36 | "/nix" = { 37 | mountOptions = [ 38 | "compress=zstd" 39 | "noatime" 40 | ]; 41 | mountpoint = "/nix"; 42 | }; 43 | "/swap" = { 44 | mountpoint = "/.swapvol"; 45 | swap = { 46 | swapfile.size = "2G"; 47 | }; 48 | }; 49 | }; 50 | 51 | mountpoint = "/partition-root"; 52 | swap = { 53 | swapfile = { 54 | size = "2G"; 55 | }; 56 | }; 57 | }; 58 | }; 59 | }; 60 | }; 61 | }; 62 | }; 63 | }; 64 | } 65 | -------------------------------------------------------------------------------- /modules/config/waybar/waybar.css: -------------------------------------------------------------------------------- 1 | * { 2 | font-family: "Sarasa Mono J"; 3 | font-size: 8pt; 4 | font-weight: bold; 5 | border-radius: 0px; 6 | transition-property: background-color; 7 | transition-duration: 0.5s; 8 | } 9 | 10 | window#waybar { 11 | background-color: transparent; 12 | } 13 | 14 | window>box { 15 | margin: 0 0px; 16 | background-color: rgba(43, 51, 57, 1.0); 17 | } 18 | 19 | #workspaces { 20 | margin: 0 0px; 21 | } 22 | 23 | #workspaces button { 24 | min-width: 25px; 25 | min-height: 0px; 26 | padding: 0 0px; 27 | } 28 | 29 | #workspaces button.focused { 30 | background-color: #a7c080; 31 | color: #2b3339; 32 | } 33 | 34 | #workspaces button.urgent { 35 | color: #d8caac; 36 | } 37 | 38 | #workspaces button:hover { 39 | background-color: #d8caac; 40 | color: #d8caac; 41 | } 42 | 43 | tooltip { 44 | background: rgb(48, 45, 65); 45 | } 46 | 47 | tooltip label { 48 | color: rgb(217, 224, 238); 49 | } 50 | 51 | #mode, 52 | #clock, 53 | #memory, 54 | #temperature, 55 | #cpu, 56 | #custom-music, 57 | #idle_inhibitor, 58 | #temperature, 59 | #backlight, 60 | #pulseaudio, 61 | #network, 62 | #battery, 63 | #custom-powermenu, 64 | #custom-cava-internal { 65 | padding-left: 8px; 66 | padding-right: 8px; 67 | } 68 | 69 | #memory { 70 | color: rgb(181, 232, 224); 71 | } 72 | 73 | #cpu { 74 | color: rgb(245, 194, 231); 75 | } 76 | 77 | #clock { 78 | color: rgb(217, 224, 238); 79 | } 80 | 81 | #idle_inhibitor { 82 | color: rgb(221, 182, 242); 83 | } 84 | 85 | #temperature { 86 | color: rgb(150, 205, 251); 87 | } 88 | 89 | #backlight { 90 | color: rgb(248, 189, 150); 91 | } 92 | 93 | #pulseaudio { 94 | color: rgb(245, 224, 220); 95 | } 96 | 97 | #network { 98 | color: #ABE9B3; 99 | } 100 | 101 | #network.disconnected { 102 | color: rgb(255, 255, 255); 103 | } 104 | 105 | #tray { 106 | padding-right: 8px; 107 | padding-left: 10px; 108 | } 109 | 110 | #window { 111 | color: rgb(181, 232, 224); 112 | } 113 | 114 | #custom-music { 115 | color: #87c095; 116 | } -------------------------------------------------------------------------------- /modules/config/fish.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.shell = 3 | { 4 | pkgs, 5 | lib, 6 | config, 7 | ... 8 | }: 9 | let 10 | shellAliases = { 11 | j = "just"; 12 | ls = "eza --icons=auto --hyperlink --color=always --color-scale=all --color-scale-mode=gradient --git --git-repos"; 13 | la = "eza --icons=auto --hyperlink --color=always --color-scale=all --color-scale-mode=gradient --git --git-repos -la"; 14 | l = "eza --icons=auto --hyperlink --color=always --color-scale=all --color-scale-mode=gradient --git --git-repos -lh"; 15 | swc = "sudo nixos-rebuild switch --flake /home/${config.my.name}/dev/den"; 16 | off = "poweroff"; 17 | usd = "uwsm start default"; 18 | g = "lazygit"; 19 | "cd.." = "cd .."; 20 | fp = "fish --private"; 21 | e = "exit"; 22 | st = "sudo systemctl-tui"; 23 | y = "yazi"; 24 | sc = "systemctl"; 25 | scs = "systemctl status"; 26 | scr = "systemctl restart"; 27 | jc = "journalctl"; 28 | ".." = "cd .."; 29 | "。。" = "cd .."; 30 | "..." = "cd ../.."; 31 | "。。。" = "cd ../.."; 32 | "...." = "cd ../../.."; 33 | "。。。。" = "cd ../../.."; 34 | }; 35 | 36 | shellInit = '' 37 | fish_vi_key_bindings 38 | set -U fish_greeting 39 | ''; 40 | 41 | interactiveShellInit = '' 42 | eval "$(${lib.getExe pkgs.atuin} init fish)" 43 | ${lib.getExe pkgs.zoxide} init fish | source 44 | ''; 45 | 46 | fishPackages = with pkgs; [ 47 | fishPlugins.tide 48 | fzf 49 | eza 50 | atuin 51 | zoxide 52 | just 53 | lazygit 54 | systemctl-tui 55 | ]; 56 | in 57 | { 58 | users.users.${config.my.name}.shell = pkgs.fish; 59 | 60 | programs.fish = { 61 | enable = true; 62 | shellAliases = shellAliases; 63 | shellInit = shellInit; 64 | interactiveShellInit = interactiveShellInit; 65 | }; 66 | 67 | my.packages = fishPackages; 68 | }; 69 | } 70 | -------------------------------------------------------------------------------- /modules/hosts/cave/default.nix: -------------------------------------------------------------------------------- 1 | { inputs, config, ... }: 2 | let 3 | inherit (config.flake.lib) mkHostModule; 4 | in 5 | { 6 | flake.modules.nixos.cave = 7 | { config, pkgs, ... }: 8 | { 9 | imports = mkHostModule { 10 | stateVersion = "25.11"; 11 | hostKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOI13Y5GVOaICSu+q2oUFGqAW894ioVvEXY6q7KdYa6G root@cave"; 12 | modules = [ 13 | { 14 | vaultix.secrets.mihomo = { 15 | file = inputs.self + "/secrets/mihomo.age"; 16 | mode = "640"; 17 | }; 18 | boot.loader.generic-extlinux-compatible.enable = true; 19 | boot.loader.grub.enable = false; 20 | 21 | fileSystems."/" = { 22 | device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; 23 | fsType = "ext4"; 24 | }; 25 | 26 | fileSystems."/var/log" = { 27 | device = "tmpfs"; 28 | fsType = "tmpfs"; 29 | }; 30 | 31 | networking.useDHCP = true; 32 | networking.firewall.enable = false; 33 | 34 | boot.kernel.sysctl = { 35 | "net.ipv6.conf.all.forwarding" = 1; 36 | "net.ipv4.conf.all.forwarding" = 1; 37 | }; 38 | 39 | documentation.man.generateCaches = false; 40 | 41 | services = { 42 | resolved.enable = false; 43 | dnsproxy = { 44 | enable = true; 45 | flags = [ 46 | "--cache" 47 | "--cache-optimistic" 48 | "--edns" 49 | ]; 50 | settings = { 51 | bootstrap = [ 52 | "8.8.8.8" 53 | "119.29.29.29" 54 | "tcp://223.6.6.6:53" 55 | ]; 56 | listen-addrs = [ "0.0.0.0" ]; 57 | listen-ports = [ 53 ]; 58 | upstream-mode = "parallel"; 59 | upstream = [ 60 | "https://1.1.1.1/dns-query" 61 | "h3://dns.alidns.com/dns-query" 62 | "tls://dot.pub" 63 | ]; 64 | }; 65 | }; 66 | mihomo = { 67 | enable = true; 68 | tunMode = true; 69 | webui = pkgs.metacubexd; 70 | configFile = config.vaultix.secrets.mihomo.path; 71 | }; 72 | }; 73 | } 74 | ]; 75 | }; 76 | }; 77 | } 78 | -------------------------------------------------------------------------------- /modules/users.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.users = 3 | { lib, config, ... }: 4 | { 5 | options = { 6 | my.name = lib.mkOption { 7 | type = lib.types.str; 8 | default = "ocfox"; 9 | description = "The primary user for this configuration."; 10 | }; 11 | 12 | my.config = lib.mkOption { 13 | type = with lib.types; attrsOf (attrsOf path); 14 | default = { }; 15 | description = "Declarative dotfile management for the user, mapping directly to ~/.config/"; 16 | }; 17 | 18 | my.packages = lib.mkOption { 19 | type = with lib.types; listOf package; 20 | default = [ ]; 21 | description = "A list of packages to be installed for the primary user."; 22 | }; 23 | }; 24 | 25 | config = lib.mkMerge [ 26 | { 27 | systemd.tmpfiles.rules = lib.flatten ( 28 | lib.mapAttrsToList ( 29 | appName: files: 30 | let 31 | user = config.my.name; 32 | targetDir = "/home/${user}/.config/${appName}"; 33 | in 34 | [ "d ${targetDir} - ${user} users - -" ] 35 | ++ (lib.mapAttrsToList ( 36 | fileName: source: "L+ ${targetDir}/${fileName} - ${user} users - ${source}" 37 | ) files) 38 | ) config.my.config 39 | ); 40 | } 41 | { 42 | my.name = "ocfox"; 43 | 44 | users.users.${config.my.name} = { 45 | isNormalUser = true; 46 | hashedPassword = "$6$jVI2tdENaEqUyZGh$rni.joO5US9t9RYM9wlIvia4L1YOObs44Kt3gBcooBJTeSFGyEorciM2CrKMEnzbojpi1KgPPe256i5Q46N1d0"; 47 | openssh.authorizedKeys.keys = [ 48 | "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHysCjoqwXAumW+cUCcFZDpC9yLx3Jh7x5du7r21fPE4" 49 | "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIHnLWTS5/vPyPFY+tCVYn3Ejf3NQpQzcGnWLQTyE7lbzAAAAC3NzaDpwYXNzZm94 ssh:passfox" 50 | ]; 51 | extraGroups = [ 52 | "adbusers" 53 | "wheel" 54 | "podman" 55 | "realtime" 56 | "dialout" 57 | "libvirtd" 58 | ]; 59 | packages = config.my.packages; 60 | }; 61 | 62 | users = { 63 | mutableUsers = false; 64 | users = { 65 | root.isSystemUser = true; 66 | }; 67 | }; 68 | 69 | services.userborn.enable = true; 70 | } 71 | ]; 72 | }; 73 | } 74 | -------------------------------------------------------------------------------- /modules/hosts/clare/default.nix: -------------------------------------------------------------------------------- 1 | { config, ... }: 2 | let 3 | inherit (config.flake.lib) mkHostModule; 4 | in 5 | { 6 | flake.modules.nixos.clare = 7 | { 8 | pkgs, 9 | modulesPath, 10 | lib, 11 | ... 12 | }: 13 | { 14 | imports = mkHostModule { 15 | stateVersion = "25.11"; 16 | modules = [ 17 | { 18 | boot.loader.grub.enable = true; 19 | boot.loader.grub.device = "/dev/vda"; 20 | swapDevices = [ 21 | { 22 | device = "/swapfile"; 23 | size = 69; 24 | } 25 | ]; 26 | boot.kernelParams = [ 27 | "console=ttyS0,115200n8" 28 | "console=tty0" 29 | ]; 30 | networking = { 31 | firewall.enable = false; 32 | nftables = { 33 | enable = true; 34 | ruleset = '' 35 | define INGRESS_INTERFACE="eth0" 36 | define PORT_RANGE=20000-50000 37 | define HYSTERIA_SERVER_PORT=443 38 | 39 | table inet hysteria_porthopping { 40 | chain prerouting { 41 | type nat hook prerouting priority dstnat; policy accept; 42 | iifname $INGRESS_INTERFACE udp dport $PORT_RANGE counter redirect to :$HYSTERIA_SERVER_PORT 43 | } 44 | } 45 | ''; 46 | }; 47 | usePredictableInterfaceNames = false; 48 | interfaces.eth0.ipv4.addresses = [ 49 | { 50 | address = "154.17.16.142"; 51 | prefixLength = 32; 52 | } 53 | ]; 54 | defaultGateway = { 55 | address = "193.41.250.250"; 56 | interface = "eth0"; 57 | }; 58 | nameservers = [ 59 | "1.1.1.1" 60 | "8.8.8.8" 61 | "2606:4700:4700::1111" 62 | "2001:4860:4860::8888" 63 | ]; 64 | }; 65 | 66 | imports = [ 67 | (modulesPath + "/profiles/qemu-guest.nix") 68 | ]; 69 | 70 | boot.initrd.availableKernelModules = [ 71 | "uhci_hcd" 72 | "ehci_pci" 73 | "ahci" 74 | "virtio_pci" 75 | "sr_mod" 76 | "virtio_blk" 77 | "ata_piix" 78 | "xen_blkfront" 79 | "vmw_pvscsi" 80 | ]; 81 | boot.initrd.kernelModules = [ ]; 82 | boot.kernelModules = [ "kvm-amd" ]; 83 | boot.extraModulePackages = [ ]; 84 | 85 | fileSystems."/" = { 86 | device = "/dev/disk/by-uuid/abf81274-ce56-4d1e-a613-b41aecf48ac8"; 87 | fsType = "ext4"; 88 | }; 89 | 90 | } 91 | ]; 92 | }; 93 | }; 94 | } 95 | -------------------------------------------------------------------------------- /modules/hosts/mizu/default.nix: -------------------------------------------------------------------------------- 1 | { config, ... }: 2 | let 3 | inherit (config.flake.lib) mkHostModule; 4 | in 5 | { 6 | flake.modules.nixos.mizu = 7 | { 8 | pkgs, 9 | modulesPath, 10 | lib, 11 | ... 12 | }: 13 | { 14 | imports = mkHostModule { 15 | stateVersion = "25.11"; 16 | modules = [ 17 | { 18 | boot.initrd.availableKernelModules = [ 19 | "ata_piix" 20 | "uhci_hcd" 21 | "virtio_pci" 22 | "virtio_scsi" 23 | "ehci_pci" 24 | "xhci_pci" 25 | "sr_mod" 26 | "virtio_blk" 27 | "ahci" 28 | "xen_blkfront" 29 | "vmw_pvscsi" 30 | ]; 31 | boot.initrd.kernelModules = [ ]; 32 | boot.kernelModules = [ "kvm-amd" ]; 33 | boot.extraModulePackages = [ ]; 34 | 35 | fileSystems."/" = { 36 | device = "/dev/disk/by-uuid/580fd907-a2af-478d-adf1-7a70edcca3be"; 37 | fsType = "ext4"; 38 | }; 39 | 40 | environment.systemPackages = [ 41 | pkgs.hysteria 42 | pkgs.tmux 43 | ]; 44 | 45 | networking = { 46 | firewall.enable = false; 47 | nftables = { 48 | enable = true; 49 | ruleset = '' 50 | define INGRESS_INTERFACE="eth0" 51 | define PORT_RANGE=20000-50000 52 | define HYSTERIA_SERVER_PORT=443 53 | 54 | table inet hysteria_porthopping { 55 | chain prerouting { 56 | type nat hook prerouting priority dstnat; policy accept; 57 | iifname $INGRESS_INTERFACE udp dport $PORT_RANGE counter redirect to :$HYSTERIA_SERVER_PORT 58 | } 59 | } 60 | ''; 61 | }; 62 | usePredictableInterfaceNames = false; 63 | nameservers = [ 64 | "1.1.1.1" 65 | "8.8.8.8" 66 | "2606:4700:4700::1111" 67 | "2001:4860:4860::8888" 68 | ]; 69 | }; 70 | 71 | boot.loader.grub.enable = true; 72 | boot.loader.grub.device = "/dev/vda"; 73 | swapDevices = [ 74 | { 75 | device = "/swapfile"; 76 | size = 1175; 77 | } 78 | ]; 79 | boot.kernelParams = [ 80 | "console=ttyS0,115200n8" 81 | "console=tty0" 82 | ]; 83 | services.openssh.enable = true; 84 | boot.kernel.sysctl."net.ipv6.conf.eth0.accept_ra" = false; 85 | boot.kernel.sysctl."net.ipv6.conf.eth0.autoconf" = false; 86 | 87 | imports = [ 88 | (modulesPath + "/profiles/qemu-guest.nix") 89 | ]; 90 | } 91 | ]; 92 | }; 93 | }; 94 | } 95 | -------------------------------------------------------------------------------- /modules/config/waybar/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.waybar = 3 | { 4 | lib, 5 | pkgs, 6 | config, 7 | ... 8 | }: 9 | let 10 | waybarSettings = [ 11 | { 12 | layer = "top"; 13 | position = "bottom"; 14 | "modules-left" = [ "sway/workspaces" ]; 15 | "modules-center" = [ "clock" ]; 16 | "modules-right" = [ 17 | "tray" 18 | "idle_inhibitor" 19 | "pulseaudio" 20 | "memory" 21 | "cpu" 22 | "network" 23 | ]; 24 | "sway/workspaces" = { 25 | "disable-scroll" = true; 26 | format = "{icon}"; 27 | "all-outputs" = true; 28 | "format-icons" = { 29 | "1" = "い"; 30 | "2" = "ろ"; 31 | "3" = "は"; 32 | "4" = "に"; 33 | "5" = "ほ"; 34 | "6" = "へ"; 35 | "7" = "と"; 36 | "8" = "ち"; 37 | "9" = "り"; 38 | "10" = "ぬ"; 39 | }; 40 | }; 41 | idle_inhibitor = { 42 | format = "{icon}"; 43 | "format-icons" = { 44 | "activated" = ""; 45 | "deactivated" = "待"; 46 | }; 47 | tooltip = false; 48 | }; 49 | pulseaudio = { 50 | format = "響 {volume}%"; 51 | "format-muted" = "󰝟 Muted"; 52 | "max-volume" = 200; 53 | "format-icons".default = [ 54 | "" 55 | "" 56 | "" 57 | ]; 58 | states.warning = 85; 59 | "scroll-step" = 1; 60 | "on-click" = "${lib.getExe pkgs.pwvucontrol}"; 61 | tooltip = false; 62 | }; 63 | clock = { 64 | interval = 1; 65 | format = "{:L%m月%d日(%a) %H時%M分}"; 66 | tooltip = true; 67 | locale = "ja_JP.UTF-8"; 68 | calendar = { 69 | format.today = "{}"; 70 | }; 71 | "tooltip-format" = "{calendar}"; 72 | }; 73 | battery = { 74 | states = { 75 | warning = 30; 76 | critical = 15; 77 | }; 78 | format = "{icon} {capacity}%"; 79 | "format-full" = "{icon} {capacity}%"; 80 | "format-charging" = "󰂄 {capacity}%"; 81 | "format-plugged" = " {capacity}%"; 82 | "format-alt" = "{icon} {time}"; 83 | "format-icons" = [ 84 | "" 85 | "" 86 | "" 87 | "" 88 | "" 89 | ]; 90 | }; 91 | cpu = { 92 | interval = 1; 93 | format = "荷 {usage}%"; 94 | }; 95 | memory = { 96 | interval = 5; 97 | format = "憶 {used}/{total}"; 98 | }; 99 | network = { 100 | interval = 1; 101 | "format-wifi" = "󰖩 {essid}"; 102 | "format-ethernet" = "{ipaddr}"; 103 | "format-linked" = "󰖩 {essid}"; 104 | "format-disconnected" = "󰖩 Disconnected"; 105 | tooltip = true; 106 | }; 107 | tray = { 108 | "icon-size" = 14; 109 | spacing = 5; 110 | }; 111 | } 112 | ]; 113 | in 114 | { 115 | my.packages = [ 116 | pkgs.pwvucontrol 117 | ]; 118 | 119 | programs.waybar.enable = true; 120 | 121 | my.config.waybar = { 122 | "config" = pkgs.writeText "waybar-config.json" (builtins.toJSON waybarSettings); 123 | "style.css" = ./waybar.css; 124 | }; 125 | }; 126 | } 127 | -------------------------------------------------------------------------------- /modules/config/helix.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.helix = 3 | { 4 | lib, 5 | pkgs, 6 | config, 7 | ... 8 | }: 9 | let 10 | settingsFormat = pkgs.formats.toml { }; 11 | 12 | settings = { 13 | theme = "everforest_dark"; 14 | editor = { 15 | line-number = "relative"; 16 | mouse = false; 17 | }; 18 | editor.cursor-shape = { 19 | insert = "bar"; 20 | normal = "block"; 21 | select = "underline"; 22 | }; 23 | keys = { 24 | normal = { 25 | "esc" = "collapse_selection"; 26 | "H" = "goto_line_start"; 27 | "L" = "goto_line_end"; 28 | "+" = ":format"; 29 | space = { 30 | backspace = ":w"; 31 | q = ":q"; 32 | }; 33 | }; 34 | select = { 35 | "H" = "goto_line_start"; 36 | "L" = "goto_line_end"; 37 | }; 38 | }; 39 | }; 40 | 41 | languages = { 42 | language = [ 43 | { 44 | name = "nix"; 45 | formatter = { 46 | command = "${lib.getExe pkgs.nixfmt-rfc-style}"; 47 | }; 48 | } 49 | { 50 | name = "typescript"; 51 | language-id = "typescript"; 52 | scope = "source.ts"; 53 | injection-regex = "^(ts|typescript)$"; 54 | file-types = [ 55 | "ts" 56 | "tsx" 57 | ]; 58 | shebangs = [ 59 | "deno" 60 | "node" 61 | ]; 62 | roots = [ 63 | "deno.json" 64 | "deno.jsonc" 65 | "package.json" 66 | "tsconfig.json" 67 | ]; 68 | auto-format = true; 69 | language-servers = [ 70 | { 71 | name = "deno-lsp"; 72 | except-features = [ "format" ]; 73 | } 74 | { 75 | name = "typescript-language-server"; 76 | except-features = [ "format" ]; 77 | } 78 | ]; 79 | formatter = { 80 | command = "deno"; 81 | args = [ 82 | "fmt" 83 | "-" 84 | ]; 85 | }; 86 | } 87 | ]; 88 | 89 | language-server = { 90 | deno-lsp = { 91 | command = lib.getExe pkgs.deno; 92 | args = [ "lsp" ]; 93 | required-root-patterns = [ "deno.*" ]; 94 | config.deno = { 95 | enable = true; 96 | suggest = { 97 | completeFunctionCalls = false; 98 | imports.hosts = { 99 | "https://deno.land" = true; 100 | }; 101 | }; 102 | }; 103 | }; 104 | 105 | typescript-language-server = { 106 | command = lib.getExe pkgs.nodePackages.typescript-language-server; 107 | args = [ "--stdio" ]; 108 | required-root-patterns = [ 109 | "package.json" 110 | "tsconfig.json" 111 | ]; 112 | }; 113 | 114 | vscode-css-language-server = { 115 | command = "${pkgs.nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"; 116 | args = [ "--stdio" ]; 117 | config = { 118 | provideFormatter = true; 119 | css.validate.enable = true; 120 | scss.validate.enable = true; 121 | }; 122 | }; 123 | 124 | ruff = { 125 | command = lib.getExe pkgs.ruff; 126 | args = [ "server" ]; 127 | }; 128 | 129 | dprint = { 130 | command = lib.getExe pkgs.dprint; 131 | args = [ "lsp" ]; 132 | }; 133 | 134 | vscode-json-language-server = { 135 | command = lib.getExe pkgs.vscode-json-languageserver; 136 | args = [ "--stdio" ]; 137 | }; 138 | }; 139 | }; 140 | in 141 | { 142 | my.packages = [ pkgs.helix ]; 143 | 144 | environment.variables.EDITOR = "hx"; 145 | 146 | my.config.helix = { 147 | "config.toml" = settingsFormat.generate "helix-config.toml" settings; 148 | "languages.toml" = settingsFormat.generate "helix-languages.toml" languages; 149 | }; 150 | }; 151 | } 152 | -------------------------------------------------------------------------------- /modules/hosts/laplace/default.nix: -------------------------------------------------------------------------------- 1 | { inputs, config, ... }: 2 | let 3 | inherit (config.flake.lib) mkHostModule; 4 | nixosModules = config.flake.modules.nixos; 5 | in 6 | { 7 | flake.modules.nixos.laplace = 8 | { 9 | pkgs, 10 | modulesPath, 11 | lib, 12 | config, 13 | ... 14 | }: 15 | { 16 | imports = mkHostModule { 17 | stateVersion = "25.11"; 18 | hostKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID8IVBgnE6cfei0k4va0fyzyoh9o62f9yM3FwGhnPJON"; 19 | modules = 20 | with nixosModules; 21 | [ 22 | facter 23 | disko 24 | ] 25 | ++ [ 26 | { facter.reportPath = ./facter.json; } 27 | { 28 | vaultix = { 29 | secrets.drive = { 30 | file = inputs.self + "/secrets/drive.age"; 31 | mode = "640"; 32 | }; 33 | secrets.vault = { 34 | file = inputs.self + "/secrets/vault.age"; 35 | mode = "640"; 36 | }; 37 | }; 38 | } 39 | { 40 | fileSystems."/var/lib/immich/library" = { 41 | device = "immich:immich"; 42 | fsType = "rclone"; 43 | options = 44 | let 45 | configPath = config.vaultix.secrets.drive.path; 46 | in 47 | [ 48 | "nodev" 49 | "nofail" 50 | "allow_other" 51 | "args2env" 52 | "vfs-cache-mode=writes" 53 | "config=${configPath}" 54 | ]; 55 | }; 56 | 57 | } 58 | { 59 | security.acme.defaults.email = "civet@ocfox.me"; 60 | security.acme.acceptTerms = true; 61 | 62 | boot.loader.grub = { 63 | efiSupport = true; 64 | efiInstallAsRemovable = true; 65 | }; 66 | 67 | boot.initrd = { 68 | compressor = "zstd"; 69 | compressorArgs = [ 70 | "-19" 71 | "-T0" 72 | ]; 73 | systemd.enable = true; 74 | }; 75 | 76 | services = { 77 | immich.enable = true; 78 | 79 | vaultwarden = { 80 | enable = true; 81 | config = { 82 | SMTP_SECURITY = "starttls"; 83 | SMTP_PORT = 587; 84 | SMTP_HOST = "smtp.migadu.com"; 85 | SMTP_FROM = "vault@cyans.dev"; 86 | SMTP_USERNAME = "vault@cyans.dev"; 87 | DOMAIN = "https://vault.cyans.dev"; 88 | }; 89 | environmentFile = config.vaultix.secrets.vault.path; 90 | }; 91 | 92 | caddy = { 93 | enable = true; 94 | email = "chi@ocfox.me"; 95 | 96 | virtualHosts = { 97 | "vault" = { 98 | hostName = "vault.cyans.dev"; 99 | extraConfig = '' 100 | reverse_proxy localhost:8000 { 101 | header_up X-Real-IP {remote_host} 102 | } 103 | ''; 104 | }; 105 | 106 | "immich" = { 107 | hostName = "immich.ocfox.me"; 108 | extraConfig = '' 109 | reverse_proxy localhost:2283 110 | ''; 111 | }; 112 | }; 113 | }; 114 | }; 115 | networking = { 116 | firewall = { 117 | enable = false; 118 | }; 119 | 120 | useDHCP = false; 121 | }; 122 | systemd.network = { 123 | enable = true; 124 | networks = { 125 | "eth0" = { 126 | matchConfig.MACAddress = "96:00:04:4e:89:6d"; 127 | address = [ 128 | "94.130.74.166/32" 129 | "2a01:4f8:1c1c:dd43::1/64" 130 | ]; 131 | routes = [ 132 | { Gateway = "fe80::1"; } 133 | { 134 | Gateway = "172.31.1.1"; 135 | GatewayOnLink = true; 136 | } 137 | ]; 138 | linkConfig.RequiredForOnline = "routable"; 139 | }; 140 | }; 141 | }; 142 | } 143 | ]; 144 | }; 145 | }; 146 | } 147 | -------------------------------------------------------------------------------- /modules/config/sway.nix: -------------------------------------------------------------------------------- 1 | { 2 | flake.modules.nixos.sway = 3 | { 4 | lib, 5 | pkgs, 6 | config, 7 | ... 8 | }: 9 | let 10 | bg = pkgs.fetchurl { 11 | url = "https://image.tmdb.org/t/p/original/iLis4CUhZ5cHmMEqEBYF7XcQl27.jpg"; 12 | name = "sawa"; 13 | hash = "sha256-5+uyUEmkp++hjc6xCis9MVXE0PKzKPHZZNrDIYD3qnQ="; 14 | }; 15 | config = '' 16 | font pango:monospace 8.000000 17 | floating_modifier Mod4 18 | default_border pixel 2 19 | default_floating_border normal 2 20 | hide_edge_borders smart 21 | focus_wrapping no 22 | focus_follows_mouse yes 23 | focus_on_window_activation smart 24 | mouse_warping output 25 | workspace_layout default 26 | workspace_auto_back_and_forth no 27 | client.focused #83b6af #83b6af #ffffff #a7c080 #83b6af 28 | client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a 29 | client.unfocused #2b3339 #2b3339 #888888 #a7c080 #2b3339 30 | client.urgent #e68183 #e68183 #ffffff #a7c080 #e68183 31 | client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c 32 | client.background #ffffff 33 | 34 | bindsym Mod4+0 workspace number 10 35 | bindsym Mod4+1 workspace number 1 36 | bindsym Mod4+2 workspace number 2 37 | bindsym Mod4+3 workspace number 3 38 | bindsym Mod4+4 workspace number 4 39 | bindsym Mod4+5 workspace number 5 40 | bindsym Mod4+6 workspace number 6 41 | bindsym Mod4+7 workspace number 7 42 | bindsym Mod4+8 workspace number 8 43 | bindsym Mod4+9 workspace number 9 44 | bindsym Mod4+Down focus down 45 | bindsym Mod4+Left focus left 46 | bindsym Mod4+Return exec ${lib.getExe pkgs.foot} 47 | bindsym Mod4+Right focus right 48 | bindsym Mod4+Shift+0 move container to workspace number 10 49 | bindsym Mod4+Shift+1 move container to workspace number 1 50 | bindsym Mod4+Shift+2 move container to workspace number 2 51 | bindsym Mod4+Shift+3 move container to workspace number 3 52 | bindsym Mod4+Shift+4 move container to workspace number 4 53 | bindsym Mod4+Shift+5 move container to workspace number 5 54 | bindsym Mod4+Shift+6 move container to workspace number 6 55 | bindsym Mod4+Shift+7 move container to workspace number 7 56 | bindsym Mod4+Shift+8 move container to workspace number 8 57 | bindsym Mod4+Shift+9 move container to workspace number 9 58 | bindsym Mod4+Shift+Down move down 59 | bindsym Mod4+Shift+Left move left 60 | bindsym Mod4+Shift+Right move right 61 | bindsym Mod4+Shift+Up move up 62 | bindsym Mod4+Shift+a exec ${lib.getExe pkgs.local.macshot} 63 | bindsym Mod4+Shift+c reload 64 | bindsym Mod4+Shift+d exec ${lib.getExe' pkgs.wireplumber "wpctl"} set-volume @DEFAULT_AUDIO_SINK@ 5%- 65 | bindsym Mod4+Shift+e exec ${lib.getExe pkgs.local.powermenu} 66 | bindsym Mod4+Shift+h move left 67 | bindsym Mod4+Shift+j move down 68 | bindsym Mod4+Shift+k move up 69 | bindsym Mod4+Shift+l move right 70 | bindsym Mod4+Shift+m exec ${lib.getExe pkgs.local.monitor-toggle} 71 | bindsym Mod4+Shift+minus move scratchpad 72 | bindsym Mod4+Shift+p exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy output 73 | bindsym Mod4+Shift+q kill 74 | bindsym Mod4+Shift+r exec ${lib.getExe pkgs.local.recorder-toggle} 75 | bindsym Mod4+Shift+s exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area 76 | bindsym Mod4+Shift+u exec ${lib.getExe' pkgs.wireplumber "wpctl"} set-volume @DEFAULT_AUDIO_SINK@ 5%+ 77 | bindsym Mod4+Up focus up 78 | bindsym Mod4+a focus parent 79 | bindsym Mod4+apostrophe exec ${lib.getExe pkgs.local.swaylock} 80 | bindsym Mod4+b splith 81 | bindsym Mod4+d move scratchpad 82 | bindsym Mod4+e layout toggle split 83 | bindsym Mod4+f fullscreen toggle 84 | bindsym Mod4+h focus left 85 | bindsym Mod4+i scratchpad show 86 | bindsym Mod4+j focus down 87 | bindsym Mod4+k focus up 88 | bindsym Mod4+l focus right 89 | bindsym Mod4+minus scratchpad show 90 | bindsym Mod4+o exec ${lib.getExe pkgs.fuzzel} 91 | bindsym Mod4+r mode resize 92 | bindsym Mod4+s layout stacking 93 | bindsym Mod4+space floating toggle 94 | bindsym Mod4+v splitv 95 | bindsym Mod4+w layout tabbed 96 | 97 | output "HDMI-A-1" { 98 | bg ${bg} fill 99 | mode 3840x2160 100 | scale 3 101 | } 102 | 103 | output "HDMI-A-2" { 104 | bg ${bg} fill 105 | mode 3840x2160 106 | position 0 0 107 | scale 3 108 | } 109 | 110 | mode "resize" { 111 | bindsym Down resize grow height 10 px 112 | bindsym Escape mode default 113 | bindsym Left resize shrink width 10 px 114 | bindsym Return mode default 115 | bindsym Right resize grow width 10 px 116 | bindsym Up resize shrink height 10 px 117 | bindsym h resize shrink width 10 px 118 | bindsym j resize grow height 10 px 119 | bindsym k resize shrink height 10 px 120 | bindsym l resize grow width 10 px 121 | } 122 | 123 | 124 | set $my_cursor macOS 125 | set $my_cursor_size 24 126 | 127 | seat seat0 xcursor_theme $my_cursor $my_cursor_size 128 | exec_always { 129 | gsettings set org.gnome.desktop.interface cursor-theme $my_cursor 130 | gsettings set org.gnome.desktop.interface cursor-size $my_cursor_size 131 | } 132 | 133 | exec "${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE; systemctl --user start sway-session.target" 134 | 135 | assign [app_id="firefox"] 1 136 | assign [app_id="org.telegram.desktop"] 3 137 | for_window [title="Feishu Meetings"] floating enable 138 | 139 | exec uwsm app -- fcitx5 -d 140 | 141 | exec uwsm app -- firefox 142 | exec uwsm app -- Telegram 143 | 144 | workspace "10" output "HDMI-A-1" 145 | titlebar_border_thickness 0 146 | titlebar_padding 1 147 | ''; 148 | in 149 | { 150 | my = { 151 | packages = with pkgs; [ 152 | wl-clipboard 153 | wireplumber 154 | sway-contrib.grimshot 155 | firefox 156 | telegram-desktop 157 | ]; 158 | config.sway = { 159 | "config" = pkgs.writeText "sway-config" config; 160 | }; 161 | }; 162 | 163 | environment.sessionVariables = { 164 | NIXOS_OZONE_WL = "1"; 165 | QT_IM_MODULES = "wayland;fcitx"; 166 | }; 167 | 168 | programs = { 169 | sway = { 170 | enable = true; 171 | wrapperFeatures.gtk = true; 172 | xwayland.enable = false; 173 | }; 174 | uwsm = { 175 | enable = true; 176 | waylandCompositors.sway = { 177 | prettyName = "sway"; 178 | comment = "Sway compositor managed by UWSM"; 179 | binPath = "/run/current-system/sw/bin/sway"; 180 | }; 181 | }; 182 | }; 183 | 184 | services.gnome.gnome-keyring.enable = true; 185 | security.pam.services.login.enableGnomeKeyring = true; 186 | }; 187 | } 188 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "crane": { 4 | "locked": { 5 | "lastModified": 1751562746, 6 | "narHash": "sha256-smpugNIkmDeicNz301Ll1bD7nFOty97T79m4GUMUczA=", 7 | "owner": "ipetkov", 8 | "repo": "crane", 9 | "rev": "aed2020fd3dc26e1e857d4107a5a67a33ab6c1fd", 10 | "type": "github" 11 | }, 12 | "original": { 13 | "owner": "ipetkov", 14 | "repo": "crane", 15 | "type": "github" 16 | } 17 | }, 18 | "disko": { 19 | "inputs": { 20 | "nixpkgs": [ 21 | "nixpkgs" 22 | ] 23 | }, 24 | "locked": { 25 | "lastModified": 1766150702, 26 | "narHash": "sha256-P0kM+5o+DKnB6raXgFEk3azw8Wqg5FL6wyl9jD+G5a4=", 27 | "owner": "nix-community", 28 | "repo": "disko", 29 | "rev": "916506443ecd0d0b4a0f4cf9d40a3c22ce39b378", 30 | "type": "github" 31 | }, 32 | "original": { 33 | "owner": "nix-community", 34 | "repo": "disko", 35 | "type": "github" 36 | } 37 | }, 38 | "flake-compat": { 39 | "flake": false, 40 | "locked": { 41 | "lastModified": 1696426674, 42 | "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", 43 | "owner": "edolstra", 44 | "repo": "flake-compat", 45 | "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", 46 | "type": "github" 47 | }, 48 | "original": { 49 | "owner": "edolstra", 50 | "repo": "flake-compat", 51 | "type": "github" 52 | } 53 | }, 54 | "flake-parts": { 55 | "inputs": { 56 | "nixpkgs-lib": "nixpkgs-lib" 57 | }, 58 | "locked": { 59 | "lastModified": 1765835352, 60 | "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", 61 | "owner": "hercules-ci", 62 | "repo": "flake-parts", 63 | "rev": "a34fae9c08a15ad73f295041fec82323541400a9", 64 | "type": "github" 65 | }, 66 | "original": { 67 | "owner": "hercules-ci", 68 | "repo": "flake-parts", 69 | "type": "github" 70 | } 71 | }, 72 | "flake-parts_2": { 73 | "inputs": { 74 | "nixpkgs-lib": "nixpkgs-lib_2" 75 | }, 76 | "locked": { 77 | "lastModified": 1751413152, 78 | "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", 79 | "owner": "hercules-ci", 80 | "repo": "flake-parts", 81 | "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", 82 | "type": "github" 83 | }, 84 | "original": { 85 | "owner": "hercules-ci", 86 | "repo": "flake-parts", 87 | "type": "github" 88 | } 89 | }, 90 | "gitignore": { 91 | "inputs": { 92 | "nixpkgs": [ 93 | "vaultix", 94 | "pre-commit-hooks", 95 | "nixpkgs" 96 | ] 97 | }, 98 | "locked": { 99 | "lastModified": 1709087332, 100 | "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", 101 | "owner": "hercules-ci", 102 | "repo": "gitignore.nix", 103 | "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", 104 | "type": "github" 105 | }, 106 | "original": { 107 | "owner": "hercules-ci", 108 | "repo": "gitignore.nix", 109 | "type": "github" 110 | } 111 | }, 112 | "import-tree": { 113 | "locked": { 114 | "lastModified": 1763762820, 115 | "narHash": "sha256-ZvYKbFib3AEwiNMLsejb/CWs/OL/srFQ8AogkebEPF0=", 116 | "owner": "vic", 117 | "repo": "import-tree", 118 | "rev": "3c23749d8013ec6daa1d7255057590e9ca726646", 119 | "type": "github" 120 | }, 121 | "original": { 122 | "owner": "vic", 123 | "repo": "import-tree", 124 | "type": "github" 125 | } 126 | }, 127 | "nixos-facter": { 128 | "locked": { 129 | "lastModified": 1765442039, 130 | "narHash": "sha256-k3lYQ+A1F7aTz8HnlU++bd9t/x/NP2A4v9+x6opcVg0=", 131 | "owner": "numtide", 132 | "repo": "nixos-facter-modules", 133 | "rev": "9dd775ee92de63f14edd021d59416e18ac2c00f1", 134 | "type": "github" 135 | }, 136 | "original": { 137 | "owner": "numtide", 138 | "repo": "nixos-facter-modules", 139 | "type": "github" 140 | } 141 | }, 142 | "nixpkgs": { 143 | "locked": { 144 | "lastModified": 1766314097, 145 | "narHash": "sha256-laJftWbghBehazn/zxVJ8NdENVgjccsWAdAqKXhErrM=", 146 | "owner": "NixOS", 147 | "repo": "nixpkgs", 148 | "rev": "306ea70f9eb0fb4e040f8540e2deab32ed7e2055", 149 | "type": "github" 150 | }, 151 | "original": { 152 | "owner": "NixOS", 153 | "ref": "nixpkgs-unstable", 154 | "repo": "nixpkgs", 155 | "type": "github" 156 | } 157 | }, 158 | "nixpkgs-lib": { 159 | "locked": { 160 | "lastModified": 1765674936, 161 | "narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=", 162 | "owner": "nix-community", 163 | "repo": "nixpkgs.lib", 164 | "rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85", 165 | "type": "github" 166 | }, 167 | "original": { 168 | "owner": "nix-community", 169 | "repo": "nixpkgs.lib", 170 | "type": "github" 171 | } 172 | }, 173 | "nixpkgs-lib_2": { 174 | "locked": { 175 | "lastModified": 1751159883, 176 | "narHash": "sha256-urW/Ylk9FIfvXfliA1ywh75yszAbiTEVgpPeinFyVZo=", 177 | "owner": "nix-community", 178 | "repo": "nixpkgs.lib", 179 | "rev": "14a40a1d7fb9afa4739275ac642ed7301a9ba1ab", 180 | "type": "github" 181 | }, 182 | "original": { 183 | "owner": "nix-community", 184 | "repo": "nixpkgs.lib", 185 | "type": "github" 186 | } 187 | }, 188 | "nixpkgs_2": { 189 | "locked": { 190 | "lastModified": 1751637120, 191 | "narHash": "sha256-xVNy/XopSfIG9c46nRmPaKfH1Gn/56vQ8++xWA8itO4=", 192 | "owner": "NixOS", 193 | "repo": "nixpkgs", 194 | "rev": "5c724ed1388e53cc231ed98330a60eb2f7be4be3", 195 | "type": "github" 196 | }, 197 | "original": { 198 | "owner": "NixOS", 199 | "ref": "nixos-unstable", 200 | "repo": "nixpkgs", 201 | "type": "github" 202 | } 203 | }, 204 | "pre-commit-hooks": { 205 | "inputs": { 206 | "flake-compat": "flake-compat", 207 | "gitignore": "gitignore", 208 | "nixpkgs": [ 209 | "vaultix", 210 | "nixpkgs" 211 | ] 212 | }, 213 | "locked": { 214 | "lastModified": 1750779888, 215 | "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", 216 | "owner": "cachix", 217 | "repo": "pre-commit-hooks.nix", 218 | "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", 219 | "type": "github" 220 | }, 221 | "original": { 222 | "owner": "cachix", 223 | "repo": "pre-commit-hooks.nix", 224 | "type": "github" 225 | } 226 | }, 227 | "root": { 228 | "inputs": { 229 | "disko": "disko", 230 | "flake-parts": "flake-parts", 231 | "import-tree": "import-tree", 232 | "nixos-facter": "nixos-facter", 233 | "nixpkgs": "nixpkgs", 234 | "vaultix": "vaultix" 235 | } 236 | }, 237 | "rust-overlay": { 238 | "inputs": { 239 | "nixpkgs": [ 240 | "vaultix", 241 | "nixpkgs" 242 | ] 243 | }, 244 | "locked": { 245 | "lastModified": 1751683029, 246 | "narHash": "sha256-dYO5X5jK8bpQOeRAo8R5aUt6M/+Ji1cZgstZI7SQ2IA=", 247 | "owner": "oxalica", 248 | "repo": "rust-overlay", 249 | "rev": "9e5e62a33a929a67a5427fb7324a6f583dced0b2", 250 | "type": "github" 251 | }, 252 | "original": { 253 | "owner": "oxalica", 254 | "repo": "rust-overlay", 255 | "type": "github" 256 | } 257 | }, 258 | "vaultix": { 259 | "inputs": { 260 | "crane": "crane", 261 | "flake-parts": "flake-parts_2", 262 | "nixpkgs": "nixpkgs_2", 263 | "pre-commit-hooks": "pre-commit-hooks", 264 | "rust-overlay": "rust-overlay" 265 | }, 266 | "locked": { 267 | "lastModified": 1761445131, 268 | "narHash": "sha256-CtWTkwW0c5N+1AgCvA3ASD/dwzLbrdU+nRLr/A6fsgk=", 269 | "owner": "ocfox", 270 | "repo": "vaultix", 271 | "rev": "0f4b5dd72abf1d7b4e6e04a705bb978aa2ba663f", 272 | "type": "github" 273 | }, 274 | "original": { 275 | "owner": "ocfox", 276 | "repo": "vaultix", 277 | "type": "github" 278 | } 279 | } 280 | }, 281 | "root": "root", 282 | "version": 7 283 | } 284 | -------------------------------------------------------------------------------- /modules/hosts/laplace/facter.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "system": "aarch64-linux", 4 | "virtualisation": "kvm", 5 | "hardware": { 6 | "bridge": [ 7 | { 8 | "index": 6, 9 | "attached_to": 0, 10 | "class_list": [ 11 | "pci", 12 | "bridge" 13 | ], 14 | "bus_type": { 15 | "hex": "0004", 16 | "name": "PCI", 17 | "value": 4 18 | }, 19 | "slot": { 20 | "bus": 0, 21 | "number": 2 22 | }, 23 | "base_class": { 24 | "hex": "0006", 25 | "name": "Bridge", 26 | "value": 6 27 | }, 28 | "sub_class": { 29 | "hex": "0004", 30 | "name": "PCI bridge", 31 | "value": 4 32 | }, 33 | "pci_interface": { 34 | "hex": "0000", 35 | "name": "Normal decode", 36 | "value": 0 37 | }, 38 | "vendor": { 39 | "hex": "1b36", 40 | "value": 6966 41 | }, 42 | "sub_vendor": { 43 | "hex": "1b36", 44 | "value": 6966 45 | }, 46 | "device": { 47 | "hex": "000c", 48 | "value": 12 49 | }, 50 | "sub_device": { 51 | "hex": "0000", 52 | "value": 0 53 | }, 54 | "model": "PCI bridge", 55 | "sysfs_id": "/devices/pci0000:00/0000:00:02.7", 56 | "sysfs_bus_id": "0000:00:02.7", 57 | "detail": { 58 | "function": 7, 59 | "command": 1031, 60 | "header_type": 1, 61 | "secondary_bus": 8, 62 | "prog_if": 0 63 | }, 64 | "driver": "pcieport", 65 | "driver_module": "pcieportdrv", 66 | "drivers": [ 67 | "pcieport" 68 | ], 69 | "driver_modules": [ 70 | "pcieportdrv" 71 | ], 72 | "module_alias": "pci:v00001B36d0000000Csv00001B36sd00000000bc06sc04i00" 73 | }, 74 | { 75 | "index": 7, 76 | "attached_to": 0, 77 | "class_list": [ 78 | "pci", 79 | "bridge" 80 | ], 81 | "bus_type": { 82 | "hex": "0004", 83 | "name": "PCI", 84 | "value": 4 85 | }, 86 | "slot": { 87 | "bus": 0, 88 | "number": 2 89 | }, 90 | "base_class": { 91 | "hex": "0006", 92 | "name": "Bridge", 93 | "value": 6 94 | }, 95 | "sub_class": { 96 | "hex": "0004", 97 | "name": "PCI bridge", 98 | "value": 4 99 | }, 100 | "pci_interface": { 101 | "hex": "0000", 102 | "name": "Normal decode", 103 | "value": 0 104 | }, 105 | "vendor": { 106 | "hex": "1b36", 107 | "value": 6966 108 | }, 109 | "sub_vendor": { 110 | "hex": "1b36", 111 | "value": 6966 112 | }, 113 | "device": { 114 | "hex": "000c", 115 | "value": 12 116 | }, 117 | "sub_device": { 118 | "hex": "0000", 119 | "value": 0 120 | }, 121 | "model": "PCI bridge", 122 | "sysfs_id": "/devices/pci0000:00/0000:00:02.5", 123 | "sysfs_bus_id": "0000:00:02.5", 124 | "detail": { 125 | "function": 5, 126 | "command": 1031, 127 | "header_type": 1, 128 | "secondary_bus": 6, 129 | "prog_if": 0 130 | }, 131 | "driver": "pcieport", 132 | "driver_module": "pcieportdrv", 133 | "drivers": [ 134 | "pcieport" 135 | ], 136 | "driver_modules": [ 137 | "pcieportdrv" 138 | ], 139 | "module_alias": "pci:v00001B36d0000000Csv00001B36sd00000000bc06sc04i00" 140 | }, 141 | { 142 | "index": 10, 143 | "attached_to": 0, 144 | "class_list": [ 145 | "pci", 146 | "bridge" 147 | ], 148 | "bus_type": { 149 | "hex": "0004", 150 | "name": "PCI", 151 | "value": 4 152 | }, 153 | "slot": { 154 | "bus": 0, 155 | "number": 2 156 | }, 157 | "base_class": { 158 | "hex": "0006", 159 | "name": "Bridge", 160 | "value": 6 161 | }, 162 | "sub_class": { 163 | "hex": "0004", 164 | "name": "PCI bridge", 165 | "value": 4 166 | }, 167 | "pci_interface": { 168 | "hex": "0000", 169 | "name": "Normal decode", 170 | "value": 0 171 | }, 172 | "vendor": { 173 | "hex": "1b36", 174 | "value": 6966 175 | }, 176 | "sub_vendor": { 177 | "hex": "1b36", 178 | "value": 6966 179 | }, 180 | "device": { 181 | "hex": "000c", 182 | "value": 12 183 | }, 184 | "sub_device": { 185 | "hex": "0000", 186 | "value": 0 187 | }, 188 | "model": "PCI bridge", 189 | "sysfs_id": "/devices/pci0000:00/0000:00:02.3", 190 | "sysfs_bus_id": "0000:00:02.3", 191 | "detail": { 192 | "function": 3, 193 | "command": 1031, 194 | "header_type": 1, 195 | "secondary_bus": 4, 196 | "prog_if": 0 197 | }, 198 | "driver": "pcieport", 199 | "driver_module": "pcieportdrv", 200 | "drivers": [ 201 | "pcieport" 202 | ], 203 | "driver_modules": [ 204 | "pcieportdrv" 205 | ], 206 | "module_alias": "pci:v00001B36d0000000Csv00001B36sd00000000bc06sc04i00" 207 | }, 208 | { 209 | "index": 13, 210 | "attached_to": 0, 211 | "class_list": [ 212 | "pci", 213 | "bridge" 214 | ], 215 | "bus_type": { 216 | "hex": "0004", 217 | "name": "PCI", 218 | "value": 4 219 | }, 220 | "slot": { 221 | "bus": 0, 222 | "number": 2 223 | }, 224 | "base_class": { 225 | "hex": "0006", 226 | "name": "Bridge", 227 | "value": 6 228 | }, 229 | "sub_class": { 230 | "hex": "0004", 231 | "name": "PCI bridge", 232 | "value": 4 233 | }, 234 | "pci_interface": { 235 | "hex": "0000", 236 | "name": "Normal decode", 237 | "value": 0 238 | }, 239 | "vendor": { 240 | "hex": "1b36", 241 | "value": 6966 242 | }, 243 | "sub_vendor": { 244 | "hex": "1b36", 245 | "value": 6966 246 | }, 247 | "device": { 248 | "hex": "000c", 249 | "value": 12 250 | }, 251 | "sub_device": { 252 | "hex": "0000", 253 | "value": 0 254 | }, 255 | "model": "PCI bridge", 256 | "sysfs_id": "/devices/pci0000:00/0000:00:02.1", 257 | "sysfs_bus_id": "0000:00:02.1", 258 | "detail": { 259 | "function": 1, 260 | "command": 1031, 261 | "header_type": 1, 262 | "secondary_bus": 2, 263 | "prog_if": 0 264 | }, 265 | "driver": "pcieport", 266 | "driver_module": "pcieportdrv", 267 | "drivers": [ 268 | "pcieport" 269 | ], 270 | "driver_modules": [ 271 | "pcieportdrv" 272 | ], 273 | "module_alias": "pci:v00001B36d0000000Csv00001B36sd00000000bc06sc04i00" 274 | }, 275 | { 276 | "index": 14, 277 | "attached_to": 0, 278 | "class_list": [ 279 | "pci", 280 | "bridge" 281 | ], 282 | "bus_type": { 283 | "hex": "0004", 284 | "name": "PCI", 285 | "value": 4 286 | }, 287 | "slot": { 288 | "bus": 0, 289 | "number": 0 290 | }, 291 | "base_class": { 292 | "hex": "0006", 293 | "name": "Bridge", 294 | "value": 6 295 | }, 296 | "sub_class": { 297 | "hex": "0000", 298 | "name": "Host bridge", 299 | "value": 0 300 | }, 301 | "vendor": { 302 | "hex": "1b36", 303 | "value": 6966 304 | }, 305 | "sub_vendor": { 306 | "hex": "1af4", 307 | "value": 6900 308 | }, 309 | "device": { 310 | "hex": "0008", 311 | "value": 8 312 | }, 313 | "sub_device": { 314 | "hex": "1100", 315 | "value": 4352 316 | }, 317 | "model": "Host bridge", 318 | "sysfs_id": "/devices/pci0000:00/0000:00:00.0", 319 | "sysfs_bus_id": "0000:00:00.0", 320 | "detail": { 321 | "function": 0, 322 | "command": 0, 323 | "header_type": 0, 324 | "secondary_bus": 0, 325 | "prog_if": 0 326 | }, 327 | "module_alias": "pci:v00001B36d00000008sv00001AF4sd00001100bc06sc00i00" 328 | }, 329 | { 330 | "index": 16, 331 | "attached_to": 0, 332 | "class_list": [ 333 | "pci", 334 | "bridge" 335 | ], 336 | "bus_type": { 337 | "hex": "0004", 338 | "name": "PCI", 339 | "value": 4 340 | }, 341 | "slot": { 342 | "bus": 0, 343 | "number": 3 344 | }, 345 | "base_class": { 346 | "hex": "0006", 347 | "name": "Bridge", 348 | "value": 6 349 | }, 350 | "sub_class": { 351 | "hex": "0004", 352 | "name": "PCI bridge", 353 | "value": 4 354 | }, 355 | "pci_interface": { 356 | "hex": "0000", 357 | "name": "Normal decode", 358 | "value": 0 359 | }, 360 | "vendor": { 361 | "hex": "1b36", 362 | "value": 6966 363 | }, 364 | "sub_vendor": { 365 | "hex": "1b36", 366 | "value": 6966 367 | }, 368 | "device": { 369 | "hex": "000c", 370 | "value": 12 371 | }, 372 | "sub_device": { 373 | "hex": "0000", 374 | "value": 0 375 | }, 376 | "model": "PCI bridge", 377 | "sysfs_id": "/devices/pci0000:00/0000:00:03.0", 378 | "sysfs_bus_id": "0000:00:03.0", 379 | "detail": { 380 | "function": 0, 381 | "command": 1031, 382 | "header_type": 1, 383 | "secondary_bus": 9, 384 | "prog_if": 0 385 | }, 386 | "driver": "pcieport", 387 | "driver_module": "pcieportdrv", 388 | "drivers": [ 389 | "pcieport" 390 | ], 391 | "driver_modules": [ 392 | "pcieportdrv" 393 | ], 394 | "module_alias": "pci:v00001B36d0000000Csv00001B36sd00000000bc06sc04i00" 395 | }, 396 | { 397 | "index": 17, 398 | "attached_to": 0, 399 | "class_list": [ 400 | "pci", 401 | "bridge" 402 | ], 403 | "bus_type": { 404 | "hex": "0004", 405 | "name": "PCI", 406 | "value": 4 407 | }, 408 | "slot": { 409 | "bus": 0, 410 | "number": 2 411 | }, 412 | "base_class": { 413 | "hex": "0006", 414 | "name": "Bridge", 415 | "value": 6 416 | }, 417 | "sub_class": { 418 | "hex": "0004", 419 | "name": "PCI bridge", 420 | "value": 4 421 | }, 422 | "pci_interface": { 423 | "hex": "0000", 424 | "name": "Normal decode", 425 | "value": 0 426 | }, 427 | "vendor": { 428 | "hex": "1b36", 429 | "value": 6966 430 | }, 431 | "sub_vendor": { 432 | "hex": "1b36", 433 | "value": 6966 434 | }, 435 | "device": { 436 | "hex": "000c", 437 | "value": 12 438 | }, 439 | "sub_device": { 440 | "hex": "0000", 441 | "value": 0 442 | }, 443 | "model": "PCI bridge", 444 | "sysfs_id": "/devices/pci0000:00/0000:00:02.6", 445 | "sysfs_bus_id": "0000:00:02.6", 446 | "detail": { 447 | "function": 6, 448 | "command": 1031, 449 | "header_type": 1, 450 | "secondary_bus": 7, 451 | "prog_if": 0 452 | }, 453 | "driver": "pcieport", 454 | "driver_module": "pcieportdrv", 455 | "drivers": [ 456 | "pcieport" 457 | ], 458 | "driver_modules": [ 459 | "pcieportdrv" 460 | ], 461 | "module_alias": "pci:v00001B36d0000000Csv00001B36sd00000000bc06sc04i00" 462 | }, 463 | { 464 | "index": 18, 465 | "attached_to": 0, 466 | "class_list": [ 467 | "pci", 468 | "bridge" 469 | ], 470 | "bus_type": { 471 | "hex": "0004", 472 | "name": "PCI", 473 | "value": 4 474 | }, 475 | "slot": { 476 | "bus": 0, 477 | "number": 2 478 | }, 479 | "base_class": { 480 | "hex": "0006", 481 | "name": "Bridge", 482 | "value": 6 483 | }, 484 | "sub_class": { 485 | "hex": "0004", 486 | "name": "PCI bridge", 487 | "value": 4 488 | }, 489 | "pci_interface": { 490 | "hex": "0000", 491 | "name": "Normal decode", 492 | "value": 0 493 | }, 494 | "vendor": { 495 | "hex": "1b36", 496 | "value": 6966 497 | }, 498 | "sub_vendor": { 499 | "hex": "1b36", 500 | "value": 6966 501 | }, 502 | "device": { 503 | "hex": "000c", 504 | "value": 12 505 | }, 506 | "sub_device": { 507 | "hex": "0000", 508 | "value": 0 509 | }, 510 | "model": "PCI bridge", 511 | "sysfs_id": "/devices/pci0000:00/0000:00:02.4", 512 | "sysfs_bus_id": "0000:00:02.4", 513 | "detail": { 514 | "function": 4, 515 | "command": 1031, 516 | "header_type": 1, 517 | "secondary_bus": 5, 518 | "prog_if": 0 519 | }, 520 | "driver": "pcieport", 521 | "driver_module": "pcieportdrv", 522 | "drivers": [ 523 | "pcieport" 524 | ], 525 | "driver_modules": [ 526 | "pcieportdrv" 527 | ], 528 | "module_alias": "pci:v00001B36d0000000Csv00001B36sd00000000bc06sc04i00" 529 | }, 530 | { 531 | "index": 20, 532 | "attached_to": 0, 533 | "class_list": [ 534 | "pci", 535 | "bridge" 536 | ], 537 | "bus_type": { 538 | "hex": "0004", 539 | "name": "PCI", 540 | "value": 4 541 | }, 542 | "slot": { 543 | "bus": 0, 544 | "number": 2 545 | }, 546 | "base_class": { 547 | "hex": "0006", 548 | "name": "Bridge", 549 | "value": 6 550 | }, 551 | "sub_class": { 552 | "hex": "0004", 553 | "name": "PCI bridge", 554 | "value": 4 555 | }, 556 | "pci_interface": { 557 | "hex": "0000", 558 | "name": "Normal decode", 559 | "value": 0 560 | }, 561 | "vendor": { 562 | "hex": "1b36", 563 | "value": 6966 564 | }, 565 | "sub_vendor": { 566 | "hex": "1b36", 567 | "value": 6966 568 | }, 569 | "device": { 570 | "hex": "000c", 571 | "value": 12 572 | }, 573 | "sub_device": { 574 | "hex": "0000", 575 | "value": 0 576 | }, 577 | "model": "PCI bridge", 578 | "sysfs_id": "/devices/pci0000:00/0000:00:02.2", 579 | "sysfs_bus_id": "0000:00:02.2", 580 | "detail": { 581 | "function": 2, 582 | "command": 1031, 583 | "header_type": 1, 584 | "secondary_bus": 3, 585 | "prog_if": 0 586 | }, 587 | "driver": "pcieport", 588 | "driver_module": "pcieportdrv", 589 | "drivers": [ 590 | "pcieport" 591 | ], 592 | "driver_modules": [ 593 | "pcieportdrv" 594 | ], 595 | "module_alias": "pci:v00001B36d0000000Csv00001B36sd00000000bc06sc04i00" 596 | }, 597 | { 598 | "index": 22, 599 | "attached_to": 0, 600 | "class_list": [ 601 | "pci", 602 | "bridge" 603 | ], 604 | "bus_type": { 605 | "hex": "0004", 606 | "name": "PCI", 607 | "value": 4 608 | }, 609 | "slot": { 610 | "bus": 0, 611 | "number": 2 612 | }, 613 | "base_class": { 614 | "hex": "0006", 615 | "name": "Bridge", 616 | "value": 6 617 | }, 618 | "sub_class": { 619 | "hex": "0004", 620 | "name": "PCI bridge", 621 | "value": 4 622 | }, 623 | "pci_interface": { 624 | "hex": "0000", 625 | "name": "Normal decode", 626 | "value": 0 627 | }, 628 | "vendor": { 629 | "hex": "1b36", 630 | "value": 6966 631 | }, 632 | "sub_vendor": { 633 | "hex": "1b36", 634 | "value": 6966 635 | }, 636 | "device": { 637 | "hex": "000c", 638 | "value": 12 639 | }, 640 | "sub_device": { 641 | "hex": "0000", 642 | "value": 0 643 | }, 644 | "model": "PCI bridge", 645 | "sysfs_id": "/devices/pci0000:00/0000:00:02.0", 646 | "sysfs_bus_id": "0000:00:02.0", 647 | "detail": { 648 | "function": 0, 649 | "command": 1031, 650 | "header_type": 1, 651 | "secondary_bus": 1, 652 | "prog_if": 0 653 | }, 654 | "driver": "pcieport", 655 | "driver_module": "pcieportdrv", 656 | "drivers": [ 657 | "pcieport" 658 | ], 659 | "driver_modules": [ 660 | "pcieportdrv" 661 | ], 662 | "module_alias": "pci:v00001B36d0000000Csv00001B36sd00000000bc06sc04i00" 663 | } 664 | ], 665 | "cdrom": [ 666 | { 667 | "index": 31, 668 | "attached_to": 27, 669 | "class_list": [ 670 | "cdrom", 671 | "scsi", 672 | "block_device" 673 | ], 674 | "bus_type": { 675 | "hex": "0084", 676 | "name": "SCSI", 677 | "value": 132 678 | }, 679 | "slot": { 680 | "bus": 0, 681 | "number": 0 682 | }, 683 | "base_class": { 684 | "hex": "0106", 685 | "name": "Mass Storage Device", 686 | "value": 262 687 | }, 688 | "sub_class": { 689 | "hex": "0002", 690 | "name": "CD-ROM", 691 | "value": 2 692 | }, 693 | "pci_interface": { 694 | "hex": "0003", 695 | "name": "DVD", 696 | "value": 3 697 | }, 698 | "vendor": { 699 | "hex": "0000", 700 | "name": "QEMU", 701 | "value": 0 702 | }, 703 | "device": { 704 | "hex": "0000", 705 | "name": "QEMU CD-ROM", 706 | "value": 0 707 | }, 708 | "revision": { 709 | "hex": "0000", 710 | "name": "2.5+", 711 | "value": 0 712 | }, 713 | "model": "QEMU CD-ROM", 714 | "sysfs_id": "/class/block/sr0", 715 | "sysfs_bus_id": "0:0:0:0", 716 | "sysfs_device_link": "/devices/pci0000:00/0000:00:02.5/0000:06:00.0/virtio5/host0/target0:0:0/0:0:0:0", 717 | "unix_device_names": [ 718 | "/dev/cdrom", 719 | "/dev/disk/by-path/pci-0000:06:00.0-scsi-0:0:0:0", 720 | "/dev/sr0" 721 | ], 722 | "unix_device_name2": "/dev/sg0", 723 | "driver": "virtio_scsi", 724 | "driver_module": "virtio_scsi", 725 | "drivers": [ 726 | "sr", 727 | "virtio_scsi" 728 | ], 729 | "driver_modules": [ 730 | "sr_mod", 731 | "virtio_scsi" 732 | ] 733 | } 734 | ], 735 | "cpu": [ 736 | { 737 | "architecture": "aarch64", 738 | "vendor_name": "ARM Limited", 739 | "family": 3, 740 | "model": 1, 741 | "stepping": 0, 742 | "features": [ 743 | "fp", 744 | "asimd", 745 | "evtstrm", 746 | "aes", 747 | "pmull", 748 | "sha1", 749 | "sha2", 750 | "crc32", 751 | "atomics", 752 | "fphp", 753 | "asimdhp", 754 | "cpuid", 755 | "asimdrdm", 756 | "lrcpc", 757 | "dcpop", 758 | "asimddp" 759 | ], 760 | "bogo": 50, 761 | "physical_id": 0, 762 | "fpu": false, 763 | "fpu_exception": false, 764 | "write_protect": false, 765 | "address_sizes": { 766 | "physical": "0x0", 767 | "virtual": "0x0" 768 | } 769 | } 770 | ], 771 | "disk": [ 772 | { 773 | "index": 32, 774 | "attached_to": 27, 775 | "class_list": [ 776 | "disk", 777 | "scsi", 778 | "block_device" 779 | ], 780 | "bus_type": { 781 | "hex": "0084", 782 | "name": "SCSI", 783 | "value": 132 784 | }, 785 | "slot": { 786 | "bus": 0, 787 | "number": 0 788 | }, 789 | "base_class": { 790 | "hex": "0106", 791 | "name": "Mass Storage Device", 792 | "value": 262 793 | }, 794 | "sub_class": { 795 | "hex": "0000", 796 | "name": "Disk", 797 | "value": 0 798 | }, 799 | "vendor": { 800 | "hex": "0000", 801 | "name": "QEMU", 802 | "value": 0 803 | }, 804 | "device": { 805 | "hex": "0000", 806 | "name": "QEMU HARDDISK", 807 | "value": 0 808 | }, 809 | "revision": { 810 | "hex": "0000", 811 | "name": "2.5+", 812 | "value": 0 813 | }, 814 | "model": "QEMU HARDDISK", 815 | "sysfs_id": "/class/block/sda", 816 | "sysfs_bus_id": "0:0:0:1", 817 | "sysfs_device_link": "/devices/pci0000:00/0000:00:02.5/0000:06:00.0/virtio5/host0/target0:0:0/0:0:0:1", 818 | "unix_device_names": [ 819 | "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_62341490", 820 | "/dev/disk/by-path/pci-0000:06:00.0-scsi-0:0:0:1", 821 | "/dev/sda" 822 | ], 823 | "unix_device_name2": "/dev/sg1", 824 | "resources": [ 825 | { 826 | "type": "disk_geo", 827 | "cylinders": 39064, 828 | "heads": 64, 829 | "sectors": 32, 830 | "size": "0x0", 831 | "geo_type": "logical" 832 | }, 833 | { 834 | "type": "size", 835 | "unit": "sectors", 836 | "value_1": 80003072, 837 | "value_2": 512 838 | } 839 | ], 840 | "driver": "virtio_scsi", 841 | "driver_module": "virtio_scsi", 842 | "drivers": [ 843 | "sd", 844 | "virtio_scsi" 845 | ], 846 | "driver_modules": [ 847 | "virtio_scsi" 848 | ] 849 | } 850 | ], 851 | "graphics_card": [ 852 | { 853 | "index": 9, 854 | "attached_to": 0, 855 | "class_list": [ 856 | "graphics_card", 857 | "pci" 858 | ], 859 | "bus_type": { 860 | "hex": "0004", 861 | "name": "PCI", 862 | "value": 4 863 | }, 864 | "slot": { 865 | "bus": 0, 866 | "number": 1 867 | }, 868 | "base_class": { 869 | "hex": "0003", 870 | "name": "Display controller", 871 | "value": 3 872 | }, 873 | "sub_class": { 874 | "hex": "0080", 875 | "name": "Display controller", 876 | "value": 128 877 | }, 878 | "vendor": { 879 | "hex": "1af4", 880 | "value": 6900 881 | }, 882 | "sub_vendor": { 883 | "hex": "1af4", 884 | "value": 6900 885 | }, 886 | "device": { 887 | "hex": "1050", 888 | "value": 4176 889 | }, 890 | "sub_device": { 891 | "hex": "1100", 892 | "value": 4352 893 | }, 894 | "revision": { 895 | "hex": "0001", 896 | "value": 1 897 | }, 898 | "model": "Display controller", 899 | "sysfs_id": "/devices/pci0000:00/0000:00:01.0", 900 | "sysfs_bus_id": "0000:00:01.0", 901 | "detail": { 902 | "function": 0, 903 | "command": 1030, 904 | "header_type": 0, 905 | "secondary_bus": 0, 906 | "prog_if": 0 907 | }, 908 | "driver": "virtio-pci", 909 | "driver_module": "virtio_pci", 910 | "drivers": [ 911 | "virtio-pci" 912 | ], 913 | "driver_modules": [ 914 | "virtio_pci" 915 | ], 916 | "module_alias": "pci:v00001AF4d00001050sv00001AF4sd00001100bc03sc80i00" 917 | } 918 | ], 919 | "hub": [ 920 | { 921 | "index": 34, 922 | "attached_to": 8, 923 | "class_list": [ 924 | "usb", 925 | "hub" 926 | ], 927 | "bus_type": { 928 | "hex": "0086", 929 | "name": "USB", 930 | "value": 134 931 | }, 932 | "slot": { 933 | "bus": 0, 934 | "number": 0 935 | }, 936 | "base_class": { 937 | "hex": "010a", 938 | "name": "Hub", 939 | "value": 266 940 | }, 941 | "vendor": { 942 | "hex": "1d6b", 943 | "name": "Linux 6.12.51 xhci-hcd", 944 | "value": 7531 945 | }, 946 | "device": { 947 | "hex": "0002", 948 | "name": "xHCI Host Controller", 949 | "value": 2 950 | }, 951 | "revision": { 952 | "hex": "0000", 953 | "name": "6.12", 954 | "value": 0 955 | }, 956 | "serial": "0000:02:00.0", 957 | "model": "Linux 6.12.51 xhci-hcd xHCI Host Controller", 958 | "sysfs_id": "/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-0:1.0", 959 | "sysfs_bus_id": "1-0:1.0", 960 | "resources": [ 961 | { 962 | "type": "baud", 963 | "speed": 480000000, 964 | "bits": 0, 965 | "stop_bits": 0, 966 | "parity": 0, 967 | "handshake": 0 968 | } 969 | ], 970 | "detail": { 971 | "device_class": { 972 | "hex": "0009", 973 | "name": "hub", 974 | "value": 9 975 | }, 976 | "device_subclass": { 977 | "hex": "0000", 978 | "name": "per_interface", 979 | "value": 0 980 | }, 981 | "device_protocol": 1, 982 | "interface_class": { 983 | "hex": "0009", 984 | "name": "hub", 985 | "value": 9 986 | }, 987 | "interface_subclass": { 988 | "hex": "0000", 989 | "name": "per_interface", 990 | "value": 0 991 | }, 992 | "interface_protocol": 0, 993 | "interface_number": 0, 994 | "interface_alternate_setting": 0 995 | }, 996 | "hotplug": "usb", 997 | "driver": "hub", 998 | "driver_module": "usbcore", 999 | "drivers": [ 1000 | "hub" 1001 | ], 1002 | "driver_modules": [ 1003 | "usbcore" 1004 | ], 1005 | "module_alias": "usb:v1D6Bp0002d0612dc09dsc00dp01ic09isc00ip00in00" 1006 | }, 1007 | { 1008 | "index": 36, 1009 | "attached_to": 8, 1010 | "class_list": [ 1011 | "usb", 1012 | "hub" 1013 | ], 1014 | "bus_type": { 1015 | "hex": "0086", 1016 | "name": "USB", 1017 | "value": 134 1018 | }, 1019 | "slot": { 1020 | "bus": 0, 1021 | "number": 0 1022 | }, 1023 | "base_class": { 1024 | "hex": "010a", 1025 | "name": "Hub", 1026 | "value": 266 1027 | }, 1028 | "vendor": { 1029 | "hex": "1d6b", 1030 | "name": "Linux 6.12.51 xhci-hcd", 1031 | "value": 7531 1032 | }, 1033 | "device": { 1034 | "hex": "0003", 1035 | "name": "xHCI Host Controller", 1036 | "value": 3 1037 | }, 1038 | "revision": { 1039 | "hex": "0000", 1040 | "name": "6.12", 1041 | "value": 0 1042 | }, 1043 | "serial": "0000:02:00.0", 1044 | "model": "Linux 6.12.51 xhci-hcd xHCI Host Controller", 1045 | "sysfs_id": "/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb2/2-0:1.0", 1046 | "sysfs_bus_id": "2-0:1.0", 1047 | "detail": { 1048 | "device_class": { 1049 | "hex": "0009", 1050 | "name": "hub", 1051 | "value": 9 1052 | }, 1053 | "device_subclass": { 1054 | "hex": "0000", 1055 | "name": "per_interface", 1056 | "value": 0 1057 | }, 1058 | "device_protocol": 3, 1059 | "interface_class": { 1060 | "hex": "0009", 1061 | "name": "hub", 1062 | "value": 9 1063 | }, 1064 | "interface_subclass": { 1065 | "hex": "0000", 1066 | "name": "per_interface", 1067 | "value": 0 1068 | }, 1069 | "interface_protocol": 0, 1070 | "interface_number": 0, 1071 | "interface_alternate_setting": 0 1072 | }, 1073 | "hotplug": "usb", 1074 | "driver": "hub", 1075 | "driver_module": "usbcore", 1076 | "drivers": [ 1077 | "hub" 1078 | ], 1079 | "driver_modules": [ 1080 | "usbcore" 1081 | ], 1082 | "module_alias": "usb:v1D6Bp0003d0612dc09dsc00dp03ic09isc00ip00in00" 1083 | } 1084 | ], 1085 | "keyboard": [ 1086 | { 1087 | "index": 33, 1088 | "attached_to": 34, 1089 | "class_list": [ 1090 | "keyboard", 1091 | "usb" 1092 | ], 1093 | "bus_type": { 1094 | "hex": "0086", 1095 | "name": "USB", 1096 | "value": 134 1097 | }, 1098 | "slot": { 1099 | "bus": 0, 1100 | "number": 0 1101 | }, 1102 | "base_class": { 1103 | "hex": "0108", 1104 | "name": "Keyboard", 1105 | "value": 264 1106 | }, 1107 | "sub_class": { 1108 | "hex": "0000", 1109 | "name": "Keyboard", 1110 | "value": 0 1111 | }, 1112 | "vendor": { 1113 | "hex": "0627", 1114 | "name": "QEMU", 1115 | "value": 1575 1116 | }, 1117 | "device": { 1118 | "hex": "0001", 1119 | "name": "QEMU USB Keyboard", 1120 | "value": 1 1121 | }, 1122 | "serial": "68284-0000:00:02.1:00.0-2", 1123 | "model": "QEMU USB Keyboard", 1124 | "sysfs_id": "/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-2/1-2:1.0", 1125 | "sysfs_bus_id": "1-2:1.0", 1126 | "unix_device_names": [ 1127 | "/dev/input/by-id/usb-QEMU_QEMU_USB_Keyboard_68284-0000:00:02.1:00.0-2-event-kbd", 1128 | "/dev/input/by-path/pci-0000:02:00.0-usb-0:2:1.0-event-kbd", 1129 | "/dev/input/by-path/pci-0000:02:00.0-usbv2-0:2:1.0-event-kbd", 1130 | "/dev/input/event2" 1131 | ], 1132 | "resources": [ 1133 | { 1134 | "type": "baud", 1135 | "speed": 480000000, 1136 | "bits": 0, 1137 | "stop_bits": 0, 1138 | "parity": 0, 1139 | "handshake": 0 1140 | } 1141 | ], 1142 | "detail": { 1143 | "device_class": { 1144 | "hex": "0000", 1145 | "name": "per_interface", 1146 | "value": 0 1147 | }, 1148 | "device_subclass": { 1149 | "hex": "0000", 1150 | "name": "per_interface", 1151 | "value": 0 1152 | }, 1153 | "device_protocol": 0, 1154 | "interface_class": { 1155 | "hex": "0003", 1156 | "name": "hid", 1157 | "value": 3 1158 | }, 1159 | "interface_subclass": { 1160 | "hex": "0001", 1161 | "name": "audio", 1162 | "value": 1 1163 | }, 1164 | "interface_protocol": 1, 1165 | "interface_number": 0, 1166 | "interface_alternate_setting": 0 1167 | }, 1168 | "hotplug": "usb", 1169 | "driver": "usbhid", 1170 | "driver_module": "usbhid", 1171 | "drivers": [ 1172 | "usbhid" 1173 | ], 1174 | "driver_modules": [ 1175 | "usbhid" 1176 | ], 1177 | "driver_info": { 1178 | "type": "keyboard", 1179 | "xkb_rules": "xfree86" 1180 | }, 1181 | "module_alias": "usb:v0627p0001d0000dc00dsc00dp00ic03isc01ip01in00" 1182 | } 1183 | ], 1184 | "memory": [ 1185 | { 1186 | "index": 4, 1187 | "attached_to": 0, 1188 | "class_list": [ 1189 | "memory" 1190 | ], 1191 | "base_class": { 1192 | "hex": "0101", 1193 | "name": "Internally Used Class", 1194 | "value": 257 1195 | }, 1196 | "sub_class": { 1197 | "hex": "0002", 1198 | "name": "Main Memory", 1199 | "value": 2 1200 | }, 1201 | "model": "Main Memory", 1202 | "resources": [ 1203 | { 1204 | "type": "phys_mem", 1205 | "range": 4026531840 1206 | } 1207 | ] 1208 | } 1209 | ], 1210 | "monitor": [ 1211 | { 1212 | "index": 29, 1213 | "attached_to": 9, 1214 | "class_list": [ 1215 | "monitor" 1216 | ], 1217 | "base_class": { 1218 | "hex": "0100", 1219 | "name": "Monitor", 1220 | "value": 256 1221 | }, 1222 | "sub_class": { 1223 | "hex": "0002", 1224 | "name": "LCD Monitor", 1225 | "value": 2 1226 | }, 1227 | "vendor": { 1228 | "hex": "4914", 1229 | "value": 18708 1230 | }, 1231 | "device": { 1232 | "hex": "1234", 1233 | "name": "QEMU Monitor", 1234 | "value": 4660 1235 | }, 1236 | "serial": "0", 1237 | "model": "QEMU Monitor", 1238 | "resources": [ 1239 | { 1240 | "type": "monitor", 1241 | "width": 1024, 1242 | "height": 768, 1243 | "vertical_frequency": 60, 1244 | "interlaced": false 1245 | }, 1246 | { 1247 | "type": "monitor", 1248 | "width": 1280, 1249 | "height": 800, 1250 | "vertical_frequency": 60, 1251 | "interlaced": false 1252 | }, 1253 | { 1254 | "type": "monitor", 1255 | "width": 1600, 1256 | "height": 1200, 1257 | "vertical_frequency": 60, 1258 | "interlaced": false 1259 | }, 1260 | { 1261 | "type": "monitor", 1262 | "width": 1920, 1263 | "height": 1080, 1264 | "vertical_frequency": 60, 1265 | "interlaced": false 1266 | }, 1267 | { 1268 | "type": "monitor", 1269 | "width": 2048, 1270 | "height": 1152, 1271 | "vertical_frequency": 60, 1272 | "interlaced": false 1273 | }, 1274 | { 1275 | "type": "monitor", 1276 | "width": 640, 1277 | "height": 480, 1278 | "vertical_frequency": 60, 1279 | "interlaced": false 1280 | }, 1281 | { 1282 | "type": "monitor", 1283 | "width": 800, 1284 | "height": 600, 1285 | "vertical_frequency": 60, 1286 | "interlaced": false 1287 | }, 1288 | { 1289 | "type": "size", 1290 | "unit": "mm", 1291 | "value_1": 325, 1292 | "value_2": 203 1293 | } 1294 | ], 1295 | "detail": { 1296 | "manufacture_year": 2014, 1297 | "manufacture_week": 42, 1298 | "vertical_sync": { 1299 | "min": 50, 1300 | "max": 125 1301 | }, 1302 | "horizontal_sync": { 1303 | "min": 30, 1304 | "max": 160 1305 | }, 1306 | "horizontal_sync_timings": { 1307 | "disp": 1280, 1308 | "sync_start": 1600, 1309 | "sync_end": 1638, 1310 | "total": 1728 1311 | }, 1312 | "vertical_sync_timings": { 1313 | "disp": 800, 1314 | "sync_start": 804, 1315 | "sync_end": 808, 1316 | "total": 828 1317 | }, 1318 | "clock": 107300, 1319 | "width": 1280, 1320 | "height": 800, 1321 | "width_millimetres": 325, 1322 | "height_millimetres": 203, 1323 | "horizontal_flag": 45, 1324 | "vertical_flag": 45, 1325 | "vendor": "", 1326 | "name": "QEMU Monitor" 1327 | }, 1328 | "driver_info": { 1329 | "type": "display", 1330 | "width": 2048, 1331 | "height": 1152, 1332 | "vertical_sync": { 1333 | "min": 50, 1334 | "max": 125 1335 | }, 1336 | "horizontal_sync": { 1337 | "min": 30, 1338 | "max": 160 1339 | }, 1340 | "bandwidth": 0, 1341 | "horizontal_sync_timings": { 1342 | "disp": 1280, 1343 | "sync_start": 1600, 1344 | "sync_end": 1638, 1345 | "total": 1728 1346 | }, 1347 | "vertical_sync_timings": { 1348 | "disp": 800, 1349 | "sync_start": 804, 1350 | "sync_end": 808, 1351 | "total": 828 1352 | }, 1353 | "horizontal_flag": 45, 1354 | "vertical_flag": 45 1355 | } 1356 | } 1357 | ], 1358 | "mouse": [ 1359 | { 1360 | "index": 35, 1361 | "attached_to": 34, 1362 | "class_list": [ 1363 | "mouse", 1364 | "usb" 1365 | ], 1366 | "bus_type": { 1367 | "hex": "0086", 1368 | "name": "USB", 1369 | "value": 134 1370 | }, 1371 | "slot": { 1372 | "bus": 0, 1373 | "number": 0 1374 | }, 1375 | "base_class": { 1376 | "hex": "0105", 1377 | "name": "Mouse", 1378 | "value": 261 1379 | }, 1380 | "sub_class": { 1381 | "hex": "0003", 1382 | "name": "USB Mouse", 1383 | "value": 3 1384 | }, 1385 | "vendor": { 1386 | "hex": "0627", 1387 | "name": "QEMU", 1388 | "value": 1575 1389 | }, 1390 | "device": { 1391 | "hex": "0001", 1392 | "name": "QEMU USB Tablet", 1393 | "value": 1 1394 | }, 1395 | "serial": "28754-0000:00:02.1:00.0-1", 1396 | "compat_vendor": "Unknown", 1397 | "compat_device": "Generic USB Mouse", 1398 | "model": "QEMU USB Tablet", 1399 | "sysfs_id": "/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-1/1-1:1.0", 1400 | "sysfs_bus_id": "1-1:1.0", 1401 | "unix_device_names": [ 1402 | "/dev/input/mice" 1403 | ], 1404 | "unix_device_name2": "/dev/input/mouse0", 1405 | "resources": [ 1406 | { 1407 | "type": "baud", 1408 | "speed": 480000000, 1409 | "bits": 0, 1410 | "stop_bits": 0, 1411 | "parity": 0, 1412 | "handshake": 0 1413 | } 1414 | ], 1415 | "detail": { 1416 | "device_class": { 1417 | "hex": "0000", 1418 | "name": "per_interface", 1419 | "value": 0 1420 | }, 1421 | "device_subclass": { 1422 | "hex": "0000", 1423 | "name": "per_interface", 1424 | "value": 0 1425 | }, 1426 | "device_protocol": 0, 1427 | "interface_class": { 1428 | "hex": "0003", 1429 | "name": "hid", 1430 | "value": 3 1431 | }, 1432 | "interface_subclass": { 1433 | "hex": "0000", 1434 | "name": "per_interface", 1435 | "value": 0 1436 | }, 1437 | "interface_protocol": 0, 1438 | "interface_number": 0, 1439 | "interface_alternate_setting": 0 1440 | }, 1441 | "hotplug": "usb", 1442 | "driver": "usbhid", 1443 | "driver_module": "usbhid", 1444 | "drivers": [ 1445 | "usbhid" 1446 | ], 1447 | "driver_modules": [ 1448 | "usbhid" 1449 | ], 1450 | "driver_info": { 1451 | "type": "mouse", 1452 | "db_entry_0": [ 1453 | "explorerps/2", 1454 | "exps2" 1455 | ], 1456 | "xf86": "explorerps/2", 1457 | "gpm": "exps2", 1458 | "buttons": -1, 1459 | "wheels": -1 1460 | }, 1461 | "module_alias": "usb:v0627p0001d0000dc00dsc00dp00ic03isc00ip00in00" 1462 | } 1463 | ], 1464 | "network_controller": [ 1465 | { 1466 | "index": 23, 1467 | "attached_to": 12, 1468 | "class_list": [ 1469 | "network_controller" 1470 | ], 1471 | "bus_type": { 1472 | "hex": "008f", 1473 | "name": "Virtio", 1474 | "value": 143 1475 | }, 1476 | "slot": { 1477 | "bus": 0, 1478 | "number": 0 1479 | }, 1480 | "base_class": { 1481 | "hex": "0002", 1482 | "name": "Network controller", 1483 | "value": 2 1484 | }, 1485 | "sub_class": { 1486 | "hex": "0000", 1487 | "name": "Ethernet controller", 1488 | "value": 0 1489 | }, 1490 | "vendor": "Virtio", 1491 | "device": "Ethernet Card 0", 1492 | "model": "Virtio Ethernet Card 0", 1493 | "sysfs_id": "/devices/pci0000:00/0000:00:02.0/0000:01:00.0/virtio1", 1494 | "sysfs_bus_id": "virtio1", 1495 | "unix_device_names": [ 1496 | "eth0" 1497 | ], 1498 | "resources": [ 1499 | { 1500 | "type": "hwaddr", 1501 | "address": 57 1502 | }, 1503 | { 1504 | "type": "phwaddr", 1505 | "address": 57 1506 | } 1507 | ], 1508 | "driver": "virtio_net", 1509 | "drivers": [ 1510 | "virtio_net" 1511 | ], 1512 | "module_alias": "virtio:d00000001v00001AF4" 1513 | } 1514 | ], 1515 | "network_interface": [ 1516 | { 1517 | "index": 37, 1518 | "attached_to": 0, 1519 | "class_list": [ 1520 | "network_interface" 1521 | ], 1522 | "base_class": { 1523 | "hex": "0107", 1524 | "name": "Network Interface", 1525 | "value": 263 1526 | }, 1527 | "sub_class": { 1528 | "hex": "0000", 1529 | "name": "Loopback", 1530 | "value": 0 1531 | }, 1532 | "model": "Loopback network interface", 1533 | "sysfs_id": "/class/net/lo", 1534 | "unix_device_names": [ 1535 | "lo" 1536 | ] 1537 | }, 1538 | { 1539 | "index": 38, 1540 | "attached_to": 23, 1541 | "class_list": [ 1542 | "network_interface" 1543 | ], 1544 | "base_class": { 1545 | "hex": "0107", 1546 | "name": "Network Interface", 1547 | "value": 263 1548 | }, 1549 | "sub_class": { 1550 | "hex": "0001", 1551 | "name": "Ethernet", 1552 | "value": 1 1553 | }, 1554 | "model": "Ethernet network interface", 1555 | "sysfs_id": "/class/net/eth0", 1556 | "sysfs_device_link": "/devices/pci0000:00/0000:00:02.0/0000:01:00.0/virtio1", 1557 | "unix_device_names": [ 1558 | "eth0" 1559 | ], 1560 | "resources": [ 1561 | { 1562 | "type": "hwaddr", 1563 | "address": 57 1564 | }, 1565 | { 1566 | "type": "phwaddr", 1567 | "address": 57 1568 | } 1569 | ], 1570 | "driver": "virtio_net", 1571 | "drivers": [ 1572 | "virtio_net" 1573 | ] 1574 | } 1575 | ], 1576 | "pci": [ 1577 | { 1578 | "index": 5, 1579 | "attached_to": 20, 1580 | "class_list": [ 1581 | "pci", 1582 | "unknown" 1583 | ], 1584 | "bus_type": { 1585 | "hex": "0004", 1586 | "name": "PCI", 1587 | "value": 4 1588 | }, 1589 | "slot": { 1590 | "bus": 3, 1591 | "number": 0 1592 | }, 1593 | "base_class": { 1594 | "hex": "0007", 1595 | "name": "Communication controller", 1596 | "value": 7 1597 | }, 1598 | "sub_class": { 1599 | "hex": "0080", 1600 | "name": "Communication controller", 1601 | "value": 128 1602 | }, 1603 | "vendor": { 1604 | "hex": "1af4", 1605 | "value": 6900 1606 | }, 1607 | "sub_vendor": { 1608 | "hex": "1af4", 1609 | "value": 6900 1610 | }, 1611 | "device": { 1612 | "hex": "1043", 1613 | "value": 4163 1614 | }, 1615 | "sub_device": { 1616 | "hex": "1100", 1617 | "value": 4352 1618 | }, 1619 | "revision": { 1620 | "hex": "0001", 1621 | "value": 1 1622 | }, 1623 | "model": "Communication controller", 1624 | "sysfs_id": "/devices/pci0000:00/0000:00:02.2/0000:03:00.0", 1625 | "sysfs_bus_id": "0000:03:00.0", 1626 | "detail": { 1627 | "function": 0, 1628 | "command": 1030, 1629 | "header_type": 0, 1630 | "secondary_bus": 0, 1631 | "prog_if": 0 1632 | }, 1633 | "driver": "virtio-pci", 1634 | "driver_module": "virtio_pci", 1635 | "drivers": [ 1636 | "virtio-pci" 1637 | ], 1638 | "driver_modules": [ 1639 | "virtio_pci" 1640 | ], 1641 | "module_alias": "pci:v00001AF4d00001043sv00001AF4sd00001100bc07sc80i00" 1642 | }, 1643 | { 1644 | "index": 11, 1645 | "attached_to": 0, 1646 | "class_list": [ 1647 | "pci", 1648 | "unknown" 1649 | ], 1650 | "bus_type": { 1651 | "hex": "0004", 1652 | "name": "PCI", 1653 | "value": 4 1654 | }, 1655 | "slot": { 1656 | "bus": 0, 1657 | "number": 4 1658 | }, 1659 | "base_class": { 1660 | "hex": "0007", 1661 | "name": "Communication controller", 1662 | "value": 7 1663 | }, 1664 | "sub_class": { 1665 | "hex": "0000", 1666 | "name": "Serial controller", 1667 | "value": 0 1668 | }, 1669 | "pci_interface": { 1670 | "hex": "0002", 1671 | "name": "16550", 1672 | "value": 2 1673 | }, 1674 | "vendor": { 1675 | "hex": "1b36", 1676 | "value": 6966 1677 | }, 1678 | "sub_vendor": { 1679 | "hex": "1af4", 1680 | "value": 6900 1681 | }, 1682 | "device": { 1683 | "hex": "0002", 1684 | "value": 2 1685 | }, 1686 | "sub_device": { 1687 | "hex": "1100", 1688 | "value": 4352 1689 | }, 1690 | "revision": { 1691 | "hex": "0001", 1692 | "value": 1 1693 | }, 1694 | "model": "Serial controller", 1695 | "sysfs_id": "/devices/pci0000:00/0000:00:04.0", 1696 | "sysfs_bus_id": "0000:00:04.0", 1697 | "resources": [ 1698 | { 1699 | "type": "io", 1700 | "base": 40960, 1701 | "range": 8, 1702 | "enabled": true, 1703 | "access": "read_write" 1704 | } 1705 | ], 1706 | "detail": { 1707 | "function": 0, 1708 | "command": 1, 1709 | "header_type": 0, 1710 | "secondary_bus": 0, 1711 | "prog_if": 2 1712 | }, 1713 | "driver": "serial", 1714 | "driver_module": "8250_pci", 1715 | "drivers": [ 1716 | "serial" 1717 | ], 1718 | "driver_modules": [ 1719 | "8250_pci" 1720 | ], 1721 | "module_alias": "pci:v00001B36d00000002sv00001AF4sd00001100bc07sc00i02" 1722 | }, 1723 | { 1724 | "index": 12, 1725 | "attached_to": 22, 1726 | "class_list": [ 1727 | "pci", 1728 | "unknown" 1729 | ], 1730 | "bus_type": { 1731 | "hex": "0004", 1732 | "name": "PCI", 1733 | "value": 4 1734 | }, 1735 | "slot": { 1736 | "bus": 1, 1737 | "number": 0 1738 | }, 1739 | "base_class": { 1740 | "hex": "0002", 1741 | "name": "Network controller", 1742 | "value": 2 1743 | }, 1744 | "sub_class": { 1745 | "hex": "0000", 1746 | "name": "Ethernet controller", 1747 | "value": 0 1748 | }, 1749 | "vendor": { 1750 | "hex": "1af4", 1751 | "value": 6900 1752 | }, 1753 | "sub_vendor": { 1754 | "hex": "1af4", 1755 | "value": 6900 1756 | }, 1757 | "device": { 1758 | "hex": "1041", 1759 | "value": 4161 1760 | }, 1761 | "sub_device": { 1762 | "hex": "1100", 1763 | "value": 4352 1764 | }, 1765 | "revision": { 1766 | "hex": "0001", 1767 | "value": 1 1768 | }, 1769 | "model": "Ethernet controller", 1770 | "sysfs_id": "/devices/pci0000:00/0000:00:02.0/0000:01:00.0", 1771 | "sysfs_bus_id": "0000:01:00.0", 1772 | "detail": { 1773 | "function": 0, 1774 | "command": 1030, 1775 | "header_type": 0, 1776 | "secondary_bus": 0, 1777 | "prog_if": 0 1778 | }, 1779 | "driver": "virtio-pci", 1780 | "driver_module": "virtio_pci", 1781 | "drivers": [ 1782 | "virtio-pci" 1783 | ], 1784 | "driver_modules": [ 1785 | "virtio_pci" 1786 | ], 1787 | "module_alias": "pci:v00001AF4d00001041sv00001AF4sd00001100bc02sc00i00" 1788 | }, 1789 | { 1790 | "index": 19, 1791 | "attached_to": 18, 1792 | "class_list": [ 1793 | "pci", 1794 | "unknown" 1795 | ], 1796 | "bus_type": { 1797 | "hex": "0004", 1798 | "name": "PCI", 1799 | "value": 4 1800 | }, 1801 | "slot": { 1802 | "bus": 5, 1803 | "number": 0 1804 | }, 1805 | "base_class": { 1806 | "hex": "0000", 1807 | "name": "Unclassified device", 1808 | "value": 0 1809 | }, 1810 | "sub_class": { 1811 | "hex": "00ff", 1812 | "value": 255 1813 | }, 1814 | "vendor": { 1815 | "hex": "1af4", 1816 | "value": 6900 1817 | }, 1818 | "sub_vendor": { 1819 | "hex": "1af4", 1820 | "value": 6900 1821 | }, 1822 | "device": { 1823 | "hex": "1044", 1824 | "value": 4164 1825 | }, 1826 | "sub_device": { 1827 | "hex": "1100", 1828 | "value": 4352 1829 | }, 1830 | "revision": { 1831 | "hex": "0001", 1832 | "value": 1 1833 | }, 1834 | "model": "Unclassified device", 1835 | "sysfs_id": "/devices/pci0000:00/0000:00:02.4/0000:05:00.0", 1836 | "sysfs_bus_id": "0000:05:00.0", 1837 | "detail": { 1838 | "function": 0, 1839 | "command": 1030, 1840 | "header_type": 0, 1841 | "secondary_bus": 0, 1842 | "prog_if": 0 1843 | }, 1844 | "driver": "virtio-pci", 1845 | "driver_module": "virtio_pci", 1846 | "drivers": [ 1847 | "virtio-pci" 1848 | ], 1849 | "driver_modules": [ 1850 | "virtio_pci" 1851 | ], 1852 | "module_alias": "pci:v00001AF4d00001044sv00001AF4sd00001100bc00scFFi00" 1853 | }, 1854 | { 1855 | "index": 21, 1856 | "attached_to": 10, 1857 | "class_list": [ 1858 | "pci", 1859 | "unknown" 1860 | ], 1861 | "bus_type": { 1862 | "hex": "0004", 1863 | "name": "PCI", 1864 | "value": 4 1865 | }, 1866 | "slot": { 1867 | "bus": 4, 1868 | "number": 0 1869 | }, 1870 | "base_class": { 1871 | "hex": "0000", 1872 | "name": "Unclassified device", 1873 | "value": 0 1874 | }, 1875 | "sub_class": { 1876 | "hex": "00ff", 1877 | "value": 255 1878 | }, 1879 | "vendor": { 1880 | "hex": "1af4", 1881 | "value": 6900 1882 | }, 1883 | "sub_vendor": { 1884 | "hex": "1af4", 1885 | "value": 6900 1886 | }, 1887 | "device": { 1888 | "hex": "1045", 1889 | "value": 4165 1890 | }, 1891 | "sub_device": { 1892 | "hex": "1100", 1893 | "value": 4352 1894 | }, 1895 | "revision": { 1896 | "hex": "0001", 1897 | "value": 1 1898 | }, 1899 | "model": "Unclassified device", 1900 | "sysfs_id": "/devices/pci0000:00/0000:00:02.3/0000:04:00.0", 1901 | "sysfs_bus_id": "0000:04:00.0", 1902 | "detail": { 1903 | "function": 0, 1904 | "command": 6, 1905 | "header_type": 0, 1906 | "secondary_bus": 0, 1907 | "prog_if": 0 1908 | }, 1909 | "driver": "virtio-pci", 1910 | "driver_module": "virtio_pci", 1911 | "drivers": [ 1912 | "virtio-pci" 1913 | ], 1914 | "driver_modules": [ 1915 | "virtio_pci" 1916 | ], 1917 | "module_alias": "pci:v00001AF4d00001045sv00001AF4sd00001100bc00scFFi00" 1918 | } 1919 | ], 1920 | "storage_controller": [ 1921 | { 1922 | "index": 15, 1923 | "attached_to": 7, 1924 | "class_list": [ 1925 | "storage_controller", 1926 | "pci" 1927 | ], 1928 | "bus_type": { 1929 | "hex": "0004", 1930 | "name": "PCI", 1931 | "value": 4 1932 | }, 1933 | "slot": { 1934 | "bus": 6, 1935 | "number": 0 1936 | }, 1937 | "base_class": { 1938 | "hex": "0001", 1939 | "name": "Mass storage controller", 1940 | "value": 1 1941 | }, 1942 | "sub_class": { 1943 | "hex": "0000", 1944 | "name": "SCSI storage controller", 1945 | "value": 0 1946 | }, 1947 | "vendor": { 1948 | "hex": "1af4", 1949 | "value": 6900 1950 | }, 1951 | "sub_vendor": { 1952 | "hex": "1af4", 1953 | "value": 6900 1954 | }, 1955 | "device": { 1956 | "hex": "1048", 1957 | "value": 4168 1958 | }, 1959 | "sub_device": { 1960 | "hex": "1100", 1961 | "value": 4352 1962 | }, 1963 | "revision": { 1964 | "hex": "0001", 1965 | "value": 1 1966 | }, 1967 | "model": "SCSI storage controller", 1968 | "sysfs_id": "/devices/pci0000:00/0000:00:02.5/0000:06:00.0", 1969 | "sysfs_bus_id": "0000:06:00.0", 1970 | "detail": { 1971 | "function": 0, 1972 | "command": 1030, 1973 | "header_type": 0, 1974 | "secondary_bus": 0, 1975 | "prog_if": 0 1976 | }, 1977 | "driver": "virtio-pci", 1978 | "driver_module": "virtio_pci", 1979 | "drivers": [ 1980 | "virtio-pci" 1981 | ], 1982 | "driver_modules": [ 1983 | "virtio_pci" 1984 | ], 1985 | "module_alias": "pci:v00001AF4d00001048sv00001AF4sd00001100bc01sc00i00" 1986 | } 1987 | ], 1988 | "system": {}, 1989 | "unknown": [ 1990 | { 1991 | "index": 24, 1992 | "attached_to": 19, 1993 | "class_list": [ 1994 | "unknown" 1995 | ], 1996 | "base_class": { 1997 | "hex": "0000", 1998 | "name": "Unclassified device", 1999 | "value": 0 2000 | }, 2001 | "sub_class": { 2002 | "hex": "0000", 2003 | "name": "Unclassified device", 2004 | "value": 0 2005 | }, 2006 | "vendor": "Virtio", 2007 | "device": "", 2008 | "model": "Virtio Unclassified device", 2009 | "sysfs_id": "/devices/pci0000:00/0000:00:02.4/0000:05:00.0/virtio4", 2010 | "sysfs_bus_id": "virtio4", 2011 | "driver": "virtio_rng", 2012 | "drivers": [ 2013 | "virtio_rng" 2014 | ], 2015 | "module_alias": "virtio:d00000004v00001AF4" 2016 | }, 2017 | { 2018 | "index": 25, 2019 | "attached_to": 5, 2020 | "class_list": [ 2021 | "unknown" 2022 | ], 2023 | "base_class": { 2024 | "hex": "0000", 2025 | "name": "Unclassified device", 2026 | "value": 0 2027 | }, 2028 | "sub_class": { 2029 | "hex": "0000", 2030 | "name": "Unclassified device", 2031 | "value": 0 2032 | }, 2033 | "vendor": "Virtio", 2034 | "device": "", 2035 | "model": "Virtio Unclassified device", 2036 | "sysfs_id": "/devices/pci0000:00/0000:00:02.2/0000:03:00.0/virtio2", 2037 | "sysfs_bus_id": "virtio2", 2038 | "driver": "virtio_console", 2039 | "drivers": [ 2040 | "virtio_console" 2041 | ], 2042 | "module_alias": "virtio:d00000003v00001AF4" 2043 | }, 2044 | { 2045 | "index": 26, 2046 | "attached_to": 9, 2047 | "class_list": [ 2048 | "unknown" 2049 | ], 2050 | "base_class": { 2051 | "hex": "0000", 2052 | "name": "Unclassified device", 2053 | "value": 0 2054 | }, 2055 | "sub_class": { 2056 | "hex": "0000", 2057 | "name": "Unclassified device", 2058 | "value": 0 2059 | }, 2060 | "vendor": "Virtio", 2061 | "device": "", 2062 | "model": "Virtio Unclassified device", 2063 | "sysfs_id": "/devices/pci0000:00/0000:00:01.0/virtio0", 2064 | "sysfs_bus_id": "virtio0", 2065 | "driver": "virtio_gpu", 2066 | "driver_module": "virtio_gpu", 2067 | "drivers": [ 2068 | "virtio_gpu" 2069 | ], 2070 | "driver_modules": [ 2071 | "virtio_gpu" 2072 | ], 2073 | "module_alias": "virtio:d00000010v00001AF4" 2074 | }, 2075 | { 2076 | "index": 27, 2077 | "attached_to": 15, 2078 | "class_list": [ 2079 | "unknown" 2080 | ], 2081 | "base_class": { 2082 | "hex": "0000", 2083 | "name": "Unclassified device", 2084 | "value": 0 2085 | }, 2086 | "sub_class": { 2087 | "hex": "0000", 2088 | "name": "Unclassified device", 2089 | "value": 0 2090 | }, 2091 | "vendor": "Virtio", 2092 | "device": "", 2093 | "model": "Virtio Unclassified device", 2094 | "sysfs_id": "/devices/pci0000:00/0000:00:02.5/0000:06:00.0/virtio5", 2095 | "sysfs_bus_id": "virtio5", 2096 | "driver": "virtio_scsi", 2097 | "driver_module": "virtio_scsi", 2098 | "drivers": [ 2099 | "virtio_scsi" 2100 | ], 2101 | "driver_modules": [ 2102 | "virtio_scsi" 2103 | ], 2104 | "module_alias": "virtio:d00000008v00001AF4" 2105 | }, 2106 | { 2107 | "index": 28, 2108 | "attached_to": 21, 2109 | "class_list": [ 2110 | "unknown" 2111 | ], 2112 | "base_class": { 2113 | "hex": "0000", 2114 | "name": "Unclassified device", 2115 | "value": 0 2116 | }, 2117 | "sub_class": { 2118 | "hex": "0000", 2119 | "name": "Unclassified device", 2120 | "value": 0 2121 | }, 2122 | "vendor": "Virtio", 2123 | "device": "", 2124 | "model": "Virtio Unclassified device", 2125 | "sysfs_id": "/devices/pci0000:00/0000:00:02.3/0000:04:00.0/virtio3", 2126 | "sysfs_bus_id": "virtio3", 2127 | "driver": "virtio_balloon", 2128 | "drivers": [ 2129 | "virtio_balloon" 2130 | ], 2131 | "module_alias": "virtio:d00000005v00001AF4" 2132 | }, 2133 | { 2134 | "index": 30, 2135 | "attached_to": 0, 2136 | "class_list": [ 2137 | "unknown" 2138 | ], 2139 | "base_class": { 2140 | "hex": "0007", 2141 | "name": "Communication controller", 2142 | "value": 7 2143 | }, 2144 | "sub_class": { 2145 | "hex": "0000", 2146 | "name": "Serial controller", 2147 | "value": 0 2148 | }, 2149 | "pci_interface": { 2150 | "hex": "0002", 2151 | "name": "16550", 2152 | "value": 2 2153 | }, 2154 | "device": { 2155 | "hex": "0000", 2156 | "name": "16550A", 2157 | "value": 0 2158 | }, 2159 | "model": "16550A", 2160 | "unix_device_names": [ 2161 | "/dev/ttyS0" 2162 | ], 2163 | "resources": [ 2164 | { 2165 | "type": "io", 2166 | "base": 40960, 2167 | "range": 0, 2168 | "enabled": true, 2169 | "access": "read_write" 2170 | } 2171 | ] 2172 | } 2173 | ], 2174 | "usb_controller": [ 2175 | { 2176 | "index": 8, 2177 | "attached_to": 13, 2178 | "class_list": [ 2179 | "usb_controller", 2180 | "pci" 2181 | ], 2182 | "bus_type": { 2183 | "hex": "0004", 2184 | "name": "PCI", 2185 | "value": 4 2186 | }, 2187 | "slot": { 2188 | "bus": 2, 2189 | "number": 0 2190 | }, 2191 | "base_class": { 2192 | "hex": "000c", 2193 | "name": "Serial bus controller", 2194 | "value": 12 2195 | }, 2196 | "sub_class": { 2197 | "hex": "0003", 2198 | "name": "USB Controller", 2199 | "value": 3 2200 | }, 2201 | "pci_interface": { 2202 | "hex": "0030", 2203 | "value": 48 2204 | }, 2205 | "vendor": { 2206 | "hex": "1b36", 2207 | "value": 6966 2208 | }, 2209 | "sub_vendor": { 2210 | "hex": "1af4", 2211 | "value": 6900 2212 | }, 2213 | "device": { 2214 | "hex": "000d", 2215 | "value": 13 2216 | }, 2217 | "sub_device": { 2218 | "hex": "1100", 2219 | "value": 4352 2220 | }, 2221 | "revision": { 2222 | "hex": "0001", 2223 | "value": 1 2224 | }, 2225 | "model": "USB Controller", 2226 | "sysfs_id": "/devices/pci0000:00/0000:00:02.1/0000:02:00.0", 2227 | "sysfs_bus_id": "0000:02:00.0", 2228 | "detail": { 2229 | "function": 0, 2230 | "command": 1030, 2231 | "header_type": 0, 2232 | "secondary_bus": 0, 2233 | "prog_if": 48 2234 | }, 2235 | "driver": "xhci_hcd", 2236 | "driver_module": "xhci_pci", 2237 | "drivers": [ 2238 | "xhci_hcd" 2239 | ], 2240 | "driver_modules": [ 2241 | "xhci_pci" 2242 | ], 2243 | "module_alias": "pci:v00001B36d0000000Dsv00001AF4sd00001100bc0Csc03i30" 2244 | } 2245 | ] 2246 | }, 2247 | "smbios": {} 2248 | } --------------------------------------------------------------------------------