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