diff --git a/files/aero-drop.tar.gz b/files/aero-drop.tar.gz new file mode 100644 index 0000000..1b616a6 Binary files /dev/null and b/files/aero-drop.tar.gz differ diff --git a/flake.lock b/flake.lock index 1229e0a..289fd8f 100644 --- a/flake.lock +++ b/flake.lock @@ -59,11 +59,11 @@ ] }, "locked": { - "lastModified": 1726357542, - "narHash": "sha256-p4OrJL2weh0TRtaeu1fmNYP6+TOp/W2qdaIJxxQay4c=", + "lastModified": 1729027341, + "narHash": "sha256-IqWD7bA9iJVifvJlB4vs2KUXVhN+d9lECWdNB4jJ0tE=", "owner": "nix-community", "repo": "home-manager", - "rev": "e524c57b1fa55d6ca9d8354c6ce1e538d2a1f47f", + "rev": "2a4fd1cfd8ed5648583dadef86966a8231024221", "type": "github" }, "original": { @@ -74,11 +74,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1725885300, - "narHash": "sha256-5RLEnou1/GJQl+Wd+Bxaj7QY7FFQ9wjnFq1VNEaxTmc=", + "lastModified": 1728729581, + "narHash": "sha256-oazkQ/z7r43YkDLLQdMg8oIB3CwWNb+2ZrYOxtLEWTQ=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "166dee4f88a7e3ba1b7a243edb1aca822f00680e", + "rev": "a8dd1b21995964b115b1e3ec639dd6ce24ab9806", "type": "github" }, "original": { @@ -90,11 +90,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1726062873, - "narHash": "sha256-IiA3jfbR7K/B5+9byVi9BZGWTD4VSbWe8VLpp9B/iYk=", + "lastModified": 1728888510, + "narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4f807e8940284ad7925ebd0a0993d2a1791acb2f", + "rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", "type": "github" }, "original": { @@ -120,27 +120,11 @@ "type": "github" } }, - "nur": { - "locked": { - "lastModified": 1726387027, - "narHash": "sha256-5nC1vhaMB0avDLa38UEUNgvl189xQ4tI3olDoGb//XY=", - "owner": "nix-community", - "repo": "NUR", - "rev": "87e71e19db7075e0ce696387d85d73000e6a6f2e", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, "root": { "inputs": { "home-manager": "home-manager", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", - "nur": "nur", "zed": "zed" } }, @@ -169,11 +153,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1727466124, - "narHash": "sha256-jMEIkl6rJFBHyhr020Aw2VI27Q5ac3LHEYHBDMCcfpw=", + "lastModified": 1729060364, + "narHash": "sha256-27GHWnUg29ps6qU/LR7JCsrzaJQdi7X72315h32Vcz8=", "owner": "zed-industries", "repo": "zed", - "rev": "d5f67406b0b7eb9ffd261b79467d17c1dc28a041", + "rev": "f944ebc4cbc6deb55cfbd6b0466631ea8d3e56a7", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f4e3be2..0ad7a05 100644 --- a/flake.nix +++ b/flake.nix @@ -9,8 +9,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - nur.url = "github:nix-community/NUR"; - nixos-hardware.url = "github:nixos/nixos-hardware/master"; zed.url = "github:zed-industries/zed"; diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 1ff3503..4678c29 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -9,9 +9,11 @@ primary = "DisplayPort-1"; secondary = "HDMI-A-0"; }; - user = config.chuj.system.user; + inherit (config.chuj.system) user; in { - hardware.amdgpu.amdvlk.enable = true; + # omfg please + # https://github.com/NixOS/nixpkgs/issues/348903 + # hardware.amdgpu.amdvlk.enable = true; boot = { loader = { timeout = 2; @@ -34,7 +36,6 @@ home-manager.users.${user}.home.packages = with pkgs; [ pamixer - kicad sqlitebrowser obs-studio yt-dlp @@ -42,11 +43,10 @@ cloc viu qbittorrent - jetbrains.idea-community-bin + # jetbrains.idea-community-bin zed-editor mumble blender - godot_4 ]; diff --git a/modules/stuff/alacritty.nix b/modules/stuff/alacritty.nix index d73c0ab..aa14d00 100644 --- a/modules/stuff/alacritty.nix +++ b/modules/stuff/alacritty.nix @@ -23,6 +23,7 @@ in { unfocused_hollow = false; }; colors = { + # todo: make some sort of theme.nix with a bunch of colors primary = { foreground = "#e4e4ef"; background = "#181818"; diff --git a/modules/stuff/autorandr.nix b/modules/stuff/autorandr.nix index c23e9e5..04fc977 100644 --- a/modules/stuff/autorandr.nix +++ b/modules/stuff/autorandr.nix @@ -5,6 +5,7 @@ in { options.chuj.stuff.autorandr = { enable = mkEnableOption "autorandr"; + # TODO: proper types for these maybe idk fingerprint = mkOption { type = types.attrs; default = null; @@ -14,7 +15,7 @@ in { default = null; }; }; - + config = mkIf cfg.enable { home-manager.users.${user} = { programs.autorandr = { diff --git a/modules/stuff/dunst.nix b/modules/stuff/dunst.nix index ceb209d..ef5e67a 100644 --- a/modules/stuff/dunst.nix +++ b/modules/stuff/dunst.nix @@ -23,6 +23,7 @@ in { monitor = if cfg.output != null then cfg.output else 0; origin = "bottom-${cfg.side}"; frame_width = 1; + # todo: theme.nix background = "#333333"; foreground = "#feeeee"; font = "JetBrains Mono NL 10"; diff --git a/modules/stuff/firefox.nix b/modules/stuff/firefox.nix index 788a524..02a09cb 100644 --- a/modules/stuff/firefox.nix +++ b/modules/stuff/firefox.nix @@ -10,6 +10,7 @@ in { config = mkIf cfg.enable { home-manager.users.${user}.programs.firefox = { enable = true; + package = pkgs.firefox-bin; policies = { DisableTelemetry = true; DisableFirefoxStudies = true; diff --git a/modules/stuff/fish.nix b/modules/stuff/fish.nix index 645c119..cf35b9c 100644 --- a/modules/stuff/fish.nix +++ b/modules/stuff/fish.nix @@ -25,6 +25,7 @@ in { home-manager.users.${user}.programs.fish = { enable = true; + # todo: move some to abbrs shellAliases = mergeAttrs { "ls" = "${pkgs.eza}/bin/eza -lhs type"; "cp" = "cp -v"; @@ -39,7 +40,7 @@ in { "rebuild" = "ulimit -n 4096 && sudo nixos-rebuild switch --flake ~/nix#${hostname} -v"; } cfg.extraAliases; - shellAbbrs = { # mkif xclip in pkgs + shellAbbrs = { # todo: mkif xclip in pkgs "2clip" = "xclip -selection clipboard"; }; diff --git a/modules/stuff/flameshot.nix b/modules/stuff/flameshot.nix index 087e353..700828e 100644 --- a/modules/stuff/flameshot.nix +++ b/modules/stuff/flameshot.nix @@ -11,6 +11,8 @@ in { services.flameshot = { enable = true; settings = { + # todo: add some shit (userColors, ui colors, check the other stuff) + # https://github.com/flameshot-org/flameshot/blob/master/flameshot.example.ini General = { disabledTrayIcon = true; showStartupLaunchMessage = false; diff --git a/modules/stuff/gaming.nix b/modules/stuff/gaming.nix index 6d61aed..91d8fc3 100644 --- a/modules/stuff/gaming.nix +++ b/modules/stuff/gaming.nix @@ -16,17 +16,18 @@ in { exe = mkOption { type = types.str; }; }; }); - default = []; + default = []; }; }; - + config = mkIf cfg.enable { programs.steam.enable = cfg.steam; home-manager.users.${user}.home.packages = with pkgs; ([ wineWowPackages.stable winetricks - protontricks + # vvv this shit doesn't build xd + # protontricks ] ++ forEach cfg.scripts (s: (pkgs.writeShellScriptBin s.name '' cd ~/games/${s.name} diff --git a/modules/stuff/git.nix b/modules/stuff/git.nix index d17f133..04a2cfd 100644 --- a/modules/stuff/git.nix +++ b/modules/stuff/git.nix @@ -7,7 +7,7 @@ in { enable = mkEnableOption "git"; }; config = mkIf cfg.enable { - environment.systemPackages = [ pkgs.git ]; + environment.systemPackages = [ pkgs.git pkgs.codeberg-cli ]; home-manager.users.${user}.programs.git = { enable = true; userName = "krizej"; diff --git a/modules/stuff/i3.nix b/modules/stuff/i3.nix index c0cce6a..8a10424 100644 --- a/modules/stuff/i3.nix +++ b/modules/stuff/i3.nix @@ -42,7 +42,7 @@ in { default = {}; }; }; - + config = let HOME = config.home-manager.users.${user}.home.homeDirectory; in mkIf cfg.enable { @@ -70,7 +70,7 @@ in { criteria = [ { class = "zenity"; } { class = "fceux"; } - { title = "Friends List"; } + { title = "Friends List"; } # steam ]; }; @@ -80,6 +80,7 @@ in { }; fonts = { + # todo: include font in theme.nix? names = [ "JetBrains Mono NL" ]; size = 10.0; }; @@ -88,7 +89,7 @@ in { workspaceOutputAssign = lib.mapAttrsToList (workspace: output: { inherit workspace output; }) - cfg.workspaceOutput; + cfg.workspaceOutput; focus = { followMouse = true; @@ -111,7 +112,7 @@ in { while true; do sleep 1 & wait - + status=$(mpc status | sed -n 2p | cut -d' ' -f1) title=$(basename "$(mpc current -f '%file%')" .mp3) echo "$status $title" > /tmp/i3-mpd-status-stuff @@ -137,10 +138,21 @@ in { floating.modifier = "Mod4"; keybindings = with config.chuj.stuff.i3.mediaKeys; let + killall = "${pkgs.killall}/bin/killall"; mod = modifier; execns = "exec --no-startup-id"; + i3-msg = ""; + terminal = ""; + flameshot = ""; + firefox = ""; + dmenu_run = ""; + xkill = ""; + pamixer = ""; + i3custom-window-actions = ""; + dunstify = ""; + mpc = ""; + in let cmd_and_center = cmd: "${execns} i3-msg '${cmd}' && i3custom-center-mouse-on-focus"; - killall = "${pkgs.killall}/bin/killall"; update_mpdstatus = "${killall} -USR1 mpdstatus && sleep 0.05"; # hack as fack xd update_i3status = "${killall} -USR1 i3status"; in mergeAttrs { @@ -161,7 +173,6 @@ in { "${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"; @@ -204,21 +215,22 @@ in { "${mod}+Shift+0" = cmd_and_center "move container to workspace number 10"; } (optionalAttrs config.chuj.stuff.mpd.enable { # MPD controls - "Ctrl+${musicMenu}" = "exec mpdfdial.sh && ${update_mpdstatus} && ${update_i3status}"; - "Ctrl+${musicPrev}" = "exec mpc prev && ${update_mpdstatus} && ${update_i3status}"; - "Ctrl+${musicPlay}" = "exec mpc toggle && ${update_mpdstatus} && ${update_i3status}"; - "Ctrl+${musicNext}" = "exec mpc next && ${update_mpdstatus} && ${update_i3status}"; - "Ctrl+Shift+${musicPrev}" = "exec mpc seek -3"; - "Ctrl+Shift+${musicPlay}" = "exec mpc clear && ${update_mpdstatus} && ${update_i3status}"; - "Ctrl+Shift+${musicNext}" = "exec mpc seek +3"; - "Ctrl+Shift+${audioDown}" = ''exec mpc volume -5 && dunstify "mpc $(mpc volume)" -r 420''; - "Ctrl+Shift+${audioUp}" = ''exec mpc volume +5 && dunstify "mpc $(mpc volume)" -r 420''; + "Ctrl+${musicMenu}" = "${execns} mpdfdial.sh && ${update_mpdstatus} && ${update_i3status}"; + "Ctrl+${musicPrev}" = "${execns} mpc prev && ${update_mpdstatus} && ${update_i3status}"; + "Ctrl+${musicPlay}" = "${execns} mpc toggle && ${update_mpdstatus} && ${update_i3status}"; + "Ctrl+${musicNext}" = "${execns} mpc next && ${update_mpdstatus} && ${update_i3status}"; + "Ctrl+Shift+${musicPrev}" = "${execns} mpc seek -3"; + "Ctrl+Shift+${musicPlay}" = "${execns} mpc clear && ${update_mpdstatus} && ${update_i3status}"; + "Ctrl+Shift+${musicNext}" = "${execns} mpc seek +3"; + "Ctrl+Shift+${audioDown}" = ''${execns} mpc volume -5 && dunstify "mpc $(mpc volume)" -r 420''; + "Ctrl+Shift+${audioUp}" = ''${execns} mpc volume +5 && dunstify "mpc $(mpc volume)" -r 420''; }); bars = [ { inherit fonts; trayOutput = "primary"; + # todo: getexe statusCommand = "${pkgs.i3status}/bin/i3status"; } ]; @@ -232,6 +244,7 @@ in { general = { interval = 1; colors = true; + # todo: theme.nix? color_good = "#91d956"; color_bad = "#f43841"; color_degraded = "#ffdd33"; @@ -300,16 +313,21 @@ in { ]; }; - home.packages = with pkgs; [ - (pkgs.writeShellScriptBin "i3custom-center-mouse-on-focus" '' + home.packages = with pkgs; let + xdotool = ""; + yad = ""; + i3gtk = ""; + i3-msg = ""; + in [ + (writeShellScriptBin "i3custom-center-mouse-on-focus" '' eval $(xdotool getwindowfocus getwindowgeometry --shell) MX=$(($X + $WIDTH / 2)) MY=$(($Y + $HEIGHT / 2)) xdotool mousemove $MX $MY '') - (pkgs.writeShellScriptBin "i3custom-window-actions" '' - ${pkgs.yad}/bin/yad --splash --mouse \ + (writeShellScriptBin "i3custom-window-actions" '' + ${yad}/bin/yad --splash --mouse \ --title="i3 window actions" \ --gtkrc="${HOME}/.config/i3/i3gtk.css" \ --text="i3 window actions" \ @@ -322,11 +340,12 @@ in { esac '') - (pkgs.writeShellScriptBin "i3custom-floating-toggle" '' + (writeShellScriptBin "i3custom-floating-toggle" '' i3-msg "mark --add _; [con_mark=f] floating disable, border pixel 1, mark --add --toggle _; [con_mark=_] floating enable, border normal; mark --add --toggle f;" '') ]; + # todo: remove home.file = { ".config/i3/i3gtk.css".source = ../../files/i3gtk.css; }; diff --git a/modules/stuff/mpd.nix b/modules/stuff/mpd.nix index 6cba934..4576d50 100644 --- a/modules/stuff/mpd.nix +++ b/modules/stuff/mpd.nix @@ -6,7 +6,7 @@ in { options.chuj.stuff.mpd = { enable = mkEnableOption "mpd"; }; - + config = mkIf cfg.enable { home-manager.users.${user} = { services.mpd = { @@ -25,6 +25,7 @@ in { cut = "${pkgs.coreutils}/bin/cut"; in [ pkgs.mpc-cli + # todo: dmenu for this if i3 (pkgs.writeShellScriptBin "mpdfdial.sh" '' path=$(${yad} --file --directory | ${cut} -d "/" -f5-) diff --git a/modules/stuff/other-desktop-programs.nix b/modules/stuff/other-desktop-programs.nix index 456b5c2..18912bd 100644 --- a/modules/stuff/other-desktop-programs.nix +++ b/modules/stuff/other-desktop-programs.nix @@ -6,12 +6,12 @@ in { options.chuj.stuff.other-desktop-programs = { enable = mkEnableOption "other-desktop-programs"; }; - + config = mkIf cfg.enable { home-manager.users.${user}.home.packages = with pkgs; [ pavucontrol -# element-desktop + # element-desktop schildichat-desktop discord diff --git a/modules/stuff/other-dev-programs.nix b/modules/stuff/other-dev-programs.nix index bc08551..5fae0b5 100644 --- a/modules/stuff/other-dev-programs.nix +++ b/modules/stuff/other-dev-programs.nix @@ -6,7 +6,7 @@ in { options.chuj.stuff.other-dev-programs = { enable = mkEnableOption "other-dev-programs"; }; - + config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ cmake diff --git a/modules/stuff/printing.nix b/modules/stuff/printing.nix index 654e79d..de6328d 100644 --- a/modules/stuff/printing.nix +++ b/modules/stuff/printing.nix @@ -5,7 +5,7 @@ in { options.chuj.stuff.printing = { enable = mkEnableOption "printing"; }; - + config = mkIf cfg.enable { services.printing = { enable = true; diff --git a/modules/stuff/sddm.nix b/modules/stuff/sddm.nix index 4676350..b7534ba 100644 --- a/modules/stuff/sddm.nix +++ b/modules/stuff/sddm.nix @@ -5,7 +5,7 @@ in { options.chuj.stuff.sddm = { enable = mkEnableOption "sddm"; }; - + config = mkIf cfg.enable { services.displayManager = { # ah fuck this diff --git a/modules/stuff/ssh.nix b/modules/stuff/ssh.nix index 9b1b4a8..943643d 100644 --- a/modules/stuff/ssh.nix +++ b/modules/stuff/ssh.nix @@ -29,12 +29,8 @@ in { name = elemAt (splitString "@" host) 1; value = { user = elemAt (splitString "@" host) 0; - identityFile = "~/.ssh/keys/${hostcfg.file}"; - - setEnv = if hasAttr "env" hostcfg - then hostcfg.env - else {}; + setEnv = hostcfg.env or {}; }; }) cfg.keys; }; diff --git a/modules/stuff/theme.nix b/modules/stuff/theme.nix index fa96396..0101e1c 100644 --- a/modules/stuff/theme.nix +++ b/modules/stuff/theme.nix @@ -5,9 +5,8 @@ in { options.chuj.stuff.theme = { enable = mkEnableOption "theme"; - }; - + config = mkIf cfg.enable { fonts = { enableDefaultPackages = true; diff --git a/modules/stuff/thunar.nix b/modules/stuff/thunar.nix index aef008e..990aeb3 100644 --- a/modules/stuff/thunar.nix +++ b/modules/stuff/thunar.nix @@ -6,7 +6,7 @@ in { options.chuj.stuff.thunar = { enable = mkEnableOption "thunar"; }; - + config = mkIf cfg.enable { programs = { dconf.enable = true; diff --git a/modules/stuff/vim.nix b/modules/stuff/vim.nix index 90641a9..78f79a5 100644 --- a/modules/stuff/vim.nix +++ b/modules/stuff/vim.nix @@ -6,7 +6,7 @@ in { options.chuj.stuff.vim = { enable = mkEnableOption "vim"; }; - + config = mkIf cfg.enable { environment.systemPackages = [ pkgs.vim ]; diff --git a/modules/stuff/xdg.nix b/modules/stuff/xdg.nix index 905615d..4149c16 100644 --- a/modules/stuff/xdg.nix +++ b/modules/stuff/xdg.nix @@ -6,7 +6,7 @@ in { options.chuj.xdg = { enable = mkEnableOption "xdg"; }; - + config = let hmCfg = config.home-manager.users.${user}; HOME = hmCfg.home.homeDirectory; @@ -66,6 +66,7 @@ in { ]; xdg.configFile = { + # todo: XDG_CACHE_HOME Not found "python/pythonrc".text = '' import os import atexit diff --git a/modules/stuff/xserver.nix b/modules/stuff/xserver.nix index c496a1a..9a251f4 100644 --- a/modules/stuff/xserver.nix +++ b/modules/stuff/xserver.nix @@ -6,7 +6,7 @@ in { enable = mkEnableOption "xserver"; libinput = mkEnableOption "libinput"; }; - + config = mkIf cfg.enable { services = { xserver = { @@ -14,7 +14,9 @@ in { xkb.layout = "pl"; # autoRepeatDelay = 180; # autoRepeatInterval = 50; - # ^ this doesn't work + # fixme: ^ this doesn't work + + # todo: getexe (or fix the above displayManager.sessionCommands = '' ${pkgs.xorg.xset}/bin/xset r rate 180 50 ''; diff --git a/modules/system.nix b/modules/system.nix index bc2a567..4541ee2 100644 --- a/modules/system.nix +++ b/modules/system.nix @@ -34,7 +34,7 @@ in { time.timeZone = "Europe/Warsaw"; hardware.pulseaudio.enable = true; services.pipewire.enable = false; - + networking = { nameservers = [ "9.9.9.9" ]; networkmanager = { diff --git a/pkgs/default.nix b/pkgs/default.nix index b1589b6..0926f56 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -9,7 +9,7 @@ flameshot = prevPkgs.flameshot.overrideAttrs (_: { patches = [ ../files/flameshot-0x0-upload.patch ]; }); schildichat-web = callPackage ./schildi/schildichat-web.nix {}; schildichat-desktop = callPackage ./schildi/schildichat-desktop.nix {}; - vkquake_ = prevPkgs.vkquake.overrideAttrs (prev: { + vkquake = prevPkgs.vkquake.overrideAttrs (prev: { version = "1.31.1"; src = pkgs.fetchFromGitHub { inherit (prev.src) owner repo; @@ -17,9 +17,10 @@ sha256 = "sha256-rOzQMeSmnHZl4v0uWWqwp1yfnUqIuP18ogRn4DimKt4="; }; sourceRoot = null; + buildInputs = prev.buildInputs ++ [ pkgs.vulkan-headers ]; nativeBuildInputs = prev.nativeBuildInputs ++ [ pkgs.glslang ]; buildPhase = '' - cd Quake + cd ../Quake make -j6 DO_USERDIRS=1 prefix=$out bindir=$out/bin ''; }); diff --git a/pkgs/win7-cursors.nix b/pkgs/win7-cursors.nix index c0b29bd..292e61e 100644 --- a/pkgs/win7-cursors.nix +++ b/pkgs/win7-cursors.nix @@ -8,7 +8,8 @@ stdenv.mkDerivation rec { version = "1"; src = fetchzip { - url = "https://gitgud.io/wackyideas/aerothemeplasma/-/raw/master/Icons%20and%20cursors/aero-drop.tar.gz?ref_type=heads&inline=false"; + # todo: find out how to extract local tar file + url = "https://gitgud.io/wackyideas/aerothemeplasma/-/raw/master/misc/cursors/aero-drop.tar.gz?ref_type=heads&inline=false"; hash = "sha256-4IY6ZE/nSLJ3HGfzEp2rxBah8Z9lUNQdGncRTjv2Jtg="; }; diff --git a/readme.txt b/readme.txt index 85f6ed1..44c63df 100644 --- a/readme.txt +++ b/readme.txt @@ -1,3 +1,8 @@ i have a slight idea of what i'm doing +todo: +- remove hardcoded binary names +- investigate firefox config +- theme.nix +- all the remaining individual todos