diff --git a/flake.lock b/flake.lock index 8ba8460..0b948b8 100644 --- a/flake.lock +++ b/flake.lock @@ -496,6 +496,21 @@ "type": "github" } }, + "nix-std": { + "locked": { + "lastModified": 1685917625, + "narHash": "sha256-2manVKofCZrCToVDnDYNvtYUFBYOM5JhdDoNGVY4fq4=", + "owner": "chessai", + "repo": "nix-std", + "rev": "e20af8822b5739434b875643bfc61fe0195ea2fb", + "type": "github" + }, + "original": { + "owner": "chessai", + "repo": "nix-std", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1683014792, @@ -662,6 +677,7 @@ "hyprland": "hyprland", "nix-index-database": "nix-index-database", "nix-rice": "nix-rice", + "nix-std": "nix-std", "nixpkgs": "nixpkgs_3", "nur": "nur", "rust-overlay": "rust-overlay_2" diff --git a/flake.nix b/flake.nix index c9ddb84..de875cd 100644 --- a/flake.nix +++ b/flake.nix @@ -11,6 +11,8 @@ nur.url = "github:/nix-community/NUR"; + nix-std.url = "github:chessai/nix-std"; + eww = { url = "github:elkowar/eww"; inputs.nixpkgs.follows = "nixpkgs"; @@ -57,6 +59,7 @@ hyprland, nix-index-database, nix-rice, + nix-std, ... } @ inputs: let inherit (self) outputs; @@ -64,7 +67,6 @@ "x86_64-linux" ]; in rec { - overlays = import ./overlay.nix {inherit inputs;}; nixosConfigurations = { diff --git a/gtk-theme.nix b/gtk-theme.nix index c06ec72..a7b270c 100644 --- a/gtk-theme.nix +++ b/gtk-theme.nix @@ -1,68 +1,65 @@ -{ pkgs }: -{ palette }: - -let - rendersvg = pkgs.runCommand "rendersvg" { } '' +{pkgs}: {palette}: let + rendersvg = pkgs.runCommand "rendersvg" {} '' mkdir -p $out/bin ln -s ${pkgs.resvg}/bin/resvg $out/bin/rendersvg ''; in -pkgs.stdenv.mkDerivation rec { - name = "generated-gtk-theme-nix-rice"; - src = pkgs.fetchFromGitHub { - owner = "nana-4"; - repo = "materia-theme"; - rev = "76cac96ca7fe45dc9e5b9822b0fbb5f4cad47984"; - sha256 = "sha256-0eCAfm/MWXv6BbCl2vbVbvgv8DiUH09TAUhoKq7Ow0k="; - }; - buildInputs = with pkgs; [ - sassc - bc - which - rendersvg - meson - ninja - nodePackages.sass - gtk4.dev - optipng - ]; - phases = [ "unpackPhase" "installPhase" ]; - installPhase = '' - HOME=/build - chmod 777 -R . - patchShebangs . - mkdir -p $out/share/themes - mkdir bin - sed -e 's/handle-horz-.*//' -e 's/handle-vert-.*//' -i ./src/gtk-2.0/assets.txt + pkgs.stdenv.mkDerivation rec { + name = "generated-gtk-theme-nix-rice"; + src = pkgs.fetchFromGitHub { + owner = "nana-4"; + repo = "materia-theme"; + rev = "76cac96ca7fe45dc9e5b9822b0fbb5f4cad47984"; + sha256 = "sha256-0eCAfm/MWXv6BbCl2vbVbvgv8DiUH09TAUhoKq7Ow0k="; + }; + buildInputs = with pkgs; [ + sassc + bc + which + rendersvg + meson + ninja + nodePackages.sass + gtk4.dev + optipng + ]; + phases = ["unpackPhase" "installPhase"]; + installPhase = '' + HOME=/build + chmod 777 -R . + patchShebangs . + mkdir -p $out/share/themes + mkdir bin + sed -e 's/handle-horz-.*//' -e 's/handle-vert-.*//' -i ./src/gtk-2.0/assets.txt - cat > /build/gtk-colors << EOF - BTN_BG=${palette.util.bg} - BTN_FG=${palette.bright.yellow} - FG=${palette.util.fg} - BG=${palette.util.bg} - HDR_BTN_BG=${palette.util.bg} - HDR_BTN_FG=${palette.util.fg} - ACCENT_BG=${palette.normal.cyan} - ACCENT_FG=${palette.normal.yellow} - HDR_FG=${palette.bright.yellow} - HDR_BG=${palette.util.bg} - MATERIA_SURFACE=${palette.normal.black} - MATERIA_VIEW=${palette.bright.black} - MENU_BG=${palette.util.bg} - MENU_FG=${palette.util.fg} - SEL_BG=${palette.normal.yellow} - SEL_FG=${palette.normal.cyan} - TXT_BG=${palette.util.bg} - TXT_FG=${palette.util.fg} - WM_BORDER_FOCUS=${palette.normal.yellow} - WM_BORDER_UNFOCUS=${palette.normal.black} - UNITY_DEFAULT_LAUNCHER_STYLE=False - NAME="nix-rice" - MATERIA_STYLE_COMPACT=False - EOF + cat > /build/gtk-colors << EOF + BTN_BG=${palette.util.bg} + BTN_FG=${palette.bright.yellow} + FG=${palette.util.fg} + BG=${palette.util.bg} + HDR_BTN_BG=${palette.util.bg} + HDR_BTN_FG=${palette.util.fg} + ACCENT_BG=${palette.normal.cyan} + ACCENT_FG=${palette.normal.yellow} + HDR_FG=${palette.bright.yellow} + HDR_BG=${palette.util.bg} + MATERIA_SURFACE=${palette.normal.black} + MATERIA_VIEW=${palette.bright.black} + MENU_BG=${palette.util.bg} + MENU_FG=${palette.util.fg} + SEL_BG=${palette.normal.yellow} + SEL_FG=${palette.normal.cyan} + TXT_BG=${palette.util.bg} + TXT_FG=${palette.util.fg} + WM_BORDER_FOCUS=${palette.normal.yellow} + WM_BORDER_UNFOCUS=${palette.normal.black} + UNITY_DEFAULT_LAUNCHER_STYLE=False + NAME="nix-rice" + MATERIA_STYLE_COMPACT=False + EOF - echo "Changing colours:" - ./change_color.sh -o nix-rice /build/gtk-colors -i False -t "$out/share/themes" - chmod 555 -R . - ''; -} + echo "Changing colours:" + ./change_color.sh -o nix-rice /build/gtk-colors -i False -t "$out/share/themes" + chmod 555 -R . + ''; + } diff --git a/home/dots/hyprland/hyprland.conf b/home/dots/hyprland/hyprland.conf index f5122fd..472bd2d 100644 --- a/home/dots/hyprland/hyprland.conf +++ b/home/dots/hyprland/hyprland.conf @@ -72,6 +72,7 @@ monitor=,highrr,auto,1 windowrule=noanim,^(wlogout)$ windowrule=workspace special silent,^(keepassxc)$ windowrulev2 = workspace special silent, title:(KeePassXC)$ +windowrule=dimaround,^(fuzzel)$ bindm=SUPER,mouse:272,movewindow diff --git a/home/home.nix b/home/home.nix index a3b0255..c3cfdb9 100644 --- a/home/home.nix +++ b/home/home.nix @@ -17,54 +17,57 @@ in { home.stateVersion = "22.11"; - home.packages = with pkgs; [ - thunderbird - clementine - inkscape - xfce.thunar - feh + home.packages = with pkgs; + [ + thunderbird + clementine + inkscape + xfce.thunar + feh - zathura + zathura - btop - bat - ripgrep - fd - lazygit - fzf - zoxide - zellij - glib # for gsettings - grim - slurp - swaybg - wlogout - wf-recorder - libnotify - xorg.xrdb - swayidle - swaynotificationcenter - gtklock - playerctl + btop + bat + ripgrep + fd + lazygit + fzf + zoxide + zellij + glib # for gsettings + grim + slurp + swaybg + wlogout + wf-recorder + libnotify + xorg.xrdb + swayidle + swaynotificationcenter + gtklock + playerctl - xplr - culr - swayosd - fuzzel + xplr + culr + swayosd + fuzzel - kdeconnect - # syncthing - keepassxc - git-credential-keepassxc + kdeconnect + # syncthing + keepassxc + git-credential-keepassxc - direnv + direnv - mpv + mpv - # libsForQt5.qtstyleplugin-kvantum + # libsForQt5.qtstyleplugin-kvantum - gtk-engine-murrine - ] ++ pkgs.rice.fonts.pkgs ++ pkgs.rice.icons.pkgs; + gtk-engine-murrine + ] + ++ pkgs.rice.fonts.pkgs + ++ pkgs.rice.icons.pkgs; fonts.fontconfig.enable = true; @@ -105,7 +108,6 @@ in { (builtins.toString borders.rounding) (builtins.toString borders.gaps_in) (builtins.toString borders.gaps_out) - ] (builtins.readFile dots/hyprland/hyprland.conf)); }; @@ -294,7 +296,7 @@ in { text = lib.strings.concatStrings [palette-hex.util.fg "FF"]; selection = lib.strings.concatStrings [palette-hex.bright.yellow "FF"]; selection-text = lib.strings.concatStrings [palette-hex.util.bg "FF"]; - selection-match = lib.strings.concatStrings [palette-hex.normal.green"FF"]; + selection-match = lib.strings.concatStrings [palette-hex.normal.green "FF"]; match = lib.strings.concatStrings [palette-hex.bright.green "FF"]; border = lib.strings.concatStrings [palette-hex.bright.yellow "FF"]; }; @@ -344,9 +346,8 @@ in { enable = true; themes = with palette-hex; { nix-rice = { - "attribute" = bright.cyan; - "keyword" = { fg = normal.red; }; + "keyword" = {fg = normal.red;}; "keyword.directive" = normal.red; "namespace" = bright.cyan; "punctuation" = bright.yellow; @@ -359,17 +360,32 @@ in { "variable.parameter" = bright.white; "type" = normal.yellow; "type.builtin" = normal.yellow; - "constructor" = { fg = bright.magenta; modifiers = ["bold"]; }; - "function" = { fg = normal.green; modifiers = ["bold"]; }; + "constructor" = { + fg = bright.magenta; + modifiers = ["bold"]; + }; + "function" = { + fg = normal.green; + modifiers = ["bold"]; + }; "function.macro" = bright.cyan; "function.builtin" = normal.yellow; "tag" = normal.red; - "comment" = { fg = normal.magenta; modifiers = ["italic"]; }; - "constant" = { fg = bright.magenta; }; - "constant.builtin" = { fg = bright.magenta; modifiers = ["bold"]; }; + "comment" = { + fg = normal.magenta; + modifiers = ["italic"]; + }; + "constant" = {fg = bright.magenta;}; + "constant.builtin" = { + fg = bright.magenta; + modifiers = ["bold"]; + }; "string" = normal.green; "constant.numeric" = bright.magenta; - "constant.character.escape" = { fg = bright.white; modifiers = ["bold"]; }; + "constant.character.escape" = { + fg = bright.white; + modifiers = ["bold"]; + }; "label" = bright.cyan; "module" = bright.cyan; @@ -382,47 +398,103 @@ in { "info" = bright.cyan; "hint" = bright.blue; - "ui.background" = { bg = util.bg; }; - "ui.linenr" = { fg = normal.cyan; }; - "ui.linenr.selected" = { fg = normal.yellow; modifiers = ["bold"]; }; - "ui.cursorline" = { bg = normal.black; }; - "ui.statusline" = { fg = util.fg; bg = bright.black; }; - "ui.statusline.normal" = { fg = util.fg; bg = bright.black; }; - "ui.statusline.insert" = { fg = util.fg; bg = normal.blue; }; - "ui.statusline.select" = { fg = util.fg; bg = bright.yellow; }; - "ui.statusline.inactive" = { fg = normal.white; bg = normal.black; }; - "ui.popup" = { bg = normal.black; }; - "ui.window" = { bg = normal.black; }; - "ui.help" = { bg = normal.black; fg = util.fg; }; - "ui.text" = { fg = util.fg; }; - "ui.text.focus" = { fg = util.fg; }; - "ui.selection" = { modifiers = ["reversed"]; bg = bright.yellow; }; - "ui.selection.primary" = { modifiers = ["reversed"]; }; + "ui.background" = {bg = util.bg;}; + "ui.linenr" = {fg = normal.cyan;}; + "ui.linenr.selected" = { + fg = normal.yellow; + modifiers = ["bold"]; + }; + "ui.cursorline" = {bg = normal.black;}; + "ui.statusline" = { + fg = util.fg; + bg = bright.black; + }; + "ui.statusline.normal" = { + fg = util.fg; + bg = bright.black; + }; + "ui.statusline.insert" = { + fg = util.fg; + bg = normal.blue; + }; + "ui.statusline.select" = { + fg = util.fg; + bg = bright.yellow; + }; + "ui.statusline.inactive" = { + fg = normal.white; + bg = normal.black; + }; + "ui.popup" = {bg = normal.black;}; + "ui.window" = {bg = normal.black;}; + "ui.help" = { + bg = normal.black; + fg = util.fg; + }; + "ui.text" = {fg = util.fg;}; + "ui.text.focus" = {fg = util.fg;}; + "ui.selection" = { + modifiers = ["reversed"]; + bg = bright.yellow; + }; + "ui.selection.primary" = {modifiers = ["reversed"];}; # "ui.selection.primary" = { bg = bright.cyan; }; - "ui.cursor.primary" = { bg = normal.white; fg = normal.black; }; - "ui.cursor.match" = { bg = bright.cyan; }; - "ui.menu" = { fg = util.fg; bg = bright.black; }; - "ui.menu.selected" = { fg = bright.black; bg = bright.blue; modifiers = ["bold"]; }; + "ui.cursor.primary" = { + bg = normal.white; + fg = normal.black; + }; + "ui.cursor.match" = {bg = bright.cyan;}; + "ui.menu" = { + fg = util.fg; + bg = bright.black; + }; + "ui.menu.selected" = { + fg = bright.black; + bg = bright.blue; + modifiers = ["bold"]; + }; "ui.virtual.whitespace" = bright.black; - "ui.virtual.ruler" = { bg = normal.black; }; - "ui.virtual.inlay-hint" = { fg = normal.magenta; }; + "ui.virtual.ruler" = {bg = normal.black;}; + "ui.virtual.inlay-hint" = {fg = normal.magenta;}; - "diagnostic.warning" = { underline = { color = bright.yellow; style = "curl"; }; }; - "diagnostic.error" = { underline = { color = bright.red; style = "curl"; }; }; - "diagnostic.info" = { underline = { color = bright.cyan; style = "curl"; }; }; - "diagnostic.hint" = { underline = { color = bright.blue; style = "curl"; }; }; + "diagnostic.warning" = { + underline = { + color = bright.yellow; + style = "curl"; + }; + }; + "diagnostic.error" = { + underline = { + color = bright.red; + style = "curl"; + }; + }; + "diagnostic.info" = { + underline = { + color = bright.cyan; + style = "curl"; + }; + }; + "diagnostic.hint" = { + underline = { + color = bright.blue; + style = "curl"; + }; + }; "markup.heading" = bright.cyan; - "markup.bold" = { modifiers = ["bold"]; }; - "markup.italic" = { modifiers = ["italic"]; }; - "markup.strikethrough" = { modifiers = ["crossed_out"]; }; - "markup.link.url" = { fg = bright.green; modifiers = ["underlined"]; }; + "markup.bold" = {modifiers = ["bold"];}; + "markup.italic" = {modifiers = ["italic"];}; + "markup.strikethrough" = {modifiers = ["crossed_out"];}; + "markup.link.url" = { + fg = bright.green; + modifiers = ["underlined"]; + }; "markup.link.text" = bright.red; "markup.raw" = bright.red; + # old theme - # old theme - # "ui.background" = { bg = util.bg; }; # "ui.menu" = { fg = bright.cyan; bg = normal.black; }; # "ui.menu.selected" = { modifiers = [ "reversed" ]; }; @@ -462,7 +534,7 @@ in { # "hint" = normal.magenta; # "debug" = normal.magenta; # "warning" = normal.yellow; - # "error" = normal.red; + # "error" = normal.red; }; }; settings = { diff --git a/pkgs/coconut.nix b/pkgs/coconut.nix index 475cb6b..1336500 100644 --- a/pkgs/coconut.nix +++ b/pkgs/coconut.nix @@ -1,44 +1,46 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, cpyparsing -, ipykernel -, mypy -, pexpect -, pygments -, pytestCheckHook -, prompt-toolkit -, tkinter -, watchdog -, pkgs -}:let - pygments = pkgs.python310Packages.callPackage ./pygments.nix {}; -in buildPythonPackage rec { - pname = "coconut"; - version = "3.0.2"; +{ + lib, + buildPythonPackage, + fetchFromGitHub, + cpyparsing, + ipykernel, + mypy, + pexpect, + pygments, + pytestCheckHook, + prompt-toolkit, + tkinter, + watchdog, + pkgs, +}: let + pygments = pkgs.python310Packages.callPackage ./pygments.nix {}; +in + buildPythonPackage rec { + pname = "coconut"; + version = "3.0.2"; - src = fetchFromGitHub { - owner = "evhub"; - repo = "coconut"; - rev = "v${version}"; - sha256 = lib.fakeSha256; - }; + src = fetchFromGitHub { + owner = "evhub"; + repo = "coconut"; + rev = "v${version}"; + sha256 = lib.fakeSha256; + }; - propagatedBuildInputs = [ cpyparsing ipykernel mypy pygments prompt-toolkit watchdog ]; + propagatedBuildInputs = [cpyparsing ipykernel mypy pygments prompt-toolkit watchdog]; - checkInputs = [ pexpect pytestCheckHook tkinter ]; + checkInputs = [pexpect pytestCheckHook tkinter]; - # Currently most tests have performance issues - pytestFlagsArray = [ - "coconut/tests/constants_test.py" - ]; + # Currently most tests have performance issues + pytestFlagsArray = [ + "coconut/tests/constants_test.py" + ]; - pythonImportsCheck = [ "coconut" ]; + pythonImportsCheck = ["coconut"]; - meta = with lib; { - homepage = "http://coconut-lang.org/"; - description = "Simple, elegant, Pythonic functional programming"; - license = licenses.asl20; - maintainers = with maintainers; [ fabianhjr ]; - }; -} + meta = with lib; { + homepage = "http://coconut-lang.org/"; + description = "Simple, elegant, Pythonic functional programming"; + license = licenses.asl20; + maintainers = with maintainers; [fabianhjr]; + }; + } diff --git a/pkgs/default.nix b/pkgs/default.nix index b35cba0..f7badf1 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,5 +1,4 @@ -{pkgs, ...}: -{ +{pkgs, ...}: { hyprland-system76-scheduler-integration = pkgs.callPackage ./hyprland-system76-scheduler-integration.nix {}; culr = pkgs.callPackage ./culr.nix {}; everforest-theme = pkgs.callPackage ./everforst-theme.nix {}; diff --git a/pkgs/pygments.nix b/pkgs/pygments.nix index dbf6c76..b2bd054 100644 --- a/pkgs/pygments.nix +++ b/pkgs/pygments.nix @@ -1,53 +1,55 @@ -{ lib -, buildPythonPackage -, fetchPypi -, docutils -, lxml -, pytestCheckHook -, wcag-contrast-ratio -}: +{ + lib, + buildPythonPackage, + fetchPypi, + docutils, + lxml, + pytestCheckHook, + wcag-contrast-ratio, +}: let + pygments = + buildPythonPackage + rec { + pname = "pygments"; + version = "2.15.1"; -let pygments = buildPythonPackage - rec { - pname = "pygments"; - version = "2.15.1"; + src = fetchPypi { + pname = "Pygments"; + inherit version; + sha256 = "sha256-is5NPB3UgYlLIAX1YOrQ+fGe5k/pgzZr4aIeFx0Sd1w="; + }; - src = fetchPypi { - pname = "Pygments"; - inherit version; - sha256 = "sha256-is5NPB3UgYlLIAX1YOrQ+fGe5k/pgzZr4aIeFx0Sd1w="; + format = "egg"; + + propagatedBuildInputs = [ + docutils + ]; + + # circular dependencies if enabled by default + doCheck = false; + checkInputs = [ + lxml + pytestCheckHook + wcag-contrast-ratio + ]; + + disabledTestPaths = [ + # 5 lines diff, including one nix store path in 20000+ lines + "tests/examplefiles/bash/ltmain.sh" + ]; + + pythonImportsCheck = ["pygments"]; + + passthru.tests = { + check = pygments.overridePythonAttrs (_: {doCheck = true;}); + }; + + meta = with lib; { + homepage = "https://pygments.org/"; + description = "A generic syntax highlighter"; + license = licenses.bsd2; + maintainers = with maintainers; [SuperSandro2000]; + }; }; - - format = "egg"; - - propagatedBuildInputs = [ - docutils - ]; - - # circular dependencies if enabled by default - doCheck = false; - checkInputs = [ - lxml - pytestCheckHook - wcag-contrast-ratio - ]; - - disabledTestPaths = [ - # 5 lines diff, including one nix store path in 20000+ lines - "tests/examplefiles/bash/ltmain.sh" - ]; - - pythonImportsCheck = [ "pygments" ]; - - passthru.tests = { - check = pygments.overridePythonAttrs (_: { doCheck = true; }); - }; - - meta = with lib; { - homepage = "https://pygments.org/"; - description = "A generic syntax highlighter"; - license = licenses.bsd2; - maintainers = with maintainers; [ SuperSandro2000 ]; - }; - }; -in pygments +in + pygments diff --git a/rice.nix b/rice.nix index 4f89e71..952c42e 100644 --- a/rice.nix +++ b/rice.nix @@ -1,8 +1,6 @@ final: prev: with prev.lib.nix-rice; let - theme = kitty-themes.parseTheme ( - ./pal.conf - ); + theme = kitty-themes.parseTheme ./pal.conf; # theme = kitty-themes.getThemeByName "everforest_dark_hard"; in rec { rice = { @@ -87,12 +85,11 @@ in rec { gtk-theme = { name = "nix-rice"; - package = (prev.callPackage ./gtk-theme.nix {} { palette = palette.toRGBShortHex final.rice.palette; }); + package = prev.callPackage ./gtk-theme.nix {} {palette = palette.toRGBShortHex final.rice.palette;}; # name = "Everforest-Dark"; # package = final.everforest-theme; }; - borders = { thickness = 1; rounding = 0; @@ -101,7 +98,7 @@ in rec { }; bg = { - image = builtins.path { + image = builtins.path { name = "wallpaper"; path = ./wallpaper.png; sha256 = "e6fb6eb742b795bf2a356d923fe1c37f9067721e9b7048ccfaa58ca7925e5db3"; diff --git a/system/cachix.nix b/system/cachix.nix index ecd2d39..d888840 100644 --- a/system/cachix.nix +++ b/system/cachix.nix @@ -1,8 +1,9 @@ - # WARN: this file will get overwritten by $ cachix use -{ pkgs, lib, ... }: - -let +{ + pkgs, + lib, + ... +}: let folder = ./cachix; toImport = name: value: folder + ("/" + name); filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key; diff --git a/system/cachix/nix-community.nix b/system/cachix/nix-community.nix index 7fc4c65..28de7e4 100644 --- a/system/cachix/nix-community.nix +++ b/system/cachix/nix-community.nix @@ -1,4 +1,3 @@ - { nix = { settings = { diff --git a/system/configuration.nix b/system/configuration.nix index 01465b8..c636298 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -5,9 +5,9 @@ config, pkgs, nix-rice, + nix-std, ... -}: -{ +}: { nixpkgs = { overlays = [ inputs.nur.overlay @@ -25,11 +25,14 @@ nix = { registry = lib.mapAttrs (_: value: {flake = value;}) inputs; settings = { + substituters = ["https://hyprland.cachix.org"]; + trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; experimental-features = "nix-command flakes"; }; }; imports = [ + inputs.hyprland.nixosModules.default # inputs.declarative-cachix.nixosModules.declarative-cachix # inputs.helix ]; @@ -44,7 +47,7 @@ ''; systemd.services.NetworkManager-wait-online.enable = true; # for some reason nm doesn't enable without this lel - + environment.pathsToLink = ["/share/zsh"]; hardware.enableRedistributableFirmware = true; @@ -79,21 +82,75 @@ services.xserver.libinput.enable = true; services.xserver.displayManager.lightdm.enable = false; # gets installed by default.. + programs.hyprland = { + enable = true; + xwayland = { + enable = true; + hidpi = false; + }; + nvidiaPatches = true; + }; + + environment.etc = { + "hyprland_login" = { + enable = true; + text = '' + misc { + disable_hyprland_logo=true + disable_splash_rendering=true + } + monitor=,highrr,auto,1 + windowrule=fullscreen,^(regreet)$ + windowrule=dimaround,^(regreet)$ + bind=SUPER,Return,exec,${lib.getExe pkgs.greetd.regreet} + exec = ${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY + exec = ${lib.getExe pkgs.greetd.regreet} + ''; + }; + }; + services.greetd = { enable = true; settings = { default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet -r -g \"what's good\" --time --sessions ${config.services.xserver.displayManager.sessionData.desktops}/share/wayland-sessions"; + # command = "${pkgs.greetd.tuigreet}/bin/tuigreet -r -g \"what's good\" --time --sessions ${config.services.xserver.displayManager.sessionData.desktops}/share/wayland-sessions"; + command = "${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.hyprland} -c /etc/hyprland_login"; user = "greeter"; }; }; }; + programs.regreet = with pkgs.rice; { + enable = true; + settings = with lib.strings; { + background = { + path = "${bg.image}"; + fit = "Fill"; + }; + + GTK = { + application_prefer_dark_theme = true; + font_name = concatStrings [fonts.sans.name " " (builtins.toString fonts.sans.size)]; + icon_theme_name = icons.name; + theme_name = gtk-theme.name; + }; + }; + }; + security.polkit.enable = true; programs.dconf.enable = true; xdg.autostart.enable = true; + xdg.portal = { + enable = true; + wlr = { + enable = true; + }; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + ]; + }; services.resolved = { enable = true; @@ -118,13 +175,16 @@ programs.zsh.enable = true; programs.xonsh = { enable = true; - config = builtins.replaceStrings - ["#NEWPATHS"] - ['' - '${pkgs.xonsh}/lib/python3.10/site-packages', - '${pkgs.python310Packages.pip}/lib/python3.10/site-packages' - ''] - (builtins.readFile ../home/dots/xonshrc); + config = + builtins.replaceStrings + ["#NEWPATHS"] + [ + '' + '${pkgs.xonsh}/lib/python3.10/site-packages', + '${pkgs.python310Packages.pip}/lib/python3.10/site-packages' + '' + ] + (builtins.readFile ../home/dots/xonshrc); }; users.defaultUserShell = pkgs.zsh; @@ -154,7 +214,6 @@ cachix alejandra - ]; programs.nix-index-database.comma.enable = true; diff --git a/system/quiver.nix b/system/quiver.nix index 4fcd2d9..a2929cd 100644 --- a/system/quiver.nix +++ b/system/quiver.nix @@ -8,14 +8,8 @@ modulesPath, ... }: { - nix.settings = { - substituters = ["https://hyprland.cachix.org" "https://nix-community.cachix.org" ]; - trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; - }; - imports = [ ./configuration.nix - inputs.hyprland.nixosModules.default ]; boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbcore" "sd_mod"]; @@ -77,15 +71,6 @@ }; }; - programs.hyprland = { - enable = true; - xwayland = { - enable = true; - hidpi = false; - }; - nvidiaPatches = true; - }; - services.xserver.videoDrivers = ["nvidia"]; hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta; hardware.nvidia.modesetting.enable = true; @@ -101,17 +86,6 @@ }; }; - # systemd.services."com.system76.Scheduler" = { - # wantedBy = ["multi-user.target"]; - # description = "the system76 process scheduler"; - # serviceConfig = { - # Type = "dbus"; - # ExecStart = ''${pkgs.system76-scheduler}/bin/system76-scheduler daemon''; - # ExecReload = ''${pkgs.system76-scheduler}/bin/system76-scheduler daemon reload''; - # BusName = "com.system76.Scheduler"; - # }; - # }; - services.dbus.packages = [ pkgs.linuxPackages_xanmod_latest.system76-scheduler ]; @@ -131,24 +105,6 @@ hardware.ckb-next.enable = true; - xdg.portal = { - enable = true; - wlr = { - enable = true; - # settings = { - # screencast = { - # output_name = "DP-1"; - # max_fps = 60; - # chooser_type = "simple"; - # chooser_nvidia = "${pkgs.slurp}/bin/slurp -f %o -or"; - # }; - # }; - }; - extraPortals = with pkgs; [ - xdg-desktop-portal-gtk - ]; - }; - environment.systemPackages = with pkgs; [ ckb-next openrgb