Merge remote-tracking branch 'origin/nixos' into nixos-work
This commit is contained in:
commit
89991861ed
40 changed files with 1149 additions and 768 deletions
|
|
@ -6,21 +6,6 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
nom-system = pkgs.writeFishApplication {
|
||||
name = "nom-system";
|
||||
runtimeInputs = with pkgs; [ nix-output-monitor ];
|
||||
text = /* fish */ ''
|
||||
nom build --no-link "/home/moritz/.dotfiles#nixosConfigurations.$(hostname).config.system.build.toplevel" $argv
|
||||
'';
|
||||
};
|
||||
nom-system-command = name: command: pkgs.writeFishApplication {
|
||||
inherit name;
|
||||
runtimeInputs = with pkgs; [ nom-system nix ];
|
||||
text = /* fish */ ''
|
||||
nom-system $argv && ${command}
|
||||
'';
|
||||
};
|
||||
|
||||
f = pkgs.writeFishApplication {
|
||||
name = "f";
|
||||
runtimeInputs = with pkgs; [ fzf bat ];
|
||||
|
|
@ -46,7 +31,7 @@ let
|
|||
recurse (readlink $path)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
for arg in $argv
|
||||
recurse (which $arg)
|
||||
end
|
||||
|
|
@ -84,6 +69,9 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGoAqa2m7hIzZ2LS96Z+RCIlRvhBM/j7h27tMBCwMT+a" # Moritz
|
||||
];
|
||||
users.users.moritz = {
|
||||
isNormalUser = true;
|
||||
home = "/home/moritz";
|
||||
|
|
@ -105,17 +93,17 @@ in
|
|||
abbreviations = {
|
||||
us = "systemctl --user";
|
||||
rs = "sudo systemctl";
|
||||
uj = "journalctl --user";
|
||||
rj = "sudo journalctl";
|
||||
};
|
||||
aliases = {
|
||||
ls = "exa -lh --icons --git";
|
||||
ls = "${getExe pkgs.eza} -lh --icons --git";
|
||||
cat = "bat";
|
||||
rm = "rm -i";
|
||||
mv = "mv -i";
|
||||
cd = "__zoxide_z";
|
||||
|
||||
nixos-update = "pushd ~/.dotfiles && nix flake update && popd";
|
||||
|
||||
latexwatch = ''find -type f -name "*.tex" | entr -c latexmk -pdf -silent'';
|
||||
};
|
||||
variables = { EDITOR = "vim"; };
|
||||
};
|
||||
|
|
@ -135,6 +123,8 @@ in
|
|||
"|" = "split-window -h";
|
||||
"C-l" = "send-keys C-l";
|
||||
"R" = "source-file $XDG_CONFIG_HOME/tmux/tmux.conf \\; display-message 'Reloaded tmux.conf'";
|
||||
"f" = "new-window ts";
|
||||
"a" = "new-window ta";
|
||||
};
|
||||
copy-mode-vi = {
|
||||
"v" = "send -X begin-selection";
|
||||
|
|
@ -151,48 +141,35 @@ in
|
|||
# archives
|
||||
ouch
|
||||
|
||||
# file management
|
||||
trash-cli
|
||||
|
||||
# monitoring
|
||||
htop
|
||||
bottom
|
||||
|
||||
# nix
|
||||
(nom-system-command "nixos-boot" "sudo nixos-rebuild boot --flake ~/.dotfiles")
|
||||
(nom-system-command "nixos-switch" "sudo nixos-rebuild switch --flake ~/.dotfiles")
|
||||
(nom-system-command "nixos-test" "sudo nixos-rebuild test --flake ~/.dotfiles")
|
||||
manix
|
||||
nix-index
|
||||
nix-output-monitor
|
||||
nixpkgs-fmt
|
||||
statix
|
||||
which-nix
|
||||
|
||||
# other
|
||||
# utils
|
||||
bat
|
||||
cht-sh
|
||||
du-dust
|
||||
duf
|
||||
entr
|
||||
exa
|
||||
f
|
||||
fd
|
||||
gi
|
||||
gparted
|
||||
neofetch
|
||||
reptyr
|
||||
parallel
|
||||
ripgrep
|
||||
up
|
||||
vim
|
||||
viu
|
||||
wget
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
(nerdfonts.override {
|
||||
fonts = [ "FiraCode" ];
|
||||
})
|
||||
];
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override {
|
||||
fonts = [ "FiraCode" ];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
mtr.enable = true;
|
||||
|
|
|
|||
|
|
@ -84,11 +84,7 @@ in
|
|||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
anki
|
||||
calibre
|
||||
fd
|
||||
keepassxc
|
||||
nixpkgs-review
|
||||
pavucontrol
|
||||
stable.libreoffice # NOTE breaks often
|
||||
stable.signal-desktop # NOTE breaks often
|
||||
|
|
|
|||
|
|
@ -69,24 +69,5 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
nix.buildMachines = [{
|
||||
hostName = "builder";
|
||||
systems = [ "aarch64-linux" "x86_64-linux" ];
|
||||
protocol = "ssh-ng";
|
||||
maxJobs = 1;
|
||||
speedFactor = 1;
|
||||
supportedFeatures = [ "nixos-test" "benchmark" "kvm" ];
|
||||
mandatoryFeatures = [ ];
|
||||
}];
|
||||
nix.distributedBuilds = true;
|
||||
# optional, useful when the builder has a faster internet connection than yours
|
||||
nix.extraOptions = ''
|
||||
builders-use-substitutes = true
|
||||
'';
|
||||
age.secrets."ssh-builder" = {
|
||||
file = ../../secrets/ssh-builder.age;
|
||||
owner = "0";
|
||||
path = "/root/.ssh/config";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue