From f29695d9526d1d584e31d1b846afacbe180fa36e Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Mon, 12 Sep 2022 10:05:47 +0300 Subject: [PATCH] separate colors --- colors/catppuccin_mocha.nix | 21 ++++++ colors/default.nix | 1 + flake.lock | 103 ++++++++++++++++++++++++++-- flake.nix | 6 ++ hosts/tkaronto/modules/gamemode.nix | 1 - modules/gamemode/default.nix | 31 --------- pkgs-set/pkgs-to-export.nix | 1 + pkgs-set/pkgs/discordo.nix | 21 ++++++ users/modules/foot/default.nix | 27 ++------ users/modules/hyprland/default.nix | 3 + 10 files changed, 157 insertions(+), 58 deletions(-) create mode 100644 colors/catppuccin_mocha.nix create mode 120000 colors/default.nix delete mode 120000 hosts/tkaronto/modules/gamemode.nix delete mode 100644 modules/gamemode/default.nix create mode 100644 pkgs-set/pkgs/discordo.nix diff --git a/colors/catppuccin_mocha.nix b/colors/catppuccin_mocha.nix new file mode 100644 index 0000000..9569149 --- /dev/null +++ b/colors/catppuccin_mocha.nix @@ -0,0 +1,21 @@ +# catppuccin mocha +{ + foreground = "cdd6f4"; # Text + background = "1e1e2e"; # Base + regular0 = "45475a"; # Surface 1 + regular1 = "f38ba8"; # red + regular2 = "a6e3a1"; # green + regular3 = "f9e2af"; # yellow + regular4 = "89b4fa"; # blue + regular5 = "f5c2e7"; # pink + regular6 = "94e2d5"; # teal + regular7 = "bac2de"; # Subtext 1 + bright0 = "585b70"; # Surface 2 + bright1 = "f38ba8"; # red + bright2 = "a6e3a1"; # green + bright3 = "f9e2af"; # yellow + bright4 = "89b4fa"; # blue + bright5 = "f5c2e7"; # pink + bright6 = "94e2d5"; # teal + bright7 = "a6adc8"; # Subtext 0 +} diff --git a/colors/default.nix b/colors/default.nix new file mode 120000 index 0000000..f3abd1a --- /dev/null +++ b/colors/default.nix @@ -0,0 +1 @@ +catppuccin_mocha.nix \ No newline at end of file diff --git a/flake.lock b/flake.lock index 00c399c..d743512 100644 --- a/flake.lock +++ b/flake.lock @@ -361,6 +361,28 @@ "type": "github" } }, + "eww": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay_2" + }, + "locked": { + "lastModified": 1662315613, + "narHash": "sha256-wzgWx3QxZvCAzRKLFmo/ru8hsIQsEDNeb4cPdlEyLxE=", + "owner": "elkowar", + "repo": "eww", + "rev": "d58d91de78d2b9984a1bbb8314be197bc0e283dc", + "type": "github" + }, + "original": { + "owner": "elkowar", + "repo": "eww", + "type": "github" + } + }, "fenix": { "inputs": { "nixpkgs": [ @@ -385,6 +407,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs": [ @@ -439,6 +477,21 @@ } }, "flake-utils_2": { + "locked": { + "lastModified": 1656928814, + "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { "locked": { "lastModified": 1637014545, "narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=", @@ -453,7 +506,7 @@ "type": "github" } }, - "flake-utils_3": { + "flake-utils_4": { "locked": { "lastModified": 1656928814, "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", @@ -484,6 +537,22 @@ "type": "github" } }, + "fufexan": { + "flake": false, + "locked": { + "lastModified": 1662936736, + "narHash": "sha256-zgZcmuVI+3PhViEAeuIkOTre2rmYajKW9LI5oG6XivI=", + "owner": "fufexan", + "repo": "dotfiles", + "rev": "ec0e88f5047b70f0573939369c6916ec9ce4549a", + "type": "github" + }, + "original": { + "owner": "fufexan", + "repo": "dotfiles", + "type": "github" + } + }, "gomod2nix": { "flake": false, "locked": { @@ -519,7 +588,7 @@ "inputs": { "nixCargoIntegration": "nixCargoIntegration", "nixpkgs": "nixpkgs_2", - "rust-overlay": "rust-overlay_2" + "rust-overlay": "rust-overlay_3" }, "locked": { "lastModified": 1661734840, @@ -639,11 +708,11 @@ }, "nil": { "inputs": { - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_4", "nixpkgs": [ "nixpkgs" ], - "rust-overlay": "rust-overlay_3" + "rust-overlay": "rust-overlay_4" }, "locked": { "lastModified": 1660934895, @@ -860,6 +929,8 @@ "inputs": { "bernbot": "bernbot", "blog": "blog", + "eww": "eww", + "fufexan": "fufexan", "helix": "helix", "home": "home", "hyprland": "hyprland", @@ -910,6 +981,28 @@ "rust-overlay_2": { "inputs": { "flake-utils": "flake-utils_2", + "nixpkgs": [ + "eww", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1661655464, + "narHash": "sha256-by9Hb0mNVdiCR7TBvUHIgDb0QIv3znp8VMGh7Bl35VQ=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "0c4c1432353e12b325d1472bea99e364871d2cb3", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_3": { + "inputs": { + "flake-utils": "flake-utils_3", "nixpkgs": [ "helix", "nixpkgs" @@ -929,7 +1022,7 @@ "type": "github" } }, - "rust-overlay_3": { + "rust-overlay_4": { "inputs": { "flake-utils": [ "nil", diff --git a/flake.nix b/flake.nix index 260f449..309c702 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,12 @@ webcord.url = "github:fufexan/webcord-flake"; webcord.inputs.nixpkgs.follows = "nixpkgs"; + + eww.url = "github:elkowar/eww"; + eww.inputs.nixpkgs.follows = "nixpkgs"; + + fufexan.url = "github:fufexan/dotfiles"; + fufexan.flake = false; }; outputs = inputs: let diff --git a/hosts/tkaronto/modules/gamemode.nix b/hosts/tkaronto/modules/gamemode.nix deleted file mode 120000 index ce4e5fe..0000000 --- a/hosts/tkaronto/modules/gamemode.nix +++ /dev/null @@ -1 +0,0 @@ -../../../modules/gamemode/default.nix \ No newline at end of file diff --git a/modules/gamemode/default.nix b/modules/gamemode/default.nix deleted file mode 100644 index 731bb9d..0000000 --- a/modules/gamemode/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - pkgs, - inputs, - ... -}: let - hyprland = inputs.hyprland.packages.${pkgs.system}.hyprland; - - startscript = pkgs.writeShellScript "gamemode-start" '' - export HYPRLAND_INSTANCE_SIGNATURE=$(ls /tmp/hypr | sort | tail -n 1) - ${hyprland}/bin/hyprctl --batch 'keyword decoration:blur 0 ; keyword animations:enabled 0 ; keyword misc:no_vfr 1' - ''; - - endscript = pkgs.writeShellScript "gamemode-end" '' - export HYPRLAND_INSTANCE_SIGNATURE=$(ls /tmp/hypr | sort | tail -n 1) - ${hyprland}/bin/hyprctl --batch 'keyword decoration:blur 1 ; keyword animations:enabled 1 ; keyword misc:no_vfr 0' - ''; -in { - programs.gamemode = { - enable = true; - settings = { - general = { - softrealtime = "auto"; - renice = 15; - }; - custom = { - start = "${startscript}"; - end = "${endscript}"; - }; - }; - }; -} diff --git a/pkgs-set/pkgs-to-export.nix b/pkgs-set/pkgs-to-export.nix index 63144d8..aeb8513 100644 --- a/pkgs-set/pkgs-to-export.nix +++ b/pkgs-set/pkgs-to-export.nix @@ -5,6 +5,7 @@ pkgs: ( "obsidian" "comic-mono" "chromium" + "discordo" ] pkgs ) diff --git a/pkgs-set/pkgs/discordo.nix b/pkgs-set/pkgs/discordo.nix new file mode 100644 index 0000000..fc318a4 --- /dev/null +++ b/pkgs-set/pkgs/discordo.nix @@ -0,0 +1,21 @@ +{ + buildGoModule, + fetchFromGitHub, + ... +}: let + rev = "40e2e7e6a5533c1e0bd682cb7ccadf3e5bc5eae8"; + shortRev = builtins.substring 0 8 rev; +in + buildGoModule { + pname = "discordo"; + version = shortRev; + + src = fetchFromGitHub { + owner = "ayntgl"; + repo = "discordo"; + inherit rev; + sha256 = "sha256-620PwT6RVrc3orD6Ny51kyMMdcQU5bZ1gSMJDJA7H2g="; + }; + + vendorSha256 = "sha256-XUoKEnLy88BAeUMZ19YS/vF1TksYroayQiyds5aQ3hI="; + } diff --git a/users/modules/foot/default.nix b/users/modules/foot/default.nix index 80195c1..da4ef3f 100644 --- a/users/modules/foot/default.nix +++ b/users/modules/foot/default.nix @@ -1,4 +1,8 @@ -{config, ...}: { +{ + config, + inputs, + ... +}: { settings.terminal.name = "foot"; programs.foot = { enable = true; @@ -8,26 +12,7 @@ font = "${config.settings.font.name}:size=${toString config.settings.font.size}"; dpi-aware = "yes"; }; - colors = { - foreground = "cdd6f4"; # Text - background = "1e1e2e"; # Base - regular0 = "45475a"; # Surface 1 - regular1 = "f38ba8"; # red - regular2 = "a6e3a1"; # green - regular3 = "f9e2af"; # yellow - regular4 = "89b4fa"; # blue - regular5 = "f5c2e7"; # pink - regular6 = "94e2d5"; # teal - regular7 = "bac2de"; # Subtext 1 - bright0 = "585b70"; # Surface 2 - bright1 = "f38ba8"; # red - bright2 = "a6e3a1"; # green - bright3 = "f9e2af"; # yellow - bright4 = "89b4fa"; # blue - bright5 = "f5c2e7"; # pink - bright6 = "94e2d5"; # teal - bright7 = "a6adc8"; # Subtext 0 - }; + colors = import "${inputs.self}/colors"; }; }; } diff --git a/users/modules/hyprland/default.nix b/users/modules/hyprland/default.nix index 8edc935..3afad9c 100644 --- a/users/modules/hyprland/default.nix +++ b/users/modules/hyprland/default.nix @@ -9,6 +9,7 @@ ../swaylock ../wlsunset ./swayidle.nix + "${inputs.fufexan}/home/graphical/eww" inputs.hyprland.homeManagerModules.default ]; @@ -41,6 +42,8 @@ exec-once=xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2 exec-once=swaybg -i ~/.config/wallpaper + exec-once=eww daemon + exec-once=eww open bar input { kb_layout=tr