From 4a8e7928aa1980aae48aa1e063249cd31f4ad3fc Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Fri, 26 Mar 2021 21:03:40 +0300 Subject: [PATCH] feat: switch to sway, qt theme, hydrus --- flake.lock | 24 +++++++------- hosts/lungmen.nix | 7 ++-- local/locale.nix | 2 +- overlays/hikari.nix | 2 +- overlays/hydrus.nix | 12 +++++++ overlays/phantom.nix | 25 ++++++++++++++ users/patriot/default.nix | 8 ++--- users/patriot/home.nix | 70 ++++++++++++++++++++++----------------- 8 files changed, 99 insertions(+), 51 deletions(-) create mode 100644 overlays/hydrus.nix create mode 100644 overlays/phantom.nix diff --git a/flake.lock b/flake.lock index b829faa..131b90c 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "cachix": { "locked": { - "lastModified": 1616195052, - "narHash": "sha256-NEPifITZU/xgUbUCA+rD7TgYstLYY6cT+XXW2Kez5Po=", + "lastModified": 1616305499, + "narHash": "sha256-WArUDrAuqq9jNLNJI0hBClleALaCysA40WBbQHQlqLg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "941664919391c66997c08ee58a98af55eee32d50", + "rev": "9b8530e3721fc008bacac61b6c50a29712ee2f2f", "type": "github" }, "original": { @@ -23,11 +23,11 @@ ] }, "locked": { - "lastModified": 1616106770, - "narHash": "sha256-Is3w00c8NM8q/AReQI5l4AN3mn9mcTYEEU/CeG1tmZU=", + "lastModified": 1616724076, + "narHash": "sha256-SwbPXLjN2sLy4NL/GhodiJrdkIVZwGGTGiCN3JxH1cU=", "owner": "nix-community", "repo": "home-manager", - "rev": "f30b62a74d05e055208bea448442b9fc483e9fa5", + "rev": "fedfd430f96695997b3eaf8d7e82ca79406afa23", "type": "github" }, "original": { @@ -74,11 +74,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1616174264, - "narHash": "sha256-88Pu2xh1p2tixNxdijfqoCqq9ymkEx0d6jc7ycWavLo=", + "lastModified": 1616527350, + "narHash": "sha256-VkMevY2WLU+K7T/P4wVj18Ms8zyeRfp05ILf556m5Y8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f5e8bdd07d1afaabf6b37afc5497b1e498b8046f", + "rev": "d3f7e969b9860fb80750147aeb56dab1c730e756", "type": "github" }, "original": { @@ -99,11 +99,11 @@ ] }, "locked": { - "lastModified": 1616249271, - "narHash": "sha256-KB0VogS1tn0lPiRxVqhIANwhlJ29RH7XqDDUWjQUAbA=", + "lastModified": 1616432821, + "narHash": "sha256-dOUdRvpiMZ5rEmvcOzymhKJ73n6dJ/W02zuiM3SpK1U=", "owner": "colemickens", "repo": "nixpkgs-wayland", - "rev": "6309b395adf59d4827545b66a4aadae33174a96e", + "rev": "af1894dceaf8ba472750a37cb601a9d935b1ae9c", "type": "github" }, "original": { diff --git a/hosts/lungmen.nix b/hosts/lungmen.nix index a47b558..db04ba4 100644 --- a/hosts/lungmen.nix +++ b/hosts/lungmen.nix @@ -42,7 +42,7 @@ in nixosPersistence ]; - systemd.additionalUpstreamSystemUnits = [ "tmp.mount" ]; + #systemd.additionalUpstreamSystemUnits = [ "tmp.mount" ]; boot = { loader = { efi.canTouchEfiVariables = true; @@ -195,7 +195,10 @@ in ''; }; }; - virtualisation.podman.enable = true; + virtualisation = { + podman.enable = true; + libvirtd.enable = true; + }; system.stateVersion = "20.09"; } diff --git a/local/locale.nix b/local/locale.nix index 2c59d90..1ac2b3d 100644 --- a/local/locale.nix +++ b/local/locale.nix @@ -1,6 +1,6 @@ { ... }: { console.keyMap = "trq"; - i18n.defaultLocale = "tr_TR.UTF-8"; + i18n.defaultLocale = "en_US.UTF-8"; time.timeZone = "Turkey"; services.xserver.layout = "tr"; } diff --git a/overlays/hikari.nix b/overlays/hikari.nix index 5383b2e..391b2e7 100644 --- a/overlays/hikari.nix +++ b/overlays/hikari.nix @@ -2,7 +2,7 @@ final: prev: { hikari = prev.hikari.overrideAttrs (old: rec { src = prev.fetchzip { url = "https://hub.darcs.net/raichoo/hikari/dist/hikari.zip"; - sha256 = "sha256-oVqn8rd9ajF0eS1D+L2Fw9n1MGuRzQbyWPYFueWF+hk="; + sha256 = "sha256-c7i/lekoS8FcsAHwXUw5IojC1xWS+sNeLVOzMf+dA5Q="; }; buildInputs = old.buildInputs ++ [ prev.pandoc ]; }); diff --git a/overlays/hydrus.nix b/overlays/hydrus.nix new file mode 100644 index 0000000..816fc8c --- /dev/null +++ b/overlays/hydrus.nix @@ -0,0 +1,12 @@ +final: prev: { + hydrus = prev.hydrus.overrideAttrs (old: rec { + pname = "hydrus"; + version = "433"; + src = prev.fetchFromGitHub { + owner = "hydrusnetwork"; + repo = "hydrus"; + rev = "v433"; + sha256 = "sha256-RZKmtVSCkMuJxuGGgk92J0Y71aHRZYsaBmUZy/gC9Ms="; + }; + }); +} diff --git a/overlays/phantom.nix b/overlays/phantom.nix new file mode 100644 index 0000000..3653460 --- /dev/null +++ b/overlays/phantom.nix @@ -0,0 +1,25 @@ +final: prev: { + phantomstyle = prev.stdenv.mkDerivation { + pname = "phantomstyle"; + version = "6e9580b"; + + src = builtins.fetchGit { + url = "https://github.com/randrew/phantomstyle.git"; + rev = "6e9580b72e372b5acecd616434eaf441bf73bcf4"; + }; + + dontWrapQtApps = true; + + buildInputs = [ prev.libsForQt5.qt5.qtbase ]; + + buildPhase = '' + cd src/styleplugin + qmake && make + ''; + + installPhase = '' + mkdir -p $out/$qtPluginPrefix/styles + mv libphantomstyleplugin.so $out/$qtPluginPrefix/styles + ''; + }; +} diff --git a/users/patriot/default.nix b/users/patriot/default.nix index a5f321d..d238142 100644 --- a/users/patriot/default.nix +++ b/users/patriot/default.nix @@ -41,13 +41,13 @@ xserver = { enable = true; desktopManager = { - plasma5.enable = true; + plasma5.enable = false; gnome3.enable = false; xterm.enable = false; }; displayManager = { autoLogin = { - enable = true; + enable = false; user = "patriot"; }; lightdm.enable = false; @@ -55,8 +55,8 @@ enable = false; wayland = true; }; - sddm.enable = true; - startx.enable = false; + sddm.enable = false; + startx.enable = true; }; }; }; diff --git a/users/patriot/home.nix b/users/patriot/home.nix index 7d8333d..120bd49 100644 --- a/users/patriot/home.nix +++ b/users/patriot/home.nix @@ -180,26 +180,29 @@ in home-manager.users.patriot = { config, pkgs, ... }: { imports = [ ../profiles/hikari.nix ]; - # gtk = { - # # enable = true; - # font = { - # package = pkgs.dejavu_fonts; - # name = "DejaVu Sans 12"; - # }; - # iconTheme = { - # package = pkgs.papirus-icon-theme; - # name = "Papirus Dark"; - # }; - # theme = { - # package = pkgs.numix-gtk-theme; - # name = "Numix Dark"; - # }; - # }; + /*gtk = { + enable = false; + font = { + package = pkgs.dejavu_fonts; + name = "DejaVu Sans 12"; + }; + iconTheme = { + package = pkgs.papirus-icon-theme; + name = "Papirus Dark"; + }; + theme = { + package = pkgs.numix-gtk-theme; + name = "Numix Dark"; + }; + }; - # qt = { - # # enable = true; - # platformTheme = "gtk"; - # }; + qt = { + enable = false; + style = { + package = pkgs.adwaita-qt; + name = "adwaita-dark"; + }; + };*/ fonts.fontconfig.enable = true; home = { @@ -215,7 +218,9 @@ in # Programs audacity krita + kdenlive gnome3.seahorse + gnome3.gnome-boxes wine-staging cachix chromiumWaylandPkg @@ -236,6 +241,10 @@ in tagref libreoffice-fresh mako + hydrus + musikcube + qt5ct + phantomstyle ] ++ kideDeps; }; @@ -245,7 +254,7 @@ in inherit font; }; sway = { - enable = false; + enable = true; extraSessionCommands = '' export SDL_VIDEODRIVER=wayland # needs qt5.qtwayland in systemPackages @@ -254,6 +263,7 @@ in # Fix for some Java AWT applications (e.g. Android Studio), # use this if they aren't displayed properly: export _JAVA_AWT_WM_NONREPARENTING=1 + export QT_QPA_PLATFORMTHEME=qt5ct ''; wrapperFeatures.gtk = true; config = { @@ -472,16 +482,14 @@ in # Fix for some Java AWT applications (e.g. Android Studio), # use this if they aren't displayed properly: export _JAVA_AWT_WM_NONREPARENTING=1 + export QT_QPA_PLATFORMTHEME=qt5ct ''; - # loginExtra = - # let - # deCmd = if config.wayland.windowManager.sway.enable then "sway" else (if config.wayland.windowManager.hikari.enable then "hikari" else throw "Need a window manager to start!"); - # in - # '' - # if [ "$(${pkgs.coreutils}/bin/tty)" = "/dev/tty1" ]; then - # exec ${deCmd} - # fi - # ''; + loginExtra = + '' + if [ "$(${pkgs.coreutils}/bin/tty)" = "/dev/tty1" ]; then + exec sway + fi + ''; initExtra = '' bindkey "$terminfo[kRIT5]" forward-word bindkey "$terminfo[kLFT5]" backward-word @@ -518,7 +526,7 @@ in acc = "#${acColor}"; in { - enable = false; + enable = true; colors = { window = { background = bgc; @@ -546,7 +554,7 @@ in swayEnabled = config.wayland.windowManager.sway.enable; in { - enable = config.wayland.windowManager.sway.enable || config.wayland.windowManager.hikari.enable; + enable = swayEnabled || config.wayland.windowManager.hikari.enable; settings = [{ layer = "top"; position = "top";