added host: lolcathost

This commit is contained in:
Emile Clark-Boman 2024-11-07 17:37:15 +10:00
parent 2a0373dc73
commit be6926fb0f
24 changed files with 1176 additions and 1090 deletions

315
hosts/lolcathost/default.nix Normal file → Executable file
View file

@ -1,32 +1,44 @@
{
{
pkgs,
inputs,
...
}: {
...
}: let
home-manager = builtins.fetchTarball {
url = "https://github.com/nix-community/home-manager/archive/master.tar.gz";
sha256 = "19w63qccz78v0spx03911z98w1bvlxvd07hb0ma14a4vdzi4ninj";
};
in {
imports = [
./hardware-configuration.nix
./hardware-configuration.nix
(import "${home-manager}/nixos")
inputs.spicetify-nix.nixosModules.default
];
programs.spicetify = let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
in {
enable = true;
enabledExtensions = with spicePkgs.extensions; [
adblock
hidePodcasts
shuffle # shuffle+ (special characters are sanitized out of extension names)
];
#theme = spicePkgs.themes.catppuccin;
#colorScheme = "mocha";
};
# Use the systemd-boot EFI boot loader.
# TODO: use GRUB2 instead
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
#boot.loader = {
# efi = {
# canTouchEfiVariables = true;
# efiSysMountPoint = "/boot/efi";
# };
# grub = {
# efiSupport = true;
# #efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work on this system
# device = "nodev";
# };
#};
networking.hostName = "myputer";
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
boot.loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
grub = {
efiSupport = true;
#efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work on this system
device = "nodev";
};
};
# Set your time zone.
time.timeZone = "Australia/Brisbane";
@ -36,33 +48,218 @@
console = {
font = "Lat2-Terminus16";
keyMap = "us";
#useXkbConfig = true; # use xkb.options in tty.
};
# Enable sound.
#services.pipewire = {
# enable = true;
# pulse.enable = true;
#};
# ----- NETWORKING SECTION -----
networking.hostName = "lolcathost";
networking.networkmanager.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.libinput.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.emile = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [
#firefox
tree
# ----- SERVICES -----
services = {
# Set display manager (login screen)
#displayManager = {
# sddm = {
# enable = true;
# #theme = "${import ./sddm-theme.nix { inherit pkgs; }}";
# wayland.enable = true; # enable experimental sddm support for wayland
# };
# defaultSession = "hyprland";
#};
# Enable sound
# TODO: use the modules/core/pipewire.nix module instead :)
pipewire = {
enable = true;
pulse.enable = true;
};
# Enable touchpad support
libinput.enable = true;
};
# allow wheel group to use passwordless sudo
users = {
# using fish as the login shell tends
# to go very poorly because it isn't
# POSIX compliant, so we'll just use
# simple Bash then :)
defaultUserShell = pkgs.bash;
users = {
# just me fr (personal account)
me = {
isNormalUser = true;
extraGroups = ["wheel"];
shell = pkgs.bash; #pkgs.fish
packages = with pkgs; [
firefox
nitch
starfetch
tldr
];
};
# programming/development account
dev = {
isNormalUser = true;
extraGroups = ["wheel"];
shell = pkgs.bash; #pkgs.zsh
packages = with pkgs; [
];
};
# user for my professional jobs and stuff
ae = {
isNormalUser = true;
extraGroups = ["wheel"];
shell = pkgs.bash; #pkgs.fish
packages = with pkgs; [
];
};
};
};
home-manager = {
users.me = import ../../homes/me;
sharedModules = [
#inputs.nixcord.homeManagerModules.nixcord
#inputs.nixvim.homeManagerModules.nixvim
];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
# ---- SYSTEM PACKAGES -----
environment.systemPackages = with pkgs; [
vim
# User Environment
inputs.swww.packages.${pkgs.system}.swww
#vesktop
helvum
easyeffects
ani-cli
wl-clipboard # clipboard for wayland
python311 # I use 3.11 since it's in a pretty stable state now
poetry # python dependency management and packaging
# fish plugins
grc # colorise command outputs
httpie
curlie
zoxide
doggo
# Pretty necessary
git
brightnessctl
acpi
# Unix Commands
wget
tree
];
# Enable the use of certain programs
programs = {
hyprland = {
enable = true;
# set the flake package
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
# make sure to also set the portal package, so that they are in sync
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
xwayland.enable = true;
#systemd.enable = true;
};
zsh.enable = true;
fish.enable = true;
neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
configure = {
customRC = ''
set number
set tabstop=4
set shiftwidth=4
set mouse=a
'';
};
};
# I want to use fish as my login shell but it always goes terrible
# cause it isn't POSIX compliant, so instead Bash is my login and
# will just exec fish (^-^)
bash = {
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
};
# ----- FONTS -----
fonts = {
enableDefaultPackages = true; # no clue what this line does tbh
packages = with pkgs; [
(nerdfonts.override {
fonts = [
"Cousine" # its already i guess
"Iosevka" # nah nah
"IosevkaTerm" # big nah
"CascadiaCode" # potential
"FiraCode" # potential
"JetBrainsMono" # for my rofi theme
"Hasklig"
"Hack"
];
})
# texlive maintains a noto-emoji flake
texlivePackages.noto-emoji
];
fontconfig = {
defaultFonts = {
serif = ["Iosevka"]; # TODO: package Iosevka Etoile since Iosevka isn't a serif font
sansSerif = ["Iosevka "];
monospace = ["Cousine"];
emoji = ["Noto Emoji"];
};
};
};
# ----- STYLIX -----
#stylix = {
# enable = true;
# image = pkgs.fetchurl {
# url = "https://www.pixelstalk.net/wp-content/uploads/2016/05/Epic-Anime-Awesome-Wallpapers.jpg";
# sha256 = "enQo3wqhgf0FEPHj2coOCvo7DuZv+x5rL/WIo4qPI50=";
# };
#
# # Stylix will automatically theme applications
# #autoEnable = true;
# #image = ../../wallpapers/wall.png;
# #image = "/home/me/nixdots/wallpapers/ghibli-esque-valley.png";
#};
# Enable the new CLI commands and the flakes as experimental features
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Some programs need SUID wrappers, can be configured further or are
@ -73,40 +270,14 @@
# enableSSHSupport = true;
# };
# List services that you want to enable:
# 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;
# Enable OpenGL
hardware = {
graphics.enable = true;
};
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
# DO NOT MODIFY
system.stateVersion = "24.05"; # Did you read the comment?
}

41
hosts/lolcathost/hardware-configuration.nix Normal file → Executable file
View file

@ -1 +1,40 @@
# TODO: (i haven't put NixOS on lolcathost yet)
# 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" "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/4bf649ce-047b-472d-b392-4c2c326362d9";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D97A-5260";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/bfa29193-4f83-46c3-bcb7-0d2b8323b6e0"; }
];
# 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.wlp2s0f4u1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}