Restructure

This commit is contained in:
Alexander Wainwright 2025-06-26 21:38:14 +10:00
parent 9e14290937
commit ce30261865
6 changed files with 146 additions and 145 deletions

123
hosts/modules/base.nix Normal file
View file

@ -0,0 +1,123 @@
{ config, pkgs, inputs, ... }:
{
# Define a user account. Don't forget to set a password with passwd.
users.users.alex = {
isNormalUser = true;
description = "Alexander Wainwright";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
# thunderbird
];
shell = pkgs.fish;
};
# Enable networking
networking.networkmanager.enable = true;
networking.firewall.allowedTCPPorts = [ 8000 ];
# Set your time zone.
time.timeZone = "Australia/Brisbane";
# Select internationalisation properties.
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_AU.UTF-8";
LC_IDENTIFICATION = "en_AU.UTF-8";
LC_MEASUREMENT = "en_AU.UTF-8";
LC_MONETARY = "en_AU.UTF-8";
LC_NAME = "en_AU.UTF-8";
LC_NUMERIC = "en_AU.UTF-8";
LC_PAPER = "en_AU.UTF-8";
LC_TELEPHONE = "en_AU.UTF-8";
LC_TIME = "en_AU.UTF-8";
};
# Configure console keymap
console.keyMap = "dvorak";
# fish shell
programs.fish.enable = true;
# Create a library path that only applies to unpackaged programs by using
# nix-ldo
# https://nix.dev/guides/faq#how-to-run-non-nix-executables
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
# Add any missing dynamic libraries for unpackaged programs
# here, NOT in environment.systemPackages
];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Enable the Flakes feature and the accompanying new nix command-line tool
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Enable zeroconf
services.avahi = {
enable = true;
nssmdns4 = true; # Enables Avahi for name service lookups (e.g., in /etc/nsswitch.conf)
publish = {
enable = true;
addresses = true; # Publish your laptop's IP addresses
workstation = true; # Publish your laptop as a workstation
# You might also want:
# domain = true; # Announce the locally used domain name (usually .local)
# userServices = true; # Publish services advertised by users
};
# If you're using systemd-resolved alongside Avahi, ensure mDNS is also enabled there:
# services.resolved.enable = true;
# services.resolved.extraConfig = "MulticastDNS=yes";
};
environment.variables.EDITOR = "nvim";
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Packages
environment.systemPackages = with pkgs; [
avahi
bat
borgbackup
cifs-utils
duf
dust
entr
fd
git
neovim
python314
ripgrep
rsync
silver-searcher
tldr
unzip
uv
wget
zip
binutils
cmake
gcc
clang
gnumake
libtool
];
}

48
hosts/modules/desktop.nix Normal file
View file

@ -0,0 +1,48 @@
{ config, pkgs, inputs, ... }:
{
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "dvorak";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Mullvad vpn
services.mullvad-vpn.package = pkgs.mullvad-vpn;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Install firefox.
programs.firefox.enable = true;
environment.systemPackages = with pkgs; [
inputs.locutus.packages.${pkgs.system}.default
mullvad-vpn
];
}