This commit is contained in:
krizej 2024-08-01 21:44:59 +02:00
parent cf6119bd98
commit 1c7619f3b3
35 changed files with 1 additions and 1587 deletions

View file

@ -1,12 +0,0 @@
{ ... }:
{
imports = [
./documentation.nix
./networking.nix
./nix.nix
./sudo.nix
./system.nix
./theme.nix
./xdg.nix
];
}

View file

@ -1,24 +0,0 @@
{ pkgs, ... }:
{
documentation = {
enable = true;
dev.enable = true;
doc.enable = false;
info.enable = false;
man = {
enable = true;
generateCaches = false;
man-db.enable = false;
mandoc.enable = true;
};
};
home-manager.users.krizej.home.sessionVariables = {
# c docs first
"MANSECT" = "2:3:3p:3type:1:1p:n:l:8:0:0p:5:4:9:6:7";
};
environment.systemPackages = with pkgs; [
man
man-pages
man-pages-posix
];
}

View file

@ -1,5 +0,0 @@
{ ... }:
{
networking.hostName = "krizej-pc";
networking.networkmanager.enable = true;
}

View file

@ -1,24 +0,0 @@
args @ { pkgs, ... }:
{
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.permittedInsecurePackages = [
"freeimage-unstable-2021-11-01"
"openssl-1.1.1w"
];
home-manager.users.krizej.programs.home-manager.enable = true;
home-manager.users.krizej.home.packages = [
(pkgs.writeShellScriptBin "rebuild" ''
set -e
# hack: update autorandr stuffs
autorandr --match-edid --dry-run &> ~/nix/files/autorandr.txt
sudo nixos-rebuild switch --flake ~/nix --show-trace -v $@
'')
];
nixpkgs.overlays = import ../pkgs args;
nixpkgs.config.allowUnfree = true;
}

View file

@ -1,6 +0,0 @@
{ ... }:
{
security.sudo.extraConfig = ''
Defaults pwfeedback
'';
}

View file

@ -1,48 +0,0 @@
args @ { pkgs, ... }:
{
boot = {
loader = {
timeout = 2;
grub = {
enable = true;
device = "/dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_S4CNNE0M700172J";
gfxmodeBios = "auto"; # 1920x1080 did not work, this doesn't either
splashImage = null;
font = null;
};
};
# this doesn't even work
kernelParams = let
monitors = import ../utils/monitors.nix args;
in [
"video=${monitors.left}:1920x1080@240"
"video=${monitors.right}:1920x1080@75"
];
initrd.kernelModules = [ "amdgpu" ];
};
hardware.amdgpu.amdvlk.enable = true;
time.timeZone = "Europe/Warsaw";
hardware.pulseaudio.enable = true;
system.stateVersion = "23.11";
users.users.krizej = {
isNormalUser = true;
extraGroups = [ "wheel" "input" "dialout" ];
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.krizej = rec {
home.stateVersion = "23.11";
home.username = "krizej";
home.homeDirectory = "/home/krizej";
};
};
environment.localBinInPath = true;
environment.systemPackages = [ pkgs.ntfs3g ];
}

View file

@ -1,52 +0,0 @@
{ pkgs, config, ... }:
{
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
jetbrains-mono
];
fontconfig.defaultFonts = {
serif = [ "JetBrains Mono NL" ];
sansSerif = [ "JetBrains Mono NL" ];
monospace = [ "JetBrains Mono NL" ];
};
};
home-manager.users.krizej = {
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
name = "aero-drop";
package = pkgs.win7-cursors;
};
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
iconTheme = {
name = "Vimix-Black";
package = pkgs.vimix-icon-theme;
};
gtk2.configLocation = "${config.home-manager.users.krizej.xdg.configHome}/gtk-2.0/gtkrc";
};
qt = {
enable = true;
platformTheme.name = "adwaita";
style = {
name = "adwaita-dark";
package = pkgs.adwaita-qt;
};
};
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
home.sessionVariables = {
GTK_USE_PORTAL = "1";
};
};
}

View file

@ -1,85 +0,0 @@
{ config, lib, pkgs, ... }:
let
HOME = config.home-manager.users.krizej.home.homeDirectory;
XDG_DATA_HOME = "${HOME}/.local/share";
XDG_CONFIG_HOME = "${HOME}/.config";
XDG_STATE_HOME = "${HOME}/.local/state";
XDG_CACHE_HOME = "${HOME}/.cache";
in {
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
config.common.default = [ "*" ];
};
home-manager.users.krizej = {
home.packages = with pkgs; [
xdg-user-dirs
xdg-utils
];
home.sessionVariables = {
XDG_DATA_HOME = "${HOME}/.local/share";
XDG_CONFIG_HOME = "${HOME}/.config";
XDG_STATE_HOME = "${HOME}/.local/state";
XDG_CACHE_HOME = "${HOME}/.cache";
# xdg crap thx poz
ANDROID_USER_HOME = "${XDG_DATA_HOME}/android";
ANDROID_HOME = "${XDG_DATA_HOME}/android/sdk";
GRADLE_USER_HOME = "${XDG_DATA_HOME}/gradle";
PYTHONSTARTUP = "${XDG_CONFIG_HOME}/python/pythonrc";
HISTFILE = "${XDG_CACHE_HOME}/bash/history";
CARGO_HOME = "${XDG_DATA_HOME}/cargo";
_JAVA_OPTIONS = "-Djava.utils.prefs.userRoot=${XDG_CONFIG_HOME}/java";
GNUPGHOME = "${XDG_DATA_HOME}/gnupg";
WINEPREFIX = "${XDG_DATA_HOME}/wine";
RUSTUP_HOME = "${XDG_DATA_HOME}/rustup";
NUGET_PACKAGES = "${XDG_CACHE_HOME}/NuGetPackages";
FCEUX_HOME = "${XDG_CONFIG_HOME}/fceux";
DOTNET_CLI_HOME = "${XDG_CONFIG_HOME}/dotnet";
GTK2_RC_FILES = lib.mkForce "${XDG_CONFIG_HOME}/gtk-2.0/gtkrc";
};
xdg = {
dataHome = XDG_DATA_HOME;
configHome = XDG_CONFIG_HOME;
stateHome = XDG_STATE_HOME;
cacheHome = XDG_CACHE_HOME;
userDirs = {
enable = true;
desktop = "${HOME}/desktop";
documents = "${HOME}/documents";
download = "${HOME}/downloads";
music = "${HOME}/music";
pictures = "${HOME}/pictures";
publicShare = "${HOME}/public";
templates = "${HOME}/templates";
videos = "${HOME}/videos";
};
configFile = {
"python/pythonrc".text = ''
import os
import atexit
import readline
history = os.path.join(os.environ['XDG_CACHE_HOME'], 'python_history')
try:
readline.read_history_file(history)
except OSError:
pass
def write_history():
try:
readline.write_history_file(history)
except OSError:
pass
atexit.register(write_history)
'';
};
};
};
}

View file

@ -1,69 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
sassc,
meson,
ninja,
glib,
gnome-themes-extra,
gtk-engine-murrine,
inkscape,
cinnamon,
makeFontsConf,
python3,
}:
stdenv.mkDerivation rec {
pname = "arc-theme";
version = "i don't care";
src = fetchFromGitHub {
owner = "krizej";
repo = pname;
rev = "346bcf59a681ec039ee6bfb621d7af476913c2d9";
sha256 = "sha256-/ZS3w0h9/EfCEegqeUOhjOMJCNL5ft91GOvC0i1BiOk=";
};
nativeBuildInputs = [
meson
ninja
sassc
inkscape
glib # for glib-compile-resources
python3
];
propagatedUserEnvPkgs = [
gnome-themes-extra
gtk-engine-murrine
];
postPatch = ''
patchShebangs meson/install-file.py
'';
preBuild = ''
# Shut up inkscape's warnings about creating profile directory
export HOME="$TMPDIR"
'';
# Fontconfig error: Cannot load default config file: No such file: (null)
FONTCONFIG_FILE = makeFontsConf {fontDirectories = [];};
mesonFlags = [
"-Dthemes=gtk2,gtk3,gtk4"
"-Dvariants=dark"
#"-Dcinnamon_version=${cinnamon.cinnamon-common.version}"
#"-Dgnome_shell_version=${gnome.gnome-shell.version}"
# You will need to patch gdm to make use of this.
#"-Dgnome_shell_gresource=true"
];
meta = with lib; {
description = "Flat theme with transparent elements for GTK 3, GTK 2 and Gnome Shell";
homepage = "https://github.com/jnsh/arc-theme";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [simonvandel romildo];
};
}

View file

@ -1,33 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "darkcold-gtk-theme";
version = "v5.1.0";
src = fetchFromGitHub {
owner = "originalseed";
repo = "darkcold";
rev = "71f8fec1fbd62e1bf94fae839efea0acbcd30c0d";
hash = "sha256-Wk0TAGRUqAJn7PxyqKV3WnZXx2krEQKF/6KZ+R8ld+U=";
};
installPhase = ''
runHook preInstall
mkdir -p "$out/share/themes/darkcold/"
cp -r * "$out/share/themes/darkcold/";
cp userContent.css "$out/";
runHook postInstall
'';
meta = with lib; {
description = "DarkCold GTK2/3 + Firefox theme";
homepage = "https://github.com/${src.owner}/${src.repo}";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}

View file

@ -1,18 +1,10 @@
{ pkgs, ... }: with pkgs; [ { pkgs, ... }: with pkgs; [
(final: prevPkgs: { (final: prevPkgs: {
winvista-cursors = callPackage ./winvista-cursors.nix {};
win7-cursors = callPackage ./win7-cursors.nix {}; win7-cursors = callPackage ./win7-cursors.nix {};
winxp-cursors = callPackage ./winxp-cursors.nix {};
winxp-icons = callPackage ./winxp-icons.nix {};
oxylite-icon-theme = callPackage ./oxylite-icon-theme.nix {};
e17gtk-revolved = callPackage ./e17gtk-revolved.nix {};
darkcold-gtk-theme = callPackage ./darkcold-gtk-theme.nix {};
arc-mono-gtk-theme = callPackage ./arc-mono-gtk-theme.nix {};
vim-darcula-theme = callPackage ./vim-darcula-theme.nix {};
sddm-i3-theme = callPackage ./sddm-i3-theme.nix {}; sddm-i3-theme = callPackage ./sddm-i3-theme.nix {};
ericw-tools-latest = callPackage ./ericw-tools-latest.nix {}; ericw-tools-latest = callPackage ./ericw-tools-latest.nix {};
i3status = prevPkgs.i3status.overrideAttrs (_: { patches = [ ../files/i3status.patch ]; });
alacritty-sixel = callPackage ./alacritty-sixel.nix {}; alacritty-sixel = callPackage ./alacritty-sixel.nix {};
i3status = prevPkgs.i3status.overrideAttrs (_: { patches = [ ../files/i3status.patch ]; });
vkquake = prevPkgs.vkquake.overrideAttrs (prev: { vkquake = prevPkgs.vkquake.overrideAttrs (prev: {
version = "1.31.1"; version = "1.31.1";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {

View file

@ -1,33 +0,0 @@
{
lib,
stdenv,
fetchFromGitea,
}:
stdenv.mkDerivation {
pname = "e17gtk-revolved";
version = "2023-06-13";
src = fetchFromGitea {
domain = "git.disroot.org";
owner = "eudaimon";
repo = "E17gtk-revolved";
rev = "2217140ec82dc0cf10340d8490a3ca23d1567577";
hash = "sha256-RiwraD7ou6MRQbP/BvwkV3djU+O+/wjwHjeV16AUotw=";
};
installPhase = ''
runHook preInstall
install -d $out/share/themes/E17gtk-revolved
cp -r * $out/share/themes/E17gtk-revolved
runHook postInstall
'';
meta = with lib; {
description = "E17GTK-Revolved Theme";
homepage = "https://git.disroot.org/eudaimon/E17gtk-revolved";
license = licenses.gpl3Plus;
platforms = platforms.linux;
};
}

View file

@ -1,67 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
curl,
expat,
jansson,
libpng,
libjpeg,
libGLU,
libGL,
libsndfile,
libXxf86vm,
pcre,
pkg-config,
SDL2,
vim,
speex,
}:
stdenv.mkDerivation rec {
pname = "ezquake";
version = "3.6.5";
src = fetchFromGitHub {
owner = "krizej";
repo = pname + "-source";
rev = "bbfd27d33ef3781db9fc1b58cd0baa803acfdc69";
fetchSubmodules = true;
hash = "sha256-Ldv//lsukn985IljXHXDClsYY+Sk1fh41s1NySWkvuE=";
};
nativeBuildInputs = [pkg-config];
buildInputs = [
expat
curl
jansson
libpng
libjpeg
libGLU
libGL
libsndfile
libXxf86vm
pcre
SDL2
vim
speex
];
installPhase = with lib; let
sys = last (splitString "-" stdenv.hostPlatform.system);
arch = head (splitString "-" stdenv.hostPlatform.system);
in ''
git branch
mkdir -p $out/bin
find .
mv ezquake-${sys}-${arch} $out/bin/ezquake
'';
enableParallelBuilding = true;
meta = with lib; {
homepage = "https://ezquake.com/";
description = "A modern QuakeWorld client focused on competitive online play";
license = licenses.gpl2;
platforms = platforms.linux;
};
}

View file

@ -1,55 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
gtk3,
hicolor-icon-theme,
}:
stdenv.mkDerivation {
pname = "oxylite-icon-theme";
version = "2024-04-22";
src = fetchFromGitHub {
owner = "mx-2";
repo = "oxylite-icon-theme";
rev = "3dec1990dddd4d51513ee1d2b1fb762c0ba80f50";
hash = "sha256-syjFs2gkscdlpOmWgraj4l1+WwIaIVFZlhDY4nP99Oo=";
};
# propagatedBuildInputs = [ hicolor-icon-theme ];
nativeBuildInputs = [gtk3];
# dontDropIconThemeCache = true;
buildPhase = ''
runHook preBuild
runHook postBuild
'';
installPhase = ''
runHook preInstall
prefix="$out/share/icons/oxylite";
mkdir -p "$prefix";
for d in actions apps categories devices emblems emotes mimetypes places status ui; do
install -d "$prefix/$d";
cp -ar "$d" "$prefix";
chmod -R u=rwX,g=rX,o=rX "$prefix/$d";
done;
install -m 644 index.theme "$prefix/index.theme";
install -m 644 licenses.yml "$prefix/licenses.yml";
install -m 644 README.md "$prefix/README.md";
gtk-update-icon-cache --force "$prefix"
runHook postInstall
'';
meta = with lib; {
description = "Oxylite Icon Theme";
homepage = "https://github.com/mx-2/oxylite-icon-theme";
license = licenses.gpl3Plus;
platforms = platforms.linux;
};
}

View file

@ -1,13 +0,0 @@
{
lib,
pkgs,
}:
pkgs.vimUtils.buildVimPlugin {
name = "vim-darcula-theme";
src = pkgs.fetchFromGitHub {
owner = "doums";
repo = "darcula";
rev = "faf8dbab27bee0f27e4f1c3ca7e9695af9b1242b";
sha256 = "sha256-Gn+lmlYxSIr91Bg3fth2GAQou2Nd1UjrLkIFbBYlmF8=";
};
}

View file

@ -1,29 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "winvista-cursors";
version = "1";
src = fetchFromGitHub {
owner = "krizej";
repo = "winvista-cursors";
rev = "0ccde84ab0c6ec68470f59d8ec0f59045952381a";
hash = "sha256-NeMTP7KHzCXh/PAk82P3tcf6XI4SOtmtlH+SCN9qsco=";
};
installPhase = ''
thedir="$out/share/icons/winvista-cursors"
install -d $thedir
cp -r * $thedir
'';
meta = with lib; {
description = "Windows Vista Cursors";
homepage = "https://www.gnome-look.org/p/2061622";
license = licenses.gpl2Only;
platforms = platforms.linux;
};
}

View file

@ -1,51 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
python3,
xorg,
shadows ? false,
}:
stdenv.mkDerivation rec {
pname = "winxp-cursors";
version = "2023-11-22";
src = fetchFromGitHub {
owner = "rozniak";
repo = "xfce-winxp-tc";
fetchSubmodules = true;
rev = "82243191359060a3c3c9e168e0e10fe2114caca3";
hash = "sha256-bvkoe/L9KjMcCj5SlcNGoZKZtQwZHGYPFVSZbRfLztY=";
};
nativeBuildInputs = [cmake python3 xorg.xcursorgen];
dontUseCmakeConfigure = true;
cursor_variant =
if shadows
then "with-shadow"
else "no-shadow";
buildPhase = ''
cd packaging
mkdir -p build
cd build
cmake ../../cursors/${cursor_variant}/standard -DWINTC_SKU=""
make
'';
installPhase = ''
mkdir -p $out/share/icons/winxp-cursors/cursors/res
cp -a xdg-compiled-maps/* $out/share/icons/winxp-cursors/cursors/
cp compiled-cursors/* $out/share/icons/winxp-cursors/cursors/res/
cp ../../cursors/${cursor_variant}/standard/index.theme $out/share/icons/winxp-cursors/
'';
meta = with lib; {
description = "Windows XP Cursors";
homepage = "https://github.com/rozniak/xfce-winxp-tc";
license = with licenses; [unfreeRedistributable gpl2Plus];
platforms = platforms.linux;
};
}

View file

@ -1,46 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
python3,
gtk3,
}:
stdenv.mkDerivation {
pname = "winxp-icons";
version = "2024-03-27";
src = fetchFromGitHub {
owner = "rozniak";
repo = "xfce-winxp-tc";
fetchSubmodules = true;
rev = "82243191359060a3c3c9e168e0e10fe2114caca3";
hash = "sha256-bvkoe/L9KjMcCj5SlcNGoZKZtQwZHGYPFVSZbRfLztY=";
};
nativeBuildInputs = [cmake python3 gtk3];
dontUseCmakeConfigure = true;
buildPhase = ''
cd packaging
mkdir -p build
cd build
cmake ../../icons/luna -DWINTC_SKU=""
make
'';
installPhase = ''
mkdir -p $out/share/icons/winxp-icons/res
cp -r xdg-compiled-maps/* $out/share/icons/winxp-icons/
cp -r ../../icons/luna/res $out/share/icons/winxp-icons/
cp ../../icons/luna/index.theme $out/share/icons/winxp-icons/
gtk-update-icon-cache --force $out/share/icons/winxp-icons
'';
meta = with lib; {
description = "Windows XP Icons";
homepage = "https://github.com/rozniak/xfce-winxp-tc";
license = with licenses; [unfreeRedistributable gpl2Plus];
platforms = platforms.linux;
};
}

View file

@ -1,45 +0,0 @@
{ pkgs, ... }:
{
home-manager.users.krizej.programs.alacritty = {
package = pkgs.alacritty-sixel;
enable = true;
settings = {
font.size = 10;
window.padding = { x = 2; y = 2; };
cursor = {
style = {
shape = "Beam";
blinking = "On";
};
blink_timeout = 0;
unfocused_hollow = false;
};
colors = {
primary = {
foreground = "#e4e4ef";
background = "#181818";
};
normal = {
black = "#202020";
red = "#f43841";
green = "#73c936";
yellow = "#ffdd33";
blue = "#5a81ce";
magenta = "#ae65b7";
cyan = "#71afcf";
white = "#dddddd";
};
bright = {
black = "#282828";
red = "#ff4f58";
green = "#91d956";
yellow = "#ffee55";
blue = "#71afe8";
magenta = "#ce85e7";
cyan = "#91dfef";
white = "#f4f4ff";
};
};
};
};
}

View file

@ -1,43 +0,0 @@
{ pkgs, ... }:
{
home-manager.users.krizej.programs.autorandr = {
enable = true;
profiles = {
"main" = {
fingerprint = {
"Left" = "00ffffffffffff0026cd5961830600001d1f0104b5361e783b4c70a5574ea4260b5054a56b80710081408180a940b3009500950fd1c0023a801871382d40582c4500202f2100001e000000ff0031313737393132393031363637000000fd0030f0ffff3c010a202020202020000000fc00504c3235393048530a20202020019202033bf1529005040302011112131f203f140607151640e200d52309070783010000e305c301e60605016666006d1a0000020130f00000000000005a8780a070384d4030203500202f2100001ad09480a070381e4008203500202f2100001a23e88078703887401c40980c202f2100001a000000000000000000000000000063";
"Right" = "00ffffffffffff0026cd326162190000291c010380361e782a9055a75553a028135054a56b80710081408180a940b3009500950fd1c0023a801871382d40582c4500202f2100001e000000ff0031313534333834313036343938000000fd00374c1e5312000a202020202020000000fc00504c32353330480a2020202020016202032bf14f90050403020111121314060715161f230907078301000065030c001000681a00000101284be6023a801871382d40582c4500202f2100001f011d8018711c1620582c2500202f2100009e011d007251d01e206e285500202f2100001e2a4480a07038274030203500202f2100001a000000000000000000000000ab";
};
config = {
"Left" = {
enable = true;
mode = "1920x1080";
rate = "239.76";
position = "0x0";
primary = true;
};
"Right" = {
enable = true;
mode = "1920x1080";
rate = "74.97";
position = "1920x0";
};
};
};
};
};
# the autorandr service from home-manager sucks, can't customize flags
home-manager.users.krizej.services.autorandr.enable = false;
home-manager.users.krizej.systemd.user.services.autorandr = {
Unit = {
Description = "autorandr";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
Type = "oneshot";
ExecStart = "${pkgs.autorandr}/bin/autorandr --match-edid -l main";
};
Install.WantedBy = [ "graphical-session.target" ];
};
}

View file

@ -1,101 +0,0 @@
{ pkgs, ... }:
{
imports = [
./alacritty.nix
./autorandr.nix
./firefox.nix
./fish.nix
./git.nix
./i3.nix
./ssh.nix
./vim.nix
./thunar.nix
];
config = {
programs = {
steam.enable = true;
};
environment.systemPackages = with pkgs; [
ed # is the standard text editor.
ripgrep
file
tree
btop
eza
wget
zip
unzip
rar
unrar
p7zip
p7zip-rar
gcc
gnumake
cmake
pkg-config
python39
python311
];
home-manager.users.krizej.programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
home-manager.users.krizej.home.packages = with pkgs; [
(fortune.override { withOffensive = true; })
yad
cloc
pavucontrol
pamixer
element-desktop
discord
vkquake
ericw-tools-latest
trenchbroom
fteqcc
gmqcc
r2modman
(pkgs.writeShellScriptBin "homm3" ''
cd ~/games/homm3
wine HD_Launcher.exe
'')
dosbox-staging
wineWowPackages.stable
winetricks
kicad
libreoffice-qt
gimp
aseprite
sqlitebrowser
feh
vlc
obs-studio
yt-dlp
nixd
gdb
ccls
clang-tools
valgrind
linuxKernel.packages.linux_6_6.perf
ccache
jetbrains.pycharm-community
jetbrains.clion
(pkgs.writeShellScriptBin "clion-nix" ''
cd ~/projects/$1
nix-shell --run "clion ."
'')
];
};
}

View file

@ -1,110 +0,0 @@
{ pkgs, ... }:
{
home-manager.users.krizej.programs.firefox = {
enable = true;
policies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
DisablePocket = true;
DisableFirefoxAccounts = true;
DisableAccounts = true;
DisableFirefoxScreenshots = true;
OverridePostUpdatePage = "";
DontCheckDefaultBrowser = true;
DisplayBookmarksToolbar = "always";
DisplayMenuBar = "default-off";
SearchBar = "unified";
DefaultDownloadDirectory = "$HOME/downloads";
ExtensionSettings = {
# ublock origin
"uBlock0@raymondhill.net" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
};
# youtube redux
"{2d4c0962-e9ff-4cad-8039-9a8b80d9b8b6}" = {
install_url = "https://addons.mozilla.org/firefox/downloads/file/4224361/latest.xpi";
installation_mode = "force_installed";
};
# sponsorblock
"sponsorBlocker@ajay.app" = {
install_url = "https://addons.mozilla.org/firefox/downloads/file/4251917/latest.xpi";
installation_mode = "force_installed";
};
# legacy wikipedia layout
"{484f3bc9-b13b-4498-8ea6-124c199c5ca8}" = {
install_url = "https://addons.mozilla.org/firefox/downloads/file/4100662/latest.xpi";
installation_mode = "force_installed";
};
};
};
profiles.krizej = {
id = 0;
isDefault = true;
search = {
default = "envs.net - SearXNG";
force = true;
engines = {
"envs.net - SearXNG" = {
urls = [ { template = "https://searx.envs.net/searxng/search?q={searchTerms}"; } ];
icon = "https://envs.net/favicon.ico";
iconUpdateURL = "https://envs.net/favicon.ico";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "@sx" ];
};
# searx sometimes sucks
"Google".metaData.alias = "@g";
"Wikipedia (en)".metaData.alias = "@w";
"Nix Packages" = {
urls = [ { template = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}"; } ];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"Nix Options" = {
urls = [ { template = "https://search.nixos.org/options?channel=unstable&query={searchTerms}"; } ];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@no" ];
};
"Home Manger" = {
urls = [ { template = "https://home-manager-options.extranix.com/?release=master&query={searchTerms}"; } ];
icon = "https://home-manager-options.extranix.com/images/favicon.png";
iconUpdateURL = "https://home-manager-options.extranix.com/images/favicon.png";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "@hm" ];
};
"Arch Wiki" = {
urls = [ { template = "https://wiki.archlinux.org/index.php?search={searchTerms}"; } ];
icon = "https://wiki.archlinux.org/favicon.ico";
iconUpdateURL = "https://wiki.archlinux.org/favicon.ico";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "@aw" ];
};
"NixOS Wiki" = {
urls = [ { template = "https://nixos.wiki/index.php?search={searchTerms}&go=Go"; } ];
icon = "https://nixos.wiki/favicon.png";
iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "@nw" ];
};
# the rest can fuck off
"Bing".metaData.hidden = true;
"DuckDuckGo".metaData.hidden = true;
};
};
settings = {
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
"services.sync.prefs.sync.extensions.activeThemeID" = "false";
};
};
};
}

View file

@ -1,100 +0,0 @@
{ pkgs, config, ... }: let
hmCfg = config.home-manager.users.krizej;
XDG_DATA_HOME = hmCfg.xdg.dataHome;
in {
environment.systemPackages = [ pkgs.fish ];
programs.fish.enable = true;
users.users.krizej.shell = pkgs.fish;
programs.fish.promptInit = ''
${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source
'';
home-manager.users.krizej.programs.fish = {
enable = true;
shellAliases = {
"ls" = "eza -lhs type";
"cp" = "cp -v";
"mv" = "mv -v";
"ytmp3" = "yt-dlp -o '%(title)s.%(ext)s' -x --audio-format mp3";
"myip" = "curl ifconfig.me";
"0x0" = ''curl -F"file=@$argv" https://0x0.st'';
"wget" = "${pkgs.wget}/bin/wget --hsts-file='${XDG_DATA_HOME}/wget-hsts'";
};
shellAbbrs = {
"2clip" = "xclip -selection clipboard";
};
functions = {
"fish_greeting" = "fortune";
"fish_prompt" = ''
# name: Informative Vcs
# author: Mariusz Smykula <mariuszs at gmail.com>
# function fish_prompt --description 'Write out the prompt'
set -l last_pipestatus $pipestatus
set -lx __fish_last_status $status # Export for __fish_print_pipestatus.
if not set -q __fish_git_prompt_show_informative_status
set -g __fish_git_prompt_show_informative_status 1
end
if not set -q __fish_git_prompt_hide_untrackedfiles
set -g __fish_git_prompt_hide_untrackedfiles 1
end
if not set -q __fish_git_prompt_color_branch
set -g __fish_git_prompt_color_branch magenta --bold
end
if not set -q __fish_git_prompt_showupstream
set -g __fish_git_prompt_showupstream informative
end
if not set -q __fish_git_prompt_color_dirtystate
set -g __fish_git_prompt_color_dirtystate blue
end
if not set -q __fish_git_prompt_color_stagedstate
set -g __fish_git_prompt_color_stagedstate yellow
end
if not set -q __fish_git_prompt_color_invalidstate
set -g __fish_git_prompt_color_invalidstate red
end
if not set -q __fish_git_prompt_color_untrackedfiles
set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal
end
if not set -q __fish_git_prompt_color_cleanstate
set -g __fish_git_prompt_color_cleanstate green --bold
end
set -l color_cwd
set -l suffix
if functions -q fish_is_root_user; and fish_is_root_user
if set -q fish_color_cwd_root
set color_cwd $fish_color_cwd_root
else
set color_cwd $fish_color_cwd
end
set suffix '#'
else
set color_cwd $fish_color_cwd
set suffix '$'
end
# PWD
set_color $color_cwd
echo -n (prompt_pwd)
set_color normal
printf '%s ' (fish_vcs_prompt)
set -l status_color (set_color $fish_color_status)
set -l statusb_color (set_color --bold $fish_color_status)
set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus)
echo -n $prompt_status
set_color normal
echo -n "$suffix "
# end
'';
};
};
}

View file

@ -1,10 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.git ];
home-manager.users.krizej.programs.git = {
enable = true;
userName = "krizej";
userEmail = "60076189+krizej@users.noreply.github.com";
extraConfig.init.defaultBranch = "master";
};
}

View file

@ -1,250 +0,0 @@
args @ { config, pkgs, lib, ... }:
let
HOME = config.home-manager.users.krizej.home.homeDirectory;
monitors = import ../utils/monitors.nix args;
in {
services.xserver.windowManager.i3.enable = true;
home-manager.users.krizej = {
xsession.windowManager.i3 = {
enable = true;
config = rec {
assigns = {
"2" = [
{ class = "discord"; }
{ class = "SchildiChat"; }
{ class = "element"; }
];
};
window = {
border = 1;
titlebar = true;
};
floating = {
border = 1;
titlebar = true;
criteria = [
{ class = "zenity"; }
{ class = "fceux"; }
{ title = "Friends List"; }
];
};
gaps = {
inner = 0;
outer = 0;
};
fonts = {
names = [ "JetBrains Mono NL" ];
size = 10.0;
};
bars = [
{
inherit fonts;
trayOutput = "primary";
statusCommand = "${pkgs.i3status}/bin/i3status";
}
];
defaultWorkspace = "workspace number 1";
workspaceOutputAssign = [
{ workspace = "1"; output = monitors.left; }
{ workspace = "2"; output = monitors.right; }
];
focus = {
followMouse = true;
mouseWarping = true;
newWindow = "urgent";
};
startup = [
{ command = "autotiling &"; notification = false; }
# { command = "mpd &"; notification = false; }
{ command = "dunst &"; notification = false; }
{ command = "flameshot &"; notification = false; }
{ command = "i3-msg \"workspace 2; append_layout ~/.config/i3/workspace2.json\""; notification = false; }
{ command = "discord &"; notification = false; }
{ command = "element-desktop &"; notification = false; }
];
modes = let
cmd_and_center = cmd: "exec --no-startup-id i3-msg '${cmd}' && i3-center-mouse-on-focus";
in {
resize = {
"Left" = cmd_and_center "resize shrink width 10 px or 10 ppt";
"Right" = cmd_and_center "resize grow width 10 px or 10 ppt";
"Up" = cmd_and_center "resize shrink height 10 px or 10 ppt";
"Down" = cmd_and_center "resize grow height 10 px or 10 ppt";
"Escape" = "mode default";
};
};
modifier = "Mod4";
floating.modifier = "Mod4";
keybindings = let
mod = modifier;
execns = "exec --no-startup-id";
cmd_and_center = cmd: "${execns} i3-msg '${cmd}' && i3custom-center-mouse-on-focus";
in {
# Program keybinds
"${mod}+Return" = "${execns} alacritty";
"${mod}+Shift+s" = "${execns} flameshot gui";
"${mod}+b" = "${execns} firefox";
"${mod}+d" = "${execns} dmenu_run";
"--release ${mod}+k" = "${execns} xkill";
# Volume control
"Ctrl+F9" = "${execns} pamixer --toggle-mute";
"Ctrl+F10" = "${execns} pamixer --decrease 5";
"Ctrl+F11" = "${execns} pamixer --increase 5";
# MPD controls
# "Ctrl+F5" = "exec ~/music/select_music.sh";
# "Ctrl+F6" = "exec mpc prev";
# "Ctrl+F7" = "exec mpc toggle";
# "Ctrl+F8" = "exec mpc next";
# "Ctrl+Shift+F6" = "exec mpc seek -3";
# "Ctrl+Shift+F7" = "exec mpc clear";
# "Ctrl+Shift+F8" = "exec mpc seek +3";
# "Ctrl+Shift+F10" = ''exec mpc volume -5 && dunstify "mpc $(mpc volume)" -r 420'';
# "Ctrl+Shift+F11" = ''exec mpc volume +5 && dunstify "mpc $(mpc volume)" -r 420'';
# General i3 keybindings
"${mod}+f" = cmd_and_center "fullscreen toggle";
"${mod}+r" = "mode resize";
"${mod}+Shift+q" = cmd_and_center "kill";
"${mod}+Shift+r" = "restart";
"${mod}+Shift+e" = "${execns} i3-nagbar -t warning -m 'exit?' -b 'yes' 'i3-msg exit'";
# Mouse bindings
"--border button3" = "${execns} i3custom-window-actions";
"${mod}+Left" = cmd_and_center "focus left";
"${mod}+Right" = cmd_and_center "focus right";
"${mod}+Up" = cmd_and_center "focus up";
"${mod}+Down" = cmd_and_center "focus down";
"${mod}+Shift+Left" = cmd_and_center "move left";
"${mod}+Shift+Right" = cmd_and_center "move right";
"${mod}+Shift+Up" = cmd_and_center "move up";
"${mod}+Shift+Down" = cmd_and_center "move down";
"${mod}+q" = cmd_and_center "layout stacking";
"${mod}+w" = cmd_and_center "layout tabbed";
"${mod}+e" = cmd_and_center "layout toggle split";
"${mod}+Shift+space" = "floating toggle; ${execns} i3custom-center-mouse-on-focus";
"${mod}+space" = cmd_and_center "focus mode_toggle";
"${mod}+1" = cmd_and_center "workspace number 1";
"${mod}+2" = cmd_and_center "workspace number 2";
"${mod}+3" = cmd_and_center "workspace number 3";
"${mod}+4" = cmd_and_center "workspace number 4";
"${mod}+5" = cmd_and_center "workspace number 5";
"${mod}+6" = cmd_and_center "workspace number 6";
"${mod}+7" = cmd_and_center "workspace number 7";
"${mod}+8" = cmd_and_center "workspace number 8";
"${mod}+9" = cmd_and_center "workspace number 9";
"${mod}+0" = cmd_and_center "workspace number 10";
"${mod}+Shift+1" = cmd_and_center "move container to workspace number 1";
"${mod}+Shift+2" = cmd_and_center "move container to workspace number 2";
"${mod}+Shift+3" = cmd_and_center "move container to workspace number 3";
"${mod}+Shift+4" = cmd_and_center "move container to workspace number 4";
"${mod}+Shift+5" = cmd_and_center "move container to workspace number 5";
"${mod}+Shift+6" = cmd_and_center "move container to workspace number 6";
"${mod}+Shift+7" = cmd_and_center "move container to workspace number 7";
"${mod}+Shift+8" = cmd_and_center "move container to workspace number 8";
"${mod}+Shift+9" = cmd_and_center "move container to workspace number 9";
"${mod}+Shift+0" = cmd_and_center "move container to workspace number 10";
};
};
};
programs.i3status = {
enable = true;
enableDefault = false;
general = {
interval = 1;
colors = true;
color_good = "#91d956";
color_bad = "#f43841";
color_degraded = "#ffdd33";
output_format = "i3bar";
};
modules = {
"cpu_usage" = {
position = 0;
settings = {
format = "cpu: %usage";
};
};
"memory" = {
position = 1;
settings = {
format = "mem: %used";
threshold_degraded = "1G";
format_degraded = "MEMORY < %available";
};
};
"volume master" = {
position = 2;
settings = {
color_degraded = "#333333";
format = "vol: %volume";
format_muted = "vol: ---";
};
};
"tztime local" = {
position = 3;
settings = {
format = "%Y-%m-%d %H:%M:%S (%A)";
};
};
};
};
home.packages = with pkgs; [
autotiling
(pkgs.writeShellScriptBin "i3custom-center-mouse-on-focus" ''
eval $(xdotool getwindowfocus getwindowgeometry --shell)
MX=$(($X + $WIDTH / 2))
MY=$(($Y + $HEIGHT / 2))
xdotool mousemove $MX $MY
'')
(pkgs.writeShellScriptBin "i3custom-window-actions" ''
yad --splash --mouse --title="i3 window actions" \
--gtkrc="${HOME}/.config/i3/i3gtk.css" \
--text="i3 window actions" \
--button float:0 --button kill:1
case $? in
0) i3-msg "floating toggle";;
1) i3-msg "kill";;
-1) ;;
esac
'')
(pkgs.writeShellScriptBin "i3custom-floating-toggle" ''
i3-msg "mark --add _; [con_mark=f] floating disable, border pixel 1, mark --add --toggle _; [con_mark=_] floating enable, border normal; mark --add --toggle f;"
'')
];
home.file = {
".config/i3/workspace2.json".source = ../files/workspace2.json;
".config/i3/i3gtk.css".source = ../files/i3gtk.css;
};
};
}

View file

@ -1,28 +0,0 @@
{ ... }:
{
services.openssh.enable = true;
home-manager.users.krizej.programs.ssh = {
enable = true;
matchBlocks = {
"github.com" = {
user = "git";
identityFile = "~/.ssh/github";
};
"192.168.1.12" = {
identityFile = "~/.ssh/raspi";
};
"git.jacekpoz.pl" = {
user = "forgejo";
identityFile = "~/.ssh/jacekgit";
};
"zasadzka.pl" = {
user = "discord";
identityFile = "~/.ssh/zasadzka";
setEnv = {
"TERM" = "xterm-256color";
};
};
};
};
}

View file

@ -1,22 +0,0 @@
{ pkgs, ... }:
{
programs = {
dconf.enable = true;
xfconf.enable = true;
thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-volman
thunar-archive-plugin
thunar-media-tags-plugin
];
};
};
services.gvfs.enable = true;
services.tumbler.enable = true;
home-manager.users.krizej.home.packages = with pkgs; [
ffmpegthumbnailer
gsettings-desktop-schemas
xarchiver # not really thunar but can be here ig
];
}

View file

@ -1,59 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.vim ];
home-manager.users.krizej = {
home.sessionVariables = { "EDITOR" = "vim"; };
# fixme: not .vim
home.file = { ".vim/colors/darcula.vim".source = ../files/darcula.vim; };
programs.vim = {
enable = true;
defaultEditor = true;
plugins = [
pkgs.vimPlugins.indentLine
pkgs.vimPlugins.vim-gitgutter
];
settings = let
vimCache = "~/.cache/vim";
in {
background = "dark";
backupdir = [ "${vimCache}/backup/" ];
copyindent = false;
directory = [ "~/.cache/vim/swap/" ];
expandtab = true;
hidden = false;
history = 420;
ignorecase = false;
modeline = true;
mouse = "a";
mousefocus = false;
mousehide = false;
mousemodel = "popup_setpos";
number = true;
relativenumber = true;
shiftwidth = 4;
smartcase = false;
tabstop = 4;
undodir = [ "~/.cache/vim/undo/" ];
undofile = false;
};
extraConfig = ''
set updatetime=100
set signcolumn=yes
set termguicolors
set cursorline
colorscheme darcula
let g:indentLine_char = ''
let g:c_no_ansi = 1
let g:c_functions = 1
let g:c_no_c99 = 1
let g:c_no_bsd = 1
let g:c_no_c11 = 1
let g:c_gnu = 1
'';
};
};
# fuck you
programs.nano.enable = false;
}

View file

@ -1,10 +0,0 @@
{ ... }:
{
imports = [
./dunst.nix
./flameshot.nix
./printing.nix
./sddm.nix
./xserver.nix
];
}

View file

@ -1,16 +0,0 @@
{ ... }:
{
home-manager.users.krizej.services.dunst = {
enable = true;
settings = {
global = {
origin = "bottom-right";
frame_width = 1;
background = "#333333";
foreground = "#feeeee";
font = "JetBrains Mono NL 10";
frame_color = "#4c7899";
};
};
};
}

View file

@ -1,12 +0,0 @@
{ ... }:
{
home-manager.users.krizej.services.flameshot = {
enable = true;
settings = {
General = {
disabledTrayIcon = true;
showStartupLaunchMessage = false;
};
};
};
}

View file

@ -1,27 +0,0 @@
{ ... }:
{
services = {
printing = {
enable = true;
allowFrom = [ "localhost" "192.168.1.*" ];
};
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
};
hardware.printers = {
ensurePrinters = [
{
name = "brother-dcp-1622we";
deviceUri = "dnssd://Brother%20DCP-1610W%20series._pdl-datastream._tcp.local/?uuid=e3248000-80ce-11db-8000-c894023b7db8";
model = "drv:///sample.drv/generpcl.ppd";
ppdOptions = {
PageSize = "A4";
};
}
];
ensureDefaultPrinter = "brother-dcp-1622we";
};
}

View file

@ -1,20 +0,0 @@
{ pkgs, ... }:
{
services.displayManager = {
defaultSession = "none+i3";
sddm = {
enable = true;
theme = "sddm-i3-theme";
settings = {
General = {
InputMethod = "";
};
};
};
};
environment.systemPackages = [
pkgs.sddm-i3-theme
pkgs.libsForQt5.sddm
];
}

View file

@ -1,50 +0,0 @@
args @ { config, lib, pkgs, ... }:
{
services = {
xserver = {
enable = true;
xkb.layout = "pl";
displayManager = let
monitors = import ../utils/monitors.nix args;
in {
# THIS SHIT DOESN'T WORK!!!
setupCommands = ''
xrandr --output ${monitors.left} --mode 1920x1080 --rate 239.76 --primary
xrandr --output ${monitors.right} --off
xset r rate 180 50
'';
sessionCommands = ''
xrandr --output ${monitors.left} --mode 1920x1080 --rate 239.76 --primary
xrandr --output ${monitors.right} --mode 1920x1080 --rate 74.97 --right-of ${monitors.left}
xset r rate 180 50
'';
};
# THIS SHIT DOESN'T WORK!!!
autoRepeatDelay = 180;
autoRepeatInterval = 50;
};
};
environment.systemPackages = with pkgs; [
xclip
xorg.xkill
xorg.xev
xdotool
];
# https://www.reddit.com/r/linux_gaming/comments/1dkbh5t/games_behaving_differently_on_xorg_than_on/
# FUCK YOU LIBINPUT
services.libinput.enable = lib.mkForce false;
# services.libinput = {
# enable = true;
# touchpad = {
# naturalScrolling = false; # it's reversed on my laptop for some reason
# tapping = true;
# tappingButtonMap = "lmr";
# scrollMethod = "edge";
# };
# };
}

View file

@ -1,23 +0,0 @@
# problem:
# fucking xorg changes my output names randomly !!!
# solution:
# 1. i use the `rebuild` command to rebuild my nixos system (see misc/nix.nix)
# 2. that command updates the file files/autorandr.txt BEFORE running nixos-rebuild
# 3. i extract the corrected monitor names and set them to `left` and `right` in this attrset
{ pkgs, lib, ... }: let
# thanks to poz for the base of this run function thing
inherit (pkgs) runCommand;
inherit (lib) fileContents;
run = script: fileContents (runCommand "run" { AUTORANDR_TXT = fileContents ../files/autorandr.txt; } ''
bash -c '${script}' > $out
'');
printf = "${pkgs.coreutils-full}/bin/printf"; # echo removes the newlines or some shit
rg = "${pkgs.ripgrep}/bin/rg";
rev = "${pkgs.util-linux}/bin/rev";
cut = "${pkgs.coreutils-full}/bin/cut";
in {
# this parses "main: renaming display Left to DisplayPort-2"
# and i am interested in "DisplayPort-2"
left = run "${printf} \"$AUTORANDR_TXT\" | ${rg} Left | ${rev} | ${cut} -d\" \" -f1 | ${rev}";
right = run "${printf} \"$AUTORANDR_TXT\" | ${rg} Right | ${rev} | ${cut} -d\" \" -f1 | ${rev}";
}