diff --git a/README.md b/README.md deleted file mode 100644 index d230ab9..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Personal nix config -*ook ook* - - - diff --git a/flake.lock b/flake.lock index 89c5348..e385d08 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/flake.nix b/flake.nix index b53b725..fc1b7ea 100644 --- a/flake.nix +++ b/flake.nix @@ -1,28 +1,45 @@ { - 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"; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - firefox-addons = { - url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - hyprwm-contrib = { - url = "github:hyprwm/contrib"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + 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 = { + url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; + inputs.nixpkgs.follows = "nixpkgs"; + }; - hyprland = { + hyprwm-contrib = { + url = "github:hyprwm/contrib"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + hyprland = { 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: + + outputs = { self, nixpkgs, home-manager, ... }@inputs: let inherit (self) outputs; lib = nixpkgs.lib // home-manager.lib; @@ -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; }; }; diff --git a/home/ooks/base/default.nix b/home/ooks/base/default.nix deleted file mode 100644 index 8634f49..0000000 --- a/home/ooks/base/default.nix +++ /dev/null @@ -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; -} diff --git a/home/ooks/base/shell/cli/bash.nix b/home/ooks/base/shell/cli/bash.nix deleted file mode 100644 index d515e49..0000000 --- a/home/ooks/base/shell/cli/bash.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs.bash = { - enable = true; - }; -} diff --git a/home/ooks/base/shell/cli/default.nix b/home/ooks/base/shell/cli/default.nix deleted file mode 100644 index 6a82d0c..0000000 --- a/home/ooks/base/shell/cli/default.nix +++ /dev/null @@ -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 {}'" - ]; - }; - }; -} diff --git a/home/ooks/base/shell/cli/fish.nix b/home/ooks/base/shell/cli/fish.nix deleted file mode 100644 index ab7e943..0000000 --- a/home/ooks/base/shell/cli/fish.nix +++ /dev/null @@ -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' - ''; - }; -} diff --git a/home/ooks/base/shell/cli/git.nix b/home/ooks/base/shell/cli/git.nix deleted file mode 100644 index 0510d37..0000000 --- a/home/ooks/base/shell/cli/git.nix +++ /dev/null @@ -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 - ]; -} diff --git a/home/ooks/base/shell/cli/lf/default.nix b/home/ooks/base/shell/cli/lf/default.nix deleted file mode 100644 index b0258df..0000000 --- a/home/ooks/base/shell/cli/lf/default.nix +++ /dev/null @@ -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"; - "" = "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 ]; -} diff --git a/home/ooks/base/shell/cli/lf/icons b/home/ooks/base/shell/cli/lf/icons deleted file mode 100644 index 47c6091..0000000 --- a/home/ooks/base/shell/cli/lf/icons +++ /dev/null @@ -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  diff --git a/home/ooks/base/shell/cli/live-buds-cli.nix b/home/ooks/base/shell/cli/live-buds-cli.nix deleted file mode 100644 index cb15704..0000000 --- a/home/ooks/base/shell/cli/live-buds-cli.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, pkgs, ... }: - -{ - home.packages = [ pkgs.live-buds-cli ]; -} diff --git a/home/ooks/base/shell/cli/nix-index.nix b/home/ooks/base/shell/cli/nix-index.nix deleted file mode 100644 index b35a4f6..0000000 --- a/home/ooks/base/shell/cli/nix-index.nix +++ /dev/null @@ -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" ]; }; - }; -} diff --git a/home/ooks/base/shell/cli/starship.nix b/home/ooks/base/shell/cli/starship.nix deleted file mode 100644 index e082d56..0000000 --- a/home/ooks/base/shell/cli/starship.nix +++ /dev/null @@ -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 = "󱁢"; - }; - }; -} diff --git a/home/ooks/base/shell/cli/tmux.nix b/home/ooks/base/shell/cli/tmux.nix deleted file mode 100644 index c46b0e5..0000000 --- a/home/ooks/base/shell/cli/tmux.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ pkgs, config, ... }: -{ - programs.tmux = { - enable = true; - extraConfig = "set -g status-position top"; - }; -} diff --git a/home/ooks/base/shell/cli/zellij.nix b/home/ooks/base/shell/cli/zellij.nix deleted file mode 100644 index 39cf0da..0000000 --- a/home/ooks/base/shell/cli/zellij.nix +++ /dev/null @@ -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}"; - }; - }; - }; - }; -} diff --git a/home/ooks/base/shell/default.nix b/home/ooks/base/shell/default.nix deleted file mode 100644 index f0b6f09..0000000 --- a/home/ooks/base/shell/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./cli - ./editors - ]; -} diff --git a/home/ooks/base/shell/editors/default.nix b/home/ooks/base/shell/editors/default.nix deleted file mode 100644 index d35f7ff..0000000 --- a/home/ooks/base/shell/editors/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - imports = [ - ./nvim.nix - ./helix - ]; -} diff --git a/home/ooks/base/shell/editors/helix/default.nix b/home/ooks/base/shell/editors/helix/default.nix deleted file mode 100644 index 9e1cfda..0000000 --- a/home/ooks/base/shell/editors/helix/default.nix +++ /dev/null @@ -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; }; - }; -} diff --git a/home/ooks/base/shell/editors/nvim.nix b/home/ooks/base/shell/editors/nvim.nix deleted file mode 100644 index 2591df2..0000000 --- a/home/ooks/base/shell/editors/nvim.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ pkgs, ... }: -{ - # Neovim - programs.neovim.enable = true; - - programs.neovim.viAlias = true; - programs.neovim.vimAlias = true; - -} diff --git a/home/ooks/base/xdg.nix b/home/ooks/base/xdg.nix deleted file mode 100644 index de6b598..0000000 --- a/home/ooks/base/xdg.nix +++ /dev/null @@ -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"; - }; - }; - }; -} diff --git a/home/ooks/features/essentials/default.nix b/home/ooks/features/essentials/default.nix deleted file mode 100644 index f263796..0000000 --- a/home/ooks/features/essentials/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - imports = [ - ./qt.nix - ./gtk.nix - ./imv.nix - ./fonts.nix - ./playerctl.nix - ./pavucontrol.nix - ./music.nix - ./yt-dlp.nix - ./playerctl.nix - ]; -} diff --git a/home/ooks/features/essentials/fonts.nix b/home/ooks/features/essentials/fonts.nix deleted file mode 100644 index a927679..0000000 --- a/home/ooks/features/essentials/fonts.nix +++ /dev/null @@ -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 - ]; -} diff --git a/home/ooks/features/essentials/gtk.nix b/home/ooks/features/essentials/gtk.nix deleted file mode 100644 index a32ae68..0000000 --- a/home/ooks/features/essentials/gtk.nix +++ /dev/null @@ -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 ]; - -} diff --git a/home/ooks/features/essentials/imv.nix b/home/ooks/features/essentials/imv.nix deleted file mode 100644 index dcc54fe..0000000 --- a/home/ooks/features/essentials/imv.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, pkgs, ... }: -{ - home = { - packages = with pkgs; [ - imv - ]; - }; -} diff --git a/home/ooks/features/essentials/music.nix b/home/ooks/features/essentials/music.nix deleted file mode 100644 index 86b53a6..0000000 --- a/home/ooks/features/essentials/music.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, pkgs, ... }: -let - inherit (config.colorscheme) colors; -in -{ - home.packages = with pkgs; [ - alsa-utils - spotify-player - ]; -} diff --git a/home/ooks/features/essentials/pavucontrol.nix b/home/ooks/features/essentials/pavucontrol.nix deleted file mode 100644 index e86872f..0000000 --- a/home/ooks/features/essentials/pavucontrol.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ pkgs, ... }: { - home.packages = with pkgs; [ pavucontrol ]; -} diff --git a/home/ooks/features/essentials/playerctl.nix b/home/ooks/features/essentials/playerctl.nix deleted file mode 100644 index 8126526..0000000 --- a/home/ooks/features/essentials/playerctl.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ playerctl ]; - services.playerctld = { - enable = true; - }; -} diff --git a/home/ooks/features/essentials/qt.nix b/home/ooks/features/essentials/qt.nix deleted file mode 100644 index 0a710fe..0000000 --- a/home/ooks/features/essentials/qt.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ pkgs, config, ... }: -{ - qt = { - enable = true; - platformTheme = "gtk"; - }; -} diff --git a/home/ooks/features/essentials/yt-dlp.nix b/home/ooks/features/essentials/yt-dlp.nix deleted file mode 100644 index cb3f19e..0000000 --- a/home/ooks/features/essentials/yt-dlp.nix +++ /dev/null @@ -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 - ''; - }; -} diff --git a/home/ooks/features/wayland/essentials/cursor.nix b/home/ooks/features/wayland/essentials/cursor.nix deleted file mode 100644 index 16c868f..0000000 --- a/home/ooks/features/wayland/essentials/cursor.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ pkgs, ... }: { - home.pointerCursor = { - gtk.enable = true; - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Ice"; - size = 22; - }; -} diff --git a/home/ooks/features/wayland/essentials/default.nix b/home/ooks/features/wayland/essentials/default.nix deleted file mode 100644 index 681d687..0000000 --- a/home/ooks/features/wayland/essentials/default.nix +++ /dev/null @@ -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"; - }; - - - - - -} diff --git a/home/ooks/features/wayland/essentials/eww/config/eww-variables.yuck b/home/ooks/features/wayland/essentials/eww/config/eww-variables.yuck deleted file mode 100644 index 2daefd2..0000000 --- a/home/ooks/features/wayland/essentials/eww/config/eww-variables.yuck +++ /dev/null @@ -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 diff --git a/home/ooks/features/wayland/essentials/eww/config/eww-widgets.yuck b/home/ooks/features/wayland/essentials/eww/config/eww-widgets.yuck deleted file mode 100644 index a556985..0000000 --- a/home/ooks/features/wayland/essentials/eww/config/eww-widgets.yuck +++ /dev/null @@ -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) - ) -) diff --git a/home/ooks/features/wayland/essentials/eww/config/eww-windows.yuck b/home/ooks/features/wayland/essentials/eww/config/eww-windows.yuck deleted file mode 100644 index cefdb16..0000000 --- a/home/ooks/features/wayland/essentials/eww/config/eww-windows.yuck +++ /dev/null @@ -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) -) - diff --git a/home/ooks/features/wayland/essentials/eww/config/eww.scss b/home/ooks/features/wayland/essentials/eww/config/eww.scss deleted file mode 100644 index 1dbb4b2..0000000 --- a/home/ooks/features/wayland/essentials/eww/config/eww.scss +++ /dev/null @@ -1,12 +0,0 @@ - -* { - font-family: "JetBrains Mono Nerd Font"; -} - -text { - font-family: "JetBrains Mono Nerd Font"; -} -.bar { - font-size: 17px; -} - diff --git a/home/ooks/features/wayland/essentials/eww/config/eww.yuck b/home/ooks/features/wayland/essentials/eww/config/eww.yuck deleted file mode 100644 index 4c54961..0000000 --- a/home/ooks/features/wayland/essentials/eww/config/eww.yuck +++ /dev/null @@ -1,4 +0,0 @@ -;;Imports -(include "eww-variables.yuck") -(include "eww-windows.yuck") -(include "eww-widgets.yuck") \ No newline at end of file diff --git a/home/ooks/features/wayland/essentials/eww/config/scripts/bat.sh b/home/ooks/features/wayland/essentials/eww/config/scripts/bat.sh deleted file mode 100755 index 376eeae..0000000 --- a/home/ooks/features/wayland/essentials/eww/config/scripts/bat.sh +++ /dev/null @@ -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 diff --git a/home/ooks/features/wayland/essentials/eww/config/scripts/battery.sh b/home/ooks/features/wayland/essentials/eww/config/scripts/battery.sh deleted file mode 100755 index 78fced5..0000000 --- a/home/ooks/features/wayland/essentials/eww/config/scripts/battery.sh +++ /dev/null @@ -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 - - - - - diff --git a/home/ooks/features/wayland/essentials/eww/config/scripts/batterytest.sh b/home/ooks/features/wayland/essentials/eww/config/scripts/batterytest.sh deleted file mode 100755 index ec701d3..0000000 --- a/home/ooks/features/wayland/essentials/eww/config/scripts/batterytest.sh +++ /dev/null @@ -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 diff --git a/home/ooks/features/wayland/essentials/eww/config/scripts/earbuds.sh b/home/ooks/features/wayland/essentials/eww/config/scripts/earbuds.sh deleted file mode 100755 index 4be4bb7..0000000 --- a/home/ooks/features/wayland/essentials/eww/config/scripts/earbuds.sh +++ /dev/null @@ -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 diff --git a/home/ooks/features/wayland/essentials/eww/default.nix b/home/ooks/features/wayland/essentials/eww/default.nix deleted file mode 100644 index 416f108..0000000 --- a/home/ooks/features/wayland/essentials/eww/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ pkgs, ... }: -{ - programs.eww = { - enable = true; - package = pkgs.eww-wayland; - configDir = ./config; - }; -} diff --git a/home/ooks/features/wayland/essentials/firefox.nix b/home/ooks/features/wayland/essentials/firefox.nix deleted file mode 100644 index 233fcb1..0000000 --- a/home/ooks/features/wayland/essentials/firefox.nix +++ /dev/null @@ -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" ]; - }; -} diff --git a/home/ooks/features/wayland/essentials/foot.nix b/home/ooks/features/wayland/essentials/foot.nix deleted file mode 100644 index e5bbc86..0000000 --- a/home/ooks/features/wayland/essentials/foot.nix +++ /dev/null @@ -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}"; - }; - }; - }; -} diff --git a/home/ooks/features/wayland/essentials/kitty.nix b/home/ooks/features/wayland/essentials/kitty.nix deleted file mode 100644 index 59d8889..0000000 --- a/home/ooks/features/wayland/essentials/kitty.nix +++ /dev/null @@ -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}"; - }; - }; -} diff --git a/home/ooks/features/wayland/essentials/mako.nix b/home/ooks/features/wayland/essentials/mako.nix deleted file mode 100644 index 620c0d1..0000000 --- a/home/ooks/features/wayland/essentials/mako.nix +++ /dev/null @@ -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 - ''; - }; -} diff --git a/home/ooks/features/wayland/essentials/swaylock.nix b/home/ooks/features/wayland/essentials/swaylock.nix deleted file mode 100644 index e964e5a..0000000 --- a/home/ooks/features/wayland/essentials/swaylock.nix +++ /dev/null @@ -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}"; - }; - }; -} \ No newline at end of file diff --git a/home/ooks/features/wayland/essentials/zathura.nix b/home/ooks/features/wayland/essentials/zathura.nix deleted file mode 100644 index 8348cc1..0000000 --- a/home/ooks/features/wayland/essentials/zathura.nix +++ /dev/null @@ -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}"; - }; - }; -} diff --git a/home/ooks/features/wayland/window-manager/hyprland/default.nix b/home/ooks/features/wayland/window-manager/hyprland/default.nix deleted file mode 100644 index 88285ad..0000000 --- a/home/ooks/features/wayland/window-manager/hyprland/default.nix +++ /dev/null @@ -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" - ]; - }; - }; -} diff --git a/home/ooks/features/wayland/window-manager/hyprland/tty-init.nix b/home/ooks/features/wayland/window-manager/hyprland/tty-init.nix deleted file mode 100644 index 16763a9..0000000 --- a/home/ooks/features/wayland/window-manager/hyprland/tty-init.nix +++ /dev/null @@ -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 - ''; - }; -} diff --git a/home/ooks/ooksdesk.nix b/home/ooks/ooksdesk.nix deleted file mode 100644 index 835ec37..0000000 --- a/home/ooks/ooksdesk.nix +++ /dev/null @@ -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; -} diff --git a/home/ooks/ooksmicro.nix b/home/ooks/ooksmicro.nix deleted file mode 100644 index db28d8a..0000000 --- a/home/ooks/ooksmicro.nix +++ /dev/null @@ -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; - -} \ No newline at end of file diff --git a/home/ooks/ooksx1.nix b/home/ooks/ooksx1.nix deleted file mode 100644 index 18aa6de..0000000 --- a/home/ooks/ooksx1.nix +++ /dev/null @@ -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; -} diff --git a/home/profile/base/default.nix b/home/profile/base/default.nix new file mode 100644 index 0000000..0a2756d --- /dev/null +++ b/home/profile/base/default.nix @@ -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; + }; +} diff --git a/home/profile/creative/default.nix b/home/profile/creative/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/profile/default.nix b/home/profile/default.nix new file mode 100644 index 0000000..325cda8 --- /dev/null +++ b/home/profile/default.nix @@ -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; +} diff --git a/home/profile/gaming/default.nix b/home/profile/gaming/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/profile/hyprland/default.nix b/home/profile/hyprland/default.nix new file mode 100644 index 0000000..3ba19a0 --- /dev/null +++ b/home/profile/hyprland/default.nix @@ -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; + }; + }; +} diff --git a/home/profile/productivity/default.nix b/home/profile/productivity/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/console/default.nix b/home/programs/console/default.nix new file mode 100644 index 0000000..ddd5de3 --- /dev/null +++ b/home/programs/console/default.nix @@ -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 + ]; +} diff --git a/home/programs/console/editor/default.nix b/home/programs/console/editor/default.nix new file mode 100644 index 0000000..c0b5212 --- /dev/null +++ b/home/programs/console/editor/default.nix @@ -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"; + }; + }; + }; +} diff --git a/home/programs/console/editor/helix/default.nix b/home/programs/console/editor/helix/default.nix new file mode 100644 index 0000000..0ec7a49 --- /dev/null +++ b/home/programs/console/editor/helix/default.nix @@ -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; }; + }; + }; +} diff --git a/home/programs/console/editor/helix/languages.nix b/home/programs/console/editor/helix/languages.nix new file mode 100644 index 0000000..bd7bb5a --- /dev/null +++ b/home/programs/console/editor/helix/languages.nix @@ -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; + }; + }; + }; + }; +} diff --git a/home/ooks/base/shell/editors/helix/theme.nix b/home/programs/console/editor/helix/theme.nix similarity index 99% rename from home/ooks/base/shell/editors/helix/theme.nix rename to home/programs/console/editor/helix/theme.nix index c53b4f8..970ff70 100644 --- a/home/ooks/base/shell/editors/helix/theme.nix +++ b/home/programs/console/editor/helix/theme.nix @@ -1,3 +1,4 @@ + { colorscheme }: { "${colorscheme.slug}" = { palette = builtins.mapAttrs (name: value: "#${value}") colorscheme.colors; # Add leading '#' diff --git a/home/programs/console/editor/nvim/default.nix b/home/programs/console/editor/nvim/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/console/fileManager/default.nix b/home/programs/console/fileManager/default.nix new file mode 100644 index 0000000..98b2e22 --- /dev/null +++ b/home/programs/console/fileManager/default.nix @@ -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"; + }; + }; + }; +} diff --git a/home/programs/console/fileManager/lf/default.nix b/home/programs/console/fileManager/lf/default.nix new file mode 100644 index 0000000..b5093f7 --- /dev/null +++ b/home/programs/console/fileManager/lf/default.nix @@ -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"; + "" = "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 ]; + }; +} diff --git a/home/programs/console/language/c.nix b/home/programs/console/language/c.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/console/language/python.nix b/home/programs/console/language/python.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/console/language/rust.nix b/home/programs/console/language/rust.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/console/multiplexer/default.nix b/home/programs/console/multiplexer/default.nix new file mode 100644 index 0000000..ee991e1 --- /dev/null +++ b/home/programs/console/multiplexer/default.nix @@ -0,0 +1,14 @@ +{ lib, config, ... }: +{ + imports = [ + ./zellij + #./screen + #./tmux + ]; + + options.programs.console.multiplexer = { + zellij = { + enable = lib.mkEnableOption "Enable zellij multiplexer"; + }; + }; +} diff --git a/home/programs/console/multiplexer/zellij/default.nix b/home/programs/console/multiplexer/zellij/default.nix new file mode 100644 index 0000000..8fe62ff --- /dev/null +++ b/home/programs/console/multiplexer/zellij/default.nix @@ -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}"; + }; + }; + }; + }; + }; +} + diff --git a/home/programs/console/prompt/default.nix b/home/programs/console/prompt/default.nix new file mode 100644 index 0000000..83f7d89 --- /dev/null +++ b/home/programs/console/prompt/default.nix @@ -0,0 +1,12 @@ +{ lib, ... }: +{ + imports = [ + ./starship + ]; + + options.programs.console.prompt = { + starship = { + enable = lib.mkEnableOption "Enable starship prompt"; + }; + }; +} diff --git a/home/programs/console/prompt/starship/default.nix b/home/programs/console/prompt/starship/default.nix new file mode 100644 index 0000000..8830185 --- /dev/null +++ b/home/programs/console/prompt/starship/default.nix @@ -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 = "󱁢"; + }; + }; + }; +} + diff --git a/home/programs/console/shell/bash/default.nix b/home/programs/console/shell/bash/default.nix new file mode 100644 index 0000000..37bd6d4 --- /dev/null +++ b/home/programs/console/shell/bash/default.nix @@ -0,0 +1,9 @@ +{ config, lib, ... }: +let + cfg = config.programs.console.shell.bash; +in +{ + config = lib.mkIf cfg.enable { + programs.bash.enable = true; + }; +} diff --git a/home/programs/console/shell/default.nix b/home/programs/console/shell/default.nix new file mode 100644 index 0000000..a327eeb --- /dev/null +++ b/home/programs/console/shell/default.nix @@ -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"; + }; + }; +} diff --git a/home/programs/console/shell/fish/default.nix b/home/programs/console/shell/fish/default.nix new file mode 100644 index 0000000..4b9bcbc --- /dev/null +++ b/home/programs/console/shell/fish/default.nix @@ -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' + ''; + }; + }; +} + diff --git a/home/programs/console/utility/default.nix b/home/programs/console/utility/default.nix new file mode 100644 index 0000000..958123b --- /dev/null +++ b/home/programs/console/utility/default.nix @@ -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"; + }; + }; +} diff --git a/home/programs/console/utility/git/default.nix b/home/programs/console/utility/git/default.nix new file mode 100644 index 0000000..4d15154 --- /dev/null +++ b/home/programs/console/utility/git/default.nix @@ -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 + ]; + }; +} + diff --git a/home/programs/console/utility/nixIndex/default.nix b/home/programs/console/utility/nixIndex/default.nix new file mode 100644 index 0000000..e0b1e5a --- /dev/null +++ b/home/programs/console/utility/nixIndex/default.nix @@ -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" ]; }; + }; + }; +} diff --git a/home/programs/console/utility/tools/default.nix b/home/programs/console/utility/tools/default.nix new file mode 100644 index 0000000..9d493c5 --- /dev/null +++ b/home/programs/console/utility/tools/default.nix @@ -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 {}'" + ]; + }; + }; + }; +} diff --git a/home/programs/default.nix b/home/programs/default.nix new file mode 100644 index 0000000..3c453d7 --- /dev/null +++ b/home/programs/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./desktop + ./console + ]; +} diff --git a/home/programs/desktop/browser/brave/default.nix b/home/programs/desktop/browser/brave/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/browser/chrome/default.nix b/home/programs/desktop/browser/chrome/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/browser/default.nix b/home/programs/desktop/browser/default.nix new file mode 100644 index 0000000..d4374bd --- /dev/null +++ b/home/programs/desktop/browser/default.nix @@ -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"; + }; + }; + }; +} diff --git a/home/programs/desktop/browser/firefox/default.nix b/home/programs/desktop/browser/firefox/default.nix new file mode 100644 index 0000000..1510b91 --- /dev/null +++ b/home/programs/desktop/browser/firefox/default.nix @@ -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}}} + ''; + }; + }; + }; +} diff --git a/home/programs/desktop/communication/default.nix b/home/programs/desktop/communication/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/creative/blender.nix b/home/programs/desktop/creative/blender.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/creative/gimp.nix b/home/programs/desktop/creative/gimp.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/creative/inkscape.nix b/home/programs/desktop/creative/inkscape.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/default.nix b/home/programs/desktop/default.nix new file mode 100644 index 0000000..29bbf94 --- /dev/null +++ b/home/programs/desktop/default.nix @@ -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 + ]; +} diff --git a/home/programs/desktop/desktopEnvironment/default.nix b/home/programs/desktop/desktopEnvironment/default.nix new file mode 100644 index 0000000..1e1b1c4 --- /dev/null +++ b/home/programs/desktop/desktopEnvironment/default.nix @@ -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"; + }; + }; +} diff --git a/home/programs/desktop/gaming/factorio.nix b/home/programs/desktop/gaming/factorio.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/gaming/lutris.nix b/home/programs/desktop/gaming/lutris.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/gaming/steam.nix b/home/programs/desktop/gaming/steam.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/media/default.nix b/home/programs/desktop/media/default.nix new file mode 100644 index 0000000..2daf968 --- /dev/null +++ b/home/programs/desktop/media/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./video + ./image + ./music + ]; +} diff --git a/home/programs/desktop/media/image/default.nix b/home/programs/desktop/media/image/default.nix new file mode 100644 index 0000000..e4a511a --- /dev/null +++ b/home/programs/desktop/media/image/default.nix @@ -0,0 +1,13 @@ +{ lib, ... }: +{ + imports = [ + ./imv + ]; + + options.programs.desktop.media.image = { + imv = { + enable = lib.mkEnableOption "Enable imv image viewer"; + }; + }; + +} diff --git a/home/programs/desktop/media/image/imv/default.nix b/home/programs/desktop/media/image/imv/default.nix new file mode 100644 index 0000000..4d5d002 --- /dev/null +++ b/home/programs/desktop/media/image/imv/default.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: +let + cfg = config.programs.desktop.media.image.imv; +in +{ + config = lib.mkIf cfg.enable { + programs = { + imv = { + enable = true; + }; + }; + }; +} diff --git a/home/programs/desktop/media/music/default.nix b/home/programs/desktop/media/music/default.nix new file mode 100644 index 0000000..1054265 --- /dev/null +++ b/home/programs/desktop/media/music/default.nix @@ -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"; + }; + }; +} diff --git a/home/programs/desktop/media/music/tui/default.nix b/home/programs/desktop/media/music/tui/default.nix new file mode 100644 index 0000000..419c51b --- /dev/null +++ b/home/programs/desktop/media/music/tui/default.nix @@ -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 + ]; + }; + +} diff --git a/home/programs/desktop/media/video/default.nix b/home/programs/desktop/media/video/default.nix new file mode 100644 index 0000000..2906016 --- /dev/null +++ b/home/programs/desktop/media/video/default.nix @@ -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"; + }; + }; +} diff --git a/home/programs/desktop/media/video/jellyfin/default.nix b/home/programs/desktop/media/video/jellyfin/default.nix new file mode 100644 index 0000000..4d76440 --- /dev/null +++ b/home/programs/desktop/media/video/jellyfin/default.nix @@ -0,0 +1,9 @@ +{ pkgs, lib, config, ... }: +let + cfg = config.programs.desktop.media.video.jellyfin; +in +{ + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ jellyfin-media-player ]; + }; +} diff --git a/home/programs/desktop/media/video/mpv/default.nix b/home/programs/desktop/media/video/mpv/default.nix new file mode 100644 index 0000000..7963d0c --- /dev/null +++ b/home/programs/desktop/media/video/mpv/default.nix @@ -0,0 +1,12 @@ +{ lib, config, ... }: + +let + cfg = config.programs.desktop.media.video.mpv; +in +{ + config = { + programs.mpv = lib.mkIf cfg.enable { + enable = true; + }; + }; +} diff --git a/home/programs/desktop/media/video/youtube/default.nix b/home/programs/desktop/media/video/youtube/default.nix new file mode 100644 index 0000000..80eaf96 --- /dev/null +++ b/home/programs/desktop/media/video/youtube/default.nix @@ -0,0 +1,12 @@ +{ lib, config, pkgs, ...}: +let + cfg = config.programs.desktop.media.video.youtube; +in +{ + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ youtube-tui ]; + programs.yt-dlp = { + enable = true; + }; + }; +} diff --git a/home/programs/desktop/productivity/libreoffice.nix b/home/programs/desktop/productivity/libreoffice.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/productivity/obsidian.nix b/home/programs/desktop/productivity/obsidian.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/terminal/default.nix b/home/programs/desktop/terminal/default.nix new file mode 100644 index 0000000..7c28205 --- /dev/null +++ b/home/programs/desktop/terminal/default.nix @@ -0,0 +1,43 @@ +{ lib, config, ... }: + let + cfg = config.programs.desktop.terminal; + in +{ + + imports = [ + ./foot + ./kitty + ]; + + options.programs.desktop.terminal = { + foot = { + enable = lib.mkEnableOption "Enable foot terminal"; + default = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Set foot as default terminal in environment variables"; + }; + }; + kitty = { + enable = lib.mkEnableOption "Enable kitty terminal"; + default = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Set kitty as default terminal in environment variables"; + }; + }; + }; + + config = { + assertions = [ + { + assertion = + (lib.length (lib.filter (x: x) [ + cfg.foot.default or false + cfg.kitty.default or false + ]) <= 1); + message = "Only one terminal can be default in the configuration"; + } + ]; + }; +} diff --git a/home/programs/desktop/terminal/foot/default.nix b/home/programs/desktop/terminal/foot/default.nix new file mode 100644 index 0000000..2904051 --- /dev/null +++ b/home/programs/desktop/terminal/foot/default.nix @@ -0,0 +1,64 @@ +{ config, lib, ... }: + +let + inherit (config.colorscheme) colors; +in + +{ + config = { + + home.sessionVariables = lib.mkIf config.programs.desktop.terminal.foot.default { + TERMINAL = "foot"; + TERM = "foot"; + }; + + programs.foot = lib.mkIf config.programs.desktop.terminal.foot.enable { + 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}"; + }; + }; + }; + }; +} diff --git a/home/programs/desktop/terminal/kitty/default.nix b/home/programs/desktop/terminal/kitty/default.nix new file mode 100644 index 0000000..da2b72e --- /dev/null +++ b/home/programs/desktop/terminal/kitty/default.nix @@ -0,0 +1,65 @@ +{ config, lib, ... }: + +let + inherit (config.colorscheme) colors; + cfg = config.programs.desktop.terminal.kitty; +in +{ + + config = { + home.sessionVariables = lib.mkIf cfg.default { + TERMINAL = "kitty -1"; + TERM = "kitty -1"; + }; + + programs.kitty = lib.mkIf cfg.enable { + enable = true; + font = { + name = config.fontProfiles.monospace.family; + size = 12; + }; + shellIntegration.enableFishIntegration = true; + settings = { + 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}"; + }; + }; + }; +} diff --git a/home/programs/desktop/themeSettings/cursor.nix b/home/programs/desktop/themeSettings/cursor.nix new file mode 100644 index 0000000..f419342 --- /dev/null +++ b/home/programs/desktop/themeSettings/cursor.nix @@ -0,0 +1,16 @@ +{ pkgs, lib, config, ... }: +let + cfg = config.programs.desktop.themeSettings; +in + +{ + config = lib.mkIf cfg.enable { + home.pointerCursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 22; + gtk.enable = true; + x11.enable = true; + }; + }; +} diff --git a/home/programs/desktop/themeSettings/default.nix b/home/programs/desktop/themeSettings/default.nix new file mode 100644 index 0000000..5575eef --- /dev/null +++ b/home/programs/desktop/themeSettings/default.nix @@ -0,0 +1,14 @@ +{ lib, ... }: +{ + imports = [ + ./cursor.nix + ./fonts.nix + ./gtk.nix + ./qt.nix + ]; + + # settings to be expanded on in the future + options.programs.desktop.themeSettings = { + enable = lib.mkEnableOption "Enable theme settings"; + }; +} diff --git a/home/programs/desktop/themeSettings/fonts.nix b/home/programs/desktop/themeSettings/fonts.nix new file mode 100644 index 0000000..a209bd2 --- /dev/null +++ b/home/programs/desktop/themeSettings/fonts.nix @@ -0,0 +1,24 @@ +{ pkgs, config, lib, ... }: +let + cfg = config.programs.desktop.themeSettings; +in +{ + config = lib. mkIf cfg.enable { + 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 + ]; + }; +} diff --git a/home/programs/desktop/themeSettings/gtk.nix b/home/programs/desktop/themeSettings/gtk.nix new file mode 100644 index 0000000..88bf5b8 --- /dev/null +++ b/home/programs/desktop/themeSettings/gtk.nix @@ -0,0 +1,35 @@ +{ config, pkgs, inputs, lib, ... }: + +let + inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) gtkThemeFromScheme; + cfg = config.programs.desktop.themeSettings; +in +{ + config = lib.mkIf cfg.enable (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 ]; + }); +} diff --git a/home/programs/desktop/themeSettings/qt.nix b/home/programs/desktop/themeSettings/qt.nix new file mode 100644 index 0000000..d8f5e70 --- /dev/null +++ b/home/programs/desktop/themeSettings/qt.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: +let + cfg = config.programs.desktop.themeSettings; +in +{ + config = lib.mkIf cfg.enable { + qt = { + enable = true; + platformTheme = "gtk"; + }; + }; +} diff --git a/home/ooks/features/wayland/essentials/gammastep.nix b/home/programs/desktop/utility/gammastep.nix similarity index 63% rename from home/ooks/features/wayland/essentials/gammastep.nix rename to home/programs/desktop/utility/gammastep.nix index 498756e..ae61585 100644 --- a/home/ooks/features/wayland/essentials/gammastep.nix +++ b/home/programs/desktop/utility/gammastep.nix @@ -1,5 +1,6 @@ +{ lib, config, ... }: { - services.gammastep = { + services.gammastep = lib.mkif config.programs.desktop.windowManager.hyprland.enable { enable = true; provider = "geoclue2"; temperature = { diff --git a/home/programs/desktop/utility/gtk-lock.nix b/home/programs/desktop/utility/gtk-lock.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/utility/mako.nix b/home/programs/desktop/utility/mako.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/utility/xdg.nix b/home/programs/desktop/utility/xdg.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/vm/default.nix b/home/programs/desktop/vm/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/wallpaper/image.png b/home/programs/desktop/wallpaper/image.png new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/wayland/bar/ags/default.nix b/home/programs/desktop/wayland/bar/ags/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/wayland/bar/default.nix b/home/programs/desktop/wayland/bar/default.nix new file mode 100644 index 0000000..7976880 --- /dev/null +++ b/home/programs/desktop/wayland/bar/default.nix @@ -0,0 +1,15 @@ +{ lib, config, ... }: +{ + imports = [ + #./eww + #./ags -- needs to be implemented + #./waybar -- needs to be implemented + ]; + + options.programs.desktop.wayland.bar = { + eww = { + enable = lib.mkEnableOption "Enable Eww bar"; + }; + }; + +} diff --git a/home/programs/desktop/wayland/bar/eww/default.nix b/home/programs/desktop/wayland/bar/eww/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/wayland/bar/waybar/default.nix b/home/programs/desktop/wayland/bar/waybar/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/wayland/default.nix b/home/programs/desktop/wayland/default.nix new file mode 100644 index 0000000..607543b --- /dev/null +++ b/home/programs/desktop/wayland/default.nix @@ -0,0 +1,17 @@ +{ lib, ... }: +{ + imports = [ + ./bar + ./lockscreen + ./notification + ./utility + ./windowManager + # ./launcher + ]; + + options.programs.desktop.wayland = { + base = { + enable = lib.mkEnableOption "Enable wayland specific utilities"; + }; + }; +} diff --git a/home/programs/desktop/wayland/launcher/default.nix b/home/programs/desktop/wayland/launcher/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/programs/desktop/wayland/lockscreen/default.nix b/home/programs/desktop/wayland/lockscreen/default.nix new file mode 100644 index 0000000..51053a4 --- /dev/null +++ b/home/programs/desktop/wayland/lockscreen/default.nix @@ -0,0 +1,15 @@ +{ lib, ... }: +{ + + imports = [ + #./gtkLock --- still needs to be implemented + ./swaylock + ]; + + options.programs.desktop.wayland.lockscreen = { + swaylock = { + enable = lib.mkEnableOption "Enable Swaylock screen"; + }; + }; +} + diff --git a/home/programs/desktop/wayland/lockscreen/swaylock/default.nix b/home/programs/desktop/wayland/lockscreen/swaylock/default.nix new file mode 100644 index 0000000..5d434e3 --- /dev/null +++ b/home/programs/desktop/wayland/lockscreen/swaylock/default.nix @@ -0,0 +1,35 @@ +{ config, lib, ... }: + +let + inherit (config.colorscheme) colors; + cfg = config.programs.desktop.wayland.lockscreen.swaylock; +in +{ + config = { + programs.swaylock = lib.mkIf cfg.enable { + 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}"; + }; + }; + }; +} diff --git a/home/programs/desktop/wayland/notification/default.nix b/home/programs/desktop/wayland/notification/default.nix new file mode 100644 index 0000000..755c2e4 --- /dev/null +++ b/home/programs/desktop/wayland/notification/default.nix @@ -0,0 +1,14 @@ +{ lib, ... }: +{ + + imports = [ + ./mako + #./dunst -- still needs to be implemented + ]; + + options.programs.desktop.wayland.notification = { + mako = { + enable = lib.mkEnableOption "Enable mako notification daemon"; + }; + }; +} diff --git a/home/programs/desktop/wayland/notification/mako/default.nix b/home/programs/desktop/wayland/notification/mako/default.nix new file mode 100644 index 0000000..d6c2cf8 --- /dev/null +++ b/home/programs/desktop/wayland/notification/mako/default.nix @@ -0,0 +1,38 @@ +{ config, lib, ... }: +let + inherit (config.colorscheme) colors kind; + cfg = config.programs.desktop.wayland.notification.mako; +in { + config = { + services.mako = lib.mkIf cfg.enable { + 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 + ''; + }; + }; +} + diff --git a/home/programs/desktop/wayland/utility/default.nix b/home/programs/desktop/wayland/utility/default.nix new file mode 100644 index 0000000..ad97c4b --- /dev/null +++ b/home/programs/desktop/wayland/utility/default.nix @@ -0,0 +1,50 @@ +{ lib, config, pkgs, ... }: + +let + cfg = config.programs.desktop.wayland.base; +in + +{ + config = lib.mkIf cfg.enable { + home = { + packages = with pkgs; [ + grim + gtk3 + libnotify + waypipe + pulseaudio + pamixer + slurp + wf-recorder + wl-clipboard + wl-mirror + xdg-utils + wlr-randr + ]; + sessionVariables = { + QT_QPA_PLATFORM = "wayland"; + SDL_VIDEODRIVER = "wayland"; + XDG_SESSION_TYPE = "wayland"; + }; + }; + + systemd.user.targets.tray = { + Unit = { + Description = "Home Manager System Tray"; + Requires = ["graphical-session-pre.target"]; + }; + }; + + services.gammastep = { + enable = true; + provider = "geoclue2"; + temperature = { + day = 6000; + night = 4600; + }; + settings = { + general.adjustment-method = "wayland"; + }; + }; + }; +} diff --git a/home/programs/desktop/wayland/windowManager/default.nix b/home/programs/desktop/wayland/windowManager/default.nix new file mode 100644 index 0000000..1794ede --- /dev/null +++ b/home/programs/desktop/wayland/windowManager/default.nix @@ -0,0 +1,14 @@ +{ lib, ... }: + +{ + imports = [ + ./hyprland + ]; + + options.programs.desktop.wayland.windowManager = { + hyprland = { + enable = lib.mkEnableOption "Enable Hyprland window-manager"; + }; + }; + +} diff --git a/home/programs/desktop/wayland/windowManager/hyprland/appearance.nix b/home/programs/desktop/wayland/windowManager/hyprland/appearance.nix new file mode 100644 index 0000000..00763fd --- /dev/null +++ b/home/programs/desktop/wayland/windowManager/hyprland/appearance.nix @@ -0,0 +1,65 @@ +{ config, lib, ... }: +let + cfg = config.programs.desktop.wayland.windowManager.hyprland; +in +{ + config = { + wayland.windowManager.hyprland = lib.mkIf cfg.enable { + 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}"; + }; + dwindle.split_width_multiplier = 1.35; + + 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" + ]; + }; + }; + }; + }; +} diff --git a/home/ooks/features/wayland/window-manager/hyprland/binds.nix b/home/programs/desktop/wayland/windowManager/hyprland/binds.nix similarity index 97% rename from home/ooks/features/wayland/window-manager/hyprland/binds.nix rename to home/programs/desktop/wayland/windowManager/hyprland/binds.nix index 8802617..e1c6af4 100644 --- a/home/ooks/features/wayland/window-manager/hyprland/binds.nix +++ b/home/programs/desktop/wayland/windowManager/hyprland/binds.nix @@ -1,6 +1,7 @@ { lib, config, pkgs, ... }: let + cfg = config.programs.desktop.wayland.windowManager.hyprland; light = "${pkgs.light}/bin/light"; notifysend = "${pkgs.libnotify}/bin/notify-send"; #pamixer = "${pkgs.pamixer}/bin/pamixer"; @@ -40,12 +41,12 @@ in { - wayland.windowManager.hyprland.settings = { + wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { bind = let terminal = config.home.sessionVariables.TERMINAL; browser = config.home.sessionVariables.BROWSER; editor = config.home.sessionVariables.EDITOR; - + bright = "${brightnessScript}/bin/brightness"; volume = "${volumeScript}/bin/volume"; diff --git a/home/programs/desktop/wayland/windowManager/hyprland/default.nix b/home/programs/desktop/wayland/windowManager/hyprland/default.nix new file mode 100644 index 0000000..22de9fc --- /dev/null +++ b/home/programs/desktop/wayland/windowManager/hyprland/default.nix @@ -0,0 +1,64 @@ +{ lib, config, pkgs, ... }: +let + cfg = config.programs.desktop.wayland.windowManager.hyprland; +in +{ + imports = [ + ./binds.nix #hyprland keybindings + ./appearance.nix + ./rules.nix + ./exec.nix + ]; + + config = lib.mkIf cfg.enable { + 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 = { + input = { + kb_layout = "us"; + touchpad = { + disable_while_typing = false; + scroll.factor = 0.1; + }; + }; + + misc = { + vrr = true; + disable_hyprland_logo = true; + force_default_wallpaper = 0; + }; + + gestures = { + workspace_swipe = true; + workspace_swipe_forever = true; + }; + + 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); + }; + }; + }; +} diff --git a/home/ooks/features/wayland/window-manager/hyprland/environment-variables.nix b/home/programs/desktop/wayland/windowManager/hyprland/env.nix.bak similarity index 91% rename from home/ooks/features/wayland/window-manager/hyprland/environment-variables.nix rename to home/programs/desktop/wayland/windowManager/hyprland/env.nix.bak index e2d62c9..45d662e 100644 --- a/home/ooks/features/wayland/window-manager/hyprland/environment-variables.nix +++ b/home/programs/desktop/wayland/windowManager/hyprland/env.nix.bak @@ -1,7 +1,7 @@ -{ config, pkgs, ... }: +{ config, lib, ... }: { - home = { + home = lib.mkIf config.programs.desktop.wayland.windowManager.hyprland.enable { sessionVariables = { # GTK_IM_MODULE = "fcitx5"; # QT_IM_MODULE = "fcitx5"; diff --git a/home/programs/desktop/wayland/windowManager/hyprland/exec.nix b/home/programs/desktop/wayland/windowManager/hyprland/exec.nix new file mode 100644 index 0000000..f91447d --- /dev/null +++ b/home/programs/desktop/wayland/windowManager/hyprland/exec.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.programs.desktop.wayland.windowManager.hyprland; +in +{ + config = { + wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { + 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 = [ + "${pkgs._1password-gui}/bin/1password --silent" + "${pkgs.live-buds-cli}/bin/earbuds -d" + "eww daemon && eww open bar" + ]; + }; + }; +} diff --git a/home/programs/desktop/wayland/windowManager/hyprland/rules.nix b/home/programs/desktop/wayland/windowManager/hyprland/rules.nix new file mode 100644 index 0000000..4e2fffe --- /dev/null +++ b/home/programs/desktop/wayland/windowManager/hyprland/rules.nix @@ -0,0 +1,20 @@ +{ lib, config, ... }: +let + cfg = config.programs.desktop.wayland.windowManager.hyprland; +in +{ + config = { + wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { + windowrulev2 = [ + "float,move 191 15,size 924 396,class:(1Password)" + + "float, title:^(Picture-in-Picture)$" + "pin, title:^(Picture-in-Picture)$" + + "rounding 0, xwayland:1" + "center, class:^(.*jetbrains.*)$, title:^(Confirm Exit|Open Project|win424|win201|splash)$" + "size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$" + ]; + }; + }; +} diff --git a/home/user/erika@ookst480.nix b/home/user/erika@ookst480.nix new file mode 100644 index 0000000..e69de29 diff --git a/home/ooks/ookst480s.nix b/home/user/ooks/ookst480s/default.nix similarity index 70% rename from home/ooks/ookst480s.nix rename to home/user/ooks/ookst480s/default.nix index eaad0c8..1c99da6 100644 --- a/home/ooks/ookst480s.nix +++ b/home/user/ooks/ookst480s/default.nix @@ -1,11 +1,12 @@ -{ inputs, outputs, ... }: +{ inputs, outputs, config, ... }: { imports = [ - ./features/wayland/window-manager/hyprland - ./base + ../../../profile ]; + activeProfiles = ["base" "hyprland"]; + monitors = [{ name = "eDP-1"; width = 1920; @@ -14,7 +15,7 @@ primary = true; transform = 0; }]; - - colorscheme = inputs.nix-colors.colorSchemes.gruvbox-dark-soft; + colorscheme = inputs.nix-colors.colorSchemes.gruvbox-dark-soft; } + diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 6fd968d..01d2831 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -1,5 +1,6 @@ { fonts = import ./fonts.nix; monitors = import ./monitors.nix; + wallpaper = import ./wallpaper.nix; xdg-portal = import ./xdg-portal.nix; } diff --git a/modules/home-manager/wallpaper.nix b/modules/home-manager/wallpaper.nix new file mode 100644 index 0000000..5ba52c0 --- /dev/null +++ b/modules/home-manager/wallpaper.nix @@ -0,0 +1,12 @@ +{ lib, ... }: +let inherit (lib) types mkOption; +in +{ + options.wallpaper = mkOption { + type = types.path; + default = ""; + description = '' + Wallpaper path + ''; + }; +} diff --git a/modules/home-manager/xdg-portal.nix b/modules/home-manager/xdg-portal.nix index 1244d9b..775542e 100644 --- a/modules/home-manager/xdg-portal.nix +++ b/modules/home-manager/xdg-portal.nix @@ -14,33 +14,19 @@ in { options.xdg.portal = { enable = mkEnableOption (lib.mdDoc - "[xdg desktop integration](https://github.com/flatpak/xdg-desktop-portal)") - // { - default = false; - }; + "[XDG desktop integration](https://github.com/flatpak/xdg-desktop-portal)"); extraPortals = mkOption { type = types.listOf types.package; default = [ ]; description = lib.mdDoc '' - List of additional portals to add to path. Portals allow interaction - with system, like choosing files or taking screenshots. At minimum, - a desktop portal implementation should be listed. GNOME and KDE already - adds `xdg-desktop-portal-gtk`; and - `xdg-desktop-portal-kde` respectively. On other desktop - environments you probably want to add them yourself. - ''; - }; + List of additional portals that should be passed to the + `xdg-desktop-portal.service`, via the `XDG_DESKTOP_PORTAL_DIR` + variable. - gtkUsePortal = mkOption { - type = types.bool; - visible = false; - default = false; - description = lib.mdDoc '' - Sets environment variable `GTK_USE_PORTAL` to `1`. - This will force GTK-based programs ran outside Flatpak to respect and use XDG Desktop Portals - for features like file chooser but it is an unsupported hack that can easily break things. - Defaults to `false` to respect its opt-in nature. + Portals allow interaction with system, like choosing files or taking + screenshots. At minimum, a desktop portal implementation should be + listed. ''; }; @@ -70,9 +56,13 @@ in { Sets which portal backend should be used to provide the implementation for the requested interface. For details check {manpage}`portals.conf(5)`. - Configs will be linked to `/etx/xdg/xdg-desktop-portal/` with the name `$desktop-portals.conf` - for `xdg.portal.config.$desktop` and `portals.conf` for `xdg.portal.config.common` - as an exception. + These will be written with the name `$desktop-portals.conf` for + `xdg.portal.config.$desktop` and `portals.conf` for + `xdg.portal.config.common` as an exception. + + These, together with `xdg.portal.configPackages`, will be joined into a + directory and passed to `xdg-desktop-portal.service` through a + `NIXOS_XDG_DESKTOP_PORTAL_CONFIG_DIR` variable. ''; }; @@ -113,52 +103,48 @@ in { paths = (mapAttrsToList mkPortalConfig cfg.config) ++ cfg.configPackages; pathsToLink = [ "/share/xdg-desktop-portal" ]; }; - in mkIf cfg.enable (mkMerge [ - { - warnings = optional (cfg.configPackages == [ ] && cfg.config == { }) '' - xdg-desktop-portal 1.17 reworked how portal implementations are loaded, you - should either set `xdg.portal.config` or `xdg.portal.configPackages` - to specify which portal backend to use for the requested interface. + in mkIf cfg.enable { + warnings = optional (cfg.configPackages == [ ] && cfg.config == { }) '' + xdg-desktop-portal 1.17 reworked how portal implementations are loaded, you + should either set `xdg.portal.config` or `xdg.portal.configPackages` + to specify which portal backend to use for the requested interface. - https://github.com/flatpak/xdg-desktop-portal/blob/1.18.1/doc/portals.conf.rst.in + https://github.com/flatpak/xdg-desktop-portal/blob/1.18.1/doc/portals.conf.rst.in - If you simply want to keep the behaviour in < 1.17, which uses the first - portal implementation found in lexicographical order, use the following: + If you simply want to keep the behaviour in < 1.17, which uses the first + portal implementation found in lexicographical order, use the following: - xdg.portal.config.common.default = "*"; - ''; + xdg.portal.config.common.default = "*"; + ''; - assertions = [{ - assertion = cfg.extraPortals != [ ]; - message = - "Setting xdg.portal.enable to true requires a portal implementation in xdg.portal.extraPortals such as xdg-desktop-portal-gtk or xdg-desktop-portal-kde."; - }]; + assertions = [{ + assertion = cfg.extraPortals != [ ]; + message = + "Setting xdg.portal.enable to true requires a portal implementation in xdg.portal.extraPortals such as xdg-desktop-portal-gtk or xdg-desktop-portal-kde."; + }]; + home = { + sessionVariables = + mkIf cfg.xdgOpenUsePortal { NIXOS_XDG_OPEN_USE_PORTAL = "1"; }; # Make extraPortals systemd units available to the user - home.packages = [ pkgs.xdg-desktop-portal ] ++ cfg.extraPortals; + packages = [ pkgs.xdg-desktop-portal ] ++ cfg.extraPortals; + }; - systemd.user.services.xdg-desktop-portal = { - Unit = { - Description = "Portal service"; - PartOf = "graphical-session.target"; - }; - Service = { - Environment = [ - "XDG_DESKTOP_PORTAL_DIR=${joinedPortals}/share/xdg-desktop-portal/portals" - ] ++ (optional (cfg.configPackages != [ ]) - "NIXOS_XDG_DESKTOP_PORTAL_CONFIG_DIR=${joinedPortalConfigs}/share/xdg-desktop-portal"); - Type = "dbus"; - BusName = "org.freedesktop-portal.Desktop"; - ExecStart = "${pkgs.xdg-desktop-portal}/libexec/xdg-desktop-portal"; - Slice = "session.slice"; - }; + systemd.user.services.xdg-desktop-portal = { + Unit = { + Description = "Portal service"; + PartOf = "graphical-session.target"; }; - } - # This module uses mkMerge because HM's home.sessionVariables are (at the - # time of writing) scalars, which do not work with mkIf - (mkIf cfg.gtkUsePortal { home.sessionVariables.GTK_USE_PORTAL = "1"; }) - (mkIf cfg.xdgOpenUsePortal { - home.sessionVariables.NIXOS_XDG_OPEN_USE_PORTAL = "1"; - }) - ]); + Service = { + Environment = [ + "XDG_DESKTOP_PORTAL_DIR=${joinedPortals}/share/xdg-desktop-portal/portals" + ] ++ (optional (cfg.configPackages != [ ]) + "NIXOS_XDG_DESKTOP_PORTAL_CONFIG_DIR=${joinedPortalConfigs}/share/xdg-desktop-portal"); + Type = "dbus"; + BusName = "org.freedesktop.portal.Desktop"; + ExecStart = "${pkgs.xdg-desktop-portal}/libexec/xdg-desktop-portal"; + Slice = "session.slice"; + }; + }; + }; } diff --git a/system/common/user/ooks/default.nix b/system/common/user/ooks/default.nix index aedf3aa..6933319 100644 --- a/system/common/user/ooks/default.nix +++ b/system/common/user/ooks/default.nix @@ -19,7 +19,7 @@ in packages = [ pkgs.home-manager ]; }; - home-manager.users.ooks = import ../../../../home/ooks/${config.networking.hostName}.nix; + home-manager.users.ooks = import ../../../../home/user/ooks/${config.networking.hostName}; services.geoclue2.enable = true; security.pam.services = { swaylock = { }; }; diff --git a/walls/everforest/megacity.png b/walls/everforest/megacity.png deleted file mode 100644 index de5f5f8..0000000 Binary files a/walls/everforest/megacity.png and /dev/null differ diff --git a/walls/gruvbox/gruvbox-blank.png b/walls/gruvbox/gruvbox-blank.png deleted file mode 100644 index 4ad0ace..0000000 Binary files a/walls/gruvbox/gruvbox-blank.png and /dev/null differ diff --git a/walls/gruvbox/gruvbox_grid.png b/walls/gruvbox/gruvbox_grid.png deleted file mode 100644 index f1c9640..0000000 Binary files a/walls/gruvbox/gruvbox_grid.png and /dev/null differ