From bcb3862c89dac8aa00c065ce6447ff34c7787fe6 Mon Sep 17 00:00:00 2001 From: Dmitriy Holkin Date: Sun, 22 Sep 2019 13:35:49 +0400 Subject: [PATCH] Changes, refactoring, todo... --- modules/applications/i3lock-fancy-ffmpeg.nix | 29 +++++++++++++++++ modules/applications/packages.nix | 4 ++- modules/default.nix | 3 +- modules/hardware.nix | 1 + modules/packages.nix | 1 + modules/workspace/barrier.nix | 1 - modules/workspace/cursor.nix | 10 ------ modules/workspace/gtk.nix | 8 ++++- modules/workspace/i3/default.nix | 34 ++------------------ modules/workspace/i3blocks/default.nix | 2 +- modules/workspace/misc.nix | 4 ++- modules/{applications => workspace}/rofi.nix | 0 todo.md | 6 ++-- 13 files changed, 53 insertions(+), 50 deletions(-) create mode 100644 modules/applications/i3lock-fancy-ffmpeg.nix delete mode 100644 modules/workspace/cursor.nix rename modules/{applications => workspace}/rofi.nix (100%) diff --git a/modules/applications/i3lock-fancy-ffmpeg.nix b/modules/applications/i3lock-fancy-ffmpeg.nix new file mode 100644 index 0000000..1cbcab6 --- /dev/null +++ b/modules/applications/i3lock-fancy-ffmpeg.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, coreutils, scrot, ffmpeg, gawk +, i3lock-color, getopt, fontconfig +}: + +stdenv.mkDerivation rec { + rev = "c8f648c5e35178dd39ecc83094bf921752b7878b"; + name = "i3lock-fancy-ffmpeg_rev${builtins.substring 0 7 rev}"; + src = fetchFromGitHub { + owner = "rinfiyks"; + repo = "i3lock-fancy"; + inherit rev; + sha256 = "1pdvzi5d9p2r5md2g289j95333nkpb3ah3si91c5f6350swd8jmz"; + }; + patchPhase = '' + rm Makefile + ''; + installPhase = '' + mkdir -p $out/bin $out/share/i3lock-fancy-ffmpeg/icons + cp i3lock-fancy $out/bin/i3lock-fancy-ffmpeg + cp icons/lock*.png $out/share/i3lock-fancy-ffmpeg/icons + ''; + meta = with stdenv.lib; { + description = "i3lock is a bash script that takes a screenshot of the desktop, blurs the background and adds a lock icon and text."; + homepage = https://github.com/meskarune/i3lock-fancy; + maintainers = with maintainers; [ ]; + license = licenses.mit; + platforms = platforms.linux; + }; +} diff --git a/modules/applications/packages.nix b/modules/applications/packages.nix index 426af75..a5b815a 100644 --- a/modules/applications/packages.nix +++ b/modules/applications/packages.nix @@ -16,10 +16,12 @@ with deviceSpecific; { sysstat lxqt.pavucontrol-qt - git + bibata-cursors + i3lock-fancy-ffmpeg # Samba support cifs-utils # Utils + nix-prefetch-git hdparm vdpauinfo libva-utils diff --git a/modules/default.nix b/modules/default.nix index 9d986a8..eae8d13 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,16 +1,15 @@ { config, lib, ... }: { imports = [ ./applications/packages.nix - ./applications/rofi.nix # ./applications/vivaldi ./workspace/i3blocks ./workspace/i3 ./workspace/zsh.nix + ./workspace/rofi.nix ./workspace/gtk.nix # ./workspace/compton.nix ./workspace/misc.nix ./workspace/dunst.nix - ./workspace/cursor.nix ./workspace/mpv.nix ./workspace/kde # ./workspace/ssh.nix diff --git a/modules/hardware.nix b/modules/hardware.nix index 2572b72..3babf23 100644 --- a/modules/hardware.nix +++ b/modules/hardware.nix @@ -39,6 +39,7 @@ with deviceSpecific; { pkgs.linuxPackages else pkgs.linuxPackages_latest; + boot.zfs.enableUnstable = true; # For latest kernel boot.supportedFilesystems = [ "ntfs" ]; boot.blacklistedKernelModules = lib.mkIf (device == "Dell-Laptop") [ "psmouse" diff --git a/modules/packages.nix b/modules/packages.nix index ec8d861..ad4487f 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -4,6 +4,7 @@ rec { # nerdfonts = nur.balsoft.pkgs.roboto-mono-nerd; youtube-to-mpv = pkgs.callPackage ./applications/youtube-to-mpv.nix {}; + i3lock-fancy-ffmpeg = pkgs.callPackage ./applications/i3lock-fancy-ffmpeg.nix {}; } ) ]; diff --git a/modules/workspace/barrier.nix b/modules/workspace/barrier.nix index 3d6fa36..be9d1ec 100644 --- a/modules/workspace/barrier.nix +++ b/modules/workspace/barrier.nix @@ -21,7 +21,6 @@ }; } else { client.enable = true; - client.autoStart = true; client.serverAddress = "NixOS-VM"; }; } \ No newline at end of file diff --git a/modules/workspace/cursor.nix b/modules/workspace/cursor.nix deleted file mode 100644 index 3fcfa0f..0000000 --- a/modules/workspace/cursor.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, lib, pkgs, ... }: { - - environment.systemPackages = with pkgs; [ - bibata-cursors - ]; - # Bibata_Amber, Bibata_Ice, Bibata_Oil - home-manager.users.alukard.home.file.".icons/default" = { - source = "${pkgs.bibata-cursors}/share/icons/Bibata_Oil"; - }; -} diff --git a/modules/workspace/gtk.nix b/modules/workspace/gtk.nix index 52be451..cdbe96a 100644 --- a/modules/workspace/gtk.nix +++ b/modules/workspace/gtk.nix @@ -31,8 +31,9 @@ in { generated-gtk-theme = self.stdenv.mkDerivation rec { name = "generated-gtk-theme"; src = ../../imports/github/nana-4/materia-theme; - buildInputs = with self; [ sassc bc which inkscape optipng bash ]; + buildInputs = with self; [ sassc bc which inkscape optipng ]; installPhase = '' + HOME=/build chmod 777 -R . mkdir -p $out/share/themes patchShebangs . @@ -55,6 +56,11 @@ in { name = "Generated"; package = pkgs.generated-gtk-theme; }; + font = { + name = "Roboto 11"; + package = pkgs.roboto; + }; + gtk3.extraConfig.gtk-cursor-theme-name = "bibata_oil"; }; }; environment.sessionVariables.GTK_THEME = "Generated"; diff --git a/modules/workspace/i3/default.nix b/modules/workspace/i3/default.nix index 943bf50..8319beb 100644 --- a/modules/workspace/i3/default.nix +++ b/modules/workspace/i3/default.nix @@ -2,18 +2,7 @@ let thm = config.themes.colors; apps = config.defaultApplications; - customPackages = pkgs.callPackage ../../../packages { }; in { - systemd.services.changeNice = { - description = "Update niceness levels of important processes"; - serviceConfig.User = "root"; - wantedBy = [ "graphical.target" ]; - script = '' - sleep 5 - ${pkgs.utillinux}/bin/renice -n -10 -p $(${pkgs.procps}/bin/pidof i3) - ${pkgs.utillinux}/bin/renice -n -10 -p $(${pkgs.procps}/bin/pidof X) - ''; - }; environment.sessionVariables._JAVA_AWT_WM_NONREPARENTING = "1"; home-manager.users.alukard.xsession.windowManager.i3 = { enable = true; @@ -78,26 +67,9 @@ in { } ]; }; - # startup = map (a: { notification = false; } // a) [ - # { command = apps.browser.cmd; } - # { command = "${pkgs.kdeconnect}/lib/libexec/kdeconnectd"; } - # { - # command = - # "${pkgs.polkit-kde-agent}/lib/libexec/polkit-kde-authentication-agent-1"; - # } - # { - # command = - # "${pkgs.keepassxc}/bin/keepassxc /home/alukard/projects/nixos-config/misc/Passwords.kdbx"; - # } - # { command = "balooctl start"; } - # { command = "${pkgs.trojita}/bin/trojita"; } - # { - # command = "${pkgs.hsetroot}/bin/hsetroot -solid '${thm.bg}'"; - # always = true; - # } - # { command = "${pkgs.termNote}/bin/noted"; } - # { command = "${pkgs.nheko}/bin/nheko"; } - # ]; + startup = map (a: { notification = false; } // a) [ + { command = "${pkgs.xorg.xrdb}/bin/xrdb -merge ~/.Xresources"; } + ]; keybindings = let moveMouse = '' "sh -c 'eval `${pkgs.xdotool}/bin/xdotool \ diff --git a/modules/workspace/i3blocks/default.nix b/modules/workspace/i3blocks/default.nix index 92f49e8..d0a3042 100644 --- a/modules/workspace/i3blocks/default.nix +++ b/modules/workspace/i3blocks/default.nix @@ -12,7 +12,7 @@ in { status_command ${pkgs.i3blocks}/bin/i3blocks workspace_buttons yes strip_workspace_numbers no - tray_output none + tray_output primary colors { background ${config.themes.colors.bg} statusline ${config.themes.colors.fg} diff --git a/modules/workspace/misc.nix b/modules/workspace/misc.nix index e03ac7e..3f0afe7 100644 --- a/modules/workspace/misc.nix +++ b/modules/workspace/misc.nix @@ -26,7 +26,9 @@ options = [ "grp:win_space_toogle" ]; layout = "us,ru"; }; - # home.file.".icons/default".source ="${pkgs.breeze-qt5}/share/icons/breeze_cursors"; + home.file.".icons/default" = { + source = "${pkgs.bibata-cursors}/share/icons/Bibata_Oil"; + }; systemd.user.startServices = true; }; } diff --git a/modules/applications/rofi.nix b/modules/workspace/rofi.nix similarity index 100% rename from modules/applications/rofi.nix rename to modules/workspace/rofi.nix diff --git a/todo.md b/todo.md index bf1fc6a..c16c9f1 100644 --- a/todo.md +++ b/todo.md @@ -1,4 +1,6 @@ # TODO -* Экран по умолчанию в i3 - 1, а не 0. -* youtube-mpv в фоне без видео, для прослушивания музыки с ютуба +* смена темы со светлой на темную +* i3 хоткеи на русской раскладке +* добавить прогу словарь +* Сделать pull request на i3lock-fancy