diff --git a/home/alisceon.nix b/home/alisceon.nix index eff326d..833a4a0 100644 --- a/home/alisceon.nix +++ b/home/alisceon.nix @@ -120,6 +120,9 @@ hostname = "alma03.lab.the.malice.zone"; user = "root"; }; + "tsla-nixos" = { + hostname = "tesla-nixos.lab.the.malice.zone"; + }; }; }; # end ssh direnv = { diff --git a/home/conf/config.nu b/home/conf/config.nu index ad8b9f0..ddcc2fa 100644 --- a/home/conf/config.nu +++ b/home/conf/config.nu @@ -1,19 +1,29 @@ -let carapace_completer = {|spans| - carapace $spans.0 nushell ...$spans | from json +let fish_completer = {|spans| + fish --command $"complete '--do-complete=($spans | str replace --all "'" "\\'" | str join ' ')'" + | from tsv --flexible --noheaders --no-infer + | rename value description + | update value {|row| + let value = $row.value + let need_quote = ['\' ',' '[' ']' '(' ')' ' ' '\t' "'" '"' "`"] | any {$in in $value} + if ($need_quote and ($value | path exists)) { + let expanded_path = if ($value starts-with ~) {$value | path expand --no-symlink} else {$value} + $'"($expanded_path | str replace --all "\"" "\\\"")"' + } else {$value} + } } $env.config = { show_banner: false, completions: { - case_sensitive: false # case-sensitive completions - quick: true # set to false to prevent auto-selecting completions - partial: true # set to false to prevent partial filling of the prompt - algorithm: "fuzzy" # prefix or fuzzy - external: { - # set to false to prevent nushell looking into $env.PATH to find more suggestions - enable: true - # set to lower can improve completion performance at the cost of omitting some options - max_results: 100 - completer: $carapace_completer # check 'carapace_completer' + case_sensitive: false # case-sensitive completions + quick: true # set to false to prevent auto-selecting completions + partial: true # set to false to prevent partial filling of the prompt + algorithm: "fuzzy" # prefix or fuzzy + external: { + # set to false to prevent nushell looking into $env.PATH to find more suggestions + enable: true + # set to lower can improve completion performance at the cost of omitting some options + max_results: 100 + completer: $fish_completer } } } diff --git a/hosts/tesla-nixos/hardware-configuration.nix b/hosts/tesla-nixos/hardware-configuration.nix new file mode 100644 index 0000000..017a78a --- /dev/null +++ b/hosts/tesla-nixos/hardware-configuration.nix @@ -0,0 +1,37 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/8befd164-4151-4116-83ec-727e44e87ea8"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/6841-1339"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.ens18.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +}