2023-09-17 20:38:47 +00:00
|
|
|
|
{ config
|
|
|
|
|
, pkgs
|
|
|
|
|
, ...
|
|
|
|
|
}: {
|
|
|
|
|
|
2023-06-13 08:23:55 +00:00
|
|
|
|
imports = [
|
2023-09-17 20:38:47 +00:00
|
|
|
|
./hardware-configuration.nix # Include the results of the hardware scan.
|
2023-06-13 08:23:55 +00:00
|
|
|
|
<home-manager/nixos>
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
|
# Bootloader.
|
|
|
|
|
loader = {
|
|
|
|
|
grub = {
|
|
|
|
|
enable = true;
|
|
|
|
|
device = "/dev/sda";
|
|
|
|
|
};
|
|
|
|
|
#grub
|
|
|
|
|
};
|
|
|
|
|
kernelModules = [ "i2c-dev" "i2c-piix4" ];
|
2024-01-24 18:16:52 +00:00
|
|
|
|
extraModulePackages = [
|
|
|
|
|
# config.boot.kernelPackages.v4l2loopback
|
|
|
|
|
];
|
2023-06-13 08:23:55 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
|
2023-06-13 08:23:55 +00:00
|
|
|
|
networking = {
|
|
|
|
|
hostName = "nixos";
|
|
|
|
|
networkmanager.enable = true;
|
|
|
|
|
firewall.enable = false;
|
|
|
|
|
};
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "America/Chicago";
|
|
|
|
|
|
|
|
|
|
# Select internationalisation properties.
|
|
|
|
|
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";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services = {
|
2024-01-24 18:16:52 +00:00
|
|
|
|
gvfs.enable = true;
|
|
|
|
|
|
2023-06-13 08:23:55 +00:00
|
|
|
|
# Enable rgb controller
|
|
|
|
|
hardware.openrgb.enable = true;
|
|
|
|
|
# Enable CUPS to print documents.
|
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
printing.enable = true;
|
|
|
|
|
# I have a hp envy 4510
|
|
|
|
|
printing.drivers = [ pkgs.hplip ];
|
2023-06-13 08:23:55 +00:00
|
|
|
|
# Enable sound with pipewire.
|
|
|
|
|
pipewire = {
|
|
|
|
|
enable = true;
|
|
|
|
|
alsa.enable = true;
|
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
|
pulse.enable = true;
|
|
|
|
|
# If you want to use JACK applications, uncomment this
|
|
|
|
|
#jack.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Enable the X11 windowing system.
|
|
|
|
|
xserver = {
|
|
|
|
|
enable = true;
|
|
|
|
|
desktopManager.cinnamon.enable = true;
|
|
|
|
|
# desktopManager.xfce.enable = true;
|
|
|
|
|
|
|
|
|
|
videoDrivers = [ "nvidia" ];
|
|
|
|
|
|
|
|
|
|
# Enable touchpad support (enabled default in most desktopManager).
|
|
|
|
|
# libinput.enable = false;
|
|
|
|
|
|
|
|
|
|
# Configure keymap in X11
|
|
|
|
|
layout = "us";
|
|
|
|
|
xkbVariant = "";
|
|
|
|
|
|
|
|
|
|
# Auto log in
|
|
|
|
|
displayManager = {
|
|
|
|
|
lightdm.enable = true;
|
|
|
|
|
defaultSession = "cinnamon";
|
|
|
|
|
autoLogin = {
|
|
|
|
|
enable = true;
|
|
|
|
|
user = "able";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
hardware = {
|
|
|
|
|
bluetooth.enable = true;
|
2023-09-27 22:33:47 +00:00
|
|
|
|
keyboard.qmk.enable = true;
|
2023-06-13 08:23:55 +00:00
|
|
|
|
|
|
|
|
|
opengl.enable = true;
|
|
|
|
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
|
|
|
|
nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
2023-11-05 16:35:39 +00:00
|
|
|
|
# openrazer = {
|
|
|
|
|
# enable = true;
|
|
|
|
|
# users = [ "able" ];
|
|
|
|
|
# };
|
2023-06-13 08:23:55 +00:00
|
|
|
|
pulseaudio.enable = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
|
|
|
|
|
|
sound.enable = true;
|
2023-09-17 20:38:47 +00:00
|
|
|
|
programs.steam = {
|
|
|
|
|
enable = true;
|
|
|
|
|
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
|
|
|
|
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#----=[ Fonts ]=----#
|
|
|
|
|
fonts = {
|
2024-01-24 18:16:52 +00:00
|
|
|
|
enableDefaultPackages = true;
|
|
|
|
|
packages = with pkgs; [
|
2023-09-17 20:38:47 +00:00
|
|
|
|
noto-fonts
|
|
|
|
|
noto-fonts-cjk
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# fontconfig = {
|
|
|
|
|
# defaultFonts = { };
|
|
|
|
|
# };
|
|
|
|
|
};
|
|
|
|
|
|
2023-06-13 08:23:55 +00:00
|
|
|
|
users.users.able = {
|
|
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE8hxhhfB2zomqQLw/o3MaFxHIhE9cfmuW55npfwVtOJ able@nixos"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
description = "able";
|
2023-09-17 20:38:47 +00:00
|
|
|
|
extraGroups = [
|
|
|
|
|
"networkmanager"
|
|
|
|
|
"wheel"
|
|
|
|
|
"input"
|
2024-01-24 18:16:52 +00:00
|
|
|
|
"adbusers"
|
2023-09-17 20:38:47 +00:00
|
|
|
|
];
|
2023-06-13 08:23:55 +00:00
|
|
|
|
};
|
|
|
|
|
home-manager.users.able = { pkgs, ... }: {
|
2024-01-24 18:16:52 +00:00
|
|
|
|
nixpkgs.config = {
|
|
|
|
|
allowUnfree = true;
|
|
|
|
|
permittedInsecurePackages = [
|
|
|
|
|
# "electron-12.2.3"
|
|
|
|
|
"electron-19.1.9"
|
|
|
|
|
"electron-24.8.6"
|
|
|
|
|
];
|
|
|
|
|
};
|
2023-09-17 20:38:47 +00:00
|
|
|
|
|
2023-06-13 08:23:55 +00:00
|
|
|
|
|
|
|
|
|
# "https://rycee.gitlab.io/home-manager/options.html" # opt-dconf.settings
|
|
|
|
|
imports = [ ./dconf.nix ];
|
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
home = {
|
|
|
|
|
stateVersion = "22.11";
|
|
|
|
|
packages = with pkgs; [
|
|
|
|
|
# Used for sidequest
|
|
|
|
|
android-tools
|
|
|
|
|
adoptopenjdk-bin
|
|
|
|
|
appimage-run
|
2023-06-13 08:23:55 +00:00
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
bottles
|
2023-06-13 08:23:55 +00:00
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
cataclysm-dda
|
|
|
|
|
cinnamon.nemo
|
2023-06-13 09:19:23 +00:00
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
dconf2nix
|
|
|
|
|
discord
|
2023-06-13 08:23:55 +00:00
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
flameshot
|
|
|
|
|
firefox
|
2023-06-13 08:23:55 +00:00
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
gimp
|
|
|
|
|
grapejuice
|
2023-06-13 09:19:23 +00:00
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
gzdoom
|
|
|
|
|
enyo-launcher
|
|
|
|
|
etcher
|
|
|
|
|
keepassxc
|
|
|
|
|
nixfmt
|
2023-06-13 09:19:23 +00:00
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
prismlauncher
|
2023-06-13 08:23:55 +00:00
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
llvmPackages_16.clangUseLLVM
|
|
|
|
|
lutris
|
2023-06-13 08:23:55 +00:00
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
obs-studio
|
|
|
|
|
obsidian
|
|
|
|
|
openrgb
|
|
|
|
|
openmw
|
|
|
|
|
OVMFFull
|
2023-09-17 20:38:47 +00:00
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
qemu_full
|
|
|
|
|
rustup
|
2023-09-17 20:38:47 +00:00
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
shattered-pixel-dungeon
|
|
|
|
|
sidequest
|
|
|
|
|
steam
|
|
|
|
|
soundux
|
|
|
|
|
spotify
|
2023-09-17 20:38:47 +00:00
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
winePackages.full
|
|
|
|
|
unityhub
|
|
|
|
|
|
|
|
|
|
via
|
|
|
|
|
vintagestory
|
|
|
|
|
vtm # MonoTTY VTM
|
|
|
|
|
];
|
2023-06-13 08:23:55 +00:00
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
};
|
2023-06-13 08:23:55 +00:00
|
|
|
|
|
|
|
|
|
programs.bash = {
|
|
|
|
|
enable = true;
|
|
|
|
|
shellAliases = {
|
|
|
|
|
cinnaback = "dconf dump / | dconf2nix > dconf.nix";
|
2023-06-13 09:19:23 +00:00
|
|
|
|
rebuild = "sudo nixos-rebuild switch";
|
2023-06-13 08:23:55 +00:00
|
|
|
|
# Git commands
|
|
|
|
|
gcl = "git clone";
|
|
|
|
|
genpass = "strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 30 | tr -d '\n'; echo";
|
|
|
|
|
|
2023-09-17 20:38:47 +00:00
|
|
|
|
kilotime = "printf '%sK%sS\n' $(( $(($(date -d 'now' '+%s') - $(date -d 'today 00:00' '+%s'))) / 1000 )) $(( $(($(date -d 'now' '+%s') - $(date -d 'today 00:00' '+%s'))) % 1000 ))";
|
|
|
|
|
|
2023-06-13 08:23:55 +00:00
|
|
|
|
#################
|
|
|
|
|
# List Variants #
|
|
|
|
|
#################
|
|
|
|
|
la = "ls -a";
|
|
|
|
|
labc = "ls -lap --color";
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
initExtra = ''
|
|
|
|
|
up(){
|
|
|
|
|
local d=""
|
|
|
|
|
limit=$1
|
|
|
|
|
for ((i=1 ; i <= limit ; i++))
|
|
|
|
|
do
|
|
|
|
|
d=$d/..
|
|
|
|
|
done
|
|
|
|
|
d=$(echo $d | sed 's/^\///')
|
|
|
|
|
if [ -z "$d" ]; then
|
|
|
|
|
d=..
|
|
|
|
|
fi
|
|
|
|
|
cd $d
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
########
|
|
|
|
|
# ANSI #
|
|
|
|
|
########
|
|
|
|
|
RED="\[\e[0;38;5;196m\]"
|
|
|
|
|
GREEN="\[\e[0;92m\]"
|
|
|
|
|
BLUE="\[\e[0;38;5;51m\]"
|
|
|
|
|
GREY="\[\e[0;37m\]"
|
|
|
|
|
RESET="\[\e[0m\]"
|
|
|
|
|
|
|
|
|
|
#########
|
|
|
|
|
# PROMT #
|
|
|
|
|
#########
|
|
|
|
|
PROMPT="$RED~> $RESET"
|
|
|
|
|
LINE_ONE="[$GREEN\w$RESET]\n"
|
|
|
|
|
LINE_TWO="$GREEN\u$GREY@$BLUE\h $PROMPT"
|
|
|
|
|
PS1="$LINE_ONE$LINE_TWO"
|
|
|
|
|
PS2="$PROMPT"
|
|
|
|
|
|
2023-09-17 20:38:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-13 08:23:55 +00:00
|
|
|
|
#####################
|
|
|
|
|
# History managment #
|
|
|
|
|
#####################
|
|
|
|
|
# See: https://unix.stackexchange.com/questions/18212/bash-history-ignoredups-and-erasedups-setting-conflict-with-common-history
|
|
|
|
|
HISTCONTROL=ignoredboth:erasedups
|
|
|
|
|
shopt -s histappend
|
|
|
|
|
PROMPT_COMMAND="history -n; history -w; history -c; history -r; $PROMPT_COMMAND"
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
programs.vscode = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extensions = with pkgs.vscode-extensions; [
|
|
|
|
|
bbenoist.nix
|
|
|
|
|
b4dm4n.vscode-nixpkgs-fmt
|
|
|
|
|
eamodio.gitlens
|
|
|
|
|
mskelton.one-dark-theme
|
|
|
|
|
rust-lang.rust-analyzer
|
|
|
|
|
tamasfe.even-better-toml
|
|
|
|
|
mhutchie.git-graph
|
2023-09-27 22:33:47 +00:00
|
|
|
|
mattn.lisp
|
|
|
|
|
|
2023-06-13 08:23:55 +00:00
|
|
|
|
];
|
|
|
|
|
userSettings = {
|
2023-06-13 09:19:23 +00:00
|
|
|
|
rust-analyzer.check.command = "clippy";
|
|
|
|
|
files = {
|
|
|
|
|
autoSave = "off";
|
|
|
|
|
associations = {
|
|
|
|
|
"*.hbasm" = "asm-intel-x86-generic";
|
2023-09-27 22:33:47 +00:00
|
|
|
|
"*.ali" = "lisp";
|
2023-06-13 09:19:23 +00:00
|
|
|
|
};
|
2023-06-13 08:23:55 +00:00
|
|
|
|
};
|
2023-06-13 09:19:23 +00:00
|
|
|
|
|
2023-09-17 20:38:47 +00:00
|
|
|
|
"editor.minimap.enabled" = false;
|
2023-06-13 09:19:23 +00:00
|
|
|
|
|
|
|
|
|
"[nix]".editor.tabSize = 2;
|
|
|
|
|
|
2023-09-17 20:38:47 +00:00
|
|
|
|
git = {
|
|
|
|
|
autofetch = true;
|
|
|
|
|
enableSmartCommit = true;
|
|
|
|
|
};
|
2023-06-13 09:19:23 +00:00
|
|
|
|
gitlens.showWelcomeOnInstall = false;
|
|
|
|
|
|
|
|
|
|
explorer.confirmDelete = false;
|
|
|
|
|
|
|
|
|
|
editor = {
|
|
|
|
|
multiCursorModifier = "ctrlCmd";
|
|
|
|
|
formatOnSave = true;
|
|
|
|
|
formatOnPaste = true;
|
|
|
|
|
find.addExtraSpaceOnTop = false;
|
|
|
|
|
tokenColorCustomizations = {
|
|
|
|
|
textMateRules = [
|
|
|
|
|
{
|
|
|
|
|
name = "One Dark italic";
|
|
|
|
|
scope = [
|
|
|
|
|
"comment"
|
|
|
|
|
"entity.other.attribute-name"
|
|
|
|
|
"keyword"
|
|
|
|
|
"markup.underline.link"
|
|
|
|
|
"storage.modifier"
|
|
|
|
|
"storage.type"
|
|
|
|
|
"string.url"
|
|
|
|
|
"variable.language.super"
|
|
|
|
|
"variable.language.this"
|
|
|
|
|
];
|
|
|
|
|
settings = {
|
|
|
|
|
fontStyle = "italic";
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
name = "One Dark italic reset";
|
|
|
|
|
scope = [
|
|
|
|
|
"keyword.operator"
|
|
|
|
|
"keyword.other.type"
|
|
|
|
|
"storage.modifier.import"
|
|
|
|
|
"storage.modifier.package"
|
|
|
|
|
"storage.type.built-in"
|
|
|
|
|
"storage.type.function.arrow"
|
|
|
|
|
"storage.type.generic"
|
|
|
|
|
"storage.type.java"
|
|
|
|
|
"storage.type.primitive"
|
|
|
|
|
];
|
|
|
|
|
settings = {
|
|
|
|
|
fontStyle = "";
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
window.zoomLevel = 2;
|
|
|
|
|
workbench.colorTheme = "One Dark";
|
|
|
|
|
|
2023-06-13 08:23:55 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
programs.git = {
|
|
|
|
|
package = pkgs.gitAndTools.gitFull;
|
|
|
|
|
enable = true;
|
|
|
|
|
userName = "able";
|
|
|
|
|
userEmail = "abl3theabove@gmail.com";
|
2024-01-24 18:16:52 +00:00
|
|
|
|
lfs.enable = true;
|
2023-06-13 09:19:23 +00:00
|
|
|
|
signing = {
|
|
|
|
|
key = "";
|
|
|
|
|
signByDefault = false;
|
|
|
|
|
};
|
2023-06-13 08:23:55 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Allow unfree packages
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2024-01-24 18:16:52 +00:00
|
|
|
|
programs.adb.enable = true;
|
|
|
|
|
|
2023-06-13 08:23:55 +00:00
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
|
|
|
# $ nix search wget
|
2023-09-17 20:38:47 +00:00
|
|
|
|
services.udev.extraRules = ''
|
|
|
|
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="0416", ATTRS{idProduct}=="5020", MODE="0666"
|
2024-01-24 18:16:52 +00:00
|
|
|
|
SUBSYSTEM=="usb", ATTR{idVendor}=="2833", ATTR{idProduct}=="0186", MODE="0666"
|
2023-09-17 20:38:47 +00:00
|
|
|
|
KERNEL=="hidraw*", ATTRS{idVendor}=="0416", ATTRS{idProduct}=="5020", MODE="0666"
|
|
|
|
|
'';
|
|
|
|
|
|
2023-06-13 08:23:55 +00:00
|
|
|
|
|
|
|
|
|
xdg.mime.defaultApplications = {
|
|
|
|
|
"application/pdf" = "firefox.desktop";
|
|
|
|
|
"inode/directory" = [ "nemo.desktop" "code.desktop" ];
|
|
|
|
|
};
|
|
|
|
|
|
2024-01-24 18:16:52 +00:00
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
linuxKernel.packages.linux_6_1.v4l2loopback
|
|
|
|
|
cifs-utils
|
|
|
|
|
];
|
|
|
|
|
|
2023-10-04 09:52:32 +00:00
|
|
|
|
fileSystems."/home/able/Documents/media" = {
|
|
|
|
|
device = "//10.0.0.28/media/";
|
|
|
|
|
fsType = "cifs";
|
|
|
|
|
options =
|
|
|
|
|
let
|
|
|
|
|
# this line prevents hanging on network split
|
|
|
|
|
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
|
|
|
|
|
|
|
|
|
|
in
|
|
|
|
|
[
|
|
|
|
|
"${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"
|
|
|
|
|
];
|
|
|
|
|
};
|
2023-06-13 08:23:55 +00:00
|
|
|
|
# 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. 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).
|
2023-10-04 09:52:32 +00:00
|
|
|
|
system.stateVersion = "
|
|
|
|
|
22.11
|
|
|
|
|
"; # Did you read the comment?
|
2023-06-13 08:23:55 +00:00
|
|
|
|
}
|
2023-10-04 09:52:32 +00:00
|
|
|
|
|
|
|
|
|
|