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QXAWXBQC
56ZOC57Z47IQIUS67COAGYXGVXKUR2A5EY64DQNVTX6QVR2ZTCFAC
XMPLJZI5GXGVQMOLEONVRKCIU2SP5US6CFSLXTUAE6M6TMI2EBGAC
2YF2MZEDFEH3GYCKPWWHNBND4Q5AAGYIPMH5BMDYMG7734Z6EQYQC
WJXAODNJYL54BUFSRF3G2AEBWEI6Q4YH5DXYLK3UYC6JRJYGG7TQC
3OAFCHK7EIRUD3ZLAGZ3MAXVYOGFAJVDOF63ZIGNU7I3RWIPMAOQC
CFI7PYHAKVZXDJBAJNV33ZQ6O257SQ3WS36MSQPUZMBYNSPCNNRQC
font.normal.family = "SourceCodePro";
font.bold.family = "SourceCodePro";
font.italic.family = "SourceCodePro";
font.bold_italic.family = "SourceCodePro";
# font.normal.family = "SourceCodePro";
# font.bold.family = "SourceCodePro";
# font.italic.family = "SourceCodePro";
# font.bold_italic.family = "SourceCodePro";
{
pkgs,
nix-doom-emacs-module,
sli-repo,
...
}: let
username = "chris";
homeDirectory = "/home/${username}";
sure = import ../../sure {inherit pkgs sli-repo;};
in {
users.users = {
"${username}" = {
isNormalUser = true;
extraGroups = [
"docker"
"networkmanager"
"wheel"
];
shell = pkgs.zsh;
};
};
home-manager.users."${username}" = {pkgs, ...}: {
home = {
inherit username homeDirectory;
stateVersion = "22.11";
};
programs.git = {
userName = "Chris Cummings";
userEmail = "chris.cummings@sureapp.com";
};
imports = [
../../emacs
../../git
../../firefox
../../neovim
../../shell
../../terminal_emulator
../../tmux
../../linux_desktop
nix-doom-emacs-module
sure
];
programs.git.extraConfig.commit.gpgsign = false; # TODO move gpg key over and use
xdg.systemDirs.data = [
"/usr/share"
"/var/lib/flatpak/exports/share"
"${homeDirectory}/.local/share/flatpak/exports/share"
];
};
programs.gnupg.agent.enable = true;
programs.gnupg.agent.pinentryFlavor = "gnome3";
}
{_, ...}: {
programs.ssh.extraConfig = ''
Host eu.nixbuild.net
PubkeyAcceptedKeyTypes ssh-ed25519
IdentityFile /etc/ssh/ssh_host_ed25519_key
'';
programs.ssh.knownHosts = {
nixbuild = {
hostNames = ["eu.nixbuild.net"];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM";
};
};
nix = {
distributedBuilds = true;
buildMachines = [
{
hostName = "eu.nixbuild.net";
system = "aarch64-linux";
maxJobs = 100;
supportedFeatures = ["benchmark" "big-parallel"];
}
# {
# hostName = "taz";
# system = "x86_64-linux";
# maxJobs = 4;
# }
];
};
}
users.users.chris.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGaGrbXoVGe5fXpOhG6+pUZw+aYANuiDPvoI82jftpPd chris@thesogu.com" # chris-thelio
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPflVyCskMX25z8S3pQLyGbo67zBQyC+eMbCkksRw4o/ chris@thesogu.com" # chris-xps
];
{
lib,
sshKeys,
...
}: {
users.users.chris.openssh.authorizedKeys.keys = lib.attrValues sshKeys.usesRemoteBuilders;
}
# 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 = [];
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "nvme" "usbhid" "sr_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/d479462f-5abf-49c1-ac44-47eee1814b82";
fsType = "ext4";
};
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/B135-5473";
fsType = "vfat";
};
swapDevices = [
{device = "/dev/disk/by-uuid/2a9dfb61-826d-47f6-ad76-7968ac6aa02a";}
];
# 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.ens160.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{
config,
pkgs,
...
}: {
imports = [
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
networking.hostName = "gnome-work-vm"; # Define your hostname.
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Chicago";
# 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";
};
# 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 = {
layout = "us";
xkbVariant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# 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;
};
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
# Enable automatic login for the user.
services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "chris";
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
git
vim
keepassxc
git-credential-keepassxc
gnomeExtensions.pop-shell
gnomeExtensions.pop-launcher-super-key
gnome.gnome-tweaks
];
system.stateVersion = "22.11";
virtualisation.vmware.guest.enable = false;
services.flatpak.enable = true;
}
with flake-utils.lib;
eachSystem
[system.x86_64-linux system.aarch64-linux]
(sys: let
overlays = builtins.attrValues overlays;
pkgs = nixpkgs.legacyPackages.${sys};
in {
packages = rec {
hello = pkgs.writeShellApplication {
name = "helloDotfiles";
runtimeInputs = [pkgs.coreutils];
text = ''
printf "\n\n"
echo 👋👋 hello from ~averagechris/dotfiles
echo have a nice day 😎
printf "\n\n"
'';
};
default = hello;
flake-utils.lib.eachDefaultSystem (sys: let
overlays = builtins.attrValues overlays;
pkgs = nixpkgs.legacyPackages.${sys};
in {
packages = rec {
hello = pkgs.writeShellApplication {
name = "helloDotfiles";
runtimeInputs = [pkgs.coreutils];
text = ''
printf "\n\n"
echo 👋👋 hello from ~averagechris/dotfiles
echo have a nice day 😎
printf "\n\n"
'';
checks =
{
pre-commit = pre-commit-hooks.lib.${sys}.run {
src = ./.;
hooks = {
alejandra.enable = true;
statix.enable = true;
shellcheck.enable = true;
markdown-formatter = {
enable = true;
name = "markdown-formatter";
types = ["markdown"];
language = "system";
pass_filenames = true;
entry = with pkgs.python310Packages; "${mdformat}/bin/mdformat";
};
markdown-linter = {
enable = true;
name = "markdown-linter";
types = ["markdown"];
language = "system";
pass_filenames = true;
entry = with pkgs; "${mdl}/bin/mdl -g";
};
checks =
{
pre-commit = pre-commit-hooks.lib.${sys}.run {
src = ./.;
hooks = {
alejandra.enable = true;
statix.enable = true;
shellcheck.enable = true;
markdown-formatter = {
enable = true;
name = "markdown-formatter";
types = ["markdown"];
language = "system";
pass_filenames = true;
entry = with pkgs.python311Packages; "${mdformat}/bin/mdformat";
};
markdown-linter = {
enable = true;
name = "markdown-linter";
types = ["markdown"];
language = "system";
pass_filenames = true;
entry = with pkgs; "${mdl}/bin/mdl -g";
};
}
// (
if sys == systemKinds.x86_64-linux
then {
# these checks take ~4GB of memory right now to run
# since nix flake check loads all of outputs.nixosConfigurations
# into memory at once 😢
thelio-nixos = self.outputs.nixosConfigurations.thelio-nixos.config.system.build.toplevel;
xps-nixos = self.outputs.nixosConfigurations.xps-nixos.config.system.build.toplevel;
tootsie = self.outputs.nixosConfigurations.tootsie.config.system.build.toplevel;
taz = self.outputs.nixosConfigurations.taz.config.system.build.toplevel;
tom = self.outputs.nixosConfigurations.tom.config.system.build.toplevel;
// (
if sys == system.x86_64-linux
then {
# these checks take ~4GB of memory right now to run
# since nix flake check loads all of outputs.nixosConfigurations
# into memory at once 😢
thelio-nixos = self.outputs.nixosConfigurations.thelio-nixos.config.system.build.toplevel;
xps-nixos = self.outputs.nixosConfigurations.xps-nixos.config.system.build.toplevel;
tootsie = self.outputs.nixosConfigurations.tootsie.config.system.build.toplevel;
taz = self.outputs.nixosConfigurations.taz.config.system.build.toplevel;
tom = self.outputs.nixosConfigurations.tom.config.system.build.toplevel;
}
else {}
)
// (builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib).${sys};
else {}
)
// (builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib).${sys};
devShells = {
default = pkgs.mkShell {
shellHook =
self.checks.${sys}.pre-commit.shellHook
+ ''
helloDotfiles
'';
buildInputs = with pkgs; [
alejandra
cachix
self.outputs.packages.${sys}.hello
mdl
statix
python311Packages.mdformat
];
};
devShells = {
default = pkgs.mkShell {
shellHook =
self.checks.${sys}.pre-commit.shellHook
+ ''
helloDotfiles
'';
buildInputs = with pkgs; [
alejandra
cachix
self.outputs.packages.${sys}.hello
mdl
statix
python311Packages.mdformat
];
formatter = pkgs.alejandra;
})
// rec {
inherit (specialArgs) overlays;
nixosConfigurations = {
thelio-nixos = nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = system.x86_64-linux;
modules = [
./nixpkgs/nixos/thelio
nixos-hardware.nixosModules.system76
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/desktop_common.nix
./nixpkgs/nixos/graphical.nix
./nixpkgs/nixos/greetd.nix
./nixpkgs/nixos/networking.nix
./nixpkgs/nixos/docker.nix
./nixpkgs/nixos/sound.nix
./nixpkgs/nixos/tailscale.nix
./nixpkgs/nixos/users/chris.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
agenix.nixosModules.default
];
};
};
xps-nixos = nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = system.x86_64-linux;
modules = [
./nixpkgs/nixos/xps
nixos-hardware.nixosModules.system76
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/desktop_common.nix
./nixpkgs/nixos/docker.nix
./nixpkgs/nixos/graphical.nix
./nixpkgs/nixos/greetd.nix
./nixpkgs/nixos/networking.nix
./nixpkgs/nixos/sound.nix
./nixpkgs/nixos/tailscale.nix
./nixpkgs/nixos/users/chris.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
agenix.nixosModules.default
];
};
formatter = pkgs.alejandra;
})
// rec {
inherit (specialArgs) overlays;
nixosConfigurations = {
gnome-work-vm = nixpkgs.lib.nixosSystem {
system = systemKinds.aarrch64-linux;
inherit specialArgs;
modules = [
./nixpkgs/nixos/gnome-work-vm/configuration.nix
./nixpkgs/nixos/users/gnome-work-vm-chris.nix
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/docker.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
];
};
thelio-nixos = nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = systemKinds.x86_64-linux;
modules = [
./nixpkgs/nixos/thelio
nixos-hardware.nixosModules.system76
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/desktop_common.nix
./nixpkgs/nixos/graphical.nix
./nixpkgs/nixos/greetd.nix
./nixpkgs/nixos/networking.nix
./nixpkgs/nixos/docker.nix
./nixpkgs/nixos/sound.nix
./nixpkgs/nixos/tailscale.nix
./nixpkgs/nixos/users/chris.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
agenix.nixosModules.default
./nixpkgs/nixos/use_remote_builds.nix
];
};
tootsie = nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = system.x86_64-linux;
modules = [
./nixpkgs/nixos/tootsie
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/networking.nix
./nixpkgs/nixos/tailscale.nix
./nixpkgs/nixos/users/chris-minimal.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
];
};
xps-nixos = nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = systemKinds.x86_64-linux;
modules = [
./nixpkgs/nixos/xps
nixos-hardware.nixosModules.system76
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/desktop_common.nix
./nixpkgs/nixos/docker.nix
./nixpkgs/nixos/graphical.nix
./nixpkgs/nixos/greetd.nix
./nixpkgs/nixos/networking.nix
./nixpkgs/nixos/sound.nix
./nixpkgs/nixos/tailscale.nix
./nixpkgs/nixos/users/chris.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
agenix.nixosModules.default
];
};
taz = nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = system.x86_64-linux;
modules = [
./nixpkgs/nixos/taz
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/searx.nix
./nixpkgs/nixos/tailscale.nix
./nixpkgs/nixos/users/chris-minimal.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
];
};
tootsie = nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = systemKinds.x86_64-linux;
modules = [
./nixpkgs/nixos/tootsie
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/networking.nix
./nixpkgs/nixos/tailscale.nix
./nixpkgs/nixos/users/chris-minimal.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
];
};
tom = nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = system.x86_64-linux;
modules = [
nixos-hardware.nixosModules.system76
./nixpkgs/nixos/tom
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/tailscale.nix
./nixpkgs/nixos/users/chris-minimal.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
./nixpkgs/nixos/home-assistant
];
};
taz = nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = systemKinds.x86_64-linux;
modules = [
./nixpkgs/nixos/taz
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/searx.nix
./nixpkgs/nixos/tailscale.nix
./nixpkgs/nixos/users/chris-minimal.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
./nixpkgs/nixos/is_remote_builder.nix
];
darwinConfigurations.suremac = darwin.lib.darwinSystem {
system = system.aarch64-darwin;
modules = [./nixpkgs/darwin/suremac];
tom = nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = systemKinds.x86_64-linux;
modules = [
nixos-hardware.nixosModules.system76
./nixpkgs/nixos/tom
./nixpkgs/nixos/common.nix
./nixpkgs/nixos/tailscale.nix
./nixpkgs/nixos/users/chris-minimal.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
./nixpkgs/nixos/home-assistant
];
deploy.nodes = {
tom = {
hostname = "tom";
profiles.system = {
sshOpts = ["-t"];
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.tom;
sshUser = "chris";
fastConnection = true;
magicRollback = false;
autoRollback = false;
};
darwinConfigurations.suremac = darwin.lib.darwinSystem {
system = systemKinds.aarch64-darwin;
modules = [./nixpkgs/darwin/suremac];
};
deploy.nodes = {
tom = {
hostname = "tom";
profiles.system = {
sshOpts = ["-t"];
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.tom;
sshUser = "chris";
fastConnection = true;
magicRollback = false;
autoRollback = false;
taz = {
hostname = "taz";
profiles.system = {
sshOpts = ["-t"];
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.taz;
sshUser = "chris";
fastConnection = true;
magicRollback = false;
autoRollback = false;
};
};
taz = {
hostname = "taz";
profiles.system = {
sshOpts = ["-t"];
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.taz;
sshUser = "chris";
fastConnection = true;
magicRollback = false;
autoRollback = false;
tootsie = {
hostname = "tootsie";
profiles.system = {
sshOpts = ["-t"];
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.tootsie;
sshUser = "chris";
fastConnection = true;
magicRollback = false;
autoRollback = false;
};
};
tootsie = {
hostname = "tootsie";
profiles.system = {
sshOpts = ["-t"];
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.tootsie;
sshUser = "chris";
fastConnection = true;
magicRollback = false;
autoRollback = false;