1
0
forked from extern/nix-config

fish: Use variables for vm abbreviation

This prevents things from breaking if we change the hostname at a later
date.
This commit is contained in:
Donovan Glover 2023-06-06 10:36:08 -04:00
parent a326873c6a
commit 9a9e3be260
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -1,4 +1,6 @@
{pkgs, ...}: {
{pkgs, ...}: let
VARIABLES = import ../../src/variables.nix;
in {
users.defaultUserShell = pkgs.fish;
environment.shells = [pkgs.fish];
@ -58,7 +60,7 @@
jis = "recode shift_jis..utf8"; # Easily convert shift_jis-encoded files to utf8
utf16 = "recode utf16..utf8"; # Rarely, some files from Japan are utf16 instead
jp = "LANG=ja_JP.UTF-8 LC_ALL=ja_JP.UTF-8";
vm = "cd ~/nix-config && nixos-rebuild build-vm --flake . && ./result/bin/run-nixos-vm && trash put result nixos.qcow2";
vm = "cd ~/nix-config && nixos-rebuild build-vm --flake . && ./result/bin/run-${VARIABLES.hostname}-vm && trash put result ${VARIABLES.hostname}.qcow2";
sw = "cd ~/nix-config && sudo nixos-rebuild switch --flake .";
c = "tput reset"; # Clear the terminal completely