collate recent changes back to master

This commit is contained in:
atagen 2025-06-18 01:16:11 +10:00
commit 92ed39cb83
258 changed files with 5169 additions and 16379 deletions

2
.gitignore vendored
View file

@ -0,0 +1,2 @@
home/dots/qtile/.direnv
mullvad/inactive

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "rhizome-vps"]
path = rhizome-vps
url = https://git.rhizome.tf/rhizome/server-config

View file

@ -1,20 +0,0 @@
#
# /home/bolt/.nvidia-settings-rc
#
# Configuration file for nvidia-settings - the NVIDIA Settings utility
# Generated on Sat Jan 7 20:25:59 2023
#
# ConfigProperties:
RcFileLocale = C
DisplayStatusBar = Yes
SliderTextEntries = Yes
IncludeDisplayNameInConfigFile = No
UpdateRulesOnProfileNameChange = Yes
Timer = PowerMizer_Monitor_(GPU_0),Yes,1000
Timer = Thermal_Monitor_(GPU_0),Yes,1000
Timer = Memory_Used_(GPU_0),Yes,3000
# Attributes:

1729
.p10k.zsh

File diff suppressed because it is too large Load diff

7
TODO Normal file
View file

@ -0,0 +1,7 @@
REPLACE HOME MANAGER WITH
pkgs.writers and HJEM
implement agenix
figure out a way to get firefox policies and plugins set up in webapps

53
create.nix Normal file
View file

@ -0,0 +1,53 @@
{
system,
inputs,
sharedModules,
...
}:
with inputs;
let
nix-rice = import "${inputs.nix-rice}/lib.nix" {
inherit (nixpkgs) lib;
kitty-themes-src = { };
};
rice = import ./rice {
inherit
inputs
system
nix-rice
;
};
in
{
systems =
definitions:
nixpkgs.lib.mapAttrs (
name: info:
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs rice;
mainUser = info.user;
};
modules =
[
./system/${name}.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs rice nix-rice;
mainUser = info.user;
};
users.${info.user}.imports = [
./home/${info.user}.nix
] ++ info.hmImports or [ ];
};
}
]
++ info.imports or [ ]
++ sharedModules;
}
) definitions;
}

1156
flake.lock generated Normal file

File diff suppressed because it is too large Load diff

106
flake.nix Normal file
View file

@ -0,0 +1,106 @@
{
description = "nixos config";
outputs =
inputs:
with inputs;
let
modules = import ./util/get-modules.nix {
inherit inputs;
};
create = import ./create.nix {
inherit inputs;
system = "x86_64-linux";
sharedModules =
(modules [
culr
meat
niri
# smooooth
])
++ [
nix-index-database.nixosModules.nix-index
./system/substituters.nix
];
};
in
{
nixosConfigurations = create.systems {
quiver = {
user = "bolt";
imports = (modules [ nyx ]);
};
adrift.user = "plank";
};
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
helix.url = "github:helix-editor/helix";
nix-index-database.url = "github:Mic92/nix-index-database";
nix-rice.url = "github:bertof/nix-rice";
nil.url = "github:oxalica/nil";
lix = {
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
flake = false;
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
inputs.lix.follows = "lix";
};
meat = {
url = "git+https://git.atagen.co/atagen/meat";
inputs.lix.follows = "lix";
inputs.lix-module.follows = "lix-module";
inputs.nixpkgs.follows = "nixpkgs";
};
culr = {
url = "git+https://git.atagen.co/atagen/culr";
inputs.nixpkgs.follows = "nixpkgs";
};
comfyui = {
url = "path:./flakes/comfyui";
inputs.nixpkgs.follows = "nixpkgs";
};
comfyui-plugins = {
url = "path:./flakes/comfyui-plugins";
inputs.nixpkgs.follows = "nixpkgs";
};
niri.url = "github:sodiboo/niri-flake";
hjem = {
url = "github:feel-co/hjem";
inputs.nixpkgs.follows = "nixpkgs";
};
hudcore.url = "git+https://git.atagen.co/atagen/hudcore-plymouth.git";
quickshell = {
url = "git+https://git.outfoxxed.me/quickshell/quickshell.git";
inputs.nixpkgs.follows = "nixpkgs";
};
nyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
# smooooth.url = "path:/home/bolt/code/smooooth";
};
}

View file

@ -1,57 +0,0 @@
{
description = "master home systems config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts = {
url = "github:hercues-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
eww = {
url = "github:elkowar/eww";
inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-overlay.follows = "rust-overlay";
};
flake-utils.url = "github:numtide/flake-utils";
helix = {
url = "github:helix-editor/helix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.parts.follows = "flake-parts";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/Hyprland";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
};
outputs = inputs@{ flake-parts, ... }:
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"];
imports = [
];
perSystem = {config, self', inputs', pkgs, system, ...}: {
};
};
}

View file

@ -0,0 +1,28 @@
{
pkgs,
src,
python3Packages,
...
}:
let
inherit (python3Packages)
numba
colour-science
rembg
pixeloe
transparent-background
;
in
pkgs.stdenvNoCC.mkDerivation {
pname = "comfyui-essentials";
version = "dev-${builtins.toString src.lastModified}";
inherit src;
propagatedBuildInputs = [
numba
colour-science
rembg
pixeloe
transparent-background
];
}

75
flakes/comfyui-plugins/flake.lock generated Normal file
View file

@ -0,0 +1,75 @@
{
"nodes": {
"gguf": {
"flake": false,
"locked": {
"lastModified": 1736350217,
"narHash": "sha256-3RqFfvXdn9sCIlctqa14c2fvluSmJCR+llfZo/MV64o=",
"owner": "city96",
"repo": "ComfyUI-GGUF",
"rev": "5875c52f59baca3a9372d68c43a3775e21846fe0",
"type": "github"
},
"original": {
"owner": "city96",
"repo": "ComfyUI-GGUF",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1738410390,
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
"path": "/nix/store/hjb1rqv2mfs5ny47amj2gsc8xk05x5g6-source",
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"openpose": {
"flake": false,
"locked": {
"lastModified": 1685841563,
"narHash": "sha256-GUjs8mIUFAbjJEVL+EsT44HG42mAiumKOBlBas1xxrM=",
"owner": "space-nuko",
"repo": "ComfyUI-OpenPose-Editor",
"rev": "4d8fe730acdb11ab2fcd592129d91d338d270adf",
"type": "github"
},
"original": {
"owner": "space-nuko",
"repo": "ComfyUI-OpenPose-Editor",
"type": "github"
}
},
"root": {
"inputs": {
"gguf": "gguf",
"nixpkgs": "nixpkgs",
"openpose": "openpose",
"tensorrt": "tensorrt"
}
},
"tensorrt": {
"flake": false,
"locked": {
"lastModified": 1728519788,
"narHash": "sha256-tqiodF60IVlmvJknYxEwL0U7GIrrfl49k6Tg+8jGRVU=",
"owner": "comfyanonymous",
"repo": "ComfyUI_TensorRT",
"rev": "5bcc3f1e5c2424bb20bcb586e340c25ebe4a954f",
"type": "github"
},
"original": {
"owner": "comfyanonymous",
"repo": "ComfyUI_TensorRT",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -0,0 +1,49 @@
{
inputs = {
gguf = {
url = "github:city96/ComfyUI-GGUF";
flake = false;
};
tensorrt = {
url = "github:comfyanonymous/ComfyUI_TensorRT";
flake = false;
};
# needs some deps packaged
# essentials = {
# url = "github:cubiq/ComfyUI_essentials";
# flake = false;
# };
openpose = {
url = "github:space-nuko/ComfyUI-OpenPose-Editor";
flake = false;
};
};
outputs =
{
self,
nixpkgs,
...
}:
let
pkgs = import nixpkgs {
system = "x86_64-linux";
};
inherit (pkgs) lib callPackage;
inherit (builtins) mapAttrs;
filteredInputs = lib.filterAttrs (n: _v: n != "nixpkgs") self.inputs;
in
{
overlays.comfyui-plugins = final: _prev: {
comfyui-plugins = mapAttrs (
name: value: final.callPackage ./${name}/default.nix { src = value; }
) filteredInputs;
};
packages.x86_64-linux = mapAttrs (
name: value: callPackage ./${name}/default.nix { src = value; }
) filteredInputs;
};
}

View file

@ -0,0 +1,23 @@
{
pkgs,
src,
python3Packages,
...
}:
let
inherit (python3Packages) gguf numpy pyyaml;
in
pkgs.stdenvNoCC.mkDerivation {
pname = "comfyui-gguf";
version = "dev-${builtins.toString src.lastModified}";
inherit src;
propagatedBuildInputs = [
gguf
numpy
pyyaml
];
installPhase = ''
mkdir -p $out
cp -r * $out/
'';
}

View file

@ -0,0 +1,20 @@
{
pkgs,
src,
...
}:
pkgs.stdenvNoCC.mkDerivation {
pname = "comfyui-openpose-editor";
version = "dev-${builtins.toString src.lastModified}";
inherit src;
patches = [
./openpose_no_update.patch
];
installPhase = ''
mkdir -p $out
cp -r * $out/
cp js/* $out/
'';
}

View file

@ -0,0 +1,12 @@
diff --git a/__init__.py b/__init__.py
index e4cf8bb..7d8f894 100644
--- a/__init__.py
+++ b/__init__.py
@@ -35,6 +35,6 @@ def update_javascript():
shutil.copy(src_file, dst_file)
-update_javascript()
+# update_javascript()
print('\033[34mOpenPose Editor: \033[92mLoaded\033[0m')

View file

@ -0,0 +1,24 @@
{
pkgs,
src,
python3Packages,
...
}:
let
inherit (python3Packages) tensorrt onnx;
in
pkgs.stdenvNoCC.mkDerivation {
pname = "comfyui-tensorrt";
version = "dev-${builtins.toString src.lastModified}";
inherit src;
propagatedBuildInputs = [
tensorrt
onnx
];
installPhase = ''
mkdir -p $out
cp -r * $out
'';
}

View file

@ -0,0 +1,96 @@
{
pkgs,
lib,
config,
comfyui,
comfy_dir ? "/run/user/1000/comfyui/",
spandrel,
plugins ? config.comfyui.plugins or [ ],
...
}:
let
inherit (pkgs) python3;
inherit (pkgs.python3Packages)
torch
torchsde
torchvision
torchaudio
einops
transformers
tokenizers
sentencepiece
safetensors
aiohttp
pyyaml
pillow
scipy
tqdm
psutil
kornia
soundfile
;
python = python3.buildEnv.override {
extraLibs = [
torch
torchsde
torchvision
torchaudio
einops
transformers
tokenizers
sentencepiece
safetensors
aiohttp
pyyaml
pillow
scipy
tqdm
psutil
kornia
soundfile
spandrel
] ++ plugins;
};
in
pkgs.stdenvNoCC.mkDerivation {
name = "comfyui";
pname = "comfyui";
version = "dev-${builtins.toString comfyui.lastModified}";
src = comfyui;
nativeBuildInputs =
let
inherit (pkgs) makeWrapper;
in
[
makeWrapper
];
propagatedBuildInputs =
let
inherit (pkgs.cudaPackages) cudatoolkit;
in
[
python
cudatoolkit
];
patches = [ ./folder_paths.patch ];
installPhase =
let
launcher = pkgs.writeShellScript "launch.sh" ''
mkdir -p $COMFY_DIR/custom_nodes
mkdir -p $COMFY_DIR/models/{checkpoints,configs,loras,vae,clip,unet,diffusion_models,clip_vision,style_models,embeddings,diffusers,vae_approx,controlnet,gligen,upscale_models,hypernetworks,photomaker,classifiers}
${python}/bin/python3 $COMFY/comfyui/main.py --output-directory $(mktemp)
'';
in
''
mkdir -p $out/comfyui
cp -r * $out/comfyui
mkdir -p $out/bin
makeWrapper ${launcher} $out/bin/comfyui --prefix PATH : ${lib.makeBinPath [ python ]} \
--set PYTHONPATH ${lib.makeLibraryPath [ python ]} --set COMFY $out --set COMFY_DIR ${comfy_dir}
'';
meta.mainProgram = "comfyui";
}

41
flakes/comfyui/flake.lock generated Normal file
View file

@ -0,0 +1,41 @@
{
"nodes": {
"comfyui": {
"flake": false,
"locked": {
"lastModified": 1739165060,
"narHash": "sha256-DLiv96ynd+p4lXgvNMqgSklWFciLX+l+nXlu5MYVrg8=",
"owner": "comfyanonymous",
"repo": "ComfyUI",
"rev": "4027466c802d174d76347726d74de73c39acedb3",
"type": "github"
},
"original": {
"owner": "comfyanonymous",
"repo": "ComfyUI",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1738410390,
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
"path": "/nix/store/hjb1rqv2mfs5ny47amj2gsc8xk05x5g6-source",
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"comfyui": "comfyui",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

56
flakes/comfyui/flake.nix Normal file
View file

@ -0,0 +1,56 @@
{
inputs = {
comfyui = {
url = "github:comfyanonymous/ComfyUI";
flake = false;
};
};
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org"
"https://cuda-maintainers.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
];
};
outputs =
{
self,
nixpkgs,
comfyui,
}:
{
homeManagerModules.comfyui = import ./module.nix;
overlays.comfyui = final: _prev: {
comfyui =
let
spandrel = final.callPackage ./spandrel.nix { };
in
final.callPackage ./default.nix {
cudaSupport = true;
inherit comfyui spandrel;
};
};
packages.x86_64-linux =
let
system = "x86_64-linux";
pkgs = import nixpkgs {
config.allowUnfree = true;
config.cudaSupport = true;
inherit system;
};
spandrel = pkgs.callPackage ./spandrel.nix { };
in
{
default = pkgs.callPackage ./default.nix {
inherit comfyui spandrel;
};
};
};
}

View file

@ -0,0 +1,28 @@
diff --git a/folder_paths.py b/folder_paths.py
index 01ae821..27906ac 100644
--- a/folder_paths.py
+++ b/folder_paths.py
@@ -11,7 +11,7 @@ supported_pt_extensions: set[str] = {'.ckpt', '.pt', '.bin', '.pth', '.safetenso
folder_names_and_paths: dict[str, tuple[list[str], set[str]]] = {}
-base_path = os.path.dirname(os.path.realpath(__file__))
+base_path = os.path.dirname(os.environ['COMFY_DIR'])
models_dir = os.path.join(base_path, "models")
folder_names_and_paths["checkpoints"] = ([os.path.join(models_dir, "checkpoints")], supported_pt_extensions)
folder_names_and_paths["configs"] = ([os.path.join(models_dir, "configs")], [".yaml"])
@@ -39,10 +39,10 @@ folder_names_and_paths["photomaker"] = ([os.path.join(models_dir, "photomaker")]
folder_names_and_paths["classifiers"] = ([os.path.join(models_dir, "classifiers")], {""})
-output_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "output")
-temp_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "temp")
-input_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "input")
-user_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "user")
+output_directory = os.path.join(base_path, "output")
+temp_directory = os.path.join(base_path, "temp")
+input_directory = os.path.join(base_path, "input")
+user_directory = os.path.join(base_path, "user")
filename_list_cache: dict[str, tuple[list[str], dict[str, float], float]] = {}

49
flakes/comfyui/module.nix Normal file
View file

@ -0,0 +1,49 @@
{
pkgs,
lib,
config,
...
}:
let
inherit (lib)
mkEnableOption
mkOption
types
hasSuffix
;
cfg = config.programs.comfyui;
# comfyui only understands the path properly with a trailing slash
getStorage = if (hasSuffix "/" cfg.storage) then cfg.storage else cfg.storage + "/";
in
{
options.programs.comfyui = {
enable = mkEnableOption "ComfyUI";
storage = mkOption {
type = types.path;
description = "where to source models and store information";
};
plugins = mkOption {
type = with types; listOf package;
description = "list of comfyui plugins";
default = [ ];
};
};
config = lib.mkIf cfg.enable {
home.packages = [
# pkgs.comfyui
(pkgs.comfyui.override {
comfy_dir = getStorage;
inherit (cfg) plugins;
})
];
home.file = builtins.listToAttrs (
map (pkg: {
name = "${getStorage}/custom_nodes/${pkg.name}";
value = {
recursive = true;
source = "${pkg}";
};
}) cfg.plugins
);
};
}

View file

@ -0,0 +1,45 @@
{
python3Packages,
fetchPypi,
...
}:
python3Packages.buildPythonPackage rec {
pname = "spandrel";
version = "0.4.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-9FUmiT+SOhLvN1QsROREsSCJdlk7x8zfpU/QTHw+gMo=";
};
build-system =
let
inherit (python3Packages) setuptools;
in
[
setuptools
];
dependencies =
let
inherit (python3Packages)
torch
torchvision
safetensors
numpy
einops
typing-extensions
;
in
[
torch
torchvision
safetensors
numpy
einops
typing-extensions
];
doCheck = false;
}

41
flakes/niri-session-manager/flake.lock generated Normal file
View file

@ -0,0 +1,41 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1749285348,
"narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=",
"path": "/nix/store/syvnmj3hhckkbncm94kfkbl76qsdqqj3-source",
"rev": "3e3afe5174c561dee0df6f2c2b2236990146329f",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"src": "src"
}
},
"src": {
"flake": false,
"locked": {
"lastModified": 1741050520,
"narHash": "sha256-bTOxv5yZh6wgCs7ADUFKdlXGtlIckkSijGV8G7ToVy4=",
"owner": "MTeaHead",
"repo": "niri-session-manager",
"rev": "e8732380991bd629a7e6c3fb5ea50317084fb1eb",
"type": "github"
},
"original": {
"owner": "MTeaHead",
"repo": "niri-session-manager",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -0,0 +1,66 @@
{
inputs = {
src = {
url = "github:MTeaHead/niri-session-manager";
flake = false;
};
};
outputs =
{
nixpkgs,
src,
self,
}:
{
packages.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.rustPlatform.callPackage (
{ pkgs, buildRustPackage }:
buildRustPackage (finalAttrs: {
pname = "niri-session-manager";
version = "git-${src.rev or src.dirtyRev or "dirty"}";
inherit src;
cargoLock = {
lockFile = "${src}/Cargo.lock";
};
meta.mainProgram = "niri-session-manager";
})
) { };
nixosModules.niri-session-manager =
{
config,
lib,
pkgs,
...
}:
{
options = {
services.niri-session-manager = {
enable = lib.mkEnableOption "Niri Session Manager";
};
};
config =
let
cfg = config.services.niri-session-manager;
in
lib.mkIf cfg.enable {
systemd.user.services.niri-session-manager = {
enable = true;
description = "Niri Session Manager";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
Restart = "always";
ExecStart = "${self.packages.${pkgs.system}.default}";
PrivateTmp = true;
};
};
};
};
};
}

View file

@ -0,0 +1 @@
/nix/store/731lnc1qjhq5gcrvmqycbm41r2ga3dqa-niri-session-manager-git-e8732380991bd629a7e6c3fb5ea50317084fb1eb

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2020-2021 Mihai Fufezan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,74 +0,0 @@
<h1 align="center">fufexan/dotfiles</h1>
# 🗒 About
In-house baked configs for Home-Manager and NixOS. Borrowed bits sprinkled on
top. Using [flakes](https://nixos.wiki/wiki/Flakes) and
[flake-parts](https://github.com/hercules-ci/flake-parts).
See an overview of the flake outputs by running
`nix flake show github:fufexan/dotfiles`.
## 🗃️ Contents
- [modules](modules): NixOS common configs
- [hosts](hosts): host-specific configuration
- [home](home): my [Home Manager](https://github.com/nix-community/home-manager) config
- [lib](lib): helper functions
- [pkgs](pkgs): package definitions
# 📦 Exported packages
Run packages directly with:
```console
nix run github:fufexan/dotfiles#packageName
```
Or install from the `packages` output. For example:
```nix
# flake.nix
{
inputs.fufexan-dotfiles.url = "github:fufexan/dotfiles";
# Override my nixpkgs, binary cache will have less hits
inputs.fufexan-dotfiles.inputs.nixpkgs.follows = "nixpkgs";
}
# configuration.nix
{pkgs, inputs, ...}: {
environment.systemPackages = [
inputs.fufexan-dotfiles.packages."x86_64-linux".packageName
];
}
```
## 💻 Desktop preview
<a href="https://drive.google.com/file/d/1W-bwn3UwbMxReiiNqMmq38noa7Xw0Gj1/preview">
<img src="https://user-images.githubusercontent.com/36706276/216402032-ff32fcad-ca21-49d3-9c29-6ff0d2d8b1d8.png" alt="Desktop Preview">
</a>
*Hint: click to go to a video showcase*
# 💾 Resources
Other configurations from where I learned and copied:
- [colemickens/nixcfg](https://github.com/colemickens/nixcfg)
- [flake-utils-plus](https://github.com/gytis-ivaskevicius/flake-utils-plus)
- [gytis-ivaskevicius/nixfiles](https://github.com/gytis-ivaskevicius/nixfiles)
- [Mic92/dotfiles](https://github.com/Mic92/dotfiles)
- [NobbZ/nixos-config](https://github.com/NobbZ/nixos-config)
- [privatevoid-net/privatevoid-infrastructure](https://github.com/privatevoid-net/privatevoid-infrastructure)
- [RicArch97/nixos-config](https://github.com/RicArch97/nixos-config)
- [viperML/dotfiles](https://github.com/viperML/dotfiles)
# 👥 People
These are the people whom I've taken inspiration from while writing these
configs. There surely are more but I tend to forget. Regardless, I am thankful
to all of them.
DieracDelta - gytis-ivaskevicius - hlissner - keksbg - Kranzes -
matthewcroughan - max-privatevoid - Misterio77 - NobbZ - OPNA2608 -
pnotequalnp - RicArch97 - tadeokondrak - viperML - Xe - yusdacra

View file

@ -1,788 +0,0 @@
{
"nodes": {
"agenix": {
"inputs": {
"darwin": "darwin",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1677969766,
"narHash": "sha256-AIp/ZYZMNLDZR/H7iiAlaGpu4lcXsVt9JQpBlf43HRY=",
"owner": "ryantm",
"repo": "agenix",
"rev": "03b51fe8e459a946c4b88dcfb6446e45efb2c24e",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"crane": {
"flake": false,
"locked": {
"lastModified": 1670900067,
"narHash": "sha256-VXVa+KBfukhmWizaiGiHRVX/fuk66P8dgSFfkVN4/MY=",
"owner": "ipetkov",
"repo": "crane",
"rev": "59b31b41a589c0a65e4a1f86b0e5eac68081468b",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1673295039,
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"devshell": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1678957337,
"narHash": "sha256-Gw4nVbuKRdTwPngeOZQOzH/IFowmz4LryMPDiJN/ah4=",
"owner": "numtide",
"repo": "devshell",
"rev": "3e0e60ab37cd0bf7ab59888f5c32499d851edb47",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"dream2nix": {
"inputs": {
"alejandra": [
"helix",
"nci"
],
"all-cabal-json": [
"helix",
"nci"
],
"crane": "crane",
"devshell": [
"helix",
"nci"
],
"flake-parts": [
"helix",
"nci",
"parts"
],
"flake-utils-pre-commit": [
"helix",
"nci"
],
"ghc-utils": [
"helix",
"nci"
],
"gomod2nix": [
"helix",
"nci"
],
"mach-nix": [
"helix",
"nci"
],
"nix-pypi-fetcher": [
"helix",
"nci"
],
"nixpkgs": [
"helix",
"nci",
"nixpkgs"
],
"poetry2nix": [
"helix",
"nci"
],
"pre-commit-hooks": [
"helix",
"nci"
],
"pruned-racket-catalog": [
"helix",
"nci"
]
},
"locked": {
"lastModified": 1677289985,
"narHash": "sha256-lUp06cTTlWubeBGMZqPl9jODM99LpWMcwxRiscFAUJg=",
"owner": "nix-community",
"repo": "dream2nix",
"rev": "28b973a8d4c30cc1cbb3377ea2023a76bc3fb889",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "dream2nix",
"type": "github"
}
},
"eww": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": [
"rust-overlay"
]
},
"locked": {
"lastModified": 1678303550,
"narHash": "sha256-JlpoMXL+QIO0DUIyAcGRJte2G/jF/rSeO/zze5W7S/s=",
"owner": "elkowar",
"repo": "eww",
"rev": "45154bbf5962cad9c4e6c76f75d57dd8d740d307",
"type": "github"
},
"original": {
"owner": "elkowar",
"repo": "eww",
"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-compat_2": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1678379998,
"narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c13d60b89adea3dc20704c045ec4d50dd964d447",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1642700792,
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"fu": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"helix": {
"inputs": {
"nci": "nci",
"nixpkgs": "nixpkgs",
"parts": [
"flake-parts"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1678544833,
"narHash": "sha256-aLs6qjiViaxryP2XMjKPzrJGYfIQsGTbNWfbySfivmY=",
"owner": "SoraTenshi",
"repo": "helix",
"rev": "80782f4f3cd557617d09b0d8f42dbce780552630",
"type": "github"
},
"original": {
"owner": "SoraTenshi",
"ref": "daily-driver",
"repo": "helix",
"type": "github"
}
},
"hm": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1679067095,
"narHash": "sha256-G2dJQURL/CCi+8RP6jNJG8VqgtzEMCA+6mNodd3VR6E=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3239e0b40f242f47bf6c0c37b2fd35ab3e76e370",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"hyprland": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"nixpkgs": "nixpkgs_2",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1679166084,
"narHash": "sha256-yr+alTr1eGjEKpMiD06FTTMP6vaoNwYEZT6mW6dQ5rM=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "06244555915339967864292dd0b83cd9732516d8",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"type": "github"
}
},
"hyprland-contrib": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1679036674,
"narHash": "sha256-2s3Hfq56jL8ePyc3+calPT34FNMK2zksqwPhIxAq20o=",
"owner": "hyprwm",
"repo": "contrib",
"rev": "1af47a008e850c595aeddc83bb3f04fd81935caa",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "contrib",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1671839510,
"narHash": "sha256-+PY1qqJfmZzzROgcIY4I7AkCwpnC+qBIYk2eFoA9RWc=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "b8f55e02a328c47ed373133c52483bbfa20a1b75",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"kmonad": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"dir": "nix",
"lastModified": 1673185501,
"narHash": "sha256-uEtWPpl9nH7QqochHo1z+giPga1zXR1Ko3dOXHIapFY=",
"owner": "kmonad",
"repo": "kmonad",
"rev": "3413f1be996142c8ef4f36e246776a6df7175979",
"type": "github"
},
"original": {
"dir": "nix",
"owner": "kmonad",
"repo": "kmonad",
"type": "github"
}
},
"lowdown-src": {
"flake": false,
"locked": {
"lastModified": 1633514407,
"narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
"owner": "kristapsdz",
"repo": "lowdown",
"rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
"type": "github"
},
"original": {
"owner": "kristapsdz",
"repo": "lowdown",
"type": "github"
}
},
"mk-naked-shell": {
"flake": false,
"locked": {
"lastModified": 1676572903,
"narHash": "sha256-oQoDHHUTxNVSURfkFcYLuAK+btjs30T4rbEUtCUyKy8=",
"owner": "yusdacra",
"repo": "mk-naked-shell",
"rev": "aeca9f8aa592f5e8f71f407d081cb26fd30c5a57",
"type": "github"
},
"original": {
"owner": "yusdacra",
"repo": "mk-naked-shell",
"type": "github"
}
},
"nci": {
"inputs": {
"dream2nix": "dream2nix",
"mk-naked-shell": "mk-naked-shell",
"nixpkgs": [
"helix",
"nixpkgs"
],
"parts": "parts",
"rust-overlay": [
"helix",
"rust-overlay"
]
},
"locked": {
"lastModified": 1677297103,
"narHash": "sha256-ArlJIbp9NGV9yvhZdV0SOUFfRlI/kHeKoCk30NbSiLc=",
"owner": "yusdacra",
"repo": "nix-cargo-integration",
"rev": "a79272a2cb0942392bb3a5bf9a3ec6bc568795b2",
"type": "github"
},
"original": {
"owner": "yusdacra",
"repo": "nix-cargo-integration",
"type": "github"
}
},
"nix-gaming": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1678324469,
"narHash": "sha256-FWI0+K1zdfzOq8BbgGhRvy+qp2J4KauGL1geAc19PRQ=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "18fac9dd032d0bb1d4c660b3257fa00df7f0145d",
"type": "github"
},
"original": {
"owner": "fufexan",
"repo": "nix-gaming",
"type": "github"
}
},
"nix-super": {
"inputs": {
"lowdown-src": "lowdown-src",
"nixpkgs": "nixpkgs_4",
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1677536397,
"narHash": "sha256-pKp+dmOJc3/9R3dBP30u2zXOyCuF5dVzgFlS1upSwZk=",
"owner": "privatevoid-net",
"repo": "nix-super",
"rev": "8eb40776e51819038fbb8a087d9885842451a333",
"type": "github"
},
"original": {
"owner": "privatevoid-net",
"repo": "nix-super",
"type": "github"
}
},
"nix-xilinx": {
"inputs": {
"flake-compat": "flake-compat_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1678957299,
"narHash": "sha256-myDk5QC9Q5FESSJl5N3Nf67w+dwq2KpvcguTwodKGqo=",
"owner": "doronbehar",
"repo": "nix-xilinx",
"rev": "e1533146984dd11bdefd6042c282cd123aca8d71",
"type": "gitlab"
},
"original": {
"owner": "doronbehar",
"repo": "nix-xilinx",
"type": "gitlab"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1677063315,
"narHash": "sha256-qiB4ajTeAOVnVSAwCNEEkoybrAlA+cpeiBxLobHndE8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "988cc958c57ce4350ec248d2d53087777f9e1949",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1677676435,
"narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1677995890,
"narHash": "sha256-eOnCn0o3I6LP48fAi8xWFcn49V2rL7oX5jCtJTeN1LI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a1240f6b4a0bcc84fc48008b396a140d9f3638f6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1670461440,
"narHash": "sha256-jy1LB8HOMKGJEGXgzFRLDU1CBGL0/LlkolgnqIsF0D8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "04a75b2eecc0acf6239acf9dd04485ff8d14f425",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.11-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1678898370,
"narHash": "sha256-xTICr1j+uat5hk9FyuPOFGxpWHdJRibwZC+ATi0RbtE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ac718d02867a84b42522a0ece52d841188208f2c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"parts": {
"inputs": {
"nixpkgs-lib": [
"helix",
"nci",
"nixpkgs"
]
},
"locked": {
"lastModified": 1675933616,
"narHash": "sha256-/rczJkJHtx16IFxMmAWu5nNYcSXNg1YYXTHoGjLrLUA=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "47478a4a003e745402acf63be7f9a092d51b83d7",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"root": {
"inputs": {
"agenix": "agenix",
"devshell": "devshell",
"eww": "eww",
"flake-parts": "flake-parts",
"fu": "fu",
"helix": "helix",
"hm": "hm",
"hyprland": "hyprland",
"hyprland-contrib": "hyprland-contrib",
"kmonad": "kmonad",
"nix-gaming": "nix-gaming",
"nix-super": "nix-super",
"nix-xilinx": "nix-xilinx",
"nixpkgs": "nixpkgs_5",
"rust-overlay": "rust-overlay_2",
"spicetify-nix": "spicetify-nix"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"helix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1677292251,
"narHash": "sha256-D+6q5Z2MQn3UFJtqsM5/AvVHi3NXKZTIMZt1JGq/spA=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "34cdbf6ad480ce13a6a526f57d8b9e609f3d65dc",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"flake-utils": [
"fu"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1679106165,
"narHash": "sha256-03Opt2yu4E/AIFjvlgib0/nhMn6B4B/t/nvwS2bzOGw=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "7313c06ac334d6262ddfe30a38b3abc3da6bd565",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"spicetify-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1675736383,
"narHash": "sha256-fjQmN3pYGstBNHCFdmPzDf1/Dt04v3b7+/w4cQ4gkKo=",
"owner": "the-argus",
"repo": "spicetify-nix",
"rev": "ec85c2a2f5d1035142b8e383cc77b68bb0b9ebc8",
"type": "github"
},
"original": {
"owner": "the-argus",
"repo": "spicetify-nix",
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1676283394,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"wlroots": {
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1677789111,
"narHash": "sha256-dWrk+Q3bLdtFe5rkyaAKWCQJCeE/KFNllcu1DvBC38c=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "5ae17de23f5fd9bb252a698f3771c840280e2c05",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"type": "gitlab"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1673116118,
"narHash": "sha256-eR0yDSkR2XYMesfdRWJs25kAdXET2mbNNHu5t+KUcKA=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "d479c846531fd0e1d2357c9588b8310a2b859ef2",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,111 +0,0 @@
{
description = "fufexan's NixOS and Home-Manager flake";
outputs = inputs:
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"];
imports = [
./home/profiles
./hosts
./modules
./pkgs
./lib
{config._module.args._inputs = inputs // {inherit (inputs) self;};}
];
perSystem = {
config,
inputs',
pkgs,
system,
...
}: {
imports = [
{
_module.args.pkgs = inputs.self.legacyPackages.${system};
}
];
devShells.default = inputs'.devshell.legacyPackages.mkShell {
packages = [
pkgs.alejandra
pkgs.git
config.packages.repl
];
name = "dots";
};
formatter = pkgs.alejandra;
};
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
};
eww = {
url = "github:elkowar/eww";
inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-overlay.follows = "rust-overlay";
};
fu.url = "github:numtide/flake-utils";
helix = {
url = "github:SoraTenshi/helix/daily-driver";
inputs.parts.follows = "flake-parts";
};
hm = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/Hyprland";
hyprland-contrib = {
url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "nixpkgs";
};
kmonad = {
url = "github:kmonad/kmonad?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-gaming.url = "github:fufexan/nix-gaming";
nix-super.url = "github:privatevoid-net/nix-super";
nix-xilinx = {
url = "gitlab:doronbehar/nix-xilinx";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "fu";
};
spicetify-nix = {
url = "github:the-argus/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}

View file

@ -1,15 +0,0 @@
# Home config
Home-Manager configurations for different hosts.
Name | Description
--------------- | -----------
`default.nix` | Home-Manager specific configuration
`editors` | Helix & Neovim
`programs` | Programs
`shell` | Zsh, Nix options, etc.
`terminals` | Terminal configs
`wayland` | Wayland-specific options, including Sway and Waybar configs
`profiles` is a special dir where `homeConfigurations` are set up. They're
basically the entrypoints of the configs.

View file

@ -1,18 +0,0 @@
{
home = {
username = "mihai";
homeDirectory = "/home/mihai";
stateVersion = "20.09";
extraOutputsToInstall = ["doc" "devdoc"];
};
# disable manuals as nmd fails to build often
manual = {
html.enable = false;
json.enable = false;
manpages.enable = false;
};
# let HM manage itself when in standalone mode
programs.home-manager.enable = true;
}

View file

@ -1,44 +0,0 @@
{
inputs,
pkgs,
...
} @ args: {
home.packages = [pkgs.shellcheck];
programs.helix = {
enable = true;
package = inputs.helix.packages.${pkgs.hostPlatform.system}.default;
languages = import ./languages.nix args;
settings = {
theme = "catppuccin_mocha";
editor = {
true-color = true;
color-modes = true;
cursorline = true;
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
indent-guides = {
render = true;
rainbow-option = "dim";
};
rainbow-brackets = true;
statusline.center = ["position-percentage"];
whitespace.characters = {
newline = "";
tab = "";
};
};
keys.normal.space.u = {
f = ":format"; # format using LSP formatter
w = ":set whitespace.render all";
W = ":set whitespace.render none";
};
};
};
}

View file

@ -1,47 +0,0 @@
{pkgs, ...}:
with pkgs; [
{
name = "bash";
language-server = {
command = "${nodePackages.bash-language-server}/bin/bash-language-server";
args = ["start"];
};
auto-format = true;
formatter = {
command = "${shfmt}/bin/shfmt";
args = ["-i" "2" "-"];
};
}
{
name = "cpp";
language-server = {
command = "${clang-tools}/bin/clangd";
clangd.fallbackFlags = ["-std=c++2b"];
};
}
{
name = "nix";
language-server = {command = lib.getExe nil;};
config.nil.formatting.command = ["alejandra" "-q"];
}
{
name = "clojure";
scope = "source.clojure";
injection-regex = "(clojure|clj|edn|boot|yuck)";
file-types = ["clj" "cljs" "cljc" "clje" "cljr" "cljx" "edn" "boot" "yuck"];
roots = ["project.clj" "build.boot" "deps.edn" "shadow-cljs.edn"];
comment-token = ";";
language-server = {command = "clojure-lsp";};
indent = {
tab-width = 2;
unit = " ";
};
}
{
name = "css";
language-server = {
command = "${nodePackages.vscode-css-languageserver-bin}/bin/css-languageserver";
args = ["--stdio"];
};
}
]

View file

@ -1,14 +0,0 @@
vim.opt.expandtab = true
vim.opt.hidden = true
vim.opt.incsearch = true
vim.opt.mouse = "a"
vim.opt.number = true
vim.opt.shiftwidth = 2
vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.signcolumn = "yes:3"
vim.opt.tabstop = 2
vim.opt.timeoutlen = 0
vim.wo.wrap = false
vim.opt.exrc = true
vim.cmd("syntax on")

View file

@ -1,28 +0,0 @@
local lspc = require'lspconfig'
lspc.nil_ls.setup{}
lspc.clangd.setup{}
local buf_map = function(bufnr, mode, lhs, rhs, opts)
vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts or {
silent = true,
})
end
lspc.tsserver.setup({
on_attach = function(client, bufnr)
client.resolved_capabilities.document_formatting = false
client.resolved_capabilities.document_range_formatting = false
local ts_utils = require("nvim-lsp-ts-utils")
ts_utils.setup({})
ts_utils.setup_client(client)
buf_map(bufnr, "n", "gs", ":TSLspOrganize<CR>")
buf_map(bufnr, "n", "gi", ":TSLspRenameFile<CR>")
buf_map(bufnr, "n", "go", ":TSLspImportAll<CR>")
on_attach(client, bufnr)
end,
})

View file

@ -1,73 +0,0 @@
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local feedkey = function(key, mode)
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
end
local cmp = require("cmp")
local lspkind = require("lspkind")
cmp.setup({
sources = {
{ name = "nvim_lsp" },
{ name = "cmp_tabnine" },
{ name = "treesitter" },
{ name = "buffer" },
{ name = "path" },
{ name = "vsnip" },
-- { name = "copilot" },
},
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
formatting = {
format = lspkind.cmp_format({
with_text = true,
menu = {
buffer = "[Buf]",
nvim_lsp = "[LSP]",
nvim_lua = "[Lua]",
latex_symbols = "[Latex]",
treesitter = "[TS]",
cmp_tabnine = "[TN]",
vsnip = "[Snip]",
},
}),
},
mapping = {
["<CR>"] = cmp.mapping.confirm({ select = true }),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif vim.fn["vsnip#available"](1) == 1 then
feedkey("<Plug>(vsnip-expand-or-jump)", "")
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, {
"i",
"s",
}),
["<S-Tab>"] = cmp.mapping(function()
if cmp.visible() then
cmp.select_prev_item()
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
feedkey("<Plug>(vsnip-jump-prev)", "")
end
end, {
"i",
"s",
}),
},
})

View file

@ -1,20 +0,0 @@
-- set colorscheme
vim.cmd 'set termguicolors'
vim.g.catppuccin_flavour = "mocha"
require("catppuccin").setup()
vim.cmd [[colorscheme catppuccin]]
-- enable colorizer
require'colorizer'.setup()
-- set sign
vim.cmd 'sign define DiagnosticSignError text= linehl= texthl=DiagnosticSignError numhl='
vim.cmd 'sign define DiagnosticSignHint text= linehl= texthl=DiagnosticSignHint numhl='
vim.cmd 'sign define DiagnosticSignInfo text= linehl= texthl=DiagnosticSignInfo numhl='
vim.cmd 'sign define DiagnosticSignWarn text= linehl= texthl=DiagnosticSignWarn numhl='
-- set lightline theme to horizon
vim.g.lightline = { colorscheme = "catppuccin" }

View file

@ -1,14 +0,0 @@
require'nvim-treesitter.configs'.setup {
textobjects = {
select = {
enable = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
},
},
}

View file

@ -1,30 +0,0 @@
require("nvim-treesitter.configs").setup({
highlight = {
enable = true,
disable = {},
},
rainbow = {
enable = true,
extended_mode = true,
},
autotag = {
enable = true,
},
context_commentstring = {
enable = true,
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn",
node_incremental = "grn",
scope_incremental = "grc",
node_decremental = "grm",
},
},
})
-- breaks highlight
-- vim.cmd([[set foldmethod=expr]])
-- vim.cmd([[set foldlevel=10]])
-- vim.cmd([[set foldexpr=nvim_treesitter#foldexpr()]])

View file

@ -1,29 +0,0 @@
-- telescope
require('telescope').load_extension('fzy_native')
-- null-ls
local nb = require('null-ls').builtins
require('null-ls').setup({
sources = {
nb.formatting.alejandra,
nb.code_actions.statix,
nb.diagnostics.cppcheck,
nb.diagnostics.deadnix,
nb.diagnostics.statix,
nb.diagnostics.eslint,
nb.completion.spell,
},
})
require("gitsigns").setup()
-- autopairs
require('nvim-autopairs').setup{}
-- copy to system clipboard
vim.api.nvim_set_keymap( 'v', '<Leader>y', '"+y', {noremap = true})
vim.api.nvim_set_keymap( 'n', '<Leader>y', ':%+y<CR>', {noremap = true})
-- paste from system clipboard
vim.api.nvim_set_keymap( 'n', '<Leader>p', '"+p', {noremap = true})

View file

@ -1,39 +0,0 @@
vim.g.mapleader = " "
local wk = require("which-key")
wk.setup({})
wk.register({
["<leader>"] = {
b = { "<cmd>Telescope buffers<cr>", "Buffers" },
["/"] = { "<cmd>Telescope live_grep<cr>", "Live Grep" },
f = { "<cmd>Telescope find_files<cr>", "Find File" },
g = {
name = "Git / VCS",
i = { "<cmd>lua require('telescope').extensions.gh.issues()<cr>", "Github Issues" },
p = { "<cmd>lua require('telescope').extensions.gh.pull_request()<cr>", "Github PRs" },
b = { "<cmd>ToggleBlameLine<cr>", "Toggle BlameLine" },
c = { "<cmd>Neogit commit<cr>", "Commit" },
s = { "<cmd>Neogit kind=split<cr>", "Staging" },
},
a = { "<cmd>lua require('telescope.builtin').lsp_code_actions()<cr>", "Code Actions" },
d = { "<cmd>lua require('telescope.builtin').lsp_document_diagnostics()<cr>", "LSP Diagnostics" },
k = { "<cmd>lua vim.lsp.buf.signature_help()<cr>", "Signature Help" },
l = {
name = "LSP",
f = { "<cmd>lua vim.lsp.buf.formatting_sync()<cr>", "Format file"},
q = { "<cmd>lua vim.lsp.diagnostic.set_loclist()<cr>", "Set Loclist" },
e = { "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<cr>", "Show Line Diagnostics" },
},
p = { "\"+p", "Paste from clipboard" },
P = { "\"+P", "Paste from clipboard before cursor" },
y = { "\"+y", "Yank to clipboard" },
},
g = {
l = { "$", "Line end" },
h = { "0", "Line start" },
s = { "^", "First non-blank in line" },
e = { "G", "Bottom" },
},
})

View file

@ -1,62 +0,0 @@
{pkgs, ...}: {
programs.neovim = {
enable = true;
vimAlias = true;
viAlias = true;
vimdiffAlias = true;
plugins = with pkgs.vimPlugins; [
catppuccin-nvim
cmp-buffer
cmp-nvim-lsp
cmp-path
cmp-spell
cmp-treesitter
cmp-vsnip
friendly-snippets
gitsigns-nvim
lightline-vim
lspkind-nvim
neogit
null-ls-nvim
nvim-autopairs
nvim-cmp
nvim-colorizer-lua
nvim-lspconfig
nvim-tree-lua
nvim-ts-rainbow
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars))
plenary-nvim
telescope-fzy-native-nvim
telescope-nvim
vim-floaterm
vim-sneak
vim-vsnip
which-key-nvim
];
extraPackages = with pkgs; [gcc ripgrep fd];
extraConfig = let
luaRequire = module:
builtins.readFile (builtins.toString
./config
+ "/${module}.lua");
luaConfig = builtins.concatStringsSep "\n" (map luaRequire [
"init"
"lspconfig"
"nvim-cmp"
"theming"
"treesitter"
"treesitter-textobjects"
"utils"
"which-key"
]);
in ''
lua << 
${luaConfig}

'';
};
}

View file

@ -1,44 +0,0 @@
{
inputs,
withSystem,
module_args,
...
}: let
sharedModules = [
../.
../shell
module_args
];
homeImports = {
"mihai@io" =
[
./io
inputs.spicetify-nix.homeManagerModule
inputs.hyprland.homeManagerModules.default
]
++ sharedModules;
server = sharedModules ++ [./server];
};
inherit (inputs.hm.lib) homeManagerConfiguration;
in {
imports = [
{_module.args = {inherit homeImports;};}
];
flake = {
homeConfigurations = withSystem "x86_64-linux" ({pkgs, ...}: {
"mihai@io" = homeManagerConfiguration {
modules = homeImports."mihai@io" ++ module_args;
inherit pkgs;
};
server = homeManagerConfiguration {
modules = homeImports.server ++ module_args;
inherit pkgs;
};
});
homeManagerModules.eww-hyprland = import ./programs/eww;
};
}

View file

@ -1,73 +0,0 @@
{
imports = [
../../editors/helix
../../editors/neovim
../../programs
../../programs/games.nix
../../programs/dunst.nix
../../wayland
../../terminals/alacritty.nix
../../terminals/wezterm.nix
];
services = {
kanshi = {
# use 1.6 scaling: 2560 : 1.6 = 1600, exact division. good for offsets
# restart eww every time because it won't expand/contract automatically
enable = true;
profiles = {
undocked = {
outputs = [
{
criteria = "eDP-1";
position = "0,0";
}
];
};
docked-all = {
outputs = [
{
criteria = "eDP-1";
position = "1366,0";
}
{
criteria = "DP-1";
position = "0,0";
}
{
criteria = "DP-2";
position = "1600,0";
}
];
};
docked1 = {
outputs = [
{
criteria = "eDP-1";
position = "1366,0";
}
{
criteria = "DP-1";
position = "0,0";
}
];
};
docked2 = {
outputs = [
{
criteria = "eDP-1";
position = "1366,0";
}
{
criteria = "DP-2";
position = "0,0";
}
];
};
};
systemdTarget = "graphical-session.target";
};
};
}

View file

@ -1,3 +0,0 @@
{
programs.helix.enable = true;
}

View file

@ -1,13 +0,0 @@
{pkgs, ...}: {
# use Cinny Matrix client
# create systemd service that serves it on localhost:9999
systemd.user.services.cinny = {
Unit.Description = "Cinny Service";
Service = {
Type = "simple";
ExecStart = "${pkgs.darkhttpd}/bin/darkhttpd ${pkgs.cinny} --addr 127.0.0.1 --port 9999";
TimeoutStopSec = 5;
};
Install.WantedBy = ["default.target"];
};
}

View file

@ -1,57 +0,0 @@
{
pkgs,
config,
...
}: {
imports = [
../shell/nix.nix
./cinny.nix
./files
./media.nix
./git.nix
./gtk.nix
./packages.nix
./qt.nix
./spicetify.nix
./xdg.nix
./zathura.nix
];
programs = {
chromium = {
enable = true;
commandLineArgs = ["--enable-features=TouchpadOverscrollHistoryNavigation"];
extensions = [
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";}
{id = "bkkmolkhemgaeaeggcmfbghljjjoofoh";}
];
};
firefox = {
enable = true;
profiles.mihai = {};
};
gpg = {
enable = true;
homedir = "${config.xdg.dataHome}/gnupg";
};
password-store = {
enable = true;
package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
settings.PASSWORD_STORE_DIR = "${config.xdg.dataHome}/password-store";
};
};
services = {
gpg-agent = {
enable = true;
enableSshSupport = true;
pinentryFlavor = "gnome3";
sshKeys = ["73D1C4271E8C508E1E55259660C94BE828B07738"];
};
syncthing.enable = true;
};
}

View file

@ -1,58 +0,0 @@
{
pkgs,
default,
...
}: {
# notification daemon
services.dunst = {
enable = true;
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
settings = {
global = {
alignment = "center";
corner_radius = 16;
follow = "mouse";
font = "Roboto 10";
format = "<b>%s</b>\\n%b";
frame_width = 1;
offset = "5x5";
horizontal_padding = 8;
icon_position = "left";
indicate_hidden = "yes";
markup = "yes";
max_icon_size = 64;
mouse_left_click = "do_action";
mouse_middle_click = "close_all";
mouse_right_click = "close_current";
padding = 8;
plain_text = "no";
separator_color = "auto";
separator_height = 1;
show_indicators = false;
shrink = "no";
word_wrap = "yes";
};
fullscreen_delay_everything = {fullscreen = "delay";};
urgency_critical = {
background = default.xcolors.bg;
foreground = default.xcolors.fg;
frame_color = default.xcolors.red;
};
urgency_low = {
background = default.xcolors.bg;
foreground = default.xcolors.fg;
frame_color = default.xcolors.blue;
};
urgency_normal = {
background = default.xcolors.bg;
foreground = default.xcolors.fg;
frame_color = default.xcolors.green;
};
};
};
}

View file

@ -1,68 +0,0 @@
# Eww configuration
This configuration aims to provide a fully working shell replacement for
compositors/window managers. Features constantly get added and existing ones
get improved.
## 🗃️ Components
The same daemon runs multiple windows which interact with each other:
### bar
![bar](https://user-images.githubusercontent.com/36706276/216402839-0f8ec9b0-dc4b-4cb8-9834-db59b61db97f.png)
### music window
![music](https://user-images.githubusercontent.com/36706276/192146077-f8da4691-9a0c-487f-9805-3fd4d55551e9.gif)
### calendar
![calendar](https://user-images.githubusercontent.com/36706276/204923748-f5c7db3a-5000-40cf-ba41-cd2d5f14146a.png)
### system info
![system](https://user-images.githubusercontent.com/36706276/216403137-a3231c60-976a-4e5d-85c0-899679ab0a92.png)
## ❔ Usage
### Home Manager
If you use Home Manager, installing is as simple as adding my flake to your
inputs, passing `inputs` to `extraSpecialArgs` and importing the relevant
module:
```nix
{inputs, ...}: {
imports = [inputs.fufexan.homeManagerModules.eww-hyprland];
programs.eww-hyprland = {
enable = true;
# default package
package = pkgs.eww-wayland;
# if you want to change colors
colors = builtins.readFile ./macchiato.scss;
# set to true to reload on change
autoReload = false;
};
}
```
Make sure to also add the fonts listed below.
### Other distros
To quickly install this config, grab all the files in this directory and put
them in `~/.config/eww`. Then run `eww daemon` and `eww open bar`. Enjoy!
Dependencies:
- Icon fonts: `material-symbols-outline` (any variation can be used as long as you change the `font-family` property of `.icon`)
- Text font: [Jost](https://fonts.google.com/specimen/Jost)
- Script deps: everything in `default.nix`'s `dependencies` list.
## 🎨 Theme
The theme colors can be changed in `css/_colors.scss`. Currently the theme used
is [Catppuccin Mocha](https://github.com/catppuccin/catppuccin).

View file

@ -1,31 +0,0 @@
.calendar-win {
@include window;
background-color: $bg;
color: $fg;
padding: .2em;
}
calendar {
padding: 5px;
:selected {
color: $magenta;
}
.header {
color: $black;
}
.highlight {
color: $red;
font-weight: bold;
}
.button {
color: $blue;
}
:indeterminate {
color: $green;
}
}

View file

@ -1,35 +0,0 @@
$rosewater: #f5e0dc;
$flamingo: #f2cdcd;
$pink: #f5c2e7;
$mauve: #cba6f7;
$red: #f38ba8;
$maroon: #eba0ac;
$peach: #fab387;
$yellow: #f9e2af;
$green: #a6e3a1;
$teal: #94e2d5;
$sky: #89dceb;
$sapphire: #74c7ec;
$blue: #89b4fa;
$lavender: #b4befe;
$text: #cdd6f4;
$subtext1: #bac2de;
$subtext0: #a6adc8;
$overlay2: #9399b2;
$overlay1: #7f849c;
$overlay0: #6c7086;
$surface2: #585b70;
$surface1: #45475a;
$surface0: #313244;
$base: #1e1e2e;
$mantle: #181825;
$crust: #11111b;
$fg: $text;
$bg: rgba(30, 30, 46, 0.6);
$bg1: rgba(49, 50, 68, 0.6);
$border: #28283d;
$shadow: $crust;

View file

@ -1,66 +0,0 @@
.song-cover-art {
@include rounding;
background-position: center;
background-size: cover;
margin: 4px 5px 4px 0;
min-height: 24px;
min-width: 24px;
}
.music-window {
@include window;
background-color: $bg;
border: 1px solid $border;
color: $fg;
}
.music-cover-art {
background-position: center;
background-size: cover;
border-radius: 8px;
margin: 1em;
min-height: 170px;
min-width: 170px;
}
.music-box {
margin: 1rem 1rem 1rem 0;
}
.music-title {
font-size: 1.1rem;
font-weight: bold;
}
.music-artist {
color: $white_a;
}
.music-button label {
color: $white_a;
font-size: 2rem;
}
.music-time {
color: $white_a;
margin: 0 1rem;
}
.music-bar scale {
highlight {
background-image: linear-gradient(to right, $cyan, $blue_a);
border-radius: 24px;
}
trough {
background-color: $bg1;
border-radius: 24px;
margin-top: 0;
min-height: 10px;
min-width: 170px;
}
}
.playctl {
color: $yellow;
}

View file

@ -1,36 +0,0 @@
.osd-part {
@include window;
background: $bg;
margin: 0 .5rem .5rem;
label {
color: $text;
font-size: 2rem;
margin: 0 .1rem 0 .2rem;
}
scale {
margin: -.2rem 0;
}
trough {
@include rounding;
background-color: $bg1;
margin: 1rem 0 .5rem;
min-height: 10rem;
min-width: .7rem;
highlight {
@include rounding;
min-width: 0;
}
}
}
.osd-volume highlight {
background-image: linear-gradient(to top, $cyan, $blue_a);
}
.osd-brightness highlight {
background-image: linear-gradient(to top, $yellow, $yellow_a);
}

View file

@ -1,127 +0,0 @@
.system-menu-box {
@include window;
background-color: $bg;
color: $text;
}
.separator {
font-size: 1rem;
}
.top-row {
margin: 1rem 1.5rem 0;
.time { font-size: 2rem; }
.date-box {
margin: 0 1rem;
label { font-size: 1.1rem; }
.date {
background: unset;
margin: 0 .5rem 0 0;
padding: 0;
}
}
}
.system-row {
margin: .5rem .7rem;
.airplane-box button {
padding: 1rem 3rem;
}
label {
font-size: 1rem;
margin: 0 .1rem;
}
}
.element {
@include rounding;
background-color: $black;
margin: .3rem;
button {
@include rounding;
padding: 1rem;
label {
font-size: 1.5rem;
}
&:hover {
background-color: $cyan_a;
}
}
}
.sliders {
@include rounding;
background-color: $black;
margin: .5rem 1rem;
padding: .6rem 1rem;
scale {
margin-right: -1rem;
min-width: 21.5rem;
trough { margin-right: 0; }
}
box { margin: .2rem 0; }
label { font-size: 1.2rem; }
}
.volume-slider-box,
.brightness-slider-box {
trough { background-color: $base; }
}
.volume-bar highlight {
@include rounding;
background-image: linear-gradient(to right, $cyan, $blue_a);
}
.brightness-slider-box scale highlight {
@include rounding;
background-image: linear-gradient(to right, $yellow, $yellow_a);
}
.bottom-row {
margin: .5rem 1rem;
.battery-icon { font-size: 2rem; }
.battery-wattage { color: $magenta; }
.battery-status {
color: $green;
margin: 0 .5rem;
}
button {
background-color: $black;
border-radius: 50%;
margin-bottom: .1rem;
padding: 0 .5rem;
label { font-size: 1.5rem; }
&:hover { background-color: $black_a; }
}
}
.bt-connected {
background-color: $blue;
color: $red;
button:hover { background-color: rgba(0, 0, 0, .1); }
}
.wifi-connected {
background-color: $magenta;
color: $red;
button:hover { background-color: rgba(0, 0, 0, .1); }
}

View file

@ -1,80 +0,0 @@
* {
transition: 1s;
}
.membar {
color: $yellow;
}
.cpubar {
color: $blue;
}
.batbar {
color: $green;
}
.membar,
.cpubar,
.batbar {
background-color: $bg1;
}
.iconmem {
color: $yellow;
}
.iconcpu {
color: $blue;
}
.icon-text {
font-size: 3rem;
padding: .7rem;
}
.sys-text-sub {
color: $text;
}
.sys-text-mem,
.sys-text-cpu {
font-size: 1rem;
font-weight: bold;
}
.sys-icon-mem,
.sys-icon-cpu {
font-size: 1.5rem;
margin: 1.5rem;
}
.system-info-box {
@include rounding;
background-color: $black;
margin: .5rem 1rem;
padding: .5rem;
}
.sys-mem,
.sys-cpu {
background-color: $bg;
}
.sys-icon-mem,
.sys-text-mem,
.sys-mem {
color: $yellow;
}
.sys-icon-cpu,
.sys-text-cpu,
.sys-cpu {
color: $blue;
}
.sys-box {
margin: .3em;
box { margin-left: 1rem; }
}

View file

@ -1,5 +0,0 @@
.vol-icon { color: $green; }
.volbar highlight {
background-image: linear-gradient(to right, $cyan, $blue_a);
border-radius: 10px;
}

View file

@ -1,128 +0,0 @@
{
config,
pkgs,
lib,
...
}: let
dependencies = with pkgs; [
config.wayland.windowManager.hyprland.package
cfg.package
bash
bc
blueberry
bluez
coreutils
dbus
dunst
findutils
gawk
gnome.gnome-control-center
gnused
gojq
imagemagick
jaq
light
networkmanager
pavucontrol
playerctl
procps
pulseaudio
ripgrep
socat
udev
upower
util-linux
wget
wireplumber
wlogout
socat
fuzzel
swaynotificationcenter
];
reload_script = pkgs.writeShellScript "reload_eww" ''
windows=$(eww windows | rg '\*' | tr -d '*')
systemctl --user restart eww.service
echo $windows | while read -r w; do
eww open $w
done
'';
cfg = config.programs.eww-hyprland;
in {
options.programs.eww-hyprland = {
enable = lib.mkEnableOption "eww Hyprland config";
package = lib.mkOption {
type = with lib.types; nullOr package;
default = pkgs.eww-wayland;
defaultText = lib.literalExpression "pkgs.eww-wayland";
description = "Eww package to use.";
};
autoReload = lib.mkOption {
type = lib.types.bool;
default = false;
defaultText = lib.literalExpression "false";
description = "Whether to restart the eww daemon and windows on change.";
};
colors = lib.mkOption {
type = with lib.types; nullOr lines;
default = null;
defaultText = lib.literalExpression "null";
description = ''
SCSS file with colors defined in the same way as Catppuccin colors are,
to be used by eww.
Defaults to Catppuccin Mocha.
'';
};
};
config = lib.mkIf cfg.enable {
home.packages = [cfg.package];
# remove nix files
xdg.configFile."eww" = {
source = lib.cleanSourceWith {
filter = name: _type: let
baseName = baseNameOf (toString name);
in
!(lib.hasSuffix ".nix" baseName) && !(baseName == "_colors.scss");
src = lib.cleanSource ./.;
};
# links each file individually, which lets us insert the colors file separately
recursive = true;
onChange =
if cfg.autoReload
then reload_script.outPath
else "";
};
# colors file
xdg.configFile."eww/css/_colors.scss".text =
if cfg.colors != null
then cfg.colors
else (builtins.readFile ./css/_colors.scss);
systemd.user.services.eww = {
Unit = {
Description = "Eww Daemon";
# not yet implemented
# PartOf = ["tray.target"];
PartOf = ["graphical-session.target"];
};
Service = {
Environment = "PATH=/run/wrappers/bin:${lib.makeBinPath dependencies}";
ExecStart = "${cfg.package}/bin/eww daemon --no-daemonize";
Restart = "on-failure";
};
Install.WantedBy = ["graphical-session.target"];
};
};
}

View file

@ -1,93 +0,0 @@
@import 'css/colors';
@mixin rounding {
border-radius: 16px;
}
@mixin window {
border: 1px solid $border;
box-shadow: 0 2px 3px $shadow;
margin: 5px 5px 0px;
@include rounding;
}
* {
all: unset;
font-family: "Montreux Classic", "Jost *", Roboto, sans-serif;
transition: 200ms ease;
}
@import 'css/calendar';
@import 'css/music';
@import 'css/osd';
@import 'css/sidebar';
@import 'css/system';
@import 'css/volume';
.bar {
color: $fg;
label {
font-size: 1.4rem;
}
}
.vis {
background-color: $bg;
border-radius: 24px;
padding: 4px 24px;
margin-top: 12px;
margin-bottom: 0px;
border: 3px solid $outline;
}
.invis {
background-color: rgba(0, 0, 0, 0);
}
tooltip {
background: $bg;
border: 1px solid $border;
border-radius: 8px;
label {
font-size: 1rem;
}
}
.icon,
.icon label { font-family: Material Symbols Outlined; }
.module { margin: 0 5px; }
.hour {
padding-left: 5px;
}
.minute {
padding-right: .7rem;
}
.date {
background: $bg;
color: $yellow;
label {
font-size: 1.2rem;
}
}
.bright-icon { color: $yellow_a; }
.module-bt { font-size: 1.2rem; }
scale trough {
background-color: $bg;
border-radius: 24px;
margin: 0 1rem;
min-height: 10px;
min-width: 70px;
}
.workspaces {
margin-left: 10px;
button { transition: color 2s ease; }
}

View file

@ -1,56 +0,0 @@
(include "./modules/clock.yuck")
(include "./modules/music.yuck")
(include "./modules/net.yuck")
(include "./modules/sys.yuck")
(include "./modules/variables.yuck")
(include "./modules/volume.yuck")
(include "./modules/workspaces.yuck")
(include "./modules/current_win.yuck")
(include "./windows/calendar.yuck")
(include "./windows/music.yuck")
(include "./windows/osd.yuck")
(include "./windows/system-menu.yuck")
(defwidget left []
(box
:space-evenly false
:halign "start"
:class "vis"
(workspaces)))
(defwidget right []
(box
:space-evenly false
:halign "end"
:class "vis bar"
(music-module)
(volume-module)
(net)
(sys)
(clock_module)))
(defwidget center []
(box
:space-evenly false
:halign "center"
:class "vis bar"
(current-win-module)))
(defwidget bar-box []
(centerbox
:class "invis bar"
(left)
(center)
(right)))
(defwindow bar
:monitor 0
:geometry (geometry :x "0%"
:y "0%"
:width "98%"
:height "24px"
:anchor "top center")
:stacking "fg"
:exclusive true
(bar-box))

View file

@ -1,8 +0,0 @@
(defwidget bluetooth []
(button
:class "module-bt module icon"
:onclick "blueberry"
:onrightclick "scripts/bluetooth toggle"
:tooltip "${bluetooth.text} ${bluetooth.battery}"
:style "color: ${bluetooth.color};"
{bluetooth.icon}))

View file

@ -1,9 +0,0 @@
(defwidget bright []
(box
:class "module"
(eventbox
:onscroll "echo {} | sed -e 's/up/-U 1/g' -e 's/down/-A 1/g' | xargs light"
(label
:text {brightness.icon}
:class "bright-icon icon"
:tooltip "brightness ${round(brightness.percent, 0)}%"))))

View file

@ -1,24 +0,0 @@
(defvar date_rev false)
(defwidget clock_module []
(eventbox
:onhover "${EWW_CMD} update date_rev=true"
:onhoverlost "${EWW_CMD} update date_rev=false"
(overlay
:class "module"
(box
:space-evenly false
(label
:text {time.hour}
:class "hour")
(label
:text ":")
(label
:text {time.minute}
:class "minute"))
(revealer
:reveal date_rev
(button
:class "date"
:onclick "${EWW_CMD} open --toggle calendar"
{time.date})))))

View file

@ -1,8 +0,0 @@
(defwidget current-win-module []
(box
(button
:class "module"
{current_win.title}
)
)
)

View file

@ -1,28 +0,0 @@
(defwidget music-module []
(eventbox
:onhover "${EWW_CMD} update music_reveal=true"
:onhoverlost "${EWW_CMD} update music_reveal=false"
(box
:class "module"
:space-evenly false
(box
:class "song-cover-art"
:style "background-image: url(\"${music.cover}\");")
(button
:class "module"
:onclick "${EWW_CMD} open --toggle music"
{music.status == "Stopped" || music.status == "" ? "" :
"${music.artist} - ${music.title}"})
(box
:class "icon"
{music.static == "Stopped" || music.status == "" ? "" : music.status == "Playing" ? "" : "" })
(revealer
:class "playctl"
:transition "slideright"
:reveal music_reveal
:duration "350ms"
(box
:class "icon"
(button :class "song-button" :onclick "playerctl previous" "")
(button :class "song-button" :onclick "playerctl play-pause" {music.status == "Playing" ? "" : ""})
(button :class "song-button" :onclick "playerctl next" ""))))))

View file

@ -1,7 +0,0 @@
(defwidget net []
(button
:class "module icon"
:onclick "gnome-control-center &"
:tooltip {net.essid}
:style "color: ${net.color};"
{net.icon}))

View file

@ -1,32 +0,0 @@
(defwidget sys []
(box
:class "module"
:space-evenly false
:spacing 5
(circular-progress
:value "${EWW_CPU.avg}"
:class "cpubar"
:thickness 3
(button
:tooltip "using ${round(EWW_CPU.avg,0)}% cpu"
:onclick "${EWW_CMD} open --toggle system-menu"
(label :class "icon-text" :text "")))
(circular-progress
:value {memory.percent}
:class "membar"
:thickness 3
(button
:tooltip "using ${round(memory.percent,0)}% ram"
:onclick "${EWW_CMD} open --toggle system-menu"
(label :class "icon-text" :text "")))
(circular-progress
:value "${EWW_BATTERY["BAT0"].capacity}"
:class "batbar"
:style "color: ${battery.color};"
:thickness 3
(button
:tooltip "battery on ${EWW_BATTERY["BAT0"].capacity}%"
:onclick "${EWW_CMD} open --toggle system-menu"
(label :class "icon-text" :text "")))))

View file

@ -1,21 +0,0 @@
(defvar bright_reveal false)
(defvar bt_rev false)
(defvar music_reveal false)
(defvar net_rev false)
(defvar time_rev false)
(defvar vol_reveal false)
(defvar osd-brightness false)
(defvar osd-volume false)
(defpoll time :interval "5s" `date +'{"date": "%d/%m", "hour": "%H", "minute": "%M", "day": "%A"}'`)
(deflisten airplane "scripts/airplane")
(deflisten battery "scripts/battery")
(deflisten bluetooth "scripts/bluetooth")
(deflisten brightness "scripts/brightness")
(deflisten memory "scripts/memory")
(deflisten music "scripts/music")
(deflisten net "scripts/net")
(deflisten volume "scripts/volume")
(deflisten workspace "scripts/workspaces")
(deflisten current_win "scripts/current_win")

View file

@ -1,11 +0,0 @@
(defwidget volume-module []
(box
:class "module icon"
(eventbox
:onscroll "echo {} | sed -e 's/up/-/g' -e 's/down/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.005%"
:onclick "pavucontrol &"
:onrightclick "scripts/volume mute SINK"
(label
:class "vol-icon"
:tooltip "volume ${volume.percent}%"
:text {volume.icon}))))

View file

@ -1,13 +0,0 @@
(defwidget workspaces []
(eventbox
:onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace"
(box
:class "module workspaces"
:spacing 5
(for ws in workspace
(button
:onclick "hyprctl dispatch workspace ${ws.number}"
:class "ws icon"
:style "color: ${ws.color};"
; :tooltip {ws.tooltip}
"●")))))

View file

@ -1,29 +0,0 @@
#!/bin/sh
icon() {
if [ "$STATUS" = "no" ]; then
echo ""
else
echo ""
fi
}
toggle() {
if [ "$STATUS" = "no" ]; then
rfkill block all
notify-send --urgency=normal -i airplane-mode-symbolic "Airplane Mode" "Airplane mode has been turned on!"
else
rfkill unblock all
notify-send --urgency=normal -i airplane-mode-disabled-symbolic "Airplane Mode" "Airplane mode has been turned off!"
fi
}
if [ "$1" = "toggle" ]; then
toggle
else
while true; do
STATUS="$(rfkill list | sed -n 2p | awk '{print $3}')"
icon
sleep 3;
done
fi

View file

@ -1,65 +0,0 @@
#!/usr/bin/env bash
icons=("" "" "" "" "" "" "" "")
num_icons=$(bc <<< "100 / ${#icons[@]}")
geticon() {
level=$(awk -v n="$CAPACITY" -v c="$num_icons" 'BEGIN{print int(n/c-1)}')
if [[ "$level" -lt 0 ]]; then
level=0
fi
echo "${icons[$level]}"
}
status() {
if [ "$STATE" = "Charging" ]; then
echo -n "charging"
if [ "$RATE" -gt 0 ]; then
echo ", $(gettime) left"
else
echo ""
fi
elif [ "$STATE" = "Discharging" ]; then
echo "$(gettime)h left"
else
echo "fully charged"
fi
}
color() {
if [ "$CAPACITY" -le 20 ]; then
echo '#f38ba8'
else
echo '#a6e3a1'
fi
}
wattage() {
microwatts=1000000
echo "$(bc -l <<< "scale=1; $RATE / $microwatts") W"
}
gettime() {
FULL=$(cat /sys/class/power_supply/BAT0/energy_full)
NOW=$(cat /sys/class/power_supply/BAT0/energy_now)
if [ "$RATE" -gt 0 ]; then
if [ "$STATE" = "Discharging" ]; then
EX="$NOW / $RATE"
else
EX="($FULL - $NOW) / $RATE"
fi
date -u -d@"$(bc -l <<< "$EX * 3600")" +%H:%M
fi
}
while true; do
RATE=$(cat /sys/class/power_supply/BAT0/power_now)
CAPACITY=$(cat /sys/class/power_supply/BAT0/capacity)
STATE=$(cat /sys/class/power_supply/BAT0/status)
echo '{ "icon": "'"$(geticon)"'", "percent": '"$CAPACITY"', "wattage": "'"$(wattage)"'", "status": "'"$(status)"'", "color": "'"$(color)"'" }'
sleep 3
done

View file

@ -1,51 +0,0 @@
#!/usr/bin/env bash
toggle() {
status=$(rfkill -J | jaq -r '.rfkilldevices[] | select(.type == "bluetooth") | .soft' | head -1)
if [ "$status" = "unblocked" ]; then
rfkill block bluetooth
else
rfkill unblock bluetooth
fi
}
if [ "$1" = "toggle" ]; then
toggle
else
while true; do
powered=$(bluetoothctl show | rg Powered | cut -f 2- -d ' ')
status=$(bluetoothctl info)
name=$(echo "$status" | rg Name | cut -f 2- -d ' ')
mac=$(echo "$status" | head -1 | awk '{print $2}' | tr ':' '_')
if [[ "$(echo "$status" | rg Percentage)" != "" ]]; then
battery="$(upower -i /org/freedesktop/UPower/devices/headset_dev_"$mac" | rg percentage | awk '{print $2}' | cut -f 1 -d '%')%"
else
battery=""
fi
if [ "$powered" = "yes" ]; then
if [ "$status" != "Missing device address argument" ]; then
text="$name"
icon=""
color="#89b4fa"
class="bt-connected"
else
icon=""
text="Disconnected"
color="#45475a"
class=""
fi
else
icon=""
text="Bluetooth off"
color="#45475a"
class=""
fi
echo '{ "icon": "'"$icon"'", "battery": "'"$battery"'", "text": "'"$text"'", "color": "'"$color"'", "class": "'"$class"'" }'
sleep 3
done
fi

View file

@ -1,61 +0,0 @@
#!/usr/bin/env bash
icons=("" "" "")
if [ ! "$XDG_CACHE_HOME" ]; then
XDG_CACHE_HOME="/home/mihai/.local/cache"
fi
date="$XDG_CACHE_HOME/eww/osd_brightness.date"
osd() {
if [ ! -f "$date" ]; then
mkdir -p "$XDG_CACHE_HOME/eww"
fi
date +%s > "$date"
}
osd_handler() {
lock=0
rundate=0
if [ ! -f "$date" ]; then
mkdir -p "$XDG_CACHE_HOME/eww"
echo 0 > "$date"
fi
while true; do
# get dates
rundate=$(cat "$date")
currentdate=$(date +%s)
# handle showing
if [ "$rundate" = "$currentdate" ] && [ "$lock" -eq 0 ]; then
eww open osd
eww update osd-brightness=true
lock=1
elif [ "$((currentdate - rundate))" = "2" ] && [ "$lock" -eq 1 ]; then
eww update osd-brightness=false
lock=0
if [ "$(eww get osd-brightness)" = "false" ] && [ "$(eww get osd-volume)" = "false" ]; then
eww close osd
fi
fi
sleep 0.1
done
eww close osd
}
if [ "$1" = "osd" ]; then
osd
else
osd_handler &
# initial
icon=${icons[$(awk -v n="$(light)" 'BEGIN{print int(n/34)}')]}
echo '{ "percent": '"$(light)"', "icon": "'"$icon"'" }'
udevadm monitor | rg --line-buffered "backlight" | while read -r _; do
icon="${icons[$(awk -v n="$(light)" 'BEGIN{print int(n/34)}')]}"
echo '{ "percent": '"$(light)"', "icon": "'"$icon"'" }'
done
fi

View file

@ -1,10 +0,0 @@
#!/usr/bin/env bash
socat -u UNIX-CLIENT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock STDOUT |
while read line; do
if [[ "$line" == activewindow\>\>* ]]; then
windowtitle="$(echo $line | cut -d',' -f 2)"
echo '{"title": "'$windowtitle'"}'
fi
done

View file

@ -1,20 +0,0 @@
#!/usr/bin/env bash
while true; do
# human-readable
freeH=$(free -h --si | rg "Mem:")
# non-human-readable
freeN=$(free --mega | rg "Mem:")
total="$(echo "$freeH" | awk '{ print $2 }')"
used="$(echo "$freeH" | awk '{ print $3 }')"
t="$(echo "$freeN" | awk '{ print $2 }')"
u="$(echo "$freeN" | awk '{ print $3 }')"
free=$(printf '%.1fG' "$(bc -l <<< "($t - $u) / 1000")")
perc=$(printf '%.1f' "$(free -m | rg Mem | awk '{print ($3/$2)*100}')")
echo '{ "total": "'"$total"'", "used": "'"$used"'", "free": "'"$free"'", "percent": '"$perc"' }'
sleep 3
done

View file

@ -1,111 +0,0 @@
#!/usr/bin/env bash
get_status() {
s=$1
if [ "$s" = "Playing" ]; then
echo ""
else
echo ""
fi
}
get_length_sec() {
len=$1
if [ -z "$len" ]; then
echo 0
else
bc <<<"$len / 1000000"
fi
}
get_length_time() {
len=$1
if [ -n "$len" ]; then
len=$(bc <<<"$len / 1000000 + 1")
date -d@"$len" +%M:%S
else
echo ""
fi
}
get_position() {
pos=$1
len=$2
if [ -n "$pos" ]; then
bc -l <<<"$pos / $len * 100"
else
echo 0
fi
}
get_position_time() {
pos=$1
len=$2
if [ -n "$pos" ]; then
date -d@"$(bc <<<"$pos / 1000000")" +%M:%S
else
echo ""
fi
}
get_cover() {
mkdir -p "$XDG_CACHE_HOME/eww_covers"
cd "$XDG_CACHE_HOME/eww_covers" || exit
IMGPATH="$XDG_CACHE_HOME/eww_covers/cover_art.png"
COVER_URL="$1"
if [[ "$COVER_URL" = https* ]]; then
if [ ! -e "$XDG_CACHE_HOME/eww_covers/$(basename "$COVER_URL")" ]; then
wget -N "$COVER_URL" -o /dev/null
fi
rm "$IMGPATH"
ln -s "$(basename "$COVER_URL")" "$IMGPATH"
IMG="${IMGPATH}"
elif [ "$COVER_URL" = "" ]; then
IMG=""
else
IMG="$COVER_URL"
fi
echo "$IMG"
}
sanitize() {
echo "$1" | sed 's/"/\"/g'
}
prevCover=''
playerctl -F metadata -f '{{title}}\{{artist}}\{{status}}\{{position}}\{{mpris:length}}\{{mpris:artUrl}}' 2>/dev/null | while IFS="$(printf '\')" read -r title artist status position len cover; do
if [[ "$cover" != "$prevCover" ]]; then
COVER=$(get_cover "$cover")
if [ "$COVER" != "" ]; then
cols=$(convert "$COVER" -colors 2 -format "%c" histogram:info: | awk '{print $3}')
color1=$(echo "$cols" | head -1)
color1=$(printf "rgba(%d, %d, %d, 0.6)" ${color1:1:2} ${color1:3:2} ${color1:5:2})
color2=$(echo "$cols" | tail -1)
else
color1="#1e1e2e"
color2="#28283d"
fi
fi
jaq --null-input -r -c \
--arg artist "$(sanitize "$artist")" \
--arg title "$(sanitize "$title")" \
--arg status "$status" \
--arg pos "$(get_position "$position" "$len")" \
--arg pos_time "$(get_position_time "$position" "$len")" \
--arg length "$(get_length_time "$len")" \
--arg cover "$COVER" \
--arg color1 "$color1" \
--arg color2 "$color2" \
'{"artist": $artist, "title": $title, "status": $status, "position": $pos, "position_time": $pos_time, "length": $length, "cover": $cover, "color1": $color1, "color2": $color2}'
prevCover=$cover
done

View file

@ -1,43 +0,0 @@
#!/usr/bin/env bash
toggle() {
status=$(rfkill -J | jaq -r '.rfkilldevices[] | select(.type == "wlan") | .soft' | head -1)
if [ "$status" = "unblocked" ]; then
rfkill block wlan
else
rfkill unblock wlan
fi
}
if [ "$1" = "toggle" ]; then
toggle
else
while true; do
status=$(nmcli -f state g| tail -1)
wifistatus=$(nmcli -t -f in-use,ssid,signal dev wifi | rg '\*' | sed 's/\"/\\"/g')
signal=$(echo "$wifistatus" | awk -F: '{print $3}')
essid=$(echo "$wifistatus" | awk -F: '{print $2}')
icons=("" "" "" "" "")
if [ "$status" = "disconnected" ] ; then
icon=""
color="#988ba2"
class=""
else
level=$(awk -v n="$signal" 'BEGIN{print int((n-1)/20)}')
if [ "$level" -gt 4 ]; then
level=4
fi
icon=${icons[$level]}
color="#cba6f7"
class="wifi-connected"
fi
echo '{ "essid": "'"$essid"'", "icon": "'"$icon"'", "color": "'"$color"'", "class": "'"$class"'" }'
sleep 3
done
fi

View file

@ -1,102 +0,0 @@
#!/usr/bin/env bash
volicons=("" "" "")
if [ ! "$XDG_CACHE_HOME" ]; then
XDG_CACHE_HOME="/home/mihai/.local/cache"
fi
date="$XDG_CACHE_HOME/eww/osd_vol.date"
vol() {
wpctl get-volume @DEFAULT_AUDIO_"$1"@ | awk '{print int($2*100)}'
}
ismuted() {
wpctl get-volume @DEFAULT_AUDIO_"$1"@ | rg -i muted
echo $?
}
setvol() {
wpctl set-volume @DEFAULT_AUDIO_"$1"@ "$(awk -v n="$2" 'BEGIN{print (n / 100)}')"
}
setmute() {
wpctl set-mute @DEFAULT_AUDIO_"$1"@ toggle
}
osd() {
if [ ! -f "$date" ]; then
mkdir -p "$XDG_CACHE_HOME/eww"
fi
date +%s > "$date"
}
osd_handler() {
lock=0
rundate=0
if [ ! -f "$date" ]; then
mkdir -p "$XDG_CACHE_HOME/eww"
echo 0 > "$date"
fi
while true; do
# get dates
rundate=$(cat "$date")
currentdate=$(date +%s)
# handle showing
if [ "$rundate" = "$currentdate" ] && [ "$lock" -eq 0 ]; then
eww open osd
eww update osd-volume=true
lock=1
elif [ "$((currentdate - rundate))" = "2" ] && [ "$lock" -eq 1 ]; then
eww update osd-volume=false
lock=0
if [ "$(eww get osd-volume)" = "false" ] && [ "$(eww get osd-brightness)" = "false" ]; then
eww close osd
fi
fi
sleep 0.1
done
eww close osd
}
if [ "$1" = "mute" ]; then
if [ "$2" != "SOURCE" ] && [ "$2" != "SINK" ]; then
echo "Can only mute SINK or SOURCE"; exit 1
fi
setmute "$2"
elif [ "$1" = "setvol" ]; then
if [ "$2" != "SOURCE" ] && [ "$2" != "SINK" ]; then
echo "Can only set volume for SINK or SOURCE"; exit 1
elif [ "$3" -lt 1 ] || [ "$3" -gt 100 ]; then
echo "Volume must be between 1 and 100"; exit 1
fi
setvol "$2" "$3"
elif [ "$1" = "osd" ]; then
osd
else
# initial values
lvl=$(awk -v n="$(vol "SINK")" 'BEGIN{print int(n/34)}')
ismuted=$(ismuted "SINK")
if [ "$ismuted" = 1 ]; then
icon="${volicons[$lvl]}"
else
icon=""
fi
echo '{ "icon": "'"$icon"'", "percent": "'"$(vol "SINK")"'", "microphone": "'"$(vol "SOURCE")"'" }'
osd_handler &
# event loop
pactl subscribe | rg --line-buffered "change" | while read -r _; do
lvl=$(awk -v n="$(vol "SINK")" 'BEGIN{print int(n/34)}')
ismuted=$(ismuted "SINK")
if [ "$ismuted" = 1 ]; then
icon="${volicons[$lvl]}"
else
icon=""
fi
echo '{ "icon": "'"$icon"'", "percent": "'"$(vol "SINK")"'", "microphone": "'"$(vol "SOURCE")"'" }'
done
fi

View file

@ -1,99 +0,0 @@
#!/usr/bin/env bash
# define colors
# red peach green blue
colors=("#f38ba8" "#fab387" "#a6e3a1" "#89b4fa")
# pink yellow teal lavender
dimmed=("#f5c2e7" "#f9e2af" "#94e2d5" "#b4befe")
empty="#313244"
# get initial focused workspace
focusedws=$(hyprctl -j monitors | jaq -r '.[] | select(.focused == true) | .activeWorkspace.id')
declare -A o=([1]=0 [2]=0 [3]=0 [4]=0)
declare -A monitormap
declare -A workspaces
# set color for each workspace
status() {
if [ "${o[$1]}" -eq 1 ]; then
mon=${monitormap[${workspaces[$1]}]}
if [ "$focusedws" -eq "$1" ]; then
echo -n "#27ae60"
# echo -n "${colors[$mon]}"
else
# echo -n "${dimmed[$mon]}"
echo -n "#fdbc4b"
fi
else
# echo -n "$empty"
echo -n "#2f343f"
fi
}
# handle workspace create/destroy
workspace_event() {
o[$1]=$2
while read -r k v; do workspaces[$k]="$v"; done < <(hyprctl -j workspaces | gojq -r '.[]|"\(.id) \(.monitor)"')
}
# handle monitor (dis)connects
monitor_event() {
while read -r k v; do monitormap["$k"]=$v; done < <(hyprctl -j monitors | gojq -r '.[]|"\(.name) \(.id) "')
}
# get all apps titles in a workspace
applist() {
ws="$1"
apps=$(hyprctl -j clients | jaq -jr '.[] | select(.workspace.id == '"$ws"') | .title + "\\n"')
echo -En "${apps%"\n"}"
}
# generate the json for eww
generate() {
echo -n '['
for i in {1..4}; do
echo -n ''"$([ "$i" -eq 1 ] || echo ,)" '{ "number": "'"$i"'", "color": "'"$(status "$i")"'" }' #, "tooltip": "'$(applist "$i")'" }'
done
echo ']'
}
# setup
# add monitors
monitor_event
# add workspaces
while read -r k v; do workspaces[$k]="$v"; done < <(hyprctl -j workspaces | gojq -r '.[]|"\(.id) \(.monitor)"')
# check occupied workspaces
for num in "${!workspaces[@]}"; do
o[$num]=1
done
# generate initial widget
generate
# main loop
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | rg --line-buffered "workspace|mon(itor)?" | while read -r line; do
case ${line%>>*} in
"workspace")
focusedws=${line#*>>}
;;
"focusedmon")
focusedws=${line#*,}
;;
"createworkspace")
workspace_event "${line#*>>}" 1
;;
"destroyworkspace")
workspace_event "${line#*>>}" 0
;;
"monitor"*)
monitor_event
;;
esac
generate
done

View file

@ -1,14 +0,0 @@
(defwidget calendar-win []
(box
:class "calendar-win"
(calendar)))
(defwindow calendar
:monitor 0
:geometry (geometry
:x "0%"
:y "0%"
:anchor "top right"
:width "0px"
:height "0px")
(calendar-win))

View file

@ -1,55 +0,0 @@
(defwidget music []
(box
:class "music-window"
:space-evenly false
:style "background-color: ${music.color1}; border: 1px solid ${music.color2};"
(box
:class "music-cover-art"
:style "background-image: url(\"${music.cover}\");")
(box
:orientation "v"
:class "music-box"
(label
:class "music-title"
:wrap true
:text {music.title})
(label
:class "music-artist"
:wrap true
:text {music.artist})
(centerbox
:halign "center"
:class "music-button-box icon"
(button :class "music-button" :onclick "playerctl previous" "")
(button :class "music-button" :onclick "playerctl play-pause" {music.status})
(button :class "music-button" :onclick "playerctl next" ""))
(box
:orientation "v"
(box
(label
:xalign 0
:class "music-time"
:text {music.position_time})
(label
:xalign 1
:class "music-time"
:text {music.length}))
(box
:class "music-bar"
(scale
; doesn't work, looking for other ways
; :style "background: linear-gradient(to right, ${music.color1}, ${music.color2});"
:onchange "playerctl position `bc <<< \"{} * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
:value {music.position}))))))
(defwindow music
:stacking "fg"
:focusable false
:monitor 0
:geometry (geometry
:x "0%"
:y "0%"
:width "0%"
:height "0%"
:anchor "top center")
(music))

View file

@ -1,43 +0,0 @@
(defwidget osd-part [icon value class]
(box
:class "osd-part osd-${class}"
:orientation "v"
:space-evenly false
(scale
:flipped true
:orientation "v"
:value value)
(label
:text icon)))
(defwidget osd []
(box
:class "osd-container"
:space-evenly false
(revealer
:reveal {osd-brightness}
:transition "slideright"
(osd-part
:class "brightness"
:icon {brightness.icon}
:value {brightness.percent}))
(revealer
:reveal {osd-volume}
:transition "slideright"
(osd-part
:class "volume"
:icon {volume.icon}
:value {volume.percent})))
)
(defwindow osd
:stacking "fg"
:focusable false
:monitor 0
:geometry (geometry
:x "1%"
:y "0%"
:width "0%"
:height "0%"
:anchor "center left")
(osd))

View file

@ -1,204 +0,0 @@
(defwidget system-menu []
(box
:class "system-menu-box"
:space-evenly false
:orientation "v"
(box
:class "top-row"
:space-evenly false
(label
:class "time"
:text "${time.hour}:${time.minute}")
(box
:class "date-box"
:space-evenly false
(label
:class "date"
:text {time.date})
(label
:class "day"
:text {time.day})))
(centerbox
:class "system-row"
(box
:class "wifi-box"
:space-evenly false
:orientation "v"
(box
:class "element icon ${net.class}"
:space-evenly false
(button
:class "wifi-button"
:onclick "scripts/net toggle"
{net.icon})
(label
:class "separator"
:text "│")
(button
:class "wifi-arrow-btn"
:onclick "eww close system-menu && gnome-control-center &"
""))
(label
:text {net.essid}
:xalign 0.5
:limit-width 15))
(box
:class "bluetooth-box"
:space-evenly false
:orientation "v"
(box
:class "element icon ${bluetooth.class}"
:space-evenly false
(button
:class "bluetooth-button"
:onclick "scripts/bluetooth toggle"
{bluetooth.icon})
(label
:class "separator"
:text "│")
(button
:class "bluetooth-arrow-btn"
:onclick "eww close system-menu && blueberry"
""))
(label
:text {bluetooth.text}
:xalign 0.5
:tooltip "${bluetooth.text} ${bluetooth.battery}"
:limit-width 15))
(box
:class "airplane-box"
:space-evenly false
:orientation "v"
(box
:class "element"
(button
:class "airplane-button"
:onclick "scripts/airplane toggle"
airplane))
(label
:text "Airplane Mode"
:xalign 0.5
:limit-width 16)))
(box
:class "sliders"
:orientation "v"
(box
:class "volume-slider-box"
:space-evenly false
(button
:class "volume-icon icon"
:onclick "scripts/volume mute SINK"
{volume.icon})
(scale
:class "volume-bar"
:value {volume.percent}
:tooltip "volume on ${volume.percent}%"
:onchange "scripts/volume setvol SINK {}"))
(box
:class "brightness-slider-box"
:space-evenly false
(button
:class "brightness-slider-icon icon"
{brightness.icon})
(scale
:class "brightness-slider"
:value {brightness.percent}
:marks true
:onchange "light -S {}")))
(box
:class "system-info-box"
; cpu
(box
:class "sys-box"
:space-evenly false
:halign "start"
(circular-progress
:value "${EWW_CPU.avg}"
:class "sys-cpu"
:thickness 3
(label
:text ""
:class "sys-icon-cpu icon"))
(box
:orientation "v"
:vexpand false
(label
:text "cpu"
:halign "start"
:class "sys-text-cpu")
(label
:text "${round(EWW_CPU.avg,2)}%"
:halign "start"
:class "sys-text-sub")
(label
:text "${EWW_CPU.cores[0].freq} MHz"
:halign "start"
:class "sys-text-sub")))
; memory
(box
:class "sys-box"
:space-evenly false
:halign "end"
(circular-progress
:value {memory.percent}
:class "sys-mem"
:thickness 3
(label
:text ""
:class "sys-icon-mem icon"))
(box
:orientation "v"
(label
:text "memory"
:halign "start"
:class "sys-text-mem")
(label
:text "${memory.used} | ${memory.total}"
:halign "start"
:class "sys-text-sub"))))
(centerbox
:class "bottom-row"
(box
:class "battery-box"
:space-evenly false
:halign "start"
(label
:class "battery-icon icon"
:style "color: ${battery.color}"
:text {battery.icon})
(label
:text {EWW_BATTERY["BAT0"].capacity})
(label
:class "battery-status"
:text {battery.status})
(label
:class "battery-wattage"
:text {battery.wattage}))
(label)
(box
:space-evenly false
:halign "end"
(button
:halign "end"
:class "power-button icon"
:onclick "wlogout -p layer-shell &"
"")))))
(defwindow system-menu
:stacking "fg"
:monitor 0
:geometry (geometry
:x "0"
:y "0"
:width "0%"
:height "0%"
:anchor "right top")
(system-menu))

View file

@ -1,7 +0,0 @@
width=40%
height=30%
show=drun
prompt=Search
allow_images=true
allow_markup=true
insensitive=true

View file

@ -1,25 +0,0 @@
# youtube-dl config file
# use .netrc for logins
-n
# ignore errors (unavailable videos, etc)
-i
# don't overwrite
-w
# make an archive of downloaded videos and only download unlisted items, then list them
# useful for music playlists you update often
--download-archive ~/Music/untagged/ignore.these
# convert all downloads to 192kbps mp3
-x
--audio-format mp3 #opus
--audio-quality 192K
# embed thumbnail into audio
#--embed-thumbnail
# save all music in the following folder and format
-o '~/Music/untagged/%(artist)s - %(title)s.%(ext)s'

View file

@ -1,34 +0,0 @@
{
pkgs,
lib,
config,
...
}:
# manage files in ~
{
imports = [
./nix-index-update-db.nix
./wlogout.nix
./wofi-style.nix
];
home.file.".config" = {
source = ./config;
recursive = true;
};
xdg.configFile = {
"btop/themes/catppuccin_mocha.theme".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/btop/main/catppuccin_mocha.theme";
hash = "sha256-MGK5ECB5sXiHdi2A3Y4s/Sx7nSRQ+KLyZjEKElRPKf0=";
};
"xilinx/nix.sh" = {
executable = true;
text = ''
INSTALL_DIR=$HOME/Documents/code/xilinx/tools/Xilinx
VERSION=2022.2
'';
};
};
}

View file

@ -1,35 +0,0 @@
{
pkgs,
lib,
...
}: {
# set up nix-index
systemd.user.timers.nix-index-db-update = {
Timer = {
OnCalendar = "weekly";
Persistent = true;
RandomizedDelaySec = 0;
};
};
systemd.user.services.nix-index-db-update = {
Unit = {
Description = "nix-index database update";
PartOf = ["multi-user.target"];
};
Service = let
script = pkgs.writeShellScript "nix-index-update-db" ''
export filename="index-x86_64-$(uname | tr A-Z a-z)"
mkdir -p ~/.cache/nix-index
cd ~/.cache/nix-index
# -N will only download a new version if there is an update.
wget -N https://github.com/Mic92/nix-index-database/releases/latest/download/$filename
ln -f $filename files
'';
in {
Environment = "PATH=/run/wrappers/bin:${lib.makeBinPath [pkgs.wget pkgs.coreutils]}";
ExecStart = "${script}";
};
Install.WantedBy = ["multi-user.target"];
};
}

View file

@ -1,57 +0,0 @@
{
default,
pkgs,
...
}: let
w = pkgs.wlogout;
in {
xdg.configFile."wlogout/style.css".text = ''
* {
background-image: none;
font-family: "Jost *", Roboto, sans-serif;
}
window {
background-color: rgba(12, 12, 12, 0.9);
}
button {
background: unset;
border-radius: 16px;
border: 1px solid #28283d;
color: ${default.xcolors.text};
margin: 1rem;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
}
button:focus, button:active, button:hover {
background-color: ${default.xcolors.blue};
color: ${default.xcolors.base};
outline-style: none;
}
#lock {
background-image: image(url("${w}/share/wlogout/icons/lock.png"), url("${w}/local/share/wlogout/icons/lock.png"));
}
#logout {
background-image: image(url("${w}/share/wlogout/icons/logout.png"), url("${w}/local/share/wlogout/icons/logout.png"));
}
#suspend {
background-image: image(url("${w}/share/wlogout/icons/suspend.png"), url("${w}/local/share/wlogout/icons/suspend.png"));
}
#hibernate {
background-image: image(url("${w}/share/wlogout/icons/hibernate.png"), url("${w}/local/share/wlogout/icons/hibernate.png"));
}
#shutdown {
background-image: image(url("${w}/share/wlogout/icons/shutdown.png"), url("${w}/local/share/wlogout/icons/shutdown.png"));
}
#reboot {
background-image: image(url("${w}/share/wlogout/icons/reboot.png"), url("${w}/local/share/wlogout/icons/reboot.png"));
}
'';
}

View file

@ -1,46 +0,0 @@
{default, ...}: {
xdg.configFile."wofi/style.css".text = ''
window { background: unset; }
flowboxchild { outline-width: 0; }
#outer-box {
background: ${default.xcolors.base};
border: 1px solid ${default.xcolors.border};
border-radius: 24px;
box-shadow: 0 2px 3px ${default.xcolors.crust};
margin: 5px 5px 10px;
padding: 5px 5px 10px;
}
#input {
background-color: ${default.xcolors.crust};
border: none;
border-radius: 16px;
color: ${default.xcolors.text};
margin: 5px;
}
#inner-box {
background-color: ${default.xcolors.base};
border: none;
border-radius: 16px;
margin: 5px;
}
#scroll {
border: none;
margin: 0px;
}
#text {
color: ${default.xcolors.text};
margin: 5px;
}
#entry { border-radius: 16px; }
#entry:selected {
background-color: ${default.xcolors.surface0};
}
'';
}

View file

@ -1,12 +0,0 @@
{
pkgs,
inputs,
...
}:
# games
{
home.packages = with pkgs; [
inputs.nix-gaming.packages.${pkgs.hostPlatform.system}.osu-lazer-bin
gamescope
];
}

View file

@ -1,52 +0,0 @@
{
pkgs,
default,
...
}: {
home.packages = [pkgs.gh];
programs.git = {
enable = true;
delta = {
enable = true;
options.map-styles = "bold purple => syntax ${default.xcolors.mauve}, bold cyan => syntax ${default.xcolors.blue}";
};
extraConfig = {
diff.colorMoved = "default";
merge.conflictstyle = "diff3";
};
aliases = {
a = "add";
b = "branch";
c = "commit";
ca = "commit --amend";
cm = "commit -m";
co = "checkout";
d = "diff";
ds = "diff --staged";
p = "push";
pf = "push --force-with-lease";
pl = "pull";
l = "log";
r = "rebase";
s = "status --short";
ss = "status";
forgor = "commit --amend --no-edit";
graph = "log --all --decorate --graph --oneline";
oops = "checkout --";
};
ignores = ["*~" "*.swp" "*result*" ".direnv" "node_modules"];
signing = {
key = "5899325F2F120900";
signByDefault = true;
};
userEmail = "fufexan@protonmail.com";
userName = "Mihai Fufezan";
};
}

View file

@ -1,38 +0,0 @@
{
pkgs,
config,
...
}: {
home.pointerCursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 24;
gtk.enable = true;
x11.enable = true;
};
gtk = {
enable = true;
font = {
name = "Roboto";
package = pkgs.roboto;
};
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
theme = {
name = "Catppuccin-Mocha-Compact-Mauve-Dark";
package = pkgs.catppuccin-gtk.override {
accents = ["mauve"];
size = "compact";
variant = "mocha";
};
};
};
}

View file

@ -1,55 +0,0 @@
{
pkgs,
config,
...
}:
# media - control and enjoy audio/video
{
imports = [
./spicetify.nix
];
home.packages = with pkgs; [
# audio control
pavucontrol
playerctl
pulsemixer
# images
imv
spotify-tui
];
programs = {
mpv = {
enable = true;
defaultProfiles = ["gpu-hq"];
scripts = [pkgs.mpvScripts.mpris];
};
obs-studio.enable = true;
};
services = {
playerctld.enable = true;
spotifyd = {
enable = true;
package = pkgs.spotifyd.override {withMpris = true;};
settings.global = {
autoplay = true;
backend = "pulseaudio";
bitrate = 320;
cache_path = "${config.xdg.cacheHome}/spotifyd";
device_type = "computer";
initial_volume = "100";
password_cmd = "tail -1 /run/agenix/spotify";
use_mpris = true;
username_cmd = "head -1 /run/agenix/spotify";
volume_normalisation = false;
};
};
udiskie.enable = true;
};
}

View file

@ -1,33 +0,0 @@
{
pkgs,
inputs,
...
}: {
home.packages = with pkgs; [
# archives
zip
unzip
unrar
# office
libreoffice
# messaging
tdesktop
# school stuff
inputs.nix-xilinx.packages.${pkgs.hostPlatform.system}.vivado
jetbrains.idea-community
# torrents
transmission-remote-gtk
# misc
libnotify
xdg-utils
# productivity
obsidian
xournalpp
];
}

View file

@ -1,18 +0,0 @@
{pkgs, ...}:
# Qt theming with Kvantum
{
home.packages = with pkgs; [
libsForQt5.qtstyleplugin-kvantum
(catppuccin-kvantum.override {
accent = "Mauve";
variant = "Mocha";
})
];
home.sessionVariables = {
QT_STYLE_OVERRIDE = "kvantum";
};
xdg.configFile."Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" {
General.Theme = "Catppuccin-Mocha-Mauve";
};
}

View file

@ -1,24 +0,0 @@
{
pkgs,
inputs,
...
}: {
# themable spotify
programs.spicetify = let
spicePkgs = inputs.spicetify-nix.packages.${pkgs.hostPlatform.system}.default;
in {
enable = true;
spotifyPackage = inputs.self.packages.${pkgs.hostPlatform.system}.spotify;
theme = spicePkgs.themes.catppuccin-mocha;
colorScheme = "flamingo";
enabledExtensions = with spicePkgs.extensions; [
fullAppDisplay
hidePodcasts
shuffle
];
};
}

View file

@ -1,47 +0,0 @@
{config, ...}: let
browser = ["firefox.desktop"];
# XDG MIME types
associations = {
"application/x-extension-htm" = browser;
"application/x-extension-html" = browser;
"application/x-extension-shtml" = browser;
"application/x-extension-xht" = browser;
"application/x-extension-xhtml" = browser;
"application/xhtml+xml" = browser;
"text/html" = browser;
"x-scheme-handler/about" = browser;
"x-scheme-handler/chrome" = ["chromium-browser.desktop"];
"x-scheme-handler/ftp" = browser;
"x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser;
"x-scheme-handler/unknown" = browser;
"audio/*" = ["mpv.desktop"];
"video/*" = ["mpv.dekstop"];
"image/*" = ["imv.desktop"];
"application/json" = browser;
"application/pdf" = ["org.pwmt.zathura.desktop.desktop"];
"x-scheme-handler/discord" = ["discordcanary.desktop"];
"x-scheme-handler/spotify" = ["spotify.desktop"];
"x-scheme-handler/tg" = ["telegramdesktop.desktop"];
};
in {
xdg = {
enable = true;
cacheHome = config.home.homeDirectory + "/.local/cache";
mimeApps = {
enable = true;
defaultApplications = associations;
};
userDirs = {
enable = true;
createDirectories = true;
extraConfig = {
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
};
};
};
}

View file

@ -1,27 +0,0 @@
{pkgs, ...}: {
programs.zathura = {
enable = true;
options = {
recolor-lightcolor = "rgba(0,0,0,0)";
default-bg = "rgba(0,0,0,0.7)";
font = "Lexend 12";
selection-notification = true;
selection-clipboard = "clipboard";
adjust-open = "best-fit";
pages-per-row = "1";
scroll-page-aware = "true";
scroll-full-overlap = "0.01";
scroll-step = "100";
zoom-min = "10";
};
extraConfig = "include catppuccin-mocha";
};
xdg.configFile."zathura/catppuccin-mocha".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
hash = "sha256-/HXecio3My2eXTpY7JoYiN9mnXsps4PAThDPs4OCsAk=";
};
}

View file

@ -1,49 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
# archives
zip
unzip
unrar
# utils
file
du-dust
duf
fd
ripgrep
# file managers
joshuto
ranger
];
programs = {
bat = {
enable = true;
config = {
pager = "less -FR";
theme = "Catppuccin-mocha";
};
themes = {
Catppuccin-mocha = builtins.readFile (pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/bat/main/Catppuccin-mocha.tmTheme";
hash = "sha256-qMQNJGZImmjrqzy7IiEkY5IhvPAMZpq0W6skLLsng/w=";
});
};
};
btop.enable = true;
exa.enable = true;
ssh.enable = true;
skim = {
enable = true;
enableZshIntegration = true;
defaultCommand = "rg --files --hidden";
changeDirWidgetOptions = [
"--preview 'exa --icons --git --color always -T -L 3 {} | head -200'"
"--exact"
];
};
};
}

View file

@ -1,28 +0,0 @@
{config, ...}: let
d = config.xdg.dataHome;
c = config.xdg.configHome;
cache = config.xdg.cacheHome;
in {
imports = [
./cli.nix
./nushell
./starship.nix
./transient-services.nix
./zsh.nix
];
# add environment variables
home.sessionVariables = {
# clean up ~
LESSHISTFILE = cache + "/less/history";
LESSKEY = c + "/less/lesskey";
WINEPREFIX = d + "/wine";
XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
# enable scrolling in git diff
DELTA_PAGER = "less -R";
EDITOR = "hx";
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
};
}

Some files were not shown because too many files have changed in this diff Show more