Initial experimental commit

This commit is contained in:
ooks-io 2024-01-13 22:52:45 +13:00
parent b848f9d893
commit 682a19b13c
146 changed files with 2463 additions and 2389 deletions

View file

@ -1,5 +0,0 @@
# Personal nix config
*ook ook*

321
flake.lock generated
View file

@ -16,6 +16,30 @@
"type": "github"
}
},
"crane": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_2",
"nixpkgs": [
"helix",
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1688772518,
"narHash": "sha256-ol7gZxwvgLnxNSZwFTDJJ49xVY5teaSvF7lzlo3YQfM=",
"owner": "ipetkov",
"repo": "crane",
"rev": "8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"firefox-addons": {
"inputs": {
"flake-utils": "flake-utils",
@ -25,11 +49,11 @@
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1701748971,
"narHash": "sha256-rUMtghzNmFLu8M5sWmfmnkSqnrlJal1gB+nJLz7v0h0=",
"lastModified": 1702814246,
"narHash": "sha256-8aOoykO7+4BDmV5QvpSLyoBaSmDmmKcHSz7I/gMAPv0=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "94b0be5382c029be47fda7ba179c36491b5c49e6",
"rev": "8d2075876b1a0d167d0387c661ec7f5d27254c5e",
"type": "gitlab"
},
"original": {
@ -39,6 +63,22 @@
"type": "gitlab"
}
},
"flake-compat": {
"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-utils": {
"locked": {
"lastModified": 1629284811,
@ -54,13 +94,49 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"hardware": {
"locked": {
"lastModified": 1701656485,
"narHash": "sha256-xDFormrGCKKGqngHa2Bz1GTeKlFMMjLnHhTDRdMJ1hs=",
"lastModified": 1702453208,
"narHash": "sha256-0wRi9SposfE2wHqjuKt8WO2izKB/ASDOV91URunIqgo=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "fa194fc484fd7270ab324bb985593f71102e84d1",
"rev": "7763c6fd1f299cb9361ff2abf755ed9619ef01d6",
"type": "github"
},
"original": {
@ -69,6 +145,29 @@
"type": "github"
}
},
"helix": {
"inputs": {
"crane": "crane",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1704763276,
"narHash": "sha256-dwRpOmBql51/BDcyDPSOAYZyHXYrW/Hry0smjOHZuCI=",
"owner": "helix-editor",
"repo": "helix",
"rev": "84e24b33dcda16d1d64805f34dcc02d82d0de8f1",
"type": "github"
},
"original": {
"owner": "helix-editor",
"repo": "helix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -76,11 +175,11 @@
]
},
"locked": {
"lastModified": 1701728041,
"narHash": "sha256-x0pyrI1vC8evVDxCxyO6olOyr4wlFg9+VS3C3p4xFYQ=",
"lastModified": 1702814335,
"narHash": "sha256-Qck7BAMi3eydzT1WFOzp/SgECetyPpOn1dLgmxH2ebQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "ac7216918cd65f3824ba7817dea8f22e61221eaf",
"rev": "e4dba0bd01956170667458be7b45f68170a63651",
"type": "github"
},
"original": {
@ -95,16 +194,16 @@
"nixpkgs": [
"nixpkgs"
],
"systems": "systems",
"systems": "systems_3",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1701819597,
"narHash": "sha256-X0K2v/SOMQj18/O9daDlizlnlGRDMWuuGoU3jm06b7k=",
"lastModified": 1702858530,
"narHash": "sha256-54Udd5LVnk1ZFc0BayOLpf3DcOh3NKXutwF7JcY3bLQ=",
"owner": "hyprwm",
"repo": "hyprland",
"rev": "8bd86cf37e245088433156796f1bc72542ca09ad",
"rev": "403fd7d9f6b160dec71456c9fb195a4199134eff",
"type": "github"
},
"original": {
@ -113,6 +212,26 @@
"type": "github"
}
},
"hyprland-plugins": {
"inputs": {
"hyprland": [
"hyprland"
]
},
"locked": {
"lastModified": 1705019505,
"narHash": "sha256-CQ2GjXj9T2Afw2PuoqtC+GXUQFKtYUer4q71SJY8y7o=",
"owner": "hyprwm",
"repo": "hyprland-plugins",
"rev": "e11549598413dc15f1d1fd11b6dd17fa6bcc50ad",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-plugins",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
@ -138,6 +257,43 @@
"type": "github"
}
},
"hyprlang": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1704230242,
"narHash": "sha256-S8DM+frECqmAdaUb3y5n3RjY73ajZcL5rnmx5YO+CkY=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "db5e1399b90d5a339330bdd49c5bca6fe58d6f60",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprpaper": {
"inputs": {
"hyprlang": "hyprlang",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1704406943,
"narHash": "sha256-d18gWmdMtkW06LvnkSADe69J2po20NsAEVfacyN1IOc=",
"owner": "hyprwm",
"repo": "hyprpaper",
"rev": "43b6e9d2e24294a2d07e15717c501736697afb11",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprpaper",
"type": "github"
}
},
"hyprwm-contrib": {
"inputs": {
"nixpkgs": [
@ -145,11 +301,11 @@
]
},
"locked": {
"lastModified": 1700963402,
"narHash": "sha256-JhkanLmYRLekGOysO6JpCWKPlgRoemHPzUrARCGBqYA=",
"lastModified": 1702242899,
"narHash": "sha256-p2FmwhHlIW3V8YzlRu/bWCiKa2a9fSardt9Eh22JlWE=",
"owner": "hyprwm",
"repo": "contrib",
"rev": "65e567a81176d39be7ce6513d1af23954f00cbec",
"rev": "740dbac96354c076a76b7cf6fe70dad150d21659",
"type": "github"
},
"original": {
@ -179,15 +335,15 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1701436327,
"narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=",
"lastModified": 1702645756,
"narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "91050ea1e57e50388fa87a3302ba12d188ef723a",
"rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0",
"type": "github"
},
"original": {
"owner": "nixos",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@ -208,18 +364,135 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1703637592,
"narHash": "sha256-8MXjxU0RfFfzl57Zy3OfXCITS0qWDNLzlBAdwxGZwfY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cfc3698c31b1fb9cdcf10f36c9643460264d0ca8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1702312524,
"narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a9bf124c46ef298113270b1f84a164865987a91c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"firefox-addons": "firefox-addons",
"hardware": "hardware",
"helix": "helix",
"home-manager": "home-manager",
"hyprland": "hyprland",
"hyprland-plugins": "hyprland-plugins",
"hyprpaper": "hyprpaper",
"hyprwm-contrib": "hyprwm-contrib",
"nix-colors": "nix-colors",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_3"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"helix",
"crane",
"flake-utils"
],
"nixpkgs": [
"helix",
"crane",
"nixpkgs"
]
},
"locked": {
"lastModified": 1704766659,
"narHash": "sha256-Q2wQ9jzp4j96HokmhUQey+pyZMp4Fye/ZPSLtBBV1J8=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "afa87241c19241aca9b7a9103635b82db2b147bb",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"flake-utils": [
"helix",
"flake-utils"
],
"nixpkgs": [
"helix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1690424156,
"narHash": "sha256-Bpml+L280tHTQpwpC5/BJbU4HSvEzMvW8IZ4gAXimhE=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "f335a0213504c7e6481c359dc1009be9cf34432c",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
@ -269,11 +542,11 @@
]
},
"locked": {
"lastModified": 1700508250,
"narHash": "sha256-X4o/mifI7Nhu0UKYlxx53wIC+gYDo3pVM9L2u3PE2bE=",
"lastModified": 1702334919,
"narHash": "sha256-ibOZ3TLjqndGMcj2f+07NFwDWoum4IbzF58byZuJJNg=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "eb120ff25265ecacd0fc13d7dab12131b60d0f47",
"rev": "f5c3576c3b6cb1c31a8dfa3e4113f59bfe40cd71",
"type": "github"
},
"original": {

View file

@ -1,9 +1,13 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
hardware.url = "github:nixos/nixos-hardware";
nix-colors.url = "github:misterio77/nix-colors";
firefox-addons = {
@ -20,8 +24,21 @@
url = "github:hyprwm/hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
hyprpaper.url = "github:hyprwm/hyprpaper";
helix = {
url = "github:helix-editor/helix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, ... }@inputs:
let
inherit (self) outputs;
@ -45,37 +62,16 @@
formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt);
nixosConfigurations = {
# X1 Carbon
ooksx1 = lib.nixosSystem {
modules = [ ./system/ooksx1/ooksx1.nix ];
specialArgs = { inherit inputs outputs; };
};
# T480s
ookst480s = lib.nixosSystem {
modules = [ ./system/ookst480s/ookst480s.nix ];
specialArgs = { inherit inputs outputs; };
};
# GPD Micro-PC
ooksmicro = lib.nixosSystem {
modules = [ ./system/ooksmicro/ooksmicro.nix ];
specialArgs = { inherit inputs outputs; };
};
};
homeConfigurations = {
# X1 Carbon
"ooks@ooksx1" = lib.homeManagerConfiguration {
modules = [ ./home/ooks/ooksx1.nix ];
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
};
# T480s
"ooks@ookst480s" = lib.homeManagerConfiguration {
modules = [ ./home/ooks/ookst480s.nix ];
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
};
"ooks@ooksmicro" = lib.homeManagerConfiguration {
modules = [ ./home/ooks/ooksmicro.nix ];
modules = [ ./home/user/ooks/t480s ];
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
};

View file

@ -1,47 +0,0 @@
{ inputs, lib, pkgs, config, outputs, ... }:
let
inherit (inputs.nix-colors) colorSchemes;
in
{
imports = [
inputs.nix-colors.homeManagerModule
./shell
./xdg.nix
] ++ (builtins.attrValues outputs.homeManagerModules);
nixpkgs = {
overlays = builtins.attrValues outputs.overlays;
config = {
allowUnfree = true;
allowUnfreePredicate = (_: true);
};
};
nix = {
package = lib.mkDefault pkgs.nix;
settings = {
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
warn-dirty = false;
};
};
programs = {
home-manager.enable = true;
git.enable = true;
};
home = {
username = lib.mkDefault "ooks";
homeDirectory = lib.mkDefault "/home/${config.home.username}";
stateVersion = lib.mkDefault "22.05";
sessionPath = [ "$HOME/.local/bin" ];
sessionVariables = {
FLAKE = "$HOME/.dotfiles/nix";
};
};
xdg.portal.enable = true;
colorscheme = lib.mkDefault colorSchemes.everforest;
home.file.".colorscheme".text = config.colorscheme.slug;
}

View file

@ -1,5 +0,0 @@
{
programs.bash = {
enable = true;
};
}

View file

@ -1,71 +0,0 @@
{ pkgs, config, ... }: {
imports = [
./lf
./git.nix
./bash.nix
./fish.nix
./starship.nix
./nix-index.nix
./zellij.nix
];
home.packages = with pkgs; [
bc # Calculator
# file utility
duf
du-dust
fd
ripgrep
# archive
zip
unzip
unrar
# file transfer
wget
httpie # Better curl
# resource manager
powertop
diffsitter # Better diff
jq # JSON pretty printer and manipulator
lazygit # git uitlity
comma # Install and run with ","
tldr # Community maintained help pages
progress
killall
gcc
acpi
];
programs = {
btop.enable = true;
eza.enable = true;
bat = {
enable = true;
config = {
theme = "base16";
pager = "less -FR";
};
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
skim = {
enable = true;
enableFishIntegration = true;
defaultCommand = "rg --files --hidden";
changeDirWidgetOptions = [
"--preview 'eza --icons -L 3 -T --color always {} | head -200'"
"--exact"
];
fileWidgetCommand = "rg --files";
fileWidgetOptions = [
"--preview 'bat --color=always {}'"
];
};
};
}

View file

@ -1,129 +0,0 @@
{ pkgs, lib, config, ... }:
let
inherit (lib) mkIf;
hasPackage = pname: lib.any (p: p ? pname && p.pname == pname) config.home.packages;
hasEza = hasPackage "eza";
hasNeovim = config.programs.neovim.enable;
hasBat = hasPackage "bat";
hasHelix = hasPackage "helix";
in
{
programs.fish = {
enable = true;
shellAbbrs = rec {
jqless = "jq -C | less -r";
n = "nix";
nd = "nix develop -c $SHELL";
ns = "nix shell";
nsn = "nix shell nixpkgs#";
nb = "nix build";
nbn = "nix build nixpkgs#";
nf = "nix flake";
nr = "nixos-rebuild --flake .";
nrs = "nixos-rebuild --flake . switch";
snr = "sudo nixos-rebuild --flake .";
snrs = "sudo nixos-rebuild --flake . switch";
hm = "home-manager --flake .";
hms = "home-manager --flake . switch";
fe = mkIf hasHelix "cd $FLAKE; hx $FLAKE";
f = "cd $FLAKE";
tree = mkIf hasEza "eza -T --icons --group-directories-first";
ls = mkIf hasEza "eza -a --icons --group-directories-first";
lsd = mkIf hasEza "eza -al --icons --group-directories-first";
lst = mkIf hasEza "eza -T -L 5 --icons --group-directories-first";
lsta = mkIf hasEza "eza -T --icons --group-directories-first";
cat = mkIf hasBat "bat";
vim = mkIf hasNeovim "nvim";
};
functions = {
fish_greeting = "";
zellij_session_select = ''
if not set -q ZELLIJ
set -l ZJ_SESSIONS (zellij list-sessions | awk '{print $1}')
set -l NO_SESSIONS (count $ZJ_SESSIONS)
if test $NO_SESSIONS -gt 0
set -l SELECTED_SESSION (printf "%s\n" $ZJ_SESSIONS | sk --ansi)
if test -n "$SELECTED_SESSION"
zellij attach -c $SELECTED_SESSION
else
zellij
end
else
zellij
end
end
'';
fish_flake_edit = ''
cd $FLAKE
hx $FLAKE
'';
fish_hello_world = ''
echo "Hello World"; string repeat -N \n --count=(math (count (fish_prompt)) - 1); commandline -f repaint
'';
fish_user_key_bindings = ''
bind --preset -M insert \cf fish_flake_edit
bind --preset -M insert \ec skim_cd_widget
'';
};
interactiveShellInit =
# zellij auto start script
''
zellij_session_select
'' +
''
set --global KITTY_INSTALLATION_DIR "${pkgs.kitty}/lib/kitty"
set --global KITTY_SHELL_INTEGRATION enabled
source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish"
set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d"
'' +
# Use vim bindings and cursors
''
fish_vi_key_bindings
set fish_cursor_default block blink
set fish_cursor_insert line blink
set fish_cursor_replace_one underscore blink
set fish_cursor_visual block
'' +
# Use terminal colors
''
set -U fish_color_autosuggestion brblack
set -U fish_color_cancel -r
set -U fish_color_command brgreen
set -U fish_color_comment brmagenta
set -U fish_color_cwd green
set -U fish_color_cwd_root red
set -U fish_color_end brmagenta
set -U fish_color_error brred
set -U fish_color_escape brcyan
set -U fish_color_history_current --bold
set -U fish_color_host normal
set -U fish_color_match --background=brblue
set -U fish_color_normal normal
set -U fish_color_operator cyan
set -U fish_color_param brblue
set -U fish_color_quote yellow
set -U fish_color_redirection bryellow
set -U fish_color_search_match 'bryellow' '--background=brblack'
set -U fish_color_selection 'white' '--bold' '--background=brblack'
set -U fish_color_status red
set -U fish_color_user brgreen
set -U fish_color_valid_path --underline
set -U fish_pager_color_completion normal
set -U fish_pager_color_description yellow
set -U fish_pager_color_prefix 'white' '--bold' '--underline'
set -U fish_pager_color_progress 'brwhite' '--background=cyan'
'';
};
}

View file

@ -1,18 +0,0 @@
{ pkgs, config, ... }:
{
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userName = "ooks-io";
userEmail = "ooks@protonmail.com";
extraConfig = {
gpg."ssh".program = "${pkgs._1password-gui}/bin/op-ssh-sign";
};
ignores = [ ".direnv" "result" ];
lfs.enable = true;
};
home.packages = with pkgs; [
git-credential-1password
];
}

View file

@ -1,58 +0,0 @@
{ pkgs, config, ... }:
#TODO - mkif wayland for previewer
# - manage previewer dependencies better
# - ripdrag support
# - color parity with eza
{
xdg.configFile."lf/icons".source = ./icons;
programs.lf = {
enable = true;
settings = {
hidden = true;
ignorecase = true;
drawbox = true;
icons = true;
};
previewer = {
keybinding = "i";
source = "${pkgs.ctpv}/bin/ctpv";
};
commands = {
fzf-lf = ''
''${{
res="$(find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune -o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m)"
if [ -d "$res" ] ; then
cmd="cd"
elif [ -f "$res" ] ; then
cmd="select"
else
exit 0
fi
lf -remote "send $id $cmd \"$res\""
}}
'';
mkdir = ''
''${{
printf "Directory Name: "
read DIR
mkdir $DIR
}}
'';
};
keybindings = {
c = "mkdir";
"<a-f>" = "fzf-lf";
};
extraConfig = ''
&${pkgs.ctpv}/bin/ctpv -s $id
cmd on-quit %${pkgs.ctpv}/bin/ctpv -e $id
set cleaner ${pkgs.ctpv}/bin/ctpvclear
set sixel true
'';
};
home.packages = with pkgs; [ chafa ctpv glow ];
}

View file

@ -1,357 +0,0 @@
# vim:ft=conf
# These examples require Nerd Fonts or a compatible font to be used.
# See https://www.nerdfonts.com for more information.
# default values from lf (with matching order)
# ln l # LINK
# or l # ORPHAN
# tw t # STICKY_OTHER_WRITABLE
# ow d # OTHER_WRITABLE
# st t # STICKY
# di d # DIR
# pi p # FIFO
# so s # SOCK
# bd b # BLK
# cd c # CHR
# su u # SETUID
# sg g # SETGID
# ex x # EXEC
# fi - # FILE
# file types (with matching order)
ln  # LINK
or  # ORPHAN
tw t # STICKY_OTHER_WRITABLE
ow  # OTHER_WRITABLE
st t # STICKY
di  # DIR
pi p # FIFO
so s # SOCK
bd b # BLK
cd c # CHR
su u # SETUID
sg g # SETGID
ex  # EXEC
fi  # FILE
# file extensions (vim-devicons)
*.styl 
*.sass 
*.scss 
*.htm 
*.html 
*.slim 
*.haml 
*.ejs 
*.css 
*.less 
*.md 
*.mdx 
*.markdown 
*.rmd 
*.json 
*.webmanifest 
*.js 
*.mjs 
*.jsx 
*.rb 
*.gemspec 
*.rake 
*.php 
*.py 
*.pyc 
*.pyo 
*.pyd 
*.coffee 
*.mustache 
*.hbs 
*.conf 
*.ini 
*.yml 
*.yaml 
*.toml 
*.bat 
*.mk 
*.jpg 
*.jpeg 
*.bmp 
*.png 
*.webp 
*.gif 
*.ico 
*.twig 
*.cpp 
*.c++ 
*.cxx 
*.cc 
*.cp 
*.c 
*.cs 󰌛
*.h 
*.hh 
*.hpp 
*.hxx 
*.hs 
*.lhs 
*.nix 
*.lua 
*.java 
*.sh 
*.fish 
*.bash 
*.zsh 
*.ksh 
*.csh 
*.awk 
*.ps1 
*.ml λ
*.mli λ
*.diff 
*.db 
*.sql 
*.dump 
*.clj 
*.cljc 
*.cljs 
*.edn 
*.scala 
*.go 
*.dart 
*.xul 
*.sln 
*.suo 
*.pl 
*.pm 
*.t 
*.rss 
'*.f#' 
*.fsscript 
*.fsx 
*.fs 
*.fsi 
*.rs 
*.rlib 
*.d 
*.erl 
*.hrl 
*.ex 
*.exs 
*.eex 
*.leex 
*.heex 
*.vim 
*.ai 
*.psd 
*.psb 
*.ts 
*.tsx 
*.jl 
*.pp 
*.vue 
*.elm 
*.swift 
*.xcplayground 
*.tex 󰙩
*.r 󰟔
*.rproj 󰗆
*.sol 󰡪
*.pem 
# file names (vim-devicons) (case-insensitive not supported in lf)
*gruntfile.coffee 
*gruntfile.js 
*gruntfile.ls 
*gulpfile.coffee 
*gulpfile.js 
*gulpfile.ls 
*mix.lock 
*dropbox 
*.ds_store 
*.gitconfig 
*.gitignore 
*.gitattributes 
*.gitlab-ci.yml 
*.bashrc 
*.zshrc 
*.zshenv 
*.zprofile 
*.vimrc 
*.gvimrc 
*_vimrc 
*_gvimrc 
*.bashprofile 
*favicon.ico 
*license 
*node_modules 
*react.jsx 
*procfile 
*dockerfile 
*docker-compose.yml 
*rakefile 
*config.ru 
*gemfile 
*makefile 
*cmakelists.txt 
*robots.txt 󰚩
# file names (case-sensitive adaptations)
*Gruntfile.coffee 
*Gruntfile.js 
*Gruntfile.ls 
*Gulpfile.coffee 
*Gulpfile.js 
*Gulpfile.ls 
*Dropbox 
*.DS_Store 
*LICENSE 
*React.jsx 
*Procfile 
*Dockerfile 
*Docker-compose.yml 
*Rakefile 
*Gemfile 
*Makefile 
*CMakeLists.txt 
# file patterns (vim-devicons) (patterns not supported in lf)
# .*jquery.*\.js$ 
# .*angular.*\.js$ 
# .*backbone.*\.js$ 
# .*require.*\.js$ 
# .*materialize.*\.js$ 
# .*materialize.*\.css$ 
# .*mootools.*\.js$ 
# .*vimrc.* 
# Vagrantfile$ 
# file patterns (file name adaptations)
*jquery.min.js 
*angular.min.js 
*backbone.min.js 
*require.min.js 
*materialize.min.js 
*materialize.min.css 
*mootools.min.js 
*vimrc 
Vagrantfile 
# archives or compressed (extensions from dircolors defaults)
*.tar 
*.tgz 
*.arc 
*.arj 
*.taz 
*.lha 
*.lz4 
*.lzh 
*.lzma 
*.tlz 
*.txz 
*.tzo 
*.t7z 
*.zip 
*.z 
*.dz 
*.gz 
*.lrz 
*.lz 
*.lzo 
*.xz 
*.zst 
*.tzst 
*.bz2 
*.bz 
*.tbz 
*.tbz2 
*.tz 
*.deb 
*.rpm 
*.jar 
*.war 
*.ear 
*.sar 
*.rar 
*.alz 
*.ace 
*.zoo 
*.cpio 
*.7z 
*.rz 
*.cab 
*.wim 
*.swm 
*.dwm 
*.esd 
# image formats (extensions from dircolors defaults)
*.jpg 
*.jpeg 
*.mjpg 
*.mjpeg 
*.gif 
*.bmp 
*.pbm 
*.pgm 
*.ppm 
*.tga 
*.xbm 
*.xpm 
*.tif 
*.tiff 
*.png 
*.svg 
*.svgz 
*.mng 
*.pcx 
*.mov 
*.mpg 
*.mpeg 
*.m2v 
*.mkv 
*.webm 
*.ogm 
*.mp4 
*.m4v 
*.mp4v 
*.vob 
*.qt 
*.nuv 
*.wmv 
*.asf 
*.rm 
*.rmvb 
*.flc 
*.avi 
*.fli 
*.flv 
*.gl 
*.dl 
*.xcf 
*.xwd 
*.yuv 
*.cgm 
*.emf 
*.ogv 
*.ogx 
# audio formats (extensions from dircolors defaults)
*.aac 
*.au 
*.flac 
*.m4a 
*.mid 
*.midi 
*.mka 
*.mp3 
*.mpc 
*.ogg 
*.ra 
*.wav 
*.oga 
*.opus 
*.spx 
*.xspf 
# other formats
*.pdf 

View file

@ -1,5 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = [ pkgs.live-buds-cli ];
}

View file

@ -1,35 +0,0 @@
{ pkgs, ... }:
let
update-script = pkgs.writeShellApplication {
name = "fetch-nix-index-database";
runtimeInputs = with pkgs; [ wget coreutils ];
text = ''
filename="index-x86_64-linux"
mkdir -p ~/.cache/nix-index
cd ~/.cache/nix-index
wget -N "https://github.com/Mic92/nix-index-database/releases/latest/download/$filename"
ln -f "$filename" files
'';
};
in
{
programs.nix-index.enable = true;
systemd.user.services.nix-index-database-sync = {
Unit = { Description = "fetch mic92/nix-index-database"; };
Service = {
Type = "oneshot";
ExecStart = "${update-script}/bin/fetch-nix-index-database";
Restart = "on-failure";
RestartSec = "5m";
};
};
systemd.user.timers.nix-index-database-sync = {
Unit = { Description = "Automatic github:mic92/nix-index-database fetching"; };
Timer = {
OnBootSec = "10m";
OnUnitActiveSec = "24h";
};
Install = { WantedBy = [ "timers.target" ]; };
};
}

View file

@ -1,102 +0,0 @@
{ pkgs, lib, ... }:
{
programs.starship = {
enable = true;
settings = {
format =
let
git = "$git_branch$git_commit$git_state$git_status";
cloud = "$aws$gcloud$openstack";
in
''
($nix_shell)$directory(${git})(- ${cloud})$jobs$character
'';
fill = {
symbol = " ";
disabled = false;
};
# Core
username = {
format = "[$user]($style)";
show_always = true;
};
hostname = {
format = "[@$hostname]($style) ";
ssh_only = false;
style = "bold green";
};
shlvl = {
format = "[$shlvl]($style) ";
style = "bold cyan";
threshold = 2;
repeat = true;
disabled = false;
};
cmd_duration = {
format = "took [$duration]($style) ";
};
directory = {
format = "[$path]($style)( [$read_only]($read_only_style)) ";
};
nix_shell = {
format = "[($name \\(develop\\) <- )$symbol]($style) ";
impure_msg = "";
symbol = " ";
style = "bold red";
};
character = {
error_symbol = "[](bold red)";
success_symbol = "[](bold green)";
vimcmd_symbol = "[](bold yellow)";
vimcmd_visual_symbol = "[](bold cyan)";
vimcmd_replace_symbol = "[](bold purple)";
vimcmd_replace_one_symbol = "[](bold purple)";
};
time = {
format = "\\\[[$time]($style)\\\]";
disabled = false;
};
# Cloud
gcloud = {
format = "on [$symbol$active(/$project)(\\($region\\))]($style)";
};
aws = {
format = "on [$symbol$profile(\\($region\\))]($style)";
};
# Icon changes only \/
aws.symbol = " ";
conda.symbol = " ";
dart.symbol = " ";
directory.read_only = " ";
docker_context.symbol = " ";
elixir.symbol = " ";
elm.symbol = " ";
gcloud.symbol = " ";
git_branch.symbol = " ";
golang.symbol = " ";
hg_branch.symbol = " ";
java.symbol = " ";
julia.symbol = " ";
memory_usage.symbol = "󰍛 ";
nim.symbol = "󰆥 ";
nodejs.symbol = " ";
package.symbol = "󰏗 ";
perl.symbol = " ";
php.symbol = " ";
python.symbol = " ";
ruby.symbol = " ";
rust.symbol = " ";
scala.symbol = " ";
shlvl.symbol = "";
swift.symbol = "󰛥 ";
terraform.symbol = "󱁢";
};
};
}

View file

@ -1,7 +0,0 @@
{ pkgs, config, ... }:
{
programs.tmux = {
enable = true;
extraConfig = "set -g status-position top";
};
}

View file

@ -1,31 +0,0 @@
{ config, ... }:
let
inherit (config) colorscheme;
inherit (colorscheme) colors;
in
{
programs.zellij = {
enable = true;
settings = {
theme = "${colorscheme.slug}";
default_layout = "compact";
pane_frames = false;
themes = {
"${colorscheme.slug}" = {
fg = "#${colors.base05}";
bg = "#${colors.base00}";
black = "#${colors.base00}";
red = "#${colors.base08}";
green = "#${colors.base0B}";
yellow = "#${colors.base0A}";
blue = "#${colors.base0D}";
magenta = "#${colors.base0E}";
cyan = "#${colors.base0C}";
white = "#${colors.base05}";
orange = "#${colors.base09}";
};
};
};
};
}

View file

@ -1,6 +0,0 @@
{
imports = [
./cli
./editors
];
}

View file

@ -1,6 +0,0 @@
{
imports = [
./nvim.nix
./helix
];
}

View file

@ -1,42 +0,0 @@
{ config, pkgs, ... }:
let
inherit (config) colorscheme;
in
{
home.sessionVariables.COLORTERM = "truecolor";
home.sessionVariables.EDITOR = "hx";
home.sessionVariables.VISUAL = "hx";
home.packages = with pkgs; [
marksman
nil
];
programs.helix = {
enable = true;
settings = {
theme = colorscheme.slug;
editor = {
color-modes = true;
middle-click-paste = false;
line-number = "relative";
indent-guides.render = true;
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
statusline = {
left = [ "mode" "spinner" ];
center = [ "file-name" ];
right = [ "diagnostics" "selections" "position" "file-encoding" "file-line-ending" "file-type" ];
};
lsp = {
display-messages = true;
};
};
};
themes = import ./theme.nix { inherit colorscheme; };
};
}

View file

@ -1,9 +0,0 @@
{ pkgs, ... }:
{
# Neovim
programs.neovim.enable = true;
programs.neovim.viAlias = true;
programs.neovim.vimAlias = true;
}

View file

@ -1,41 +0,0 @@
{ config, ... }: let
browser = ["firefox.desktop"];
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.desktop"];
"image/*" = ["imv.desktop"];
"application/json" = browser;
"application/pdf" = ["org.pwmt.zathura.desktop.desktop"];
};
in {
xdg = {
portal.enable = true;
cacheHome = config.home.homeDirectory + "/.local/cache";
mimeApps = {
enable = true;
defaultApplications = associations;
};
userDirs = {
enable = true;
createDirectories = true;
extraConfig = {
XDG_SCREENSHOT_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
};
};
};
}

View file

@ -1,13 +0,0 @@
{
imports = [
./qt.nix
./gtk.nix
./imv.nix
./fonts.nix
./playerctl.nix
./pavucontrol.nix
./music.nix
./yt-dlp.nix
./playerctl.nix
];
}

View file

@ -1,18 +0,0 @@
{ pkgs, ... }: {
fontProfiles = {
enable = true;
monospace = {
family = "JetBrainsMono Nerd Font";
package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; };
};
regular = {
family = "Fira Sans";
package = pkgs.fira;
};
};
home.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
];
}

View file

@ -1,33 +0,0 @@
{ config, pkgs, inputs, ... }:
let
inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) gtkThemeFromScheme;
in
rec {
gtk = {
enable = true;
font = {
name = config.fontProfiles.regular.family;
size = 12;
};
theme = {
name = "${config.colorscheme.slug}";
package = gtkThemeFromScheme { scheme = config.colorscheme; };
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
};
services.xsettingsd = {
enable = true;
settings = {
"Net/ThemeName" = "${gtk.theme.name}";
"Net/IconThemeName" = "${gtk.iconTheme.name}";
};
};
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
}

View file

@ -1,8 +0,0 @@
{ config, pkgs, ... }:
{
home = {
packages = with pkgs; [
imv
];
};
}

View file

@ -1,10 +0,0 @@
{ config, pkgs, ... }:
let
inherit (config.colorscheme) colors;
in
{
home.packages = with pkgs; [
alsa-utils
spotify-player
];
}

View file

@ -1,3 +0,0 @@
{ pkgs, ... }: {
home.packages = with pkgs; [ pavucontrol ];
}

View file

@ -1,7 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [ playerctl ];
services.playerctld = {
enable = true;
};
}

View file

@ -1,7 +0,0 @@
{ pkgs, config, ... }:
{
qt = {
enable = true;
platformTheme = "gtk";
};
}

View file

@ -1,17 +0,0 @@
{ config, pkgs, ... }:
{
programs = {
yt-dlp = {
enable = true;
};
};
home.file = {
".config/yt-dlp/config".text = ''
--ignore-errors
-o ~/Videos/%(title)s.%(ext)s
# Prefer 1080p or lower resolutions
-f bestvideo[ext=mp4][width<2000][height<=1200]+bestaudio[ext=m4a]/bestvideo[ext=webm][width<2000][height<=1200]+bestaudio[ext=webm]/bestvideo[width<2000][height<=1200]+bestaudio/best[width<2000][height<=1200]/best
'';
};
}

View file

@ -1,8 +0,0 @@
{ pkgs, ... }: {
home.pointerCursor = {
gtk.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 22;
};
}

View file

@ -1,47 +0,0 @@
{ pkgs, ... }:
{
imports = [
./mako.nix
./kitty.nix
./firefox.nix
./zathura.nix
./gammastep.nix
./cursor.nix
./swaylock.nix
./eww
./foot.nix
];
xdg.mimeApps.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
home.packages = with pkgs; [
grim
libnotify
linux-firmware
pkgs.qt6.qtwayland
mpv
gtk3
mimeo
waypipe
pulseaudio
pamixer
slurp
wf-recorder
wl-clipboard
wl-mirror
xdg-utils
ydotool
swaybg
];
home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1;
QT_QPA_PLATFORM = "wayland";
LIBSEAT_BACKEND = "logind";
};
}

View file

@ -1,18 +0,0 @@
;;Variables
;;Clock
(defpoll TIME :interval "30s" "date +'%I:%M %p'")
;;Battery
(defpoll BATTERY-PERCENTAGE :interval "30s" "./scripts/bat.sh --percentage")
(defpoll BATTERY-COLOR :interval "5s" "./scripts/batterytest.sh --color")
(defpoll BATTERY-STATUS :interval "5s" "./scripts/bat.sh --status")
(defpoll BATTERY-ICON :interval "5s" "./scripts/battery.sh --icons")
;;Earbuds
(defpoll EARBUDS_CONNECTION :interval "5s" "./scripts/earbuds.sh --connection")
(defpoll EARBUDS_RIGHT :interval "5s" "./scripts/earbuds.sh --left")
(defpoll EARBUDS_LEFT :interval "5s" "./scripts/earbuds.sh --right")
;;Workspaces

View file

@ -1,42 +0,0 @@
;;Widgets
(deflisten workspace "./scripts/workspaces.sh")
;;Clock -------------------------------------------------------------------------------------------
(defwidget widget-clock []
(label
:text "${TIME}"
:class "text"
:halign "start"
:valign "center"
)
)
(defwidget widget-battery []
(label
:text "${BATTERY-PERCENTAGE}${BATTERY-ICON}"
:class "${BATTERY-COLOR}"
:orientation "horizontal"
:valign "center"
:halign "end"
)
)
;;Earbuds Widget
(defwidget widget-earbuds []
(label
:text "${EARBUDS_LEFT}${EARBUDS_CONNECTION}${EARBUDS_RIGHT}"
:class "${BATTERY-COLOR}"
:orientation "horizontal"
:valign "center"
:halign "center"
)
)
(defwidget bar-box []
(centerbox
(widget-clock)
(widget-earbuds)
(widget-battery)
)
)

View file

@ -1,63 +0,0 @@
;;Clock -----------------------------------------
(defwindow window-clock
:monitor 0
:geometry (geometry
:anchor "top left"
:x "0.8%"
:y "-2.6%"
:width "0%"
:height "0%"
)
:stacking "fg"
:exclusive "true"
:focusable "false"
(widget-clock)
)
;;Battery ---------------------------------------
(defwindow window-battery
:monitor 0
:geometry (geometry
:anchor "top right"
:x "0%"
:y "-2.6%"
:width "0%"
:height "0%"
)
:stacking "fg"
:exclusive "true"
:focusable "false"
(widget-battery)
)
;;Earbuds window
(defwindow window-earbuds
:monitor 0
:geometry (geometry
:anchor "top center"
:x "0%"
:y "-2.6%"
:width "0%"
:height "0%"
)
:stacking "fg"
:exclusive "true"
:focusable "false"
(widget-earbuds)
)
;;Bar -------------------------------------------
(defwindow bar
:monitor 0
:geometry (geometry
:anchor "top center"
:x "0"
:y "0"
:width "99%"
:height "22px"
)
:stacking "fg"
:exclusive "true"
:focusable "false"
:namespace "bar"
(bar-box)
)

View file

@ -1,12 +0,0 @@
* {
font-family: "JetBrains Mono Nerd Font";
}
text {
font-family: "JetBrains Mono Nerd Font";
}
.bar {
font-size: 17px;
}

View file

@ -1,4 +0,0 @@
;;Imports
(include "eww-variables.yuck")
(include "eww-windows.yuck")
(include "eww-widgets.yuck")

View file

@ -1,31 +0,0 @@
#!/bin/sh
battery_level=$(cat /sys/class/power_supply/BAT0/capacity)
battery_status=$(cat /sys/class/power_supply/BAT0/status)
case "$1" in
"--percentage")
echo "$battery_level"
;;
"--color")
if [ $battery_level -le 20 ]; then
echo "progbarlow"
elif [ $battery_level -le 50 ]; then
echo "progbarmid"
else
echo "progbarhigh"
fi
;;
"--status")
if [ "$battery_status" = "Charging" ]; then
echo "Charging"
elif [ "$battery_status" = "Discharging" ]; then
echo "Discharging"
else
echo "we full"
fi
;;
*)
echo "Invalid argument try --color, --percentage"
;;
esac

View file

@ -1,81 +0,0 @@
#!/bin/sh
get_battery_level() {
echo $(acpi -b | sed -e "s/[A-Za-z:,-.%]\+//g" | awk 'NR == 1 {print $2}')
}
get_adapter_status() {
echo "$(acpi -b | awk 'NR == 1 {print $3}' | sed -e 's/,//g')"
}
get_battery_icons() {
battery_level=$(get_battery_level)
battery_level_trunc=$(($battery_level / 10 * 10))
if [ "$(get_adapter_status)" == "Charging" ]; then
# Charging
case "$battery_level_trunc" in
"100" ) echo " 󰂅 "
return ;;
"90" ) echo " 󰂋 "
return ;;
"80" ) echo " 󰂊 "
return ;;
"70" ) echo " 󰢞 "
return ;;
"60" ) echo " 󰂉 "
return ;;
"50" ) echo " 󰢝 "
return ;;
"40" ) echo " 󰂈 "
return ;;
"30" ) echo " 󰂇 "
return ;;
"20" ) echo " 󰂆 "
return ;;
"10" ) echo " 󰢜 "
return ;;
"0" ) echo " 󰢜 "
return ;;
esac
else
# Discharging
case "$battery_level_trunc" in
"100" ) echo " 󰁹 "
return ;;
"90" ) echo " 󰂂 "
return ;;
"80" ) echo " 󰂁 "
return ;;
"70" ) echo " 󰂀 "
return ;;
"60" ) echo " 󰁿 "
return ;;
"50" ) echo " 󰁾 "
return ;;
"40" ) echo " 󰁽 "
return ;;
"30" ) echo " 󰁼 "
return ;;
"20" ) echo " 󰁻 "
return ;;
"10" ) echo " 󰁺 "
return ;;
"0" ) echo " 󰁺 "
return ;;
esac
fi
}
# Main
if [ "$1" == "--level" ]; then
get_battery_level
elif [ "$1" == "--icons" ]; then
get_battery_icons
fi

View file

@ -1,30 +0,0 @@
#!/bin/sh
BAT_PATH="/sys/class/power_supply/BAT0"
bat_lvl=$(cat "$BAT_PATH/capacity")
bat_stat=$(cat "$BAT_PATH/status")
case "$1" in
"--level")
printf "%s\n" "$bat_lvl"
;;
"--status")
printf "%s\n" "$bat_stat"
;;
"--color")
if [ "$bat_stat" = "Charging" -o "$bat_stat" = "Not charging" ]; then
printf "batup\n"
elif [ "$bat_stat" = "Discharging" ] && [ "$bat_lvl" -le 25 ]; then
printf "batdownred\n"
elif [ "$bat_stat" = "Discharging" ] && [ "$bat_lvl" -le 50 ]; then
printf "batdown25\n"
elif [ "$bat_stat" = "Discharging" ] && [ "$bat_lvl" -gt 50 ]; then
printf "batdown50\n"
else
printf "batunknown\n"
fi
;;
*)
printf "Invalid option\n"
;;
esac

View file

@ -1,35 +0,0 @@
#!/usr/bin/env bash
BUDS_STATUS=$(earbuds status -o json -q)
# Check if the earbuds are connected
IS_CONNECTED=$(echo $BUDS_STATUS | jq -r '.status // empty')
if [ "$IS_CONNECTED" == "error" ] || [ -z "$IS_CONNECTED" ]; then
if [ "$1" = "--connection" ]; then
echo " 󱡐 "
fi
exit 0
fi
LEFT=$(echo $BUDS_STATUS | jq -r '.payload.batt_left // empty')
RIGHT=$(echo $BUDS_STATUS | jq -r '.payload.batt_right // empty')
if [ "$(echo $BUDS_STATUS | jq -r '.payload.placement_left // empty')" == "3" ] && [ -n "$LEFT" ]; then
LEFT="󱐋$LEFT"
fi
if [ "$(echo $BUDS_STATUS | jq -r '.payload.placement_right // empty')" == "3" ] && [ -n "$RIGHT" ]; then
RIGHT="󱐋$RIGHT"
fi
case "$1" in
"--left")
[ -n "$LEFT" ] && echo -n "$LEFT"
;;
"--right")
[ -n "$RIGHT" ] && echo -n "$RIGHT"
;;
"--connection")
echo -n " 󱡏 "
;;
esac

View file

@ -1,8 +0,0 @@
{ pkgs, ... }:
{
programs.eww = {
enable = true;
package = pkgs.eww-wayland;
configDir = ./config;
};
}

View file

@ -1,312 +0,0 @@
{ pkgs, lib, inputs, ... }:
let
addons = inputs.firefox-addons.packages.${pkgs.system};
in
{
nixpkgs.config.allowUnfree = true;
programs.browserpass.enable = true;
programs.firefox = {
enable = true;
profiles.ooks = {
bookmarks = { };
extensions = with addons; [
ublock-origin
browserpass
stylus
surfingkeys
];
settings = {
#Basic Settings
"browser.disableResetPrompt" = true;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"browser.cache.disk.enable" = false;
"browser.cache.memory.enable" = true;
"browser.cache.memory.capacity" = 524288;
"browser.sessionstore.interval" = 15000000;
"extensions.pocket.enabled" = false;
"reader.parse-on-load.enabled" = false;
"accessibility.force_disabled" = 1;
"browser.helperApps.deleteTempFileOnExit" = true;
"browser.uitour.enabled" = false;
#Startup
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.default.sites" = "";
"browser.aboutConfig.showWarning" = false;
#Disable recommendations
"extensions.getAddons.showPane" = false;
"extensions.htmlaboutaddons.recommendations.enabled" = false;
"browser.discovery.enabled" = false;
#Telemetry
"datareporting.policy.dataSubmissionEnabled" = false;
"datareporting.healthreport.uploadEnabled" = false;
"toolkit.telemetry.unified" = false;
"toolkit.telemetry.enabled" = false;
"toolkit.telemetry.server" = "data:,";
"toolkit.telemetry.archive.enabled" = false;
"toolkit.telemetry.newProfilePing.enabled" = false;
"toolkit.telemetry.shutdownPingSender.enabled" = false;
"toolkit.telemetry.updatePing.enabled" = false;
"toolkit.telemetry.bhrPing.enabled" = false;
"toolkit.telemetry.firstShutdownPing.enabled" = false;
"toolkit.telemetry.coverage.opt-out" = true;
"toolkit.coverage.opt-out" = true;
"toolkit.coverage.endpoint.base" = "";
"browser.ping-centre.telemetry" = false;
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
"browser.newtabpage.activity-stream.telemetry" = false;
"toolkit.telemetry.reportingpolicy.firstRun" = false;
"toolkit.telemetry.shutdownPingSender.enabledFirstsession" = false;
"browser.vpn_promo.enabled" = false;
"app.shield.optoutstudies.enabled" = false;
"app.normandy.enabled" = false;
"app.normandy.api_url" = "";
#Crash Reports
"breakpad.reportURL" = "";
"browser.tabs.crashReporting.sendReport" = false;
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
#Other
"captivedetect.canonicalURL" = "";
"network.captive-portal-service.enabled" = false;
"network.connectivity-service.enabled" = false;
#Geolocation
"geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%";
"geo.provider.use_gpsd" = false;
"geo.provider.use_geoclue" = false;
#Calculator
"browser.urlbar.suggest.calculator" = true;
};
userChrome =
''
/* config */
* {
--animation-speed: 0.2s;
--button-corner-rounding: 30px;
--urlbar-container-height: 40px !important;
--urlbar-min-height: 30px !important;
--urlbar-height: 30px !important;
--urlbar-toolbar-height: 38px !important;
--moz-hidden-unscrollable: scroll !important;
--toolbarbutton-border-radius: 3px !important;
--tabs-border-color: transparent;
}
:root {
--window: -moz-Dialog !important;
--secondary: color-mix(in srgb, currentColor 5%, -moz-Dialog) !important;
--uc-border-radius: 0px;
--uc-status-panel-spacing: 0px;
--uc-page-action-margin: 7px;
}
/* animation and effect */
#nav-bar:not([customizing]) {
visibility: visible;
margin-top: -40px;
transition-delay: 0.1s;
filter: alpha(opacity=0);
opacity: 0;
transition: visibility, ease 0.1s, margin-top, ease 0.1s, opacity, ease 0.1s,
rotate, ease 0.1s !important;
}
#nav-bar:hover,
#nav-bar:focus-within,
#urlbar[focused='true'],
#identity-box[open='true'],
#titlebar:hover + #nav-bar:not([customizing]),
#toolbar-menubar:not([inactive='true']) ~ #nav-bar:not([customizing]) {
visibility: visible;
margin-top: 0px;
filter: alpha(opacity=100);
opacity: 100;
margin-bottom: -0.2px;
}
#PersonalToolbar {
margin-top: 0px;
}
#nav-bar .toolbarbutton-1[open='true'] {
visibility: visible;
opacity: 100;
}
tab:not(:active) .tab-background {
transition: background-color var(--animation-speed) !important;
}
:root:not([customizing]) :hover > .tabbrowser-tab:not(:hover) {
transition: blur, ease 0.1s !important;
}
:root:not([customizing]) :not(:hover) > .tabbrowser-tab {
transition: blur, ease 0.1s !important;
}
#tabbrowser-tabs .tab-label-container[customizing] {
color: transparent;
transition: ease 0.1s;
transition-delay: 0.2s;
}
.tabbrowser-tab:not([pinned]) .tab-icon-image ,.bookmark-item .toolbarbutton-icon{opacity: 0!important; transition: .15s !important; width: 0!important; padding-left: 16px!important}
.tabbrowser-tab:not([pinned]):hover .tab-icon-image,.bookmark-item:hover .toolbarbutton-icon{opacity: 100!important; transition: .15s !important; display: inline-block!important; width: 16px!important; padding-left: 0!important}
.tabbrowser-tab:not([hover]) .tab-icon-image,.bookmark-item:not([hover]) .toolbarbutton-icon{padding-left: 0!important}
/* Removes annoying buttons and spaces */
#firefox-view-button, .titlebar-spacer[type="pre-tabs"], .titlebar-spacer[type="post-tabs"]{display: none !important}
#tabbrowser-tabs{border-inline-start-width: 0!important}
/* Makes some buttons nicer */
#PanelUI-menu-button, #unified-extensions-button, #reload-button, #stop-button {padding: 2px !important}
#reload-button, #stop-button{margin: 1px !important;}
/* Tabs colors */
#tabbrowser-tabs:not([movingtab])
> #tabbrowser-arrowscrollbox
> .tabbrowser-tab
> .tab-stack
> .tab-background[multiselected='true'],
#tabbrowser-tabs:not([movingtab])
> #tabbrowser-arrowscrollbox
> .tabbrowser-tab
> .tab-stack
> .tab-background[selected='true'] {
background-image: none !important;
background-color: var(--toolbar-bgcolor) !important;
}
/* Inactive tabs color */
#navigator-toolbox {
background-color: var(--window) !important;
}
/* X-button */
:root {
--show-tab-close-button: none;
--show-tab-close-button-hover: -moz-inline-block;
}
.tabbrowser-tab:not([pinned]) .tab-close-button { display: var(--show-tab-close-button) !important; }
.tabbrowser-tab:not([pinned]):hover .tab-close-button { display: var(--show-tab-close-button-hover) !important }
/* Window colors */
:root {
--lwt-sidebar-background-color: var(--window) !important;
--lwt-toolbar-field-focus: var(--secondary) !important;
}
/* tabbar */
/* Hide the secondary Tab Label
* e.g. playing indicator (the text, not the icon) */
.tab-secondary-label { display: none !important; }
#nav-bar:not([tabs-hidden='true']) {
box-shadow: none;
}
:root {
--toolbarbutton-border-radius: 0 !important;
--tab-border-radius: 0 !important;
--tab-block-margin: 0 !important;
}
.tab-background {
border-right: 0px solid rgba(0, 0, 0, 0) !important;
margin-left: -4px !important;
}
.tabbrowser-tab:is([visuallyselected='true'], [multiselected])
> .tab-stack
> .tab-background {
box-shadow: none !important;
}
.tabbrowser-tab[last-visible-tab='true'] {
padding-inline-end: 0 !important;
}
#tabs-newtab-button {
padding-left: 0 !important;
}
/* remove tab shadow */
.tabbrowser-tab
>.tab-stack
> .tab-background { box-shadow: none !important; }
/* multi tab selection */
#tabbrowser-tabs:not([noshadowfortests]) .tabbrowser-tab:is([multiselected])
> .tab-stack
> .tab-background:-moz-lwtheme { outline-color: var(--toolbarseparator-color) !important; }
/* Hides the list-all-tabs button*/
#alltabs-button { display: var(--uc-show-all-tabs-button) !important; }
/* remove gap after pinned tabs */
#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])
> #tabbrowser-arrowscrollbox
> .tabbrowser-tab:nth-child(1 of :not([pinned], [hidden])) { margin-inline-start: 0 !important; }
/* Removes annoying border */
#navigator-toolbox{border:none !important;}
/* Removes the annoying rainbow thing from the hamburger */
#appMenu-fxa-separator{border-image:none !important;}
'';
userContent = ''
@-moz-document url-prefix(about:){
/* Removes the scrollbar on some places */
body,html{overflow-y: auto}
/* Devtools */
@-moz-document url-prefix(about:devtools){
#toolbox-container{margin-top: 10px !important}
.devtools-tabbar{background: transparent !important}
.devtools-tab-line{border-radius: 0 0 5px 5px}
.customize-animate-enter-done,.customize-menu,.top-site-outer:hover,button{background-color: transparent!important}}
/* Newtab */
@-moz-document url("about:home"), url("about:newtab"){
.search-wrapper .search-handoff-button .fake-caret {top: 13px !important; inset-inline-start: 48px !important}
.search-wrapper .logo-and-wordmark{opacity: 0.9 !important; order: 1 !important; margin-bottom: 0 !important; flex: 1 !important; flex-basis: 20% !important}
.search-wrapper .search-handoff-button .fake-caret{top: 13px !important; inset-inline-start: 48px !important}
.search-wrapper .logo-and-wordmark{opacity: 0.9 !important; order: 1 !important; margin-bottom: 0 !important; flex: 1 !important; flex-basis: 20% !important}
.outer-wrapper .search-wrapper{padding: 0px !important; display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; justify-content: center !important; align-items: center !important; align-content: space-around !important; gap: 20px 10px !important}
.search-wrapper .logo-and-wordmark .logo{background-size: 60px !important; height: 60px !important; width: 60px !important}
.search-wrapper .search-inner-wrapper{min-height: 42px !important; order: 2 !important; flex: 3 !important; flex-basis: 60% !important; top: 4px !important}
.search-wrapper .search-inner-wrapper{min-height: 42px !important; order: 2 !important; flex: 3 !important; flex-basis: 60% !important; top: 4px !important}
.outer-wrapper.ds-outer-wrapper-breakpoint-override.only-search.visible-logo{display: flex !important; padding-top: 0px !important;vertical-align: middle}
.customize-menu{border-radius: 10px 0 0 10px !important}
#root > div{align-items: center; display: flex}}}
'';
};
};
home = {
sessionVariables = {
# https://github.com/NixOS/nixpkgs/issues/238025
TZ = "/etc/localtime";
BROWSER = "firefox";
};
};
xdg.mimeApps.defaultApplications = {
"text/html" = [ "firefox.desktop" ];
"text/xml" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
};
}

View file

@ -1,58 +0,0 @@
{ config, pkgs, ... }:
let
inherit (config.colorscheme) colors;
in
{
home.sessionVariables = { TERMINAL = "foot"; };
programs.foot = {
enable = true;
server.enable = true;
settings = {
main = {
font = "${config.fontProfiles.monospace.family}:pixelsize=18:antialias=true";
font-bold = "${config.fontProfiles.monospace.family}:style=Bold:pixelsize=18:antialias=true";
font-italic = "${config.fontProfiles.monospace.family}:style=Italic:pixelsize=18:antialias=true";
font-bold-italic = "${config.fontProfiles.monospace.family}:style=Bold Italic:pixelsize=18:antialias=true";
dpi-aware = "yes";
letter-spacing = "-1px";
bold-text-in-bright = "palette-based";
resize-delay-ms = "80";
pad = "9x9 center";
};
cursor = {
style = "beam";
blink = "yes";
};
colors = {
alpha = 1.0;
foreground = "${colors.base05}";
background = "${colors.base00}";
regular0 = "${colors.base00}"; # black
regular1 = "${colors.base08}"; # red
regular2 = "${colors.base0B}"; # green
regular3 = "${colors.base0A}"; # yellow
regular4 = "${colors.base0D}"; # blue
regular5 = "${colors.base0E}"; # magenta
regular6 = "${colors.base0C}"; # cyan
regular7 = "${colors.base05}"; # white
bright0 = "${colors.base03}"; # bright black
bright1 = "${colors.base08}"; # bright red
bright2 = "${colors.base0B}"; # bright green
bright3 = "${colors.base0A}"; # bright yellow
bright4 = "${colors.base0D}"; # bright blue
bright5 = "${colors.base0E}"; # bright magenta
bright6 = "${colors.base0C}"; # bright cyan
bright7 = "${colors.base07}"; # bright white
"16" = "${colors.base09}";
"17" = "${colors.base0F}";
"18" = "${colors.base01}";
"19" = "${colors.base02}";
"20" = "${colors.base04}";
"21" = "${colors.base06}";
};
};
};
}

View file

@ -1,67 +0,0 @@
{ config, pkgs, ... }:
let
inherit (config.colorscheme) colors;
kitty-xterm = pkgs.writeShellScriptBin "xterm" ''
${config.programs.kitty.package}/bin/kitty -1 "$@"
'';
in
{
home = {
packages = [ kitty-xterm ];
#sessionVariables = {
#TERMINAL = "kitty -1";
#};
};
programs.kitty = {
enable = true;
font = {
name = config.fontProfiles.monospace.family;
size = 12;
};
settings = {
shell_integration = "no-rc";
scrollback_lines = 4000;
scrollback_pager_history_size = 2048;
window_padding_width = 1;
foreground = "#${colors.base05}";
background = "#${colors.base00}";
background_opacity = "1.0";
selection_background = "#${colors.base05}";
selection_foreground = "#${colors.base00}";
url_color = "#${colors.base04}";
cursor = "#${colors.base05}";
active_border_color = "#${colors.base03}";
inactive_border_color = "#${colors.base01}";
active_tab_background = "#${colors.base00}";
active_tab_foreground = "#${colors.base05}";
inactive_tab_background = "#${colors.base01}";
inactive_tab_foreground = "#${colors.base04}";
tab_bar_background = "#${colors.base01}";
color0 = "#${colors.base00}";
color1 = "#${colors.base08}";
color2 = "#${colors.base0B}";
color3 = "#${colors.base0A}";
color4 = "#${colors.base0D}";
color5 = "#${colors.base0E}";
color6 = "#${colors.base0C}";
color7 = "#${colors.base05}";
color8 = "#${colors.base03}";
color9 = "#${colors.base08}";
color10 = "#${colors.base0B}";
color11 = "#${colors.base0A}";
color12 = "#${colors.base0D}";
color13 = "#${colors.base0E}";
color14 = "#${colors.base0C}";
color15 = "#${colors.base07}";
color16 = "#${colors.base09}";
color17 = "#${colors.base0F}";
color18 = "#${colors.base01}";
color19 = "#${colors.base02}";
color20 = "#${colors.base04}";
color21 = "#${colors.base06}";
};
};
}

View file

@ -1,33 +0,0 @@
{ config, ... }:
let inherit (config.colorscheme) colors kind;
in {
services.mako = {
enable = true;
iconPath =
if kind == "dark" then
"${config.gtk.iconTheme.package}/share/icons/Papirus-Dark"
else
"${config.gtk.iconTheme.package}/share/icons/Papirus-Light";
font = "${config.fontProfiles.regular.family} 12";
padding = "10,10";
anchor = "top-right";
width = 300;
height = 100;
borderSize = 2;
defaultTimeout = 3000;
backgroundColor = "#${colors.base00}dd";
borderColor = "#${colors.base05}dd";
textColor = "#${colors.base05}dd";
extraConfig = ''
[app-name="system-notify"]
padding=3,3
width=100
height=100
[app-name="bat-notify"]
padding=3,3
width=100
height=100
anchor=top-center
'';
};
}

View file

@ -1,31 +0,0 @@
{ config, pkgs, ... }:
let inherit (config.colorscheme) colors;
in
{
programs.swaylock = {
enable = true;
settings = {
font = config.fontProfiles.monospace.family;
color = "#${colors.base01}";
ring-color = "#${colors.base02}";
inside-wrong-color = "#${colors.base08}";
ring-wrong-color = "#${colors.base08}";
key-hl-color = "#${colors.base0B}";
bs-hl-color = "#${colors.base08}";
ring-ver-color = "#${colors.base09}";
inside-ver-color = "#${colors.base09}";
inside-color = "#${colors.base01}";
text-color = "#${colors.base07}";
text-clear-color = "#${colors.base01}";
text-ver-color = "#${colors.base01}";
text-wrong-color = "#${colors.base01}";
text-caps-lock-color = "#${colors.base07}";
inside-clear-color = "#${colors.base0C}";
ring-clear-color = "#${colors.base0C}";
inside-caps-lock-color = "#${colors.base09}";
ring-caps-lock-color = "#${colors.base02}";
separator-color = "#${colors.base02}";
};
};
}

View file

@ -1,32 +0,0 @@
{ config, ... }:
let inherit (config.colorscheme) colors;
in {
programs.zathura = {
enable = true;
options = {
selection-clipboard = "clipboard";
font = "${config.fontProfiles.regular.family} 12";
recolor = true;
default-bg = "#${colors.base00}";
default-fg = "#${colors.base01}";
statusbar-bg = "#${colors.base02}";
statusbar-fg = "#${colors.base04}";
inputbar-bg = "#${colors.base00}";
inputbar-fg = "#${colors.base07}";
notification-bg = "#${colors.base00}";
notification-fg = "#${colors.base07}";
notification-error-bg = "#${colors.base00}";
notification-error-fg = "#${colors.base08}";
notification-warning-bg = "#${colors.base00}";
notification-warning-fg = "#${colors.base08}";
highlight-color = "#${colors.base0A}";
highlight-active-color = "#${colors.base0D}";
completion-bg = "#${colors.base01}";
completion-fg = "#${colors.base05}";
completions-highlight-bg = "#${colors.base0D}";
completions-highlight-fg = "#${colors.base07}";
recolor-lightcolor = "#${colors.base00}";
recolor-darkcolor = "#${colors.base06}";
};
};
}

View file

@ -1,123 +0,0 @@
{ lib, config, pkgs, ... }: {
imports = [
../../essentials #import essential wayland specific programs
../../../essentials #import essential programs
#./tty-init.nix
./binds.nix #hyprland keybindings
./environment-variables.nix #hyprland environment variables
];
xdg.portal = {
extraPortals = [ pkgs.inputs.hyprland.xdg-desktop-portal-hyprland ];
configPackages = [ pkgs.inputs.hyprland.hyprland ];
};
home.packages = with pkgs; [
inputs.hyprwm-contrib.grimblast
hyprpicker
];
wayland.windowManager.hyprland = {
enable = true;
package = pkgs.inputs.hyprland.hyprland;
systemd = {
enable = true;
extraCommands = lib.mkBefore [
"systemctl --user stop graphical-session.target"
"systemctl --user start hyprland-session.target"
];
};
settings = {
general = {
gaps_in = 10;
gaps_out = 10;
border_size = 2;
cursor_inactive_timeout = 4;
"col.active_border" = "0xff${config.colorscheme.colors.base05}";
"col.inactive_border" = "0xff${config.colorscheme.colors.base02}";
};
group = {
"col.border_active" = "0xff${config.colorscheme.colors.base0B}";
"col.border_inactive" = "0xff${config.colorscheme.colors.base04}";
};
input = {
kb_layout = "us";
touchpad.disable_while_typing = false;
};
dwindle.split_width_multiplier = 1.35;
misc = {
vfr = "true";
disable_hyprland_logo = "true";
};
decoration = {
active_opacity = 1.0;
inactive_opacity = 1.0;
fullscreen_opacity = 1.0;
rounding = 0;
blur = {
enabled = false;
new_optimizations = true;
ignore_opacity = true;
};
drop_shadow = true;
shadow_range = 12;
shadow_offset = "3 3";
"col.shadow" = "0x44000000";
"col.shadow_inactive" = "0x66000000";
};
animations = {
enabled = true;
bezier = [
"easein,0.11, 0, 0.5, 0"
"easeout,0.5, 1, 0.89, 1"
"easeinback,0.36, 0, 0.66, -0.56"
"easeoutback,0.34, 1.56, 0.64, 1"
];
animation = [
"windowsIn,1,3,easeoutback,slide"
"windowsOut,1,3,easeinback,slide"
"windowsMove,1,3,easeoutback"
"workspaces,1,2,easeoutback,slide"
"fadeIn,1,3,easeout"
"fadeOut,1,3,easein"
"fadeSwitch,1,3,easeout"
"fadeShadow,1,3,easeout"
"fadeDim,1,3,easeout"
"border,1,3,easeout"
];
};
windowrulev2 = [
"float,move 191 15,size 924 396,class:(1Password)"
];
monitor = lib.concatMap (m: let
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
position = "${toString m.x}x${toString m.y}";
basicConfig = "${m.name},${if m.enabled then "${resolution},${position},1" else "disable"}";
in
[ basicConfig ] ++ (if m.transform != 0 then ["${m.name},transform,${toString m.transform}"] else [])
) (config.monitors);
exec = [
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
"${pkgs.swaybg}/bin/swaybg -i ~/.dotfiles/nix/walls/gruvbox/gruvbox-blank.png --mode fill"
];
exec-once =
#let
#eww = "${pkgs.eww-wayland}/bin/eww";
#in
[
"${pkgs._1password-gui}/bin/1password --silent"
# "${eww} daemon & ${eww} open bar & ${eww} open window-clock & ${eww} open window-battery & ${eww} open window-earbuds"
"${pkgs.live-buds-cli}/bin/earbuds -d"
"eww daemon && eww open bar"
"eww open-many window-clock window-battery window-earbuds"
];
};
};
}

View file

@ -1,19 +0,0 @@
{
programs = {
fish.loginShellInit = ''
if test (tty) = "/dev/tty1"
exec Hyprland &> /dev/null
end
'';
zsh.loginExtra = ''
if [ "$(tty)" = "/dev/tty1" ]; then
exec Hyprland &> /dev/null
fi
'';
zsh.profileExtra = ''
if [ "$(tty)" = "/dev/tty1" ]; then
exec Hyprland &> /dev/null
fi
'';
};
}

View file

@ -1,70 +0,0 @@
{ config, pkgs, ... }:
{
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "ooks";
home.homeDirectory = "/home/ooks";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# You can also manage environment variables but you will have to manually
# source
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/ooks/etc/profile.d/hm-session-vars.sh
#
# if you don't want to manage your shell through Home Manager.
home.sessionVariables = {
# EDITOR = "emacs";
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

View file

@ -1,20 +0,0 @@
{ inputs, outputs, ... }:
{
imports = [
./features/wayland/window-manager/hyprland
./base
];
monitors = [{
name = "DSI-1";
width = 720;
height = 1280;
workspace = "1";
primary = true;
transform = 3;
}];
colorscheme = inputs.nix-colors.colorSchemes.gruvbox-dark-soft;
}

View file

@ -1,17 +0,0 @@
{ inputs, outputs, ... }:
{
imports = [
./opt/nvim
./opt/shell
./opt/desktop/hyprland
./standard
];
colorscheme = inputs.nix-colors.colorSchemes.everforest;
home.username = "ooks";
home.homeDirectory = "/home/ooks";
programs.home-manager.enable = true;
}

View file

@ -0,0 +1,83 @@
{ inputs, lib, pkgs, config, outputs, ... }:
let
cfg = config.profiles.base;
inherit (inputs.nix-colors) colorSchemes;
inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) nixWallpaperFromScheme;
in
{
imports = [
inputs.nix-colors.homeManagerModule
../../programs
] ++ (builtins.attrValues outputs.homeManagerModules);
config = lib.mkIf cfg.enable {
nixpkgs = {
overlays = builtins.attrValues outputs.overlays;
config = {
allowUnfree = true;
allowUnfreePredicate = (_: true);
};
};
nix = {
package = lib.mkDefault pkgs.nix;
settings = {
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
warn-dirty = false;
};
};
programs = {
home-manager.enable = true;
git.enable = true;
};
home = {
username = lib.mkDefault "ooks";
homeDirectory = lib.mkDefault "/home/${config.home.username}";
stateVersion = lib.mkDefault "22.05";
sessionPath = [ "$HOME/.local/bin" ];
sessionVariables = {
FLAKE = "$HOME/.dotfiles/nix";
};
};
xdg.portal.enable = true;
programs = {
console = {
editor.helix = {
enable = true;
default = true;
};
prompt.starship.enable = true;
shell = {
fish.enable = true;
bash.enable = true;
};
multiplexer.zellij.enable = true;
utility = {
nixIndex.enable = true;
git.enable = true;
tools.enable = true;
};
};
};
wallpaper =
let
largest = f: xs: builtins.head (builtins.sort (a: b: a > b) (map f xs));
largestWidth = largest (x: x.width) config.monitors;
largestHeight = largest (x: x.height) config.monitors;
in
lib.mkDefault (nixWallpaperFromScheme
{
scheme = config.colorscheme;
width = largestWidth;
height = largestHeight;
logoScale = 4;
});
colorscheme = lib.mkDefault colorSchemes.everforest;
home.file.".colorscheme".text = config.colorscheme.slug;
};
}

View file

33
home/profile/default.nix Normal file
View file

@ -0,0 +1,33 @@
{ lib, config, ... }:
let
profileEnabler = let
reducer = l: r: {"${r}".enable = true;} // l;
in
builtins.foldl' reducer {} config.activeProfiles;
in
{
imports = [
./base
./hyprland
#./creative
];
options = {
activeProfiles = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
};
profiles = {
base = {
enable = lib.mkEnableOption "Enable the base profile";
};
hyprland = {
enable = lib.mkEnableOption "Enable the hyprland profile";
};
};
};
config.profiles = profileEnabler;
}

View file

View file

@ -0,0 +1,31 @@
{ config, lib, ... }:
let
cfg = config.profiles.hyprland;
in
{
imports = [
../../programs
];
config = lib.mkIf cfg.enable {
programs.desktop = {
wayland = {
base.enable = true;
windowManager.hyprland.enable = true;
lockscreen.swaylock.enable = true;
notification.mako.enable = true;
bar.eww.enable = true;
};
browser.firefox = {
enable = true;
default = true;
};
terminal.foot = {
enable = true;
default = true;
};
themeSettings.enable = true;
};
};
}

View file

View file

@ -0,0 +1,11 @@
{
imports = [
./editor # Still need to implement nvim
./fileManager
# ./language
./multiplexer # Still need to implement tmux and screen
./prompt # only Starship is currently implemented
./shell
./utility
];
}

View file

@ -0,0 +1,27 @@
{ lib, ... }:
{
imports = [
./helix
# ./nvim
];
options.programs.console.editor = {
helix = {
enable = lib.mkEnableOption "Enable helix text editor";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set helix as the default text editor in environment variables";
};
};
nvim = {
enable = lib.mkEnableOption "Enable nvim text editor";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set nvim as the default text editor in environment variables";
};
};
};
}

View file

@ -0,0 +1,70 @@
{ inputs, config, pkgs, lib, ... }:
let
cfg = config.programs.console.editor.helix;
inherit (config) colorscheme;
in
{
imports = [
./languages.nix
];
config = {
programs.helix = lib.mkIf cfg.enable {
enable = true;
defaultEditor = lib.mkIf cfg.default true;
package =
inputs.helix.packages.${pkgs.system}.default.overrideAttrs (self: {
makeWrapperArgs = with pkgs;
self.makeWrapperArgs
or []
++ [
"--suffix"
"PATH"
":"
(lib.makeBinPath [
clang-tools
marksman
nil
nodePackages.bash-language-server
nodePackages.vscode-css-languageserver-bin
nodePackages.vscode-langservers-extracted
shellcheck
])
];
});
settings = {
theme = colorscheme.slug;
editor = {
color-modes = true;
middle-click-paste = false;
line-number = "relative";
indent-guides.render = true;
true-color = true;
cursorline = true;
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
statusline = {
left = [ "mode" "spinner" ];
center = [ "file-name" ];
right = [ "diagnostics" "selections" "position" "file-encoding" "file-line-ending" "file-type" ];
};
lsp = {
display-messages = true;
display-inlay-hints = true;
};
keys.normal.space.u = {
f = ":format";
w = ":set whitespace.render all";
W = ":set whitespace.render none";
};
};
};
themes = import ./theme.nix { inherit colorscheme; };
};
};
}

View file

@ -0,0 +1,101 @@
{ pkgs, lib, ... }:
{
programs.helix.languages = {
language = let
deno = lang: {
command = "${pkgs.deno}/bin/deno";
args = ["fmt" "-" "--ext" lang];
};
prettier = lang: {
command = "${pkgs.nodePackages.prettier}/bin/prettier";
args = ["--parser" lang];
};
prettierLangs = map (e: {
name = e;
formatter = prettier e;
});
langs = ["css" "scss" "html"];
in
[
{
name = "bash";
auto-format = true;
formatter = {
command = "${pkgs.shfmt}/bin/shfmt";
args = ["-i" "2"];
};
}
{
name = "clojure";
injection-regex = "(clojure|clj|edn|boot|yuck)";
file-types = ["clj" "cljs" "cljc" "clje" "cljr" "cljx" "edn" "boot" "yuck"];
}
{
name = "javascript";
auto-format = true;
language-servers = ["deno-lsp"];
}
{
name = "json";
formatter = deno "json";
}
{
name = "markdown";
auto-format = true;
formatter = deno "md";
}
]
++ prettierLangs langs;
language-server = {
bash-language-server = {
command = "${pkgs.nodePackages.bash-language-server}/bin/bash-language-server";
args = ["start"];
};
clangd = {
command = "${pkgs.clang-tools}/bin/clangd";
clangd.fallbackFlags = ["-std=c++2b"];
};
deno-lsp = {
command = "${pkgs.deno}/bin/deno";
args = ["lsp"];
environment.NO_COLOR = "1";
config.deno = {
enable = true;
lint = true;
unstable = true;
suggest = {
completeFunctionCalls = false;
imports = {hosts."https://deno.land" = true;};
};
inlayHints = {
enumMemberValues.enabled = true;
functionLikeReturnTypes.enabled = true;
parameterNames.enabled = "all";
parameterTypes.enabled = true;
propertyDeclarationTypes.enabled = true;
variableTypes.enabled = true;
};
};
};
nil = {
command = lib.getExe pkgs.nil;
config.nil.formatting.command = ["${lib.getExe pkgs.alejandra}" "-q"];
};
vscode-css-language-server = {
command = "${pkgs.nodePackages.vscode-css-languageserver-bin}/bin/css-languageserver";
args = ["--stdio"];
config = {
provideFormatter = true;
css.validate.enable = true;
scss.validate.enable = true;
};
};
};
};
}

View file

@ -1,3 +1,4 @@
{ colorscheme }: {
"${colorscheme.slug}" = {
palette = builtins.mapAttrs (name: value: "#${value}") colorscheme.colors; # Add leading '#'

View file

@ -0,0 +1,28 @@
{ lib, ... }:
{
imports = [
./lf #configuration still needs some work
# ./ranger
];
options.programs.console.fileManager = {
lf = {
enable = lib.mkEnableOption "Enable lf file manager";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set lf as the default terminal file manager";
};
};
ranger = {
enable = lib.mkEnableOption "Enable ranger file manager";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set ranger as the default terminal file manager";
};
};
};
}

View file

@ -0,0 +1,65 @@
{ pkgs, lib, config, ... }:
#TODO - mkif wayland for previewer
# - manage previewer dependencies better
# - ripdrag support
# - color parity with eza
let
cfg = config.programs.console.fileManager.lf;
in
{
config = lib.mkIf cfg.enable {
home.sessionVariables.TERMFILEMANAGER = lib.mkIf cfg.default "lf";
xdg.configFile."lf/icons".source = ./icons;
programs.lf = {
enable = true;
settings = {
hidden = true;
ignorecase = true;
drawbox = true;
icons = true;
};
previewer = {
keybinding = "i";
source = "${pkgs.ctpv}/bin/ctpv";
};
commands = {
fzf-lf = ''
''${{
res="$(find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune -o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m)"
if [ -d "$res" ] ; then
cmd="cd"
elif [ -f "$res" ] ; then
cmd="select"
else
exit 0
fi
lf -remote "send $id $cmd \"$res\""
}}
'';
mkdir = ''
''${{
printf "Directory Name: "
read DIR
mkdir $DIR
}}
'';
};
keybindings = {
c = "mkdir";
"<a-f>" = "fzf-lf";
};
extraConfig = ''
&${pkgs.ctpv}/bin/ctpv -s $id
cmd on-quit %${pkgs.ctpv}/bin/ctpv -e $id
set cleaner ${pkgs.ctpv}/bin/ctpvclear
set sixel true
'';
};
home.packages = with pkgs; [ chafa ctpv glow ];
};
}

View file

View file

View file

@ -0,0 +1,14 @@
{ lib, config, ... }:
{
imports = [
./zellij
#./screen
#./tmux
];
options.programs.console.multiplexer = {
zellij = {
enable = lib.mkEnableOption "Enable zellij multiplexer";
};
};
}

View file

@ -0,0 +1,35 @@
{ lib, config, ... }:
let
inherit (config) colorscheme;
inherit (colorscheme) colors;
cfg = config.programs.console.multiplexer.zellij;
in
{
config = lib.mkIf cfg.enable {
programs.zellij = {
enable = true;
settings = {
theme = "${colorscheme.slug}";
default_layout = "compact";
pane_frames = false;
themes = {
"${colorscheme.slug}" = {
fg = "#${colors.base05}";
bg = "#${colors.base00}";
black = "#${colors.base00}";
red = "#${colors.base08}";
green = "#${colors.base0B}";
yellow = "#${colors.base0A}";
blue = "#${colors.base0D}";
magenta = "#${colors.base0E}";
cyan = "#${colors.base0C}";
white = "#${colors.base05}";
orange = "#${colors.base09}";
};
};
};
};
};
}

View file

@ -0,0 +1,12 @@
{ lib, ... }:
{
imports = [
./starship
];
options.programs.console.prompt = {
starship = {
enable = lib.mkEnableOption "Enable starship prompt";
};
};
}

View file

@ -0,0 +1,110 @@
{ config, lib, ... }:
let
cfg = config.programs.console.prompt.starship;
in
{
config = lib.mkIf cfg.enable {
programs.starship = {
enable = true;
settings = {
format =
let
git = "$git_branch$git_commit$git_state$git_status";
cloud = "$aws$gcloud$openstack";
in
''
($nix_shell)$directory(${git})(- ${cloud})$jobs$character
'';
fill = {
symbol = " ";
disabled = false;
};
# Core
username = {
format = "[$user]($style)";
show_always = true;
};
hostname = {
format = "[@$hostname]($style) ";
ssh_only = false;
style = "bold green";
};
shlvl = {
format = "[$shlvl]($style) ";
style = "bold cyan";
threshold = 2;
repeat = true;
disabled = false;
};
cmd_duration = {
format = "took [$duration]($style) ";
};
directory = {
format = "[$path]($style)( [$read_only]($read_only_style)) ";
};
nix_shell = {
format = "[($name \\(develop\\) <- )$symbol]($style) ";
impure_msg = "";
symbol = " ";
style = "bold red";
};
character = {
error_symbol = "[](bold red)";
success_symbol = "[](bold green)";
vimcmd_symbol = "[](bold yellow)";
vimcmd_visual_symbol = "[](bold cyan)";
vimcmd_replace_symbol = "[](bold purple)";
vimcmd_replace_one_symbol = "[](bold purple)";
};
time = {
format = "\\\[[$time]($style)\\\]";
disabled = false;
};
# Cloud
gcloud = {
format = "on [$symbol$active(/$project)(\\($region\\))]($style)";
};
aws = {
format = "on [$symbol$profile(\\($region\\))]($style)";
};
# Icon changes only \/
aws.symbol = " ";
conda.symbol = " ";
dart.symbol = " ";
directory.read_only = " ";
docker_context.symbol = " ";
elixir.symbol = " ";
elm.symbol = " ";
gcloud.symbol = " ";
git_branch.symbol = " ";
golang.symbol = " ";
hg_branch.symbol = " ";
java.symbol = " ";
julia.symbol = " ";
memory_usage.symbol = "󰍛 ";
nim.symbol = "󰆥 ";
nodejs.symbol = " ";
package.symbol = "󰏗 ";
perl.symbol = " ";
php.symbol = " ";
python.symbol = " ";
ruby.symbol = " ";
rust.symbol = " ";
scala.symbol = " ";
shlvl.symbol = "";
swift.symbol = "󰛥 ";
terraform.symbol = "󱁢";
};
};
};
}

View file

@ -0,0 +1,9 @@
{ config, lib, ... }:
let
cfg = config.programs.console.shell.bash;
in
{
config = lib.mkIf cfg.enable {
programs.bash.enable = true;
};
}

View file

@ -0,0 +1,19 @@
{ lib, ... }:
{
imports = [
./fish
./bash
];
options.programs.console.shell = {
fish = {
enable = lib.mkEnableOption "Enable fish configuration";
};
bash = {
enable = lib.mkEnableOption "Enable bash configuration";
};
zsh = {
enable = lib.mkEnableOption "Enable zsh configuration";
};
};
}

View file

@ -0,0 +1,134 @@
{ pkgs, lib, config, ... }:
let
cfg = config.programs.console.shell.fish;
inherit (lib) mkIf;
hasPackage = pname: lib.any (p: p ? pname && p.pname == pname) config.home.packages;
hasEza = hasPackage "eza";
hasNeovim = config.programs.neovim.enable;
hasBat = hasPackage "bat";
hasHelix = hasPackage "helix";
hasKitty = config.programs.kitty.enable;
in
{
config = {
programs.fish = mkIf cfg.enable {
enable = true;
shellAbbrs = rec {
jqless = "jq -C | less -r";
n = "nix";
nd = "nix develop -c $SHELL";
ns = "nix shell";
nsn = "nix shell nixpkgs#";
nb = "nix build";
nbn = "nix build nixpkgs#";
nf = "nix flake";
nr = "nixos-rebuild --flake .";
nrs = "nixos-rebuild --flake . switch";
snr = "sudo nixos-rebuild --flake .";
snrs = "sudo nixos-rebuild --flake . switch";
hm = "home-manager --flake .";
hms = "home-manager --flake . switch";
fe = mkIf hasHelix "cd $FLAKE; hx $FLAKE";
f = "cd $FLAKE";
tree = mkIf hasEza "eza -T --icons --group-directories-first";
ls = mkIf hasEza "eza -a --icons --group-directories-first";
lsd = mkIf hasEza "eza -al --icons --group-directories-first";
lst = mkIf hasEza "eza -T -L 5 --icons --group-directories-first";
lsta = mkIf hasEza "eza -T --icons --group-directories-first";
cat = mkIf hasBat "bat";
vim = mkIf hasNeovim "nvim";
};
functions = {
fish_greeting = "";
zellij_session_select = ''
if not set -q ZELLIJ
set -l ZJ_SESSIONS (zellij list-sessions | awk '{print $1}')
set -l NO_SESSIONS (count $ZJ_SESSIONS)
if test $NO_SESSIONS -gt 0
set -l SELECTED_SESSION (printf "%s\n" $ZJ_SESSIONS | sk --ansi)
if test -n "$SELECTED_SESSION"
zellij attach -c $SELECTED_SESSION
else
zellij
end
else
zellij
end
end
'';
fish_flake_edit = ''
cd $FLAKE
hx $FLAKE
'';
fish_hello_world = ''
echo "Hello World"; string repeat -N \n --count=(math (count (fish_prompt)) - 1); commandline -f repaint
'';
fish_user_key_bindings = ''
bind --preset -M insert \cf fish_flake_edit
bind --preset -M insert \ec skim_cd_widget
'';
};
interactiveShellInit =
# zellij auto start script
''
zellij_session_select
'' +
''
set --global KITTY_INSTALLATION_DIR "${pkgs.kitty}/lib/kitty"
set --global KITTY_SHELL_INTEGRATION enabled
source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish"
set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d"
'' +
# Use vim bindings and cursors
''
fish_vi_key_bindings
set fish_cursor_default block blink
set fish_cursor_insert line blink
set fish_cursor_replace_one underscore blink
set fish_cursor_visual block
'' +
# Use terminal colors
''
set -U fish_color_autosuggestion brblack
set -U fish_color_cancel -r
set -U fish_color_command brgreen
set -U fish_color_comment brmagenta
set -U fish_color_cwd green
set -U fish_color_cwd_root red
set -U fish_color_end brmagenta
set -U fish_color_error brred
set -U fish_color_escape brcyan
set -U fish_color_history_current --bold
set -U fish_color_host normal
set -U fish_color_match --background=brblue
set -U fish_color_normal normal
set -U fish_color_operator cyan
set -U fish_color_param brblue
set -U fish_color_quote yellow
set -U fish_color_redirection bryellow
set -U fish_color_search_match 'bryellow' '--background=brblack'
set -U fish_color_selection 'white' '--bold' '--background=brblack'
set -U fish_color_status red
set -U fish_color_user brgreen
set -U fish_color_valid_path --underline
set -U fish_pager_color_completion normal
set -U fish_pager_color_description yellow
set -U fish_pager_color_prefix 'white' '--bold' '--underline'
set -U fish_pager_color_progress 'brwhite' '--background=cyan'
'';
};
};
}

View file

@ -0,0 +1,20 @@
{ lib, ... }:
{
imports = [
./nixIndex
./git
./tools
];
options.programs.console.utility = {
nixIndex = {
enable = lib.mkEnableOption "Enable nixIndex configuration";
};
git = {
enable = lib.mkEnableOption "Enable git + tools";
};
tools = {
enable = lib.mkEnableOption "Enable various console tools";
};
};
}

View file

@ -0,0 +1,24 @@
{ pkgs, config, lib, ... }:
let
cfg = config.programs.console.utility.git;
in
{
config = {
programs.git = lib.mkIf cfg.enable {
enable = true;
package = pkgs.gitAndTools.gitFull;
userName = "ooks-io";
userEmail = "ooks@protonmail.com";
extraConfig = {
gpg."ssh".program = "${pkgs._1password-gui}/bin/op-ssh-sign";
};
ignores = [ ".direnv" "result" ];
lfs.enable = true;
};
home.packages = with pkgs; [
git-credential-1password
];
};
}

View file

@ -0,0 +1,38 @@
{ pkgs, config, lib, ... }:
let
cfg = config.programs.console.utility.nixIndex;
update-script = pkgs.writeShellApplication {
name = "fetch-nix-index-database";
runtimeInputs = with pkgs; [ wget coreutils ];
text = ''
filename="index-x86_64-linux"
mkdir -p ~/.cache/nix-index
cd ~/.cache/nix-index
wget -N "https://github.com/Mic92/nix-index-database/releases/latest/download/$filename"
ln -f "$filename" files
'';
};
in
{
config = lib.mkIf cfg.enable {
programs.nix-index.enable = true;
systemd.user.services.nix-index-database-sync = {
Unit = { Description = "fetch mic92/nix-index-database"; };
Service = {
Type = "oneshot";
ExecStart = "${update-script}/bin/fetch-nix-index-database";
Restart = "on-failure";
RestartSec = "5m";
};
};
systemd.user.timers.nix-index-database-sync = {
Unit = { Description = "Automatic github:mic92/nix-index-database fetching"; };
Timer = {
OnBootSec = "10m";
OnUnitActiveSec = "24h";
};
Install = { WantedBy = [ "timers.target" ]; };
};
};
}

View file

@ -0,0 +1,69 @@
{ pkgs, lib, config, ... }:
let
cfg = config.programs.console.utility.tools;
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
bc # Calculator
# file utility
duf
du-dust
fd
ripgrep
# archive
zip
unzip
unrar
# file transfer
wget
httpie # Better curl
# resource manager
powertop
diffsitter # Better diff
jq # JSON pretty printer and manipulator
comma # Install and run with ","
tldr # Community maintained help pages
progress
killall
acpi
# Nix tooling
alejandra
];
programs = {
btop.enable = true;
eza.enable = true;
bat = {
enable = true;
config = {
theme = "base16";
pager = "less -FR";
};
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
skim = {
enable = true;
enableFishIntegration = lib.mkIf config.programs.console.shell.fish.enable true;
defaultCommand = "rg --files --hidden";
changeDirWidgetOptions = [
"--preview 'eza --icons -L 3 -T --color always {} | head -200'"
"--exact"
];
fileWidgetCommand = "rg --files";
fileWidgetOptions = [
"--preview 'bat --color=always {}'"
];
};
};
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./desktop
./console
];
}

View file

@ -0,0 +1,20 @@
{ lib, ... }:
{
imports = [
./firefox
#./chrome -- still needs to be implemented
#./brave -- still needs tio be implemented
];
options.programs.desktop.browser = {
firefox = {
enable = lib.mkEnableOption "Enable firefox browser";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set Firefox as default browser";
};
};
};
}

View file

@ -0,0 +1,304 @@
{ pkgs, lib, inputs, config, ... }:
let
addons = inputs.firefox-addons.packages.${pkgs.system};
cfg = config.programs.desktop.browser.firefox;
in
{
config = {
nixpkgs.config.allowUnfree = true;
home.sessionVariables = lib.mkIf cfg.default {
BROWSER = "firefox";
};
programs.firefox = lib.mkIf cfg.enable {
enable = true;
profiles.ooks = {
bookmarks = { };
extensions = with addons; [
ublock-origin
browserpass
stylus
surfingkeys
];
settings = {
#Basic Settings
"browser.disableResetPrompt" = true;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"browser.cache.disk.enable" = false;
"browser.cache.memory.enable" = true;
"browser.cache.memory.capacity" = 524288;
"browser.sessionstore.interval" = 15000000;
"extensions.pocket.enabled" = false;
"reader.parse-on-load.enabled" = false;
"accessibility.force_disabled" = 1;
"browser.helperApps.deleteTempFileOnExit" = true;
"browser.uitour.enabled" = false;
#Startup
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.default.sites" = "";
"browser.aboutConfig.showWarning" = false;
#Disable recommendations
"extensions.getAddons.showPane" = false;
"extensions.htmlaboutaddons.recommendations.enabled" = false;
"browser.discovery.enabled" = false;
#Telemetry
"datareporting.policy.dataSubmissionEnabled" = false;
"datareporting.healthreport.uploadEnabled" = false;
"toolkit.telemetry.unified" = false;
"toolkit.telemetry.enabled" = false;
"toolkit.telemetry.server" = "data:,";
"toolkit.telemetry.archive.enabled" = false;
"toolkit.telemetry.newProfilePing.enabled" = false;
"toolkit.telemetry.shutdownPingSender.enabled" = false;
"toolkit.telemetry.updatePing.enabled" = false;
"toolkit.telemetry.bhrPing.enabled" = false;
"toolkit.telemetry.firstShutdownPing.enabled" = false;
"toolkit.telemetry.coverage.opt-out" = true;
"toolkit.coverage.opt-out" = true;
"toolkit.coverage.endpoint.base" = "";
"browser.ping-centre.telemetry" = false;
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
"browser.newtabpage.activity-stream.telemetry" = false;
"toolkit.telemetry.reportingpolicy.firstRun" = false;
"toolkit.telemetry.shutdownPingSender.enabledFirstsession" = false;
"browser.vpn_promo.enabled" = false;
"app.shield.optoutstudies.enabled" = false;
"app.normandy.enabled" = false;
"app.normandy.api_url" = "";
#Crash Reports
"breakpad.reportURL" = "";
"browser.tabs.crashReporting.sendReport" = false;
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
#Other
"captivedetect.canonicalURL" = "";
"network.captive-portal-service.enabled" = false;
"network.connectivity-service.enabled" = false;
#Geolocation
"geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%";
"geo.provider.use_gpsd" = false;
"geo.provider.use_geoclue" = false;
#Calculator
"browser.urlbar.suggest.calculator" = true;
};
userChrome =
''
/* config */
* {
--animation-speed: 0.2s;
--button-corner-rounding: 30px;
--urlbar-container-height: 40px !important;
--urlbar-min-height: 30px !important;
--urlbar-height: 30px !important;
--urlbar-toolbar-height: 38px !important;
--moz-hidden-unscrollable: scroll !important;
--toolbarbutton-border-radius: 3px !important;
--tabs-border-color: transparent;
}
:root {
--window: -moz-Dialog !important;
--secondary: color-mix(in srgb, currentColor 5%, -moz-Dialog) !important;
--uc-border-radius: 0px;
--uc-status-panel-spacing: 0px;
--uc-page-action-margin: 7px;
}
/* animation and effect */
#nav-bar:not([customizing]) {
visibility: visible;
margin-top: -40px;
transition-delay: 0.1s;
filter: alpha(opacity=0);
opacity: 0;
transition: visibility, ease 0.1s, margin-top, ease 0.1s, opacity, ease 0.1s,
rotate, ease 0.1s !important;
}
#nav-bar:hover,
#nav-bar:focus-within,
#urlbar[focused='true'],
#identity-box[open='true'],
#titlebar:hover + #nav-bar:not([customizing]),
#toolbar-menubar:not([inactive='true']) ~ #nav-bar:not([customizing]) {
visibility: visible;
margin-top: 0px;
filter: alpha(opacity=100);
opacity: 100;
margin-bottom: -0.2px;
}
#PersonalToolbar {
margin-top: 0px;
}
#nav-bar .toolbarbutton-1[open='true'] {
visibility: visible;
opacity: 100;
}
tab:not(:active) .tab-background {
transition: background-color var(--animation-speed) !important;
}
:root:not([customizing]) :hover > .tabbrowser-tab:not(:hover) {
transition: blur, ease 0.1s !important;
}
:root:not([customizing]) :not(:hover) > .tabbrowser-tab {
transition: blur, ease 0.1s !important;
}
#tabbrowser-tabs .tab-label-container[customizing] {
color: transparent;
transition: ease 0.1s;
transition-delay: 0.2s;
}
.tabbrowser-tab:not([pinned]) .tab-icon-image ,.bookmark-item .toolbarbutton-icon{opacity: 0!important; transition: .15s !important; width: 0!important; padding-left: 16px!important}
.tabbrowser-tab:not([pinned]):hover .tab-icon-image,.bookmark-item:hover .toolbarbutton-icon{opacity: 100!important; transition: .15s !important; display: inline-block!important; width: 16px!important; padding-left: 0!important}
.tabbrowser-tab:not([hover]) .tab-icon-image,.bookmark-item:not([hover]) .toolbarbutton-icon{padding-left: 0!important}
/* Removes annoying buttons and spaces */
#firefox-view-button, .titlebar-spacer[type="pre-tabs"], .titlebar-spacer[type="post-tabs"]{display: none !important}
#tabbrowser-tabs{border-inline-start-width: 0!important}
/* Makes some buttons nicer */
#PanelUI-menu-button, #unified-extensions-button, #reload-button, #stop-button {padding: 2px !important}
#reload-button, #stop-button{margin: 1px !important;}
/* Tabs colors */
#tabbrowser-tabs:not([movingtab])
> #tabbrowser-arrowscrollbox
> .tabbrowser-tab
> .tab-stack
> .tab-background[multiselected='true'],
#tabbrowser-tabs:not([movingtab])
> #tabbrowser-arrowscrollbox
> .tabbrowser-tab
> .tab-stack
> .tab-background[selected='true'] {
background-image: none !important;
background-color: var(--toolbar-bgcolor) !important;
}
/* Inactive tabs color */
#navigator-toolbox {
background-color: var(--window) !important;
}
/* X-button */
:root {
--show-tab-close-button: none;
--show-tab-close-button-hover: -moz-inline-block;
}
.tabbrowser-tab:not([pinned]) .tab-close-button { display: var(--show-tab-close-button) !important; }
.tabbrowser-tab:not([pinned]):hover .tab-close-button { display: var(--show-tab-close-button-hover) !important }
/* Window colors */
:root {
--lwt-sidebar-background-color: var(--window) !important;
--lwt-toolbar-field-focus: var(--secondary) !important;
}
/* tabbar */
/* Hide the secondary Tab Label
* e.g. playing indicator (the text, not the icon) */
.tab-secondary-label { display: none !important; }
#nav-bar:not([tabs-hidden='true']) {
box-shadow: none;
}
:root {
--toolbarbutton-border-radius: 0 !important;
--tab-border-radius: 0 !important;
--tab-block-margin: 0 !important;
}
.tab-background {
border-right: 0px solid rgba(0, 0, 0, 0) !important;
margin-left: -4px !important;
}
.tabbrowser-tab:is([visuallyselected='true'], [multiselected])
> .tab-stack
> .tab-background {
box-shadow: none !important;
}
.tabbrowser-tab[last-visible-tab='true'] {
padding-inline-end: 0 !important;
}
#tabs-newtab-button {
padding-left: 0 !important;
}
/* remove tab shadow */
.tabbrowser-tab
>.tab-stack
> .tab-background { box-shadow: none !important; }
/* multi tab selection */
#tabbrowser-tabs:not([noshadowfortests]) .tabbrowser-tab:is([multiselected])
> .tab-stack
> .tab-background:-moz-lwtheme { outline-color: var(--toolbarseparator-color) !important; }
/* Hides the list-all-tabs button*/
#alltabs-button { display: var(--uc-show-all-tabs-button) !important; }
/* remove gap after pinned tabs */
#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])
> #tabbrowser-arrowscrollbox
> .tabbrowser-tab:nth-child(1 of :not([pinned], [hidden])) { margin-inline-start: 0 !important; }
/* Removes annoying border */
#navigator-toolbox{border:none !important;}
/* Removes the annoying rainbow thing from the hamburger */
#appMenu-fxa-separator{border-image:none !important;}
'';
userContent = ''
@-moz-document url-prefix(about:){
/* Removes the scrollbar on some places */
body,html{overflow-y: auto}
/* Devtools */
@-moz-document url-prefix(about:devtools){
#toolbox-container{margin-top: 10px !important}
.devtools-tabbar{background: transparent !important}
.devtools-tab-line{border-radius: 0 0 5px 5px}
.customize-animate-enter-done,.customize-menu,.top-site-outer:hover,button{background-color: transparent!important}}
/* Newtab */
@-moz-document url("about:home"), url("about:newtab"){
.search-wrapper .search-handoff-button .fake-caret {top: 13px !important; inset-inline-start: 48px !important}
.search-wrapper .logo-and-wordmark{opacity: 0.9 !important; order: 1 !important; margin-bottom: 0 !important; flex: 1 !important; flex-basis: 20% !important}
.search-wrapper .search-handoff-button .fake-caret{top: 13px !important; inset-inline-start: 48px !important}
.search-wrapper .logo-and-wordmark{opacity: 0.9 !important; order: 1 !important; margin-bottom: 0 !important; flex: 1 !important; flex-basis: 20% !important}
.outer-wrapper .search-wrapper{padding: 0px !important; display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; justify-content: center !important; align-items: center !important; align-content: space-around !important; gap: 20px 10px !important}
.search-wrapper .logo-and-wordmark .logo{background-size: 60px !important; height: 60px !important; width: 60px !important}
.search-wrapper .search-inner-wrapper{min-height: 42px !important; order: 2 !important; flex: 3 !important; flex-basis: 60% !important; top: 4px !important}
.search-wrapper .search-inner-wrapper{min-height: 42px !important; order: 2 !important; flex: 3 !important; flex-basis: 60% !important; top: 4px !important}
.outer-wrapper.ds-outer-wrapper-breakpoint-override.only-search.visible-logo{display: flex !important; padding-top: 0px !important;vertical-align: middle}
.customize-menu{border-radius: 10px 0 0 10px !important}
#root > div{align-items: center; display: flex}}}
'';
};
};
};
}

View file

View file

@ -0,0 +1,17 @@
{
imports = [
./themeSettings # done
./browser # done -- firefox still need: chrome, brave
#./creative -- still needs to be implemented
#./communication -- still needs to be implemented
#./desktopEnvironment -- still needs to be implemented
./media # done -- spotify gui still needs to be implemented
./terminal # done -- wezterm still needs to be implemented
#./wallpaper -- still needs to be implemented
#./utility -- still needs to be implemented
#./vm -- still needs to be implemented
./wayland # -- almost done, need to implement eww
#./productivity -- still needs to be implemented
#./gaming -- still nneds to be implemented
];
}

View file

@ -0,0 +1,15 @@
{ lib, ... }
{
import = [
./window-manager
#./gnome -- still needs to be implemented
#./kde -- still needs to implemented
./appearance
];
options.programs.desktop.desktopEnvironment = {
hyprland = {
enable = lib.mkEnableOption "Enable Hyprland window-manager";
};
};
}

View file

View file

View file

@ -0,0 +1,7 @@
{
imports = [
./video
./image
./music
];
}

View file

@ -0,0 +1,13 @@
{ lib, ... }:
{
imports = [
./imv
];
options.programs.desktop.media.image = {
imv = {
enable = lib.mkEnableOption "Enable imv image viewer";
};
};
}

View file

@ -0,0 +1,13 @@
{ lib, config, ... }:
let
cfg = config.programs.desktop.media.image.imv;
in
{
config = lib.mkIf cfg.enable {
programs = {
imv = {
enable = true;
};
};
};
}

View file

@ -0,0 +1,16 @@
{ lib, ... }:
{
imports = [
#./spotify --- still needs to be implemented
./tui
];
options.programs.desktop.media.music = {
tui = {
enable = lib.mkEnableOption "Enable tui music";
};
spotify = {
enable = lib.mkEnableOption "Enable spotify";
};
};
}

View file

@ -0,0 +1,17 @@
{ pkgs, config, lib, ... }:
let
cfg = config.programs.desktop.media.music.tui;
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
termusic
spotify-player
ytui-music
alsa-utils
];
};
}

View file

@ -0,0 +1,20 @@
{ lib, ... }:
{
imports = [
./youtube
./jellyfin
./mpv
];
options.programs.desktop.media.video = {
mpv = {
enable = lib.mkEnableOption "Enable mpv video player";
};
youtube = {
enable = lib.mkEnableOption "Enable youtube tui player";
};
jellyfin = {
enable = lib.mkEnableOption "Enable jellyifn media player";
};
};
}

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