Initial commit

This commit is contained in:
2025-05-14 14:20:22 -04:00
commit 8bff788dda
3 changed files with 403 additions and 0 deletions

239
configuration.nix Normal file
View File

@@ -0,0 +1,239 @@
# 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, lib, ... }:
let
home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/master.tar.gz;
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
(import "${home-manager}/nixos")
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Use latest stable kernel
boot.kernelPackages = pkgs.linuxPackages_latest;
# Allow power management
powerManagement.enable = true;
# Firmware updates
services.fwupd.enable = true;
# Enable networking
networking.networkmanager.enable = true;
# Enable Bluetooth
hardware.bluetooth.enable = true;
# Set your time zone.
time.timeZone = "America/New_York";
# 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 KDE Plasma Desktop Environment.
services.xserver.enable = true;
services.displayManager.sddm = {
wayland.enable = true;
enableHidpi = true;
};
services.desktopManager.plasma6.enable = true;
# Enable graphics acceleration and AMDVLK
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
amdvlk
];
extraPackages32 = with pkgs; [
driversi686Linux.amdvlk
];
};
# Configure keymap
console.keyMap = "jp106";
services.xserver.xkb = {
layout = "jp";
variant = "";
};
i18n.inputMethod = {
type = "fcitx5";
enable = true;
fcitx5.addons = with pkgs; [
fcitx5-mozc
kdePackages.fcitx5-qt
];
fcitx5.waylandFrontend = true;
};
# 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;
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Enable NUR
nixpkgs.config.packageOverrides = pkgs: {
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/main.tar.gz") {
inherit pkgs;
};
};
# Home Manager
home-manager.useGlobalPkgs = true;
home-manager.backupFileExtension = "backup";
# Define a user account. Don't forget to set a password with passwd.
users.users.chase = {
isNormalUser = true;
description = "Chase";
extraGroups = [ "networkmanager" "wheel" ];
};
home-manager.users.chase = { pkgs, ... }: {
imports = [
/home/chase/.config/home-manager/home.nix
];
# Original install
home.stateVersion = "24.11";
};
# Install firefox.
programs.firefox = {
enable = true;
nativeMessagingHosts.packages = [ pkgs.firefoxpwa ];
policies = {
DisableTelemetry = true;
DisableFirefoxAccounts = true;
DisableFirefoxStudies = true;
DisablePocket = true;
};
};
# Install Neovim
programs.neovim = {
enable = true;
configure = {
customRC = ''
set autoindent
set number relativenumber
set tabstop=4
colorscheme catppuccin-mocha
'';
packages.myVimPackage = with pkgs.vimPlugins; {
start = [ catppuccin-nvim ];
};
};
viAlias = true;
vimAlias = true;
};
# Install Steam
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
alacritty
audacity
bitwarden
emacs-pgtk
fastfetch
ffmpeg
firefoxpwa
gcc
gimp
git
ibm-plex
imagemagick
kdePackages.kdenlive
libreoffice
mpd
mpv
ncmpcpp
# nerd-fonts.blex-mono
nut
obs-studio
pciutils
python3
qemu
ranger
rustup
strawberry
texliveBasic
thunderbird
ungoogled-chromium
usbutils
wget
];
# ssh agent
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# List services that you want to enable:
services.fprintd.enable = true;
security.polkit.enable = 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;
# 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. Its 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 = "24.11"; # Did you read the comment?
}

View File

@@ -0,0 +1,52 @@
# 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")
];
### this machine ###
networking.hostName = "anzu";
### hardware config ###
# encrypted root
boot.initrd.luks.devices."luks-b03a8b46-6a1b-4855-9cf9-304d884f50ae".device = "/dev/disk/by-uuid/b03a8b46-6a1b-4855-9cf9-304d884f50ae";
# encrypted swap
boot.initrd.luks.devices."luks-9527937d-2d02-4feb-9a16-c9c417b33d0d".device = "/dev/disk/by-uuid/9527937d-2d02-4feb-9a16-c9c417b33d0d";
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/1518dbe1-8322-48d3-9fc9-cd0478ccbf43";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/1FCD-5A26";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/dd48a14e-2c90-465b-81a3-661d31ebf39f"; }
];
# 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;
}

112
home.nix Normal file
View File

@@ -0,0 +1,112 @@
{ config, pkgs, ... }:
{
home.username = "chase";
home.homeDirectory = "/home/chase";
# Enable NUR
# packageOverrides = pkgs: {
# nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/main.tar.gz") {
# inherit pkgs;
# };
# };
programs.alacritty = {
enable = true;
theme = "catppuccin_mocha";
};
programs.bash = {
enable = true;
shellAliases = {
ll = "ls -l";
".." = "cd ..";
};
};
programs.firefox = {
enable = true;
nativeMessagingHosts = [ pkgs.firefoxpwa ];
profiles = {
default = {
id = 0;
name = "default";
isDefault = true;
extensions = {
packages = with pkgs.nur.repos.rycee.firefox-addons; [
awesome-rss
betterttv
bitwarden
clearurls
control-panel-for-twitter
enhancer-for-youtube
facebook-container
flagfox
istilldontcareaboutcookies
privacy-badger
return-youtube-dislikes
search-by-image
sponsorblock
tab-session-manager
tampermonkey
ublock-origin
];
};
settings = {
"browser.formfill.enable" = false;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.feeds.snippets" = false;
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false;
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false;
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = false;
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.system.showSponsored" = false;
"browser.topsites.contile.enabled" = false;
"browser.urlbar.unitConversion.enabled" = true;
"extensions.pocket.enabled" = false;
"widget.use-xdg-desktop-portal.file-picker" = 1;
"signon.rememberSignons" = false;
};
search = {
force = true;
default = "SearX";
order = [ "SearX" "google" ];
engines = {
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"SearX" = {
urls = [{ template = "https://searx.traphouse.cathoderaytube.net/?q={searchTerms}"; }];
definedAliases = [ "@searx" ];
};
"bing".metaData.hidden = true;
};
};
};
};
};
programs.git = {
enable = true;
userName = "chase";
userEmail = "chase@cathoderaytube.net";
extraConfig = {
init.defaultBranch = "main";
};
};
home.packages = with pkgs; [
runelite
];
}