chore: More misc fixes!

This commit is contained in:
jmug
2026-11-20 13:49:35 -08:00
parent 3d3276e9c4
commit b192e41653
18 changed files with 32 additions and 711 deletions
-188
View File
@@ -1,188 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config,
lib,
pkgs,
apple-silicon,
ghostty,
...
}:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
apple-silicon.nixosModules.apple-silicon-support
# Sops and other stuff.
../common/core
../common/optional/yubikey.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
# Bluetooth.
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = false;
services.blueman.enable = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
networking.hostName = "asahi-nix"; # Define your hostname.
networking.wireless = {
enable = true;
secretsFile = config.sops.secrets."wireless.env".path;
networks = {
"UG_LivingRoom_5G" = {
pskRaw = "ext:home_psk";
};
"pioneer" = {
pskRaw = "ext:woods_pioneer_psk";
};
"Thruline Coffee Co - GuestWiFi" = {};
"Woods WiFi" = {};
# Midway Laundry
"NETGEARFDD76C-3" = {};
};
};
hardware.asahi = {
enable = true;
setupAsahiSound = true;
peripheralFirmwareDirectory = ./firmware;
useExperimentalGPUDriver = true;
experimentalGPUInstallMode = "overlay";
};
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# This doesn't seem to be doing anything in hyprland because it configure libinput directly.
# I'll leave it here just in case, but doesn't seem necessary.
services.libinput = {
enable = true;
};
users.users.jmug = {
isNormalUser = true;
extraGroups = [ "wheel" ];
packages = with pkgs; [
git
];
shell = pkgs.zsh;
};
programs.zsh.enable = true;
programs.neovim = {
enable = true;
defaultEditor = true;
};
services.keyd = {
enable = true;
keyboards.colemakdhm = {
ids = [ "05ac:0351:6f083222" ];
settings = {
main = {
e = "f";
r = "p";
t = "b";
y = "j";
u = "l";
i = "u";
o = "y";
p = ";";
s = "r";
d = "s";
f = "t";
h = "m";
j = "n";
k = "e";
l = "i";
";" = "o";
v = "d";
b = "v";
n = "k";
m = "h";
capslock = "leftcontrol";
};
};
};
};
environment.systemPackages = with pkgs; [
keyd
htop
# Misc utils
ripgrep
fzf
unzip
nautilus
# Terminal
ghostty.packages.aarch64-linux.default
kitty
# Theming
palenight-theme
# Lock screen
hyprlock
# Idling
sway-audio-idle-inhibit
];
fonts = {
fontDir.enable = true;
packages = with pkgs; [
nerd-fonts.bigblue-terminal
nerd-fonts.fira-code
nerd-fonts.caskaydia-cove
];
};
security.pam.services.hyprlock = {};
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
environment.sessionVariables = {
# Enable wayland support for chromium/electron apps.
GDK_BACKEND = "wayland";
NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
QT_QPA_PLATFORM = "wayland";
# This caused issues with walker, but might be some other
# issue with wayland/hyprland, so will leave it here for now.
# QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
# WLR_NO_HARDWARE_CURSORS = "1";
};
# This is not really enabling X11, bad naming.
services.xserver = {
enable = true;
displayManager.gdm = {
enable = true;
wayland = true;
};
};
# This is used to scale the gdm login screen,
# try to set it up for fractional scaling in
# the future.
home-manager.users.gdm = { lib, ... }: {
home.stateVersion = "25.05"; # Do not change!!!
dconf.settings = {
"org/gnome/desktop/interface" = {
scaling-factor = lib.hm.gvariant.mkUint32 2;
};
};
};
# USB devices.
services.devmon.enable = true;
services.gvfs.enable = true;
services.udisks2.enable = true;
system.stateVersion = "25.05"; # Don't change!!!
}
Binary file not shown.
Binary file not shown.
-39
View File
@@ -1,39 +0,0 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "usb_storage" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/b5800f37-1df2-4d6c-b2c7-7c274d56e938";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/547D-181B";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/e4138eb3-f8cf-436f-9a0f-3c67d3095582"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}
-183
View File
@@ -1,183 +0,0 @@
{
lib,
config,
inputs,
pkgs,
pkgs-unstable,
...
} :
let
pathToKeys = ../common/keys/yubi;
yubiKeys =
lib.lists.forEach (builtins.attrNames (builtins.readDir pathToKeys))
(key: lib.substring 0 (lib.stringLength key - lib.stringLength ".pub") key); # Remove .pub suffix.
yubikeyPublicKeyEntries = lib.attrsets.mergeAttrsList (
lib.lists.map
(key: { ".ssh/${key}.pub".source = "${pathToKeys}/${key}.pub"; })
yubiKeys
);
in
{
imports = [
# TODO: Move all hyprland related config to its own module.
../../home-modules/hyprland
../../home-modules/direnv.nix
../../home-modules/ghostty-config.nix
../../home-modules/git.nix
../../home-modules/lazygit.nix
../../home-modules/nvim.nix
../../home-modules/sops.nix
../../home-modules/ssh-client.nix
../../home-modules/starship.nix
../../home-modules/tmux.nix
../../home-modules/zsh.nix
];
ghostty.font-size = "14";
ghostty.window-decoration = false;
home = {
username = "jmug";
homeDirectory = "/home/jmug";
packages = with pkgs; [
# Media
loupe
vlc
# Audio
wireplumber
spotify-player
# Screen management
brightnessctl
# Secret management.
age
sops
# Browsers
ungoogled-chromium
# Coms
(webcord.override { electron = inputs.nixpkgs-electron-32.legacyPackages."aarch64-linux".electron; })
whatsie
obs-studio
# Dev tools
flyctl
pkgs-unstable.claude-code
# AWS tools
awscli2
(callPackage ../../nixos-modules/shell-apps/aws-cli-mfa.nix {})
];
pointerCursor = {
gtk.enable = true;
x11.enable = true;
hyprcursor.enable = true;
name = "Posy_Cursor_Black";
package = pkgs."posy-cursors";
};
file = {} // yubikeyPublicKeyEntries;
stateVersion = "25.05"; # Do not change!!!
};
home.activation.aws-cli-mfa-config = lib.hm.dag.entryAfter ["writeBoundary"] ''
mkdir -p ~/.config/aws-cli-mfa
cat > ~/.config/aws-cli-mfa/config.yaml << EOF
mfa_serial: $(cat ${config.sops.secrets."aws/jmug_ace_mfa_serial".path})
role_arn: $(cat ${config.sops.secrets."aws/role_arn".path})
session_duration: 43200
EOF
'';
gtk = {
enable = true;
gtk3 = {
extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
};
gtk4 = {
extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
};
theme = {
name = "palenight";
package = pkgs.palenight-theme;
};
};
qt = {
enable = true;
platformTheme = "gtk";
};
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
xdg.configFile = {
"gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
"gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
"gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
};
programs.ssh = {
enable = true;
addKeysToAgent = "yes";
matchBlocks = {
"git" = {
host = "github.com";
user = "git";
identityFile = [
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
"/home/jmug/.ssh/id_jmug" # Fallback key with passphrase.
];
};
"forgejo" = {
host = "code.jmug.me";
user = "git";
identityFile = [
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
"/home/jmug/.ssh/id_jmug" # Fallback key with passphrase.
];
};
wsl = {
user = "jmug";
hostname = "192.168.10.241";
port = 69;
forwardAgent = true;
identityFile = [
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
];
};
ws = {
user = "jmug";
hostname = "98.59.213.212";
port = 69;
forwardAgent = true;
identityFile = [
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
];
};
};
};
programs.zsh.shellAliases = {
# TODO BEGIN Interpolate the name of the host here.
# flakeconf = "sudo nvim /etc/nixos/flake.nix";
# nosconf = "sudo nvim /etc/nixos/hosts/devbox/configuration.nix";
# homeconf = "sudo nvim /etc/nixos/hosts/devbox/home.nix";
# nvconf = "sudo nvim /etc/nixos/home-modules/explicit-configs/nvim/init.lua";
# TODO END Interpolate the name of the host here.
rshellconf = "source ~/.zshrc";
fly = "flyctl";
# TODO: Interpolate the name of the host here.
nrsw = "sudo nixos-rebuild switch --flake /home/jmug/nixos#asahi"; # parametrize this as home dir.
awsmfa = "eval $(aws-cli-mfa)";
uawsmfa = "eval $(aws-cli-mfa --unset)";
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}
+1
View File
@@ -58,6 +58,7 @@ in
};
programs.zsh.enable = true;
user.name = "jmug";
users.users.jmug = {
isNormalUser = true;
description = "Mariano Uvalle";
+2 -3
View File
@@ -1,4 +1,4 @@
{ config, pkgs, ... } :
{ config, pkgs, homeConfigurationName, ... } :
{
@@ -22,8 +22,7 @@
shellAliases = {
lg = "lazygit";
n = "nvim";
# TODO: Interpolate the hostname here.
nrsw = "nixos-rebuild switch --flake /etc/nixos#devbox";
nrsw = "nixos-rebuild switch --flake /etc/nixos#${homeConfigurationName}";
};
};
+2 -8
View File
@@ -4,6 +4,7 @@
pkgs,
ssh-agent-switcher,
user,
homeConfigurationName,
...
} :
let
@@ -99,15 +100,8 @@ EOF
programs.zsh = {
shellAliases = {
# TODO BEGIN Interpolate the name of the host here.
# flakeconf = "sudo nvim /etc/nixos/flake.nix";
# nosconf = "sudo nvim /etc/nixos/hosts/devbox/configuration.nix";
# homeconf = "sudo nvim /etc/nixos/hosts/devbox/home.nix";
# nvconf = "sudo nvim /etc/nixos/home-modules/explicit-configs/nvim/init.lua";
# TODO END Interpolate the name of the host here.
rshellconf = "source ~/.zshrc";
# TODO: Interpolate the name of the host here.
nrsw = "sudo nixos-rebuild switch --flake /home/jmug/nixos#devbox";
nrsw = "sudo nixos-rebuild switch --flake ${homeDirectory}/nixos#${homeConfigurationName}";
fly = "flyctl";
awsmfa = "eval $(aws-cli-mfa)";
uawsmfa = "eval $(aws-cli-mfa --unset)";
+2 -2
View File
@@ -5,6 +5,7 @@
opencode-tunneler,
godig,
user,
homeConfigurationName,
...
} :
let
@@ -150,7 +151,6 @@ in {
programs.zsh = {
shellAliases = {
# TODO BEGIN Interpolate the name of the host here.
flakeconf = "nvim ${homeDirectory}/nixos/flake.nix";
sysconf = "nvim ${homeDirectory}/nixos/hosts/macbook/configuration.nix";
homeconf = "nvim ${homeDirectory}/nixos/hosts/macbook/home.nix";
@@ -158,7 +158,7 @@ in {
k = "kubectl";
rshellconf = "source ${homeDirectory}/.zshrc";
nrsw = "sudo darwin-rebuild switch --flake ${homeDirectory}/nixos#macbook";
nrsw = "sudo darwin-rebuild switch --flake ${homeDirectory}/nixos#${homeConfigurationName}";
opencode-local = "${homeDirectory}/dev/opencode/dist-local/bin/opencode";
};
+2 -2
View File
@@ -6,6 +6,7 @@
pkgs-unstable,
ssh-agent-switcher,
user,
homeConfigurationName,
...
} :
let
@@ -123,8 +124,7 @@ in {
homeconf = "nvim ${homeDirectory}/nixos/hosts/nixbox/home.nix";
nvconf = "sudo nvim ${homeDirectory}/nixos/home-modules/explicit-configs/nvim/init.lua";
rshellconf = "source ~/.zshrc";
# TODO: Interpolate the name of the host here.
nrsw = "sudo nixos-rebuild switch --flake ${homeDirectory}/nixos#nixbox";
nrsw = "sudo nixos-rebuild switch --flake ${homeDirectory}/nixos#${homeConfigurationName}";
fly = "flyctl";
# awsmfa = "eval $(aws-cli-mfa)";
# uawsmfa = "eval $(aws-cli-mfa --unset)";