This commit is contained in:
krizej 2024-07-04 01:14:24 +02:00
parent 4e452106cc
commit 74e4e7d6f8
47 changed files with 1151 additions and 757 deletions

3
.idea/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

View file

@ -0,0 +1,10 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</value>
</option>
</code_scheme>
</component>

View file

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

View file

@ -0,0 +1,36 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="GrazieInspection" enabled="false" level="GRAMMAR_ERROR" enabled_by_default="false" />
<inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true">
<option name="myValues">
<value>
<list size="1">
<item index="0" class="java.lang.String" itemvalue="href" />
</list>
</value>
</option>
<option name="myCustomValuesEnabled" value="true" />
</inspection_tool>
<inspection_tool class="LanguageDetectionInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PyBroadExceptionInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="2">
<item index="0" class="java.lang.String" itemvalue="pygame" />
<item index="1" class="java.lang.String" itemvalue="pyrex" />
</list>
</value>
</option>
</inspection_tool>
<inspection_tool class="PyPep8Inspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="PyPep8NamingInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="PyShadowingBuiltinsInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
</profile>
</component>

View file

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

7
.idea/misc.xml Normal file
View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.12 (django_projektwlasny)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (django_projektwlasny)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/nix.iml" filepath="$PROJECT_DIR$/.idea/nix.iml" />
</modules>
</component>
</project>

8
.idea/nix.iml Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View file

@ -1,210 +1,9 @@
{ pkgs, ...}: { ... }:
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./programs
./services
./misc
]; ];
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
splashImage = null;
font = null;
};
};
# doesn't even work, todo when fixed: remove xrandr from i3 autostart
kernelParams = [
"video=DP-3:1920x1080@240"
"video=HDMI-3:1920x1080@75"
];
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.permittedInsecurePackages = [
"freeimage-unstable-2021-11-01"
"openssl-1.1.1w"
];
networking.hostName = "krizej-pc";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Warsaw";
# services.libinput = {
# enable = true;
# touchpad = {
# naturalScrolling = false; # it's reversed on my laptop for some reason
# tapping = true;
# tappingButtonMap = "lmr";
# scrollMethod = "edge";
# };
# };
programs.sway.enable = true;
services = {
xserver = {
enable = true;
xkb.layout = "pl";
windowManager.i3.enable = true;
displayManager = {
sessionCommands = ''
xrandr --output DP-3 --mode 1920x1080 --rate 239.76 --primary
xrandr --output HDMI-3 --mode 1920x1080 --rate 74.97 --right-of DP-3
xset r rate 180 50
'';
};
autoRepeatDelay = 180;
autoRepeatInterval = 50;
};
displayManager = {
defaultSession = "none+i3";
sddm = {
enable = true;
theme = "sddm-i3-theme";
};
};
};
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
jetbrains-mono
dejavu_fonts
corefonts
vistafonts
];
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
'';
programs.steam = {
enable = true;
};
environment.systemPackages = with pkgs; [
ed # is the standard text editor.
vim
file
wget
btop
git
gcc
unzip
python311
python39
ripgrep
gnomeExtensions.user-themes
xdg-user-dirs
man-pages
man-pages-posix
ntfs3g
gnumake
xclip
tcl
pkg-config
fish
tree
openssl_1_1
sddm-i3-theme
];
documentation = {
enable = true;
dev.enable = true;
doc.enable = false;
info.enable = false;
man = {
enable = true;
generateCaches = false;
man-db.enable = false;
mandoc.enable = true;
};
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
services.openssh.enable = true;
security.sudo.extraConfig = ''
Defaults pwfeedback
'';
hardware = {
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
mesa
amdvlk
libdrm
libva
vaapiVdpau
libvdpau-va-gl
rocmPackages.clr.icd
];
extraPackages32 = with pkgs; [
driversi686Linux.mesa
driversi686Linux.amdvlk
driversi686Linux.vaapiVdpau
driversi686Linux.libvdpau-va-gl
];
};
};
boot.initrd.kernelModules = [ "amdgpu" ];
environment.sessionVariables = {
AMD_VULKAN_ICD = "RADV";
};
nixpkgs.overlays = import ./pkgs pkgs;
nixpkgs.config.allowUnfree = true;
system.stateVersion = "23.11";
} }

View file

@ -1,64 +1,64 @@
{ {
"nodes": { "nodes": {
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1718243258, "lastModified": 1719827439,
"narHash": "sha256-abBpj2VU8p6qlRzTU8o22q68MmOaZ4v8zZ4UlYl5YRU=", "narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "8d5e27b4807d25308dfe369d5a923d87e7dbfda3", "rev": "59ce796b2563e19821361abbe2067c3bb4143a7d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1718318537, "lastModified": 1719848872,
"narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=", "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420", "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1715942738, "lastModified": 1719938409,
"narHash": "sha256-85fVkx0bFqblV89A/KLGuJd0IsxCT0wOTIFBQWM1p0o=", "narHash": "sha256-GzmLs/YaKAzpTQr9u4VpU0ISGtBluAyx9qTZC/86wb4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "cbe245e7ed40f92a6d40bb4a458f9003bbe612d7", "rev": "1ec5b968d5751a0c817b7e56974059d01b348bf2",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"type": "github" "type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nur": "nur" "nur": "nur"
} }
} }
}, },
"root": "root", "root": "root",
"version": 7 "version": 7
} }

View file

@ -14,18 +14,11 @@
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
{ nixpkgs.overlays = [ nur.overlay ]; } { nixpkgs.overlays = [ nur.overlay ]; }
./configuration.nix
nur.nixosModules.nur nur.nixosModules.nur
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager
home-manager = { ./configuration.nix
useGlobalPkgs = true;
useUserPackages = true;
users.krizej = import ./home.nix;
};
}
]; ];
}; };
}; };
}; };
} }

View file

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

View file

@ -0,0 +1,23 @@
{ 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-pages
man-pages-posix
];
}

View file

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

View file

@ -1,12 +1,11 @@
{ ... }: { pkgs, ... }:
{ {
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.permittedInsecurePackages = [ nixpkgs.config.permittedInsecurePackages = [
"freeimage-unstable-2021-11-01" "freeimage-unstable-2021-11-01"
"openssl-1.1.1w"
]; ];
nixpkgs.overlays = import ./pkgs pkgs; nixpkgs.overlays = import ../pkgs pkgs;
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
} }

View file

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

View file

@ -0,0 +1,44 @@
{ 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 = [
"video=DP-3:1920x1080@240"
"video=HDMI-1:1920x1080@75"
];
initrd.kernelModules = [ "amdgpu" ];
};
time.timeZone = "Europe/Warsaw";
sound.enable = true;
hardware.pulseaudio.enable = true;
system.stateVersion = "23.11";
users.users.krizej = {
isNormalUser = true;
extraGroups = ["wheel" "input"];
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.krizej = rec {
home.stateVersion = "23.11";
home.username = "krizej";
home.homeDirectory = "/home/krizej";
};
};
environment.systemPackages = [ pkgs.ntfs3g ];
}

View file

@ -0,0 +1,45 @@
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.gnomeExtensions.user-themes
];
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
jetbrains-mono
];
fontconfig.defaultFonts = {
serif = [ "JetBrains Mono NL" ];
sansSerif = [ "JetBrains Mono NL" ];
monospace = [ "JetBrains Mono NL" ];
};
};
qt = {
enable = true;
platformTheme = "gnome";
style = "adwaita-dark";
};
home-manager.users.krizej = {
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
name = "aero-drop";
package = pkgs.win7-cursors;
};
gtk = {
enable = true;
iconTheme = {
name = "Arc";
package = pkgs.arc-icon-theme;
};
theme = {
name = "Arc-Mono";
package = pkgs.arc-mono-gtk-theme;
};
};
};
}

View file

@ -1,9 +1,10 @@
{ config, pkgs, ... }: { config, lib, pkgs, ... }:
let let
HOME = config.home-manager.users.krizej.home.homeDirectory; HOME = config.home-manager.users.krizej.home.homeDirectory;
in { in {
home-manager.users.krizej = { home-manager.users.krizej = {
home.packages = with pkgs; [ home.packages = with pkgs; [
xdg-user-dirs
xdg-desktop-portal xdg-desktop-portal
xdg-desktop-portal-gnome xdg-desktop-portal-gnome
]; ];

View file

@ -1,17 +1,18 @@
{ lib, stdenv {
, fetchFromGitHub lib,
, sassc stdenv,
, meson fetchFromGitHub,
, ninja sassc,
, glib meson,
, gnome ninja,
, gtk-engine-murrine glib,
, inkscape gnome,
, cinnamon gtk-engine-murrine,
, makeFontsConf inkscape,
, python3 cinnamon,
makeFontsConf,
python3,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "arc-theme"; pname = "arc-theme";
version = "i don't care"; version = "i don't care";
@ -47,7 +48,7 @@ stdenv.mkDerivation rec {
''; '';
# Fontconfig error: Cannot load default config file: No such file: (null) # Fontconfig error: Cannot load default config file: No such file: (null)
FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; }; FONTCONFIG_FILE = makeFontsConf {fontDirectories = [];};
mesonFlags = [ mesonFlags = [
"-Dthemes=gtk2,gtk3,gtk4" "-Dthemes=gtk2,gtk3,gtk4"
@ -63,6 +64,6 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/jnsh/arc-theme"; homepage = "https://github.com/jnsh/arc-theme";
license = licenses.gpl3Only; license = licenses.gpl3Only;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ simonvandel romildo ]; maintainers = with maintainers; [simonvandel romildo];
}; };
} }

View file

@ -1,4 +1,8 @@
{ lib, stdenv, fetchFromGitHub, }: {
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "darkcold-gtk-theme"; pname = "darkcold-gtk-theme";
version = "v5.1.0"; version = "v5.1.0";
@ -14,8 +18,8 @@ stdenv.mkDerivation {
runHook preInstall runHook preInstall
mkdir -p "$out/share/themes/darkcold/" mkdir -p "$out/share/themes/darkcold/"
cp -r * "$out/share/themes/darkcold/"; cp -r * "$out/share/themes/darkcold/";
cp userContent.css "$out/"; cp userContent.css "$out/";
runHook postInstall runHook postInstall
''; '';
@ -27,4 +31,3 @@ stdenv.mkDerivation {
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

View file

@ -12,4 +12,3 @@ pkgs: [
sddm-i3-theme = pkgs.callPackage ./sddm-i3-theme.nix {}; sddm-i3-theme = pkgs.callPackage ./sddm-i3-theme.nix {};
}) })
] ]

View file

@ -1,4 +1,8 @@
{ lib, stdenv, fetchFromGitea }: {
lib,
stdenv,
fetchFromGitea,
}:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "e17gtk-revolved"; pname = "e17gtk-revolved";
version = "2023-06-13"; version = "2023-06-13";
@ -16,7 +20,7 @@ stdenv.mkDerivation {
install -d $out/share/themes/E17gtk-revolved install -d $out/share/themes/E17gtk-revolved
cp -r * $out/share/themes/E17gtk-revolved cp -r * $out/share/themes/E17gtk-revolved
runHook postInstall runHook postInstall
''; '';
@ -27,4 +31,3 @@ stdenv.mkDerivation {
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

View file

@ -1,8 +1,22 @@
{ lib, stdenv, fetchFromGitHub, curl, expat {
, jansson, libpng, libjpeg, libGLU, libGL lib,
, libsndfile, libXxf86vm, pcre, pkg-config, SDL2 stdenv,
, vim, speex }: fetchFromGitHub,
curl,
expat,
jansson,
libpng,
libjpeg,
libGLU,
libGL,
libsndfile,
libXxf86vm,
pcre,
pkg-config,
SDL2,
vim,
speex,
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "ezquake"; pname = "ezquake";
version = "3.6.5"; version = "3.6.5";
@ -15,9 +29,21 @@ stdenv.mkDerivation rec {
hash = "sha256-Ldv//lsukn985IljXHXDClsYY+Sk1fh41s1NySWkvuE="; hash = "sha256-Ldv//lsukn985IljXHXDClsYY+Sk1fh41s1NySWkvuE=";
}; };
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [pkg-config];
buildInputs = [ buildInputs = [
expat curl jansson libpng libjpeg libGLU libGL libsndfile libXxf86vm pcre SDL2 vim speex expat
curl
jansson
libpng
libjpeg
libGLU
libGL
libsndfile
libXxf86vm
pcre
SDL2
vim
speex
]; ];
installPhase = with lib; let installPhase = with lib; let

View file

@ -1,4 +1,10 @@
{ lib, stdenv, fetchFromGitHub, gtk3, hicolor-icon-theme }: {
lib,
stdenv,
fetchFromGitHub,
gtk3,
hicolor-icon-theme,
}:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "oxylite-icon-theme"; pname = "oxylite-icon-theme";
version = "2024-04-22"; version = "2024-04-22";
@ -10,10 +16,10 @@ stdenv.mkDerivation {
hash = "sha256-syjFs2gkscdlpOmWgraj4l1+WwIaIVFZlhDY4nP99Oo="; hash = "sha256-syjFs2gkscdlpOmWgraj4l1+WwIaIVFZlhDY4nP99Oo=";
}; };
# propagatedBuildInputs = [ hicolor-icon-theme ]; # propagatedBuildInputs = [ hicolor-icon-theme ];
nativeBuildInputs = [ gtk3 ]; nativeBuildInputs = [gtk3];
# dontDropIconThemeCache = true; # dontDropIconThemeCache = true;
buildPhase = '' buildPhase = ''
runHook preBuild runHook preBuild
@ -23,20 +29,20 @@ stdenv.mkDerivation {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
prefix="$out/share/icons/oxylite"; prefix="$out/share/icons/oxylite";
mkdir -p "$prefix"; mkdir -p "$prefix";
for d in actions apps categories devices emblems emotes mimetypes places status ui; do for d in actions apps categories devices emblems emotes mimetypes places status ui; do
install -d "$prefix/$d"; install -d "$prefix/$d";
cp -ar "$d" "$prefix"; cp -ar "$d" "$prefix";
chmod -R u=rwX,g=rX,o=rX "$prefix/$d"; chmod -R u=rwX,g=rX,o=rX "$prefix/$d";
done; done;
install -m 644 index.theme "$prefix/index.theme"; install -m 644 index.theme "$prefix/index.theme";
install -m 644 licenses.yml "$prefix/licenses.yml"; install -m 644 licenses.yml "$prefix/licenses.yml";
install -m 644 README.md "$prefix/README.md"; install -m 644 README.md "$prefix/README.md";
gtk-update-icon-cache --force "$prefix" gtk-update-icon-cache --force "$prefix"
runHook postInstall runHook postInstall
''; '';
@ -47,4 +53,3 @@ stdenv.mkDerivation {
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

View file

@ -1,21 +1,25 @@
{ lib, stdenv, fetchzip }: {
lib,
stdenv,
fetchzip,
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "sddm-i3-theme"; pname = "sddm-i3-theme";
version = "1"; version = "1";
src = fetchzip { src = fetchzip {
# lol # lol
url = "http://192.168.1.12/${pname}.tar.gz"; url = "http://192.168.1.12/${pname}.tar.gz";
hash = "sha256-WGvjW3Z8TfJhAsbxUyYRKSYFucEwYzTIbpDZsLTPbyo="; hash = "sha256-WGvjW3Z8TfJhAsbxUyYRKSYFucEwYzTIbpDZsLTPbyo=";
}; };
installPhase = '' installPhase = ''
mkdir -p $out/share/sddm/themes/${pname}/ mkdir -p $out/share/sddm/themes/${pname}/
cp -r $src/* $out/share/sddm/themes/${pname}/ cp -r $src/* $out/share/sddm/themes/${pname}/
''; '';
meta = { meta = {
license = lib.licenses.mit; license = lib.licenses.mit;
platforms = lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View file

@ -1,4 +1,7 @@
{ lib, pkgs }: {
lib,
pkgs,
}:
pkgs.vimUtils.buildVimPlugin { pkgs.vimUtils.buildVimPlugin {
name = "vim-darcula-theme"; name = "vim-darcula-theme";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {

View file

@ -1,4 +1,8 @@
{ lib, stdenv, fetchzip }: {
lib,
stdenv,
fetchzip,
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "win7-cursors"; pname = "win7-cursors";
version = "1"; version = "1";
@ -28,4 +32,3 @@ stdenv.mkDerivation rec {
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

View file

@ -1,4 +1,8 @@
{ lib, stdenv, fetchFromGitHub }: {
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "winvista-cursors"; pname = "winvista-cursors";
version = "1"; version = "1";
@ -23,4 +27,3 @@ stdenv.mkDerivation {
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

View file

@ -1,4 +1,12 @@
{ lib, stdenv, fetchFromGitHub, cmake, python3, xorg, shadows ? false }: {
lib,
stdenv,
fetchFromGitHub,
cmake,
python3,
xorg,
shadows ? false,
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "winxp-cursors"; pname = "winxp-cursors";
version = "2023-11-22"; version = "2023-11-22";
@ -11,10 +19,13 @@ stdenv.mkDerivation rec {
hash = "sha256-bvkoe/L9KjMcCj5SlcNGoZKZtQwZHGYPFVSZbRfLztY="; hash = "sha256-bvkoe/L9KjMcCj5SlcNGoZKZtQwZHGYPFVSZbRfLztY=";
}; };
nativeBuildInputs = [ cmake python3 xorg.xcursorgen ]; nativeBuildInputs = [cmake python3 xorg.xcursorgen];
dontUseCmakeConfigure = true; dontUseCmakeConfigure = true;
cursor_variant = if shadows then "with-shadow" else "no-shadow"; cursor_variant =
if shadows
then "with-shadow"
else "no-shadow";
buildPhase = '' buildPhase = ''
cd packaging cd packaging
@ -34,8 +45,7 @@ stdenv.mkDerivation rec {
meta = with lib; { meta = with lib; {
description = "Windows XP Cursors"; description = "Windows XP Cursors";
homepage = "https://github.com/rozniak/xfce-winxp-tc"; homepage = "https://github.com/rozniak/xfce-winxp-tc";
license = with licenses; [ unfreeRedistributable gpl2Plus ]; license = with licenses; [unfreeRedistributable gpl2Plus];
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

View file

@ -1,4 +1,11 @@
{ lib, stdenv, fetchFromGitHub, cmake, python3, gtk3 }: {
lib,
stdenv,
fetchFromGitHub,
cmake,
python3,
gtk3,
}:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "winxp-icons"; pname = "winxp-icons";
version = "2024-03-27"; version = "2024-03-27";
@ -11,8 +18,8 @@ stdenv.mkDerivation {
hash = "sha256-bvkoe/L9KjMcCj5SlcNGoZKZtQwZHGYPFVSZbRfLztY="; hash = "sha256-bvkoe/L9KjMcCj5SlcNGoZKZtQwZHGYPFVSZbRfLztY=";
}; };
nativeBuildInputs = [ cmake python3 gtk3 ]; nativeBuildInputs = [cmake python3 gtk3];
dontUseCmakeConfigure = true; dontUseCmakeConfigure = true;
buildPhase = '' buildPhase = ''
cd packaging cd packaging
@ -33,8 +40,7 @@ stdenv.mkDerivation {
meta = with lib; { meta = with lib; {
description = "Windows XP Icons"; description = "Windows XP Icons";
homepage = "https://github.com/rozniak/xfce-winxp-tc"; homepage = "https://github.com/rozniak/xfce-winxp-tc";
license = with licenses; [ unfreeRedistributable gpl2Plus ]; license = with licenses; [unfreeRedistributable gpl2Plus];
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

View file

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

View file

@ -1,34 +1,33 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
enable = true; # TODO: this shit ain't working
hooks.postswitch = { home-manager.users.krizej.programs.autorandr = {
"notify-i3" = "${pkgs.i3}/bin/i3-msg restart"; enable = true;
}; hooks.postswitch = {
profiles = { "notify-i3" = "${pkgs.i3}/bin/i3-msg restart";
"main" = { };
fingerprint = { profiles = {
"DP-3" = "00ffffffffffff0026cd5961830600001d1f0104b5361e783b4c70a5574ea4260b5054a56b80710081408180a940b3009500950fd1c0023a801871382d40582c4500202f2100001e000000ff0031313737393132393031363637000000fd0030f0ffff3c010a202020202020000000fc00504c3235393048530a20202020019202033bf1529005040302011112131f203f140607151640e200d52309070783010000e305c301e60605016666006d1a0000020130f00000000000005a8780a070384d4030203500202f2100001ad09480a070381e4008203500202f2100001a23e88078703887401c40980c202f2100001a000000000000000000000000000063"; "main" = {
"HDMI-3" = "00ffffffffffff0026cd326162190000291c010380361e782a9055a75553a028135054a56b80710081408180a940b3009500950fd1c0023a801871382d40582c4500202f2100001e000000ff0031313534333834313036343938000000fd00374c1e5312000a202020202020000000fc00504c32353330480a2020202020016202032bf14f90050403020111121314060715161f230907078301000065030c001000681a00000101284be6023a801871382d40582c4500202f2100001f011d8018711c1620582c2500202f2100009e011d007251d01e206e285500202f2100001e2a4480a07038274030203500202f2100001a000000000000000000000000ab"; fingerprint = {
}; "DP-3" = "00ffffffffffff0026cd5961830600001d1f0104b5361e783b4c70a5574ea4260b5054a56b80710081408180a940b3009500950fd1c0023a801871382d40582c4500202f2100001e000000ff0031313737393132393031363637000000fd0030f0ffff3c010a202020202020000000fc00504c3235393048530a20202020019202033bf1529005040302011112131f203f140607151640e200d52309070783010000e305c301e60605016666006d1a0000020130f00000000000005a8780a070384d4030203500202f2100001ad09480a070381e4008203500202f2100001a23e88078703887401c40980c202f2100001a000000000000000000000000000063";
config = { "HDMI-3" = "00ffffffffffff0026cd326162190000291c010380361e782a9055a75553a028135054a56b80710081408180a940b3009500950fd1c0023a801871382d40582c4500202f2100001e000000ff0031313534333834313036343938000000fd00374c1e5312000a202020202020000000fc00504c32353330480a2020202020016202032bf14f90050403020111121314060715161f230907078301000065030c001000681a00000101284be6023a801871382d40582c4500202f2100001f011d8018711c1620582c2500202f2100009e011d007251d01e206e285500202f2100001e2a4480a07038274030203500202f2100001a000000000000000000000000ab";
"DP-3" = {
enable = true;
mode = "1920x1080";
rate = "239.76";
position = "0x0";
}; };
"HDMI-3" = { config = {
enable = true; "DP-3" = {
mode = "1920x1080"; enable = true;
rate = "74.97"; mode = "1920x1080";
primary = true; rate = "239.76";
position = "1920x0"; position = "0x0";
};
"HDMI-3" = {
enable = true;
mode = "1920x1080";
rate = "74.97";
primary = true;
position = "1920x0";
};
}; };
}; };
}; };
}; };
} }

View file

@ -1,16 +1,87 @@
[ { pkgs, ... }:
# i3 is not here because it goes into xsession.windowManager instead of into programs {
"home-manager" imports = [
"firefox" ./alacritty.nix
"alacritty" ./autorandr.nix
"fish" ./firefox.nix
"eza" ./fish.nix
"yt-dlp" ./git.nix
"rofi" ./i3.nix
"autorandr" ./ssh.nix
"i3status" ./vim.nix
"ssh" ];
"git"
"vim"
]
config = {
programs = {
dconf.enable = true;
steam.enable = true;
};
environment.systemPackages = with pkgs; [
ed # is the standard text editor.
ripgrep
eza
file
tree
btop
unzip
wget
gcc
gnumake
pkg-config
python39
];
# maybe i can just put it into the packages but idk whatever
home-manager.users.krizej.programs = {
home-manager.enable = true;
eza.enable = true;
yt-dlp.enable = true;
};
home-manager.users.krizej.home.packages = with pkgs; [
fortune
xarchiver
gvfs
yad
pcmanfm
pavucontrol
pamixer
element-desktop
discord
gamemode
ezquake
vkquake
ericw-tools
trenchbroom
r2modman
libreoffice-qt
gimp
sqlitebrowser
feh
wineWowPackages.stable
winetricks
gdb
ccls
clang-tools
tcl
gpu-screen-recorder # todo: config this shit so it works
gpu-screen-recorder-gtk
obs-studio
jetbrains.pycharm-community
jetbrains.clion
(pkgs.writeShellScriptBin "clion-nix" ''
cd ~/projects/$1
nix-shell --run "clion ."
'')
];
};
}

View file

@ -1,26 +1,27 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
enable = true; home-manager.users.krizej.programs.firefox = {
policies = { enable = true;
DisableTelemetry = true; policies = {
DisableFirefoxStudies = true; DisableTelemetry = true;
EnableTrackingProtection = { DisableFirefoxStudies = true;
Value = true; EnableTrackingProtection = {
Locked = true; Value = true;
Cryptomining = true; Locked = true;
Fingerprinting = true; Cryptomining = true;
}; Fingerprinting = true;
DisablePocket = true; };
DisableFirefoxAccounts = true; DisablePocket = true;
DisableAccounts = true; DisableFirefoxAccounts = true;
DisableFirefoxScreenshots = true; DisableAccounts = true;
OverridePostUpdatePage = ""; DisableFirefoxScreenshots = true;
DontCheckDefaultBrowser = true; OverridePostUpdatePage = "";
DisplayBookmarksToolbar = "always"; DontCheckDefaultBrowser = true;
DisplayMenuBar = "default-off"; DisplayBookmarksToolbar = "always";
SearchBar = "unified"; DisplayMenuBar = "default-off";
DefaultDownloadDirectory = "$HOME/downloads"; SearchBar = "unified";
ExtensionSettings = { DefaultDownloadDirectory = "$HOME/downloads";
ExtensionSettings = {
# ublock origin # ublock origin
"uBlock0@raymondhill.net" = { "uBlock0@raymondhill.net" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
@ -36,60 +37,62 @@
install_url = "https://addons.mozilla.org/firefox/downloads/file/4251917/latest.xpi"; install_url = "https://addons.mozilla.org/firefox/downloads/file/4251917/latest.xpi";
installation_mode = "force_installed"; 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?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" ];
};
# the rest can fuck off
"Bing".metaData.hidden = true;
"DuckDuckGo".metaData.hidden = true;
}; };
}; };
settings = { profiles.krizej = {
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; id = 0;
"services.sync.prefs.sync.extensions.activeThemeID" = "false"; 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"];
};
# 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,21 +1,96 @@
{...}: { pkgs, ... }:
{ {
enable = true; environment.systemPackages = [ pkgs.fish ];
programs.fish.enable = true;
shellAliases = { users.users.krizej.shell = pkgs.fish;
"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";
};
shellAbbrs = { programs.fish.promptInit = ''
"2clip" = "xclip -selection clipboard"; ${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source
}; '';
functions = { home-manager.users.krizej.programs.fish = {
"fish_greeting" = "fortune"; enable = true;
"fish_prompt" = builtins.readFile ../files/prompt.fish;
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";
};
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,8 +1,10 @@
{...}: { pkgs, ... }:
{ {
enable = true; environment.systemPackages = [ pkgs.git ];
userName = "krizej"; home-manager.users.krizej.programs.git = {
userEmail = "60076189+krizej@users.noreply.github.com"; enable = true;
# init.defaultBranch = "master"; userName = "krizej";
# push.autoSetupRemote = true; userEmail = "60076189+krizej@users.noreply.github.com";
extraConfig.init.defaultBranch = "master";
};
} }

View file

@ -1,167 +1,247 @@
{ pkgs, ... }: { config, pkgs, ... }:
{ let
enable = true; HOME = config.home-manager.users.krizej.home.homeDirectory;
config = rec { in {
assigns = { services.xserver.windowManager.i3.enable = true;
"2" = [ home-manager.users.krizej = {
{ class = "discord"; } xsession.windowManager.i3 = {
{ class = "SchildiChat"; } enable = true;
{ class = "element"; } config = rec {
]; assigns = {
}; "2" = [
{ class = "discord"; }
window = { { class = "SchildiChat"; }
border = 1; { class = "element"; }
titlebar = false; ];
}; };
floating = { window = {
border = 1; border = 1;
titlebar = true; titlebar = true;
criteria = [ };
{ class = "zenity"; }
{ class = "fceux"; }
{ title = "Friends List"; } # steam
];
};
gaps = { floating = {
inner = 0; border = 1;
outer = 0; titlebar = true;
}; criteria = [
{ class = "zenity"; }
fonts = { { class = "fceux"; }
names = ["JetBrains Mono NL"]; { title = "Friends List"; }
size = 10.0; ];
}; };
bars = [{ gaps = {
inherit fonts; inner = 0;
trayOutput = "primary"; outer = 0;
statusCommand = "${pkgs.i3status}/bin/i3status"; };
}];
defaultWorkspace = "workspace number 1"; fonts = {
workspaceOutputAssign = [ names = [ "JetBrains Mono NL" ];
{ workspace = "1"; output = "DP-3"; } size = 10.0;
{ workspace = "2"; output = "HDMI-3"; } };
];
focus = { bars = [
followMouse = true; {
mouseWarping = true; inherit fonts;
newWindow = "urgent"; trayOutput = "primary";
}; statusCommand = "${pkgs.i3status}/bin/i3status";
}
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; } defaultWorkspace = "workspace number 1";
# { command = "lcd-bar-status &"; notification = false; } workspaceOutputAssign = [
{ workspace = "1"; output = "DP-3"; }
{ workspace = "2"; output = "HDMI-3"; }
];
{ command = "i3bar-mouse &"; notification = false; } focus = {
followMouse = true;
mouseWarping = true;
newWindow = "urgent";
};
# { command = "hydration.sh &"; notification = false; } startup = [
# { 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 = "i3-msg \"workspace 2; append_layout ~/.config/i3/workspace2.json\""; notification = false; }
{ command = "discord &"; notification = false; } { command = "discord &"; notification = false; }
{ command = "element-desktop &"; notification = false; } { command = "element-desktop &"; notification = false; }
# { command = "xrandr --output DP-3 --mode 1920x1080 --rate 239.76 --primary --output HDMI-3 --mode 1920x1080 --rate 74.97 --right-of DP-3 &"; notification = false; }
];
modes = let # { command = "xrandr --output DP-3 --mode 1920x1080 --rate 239.76 --primary --output HDMI-3 --mode 1920x1080 --rate 74.97 --right-of DP-3 &"; notification = false; }
cmd_and_center = (cmd: "exec --no-startup-id i3-msg '${cmd}' && i3-center-mouse-on-focus"); ];
in {
resize = { modes = let
"Left" = cmd_and_center "resize shrink width 10 px or 10 ppt"; cmd_and_center = cmd: "exec --no-startup-id i3-msg '${cmd}' && i3-center-mouse-on-focus";
"Right" = cmd_and_center "resize grow width 10 px or 10 ppt"; in {
"Up" = cmd_and_center "resize shrink height 10 px or 10 ppt"; resize = {
"Down" = cmd_and_center "resize grow height 10 px or 10 ppt"; "Left" = cmd_and_center "resize shrink width 10 px or 10 ppt";
"Escape" = "mode default"; "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";
};
}; };
}; };
modifier = "Mod4"; programs.i3status = {
floating.modifier = "Mod4"; enable = true;
keybindings = let enableDefault = false;
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} rofi -show drun";
# hack, see i3 user doc for --release flag
"--release ${mod}+k" = "exec xkill";
# Volume control general = {
"Ctrl+F9" = "${execns} pamixer --toggle-mute"; interval = 1;
"Ctrl+F10" = "${execns} pamixer --decrease 5"; colors = true;
"Ctrl+F11" = "${execns} pamixer --increase 5"; color_good = "#91d956";
color_bad = "#f43841";
color_degraded = "#ffdd33";
output_format = "i3bar";
};
# MPD controls modules = {
# "Ctrl+F5" = "exec ~/music/select_music.sh"; "cpu_usage" = {
# "Ctrl+F6" = "exec mpc prev"; position = 0;
# "Ctrl+F7" = "exec mpc toggle"; settings = {
# "Ctrl+F8" = "exec mpc next"; format = "cpu: %usage";
# "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 "memory" = {
"${mod}+f" = cmd_and_center "fullscreen toggle"; position = 1;
"${mod}+r" = "mode resize"; settings = {
"${mod}+Shift+q" = cmd_and_center "kill"; format = "mem: %used";
"${mod}+Shift+r" = "restart"; threshold_degraded = "1G";
"${mod}+Shift+e" = "${execns} i3-nagbar -t warning -m 'exit?' -b 'yes' 'i3-msg exit'"; format_degraded = "MEMORY < %available";
# Mouse bindings };
# "--border --whole-window button8" = "${execns} i3custom-window-actions"; };
"${mod}+Left" = cmd_and_center "focus left"; "volume master" = {
"${mod}+Right" = cmd_and_center "focus right"; position = 2;
"${mod}+Up" = cmd_and_center "focus up"; settings = {
"${mod}+Down" = cmd_and_center "focus down"; color_degraded = "#333333";
"${mod}+Shift+Left" = cmd_and_center "move left"; format = "vol: %volume";
"${mod}+Shift+Right" = cmd_and_center "move right"; format_muted = "vol: ---";
"${mod}+Shift+Up" = cmd_and_center "move up"; };
"${mod}+Shift+Down" = cmd_and_center "move down"; };
"${mod}+q" = cmd_and_center "layout stacking"; "tztime local" = {
"${mod}+w" = cmd_and_center "layout tabbed"; position = 3;
"${mod}+e" = cmd_and_center "layout toggle split"; settings = {
format = "%Y-%m-%d %H:%M:%S (%A)";
};
};
};
};
"${mod}+Shift+space" = "${execns} i3custom-floating-toggle && i3custom-center-mouse-on-focus"; home.packages = with pkgs; [
"${mod}+space" = cmd_and_center "focus mode_toggle"; (pkgs.writeShellScriptBin "i3custom-center-mouse-on-focus" ''
eval $(xdotool getwindowfocus getwindowgeometry --shell)
MX=$(($X + $WIDTH / 2))
MY=$(($Y + $HEIGHT / 2))
xdotool mousemove $MX $MY
'')
"${mod}+1" = cmd_and_center "workspace number 1"; (pkgs.writeShellScriptBin "i3custom-window-actions" ''
"${mod}+2" = cmd_and_center "workspace number 2"; yad --splash --mouse --title="i3 window actions" \
"${mod}+3" = cmd_and_center "workspace number 3"; --gtkrc="${HOME}/.config/i3/i3gtk.css" \
"${mod}+4" = cmd_and_center "workspace number 4"; --text="i3 window actions" \
"${mod}+5" = cmd_and_center "workspace number 5"; --button float:0 --button kill:1
"${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"; case $? in
"${mod}+Shift+2" = cmd_and_center "move container to workspace number 2"; 0) i3-msg "floating toggle";;
"${mod}+Shift+3" = cmd_and_center "move container to workspace number 3"; 1) i3-msg "kill";;
"${mod}+Shift+4" = cmd_and_center "move container to workspace number 4"; -1) ;;
"${mod}+Shift+5" = cmd_and_center "move container to workspace number 5"; esac
"${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"; (pkgs.writeShellScriptBin "i3custom-floating-toggle" ''
"${mod}+Shift+9" = cmd_and_center "move container to workspace number 9"; 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;"
"${mod}+Shift+0" = cmd_and_center "move container to workspace number 10"; '')
];
home.file = {
".config/i3/workspace2.json".source = ../files/workspace2.json;
".config/i3/i3gtk.css".source = ../files/i3gtk.css;
}; };
}; };
} }

View file

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

View file

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

View file

@ -1,2 +1,5 @@
i have no idea what i'm doing i have no idea what i'm doing
todo:
- fix formatting in pkgs/
- laptop config

View file

@ -1,6 +1,9 @@
[ { ... }:
"picom" {
"flameshot" imports = [
"dunst" ./dunst.nix
] ./flameshot.nix
./sddm.nix
./xserver.nix
];
}

View file

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

View file

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

View file

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

View file

@ -0,0 +1,49 @@
{ config, lib, pkgs, ... }:
{
services = {
xserver = {
enable = true;
xkb.layout = "pl";
displayManager = {
# THIS SHIT DOESN'T WORK!!!
setupCommands = ''
xrandr --output DP-3 --mode 1920x1080 --rate 239.76 --primary
xrandr --output HDMI-1 --off
xset r rate 180 50
'';
sessionCommands = ''
xrandr --output DP-3 --mode 1920x1080 --rate 239.76 --primary
xrandr --output HDMI-1 --mode 1920x1080 --rate 74.97 --right-of DP-3
xset r rate 180 50
'';
};
# THIS SHIT DOESN'T WORK!!!
autoRepeatDelay = 180;
autoRepeatInterval = 50;
};
};
home-manager.users.krizej.xsession.enable = true;
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";
# };
# };
}