Dump nixos config after scrubing

This commit is contained in:
Mariano Uvalle 2025-05-03 23:42:03 -07:00
commit 5fa4c76c24
854 changed files with 30072 additions and 0 deletions

View file

@ -0,0 +1,72 @@
# 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, ... }:
let
pubKeys = lib.filesystem.listFilesRecursive ../common/keys;
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
virtualisation.docker.enable = true;
networking.hostName = "nixbox"; # Define your hostname.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
programs.zsh.enable = true;
users.users.jmug = {
isNormalUser = true;
description = "Mariano Uvalle";
extraGroups = [ "wheel" "docker" ];
shell = pkgs.zsh;
openssh.authorizedKeys.keys = lib.lists.forEach pubKeys (key: builtins.readFile key);
};
users.users.root = {
shell = pkgs.zsh;
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
ports = [ 69 ];
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
system.stateVersion = "24.11"; # Did you read the comment?
}

View file

@ -0,0 +1,41 @@
# 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 = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/67dc8c71-37ca-4340-945a-cfd1befe2aa1";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/9FBA-15AF";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/16fa084b-0350-4416-9597-36010f16011d"; }
];
# 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.enp2s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1,32 @@
{ config, pkgs, ... } :
{
imports = [
../../home-modules/default.nix
../../home-modules/nvim.nix
../../home-modules/git.nix
../../home-modules/lazygit.nix
../../home-modules/starship.nix
../../home-modules/zsh.nix
];
home = {
username = "root";
homeDirectory = "/root";
stateVersion = "24.11";
};
programs.zsh = {
shellAliases = {
lg = "lazygit";
n = "nvim";
# TODO: Interpolate the hostname here.
nrsw = "nixos-rebuild switch --flake /etc/nixos#devbox";
};
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

80
hosts/devbox/home.nix Normal file
View file

@ -0,0 +1,80 @@
{ config, pkgs, ... } :
{
imports = [
../../home-modules/default.nix
../../home-modules/nvim.nix
../../home-modules/tmux.nix
../../home-modules/git.nix
../../home-modules/lazygit.nix
../../home-modules/starship.nix
../../home-modules/direnv.nix
../../home-modules/zsh.nix
];
home = {
username = "jmug";
homeDirectory = "/home/jmug";
packages = with pkgs; [
zig
neofetch
fzf
ripgrep
htop
git
wget
exercism
# Thin provisioning tools
thin-provisioning-tools
];
stateVersion = "24.11";
};
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";
};
};
services.ssh-agent.enable = true;
programs.ssh = {
enable = true;
addKeysToAgent = "confirm";
# matchBlocks = {
# alarm = {
# user = "alarm";
# hostname = "alarm";
# forwardAgent = true;
# identityFile = "/home/jmug/.ssh/id_ed25519";
# };
# wsl = {
# user = "aym";
# hostname = "192.168.10.241";
# port = 69;
# forwardAgent = true;
# identityFile = "/home/jmug/.ssh/id_ed25519";
# };
# ws = {
# user = "aym";
# hostname = "73.118.150.68";
# port = 69;
# forwardAgent = true;
# identityFile = "/home/jmug/.ssh/id_ed25519";
# };
# };
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}