Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*out
*logs
*actions
*notifications
*tools
plugins
user_trunk.yaml
user.yaml
tmp
2 changes: 2 additions & 0 deletions .trunk/configs/.markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Prettier friendly markdownlint config (all formatting rules disabled)
extends: markdownlint/style/prettier
23 changes: 23 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file controls the behavior of Trunk: https://docs.trunk.io/cli
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
version: 0.1
cli:
version: 1.22.0
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
plugins:
sources:
- id: trunk
ref: v1.5.0
uri: https://github.com/trunk-io/plugins
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
runtimes:
enabled:
- node@18.12.1
- python@3.10.8
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
lint:
enabled:
- git-diff-check
- markdownlint@0.39.0
- prettier@3.2.5
- trufflehog@3.74.0
308 changes: 308 additions & 0 deletions t14/configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,308 @@
# 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’).

# sudo nixos-rebuild switch
# nix-shell -p vim

{ config, pkgs, ... }:

# https://nixos.wiki/wiki/FAQ#How_can_I_install_a_package_from_unstable_while_remaining_on_the_stable_channel.3F

{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
<home-manager/nixos>
];

# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

# https://nixos.wiki/wiki/Networking
networking.hostName = "t14"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.

# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";

# Enable networking
networking.networkmanager.enable = true;

networking.hosts = {
"172.16.50.216" = ["hp0"];
"172.16.40.35" = ["hp1"];
"172.16.40.71" = ["hp2"];
};

# Set your time zone.
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";
};

# 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;

# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.das = {
isNormalUser = true;
description = "das";
extraGroups = [ "wheel" "networkmanager" "libvirtd" ];
packages = with pkgs; [
];
# https://nixos.wiki/wiki/SSH_public_key_authentication
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGMCFUMSCFJX95eLfm7P9r72NBp9I1FiXwNwJ+x/HGPV das@t"
];
};

# https://nix-community.github.io/home-manager/index.xhtml#ch-installation
users.users.eve.isNormalUser = true;
home-manager.users.das = { pkgs, ... }: {
home.packages = with pkgs; [
# terminals
gnome.gnome-terminal
alacritty
#warp-terminal
#
tmux
screen
#
perl
python3
#
gawk
jq
git
htop
minicom
#
firefox
brave
google-chrome
slack
#
meld
gedit
trunk-io
flameshot
#
iproute2
vlan
tcpdump
wireshark
flent
iperf2
bpftools
#
gnuradio
#
vlc
# go
# https://nixos.wiki/wiki/Go
# https://nixos.org/manual/nixpkgs/stable/#sec-language-go
# https://nixos.wiki/wiki/FAQ#How_can_I_install_a_package_from_unstable_while_remaining_on_the_stable_channel.3F
libcap
gcc
# thunderbird
go
# rust
# https://nixos.wiki/wiki/Rust
pkgs.cargo
pkgs.rustc
#
flutter
android-studio
android-tools
android-udev-rules
#
libreoffice-qt
hunspell
hunspellDicts.en_AU
#hunspellDicts.en_US
gnomeExtensions.system-monitor
];

# vscode
# https://nixos.wiki/wiki/Visual_Studio_Code
programs.vscode = {
enable = true;
package = pkgs.vscode;
extensions = with pkgs.vscode-extensions; [
bbenoist.nix
dart-code.dart-code
dart-code.flutter
golang.go
hashicorp.terraform
#k6.k6
ms-azuretools.vscode-docker
ms-vscode-remote.remote-containers
ms-vscode-remote.remote-ssh
#ms-vscode-remote.remote-ssh-edit
ms-vscode.cmake-tools
ms-vscode.cpptools
#ms-vscode.cpptools-extension-pack
#ms-vscode.cpptools-themes
ms-vscode.hexeditor
ms-vscode.makefile-tools
ms-python.python
ms-python.vscode-pylance
#ms-vscode.remote-explorer
#ms-vscode.remote-repositories
#ms-vscode.remote-server
redhat.vscode-yaml
rust-lang.rust-analyzer
serayuzgur.crates
tamasfe.even-better-toml
timonwong.shellcheck
#trunk.io
zxh404.vscode-proto3
yzhang.markdown-all-in-one
#platformio.platformio-ide
github.copilot
# nix
#brettm12345.nixfmt.vscode
jnoortheen.nix-ide
#jeff-hykin.better-nix-syntax
];
};
programs.bash.enable = true;
home.stateVersion = "23.11";
# https://nixos.wiki/wiki/GNOME
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
};
};
programs.vim = {
enable = true;
plugins = with pkgs.vimPlugins; [ vim-airline ];
settings = { ignorecase = true; };
extraConfig = ''
set mouse=a
'';
};
#ldflags = [
# "-X main.Version=${version}"
# "-X main.Commit=${version}"
#];

programs.git = {
enable = true;
userEmail = "dave.seddon.ca@gmail.com";
userName = "randomizedcoder ";
#signing.key = "GPG-KEY-ID";
#signing.signByDefault = true;
};
nixpkgs.config.allowUnfree = true;
};

# Allow unfree packages
nixpkgs.config.allowUnfree = true;

# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
vim
curl
wget
tcpdump
iproute2
pciutils
];

# 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;
# };
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};

# List services that you want to enable:

# Enable the OpenSSH daemon.
# services.openssh.enable = true;
services.openssh.enable = true;


# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;

# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were 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.11"; # Did you read the comment?

virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
# services.qemuGuest.enable = true;

# https://wiki.nixos.org/wiki/Laptop

}
41 changes: 41 additions & 0 deletions t14/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -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 = [ "nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];

fileSystems."/" =
{ device = "/dev/disk/by-uuid/adb8ae55-949c-44b3-8abe-7584d2194c17";
fsType = "ext4";
};

fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/A1E4-3942";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};

swapDevices =
[ { device = "/dev/disk/by-uuid/1a243657-4913-4220-94da-7ef97d4c7966"; }
];

# 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.enp2s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;

nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}