This commit is contained in:
krizej 2024-06-13 15:38:40 +02:00
commit 4b8372e4a5
26 changed files with 1114 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
hardware-configuration.nix

114
configuration.nix Normal file
View file

@ -0,0 +1,114 @@
{ pkgs, ... }: {
imports = [
./hardware-configuration.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
networking.hostName = "laptop";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Warsaw";
services.xserver = {
enable = true;
windowManager.i3.enable = true;
xkb.layout = "pl";
libinput = {
enable = true;
touchpad = {
naturalScrolling = false; # it's reversed on my laptop for some reason
tapping = true;
tappingButtonMap = "lmr";
scrollMethod = "edge";
};
};
# this shit doesn't actually work
autoRepeatDelay = 180;
autoRepeatInterval = 50;
# this does
displayManager.sessionCommands = "xset r rate 180 50\n";
};
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
jetbrains-mono
];
fontconfig.defaultFonts = {
serif = [ "JetBrains Mono NL" ];
sansSerif = [ "JetBrains Mono NL" ];
monospace = [ "JetBrains Mono NL" ];
};
};
sound.enable = true;
hardware.pulseaudio.enable = true;
# fucking stupid android shit man
users.groups.plugdev.members = [ "krizej" ];
services.udev.extraRules = ''
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e76", MODE="0666", GROUP="plugdev"
'';
users.users.krizej = {
isNormalUser = true;
extraGroups = [ "wheel" ];
shell = pkgs.fish;
};
qt = {
enable = true;
platformTheme = "gnome";
style = "adwaita-dark";
};
programs.nano.enable = false;
programs.dconf.enable = true;
# any-nix-shell
programs.fish.enable = true;
programs.fish.promptInit = ''
${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source
'';
environment.systemPackages = with pkgs; [
ed # is the standard text editor.
vim
wget
btop
git
gcc
unzip
python312
ripgrep
gnomeExtensions.user-themes
xdg-user-dirs
man-pages
man-pages-posix
];
documentation.dev.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
services.openssh.enable = true;
security.sudo.extraConfig = ''
Defaults pwfeedback
'';
nixpkgs.overlays = import ./pkgs pkgs;
nixpkgs.config.allowUnfree = true;
system.stateVersion = "23.11";
}

64
files/prompt.fish Normal file
View file

@ -0,0 +1,64 @@
# 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

65
flake.lock Normal file
View file

@ -0,0 +1,65 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1714043624,
"narHash": "sha256-Xn2r0Jv95TswvPlvamCC46wwNo8ALjRCMBJbGykdhcM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "86853e31dc1b62c6eeed11c667e8cdd0285d4411",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1714531828,
"narHash": "sha256-ILsf3bdY/hNNI/Hu5bSt2/KbmHaAVhBbNUOdGztTHEg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0638fe2715d998fa81d173aad264eb671ce2ebc1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1715942738,
"narHash": "sha256-85fVkx0bFqblV89A/KLGuJd0IsxCT0wOTIFBQWM1p0o=",
"owner": "nix-community",
"repo": "NUR",
"rev": "cbe245e7ed40f92a6d40bb4a458f9003bbe612d7",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nur": "nur"
}
}
},
"root": "root",
"version": 7
}

31
flake.nix Normal file
View file

@ -0,0 +1,31 @@
{
description = ":-)";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
};
outputs = { nixpkgs, home-manager, nur, ... }: {
nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{ nixpkgs.overlays = [ nur.overlay ]; }
./configuration.nix
nur.nixosModules.nur
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.krizej = import ./home.nix;
};
}
];
};
};
};
}

140
home.nix Normal file
View file

@ -0,0 +1,140 @@
args @ { inputs, lib, config, pkgs, ... }:
let
importCfg = ({prefix, name}:
let
cfg_path = ./${prefix}/${name}.nix;
in (
if builtins.pathExists cfg_path then (
((import cfg_path) args)
) else (
{ enable = true; }
)
)
);
in {
home.stateVersion = "23.11";
home.username = "krizej";
home.homeDirectory = "/home/krizej";
services = lib.genAttrs (import ./services)
(cfg_name: importCfg { prefix = "services"; name = cfg_name; });
programs = lib.genAttrs (import ./programs)
(cfg_name: importCfg { prefix = "programs"; name = cfg_name; });
home.packages = with pkgs; [
xfce.thunar
xfce.tumbler # image previews in thunar
xfce.thunar-volman
xfce.thunar-archive-plugin
xfce.thunar-media-tags-plugin
xarchiver
fortune
vim-full
jetbrains.pycharm-professional
android-studio
android-tools
feh
element-desktop
lxappearance
pavucontrol
ezquake
discord
libreoffice-qt
wineWowPackages.stable
winetricks
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
home.sessionVariables = {
EDITOR = "vim";
MANSECT = "2:3:3p:3type:1:1p:n:l:8:0:0p:5:4:9:6:7";
# xdg crap thx poz
XDG_DATA_HOME = "$HOME/.local/share";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_STATE_HOME = "$HOME/.local/state";
XDG_CACHE_HOME = "$HOME/.cache";
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/cargo";
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.userDirs = let
home = config.home.homeDirectory;
in {
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";
};
# xorg crap (incl. themes etc)
xsession = {
enable = true;
# special case - i3 is not listed in ./programs/default.nix
windowManager.i3 = (import ./programs/i3.nix args);
};
# home.pointerCursor = {
# gtk.enable = true;
# x11.enable = true;
# name = "Windows-7-Aero-Cursors_Default";
# package = pkgs.win7-cursors;
# };
gtk = {
enable = true;
iconTheme = {
name = "oxylite";
package = pkgs.oxylite-icon-theme;
};
theme = {
name = "Adwaita-dark";
package = pkgs.gnome.gnome-themes-extra;
};
};
}

11
pkgs/default.nix Normal file
View file

@ -0,0 +1,11 @@
pkgs: [
(final: prev: {
winvista-cursors = pkgs.callPackage ./winvista-cursors.nix {};
win7-cursors = pkgs.callPackage ./win7-cursors.nix {};
winxp-cursors = pkgs.callPackage ./winxp-cursors.nix {};
winxp-icons = pkgs.callPackage ./winxp-icons.nix {};
oxylite-icon-theme = pkgs.callPackage ./oxylite-icon-theme.nix {};
e17gtk-revolved = pkgs.callPackage ./e17gtk-revolved.nix {};
})
]

30
pkgs/e17gtk-revolved.nix Normal file
View file

@ -0,0 +1,30 @@
{ 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;
};
}

41
pkgs/ezquake-fork.nix Normal file
View file

@ -0,0 +1,41 @@
{ 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

@ -0,0 +1,50 @@
{ 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;
};
}

26
pkgs/win7-cursors.nix Normal file
View file

@ -0,0 +1,26 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation {
pname = "win7-cursors";
version = "1";
src = fetchFromGitHub {
owner = "lLexian";
repo = "Windows-7-Aero-Cursors_Linux";
rev = "f14c659082d38be7cbde2101ea5ab71987ead64e";
hash = "sha256-aG+iHqwTZxgWLg0qkJtTIW+byxUszHR9HN3TDnR1i7Y=";
};
installPhase = ''
thedir="$out/share/icons/"
install -d $thedir
cp -r * $thedir
'';
meta = with lib; {
description = "Windows 7 Cursors";
homepage = "https://github.com/lLexian/Windows-7-Aero-Cursors_Linux";
license = licenses.gpl2Only;
platforms = platforms.linux;
};
}

26
pkgs/winvista-cursors.nix Normal file
View file

@ -0,0 +1,26 @@
{ 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;
};
}

41
pkgs/winxp-cursors.nix Normal file
View file

@ -0,0 +1,41 @@
{ 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;
};
}

40
pkgs/winxp-icons.nix Normal file
View file

@ -0,0 +1,40 @@
{ 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;
};
}

42
programs/alacritty.nix Normal file
View file

@ -0,0 +1,42 @@
{...}:
{
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";
};
};
};
}

34
programs/autorandr.nix Normal file
View file

@ -0,0 +1,34 @@
{ pkgs, ...}:
{
enable = true;
hooks.postswitch = {
"notify-i3" = "${pkgs.i3}/bin/i3-msg restart";
};
profiles = {
"main" = {
fingerprint = {
"HDMI-1" = "00ffffffffffff0026cd5861830600001d1f010380361e782a4c70a5574ea4260b5054a56b80710081408180a940b3009500950fd1c0023a801871382d40582c4500202f2100001e000000ff0031313737393132393031363637000000fd0038f01fff3c000a202020202020000000fc00504c3235393048530a2020202001b3020345f14c90040302011112131f203f40e200d5230907078301000067030c001000384467d85dc4017880006d1a0000020130f0e60000000000e305c301e60605016666005a8780a070384d4030203500202f2100001a23e88078703887401c40980c202f2100001a00000000000000000000000000000000000000000000e0";
"eDP-1" = "00ffffffffffff003870400000000000011c01049522137803f285975c588f281d5054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a182480a070381f403020350058c21000001a00000000000000000000000000000000000000000002000c42f90b3c6a0c13237d0000000034";
};
config = {
"HDMI-1" = {
enable = true;
mode = "1920x1080";
rate = "239.76";
position = "1920x0";
};
"eDP-1" = {
enable = true;
mode = "1920x1080";
rate = "60.02";
primary = true;
position = "0x0";
};
};
};
};
}

12
programs/default.nix Normal file
View file

@ -0,0 +1,12 @@
[
# i3 is not here because it goes into xsession.windowManager instead of into programs
"home-manager"
"firefox"
"alacritty"
"fish"
"eza"
"yt-dlp"
"rofi"
"autorandr"
]

95
programs/firefox.nix Normal file
View file

@ -0,0 +1,95 @@
{ pkgs, ... }:
{
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";
};
};
};
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" ];
};
"Wikipedia (en)".metaData.alias = "@w";
# searx sometimes sucks
"Google".metaData.alias = "@g";
"Nix Packages" = {
urls = [{ template = "https://search.nixos.org/packages?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?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=release-23.11&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" ];
};
# 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";
};
};
}

16
programs/fish.nix Normal file
View file

@ -0,0 +1,16 @@
{...}:
{
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";
};
functions = {
"fish_greeting" = "fortune";
"fish_prompt" = builtins.readFile ../files/prompt.fish;
};
}

146
programs/i3.nix Normal file
View file

@ -0,0 +1,146 @@
{...}:
{
enable = true;
config = rec {
modifier = "Mod4";
floating.modifier = "Mod4";
assigns = {
"2" = [
{ class = "discord"; }
{ class = "SchildiChat"; }
{ class = "element"; }
];
};
window = {
titlebar = false;
border = 1;
};
gaps = {
inner = 0;
outer = 0;
};
floating.criteria = [
{ class = "zenity"; }
{ class = "fceux"; }
{ title = "Friends List"; } # steam
];
fonts = {
names = ["JetBrains Mono NL"];
size = 10.0;
};
workspaceOutputAssign = [
{ workspace = "1"; output = "DisplayPort-2"; }
{ workspace = "2"; output = "HDMI-A-2"; }
];
focus = {
followMouse = true;
mouseWarping = true;
};
modes = {
resize = {
"Left" = "resize shrink width 10 px or 10 ppt";
"Right" = "resize grow width 10 px or 10 ppt";
"Up" = "resize shrink height 10 px or 10 ppt";
"Down" = "resize grow height 10 px or 10 ppt";
"Escape" = "mode default";
};
};
startup = [
{ command = "picom &"; notification = false; }
{ command = "mpd &"; notification = false; }
{ command = "dunst &"; notification = false; }
{ command = "flameshot &"; notification = false; }
# { command = "lcd-bar startdaemon 192.168.1.12 &"; notification = false; }
# { command = "lcd-bar-status &"; notification = false; }
{ command = "i3bar-mouse &"; notification = false; }
# { command = "hydration.sh &"; notification = false; }
{ command = "discord &"; notification = false; }
{ command = "element-desktop &"; notification = false; }
];
keybindings =
let
mod = modifier;
in {
# Program keybinds
"${mod}+Return" = "exec alacritty";
"${mod}+Shift+s" = "exec flameshot gui";
"${mod}+b" = "exec firefox";
"${mod}+d" = "exec rofi -show drun";
# Volume control
"Ctrl+F9" = "pamixer --toggle-mute";
"Ctrl+F10" = "pamixer --decrease 5";
"Ctrl+F11" = "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" = "fullscreen toggle";
"${mod}+r" = "mode resize";
"${mod}+Shift+q" = "kill";
"${mod}+Shift+r" = "restart";
"${mod}+Shift+e" = "exec i3-nagbar -t warning -m 'exit?' -b 'yes' 'i3-msg exit'";
"${mod}+Left" = "focus left";
"${mod}+Right" = "focus right";
"${mod}+Up" = "focus up";
"${mod}+Down" = "focus down";
"${mod}+Shift+Left" = "move left";
"${mod}+Shift+Right" = "move right";
"${mod}+Shift+Up" = "move up";
"${mod}+Shift+Down" = "move down";
"${mod}+q" = "layout stacking";
"${mod}+w" = "layout tabbed";
"${mod}+e" = "layout toggle split";
"${mod}+Shift+Space" = "floating toggle";
"${mod}+Space" = "focus mode_toggle";
"${mod}+1" = "workspace number 1";
"${mod}+2" = "workspace number 2";
"${mod}+3" = "workspace number 3";
"${mod}+4" = "workspace number 4";
"${mod}+5" = "workspace number 5";
"${mod}+6" = "workspace number 6";
"${mod}+7" = "workspace number 7";
"${mod}+8" = "workspace number 8";
"${mod}+9" = "workspace number 9";
"${mod}+0" = "workspace number 10";
"${mod}+Shift+1" = "move container to workspace number 1";
"${mod}+Shift+2" = "move container to workspace number 2";
"${mod}+Shift+3" = "move container to workspace number 3";
"${mod}+Shift+4" = "move container to workspace number 4";
"${mod}+Shift+5" = "move container to workspace number 5";
"${mod}+Shift+6" = "move container to workspace number 6";
"${mod}+Shift+7" = "move container to workspace number 7";
"${mod}+Shift+8" = "move container to workspace number 8";
"${mod}+Shift+9" = "move container to workspace number 9";
"${mod}+Shift+0" = "move container to workspace number 10";
};
};
}

52
programs/rofi.nix Normal file
View file

@ -0,0 +1,52 @@
{ config, ... }:
{
enable = true;
theme = let
mkLiteral = config.lib.formats.rasi.mkLiteral;
Black = mkLiteral "Black";
White = mkLiteral "White";
north = mkLiteral "north";
horizontal = mkLiteral "horizontal";
in {
"*" = {
background-color = Black;
border-color = White;
text-color = White;
font = "JetBrains Mono NL 12";
};
window = {
anchor = north;
location = north;
width = mkLiteral "100%";
padding = mkLiteral "4px";
children = map mkLiteral [ "horibox" ];
};
horibox = {
orientation = horizontal;
children = map mkLiteral [ "prompt" "entry" "listview" ];
};
listview = {
layout = horizontal;
spacing = mkLiteral "5px";
lines = 100;
};
entry = {
expand = false;
width = mkLiteral "10em";
};
element = {
padding = mkLiteral "0px 2px";
};
"element selected" = {
background-color = mkLiteral "#333333";
};
prompt = {
text-color = mkLiteral "#00000000";
};
"element-text, element-icon" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
};
};
}

2
readme.txt Normal file
View file

@ -0,0 +1,2 @@
i have no idea what i'm doing

6
services/default.nix Normal file
View file

@ -0,0 +1,6 @@
[
"picom"
"flameshot"
"dunst"
]

15
services/dunst.nix Normal file
View file

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

10
services/flameshot.nix Normal file
View file

@ -0,0 +1,10 @@
{...}:
{
enable = true;
settings = {
General = {
disabledTrayIcon = true;
showStartupLaunchMessage = false;
};
};
}

4
services/picom.nix Normal file
View file

@ -0,0 +1,4 @@
{...}:
{
enable = true;
}