refactor: major structural changes

git updates

update tmux conf

add ansible tools

squash me

squash

fix: get git aliases from plugin

virt stuff

add devenv

some virt updates

kubernetes
This commit is contained in:
Glen Goodwin 2023-11-22 16:33:30 -05:00
parent 2e8c1eec90
commit 2220c4e917
87 changed files with 1963 additions and 2261 deletions

15
common/gui/common.nix Normal file
View file

@ -0,0 +1,15 @@
{pkgs, ...}: {
services.printing.enable = true;
environment.systemPackages = with pkgs; [
gnome.adwaita-icon-theme
gnome.gnome-themes-extra
firefox-wayland
discord
qt5.qtwayland
qt6.qmake
qt6.qtwayland
adwaita-qt
adwaita-qt6
];
}

14
common/gui/dbus.nix Normal file
View file

@ -0,0 +1,14 @@
{
config,
pkgs,
...
}: {
services.dbus = {
enable = true;
packages = [pkgs.dconf];
};
programs.dconf = {
enable = true;
};
}

View file

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}: {
services.xserver = {
displayManager.gdm = {
enable = false;
wayland = true;
};
displayManager.lightdm.enable = false;
};
environment.systemPackages = with pkgs; [
];
}

80
common/gui/hyprland.nix Normal file
View file

@ -0,0 +1,80 @@
{
pkgs,
inputs,
...
}: {
imports = [
./common.nix
./dbus.nix
./pipewire.nix
./wayland.nix
./displayManager.nix
./xdg.nix
];
# Security
security = {
pam.services.swaylock = {
text = ''
auth include login
'';
};
};
# Services
services = {
xserver = {
enable = true;
layout = "us";
xkbVariant = "";
excludePackages = [pkgs.xterm];
# videoDrivers = ["amdgpu"];
libinput = {
enable = true;
touchpad.tapping = true;
touchpad.naturalScrolling = true;
touchpad.scrollMethod = "twofinger";
touchpad.disableWhileTyping = true;
touchpad.clickMethod = "clickfinger";
};
};
gvfs.enable = true;
tumbler.enable = true;
gnome = {
sushi.enable = true;
gnome-keyring.enable = true;
};
};
programs = {
hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
xwayland = {
enable = true;
};
};
waybar = {
enable = true;
package = pkgs.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];
});
};
thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
};
environment.systemPackages = with pkgs; [
libva-utils
gsettings-desktop-schemas
];
environment.sessionVariables = {
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_DESKTOP = "Hyprland";
};
}

28
common/gui/pipewire.nix Normal file
View file

@ -0,0 +1,28 @@
{
config,
lib,
pkgs,
...
}: {
# Enable sound with pipewire.
sound.enable = true;
hardware.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;
};
environment.systemPackages = with pkgs; [
pipewire
wireplumber
];
}

15
common/gui/thunar.nix Normal file
View file

@ -0,0 +1,15 @@
{
pkgs,
config,
...
}: {
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
services.gvfs.enable = true; # Mount, trash, and other functionalities
services.tumbler.enable = true; # Thumbnail support for images
}

26
common/gui/wayland.nix Normal file
View file

@ -0,0 +1,26 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
wlr-randr
wl-clipboard
];
environment.sessionVariables = {
POLKIT_AUTH_AGENT = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
GSETTINGS_SCHEMA_DIR = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas";
WLR_NO_HARDWARE_CURSORS = "1";
NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
SDL_VIDEODRIVER = "wayland";
_JAVA_AWT_WM_NONREPARENTING = "1";
CLUTTER_BACKEND = "wayland";
WLR_RENDERER = "vulkan";
GTK_USE_PORTAL = "1";
#NIXOS_XDG_OPEN_USE_PORTAL = "1"; # Sets the desktop portal to use flatpak
WLR_NO_HARDWARE_CURSOR = "1";
GDK_BACKEND = "wayland";
QT_QPA_PLATFORM = "wayland;xcb";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_QPA_PLATFORMTHEME = "qt5ct";
};
}

26
common/gui/xdg.nix Normal file
View file

@ -0,0 +1,26 @@
{
config,
lib,
pkgs,
...
}: {
# XDG Portals
xdg = {
autostart.enable = true;
portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
};
};
environment.systemPackages = with pkgs; [
xdg-utils
xdg-desktop-portal
xdg-desktop-portal-gtk
];
environment.sessionVariables = {
XDG_SESSION_TYPE = "wayland";
};
}

View file

@ -0,0 +1,19 @@
{
config,
lib,
pkgs,
inputs,
outputs,
...
}: {
services.zerotierone = {
joinNetworks = [
"48d6023c46b60a94"
];
enable = true;
};
networking.extraHosts = ''
192.168.194.241 nothing.zt
'';
}

View file

@ -0,0 +1,9 @@
{...}: {
services.blueman.enable = true;
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.upower = {enable = true;};
}

42
common/nixos/common.nix Normal file
View file

@ -0,0 +1,42 @@
{
config,
lib,
pkgs,
inputs,
outputs,
...
}: {
imports = [
./packages.nix
./users.nix
./locale.nix
../../common/style/stylix.nix
];
#
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = ["nix-command" "flakes"];
nix.settings.auto-optimise-store = true;
nix.optimise.automatic = true;
# Disable so comma can be installed
programs.command-not-found.enable = false;
programs.nix-index-database.comma.enable = true;
nix.gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 14d";
};
services.fstrim.enable = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system we e ere taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
}

8
common/nixos/laptop.nix Normal file
View file

@ -0,0 +1,8 @@
{...}: {
imports = [./bluetooth.nix];
# enable's backlight switching
programs.light.enable = true;
# use TLP for power management
services.tlp.enable = true;
}

26
common/nixos/locale.nix Normal file
View file

@ -0,0 +1,26 @@
{
config,
lib,
pkgs,
inputs,
outputs,
...
}: {
# Set your time zone.
time.timeZone = "America/Toronto";
# 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";
};
}

26
common/nixos/packages.nix Normal file
View file

@ -0,0 +1,26 @@
{
config,
lib,
pkgs,
inputs,
outputs,
...
}: {
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
alejandra
just
vim
wget
home-manager
git
];
}

18
common/nixos/users.nix Normal file
View file

@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
inputs,
outputs,
...
}: {
# Define a user account. Don't forget to set a password with 'passwd'.
programs.zsh.enable = true;
users.users.gwg313 = {
isNormalUser = true;
description = "Glen Goodwin";
extraGroups = ["networkmanager" "wheel" "video" "docker" "audio" "wireshark"];
shell = pkgs.zsh;
uid = 1000;
};
}

37
common/style/stylix.nix Normal file
View file

@ -0,0 +1,37 @@
{pkgs, ...}: {
stylix = {
base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-terminal-storm.yaml";
image = ./wallpaper.jpg;
autoEnable = true;
opacity.terminal = 1.0;
fonts.sizes.terminal = 15;
fonts = {
serif = {
package = pkgs.meslo-lgs-nf;
name = "MesloLGS NF";
};
sansSerif = {
package = pkgs.meslo-lgs-nf;
name = "MesloLGS NF";
};
monospace = {
package = pkgs.ibm-plex;
name = "IBM Plex Mono";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
cursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 20;
};
};
}

BIN
common/style/wallpaper.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

View file

@ -0,0 +1,18 @@
{
config,
pkgs,
user,
...
}: {
environment.systemPackages = with pkgs; [
argocd # Declarative, GitOps continuous delivery tool for Kubernetes.
k3d # Lightweight utility to run Kubernetes clusters using Docker.
k9s # Kubernetes CLI to visually navigate and manage resources in clusters.
kind # Kubernetes IN Docker: Tool for running local Kubernetes clusters using Docker container nodes.
kubectl # Kubernetes command-line tool for interacting with clusters.
kubectx # Switch between Kubernetes contexts and namespaces with ease.
kubernetes-helm # Package manager for Kubernetes applications, simplifying deployment and management.
minikube # Local Kubernetes cluster for easy testing and development.
stern # Multi-container log tailing and streaming for Kubernetes.
];
}

View file

@ -0,0 +1,11 @@
{
config,
pkgs,
user,
...
}: {
boot.kernelModules = ["kvm-amd"];
environment.systemPackages = with pkgs; [virt-manager];
virtualisation.libvirtd.enable = true;
users.extraGroups.libvirtd.members = ["${user}"];
}

View file

@ -0,0 +1,21 @@
{pkgs, ...}: {
virtualisation = {
podman = {
enable = true;
# Create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true;
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
};
};
environment.systemPackages = with pkgs; [
buildah # Tool for building OCI (Open Container Initiative) and Docker container images.
distrobox # Lightweight utility for running Linux distributions in containers.
dive # A tool for exploring a Docker image, allowing inspection of layer contents.
grype # A vulnerability scanner for container images and filesystems.
podman-compose # Podman plugin for managing multi-container applications.
];
}