diff --git a/home/alisceon/base.nix b/home/alisceon/base.nix index ed2154e..d1ba378 100644 --- a/home/alisceon/base.nix +++ b/home/alisceon/base.nix @@ -1,106 +1,108 @@ -{ pkgs, config, hostName, lib, ... }: { - home.username = "alisceon"; - home.homeDirectory = "/home/alisceon"; - home.stateVersion = "24.05"; - manual.manpages.enable = true; +{ pkgs, config, hostName, lib, ... }: + let + globalShellAbbrs = { + tsla-fan = "ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0"; + + # NixOS commands + nixoss = "sudo nixos-rebuild switch --flake .#${hostName}"; + nixos-main = "git checkout main ; git pull ; sudo nixos-rebuild switch --flake .#${hostName}"; + nixossr = "sudo nixos-rebuild boot --flake .#${hostName} ; reboot"; + nixost = "sudo nixos-rebuild dry-build --flake .#${hostName}"; - globalShellAbbrs = { - tsla-fan = "ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0"; - # NixOS commands - nixoss = "sudo nixos-rebuild switch --flake .#${hostName}"; - nixos-main = "git checkout main ; git pull ; sudo nixos-rebuild switch --flake .#${hostName}"; - nixossr = "sudo nixos-rebuild boot --flake .#${hostName} ; reboot"; - nixost = "sudo nixos-rebuild dry-build --flake .#${hostName}"; + # Development commands + devt = "devenv test"; - # Development commands - devt = "devenv test"; + devtas = "devenv tasks list"; + devtar = "devenv tasks run"; + devs = "devenv shell"; + devu = "devenv up -d"; + devi = "nix flake init -t templates#"; - devtas = "devenv tasks list"; - devtar = "devenv tasks run"; - devs = "devenv shell"; - devu = "devenv up -d"; - devi = "nix flake init -t templates#"; + pypod = "podman run --rm -it --network host -v '.:/run' -w '/run' python /run/"; - pypod = "podman run --rm -it --network host -v '.:/run' -w '/run' python /run/"; - - # Tower commands - weboot = "nix shell nixpkgs#efibootmgr -c sudo efibootmgr -n 0000 ; reboot"; - }; # end globalShellAbbrs - - programs = { - fish = { - enable = false; - # Disable greeting - interactiveShellInit = '' - set fish_greeting - ''; - preferAbbrs = true; - shellAbbrs = globalShellAbbrs // { - ls = "exa"; - ll = "exa -lah"; - grep = "rg"; - cat = "bat -p"; - }; - }; # end fish - nushell = { - enable = true; - configFile.source = ../conf/config.nu; - shellAliases = globalShellAbbrs //{ - }; - }; - git = { - enable = true; - userName = "alisceon"; - userEmail = "alisceon@protonmail.com"; - extraConfig = { - push = { autoSetupRemote = true; }; - init.defaultBranch = "main"; - }; - }; # end git - ssh = { - enable = true; - matchBlocks = { - "alisceon.com" = { - hostname = "alisceon.com"; - user = "opc"; + # Tower commands + weboot = "nix shell nixpkgs#efibootmgr -c sudo efibootmgr -n 0000 ; reboot"; + }; # end globalShellAbbrs + in + { + home.username = "alisceon"; + home.homeDirectory = "/home/alisceon"; + home.stateVersion = "24.05"; + manual.manpages.enable = true; + programs = { + fish = { + enable = false; + # Disable greeting + interactiveShellInit = '' + set fish_greeting + ''; + preferAbbrs = true; + shellAbbrs = globalShellAbbrs // { + ls = "exa"; + ll = "exa -lah"; + grep = "rg"; + cat = "bat -p"; }; - "miscbox" = { - hostname = "10.1.0.11"; - proxyJump = "alisceon.com"; - user = "opc"; - }; - "blogbox" = { - hostname = "10.1.0.10"; - proxyJump = "alisceon.com"; - user = "ubuntu"; - }; - "filurbox" = { - hostname = "oci.malice.zone"; - user = "opc"; - }; - "dnspi" = { - hostname = "10.40.0.2"; - user = "pi"; - }; - "tsla-exporter-bridge" = { - hostname = "alma02.lab.the.malice.zone"; - user = "root"; - }; - "tsla-runner-boi" = { - hostname = "alma03.lab.the.malice.zone"; - user = "root"; - }; - "tsla-nixos" = { - hostname = "tesla-nixos.lab.the.malice.zone"; + }; # end fish + nushell = { + enable = true; + configFile.source = ../conf/config.nu; + shellAliases = globalShellAbbrs // { }; }; - }; # end ssh - direnv = { - enable = true; - silent = true; - }; # end direnv - }; # end programs + git = { + enable = true; + userName = "alisceon"; + userEmail = "alisceon@protonmail.com"; + extraConfig = { + push = { autoSetupRemote = true; }; + init.defaultBranch = "main"; + }; + }; # end git + ssh = { + enable = true; + matchBlocks = { + "alisceon.com" = { + hostname = "alisceon.com"; + user = "opc"; + }; + "miscbox" = { + hostname = "10.1.0.11"; + proxyJump = "alisceon.com"; + user = "opc"; + }; + "blogbox" = { + hostname = "10.1.0.10"; + proxyJump = "alisceon.com"; + user = "ubuntu"; + }; + "filurbox" = { + hostname = "oci.malice.zone"; + user = "opc"; + }; + "dnspi" = { + hostname = "10.40.0.2"; + user = "pi"; + }; + "tsla-exporter-bridge" = { + hostname = "alma02.lab.the.malice.zone"; + user = "root"; + }; + "tsla-runner-boi" = { + hostname = "alma03.lab.the.malice.zone"; + user = "root"; + }; + "tsla-nixos" = { + hostname = "tesla-nixos.lab.the.malice.zone"; + }; + }; + }; # end ssh + direnv = { + enable = true; + silent = true; + }; # end direnv + }; # end programs - # nixpkgs config - xdg.configFile."nixpkgs/config.nix".source = ../conf/config.nix; -} # end file + # nixpkgs config + xdg.configFile."nixpkgs/config.nix".source = ../conf/config.nix; + } # end file diff --git a/home/alisceon/server.nix b/home/alisceon/server.nix index 8d90fc8..e33fd77 100644 --- a/home/alisceon/server.nix +++ b/home/alisceon/server.nix @@ -1,8 +1,4 @@ { pkgs, config, hostName, lib, ... }: { - home.username = "alisceon"; - home.homeDirectory = "/home/alisceon"; - home.stateVersion = "24.05"; - manual.manpages.enable = true; - programs = { + }; # end programs } # end file diff --git a/home/alisceon/workstation.nix b/home/alisceon/workstation.nix index 873f690..b0286f4 100644 --- a/home/alisceon/workstation.nix +++ b/home/alisceon/workstation.nix @@ -1,9 +1,4 @@ { pkgs, config, hostName, lib, ... }: { - home.username = "alisceon"; - home.homeDirectory = "/home/alisceon"; - home.stateVersion = "24.05"; - manual.manpages.enable = true; - programs = { vscode.enable = true; firefox = {