Compare commits

...

5 commits

Author SHA1 Message Date
krizej
fa2bff4aca autorandr works!!!! 2024-07-10 19:54:20 +02:00
krizej
eb6bbf5962 ok i'm too lazy to seperate allat 2024-07-10 15:01:17 +02:00
krizej
c6c42d00dd amdvlk 2024-07-10 14:05:49 +02:00
krizej
0b46b2fdb3 update flake 2024-07-10 14:05:01 +02:00
krizej
916f492909 gnome 2024-07-10 14:04:50 +02:00
10 changed files with 175 additions and 89 deletions

View file

@ -1,64 +1,64 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1719827439,
"narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "59ce796b2563e19821361abbe2067c3bb4143a7d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1719848872,
"narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1719938409,
"narHash": "sha256-GzmLs/YaKAzpTQr9u4VpU0ISGtBluAyx9qTZC/86wb4=",
"owner": "nix-community",
"repo": "NUR",
"rev": "1ec5b968d5751a0c817b7e56974059d01b348bf2",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nur": "nur"
}
}
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1720167120,
"narHash": "sha256-K9JYdlPiyaXp33JRg7CT8rMwH56e4ncXSsXW/YKnNXc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "bbe6e94737289c8cb92d4d8f9199fbfe4f11c0ba",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1720031269,
"narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9f4128e00b0ae8ec65918efeba59db998750ead6",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1720179576,
"narHash": "sha256-4xPwUqy7DclUIgL7E2LpHLwXRWFZuIvZAIVZGmeOI64=",
"owner": "nix-community",
"repo": "NUR",
"rev": "d133dd578e4610c60dba865df97ba1f4da282de8",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nur": "nur"
}
}
},
"root": "root",
"version": 7
}
}

View file

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

View file

@ -19,6 +19,8 @@
initrd.kernelModules = [ "amdgpu" ];
};
hardware.amdgpu.amdvlk.enable = true;
time.timeZone = "Europe/Warsaw";
sound.enable = true;
@ -40,5 +42,6 @@
};
};
environment.localBinInPath = true;
environment.systemPackages = [ pkgs.ntfs3g ];
}

View file

@ -6,7 +6,7 @@
meson,
ninja,
glib,
gnome,
gnome-themes-extra,
gtk-engine-murrine,
inkscape,
cinnamon,
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
];
propagatedUserEnvPkgs = [
gnome.gnome-themes-extra
gnome-themes-extra
gtk-engine-murrine
];

View file

@ -1,15 +1,16 @@
pkgs: [
{ pkgs, ... }: with 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 {};
darkcold-gtk-theme = pkgs.callPackage ./darkcold-gtk-theme.nix {};
arc-mono-gtk-theme = pkgs.callPackage ./arc-mono-gtk-theme.nix {};
vim-darcula-theme = pkgs.callPackage ./vim-darcula-theme.nix {};
sddm-i3-theme = pkgs.callPackage ./sddm-i3-theme.nix {};
winvista-cursors = callPackage ./winvista-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 {};
ericw-tools-latest = callPackage ./ericw-tools-latest.nix {};
i3status = prev.i3status.overrideAttrs (_: { patches = [ ../files/i3status.patch ]; });
})
]

View file

@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchzip,
autoPatchelfHook,
qt5,
tbb,
...
}:
stdenv.mkDerivation rec {
pname = "ericw-tools-latest";
version = "2.0.0-alpha8";
src = fetchzip {
url = "https://github.com/ericwa/ericw-tools/releases/download/2.0.0-alpha8/ericw-tools-2.0.0-alpha8-Linux.zip";
hash = "sha256-F1DyyWNeWAiVEk8Bv1ZFs1TuYyfkwCc5jd+ulA+qRhA=";
stripRoot = false;
};
nativeBuildInputs = [
qt5.wrapQtAppsHook
autoPatchelfHook
];
buildInputs = [
qt5.qtbase
stdenv.cc.cc
tbb
];
installPhase = ''
runHook preInstall
for lib in libembree3.so.3 libtbb.so.12; do
install -m755 -D $lib $out/lib/$lib
done
for tool in bspinfo lightpreview qbsp vis maputil light bsputil; do
install -m755 -D $tool $out/bin/$tool
done
runHook postInstall
'';
}

View file

@ -1,25 +1,21 @@
{ pkgs, ... }:
{
# TODO: this shit ain't working
home-manager.users.krizej.programs.autorandr = {
enable = true;
hooks.postswitch = {
"notify-i3" = "${pkgs.i3}/bin/i3-msg restart";
};
profiles = {
"main" = {
fingerprint = {
"DP-3" = "00ffffffffffff0026cd5961830600001d1f0104b5361e783b4c70a5574ea4260b5054a56b80710081408180a940b3009500950fd1c0023a801871382d40582c4500202f2100001e000000ff0031313737393132393031363637000000fd0030f0ffff3c010a202020202020000000fc00504c3235393048530a20202020019202033bf1529005040302011112131f203f140607151640e200d52309070783010000e305c301e60605016666006d1a0000020130f00000000000005a8780a070384d4030203500202f2100001ad09480a070381e4008203500202f2100001a23e88078703887401c40980c202f2100001a000000000000000000000000000063";
"HDMI-3" = "00ffffffffffff0026cd326162190000291c010380361e782a9055a75553a028135054a56b80710081408180a940b3009500950fd1c0023a801871382d40582c4500202f2100001e000000ff0031313534333834313036343938000000fd00374c1e5312000a202020202020000000fc00504c32353330480a2020202020016202032bf14f90050403020111121314060715161f230907078301000065030c001000681a00000101284be6023a801871382d40582c4500202f2100001f011d8018711c1620582c2500202f2100009e011d007251d01e206e285500202f2100001e2a4480a07038274030203500202f2100001a000000000000000000000000ab";
"Left" = "00ffffffffffff0026cd5961830600001d1f0104b5361e783b4c70a5574ea4260b5054a56b80710081408180a940b3009500950fd1c0023a801871382d40582c4500202f2100001e000000ff0031313737393132393031363637000000fd0030f0ffff3c010a202020202020000000fc00504c3235393048530a20202020019202033bf1529005040302011112131f203f140607151640e200d52309070783010000e305c301e60605016666006d1a0000020130f00000000000005a8780a070384d4030203500202f2100001ad09480a070381e4008203500202f2100001a23e88078703887401c40980c202f2100001a000000000000000000000000000063";
"Right" = "00ffffffffffff0026cd326162190000291c010380361e782a9055a75553a028135054a56b80710081408180a940b3009500950fd1c0023a801871382d40582c4500202f2100001e000000ff0031313534333834313036343938000000fd00374c1e5312000a202020202020000000fc00504c32353330480a2020202020016202032bf14f90050403020111121314060715161f230907078301000065030c001000681a00000101284be6023a801871382d40582c4500202f2100001f011d8018711c1620582c2500202f2100009e011d007251d01e206e285500202f2100001e2a4480a07038274030203500202f2100001a000000000000000000000000ab";
};
config = {
"DP-3" = {
"Left" = {
enable = true;
mode = "1920x1080";
rate = "239.76";
position = "0x0";
};
"HDMI-3" = {
"Right" = {
enable = true;
mode = "1920x1080";
rate = "74.97";
@ -30,4 +26,18 @@
};
};
};
# 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

@ -43,7 +43,9 @@
xarchiver
gvfs
yad
pcmanfm
xfce.thunar
xfce.thunar-volman
xfce.thunar-archive-plugin
pavucontrol
pamixer
@ -54,14 +56,18 @@
gamemode
ezquake
vkquake
ericw-tools
ericw-tools-latest
embree # for ericw-tools
tbb # for ericw-tools
trenchbroom
r2modman
godot_4
libreoffice-qt
gimp
sqlitebrowser
feh
vlc
wineWowPackages.stable
winetricks
@ -70,6 +76,8 @@
ccls
clang-tools
tcl
valgrind
linuxKernel.packages.linux_6_6.perf
gpu-screen-recorder # todo: config this shit so it works
gpu-screen-recorder-gtk

View file

@ -1,6 +1,7 @@
{ config, pkgs, ... }:
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 = {
@ -50,8 +51,8 @@ in {
defaultWorkspace = "workspace number 1";
workspaceOutputAssign = [
{ workspace = "1"; output = "DP-3"; }
{ workspace = "2"; output = "HDMI-3"; }
{ workspace = "1"; output = "DisplayPort-2"; } # monitors.left; }
{ workspace = "2"; output = "HDMI-A-0"; } # monitors.right; }
];
focus = {
@ -68,8 +69,6 @@ in {
{ command = "i3-msg \"workspace 2; append_layout ~/.config/i3/workspace2.json\""; notification = false; }
{ command = "discord &"; 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
@ -242,6 +241,7 @@ in {
home.file = {
".config/i3/workspace2.json".source = ../files/workspace2.json;
".config/i3/i3gtk.css".source = ../files/i3gtk.css;
"dupa".text = "[${monitors.left}][${monitors.right}]";
};
};
}

20
utils/monitors.nix Normal file
View file

@ -0,0 +1,20 @@
# fixme: when rebuiling the commands are ran as some nixos builder user probably and autorandr does not use my config
{ pkgs, ... }: let
autorandr = "${pkgs.autorandr}/bin/autorandr";
rg = "${pkgs.ripgrep}/bin/rg";
rev = "${pkgs.util-linux}/bin/rev";
cut = "${pkgs.coreutils-full}/bin/cut";
# epically stolen from https://git.jacekpoz.pl/jacekpoz/nte/src/branch/master/stdlib.nix
# but i changed lib.strings.readFile to lib.fileContents
inherit (pkgs) lib runCommand;
inherit (lib) fileContents;
run = script: builtins.toString (runCommand "run" {} ''
echo $(${script}) > $out
'');
in {
# this parses "main: renaming display Left to DisplayPort-2"
# and i am interested in "DisplayPort-2"
# and also it's printed to stderr so 2>&1
left = run "${autorandr} --match-edid 2>&1 | ${rg} Left | ${rev} | ${cut} -d' ' -f1 | ${rev}";
right = run "${autorandr} --match-edid 2>&1 | ${rg} Right | ${rev} | ${cut} -d' ' -f1 | ${rev}";
}