swag
This commit is contained in:
parent
1c8b22e443
commit
99c6bc4b6f
4
base.nix
4
base.nix
|
@ -59,8 +59,8 @@
|
|||
# System fonts
|
||||
# Nice to have when X-forwading on headless machines
|
||||
fonts.fontDir.enable = true; # creates /run/current-system/sw/share/X11/fonts
|
||||
fonts.enableDefaultFonts = true; # dejavu, freefont, gyre, liberation, unifont, noto-fonts-emoji
|
||||
fonts.fonts = with pkgs; [
|
||||
fonts.enableDefaultPackages = true; # dejavu, freefont, gyre, liberation, unifont, noto-fonts-emoji
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts # includes Cousine
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
|
|
12
flake.nix
12
flake.nix
|
@ -23,6 +23,10 @@
|
|||
home-manager-2305.url = "github:nix-community/home-manager/release-23.05";
|
||||
home-manager-2305.inputs.nixpkgs.follows = "nixpkgs-2305";
|
||||
|
||||
# https://github.com/nix-community/nix-index-database
|
||||
nix-index-database.url = "github:Mic92/nix-index-database";
|
||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs-2311"; # only used for .packages
|
||||
|
||||
# https://github.com/NixOS/nixos-hardware
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
|
||||
|
@ -151,6 +155,7 @@
|
|||
(ifExists "${self}/hosts/${hostname}")
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.home-manager.nixosModule
|
||||
#inputs.nix-index-database.nixosModules.nix-index
|
||||
] ++ modules ++ extra-modules;
|
||||
#++ inputs.flake-programs-sqlite.nixosModules.programs-sqlite; # TODO: make work
|
||||
|
||||
|
@ -167,6 +172,7 @@
|
|||
};
|
||||
home-manager.sharedModules = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
];
|
||||
|
||||
# still needed even if using networkd
|
||||
|
@ -212,8 +218,8 @@
|
|||
in {
|
||||
inherit system; # TODO: cross system
|
||||
fqdn = cfg.networking.fqdn;
|
||||
allowedTCPPorts = cfg.networking.firewall.allowedTCPPorts;
|
||||
allowedUDPPorts = cfg.networking.firewall.allowedUDPPorts;
|
||||
allowedTCPPorts = cfg.networking.firewall.allowedTCPPorts or [];
|
||||
allowedUDPPorts = cfg.networking.firewall.allowedUDPPorts or [];
|
||||
bootloader = if cfg.boot.loader.grub.enable then "grub"
|
||||
else if cfg.boot.loader.systemd-boot.enable then "systemd-boot"
|
||||
else null;
|
||||
|
@ -266,6 +272,7 @@
|
|||
nixosModules = mkHosts (mkModule []);
|
||||
nixosConfigurations = mkHosts (mkConfig []);
|
||||
nixosReports = mkHosts (mkReport []);
|
||||
nixosHostnames = builtins.attrNames self.nixosReports; # faster to eval
|
||||
|
||||
packages = forAllSystems ({ inputs, pkgs, lib, flakes, ... }: let
|
||||
mk-nspawn-deployer = hostname: # TODO: nspawn-tarball.nix populates /etc/nixos with junk
|
||||
|
@ -296,6 +303,7 @@
|
|||
home.homeDirectory = home;
|
||||
home-manager.sharedModules = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
];
|
||||
}];
|
||||
extraSpecialArgs = {
|
||||
|
|
13
justfile
13
justfile
|
@ -6,8 +6,14 @@
|
|||
@set-remote:
|
||||
tomlq <.remote.toml '.hosts | to_entries[] | "remote-set \(.key+1) # -> \(.value.host)" | @sh "\(.)"' -r | xargs gum choose | sh
|
||||
|
||||
report:
|
||||
nix eval .#nixosReports --json | yq . --yaml-output
|
||||
eval hostname=`just _a-host`:
|
||||
nix eval .#nixosConfigurations.{{hostname}}.config.system.build.toplevel.outPath
|
||||
|
||||
report hostname=`just _a-host`:
|
||||
nix eval .#nixosReports.{{hostname}} --json | yq . --yaml-output | bat --language yaml --style plain --paging never
|
||||
|
||||
reports:
|
||||
nix eval .#nixosReports --json | yq . --yaml-output | bat --language yaml --style plain --paging never
|
||||
|
||||
update:
|
||||
git reset flake.lock
|
||||
|
@ -32,3 +38,6 @@ boot:
|
|||
@list-remotes:
|
||||
echo Current remote: $(remote-host)
|
||||
tomlq <.remote.toml '.hosts | to_entries[] | "remote-set \(.key+1) # -> \(.value.host)"' -r
|
||||
|
||||
@_a-host:
|
||||
nix eval .#nixosHostnames --json 2>/dev/null | jq '.[]' -r | gum filter --height 10 --placeholder "Pick a host..."
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
};
|
||||
aggregatedFonts = pkgs.buildEnv {
|
||||
name = "system-fonts";
|
||||
paths = config.fonts.fonts;
|
||||
paths = config.fonts.packages;
|
||||
pathsToLink = [ "/share/fonts" ];
|
||||
};
|
||||
in {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
(pkgs.lutris.override {
|
||||
extraPkgs = pkgs: [
|
||||
pkgs.wineWowPackages.staging
|
||||
pkgs.winetricks
|
||||
pkgs.pixman
|
||||
pkgs.libjpeg
|
||||
pkgs.gnome.zenity
|
||||
|
|
|
@ -137,9 +137,6 @@
|
|||
denix = "sed -E 's@/nix/store/[^ /]+@@g'";
|
||||
};
|
||||
|
||||
# TODO: auto-update db
|
||||
programs.nix-index.enable = true;
|
||||
|
||||
xdg.enable = true;
|
||||
#TODO: xdg.desktopEntries
|
||||
|
||||
|
|
|
@ -13,14 +13,15 @@
|
|||
# TODO: implement programs.bat.enableAliases
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
themes.railscast = builtins.readFile (pkgs.fetchFromGitHub {
|
||||
#config.style = "plain";
|
||||
config.theme = "railscast";
|
||||
themes.railscast.file = "railscast-textmate.tmtheme";
|
||||
themes.railscast.src = pkgs.fetchFromGitHub {
|
||||
owner = "jeromedalbert";
|
||||
repo = "sublime-text-railscasttextmate-theme";
|
||||
rev = "0a4861f35e72f9ad4cc1cac42730ea563be2ffd3";
|
||||
rev = "0a4861f35e72f9ad4cc1cac42730ea563be2ffd3"; # 11 years old
|
||||
hash = "sha256-1Ml5vqP9r6oCfLhaNGPQJXS8e7utxQQycIm3Hk9wE3w=";
|
||||
} + "/railscast-textmate.tmtheme");
|
||||
config.theme = "railscast";
|
||||
#config.style = "plain";
|
||||
};
|
||||
config.map-syntax = [
|
||||
"poetry.toml:toml"
|
||||
"flake.lock:json"
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
git
|
||||
gh
|
||||
#git
|
||||
#gh
|
||||
hub
|
||||
colordiff
|
||||
];
|
||||
|
||||
programs.gh.enable = true;
|
||||
|
||||
#programs.git.gitui.enable = true;
|
||||
programs.git.enable = true;
|
||||
programs.git.delta.enable = true;
|
||||
|
|
|
@ -32,19 +32,29 @@
|
|||
imports = [ ../modules/jump.nix ];
|
||||
programs.jump.enableBash = true; # TODO: upstream?
|
||||
|
||||
programs.nix-index.enable = true;
|
||||
programs.nix-index-database.comma.enable = true; # via nix-index-database flake
|
||||
#programs.command-not-found.enable = false; # mutex with nix-index
|
||||
|
||||
programs.fzf.enable = true; # TODO: does this conflict with system-wide setup?
|
||||
|
||||
programs.exa.enable = true;
|
||||
programs.exa.enableAliases = true;
|
||||
programs.eza.enable = true;
|
||||
programs.eza.enableAliases = true;
|
||||
|
||||
programs.zoxide.enable = true;
|
||||
programs.zoxide.options = [ "--cmd cd --cmd dc" ];
|
||||
|
||||
programs.carapace.enable = true;
|
||||
|
||||
# i can't type
|
||||
home.shellAliases.sl = "exa";
|
||||
home.shellAliases.dc = "cd";
|
||||
home.shellAliases.sl = "eza";
|
||||
#home.shellAliases.dc = "cd";
|
||||
|
||||
programs.direnv.enable = true;
|
||||
#programs.direnv.nix-direnv.enable = true;
|
||||
programs.direnv.nix-direnv.enable = true;
|
||||
|
||||
programs.tealdeer.enable = true;
|
||||
programs.tealdeer.settings.updates.auto_update = true;
|
||||
|
||||
|
||||
# just use ncdu lol
|
||||
|
@ -60,12 +70,23 @@
|
|||
home.shellAliases.watch = "watch -c "; # parse colors
|
||||
home.shellAliases.xargs = "xargs ";
|
||||
|
||||
# Be conservative with files
|
||||
# --preserver-root is for GNU versions
|
||||
# do not delete / or prompt if deleting more than 3 files at a time
|
||||
home.shellAliases.rm = "rm -i --preserve-root";
|
||||
home.shellAliases.mv = "mv -i";
|
||||
home.shellAliases.cp = "cp -i";
|
||||
# Preventing changing perms on /
|
||||
home.shellAliases.chown = "chown --preserve-root";
|
||||
home.shellAliases.chmod = "chmod --preserve-root";
|
||||
home.shellAliases.chgrp = "chgrp --preserve-root";
|
||||
|
||||
|
||||
home.packages = with pkgs; [
|
||||
rsync
|
||||
bind.dnsutils # dig
|
||||
dogdns # dog
|
||||
vimv
|
||||
git
|
||||
curl
|
||||
wget
|
||||
|
||||
|
@ -90,9 +111,10 @@
|
|||
gum
|
||||
sysz
|
||||
du-dust # du alternative
|
||||
duf # df alternative
|
||||
ncdu # Disk usage analyzer with an ncurses interface
|
||||
xplr # tui file explorer
|
||||
aha unstable.colorized-logs
|
||||
aha (pkgs.colorized-logs or unstable.colorized-logs)
|
||||
];
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue