2024-01-16 02:25:58 +00:00
|
|
|
|
{ config, pkgs, lib, common_dir, ... }:
|
2024-01-09 22:28:31 +00:00
|
|
|
|
|
2024-01-16 02:25:58 +00:00
|
|
|
|
{
|
2024-01-09 22:28:31 +00:00
|
|
|
|
imports = [
|
|
|
|
|
# Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
|
2024-01-10 23:06:59 +00:00
|
|
|
|
(common_dir + /options.nix)
|
|
|
|
|
|
|
|
|
|
(common_dir + /bootloader/systemd-boot.nix)
|
|
|
|
|
(common_dir + /users/users.nix)
|
2024-01-11 15:57:08 +00:00
|
|
|
|
(common_dir + /login-manager/tuigreet.nix)
|
2024-01-10 23:06:59 +00:00
|
|
|
|
(common_dir + /desktop/sway.nix)
|
2024-01-22 02:55:41 +00:00
|
|
|
|
(common_dir + /desktop/hyprland.nix)
|
2024-01-09 22:28:31 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Disable checking /home partition with fsck
|
|
|
|
|
# Arch has a newer version than Nix, so it throws an error, and fails to boot
|
|
|
|
|
fileSystems."/home" = {
|
|
|
|
|
noCheck = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-10 23:06:59 +00:00
|
|
|
|
# Kernel Param Configuration
|
2024-01-09 22:28:31 +00:00
|
|
|
|
|
|
|
|
|
boot.kernelParams = [ "quiet" "splash" ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Power Configuration
|
|
|
|
|
|
|
|
|
|
services.tlp = {
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Locale Configuration
|
|
|
|
|
|
|
|
|
|
i18n = {
|
|
|
|
|
defaultLocale = "en_US.UTF-8";
|
|
|
|
|
|
|
|
|
|
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";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Sound Configuration
|
|
|
|
|
|
|
|
|
|
sound.enable = true;
|
|
|
|
|
hardware.pulseaudio.enable = false;
|
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
|
|
|
|
|
|
services.pipewire = {
|
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
|
|
alsa = {
|
|
|
|
|
enable = true;
|
|
|
|
|
support32Bit = true;
|
|
|
|
|
};
|
|
|
|
|
pulse.enable = true;
|
|
|
|
|
# jack.enable = true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wireplumber.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Package Configuration
|
|
|
|
|
|
|
|
|
|
programs = {
|
|
|
|
|
zsh.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
environment.systemPackages = (with pkgs; [
|
2024-01-10 23:14:23 +00:00
|
|
|
|
neovim
|
2024-01-13 04:54:37 +00:00
|
|
|
|
nixd
|
2024-01-09 22:28:31 +00:00
|
|
|
|
git
|
2024-01-10 23:06:59 +00:00
|
|
|
|
curl
|
2024-01-09 22:28:31 +00:00
|
|
|
|
wget
|
|
|
|
|
kitty
|
|
|
|
|
lf
|
2024-01-10 23:06:59 +00:00
|
|
|
|
tmux
|
2024-01-09 22:28:31 +00:00
|
|
|
|
firefox
|
2024-01-27 06:06:43 +00:00
|
|
|
|
pulsemixer
|
2024-01-31 04:23:52 +00:00
|
|
|
|
gcc
|
2024-01-09 22:28:31 +00:00
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
environment.shells = with pkgs; [ bash zsh ];
|
|
|
|
|
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
2024-01-22 22:17:55 +00:00
|
|
|
|
# Fonts
|
|
|
|
|
|
|
|
|
|
fonts.packages = with pkgs; [
|
|
|
|
|
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
|
|
|
|
];
|
|
|
|
|
|
2024-01-09 22:28:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Networking Configuration
|
|
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
|
hostName = "nixos";
|
|
|
|
|
|
|
|
|
|
networkmanager = {
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
firewall = {
|
2024-01-22 00:57:07 +00:00
|
|
|
|
allowedTCPPorts = [
|
|
|
|
|
8080
|
|
|
|
|
];
|
|
|
|
|
|
2024-01-09 22:28:31 +00:00
|
|
|
|
allowedTCPPortRanges = [
|
|
|
|
|
# GSConnect
|
|
|
|
|
#{ from = 1714; to = 1764; }
|
|
|
|
|
];
|
|
|
|
|
allowedUDPPortRanges = [
|
|
|
|
|
# GSConnect
|
|
|
|
|
#{ from = 1714; to = 1764; }
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.avahi = {
|
|
|
|
|
enable = true;
|
2024-01-15 05:38:30 +00:00
|
|
|
|
nssmdns4 = true;
|
2024-01-09 22:28:31 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-01-16 02:25:58 +00:00
|
|
|
|
services.tailscale = {
|
|
|
|
|
enable = true;
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
extraUpFlags = [
|
|
|
|
|
"--login-server=https://scale.cam123.dev:443"
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2024-01-09 22:28:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Time Configuration
|
|
|
|
|
|
|
|
|
|
time.timeZone = "America/Denver";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# CUPS (Printing) Configuration
|
|
|
|
|
|
|
|
|
|
services.printing = {
|
|
|
|
|
enable = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# X11 Configuration
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
services.xserver = {
|
|
|
|
|
enable = false;
|
|
|
|
|
|
|
|
|
|
layout = "us";
|
|
|
|
|
libinput = {
|
|
|
|
|
touchpad = {
|
|
|
|
|
tapping = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
excludePackages = [ pkgs.xterm ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# User Configuration
|
|
|
|
|
|
|
|
|
|
user.cameron.enable = true;
|
2024-01-13 21:33:50 +00:00
|
|
|
|
# Default user settings overrides
|
|
|
|
|
users.users.cameron = {
|
|
|
|
|
home = lib.mkForce "/home/cameron-nix";
|
|
|
|
|
extraGroups = [ "dialout" ];
|
|
|
|
|
};
|
2024-01-09 22:28:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 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.05"; # Did you read the comment?
|
|
|
|
|
|
|
|
|
|
# system.autoUpgrade.enable = true;
|
|
|
|
|
# system.autoUpgrade.allowReboot = false;
|
|
|
|
|
}
|