add rebuild alias automatically

This commit is contained in:
krizej 2024-09-27 22:28:42 +02:00
parent dfee6c889e
commit cce24cbd95
5 changed files with 12 additions and 24 deletions

View file

@ -1,7 +1,7 @@
{ inputs, ... }:
{
"desktop" = inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs; hostname = "desktop"; };
modules = [
./desktop
../modules
@ -9,7 +9,7 @@
];
};
"laptop" = inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs; hostname = "laptop"; };
modules = [
./laptop
../modules
@ -17,7 +17,7 @@
];
};
"rpi" = inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs; hostname = "rpi"; };
modules = [
./rpi
../modules

View file

@ -86,6 +86,7 @@
theme.enable = true;
printing.enable = true;
mpd.enable = true;
fish.enable = true;
autorandr = {
enable = true;
@ -110,13 +111,6 @@
};
};
fish = {
enable = true;
extraAliases = {
"rebuild" = "sudo nixos-rebuild switch --flake ~/nix#desktop -v";
};
};
i3 = {
enable = true;
workspaceOutput = {

View file

@ -64,6 +64,7 @@
theme.enable = true;
printing.enable = true;
mpd.enable = true;
fish.enable = true;
xserver = {
enable = true;
@ -82,12 +83,6 @@
];
};
fish = {
enable = true;
extraAliases = {
"rebuild" = "sudo nixos-rebuild switch --flake ~/nix#laptop -v";
};
};
ssh = {
enable = true;

View file

@ -83,18 +83,13 @@
stuff = {
git.enable = true;
vim.enable = true;
fish.enable = true;
ssh = {
enable = true;
authKeys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDXxtwm+YoSIXfT9OJtU3O/EHf1Lg4IwoLe0CO2/Oapl7efTNZO5qVCh7aG0T5Hy4RD5CmVpxZVei44NM1dpNf3c+5976eH1BKgMmklA4EwAVc3o259YfJoOowBvyzBqO4CZWJmuUUjZwaQ152gPh1iCVe8bcR25S7cCTRN/6qU+rGn2zsbkV/GKdtJmhS5OLic5iXMdL56B7+hqFdL5NxPcWpnaSilIPus2xhI4u29I/FrM8RcR3Uzkqyx385js5MqhkVP3SVc7V8hSKEO8LRzmBYuBKkBPW9gmCUHKyxhSxZOvcretUFB87W/P/HDw3I4tk4naQPiPnASj6NvqTRMuhErIvXd1w+3MEEsfnXLeyq7CIhO01+d3/JEl7br5HOLZO+64IjSWYY7N0a0zhMjf147yEJ+JBOwXzN6px7y2rLI9CLY6jMs+Ye63nl7ALqN9dLJiaqxOMqTxrSNdRqWEj+FnFTd6sTb5eOZH7yabF/EApwdV3TGRGEaaZGS/GE= krizej@krizej-pc"
];
};
fish = {
enable = true;
extraAliases = {
"rebuild" = "sudo nixos-rebuild switch --flake ~/nix#rpi -v";
};
};
};
};
};

View file

@ -1,4 +1,4 @@
{ lib, pkgs, config, ... }: let
{ lib, pkgs, config, hostname, ... }: let
inherit (lib) mkIf mkEnableOption mkOption types mergeAttrs;
cfg = config.chuj.stuff.fish;
user = config.chuj.system.user;
@ -33,6 +33,10 @@ in {
"myip" = "curl ifconfig.me";
"0x0" = ''curl -F"file=@$argv" https://0x0.st'';
"wget" = "${pkgs.wget}/bin/wget --hsts-file='${XDG_DATA_HOME}/wget-hsts'";
# ulimit -n 4096 fixes the "too many open files" error i get sometimes when
# updating the entire flake
"rebuild" = "ulimit -n 4096 && sudo nixos-rebuild switch --flake ~/nix#${hostname} -v";
} cfg.extraAliases;
shellAbbrs = { # mkif xclip in pkgs