commit 10965d15e4d585b8e6bc78be12db4dba577a0d41 Author: Maddie H Date: Sun Sep 15 12:56:25 2024 +0100 initial commit diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..91469bb --- /dev/null +++ b/flake.lock @@ -0,0 +1,448 @@ +{ + "nodes": { + "anyrun": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1721135360, + "narHash": "sha256-ZhSA0e45UxiOAjEVqkym/aULh0Dt+KHJLNda7bjx9UI=", + "owner": "Kirottu", + "repo": "anyrun", + "rev": "c6101a31a80b51e32e96f6a77616b609770172e0", + "type": "github" + }, + "original": { + "owner": "Kirottu", + "repo": "anyrun", + "type": "github" + } + }, + "aquamarine": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1725753098, + "narHash": "sha256-/NO/h/qD/eJXAQr/fHA4mdDgYsNT9thHQ+oT6KPi2ac=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "e4a13203112a036fc7f437d391c7810f3dd5ab52", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, + "crane": { + "inputs": { + "nixpkgs": [ + "woomer", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1716745752, + "narHash": "sha256-8K1R9Yg4r08rYk86Yq+lu3E9L3uRUb4xMqYHgl0VGS0=", + "owner": "ipetkov", + "repo": "crane", + "rev": "19ca94ec2d288de334ae932107816b4a97736cd8", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "anyrun", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726036828, + "narHash": "sha256-ZQHbpyti0jcAKnwQY1lwmooecLmSG6wX1JakQ/eZNeM=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "8a1671642826633586d12ac3158e463c7a50a112", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1722623071, + "narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "912d56025f03d41b1ad29510c423757b4379eb1c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprlang": "hyprlang", + "hyprutils": "hyprutils", + "hyprwayland-scanner": "hyprwayland-scanner", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems_2", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1726246604, + "narHash": "sha256-cScS34F71HzhIUeMScfKrT7iSZA0tr8pGIjOqHF+ue8=", + "ref": "refs/heads/main", + "rev": "d35e70a8c6599bb058cf86eb87c783ce1cf72471", + "revCount": 5218, + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" + }, + "original": { + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "xdph", + "nixpkgs" + ], + "systems": [ + "hyprland", + "xdph", + "systems" + ] + }, + "locked": { + "lastModified": 1721326555, + "narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1725997860, + "narHash": "sha256-d/rZ/fHR5l1n7PeyLw0StWMNLXVU9c4HFyfskw568so=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "dfeb5811dd6485490cce18d6cc1e38a055eea876", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1724966483, + "narHash": "sha256-WXDgKIbzjYKczxSZOsJplCS1i1yrTUpsDPuJV/xpYLo=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "8976e3f6a5357da953a09511d0c7f6a890fb6ec2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721324119, + "narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726032244, + "narHash": "sha256-3VvRGPkpBJobQrFD3slQzMAwZlo4/UwxT8933U5tRVM=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "f4f18f3d7229845e1c9d517457b7a0b90a38b728", + "type": "github" + }, + "original": { + "owner": "LnL7", + "repo": "nix-darwin", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1725983898, + "narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "anyrun": "anyrun", + "home-manager": "home-manager", + "hyprland": "hyprland", + "nix-darwin": "nix-darwin", + "nixpkgs": "nixpkgs", + "woomer": "woomer" + } + }, + "systems": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "woomer": { + "inputs": { + "crane": "crane", + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1721099169, + "narHash": "sha256-KvE1tABLTS1/tPBTu4K6OTwsPhaKWdfSXSZL3bL79Xg=", + "owner": "coffeeispower", + "repo": "woomer", + "rev": "641bc98990e556aee0d084ee13dd76333bf6a9bc", + "type": "github" + }, + "original": { + "owner": "coffeeispower", + "repo": "woomer", + "type": "github" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": "hyprland-protocols", + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1726046979, + "narHash": "sha256-6SEsjurq9cdTkITA6d49ncAJe4O/8CgRG5/F//s6Xh8=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "e695669fd8e1d1be9eaae40f35e00f8bd8b64c18", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f45f83a --- /dev/null +++ b/flake.nix @@ -0,0 +1,198 @@ +{ + description = "SpyHoodle Nix Configuration"; + + inputs = { + # Nixpkgs Unstable + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + + # Home Manager + home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + # Nix Darwin + nix-darwin.url = "github:LnL7/nix-darwin"; + nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; + + # Hyprland + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + hyprland.inputs.nixpkgs.follows = "nixpkgs"; + + # Any Run + anyrun.url = "github:Kirottu/anyrun"; + anyrun.inputs.nixpkgs.follows = "nixpkgs"; + + # Woomer + woomer.url = "github:coffeeispower/woomer"; + woomer.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { self, nixpkgs, home-manager, nix-darwin, ... } @ inputs: + let + username = "maddie"; + + nixpkgs_aarch64_darwin = import nixpkgs { + config.allowUnfree = true; + system = "aarch64-darwin"; + }; + nixpkgs_x86_64_linux = import nixpkgs { + config.allowUnfree = true; + system = "x86_64-linux"; + overlays = import ./overlays.nix; + }; + in + { + nixosConfigurations."desktop" = nixpkgs.lib.nixosSystem + { + specialArgs = { inherit username; inherit inputs; }; + pkgs = nixpkgs_x86_64_linux; + system = "x86_64-linux"; + modules = [ + home-manager.nixosModules.home-manager + { + home-manager.users.${username}.imports = [ + ./homes/common/ssh + ./homes/common/amfora.nix + ./homes/common/btop.nix + ./homes/common/eza.nix + ./homes/common/fetch.nix + ./homes/common/git.nix + ./homes/common/helix.nix + ./homes/common/htop.nix + ./homes/common/kakoune + ./homes/common/latex.nix + ./homes/common/lf + ./homes/common/media-tools.nix + ./homes/common/python.nix + ./homes/common/rust.nix + ./homes/common/shell.nix + ./homes/common/starship.nix + ./homes/common/tmux.nix + ./homes/common/wezterm.nix + ./homes/common/xdg.nix + ./homes/common/zsh.nix + + ./homes/desktop/alacritty.nix + ./homes/desktop/anyrun.nix + ./homes/desktop/audio.nix + ./homes/desktop/chromium.nix + ./homes/desktop/cider.nix + ./homes/desktop/cursor.nix + ./homes/desktop/discord.nix + ./homes/desktop/dmenu.nix + ./homes/desktop/element.nix + ./homes/desktop/games.nix + ./homes/desktop/gtk.nix + ./homes/desktop/home.nix + ./homes/desktop/hyprland.nix + ./homes/desktop/hyprlock.nix + ./homes/desktop/hyprpaper.nix + ./homes/desktop/kdeconnect.nix + ./homes/desktop/kitty.nix + ./homes/desktop/librewolf.nix + ./homes/desktop/minecraft.nix + ./homes/desktop/mpv.nix + ./homes/desktop/ncdu.nix + ./homes/desktop/steam.nix + ./homes/desktop/syncplay.nix + ./homes/desktop/terminals.nix + ./homes/desktop/tor-browser.nix + ./homes/desktop/uxplay.nix + ./homes/desktop/waybar.nix + ./homes/desktop/wine.nix + ./homes/desktop/wlogout.nix + ./homes/desktop/xdg.nix + ./homes/desktop/xorg.nix + ./homes/desktop/zathura.nix + + inputs.anyrun.homeManagerModules.default + ]; + home-manager.extraSpecialArgs = { inherit username; inherit inputs; pkgs = nixpkgs_x86_64_linux; }; + } + + ./systems/desktop/audio.nix + ./systems/desktop/avahi.nix + ./systems/desktop/bluetooth.nix + ./systems/desktop/boot.nix + ./systems/desktop/clicks-tailscale.nix + ./systems/desktop/cpu.nix + ./systems/desktop/doas.nix + ./systems/desktop/firewall.nix + ./systems/desktop/fonts.nix + ./systems/desktop/gpg.nix + ./systems/desktop/hardware.nix + ./systems/desktop/hyprland.nix + ./systems/desktop/hyprlock.nix + ./systems/desktop/locale.nix + ./systems/desktop/ly.nix + ./systems/desktop/man.nix + ./systems/desktop/networking.nix + ./systems/desktop/nix-ld.nix + ./systems/desktop/nix.nix + ./systems/desktop/nixos.nix + ./systems/desktop/nvidia.nix + ./systems/desktop/packages.nix + ./systems/desktop/security.nix + ./systems/desktop/ssh.nix + ./systems/desktop/systemd.nix + ./systems/desktop/tailscale.nix + ./systems/desktop/users.nix + ./systems/desktop/xdg.nix + ./systems/desktop/xorg.nix + ./systems/desktop/yubikey.nix + ./systems/desktop/zsh.nix + ]; + }; + + darwinConfigurations."laptop" = nix-darwin.lib.darwinSystem { + pkgs = nixpkgs_aarch64_darwin; + system = "aarch64-darwin"; + specialArgs = { + inherit username; + }; + modules = [ + # Home Manager Modules + home-manager.darwinModules.home-manager + { + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { + inherit username; + pkgs = nixpkgs_aarch64_darwin; + }; + home-manager.users.${username}.imports = [ + ./homes/laptop/home.nix + ./homes/laptop/ssh.nix + ./homes/common/ssh + ./homes/common/amfora.nix + ./homes/common/btop.nix + ./homes/common/eza.nix + ./homes/common/fetch.nix + ./homes/common/git.nix + ./homes/common/helix.nix + ./homes/common/htop.nix + ./homes/common/kakoune + ./homes/common/latex.nix + ./homes/common/lf + ./homes/common/media-tools.nix + ./homes/common/python.nix + ./homes/common/rust.nix + ./homes/common/shell.nix + ./homes/common/starship.nix + ./homes/common/tmux.nix + ./homes/common/wezterm.nix + ./homes/common/xdg.nix + ./homes/common/zsh.nix + ]; + } + # Nix Darwin Modules + ./systems/laptop/fonts.nix + ./systems/laptop/gpg.nix + ./systems/laptop/nix.nix + ./systems/laptop/packages.nix + ./systems/laptop/ssh.nix + ./systems/laptop/sudo.nix + ./systems/laptop/zsh.nix + ]; + }; + formatter.aarch64-darwin = nixpkgs_aarch64_darwin.legacyPackages.aarch64-darwin.nixpkgs-fmt; + }; +} diff --git a/homes/common/amfora.nix b/homes/common/amfora.nix new file mode 100644 index 0000000..8173adf --- /dev/null +++ b/homes/common/amfora.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + amfora + ]; +} diff --git a/homes/common/btop.nix b/homes/common/btop.nix new file mode 100644 index 0000000..d1b4f78 --- /dev/null +++ b/homes/common/btop.nix @@ -0,0 +1,10 @@ +{ + programs.btop = { + enable = true; + settings = { + color_theme = "TTY"; + theme_background = false; + truecolor = true; + }; + }; +} diff --git a/homes/common/eza.nix b/homes/common/eza.nix new file mode 100644 index 0000000..d24a6d8 --- /dev/null +++ b/homes/common/eza.nix @@ -0,0 +1,13 @@ +{ + programs.eza = { + enable = true; + icons = true; + extraOptions = [ + "--group-directories-first" + "--time-style=long-iso" + "--git" + "-h" + "-g" + ]; + }; +} diff --git a/homes/common/fetch.nix b/homes/common/fetch.nix new file mode 100644 index 0000000..5df9c5f --- /dev/null +++ b/homes/common/fetch.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + pridefetch + neofetch + pfetch + ]; +} diff --git a/homes/common/git.nix b/homes/common/git.nix new file mode 100644 index 0000000..c583603 --- /dev/null +++ b/homes/common/git.nix @@ -0,0 +1,46 @@ +{ pkgs, ... }: + +{ + programs.git = { + enable = true; + lfs.enable = true; + + userName = "Maddie H"; + userEmail = "maddie@spyhoodle.me"; + signing = { + key = "FA50688B9EB6D8AA070C8241C296DE8C9053683F"; + signByDefault = true; + gpgPath = "/run/current-system/sw/bin/gpg"; + }; + + aliases = { + graph = "log --graph --oneline --decorate"; + unstage = "reset HEAD --"; + co = "checkout"; + br = "branch"; + ci = "commit"; + st = "status"; + ps = "push"; + }; + + extraConfig = { + init.defaultBranch = "development"; + pull.rebase = "merges"; + core.sshCommand = "/run/current-system/sw/bin/ssh"; + }; + + ignores = [ + "**/.DS_Store" + "**/._.DS_Store" + ".DS_Store" + "._.DS_Store" + "**/*.swp" + "*.swp" + ]; + }; + + home.packages = with pkgs; [ + gh + git-review + ]; +} diff --git a/homes/common/helix.nix b/homes/common/helix.nix new file mode 100644 index 0000000..7690e21 --- /dev/null +++ b/homes/common/helix.nix @@ -0,0 +1,13 @@ +{ + programs.helix = { + enable = true; + settings = { + theme = "onedark"; + keys.normal = { + space.space = "file_picker"; + space.w = ":w"; + space.q = ":q"; + }; + }; + }; +} diff --git a/homes/common/htop.nix b/homes/common/htop.nix new file mode 100644 index 0000000..8b05d96 --- /dev/null +++ b/homes/common/htop.nix @@ -0,0 +1,20 @@ + +{ pkgs, ... }: + +{ + programs.htop = { + enable = true; + package = pkgs.htop-vim; + settings = { + hide_kernel_threads = 1; + hide_userland_threads = 1; + highlight_base_name = 1; + show_cpu_usage = 1; + show_cpu_frequency = 1; + show_cpu_temperature = 1; + degree_fahrenheit = 0; + enable_mouse = 1; + tree_view = 1; + }; + }; +} diff --git a/homes/common/kakoune/colors/one-dark-16.kak b/homes/common/kakoune/colors/one-dark-16.kak new file mode 100644 index 0000000..ec8da3d --- /dev/null +++ b/homes/common/kakoune/colors/one-dark-16.kak @@ -0,0 +1,93 @@ +# CODE + +set-face global value yellow +set-face global type yellow +set-face global variable red +set-face global module yellow +set-face global function blue +set-face global string green +set-face global keyword magenta +set-face global operator white +set-face global attribute cyan +set-face global comment white+d +set-face global documentation white+d +set-face global meta cyan +set-face global builtin yellow + +# MARKUP + +set-face global title yellow +set-face global header green +set-face global mono cyan +set-face global block magenta +set-face global link blue +set-face global bullet yellow +set-face global list white + +# BUILTIN + +set-face global Default white +set-face global PrimarySelection black,blue +set-face global SecondarySelection black,green +set-face global PrimaryCursor black,white +set-face global SecondaryCursor black,cyan +set-face global PrimaryCursorEol black,red +set-face global SecondaryCursorEol black,red +set-face global LineNumbers white +set-face global LineNumberCursor yellow +set-face global LineNumbersWrapped black +set-face global MenuForeground blue +set-face global MenuBackground default +set-face global MenuInfo green +set-face global Information default +set-face global Error red +set-face global StatusLine default +set-face global StatusLineMode yellow +set-face global StatusLineInfo blue +set-face global StatusLineValue white +set-face global StatusCursor black,blue +set-face global Prompt blue +set-face global MatchingChar +bu +set-face global BufferPadding black +set-face global Whitespace white+d + +# PLUGINS + +# kak-lsp +set-face global InlayHint +d@type +set-face global parameter +i@variable +set-face global enum cyan +set-face global InlayDiagnosticError red +set-face global InlayDiagnosticWarning yellow +set-face global InlayDiagnosticInfo blue +set-face global InlayDiagnosticHint white +set-face global LineFlagError red +set-face global LineFlagWarning yellow +set-face global LineFlagInfo blue +set-face global LineFlagHint white +set-face global DiagnosticError +u +set-face global DiagnosticWarning +u +set-face global DiagnosticInfo +u +set-face global DiagnosticHint +u +# Infobox faces +set-face global InfoDefault Information +set-face global InfoBlock block +set-face global InfoBlockQuote block +set-face global InfoBullet bullet +set-face global InfoHeader header +set-face global InfoLink link +set-face global InfoLinkMono header +set-face global InfoMono mono +set-face global InfoRule comment +set-face global InfoDiagnosticError InlayDiagnosticError +set-face global InfoDiagnosticHint InlayDiagnosticHint +set-face global InfoDiagnosticInformation InlayDiagnosticInfo +set-face global InfoDiagnosticWarning InlayDiagnosticWarning + +# kak-rainbower +try %{ set-option global rainbow_colors yellow magenta blue } + +# For backwards compatibility +define-command -override -hidden one-enable-fancy-underlines %{ + echo -debug "one-enable-fancy-underlines is deprecated - curly underlines are enabled by default" +} diff --git a/homes/common/kakoune/colors/one-dark.kak b/homes/common/kakoune/colors/one-dark.kak new file mode 100644 index 0000000..f7e719e --- /dev/null +++ b/homes/common/kakoune/colors/one-dark.kak @@ -0,0 +1,117 @@ +# One Dark + +declare-option str fg "abb2bf" +declare-option str bg "282c34" +declare-option str subbg "373c47" + +declare-option str lightred "e06c75" +declare-option str darkred "be5046" +declare-option str green "98c379" +declare-option str lightorange "e5c07b" +declare-option str darkorange "d19a66" +declare-option str blue "61afef" +declare-option str magenta "c678dd" +declare-option str cyan "56b6c2" + +declare-option str comment "5c6370" +declare-option str hint "ffffff" + +declare-option str cursoralpha "80" +declare-option str selectionalpha "40" + +# Menus do not support transparency, so we must hardcode the selection + sub bg colors +declare-option str menuselection "405770" + +# CODE + +set-face global value "rgb:%opt{darkorange}" +set-face global type "rgb:%opt{lightorange}" +set-face global variable "rgb:%opt{lightred}" +set-face global module "rgb:%opt{lightorange}" +set-face global function "rgb:%opt{blue}" +set-face global string "rgb:%opt{green}" +set-face global keyword "rgb:%opt{magenta}" +set-face global operator "rgb:%opt{fg}" +set-face global attribute "rgb:%opt{cyan}" +set-face global comment "rgb:%opt{comment}" +set-face global documentation "rgb:%opt{comment}" +set-face global meta "rgb:%opt{cyan}" +set-face global builtin "rgb:%opt{lightorange}" + +# MARKUP + +set-face global title "rgb:%opt{darkorange}" +set-face global header "rgb:%opt{green}" +set-face global mono "rgb:%opt{cyan}" +set-face global block "rgb:%opt{magenta}" +set-face global link "rgb:%opt{blue}" +set-face global bullet "rgb:%opt{lightorange}" +set-face global list "rgb:%opt{fg}" + +# BUILTIN + +set-face global Default "rgb:%opt{fg},rgb:%opt{bg}" +set-face global PrimarySelection "default,rgba:%opt{blue}%opt{selectionalpha}" +set-face global SecondarySelection "default,rgba:%opt{green}%opt{selectionalpha}" +set-face global PrimaryCursor "default,rgba:%opt{blue}%opt{cursoralpha}" +set-face global SecondaryCursor "default,rgba:%opt{green}%opt{cursoralpha}" +set-face global PrimaryCursorEol "default,rgba:%opt{lightred}%opt{cursoralpha}" +set-face global SecondaryCursorEol "default,rgba:%opt{darkorange}%opt{cursoralpha}" +set-face global LineNumbers "rgb:%opt{comment}" +set-face global LineNumberCursor "rgb:%opt{darkorange}" +set-face global LineNumbersWrapped "rgb:%opt{bg},rgb:%opt{bg}" +set-face global MenuForeground "rgb:%opt{fg},rgb:%opt{menuselection}" +set-face global MenuBackground "rgb:%opt{fg},rgb:%opt{subbg}" +set-face global MenuInfo "rgb:%opt{green}" +set-face global Information "rgb:%opt{fg},rgb:%opt{subbg}" +set-face global Error "rgb:%opt{lightred}" +set-face global StatusLine "rgb:%opt{fg},rgb:%opt{subbg}" +set-face global StatusLineMode "rgb:%opt{darkorange}" +set-face global StatusLineInfo "rgb:%opt{blue}" +set-face global StatusLineValue "rgb:%opt{fg}" +set-face global StatusCursor "default,rgba:%opt{blue}%opt{cursoralpha}" +set-face global Prompt "rgb:%opt{blue}" +set-face global MatchingChar "default,rgb:%opt{subbg}" +set-face global BufferPadding "rgb:%opt{bg},rgb:%opt{bg}" +set-face global Whitespace "rgb:%opt{comment}" + +# PLUGINS + +# kak-lsp +set-face global InlayHint "+d@type" +set-face global parameter "+i@variable" +set-face global enum "rgb:%opt{cyan}" +set-face global InlayDiagnosticError "rgb:%opt{lightred}" +set-face global InlayDiagnosticWarning "rgb:%opt{lightorange}" +set-face global InlayDiagnosticInfo "rgb:%opt{blue}" +set-face global InlayDiagnosticHint "rgb:%opt{hint}" +set-face global LineFlagError "rgb:%opt{lightred}" +set-face global LineFlagWarning "rgb:%opt{lightorange}" +set-face global LineFlagInfo "rgb:%opt{blue}" +set-face global LineFlagHint "rgb:%opt{hint}" +set-face global DiagnosticError ",,rgb:%opt{lightred}+c" +set-face global DiagnosticWarning ",,rgb:%opt{lightorange}+c" +set-face global DiagnosticInfo ",,rgb:%opt{blue}+c" +set-face global DiagnosticHint ",,rgb:%opt{hint}+u" +# Infobox faces +set-face global InfoDefault Information +set-face global InfoBlock block +set-face global InfoBlockQuote block +set-face global InfoBullet bullet +set-face global InfoHeader header +set-face global InfoLink link +set-face global InfoLinkMono header +set-face global InfoMono mono +set-face global InfoRule comment +set-face global InfoDiagnosticError InlayDiagnosticError +set-face global InfoDiagnosticHint InlayDiagnosticHint +set-face global InfoDiagnosticInformation InlayDiagnosticInfo +set-face global InfoDiagnosticWarning InlayDiagnosticWarning + +# kak-rainbower +try %{ set-option global rainbow_colors "rgb:%opt{lightorange}" "rgb:%opt{magenta}" "rgb:%opt{blue}" } + +# For backwards compatibility +define-command -override -hidden one-enable-fancy-underlines %{ + echo -debug "one-enable-fancy-underlines is deprecated - curly underlines are enabled by default" +} diff --git a/homes/common/kakoune/colors/one-darker-16.kak b/homes/common/kakoune/colors/one-darker-16.kak new file mode 100644 index 0000000..6d5dc56 --- /dev/null +++ b/homes/common/kakoune/colors/one-darker-16.kak @@ -0,0 +1,101 @@ +# CODE + +set-face global value yellow +set-face global type yellow +set-face global variable white +set-face global module yellow +set-face global function blue +set-face global string green +set-face global keyword magenta +set-face global operator red +set-face global attribute cyan +set-face global comment white+d +set-face global documentation white+d +set-face global meta cyan +set-face global builtin yellow + +# MARKUP + +set-face global title yellow +set-face global header green +set-face global mono cyan +set-face global block magenta +set-face global link blue +set-face global bullet yellow +set-face global list white + +# BUILTIN + +set-face global Default white +set-face global PrimarySelection black,blue +set-face global SecondarySelection black,green +set-face global PrimaryCursor black,white +set-face global SecondaryCursor black,cyan +set-face global PrimaryCursorEol black,red +set-face global SecondaryCursorEol black,red +set-face global LineNumbers white +set-face global LineNumberCursor yellow +set-face global LineNumbersWrapped black +set-face global MenuForeground blue +set-face global MenuBackground default +set-face global MenuInfo green +set-face global Information default +set-face global Error red +set-face global StatusLine default +set-face global StatusLineMode yellow +set-face global StatusLineInfo blue +set-face global StatusLineValue white +set-face global StatusCursor black,blue +set-face global Prompt blue +set-face global MatchingChar +bu +set-face global BufferPadding black +set-face global Whitespace white+d + +# PLUGINS + +# kak-lsp +set-face global InlayHint +d@type +set-face global parameter +i@variable +set-face global enum cyan +set-face global InlayDiagnosticError red +set-face global InlayDiagnosticWarning yellow +set-face global InlayDiagnosticInfo blue +set-face global InlayDiagnosticHint white +set-face global LineFlagError red +set-face global LineFlagWarning yellow +set-face global LineFlagInfo blue +set-face global LineFlagHint white +set-face global DiagnosticError +u +set-face global DiagnosticWarning +u +set-face global DiagnosticInfo +u +set-face global DiagnosticHint +u +# Infobox faces +set-face global InfoDefault Information +set-face global InfoBlock block +set-face global InfoBlockQuote block +set-face global InfoBullet bullet +set-face global InfoHeader header +set-face global InfoLink link +set-face global InfoLinkMono header +set-face global InfoMono mono +set-face global InfoRule comment +set-face global InfoDiagnosticError InlayDiagnosticError +set-face global InfoDiagnosticHint InlayDiagnosticHint +set-face global InfoDiagnosticInformation InlayDiagnosticInfo +set-face global InfoDiagnosticWarning InlayDiagnosticWarning + +# kak-rainbower +try %{ set-option global rainbow_colors yellow magenta blue } + +# For backwards compatibility +define-command -override -hidden one-enable-fancy-underlines %{ + echo -debug "one-enable-fancy-underlines is deprecated - curly underlines are enabled by default" +} + +# Hardcoded selection + bg colors +# set-face global PrimarySelection default,rgb:2a3f53 +# set-face global SecondarySelection default,rgb:384435 +# set-face global PrimaryCursor default,rgb:3c6487 +# set-face global SecondaryCursor default,rgb:586e4c +# set-face global PrimaryCursorEol default,rgb:7c434a +# set-face global SecondaryCursorEol default,rgb:7c434a diff --git a/homes/common/kakoune/colors/one-darker.kak b/homes/common/kakoune/colors/one-darker.kak new file mode 100644 index 0000000..f92265b --- /dev/null +++ b/homes/common/kakoune/colors/one-darker.kak @@ -0,0 +1,125 @@ +# One Darker +# This theme is a personalized implementation of One Dark. +# Changes include: +# - Darker background color +# - Variables are white instead of red +# - Operators are red instead of white +# - Comments are more visible + +# COLORS + +declare-option str fg "abb2bf" +declare-option str bg "181a1f" +declare-option str subbg "272b33" + +declare-option str lightred "e06c75" +declare-option str darkred "be5046" +declare-option str green "98c379" +declare-option str lightorange "e5c07b" +declare-option str darkorange "d19a66" +declare-option str blue "61afef" +declare-option str magenta "c678dd" +declare-option str cyan "56b6c2" + +declare-option str comment "70798a" +declare-option str hint "ffffff" + +declare-option str cursoralpha "80" +declare-option str selectionalpha "40" + +# Menus do not support transparency, so we must hardcode the selection + sub bg colors +declare-option str menuselection "344b61" + +# CODE + +set-face global value "rgb:%opt{darkorange}" +set-face global type "rgb:%opt{lightorange}" +set-face global variable "rgb:%opt{fg}" +set-face global module "rgb:%opt{lightorange}" +set-face global function "rgb:%opt{blue}" +set-face global string "rgb:%opt{green}" +set-face global keyword "rgb:%opt{magenta}" +set-face global operator "rgb:%opt{lightred}" +set-face global attribute "rgb:%opt{cyan}" +set-face global comment "rgb:%opt{comment}" +set-face global documentation "rgb:%opt{comment}" +set-face global meta "rgb:%opt{cyan}" +set-face global builtin "rgb:%opt{lightorange}" + +# MARKUP + +set-face global title "rgb:%opt{darkorange}" +set-face global header "rgb:%opt{green}" +set-face global mono "rgb:%opt{cyan}" +set-face global block "rgb:%opt{magenta}" +set-face global link "rgb:%opt{blue}" +set-face global bullet "rgb:%opt{lightorange}" +set-face global list "rgb:%opt{fg}" + +# BUILTIN + +set-face global Default "rgb:%opt{fg},rgb:%opt{bg}" +set-face global PrimarySelection "default,rgba:%opt{blue}%opt{selectionalpha}" +set-face global SecondarySelection "default,rgba:%opt{green}%opt{selectionalpha}" +set-face global PrimaryCursor "default,rgba:%opt{blue}%opt{cursoralpha}" +set-face global SecondaryCursor "default,rgba:%opt{green}%opt{cursoralpha}" +set-face global PrimaryCursorEol "default,rgba:%opt{lightred}%opt{cursoralpha}" +set-face global SecondaryCursorEol "default,rgba:%opt{darkorange}%opt{cursoralpha}" +set-face global LineNumbers "rgb:%opt{comment}" +set-face global LineNumberCursor "rgb:%opt{darkorange}" +set-face global LineNumbersWrapped "rgb:%opt{bg},rgb:%opt{bg}" +set-face global MenuForeground "rgb:%opt{fg},rgb:%opt{menuselection}" +set-face global MenuBackground "rgb:%opt{fg},rgb:%opt{subbg}" +set-face global MenuInfo "rgb:%opt{green}" +set-face global Information "rgb:%opt{fg},rgb:%opt{subbg}" +set-face global Error "rgb:%opt{lightred}" +set-face global StatusLine "rgb:%opt{fg},rgb:%opt{subbg}" +set-face global StatusLineMode "rgb:%opt{darkorange}" +set-face global StatusLineInfo "rgb:%opt{blue}" +set-face global StatusLineValue "rgb:%opt{fg}" +set-face global StatusCursor "default,rgba:%opt{blue}%opt{cursoralpha}" +set-face global Prompt "rgb:%opt{blue}" +set-face global MatchingChar "default,rgb:%opt{subbg}" +set-face global BufferPadding "rgb:%opt{bg},rgb:%opt{bg}" +set-face global Whitespace "rgb:%opt{comment}" + +# PLUGINS + +# kak-lsp +set-face global InlayHint "+d@type" +set-face global parameter "+i@variable" +set-face global enum "rgb:%opt{cyan}" +set-face global InlayDiagnosticError "rgb:%opt{lightred}" +set-face global InlayDiagnosticWarning "rgb:%opt{lightorange}" +set-face global InlayDiagnosticInfo "rgb:%opt{blue}" +set-face global InlayDiagnosticHint "rgb:%opt{hint}" +set-face global LineFlagError "rgb:%opt{lightred}" +set-face global LineFlagWarning "rgb:%opt{lightorange}" +set-face global LineFlagInfo "rgb:%opt{blue}" +set-face global LineFlagHint "rgb:%opt{hint}" +set-face global DiagnosticError ",,rgb:%opt{lightred}+c" +set-face global DiagnosticWarning ",,rgb:%opt{lightorange}+c" +set-face global DiagnosticInfo ",,rgb:%opt{blue}+c" +set-face global DiagnosticHint ",,rgb:%opt{hint}+u" +# Infobox faces +set-face global InfoDefault Information +set-face global InfoBlock block +set-face global InfoBlockQuote block +set-face global InfoBullet bullet +set-face global InfoHeader header +set-face global InfoLink link +set-face global InfoLinkMono header +set-face global InfoMono mono +set-face global InfoRule comment +set-face global InfoDiagnosticError InlayDiagnosticError +set-face global InfoDiagnosticHint InlayDiagnosticHint +set-face global InfoDiagnosticInformation InlayDiagnosticInfo +set-face global InfoDiagnosticWarning InlayDiagnosticWarning + +# kak-rainbower +try %{ set-option global rainbow_colors "rgb:%opt{lightorange}" "rgb:%opt{magenta}" "rgb:%opt{blue}" } + +# For backwards compatibility +define-command -override -hidden one-enable-fancy-underlines %{ + echo -debug "one-enable-fancy-underlines is deprecated - curly underlines are enabled by default" +} diff --git a/homes/common/kakoune/colors/one-light-16.kak b/homes/common/kakoune/colors/one-light-16.kak new file mode 100644 index 0000000..60e1689 --- /dev/null +++ b/homes/common/kakoune/colors/one-light-16.kak @@ -0,0 +1,93 @@ +# CODE + +set-face global value yellow +set-face global type yellow +set-face global variable red +set-face global module yellow +set-face global function blue +set-face global string green +set-face global keyword magenta +set-face global operator black +set-face global attribute cyan +set-face global comment black+d +set-face global documentation black+d +set-face global meta cyan +set-face global builtin yellow + +# MARKUP + +set-face global title yellow +set-face global header green +set-face global mono cyan +set-face global block magenta +set-face global link blue +set-face global bullet yellow +set-face global list white + +# BUILTIN + +set-face global Default black +set-face global PrimarySelection black,blue +set-face global SecondarySelection black,green +set-face global PrimaryCursor black,white +set-face global SecondaryCursor black,cyan +set-face global PrimaryCursorEol black,red +set-face global SecondaryCursorEol black,red +set-face global LineNumbers black +set-face global LineNumberCursor yellow +set-face global LineNumbersWrapped white +set-face global MenuForeground blue +set-face global MenuBackground default +set-face global MenuInfo green +set-face global Information default +set-face global Error red +set-face global StatusLine default +set-face global StatusLineMode yellow +set-face global StatusLineInfo blue +set-face global StatusLineValue white +set-face global StatusCursor black,blue +set-face global Prompt blue +set-face global MatchingChar +bu +set-face global BufferPadding white +set-face global Whitespace black+d + +# PLUGINS + +# kak-lsp +set-face global InlayHint +d@type +set-face global parameter +i@variable +set-face global enum cyan +set-face global InlayDiagnosticError red +set-face global InlayDiagnosticWarning yellow +set-face global InlayDiagnosticInfo blue +set-face global InlayDiagnosticHint white +set-face global LineFlagError red +set-face global LineFlagWarning yellow +set-face global LineFlagInfo blue +set-face global LineFlagHint white +set-face global DiagnosticError +u +set-face global DiagnosticWarning +u +set-face global DiagnosticInfo +u +set-face global DiagnosticHint +u +# Infobox faces +set-face global InfoDefault Information +set-face global InfoBlock block +set-face global InfoBlockQuote block +set-face global InfoBullet bullet +set-face global InfoHeader header +set-face global InfoLink link +set-face global InfoLinkMono header +set-face global InfoMono mono +set-face global InfoRule comment +set-face global InfoDiagnosticError InlayDiagnosticError +set-face global InfoDiagnosticHint InlayDiagnosticHint +set-face global InfoDiagnosticInformation InlayDiagnosticInfo +set-face global InfoDiagnosticWarning InlayDiagnosticWarning + +# kak-rainbower +try %{ set-option global rainbow_colors yellow magenta blue } + +# For backwards compatibility +define-command -override -hidden one-enable-fancy-underlines %{ + echo -debug "one-enable-fancy-underlines is deprecated - curly underlines are enabled by default" +} diff --git a/homes/common/kakoune/colors/one-light.kak b/homes/common/kakoune/colors/one-light.kak new file mode 100644 index 0000000..79e6ca1 --- /dev/null +++ b/homes/common/kakoune/colors/one-light.kak @@ -0,0 +1,117 @@ +# One Light + +declare-option str fg "4b4c54" +declare-option str bg "fafafa" +declare-option str subbg "e6e6e6" + +declare-option str lightred "e45649" +declare-option str darkred "ca1243" +declare-option str green "50a14f" +declare-option str lightorange "c18401" +declare-option str darkorange "986801" +declare-option str blue "4078f2" +declare-option str magenta "a626a4" +declare-option str cyan "0184bc" + +declare-option str comment "a0a1a7" +declare-option str hint "000000" + +declare-option str cursoralpha "80" +declare-option str selectionalpha "40" + +# Menus do not support transparency, so we must hardcode the selection + sub bg colors +declare-option str menuselection "bbc9e8" + +# CODE + +set-face global value "rgb:%opt{darkorange}" +set-face global type "rgb:%opt{lightorange}" +set-face global variable "rgb:%opt{lightred}" +set-face global module "rgb:%opt{lightorange}" +set-face global function "rgb:%opt{blue}" +set-face global string "rgb:%opt{green}" +set-face global keyword "rgb:%opt{magenta}" +set-face global operator "rgb:%opt{fg}" +set-face global attribute "rgb:%opt{cyan}" +set-face global comment "rgb:%opt{comment}" +set-face global documentation "rgb:%opt{comment}" +set-face global meta "rgb:%opt{cyan}" +set-face global builtin "rgb:%opt{lightorange}" + +# MARKUP + +set-face global title "rgb:%opt{darkorange}" +set-face global header "rgb:%opt{green}" +set-face global mono "rgb:%opt{cyan}" +set-face global block "rgb:%opt{magenta}" +set-face global link "rgb:%opt{blue}" +set-face global bullet "rgb:%opt{lightorange}" +set-face global list "rgb:%opt{fg}" + +# BUILTIN + +set-face global Default "rgb:%opt{fg},rgb:%opt{bg}" +set-face global PrimarySelection "default,rgba:%opt{blue}%opt{selectionalpha}" +set-face global SecondarySelection "default,rgba:%opt{green}%opt{selectionalpha}" +set-face global PrimaryCursor "default,rgba:%opt{blue}%opt{cursoralpha}" +set-face global SecondaryCursor "default,rgba:%opt{green}%opt{cursoralpha}" +set-face global PrimaryCursorEol "default,rgba:%opt{lightred}%opt{cursoralpha}" +set-face global SecondaryCursorEol "default,rgba:%opt{darkorange}%opt{cursoralpha}" +set-face global LineNumbers "rgb:%opt{comment}" +set-face global LineNumberCursor "rgb:%opt{darkorange}" +set-face global LineNumbersWrapped "rgb:%opt{bg},rgb:%opt{bg}" +set-face global MenuForeground "rgb:%opt{fg},rgb:%opt{menuselection}" +set-face global MenuBackground "rgb:%opt{fg},rgb:%opt{subbg}" +set-face global MenuInfo "rgb:%opt{green}" +set-face global Information "rgb:%opt{fg},rgb:%opt{subbg}" +set-face global Error "rgb:%opt{lightred}" +set-face global StatusLine "rgb:%opt{fg},rgb:%opt{subbg}" +set-face global StatusLineMode "rgb:%opt{darkorange}" +set-face global StatusLineInfo "rgb:%opt{blue}" +set-face global StatusLineValue "rgb:%opt{fg}" +set-face global StatusCursor "default,rgba:%opt{blue}%opt{cursoralpha}" +set-face global Prompt "rgb:%opt{blue}" +set-face global MatchingChar "default,rgb:%opt{subbg}" +set-face global BufferPadding "rgb:%opt{bg},rgb:%opt{bg}" +set-face global Whitespace "rgb:%opt{comment}" + +# PLUGINS + +# kak-lsp +set-face global InlayHint "+d@type" +set-face global parameter "+i@variable" +set-face global enum "rgb:%opt{cyan}" +set-face global InlayDiagnosticError "rgb:%opt{lightred}" +set-face global InlayDiagnosticWarning "rgb:%opt{lightorange}" +set-face global InlayDiagnosticInfo "rgb:%opt{blue}" +set-face global InlayDiagnosticHint "rgb:%opt{hint}" +set-face global LineFlagError "rgb:%opt{lightred}" +set-face global LineFlagWarning "rgb:%opt{lightorange}" +set-face global LineFlagInfo "rgb:%opt{blue}" +set-face global LineFlagHint "rgb:%opt{hint}" +set-face global DiagnosticError ",,rgb:%opt{lightred}+c" +set-face global DiagnosticWarning ",,rgb:%opt{lightorange}+c" +set-face global DiagnosticInfo ",,rgb:%opt{blue}+c" +set-face global DiagnosticHint ",,rgb:%opt{hint}+u" +# Infobox faces +set-face global InfoDefault Information +set-face global InfoBlock block +set-face global InfoBlockQuote block +set-face global InfoBullet bullet +set-face global InfoHeader header +set-face global InfoLink link +set-face global InfoLinkMono header +set-face global InfoMono mono +set-face global InfoRule comment +set-face global InfoDiagnosticError InlayDiagnosticError +set-face global InfoDiagnosticHint InlayDiagnosticHint +set-face global InfoDiagnosticInformation InlayDiagnosticInfo +set-face global InfoDiagnosticWarning InlayDiagnosticWarning + +# kak-rainbower +try %{ set-option global rainbow_colors "rgb:%opt{lightorange}" "rgb:%opt{magenta}" "rgb:%opt{blue}" } + +# For backwards compatibility +define-command -override -hidden one-enable-fancy-underlines %{ + echo -debug "one-enable-fancy-underlines is deprecated - curly underlines are enabled by default" +} diff --git a/homes/common/kakoune/default.nix b/homes/common/kakoune/default.nix new file mode 100644 index 0000000..7dc0eae --- /dev/null +++ b/homes/common/kakoune/default.nix @@ -0,0 +1,76 @@ +{ pkgs, ... }: + +{ + programs.kakoune = { + enable = true; + config = { + colorScheme = "one-dark"; + showWhitespace.enable = false; + scrollOff.lines = 3; + tabStop = 4; + numberLines = { + enable = true; + relative = true; + }; + ui = { + statusLine = "top"; + assistant = "cat"; + enableMouse = true; + setTitle = true; + }; + hooks = [ + { + name = "WinSetOption"; + option = "filetype=nix"; + commands = '' + set-option window indentwidth 2 + set-option window formatcmd nixpkgs-fmt + ''; + } + ]; + }; + plugins = with pkgs.kakounePlugins; [ + kakoune-rainbow + powerline-kak + auto-pairs-kak + pkgs.kak-lsp + ]; + extraConfig = '' + # Tabs + hook global InsertChar \t %{ exec -draft h@ } + add-highlighter global/ show-whitespaces -tab '│' -tabpad '╌' + + # Kak-LSP + eval %sh{kak-lsp --kakoune -s $kak_session} + lsp-enable + + # Modeline + declare-option bool lsp_enabled false + declare-option -hidden str lsp_modeline_progress "" + define-command -hidden -params 6 -override lsp-handle-progress %{ + set-option global lsp_modeline_progress %sh{ + if ! "$6"; then + echo "$2\$\{5:+" ($5%)"}\$\{4:+": $4"}" + fi + } + } + + declare-option -hidden str modeline_git_branch + hook global WinDisplay .* %{ + set-option window modeline_git_branch %sh{ + branch=$(git -C "\$\{kak_buffile%/*}" rev-parse --abbrev-ref HEAD 2>/dev/null) + if [ -n "$branch" ]; then + printf "$branch " + fi + } + } + + set-option global modelinefmt '%opt{lsp_modeline_progress} {StatusLine}{string}%opt{modeline_git_branch}{type}%sh{ [ -n "$kak_opt_filetype" ] && echo "$kak_opt_filetype " }{default}%val{bufname}{{context_info}}{default} {{mode_info}} {meta}%val{cursor_line}:%val{cursor_char_column}' + ''; + }; + + xdg.configFile."kak/colors" = { + source = ./colors; + recursive = true; + }; +} diff --git a/homes/common/latex.nix b/homes/common/latex.nix new file mode 100644 index 0000000..6c75eb4 --- /dev/null +++ b/homes/common/latex.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + texlive.combined.scheme-full + ]; +} diff --git a/homes/common/lf/default.nix b/homes/common/lf/default.nix new file mode 100644 index 0000000..000071e --- /dev/null +++ b/homes/common/lf/default.nix @@ -0,0 +1,26 @@ +{ pkgs, ... }: + +{ + programs.lf = { + enable = true; + previewer.source = ./scope; + settings = { + relativenumber = true; + number = true; + hidden = false; + preview = true; + icons = true; + }; + }; + + xdg.configFile = { + "lf/icons" = { + source = ./icons; + }; + }; + + home.packages = with pkgs; [ + ueberzug + file + ]; +} diff --git a/homes/common/lf/icons b/homes/common/lf/icons new file mode 100644 index 0000000..82bcd50 --- /dev/null +++ b/homes/common/lf/icons @@ -0,0 +1,93 @@ +di  +fi  +tw  +ow  +ln  +or  +ex  +*.txt  +*.mom  +*.me  +*.ms  +*.avif  +*.png  +*.webp  +*.ico  +*.gif  +*.tif  +*.tiff  +*.jpg  +*.jpe  +*.jpeg  +*.heif  +*.svg  +*.xcf  +*.gpg  +*.pdf  +*.djvu  +*.epub  +*.csv  +*.xlsx  +*.tex  +*.md  +*.mp3  +*.opus  +*.ogg  +*.m4a  +*.flac  +*.wav  +*.mkv  +*.mp4  +*.webm  +*.mpeg  +*.avi  +*.mov  +*.mpg  +*.wmv  +*.m4b  +*.flv  +*.zip  +*.rar  +*.7z  +*.tar  +*.gz  +*.z64 󰺷 +*.v64 󰺷 +*.n64 󰺷 +*.gdi 󰺷 +*.gba 󱎓 +*.nes 󰺶 +*.exe  +*.1  +*.nfo  +*.info  +*.log  +*.iso  +*.img  +*.bib  +*.part 󰋮 +*.torrent  +*.gitignore  +*.jar  +*.java  +*.r  +*.R  +*.rmd  +*.Rmd  +*.m  +*.rs  +*.go  +*.c  +*.cpp  +*.h  +*.py  +*.js  +*.json  +*.ts 󰛦 +*.sh  +*.html  +*.css  +*.xml  +*.php  +*.nix  +*.vim  diff --git a/homes/common/lf/scope b/homes/common/lf/scope new file mode 100755 index 0000000..e842d5a --- /dev/null +++ b/homes/common/lf/scope @@ -0,0 +1,40 @@ +#!/usr/bin/env sh + +# File preview handler for lf. + +set -C -f +IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}" + +# Note that the cache file name is a function of file information, meaning if +# an image appears in multiple places across the machine, it will not have to +# be regenerated once seen. + +case "$(file --dereference --brief --mime-type -- "$1")" in + image/avif) CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" + [ ! -f "$CACHE" ] && convert "$1" "$CACHE.jpg" + image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" ;; + image/*) lsix "$1" ;; + text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;; + text/troff) man ./ "$1" | col -b ;; + text/* | */xml | application/json) bat --terminal-width "$(($4-2))" -f "$1" ;; + audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;; + video/* ) + CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" + [ ! -f "$CACHE" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0 + image "$CACHE" "$2" "$3" "$4" "$5" "$1" + ;; + */pdf) + CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" + [ ! -f "$CACHE.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE" + image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" + ;; + */epub+zip|*/mobi*) + CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" + [ ! -f "$CACHE.jpg" ] && gnome-epub-thumbnailer "$1" "$CACHE.jpg" + image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1" + ;; + application/*zip) atool --list -- "$1" ;; + *opendocument*) odt2txt "$1" ;; + application/pgp-encrypted) gpg -d -- "$1" ;; +esac +exit 1 diff --git a/homes/common/media-tools.nix b/homes/common/media-tools.nix new file mode 100644 index 0000000..d7944c0 --- /dev/null +++ b/homes/common/media-tools.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + imagemagick + libheif + ffmpeg + ]; +} diff --git a/homes/common/python.nix b/homes/common/python.nix new file mode 100644 index 0000000..08779fd --- /dev/null +++ b/homes/common/python.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + python312Full + ]; +} diff --git a/homes/common/rust.nix b/homes/common/rust.nix new file mode 100644 index 0000000..e31bc39 --- /dev/null +++ b/homes/common/rust.nix @@ -0,0 +1,15 @@ +{ config, pkgs, ... }: + +{ + home.packages = with pkgs; [ + rustup + ]; + + home = { + sessionVariables = { + CARGO_HOME = "${config.xdg.dataHome}/cargo"; + RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; + }; + sessionPath = [ "${config.home.sessionVariables.CARGO_HOME}/bin" ]; + }; +} diff --git a/homes/common/shell.nix b/homes/common/shell.nix new file mode 100644 index 0000000..17f86c5 --- /dev/null +++ b/homes/common/shell.nix @@ -0,0 +1,37 @@ +{ + home = { + shellAliases = { + cp = "cp -iv"; + mv = "mv -iv"; + rm = "rm -vI"; + mkd = "mkdir -pv"; + c = "clear"; + e = "exit"; + + v = "nvim"; + vi = "nvim"; + ka = "killall"; + nf = "neofetch"; + tf = "pridefetch -f trans"; + pf = "pfetch"; + i = "inertia"; + + mac-system-update = "nix flake update $NIXFILES && darwin-rebuild switch --flake $NIXFILES"; + + btop = "btop --utf-force"; + grep = "grep --color=auto"; + diff = "diff --color=auto"; + }; + + sessionVariables = { + LANG = "en_GB.UTF-8"; + LC_ALL = "en_GB.UTF-8"; + + NIXFILES = "$HOME/Documents/Code/NixFiles"; + }; + + sessionPath = [ + "$HOME/.local/bin" + ]; + }; +} diff --git a/homes/common/ssh/default.nix b/homes/common/ssh/default.nix new file mode 100644 index 0000000..e0ea264 --- /dev/null +++ b/homes/common/ssh/default.nix @@ -0,0 +1,18 @@ +{ + programs.ssh = { + enable = true; + matchBlocks = { + jet = { + identityFile = "~/.ssh/id_ed25519_sk"; + hostname = "jet.echo.clicks.domains"; + user = "maddie"; + }; + clicks = { + identityFile = "~/.ssh/clickscodes"; + hostname = "git.clicks.codes"; + port = 29418; + user = "maddie"; + }; + }; + }; +} diff --git a/homes/common/ssh/maddie.pub b/homes/common/ssh/maddie.pub new file mode 100644 index 0000000..5494a06 --- /dev/null +++ b/homes/common/ssh/maddie.pub @@ -0,0 +1,3 @@ +sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIA1jTkcMhBQQoYqNVLofrNnTbB8RCyzSYmdsnPeoOineAAAABHNzaDo= spy@luna (yubikey) +ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBO9WsQUnglNetqekCoA6WT0wYNxpUVyNxuktPOHJPBCLJmU9P+YErE915vj4HlYcuOW9UhVajQzLQTcelgs/O8w= M.iPad (Termius) +ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBD44bc9OdsIxwNBkdIN5Ce+Wer2gWi+QRcFdOV7+ScIo1QS29wkQJxU90ItcKwqiv+oTBlipV2NSH/YroBSHhQI= M.iPad (Secure ShellFish) diff --git a/homes/common/starship.nix b/homes/common/starship.nix new file mode 100644 index 0000000..b9c9151 --- /dev/null +++ b/homes/common/starship.nix @@ -0,0 +1,68 @@ +{ lib, ... }: + +{ + programs.starship = { + enable = true; + enableZshIntegration = true; + + settings = { + format = lib.concatStrings [ + "$directory" + + "$git_branch" + "$git_commit" + "$git_state" + "$git_metrics" + "$git_status" + "$hg_branch" + + "$package" + "$c" + "$rust" + "$golang" + "$haskell" + "$python" + "$java" + "$kotlin" + "$lua" + "$dart" + "$nim" + "$nodejs" + "$swift" + "$zig" + "$nix_shell" + "$conda" + "$spack" + + "$line_break" + "$username" + "$hostname" + "$localip" + "$cmd_duration" + "$memory_usage" + "$jobs" + "$character" + ]; + + character = { + success_symbol = "-> [λ](bold purple)"; + error_symbol = "-> [λ](bold red)"; + vimcmd_symbol = "-> [λ](bold green)"; + }; + + directory.truncation_symbol = ".../"; + + git_metrics.disabled = false; + git_status = { + ahead = "->"; + behind = "<-"; + diverged = "<->"; + renamed = ">>"; + deleted = "x"; + }; + + memory_usage.disabled = false; + localip.disabled = false; + }; + }; +} diff --git a/homes/common/tmux.nix b/homes/common/tmux.nix new file mode 100644 index 0000000..e176589 --- /dev/null +++ b/homes/common/tmux.nix @@ -0,0 +1,8 @@ +{ + programs.tmux = { + enable = true; + clock24 = true; + mouse = true; + terminal = "screen-256color"; + }; +} diff --git a/homes/common/wezterm.nix b/homes/common/wezterm.nix new file mode 100644 index 0000000..310c024 --- /dev/null +++ b/homes/common/wezterm.nix @@ -0,0 +1,19 @@ +{ + programs.wezterm = { + enable = true; + extraConfig = '' + return { + front_end = 'WebGpu', + color_scheme = 'OneDark (base16)', + hide_tab_bar_if_only_one_tab = true, + window_close_confirmation = 'NeverPrompt', + window_padding = { + left = 0, + right = 0, + top = 0, + bottom = 0, + } + } + ''; + }; +} diff --git a/homes/common/xdg.nix b/homes/common/xdg.nix new file mode 100644 index 0000000..f742448 --- /dev/null +++ b/homes/common/xdg.nix @@ -0,0 +1,17 @@ +{ config, ... }: + +{ + home = { + sessionVariables = { + CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv"; + LESSHISTFILE = "${config.xdg.configHome}/less/history"; + LESSKEY = "${config.xdg.configHome}/less/keys"; + WINEPREFIX = "${config.xdg.dataHome}/wine"; + _JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${config.xdg.configHome}/java"; + }; + + shellAliases = { + wget = "wget --hsts-file='${config.xdg.dataHome}/wget-hsts'"; + }; + }; +} diff --git a/homes/common/zsh.nix b/homes/common/zsh.nix new file mode 100644 index 0000000..d062971 --- /dev/null +++ b/homes/common/zsh.nix @@ -0,0 +1,46 @@ +{ config, lib, ... }: + +{ + programs.zsh = { + enable = true; + + autosuggestion.enable = true; + enableCompletion = true; + syntaxHighlighting.enable = true; + autocd = true; + dotDir = ".config/zsh"; + history = { + size = 9999999; + expireDuplicatesFirst = true; + extended = true; + path = "${config.xdg.cacheHome}/zsh/history"; + }; + + # Zsh init extras + initExtra = '' + # Disable Ctrl-S to freeze terminal + stty stop undef + + # Tab completion + zstyle ':completion:*' menu select # Use a menu + _comp_options+=(globdots) # Include hidden files + + # Change cursor shape for different vi modes + export KEYTIMEOUT=1 + function zle-keymap-select () { + case $KEYMAP in + vicmd) echo -ne '\e[1 q';; # block + viins|main) echo -ne '\e[5 q';; # beam + esac + } + zle -N zle-keymap-select + zle-line-init() { + zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) + echo -ne "\e[5 q" + } + zle -N zle-line-init + echo -ne '\e[5 q' # Use beam shape cursor on startup. + preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. + ''; + }; +} diff --git a/homes/desktop/alacritty.nix b/homes/desktop/alacritty.nix new file mode 100644 index 0000000..9c57f2e --- /dev/null +++ b/homes/desktop/alacritty.nix @@ -0,0 +1,31 @@ +{ + programs.alacritty = { + enable = true; + settings = { + window = { + decorations = "none"; + dynamic_padding = true; + padding = { + x = 0; + y = 0; + }; + startup_mode = "Maximized"; + }; + + font = { + normal.family = "IosevkaNerdFont"; + bold.family = "IosevkaNerdFont"; + italic.family = "IosevkaNerdFont"; + size = 12; + }; + scrolling.history = 10000; + + colors.draw_bold_text_with_bright_colors = true; + window.opacity = 0.9; + + import = [ + ./alacritty/onedark.toml + ]; + }; + }; +} diff --git a/homes/desktop/alacritty/onedark.toml b/homes/desktop/alacritty/onedark.toml new file mode 100644 index 0000000..69ea57c --- /dev/null +++ b/homes/desktop/alacritty/onedark.toml @@ -0,0 +1,29 @@ +# Colors (One Dark) + +# Default colors +[colors.primary] +background = '#1e2127' +foreground = '#abb2bf' + +# Normal colors +[colors.normal] +black = '#1e2127' +red = '#e06c75' +green = '#98c379' +yellow = '#d19a66' +blue = '#61afef' +magenta = '#c678dd' +cyan = '#56b6c2' +white = '#abb2bf' + +# Bright colors +[colors.bright] +black = '#5c6370' +red = '#e06c75' +green = '#98c379' +yellow = '#d19a66' +blue = '#61afef' +magenta = '#c678dd' +cyan = '#56b6c2' +white = '#ffffff' + diff --git a/homes/desktop/anyrun.nix b/homes/desktop/anyrun.nix new file mode 100644 index 0000000..48a7027 --- /dev/null +++ b/homes/desktop/anyrun.nix @@ -0,0 +1,63 @@ +{ inputs, pkgs, ... }: + +{ + programs.anyrun = { + enable = true; + + config = { + plugins = with inputs.anyrun.packages.${pkgs.stdenv.hostPlatform.system}; [ + applications + rink + shell + translate + kidex + symbols + ]; + + x = { fraction = 0.5; }; + y = { fraction = 0.3; }; + width = { fraction = 0.3; }; + closeOnClick = true; + + }; + extraCss = '' + #window { + background-color: transparent; + } + #main * { + background-color: #282c34; + color: #ABB2BF; + caret-color: alpha(#ABB2BF,0.6); + font-family: FontAwesome, Inter; + } + #main { + border-width: 3px; + border-style: solid; + border-color: #ABB2BF; + border-radius: 0px; + } + #main #main { + border-style: none; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + } + #match-title, #match-desc { + font-family: FontAwesome, Inter; + } + #entry { + min-height: 25px; + padding: 10px; + font-size: 20px; + box-shadow: none; + border-style: none; + } + #entry:focus { + box-shadow: none; + } + #entry selection { + background-color: alpha(#E5C07B,0.3); + color: transparent; + } + ''; + }; +} diff --git a/homes/desktop/audio.nix b/homes/desktop/audio.nix new file mode 100644 index 0000000..172d119 --- /dev/null +++ b/homes/desktop/audio.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + pulsemixer # TUI sound mixer + playerctl # Manages media players + pamixer # CLI sound mixer + cava # Music visualiser + ]; +} diff --git a/homes/desktop/chromium.nix b/homes/desktop/chromium.nix new file mode 100644 index 0000000..6078010 --- /dev/null +++ b/homes/desktop/chromium.nix @@ -0,0 +1,27 @@ +{ + programs.chromium = { + enable = true; + commandLineArgs = [ + "--enable-logging=stderr" + "--ignore-gpu-blocklist" + ]; + extensions = [ + # Dark Reader + { id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; } + # uBlock Origin + { id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } + # I still don't care about cookies + { id = "edibdbjcniadpccecjdfdjjppcpchdlm"; } + # NoScript + { id = "doojmbjmlfjjnbmnoijecmcbfeoakpjm"; } + # Reddit Enhancement Suite + { id = "kbmfpngjjgdllneeigpgjifpgocmfgmb"; } + # Old Reddit Redirect + { id = "dneaehbmnbhcippjikoajpoabadpodje"; } + # Return Youtube Dislike + { id = "gebbhagfogifgggkldgodflihgfeippi"; } + # Vimium + { id = "dbepggeogbaibhgnhhndojpepiihcmeb"; } + ]; + }; +} diff --git a/homes/desktop/cider.nix b/homes/desktop/cider.nix new file mode 100644 index 0000000..9923943 --- /dev/null +++ b/homes/desktop/cider.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + cider + ]; +} diff --git a/homes/desktop/cursor.nix b/homes/desktop/cursor.nix new file mode 100644 index 0000000..7492198 --- /dev/null +++ b/homes/desktop/cursor.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: + +{ + home.pointerCursor = { + name = "macOS"; + package = pkgs.apple-cursor; + size = 24; + gtk.enable = true; + }; +} diff --git a/homes/desktop/discord.nix b/homes/desktop/discord.nix new file mode 100644 index 0000000..523b89e --- /dev/null +++ b/homes/desktop/discord.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + discord-canary + ]; +} diff --git a/homes/desktop/element.nix b/homes/desktop/element.nix new file mode 100644 index 0000000..28e99a0 --- /dev/null +++ b/homes/desktop/element.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + element-desktop + ]; +} diff --git a/homes/desktop/games.nix b/homes/desktop/games.nix new file mode 100644 index 0000000..7e39ec8 --- /dev/null +++ b/homes/desktop/games.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + gzdoom + ]; +} diff --git a/homes/desktop/gtk.nix b/homes/desktop/gtk.nix new file mode 100644 index 0000000..167b11a --- /dev/null +++ b/homes/desktop/gtk.nix @@ -0,0 +1,35 @@ +{ pkgs, ... }: + +{ + gtk = { + enable = true; + font = { + package = pkgs.inter; + name = "Inter"; + size = 11; + }; + theme = { + package = pkgs.adwaita-icon-theme; + name = "Adwaita-dark"; + }; + iconTheme = { + name = "Adwaita-dark"; + package = pkgs.gnome-themes-extra; + }; + }; + + qt = { + enable = true; + platformTheme.name = "adwaita"; + style.name = "adwaita-dark"; + }; + + dconf = { + enable = true; + settings = { + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + }; + }; + }; +} diff --git a/homes/desktop/home.nix b/homes/desktop/home.nix new file mode 100644 index 0000000..d917db0 --- /dev/null +++ b/homes/desktop/home.nix @@ -0,0 +1,10 @@ +{ username, lib, ... }: + +{ + programs.home-manager.enable = true; + home = { + inherit username; + homeDirectory = lib.mkForce "/home/${username}"; + stateVersion = "24.11"; + }; +} diff --git a/homes/desktop/hyprland.nix b/homes/desktop/hyprland.nix new file mode 100644 index 0000000..a6f67fe --- /dev/null +++ b/homes/desktop/hyprland.nix @@ -0,0 +1,194 @@ +{ inputs, pkgs, config, ... }: + +{ + wayland.windowManager.hyprland = { + enable = true; + package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + + xwayland.enable = true; + systemd.enable = true; + + settings = + let + mod = "SUPER"; + terminal = "${pkgs.alacritty}/bin/alacritty"; + launcher = "${inputs.anyrun.packages.${pkgs.stdenv.hostPlatform.system}.anyrun}/bin/anyrun"; + browser = "${pkgs.librewolf}/bin/librewolf"; + lock = "${pkgs.hyprlock}/bin/hyprlock --immediate"; + zoom = "${inputs.woomer.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/woomer"; + screenshot = "${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -d)\" - | ${pkgs.wl-clipboard}/bin/wl-copy"; + system_search = "${terminal} --class systemSearch --title \"System Search\" -e \"zsh nvim $(find $HOME/* -type f | fzf)\""; + clipboard_history = "${terminal} --class clipse --title \"Clipboard History\" -e ${pkgs.clipse}/bin/clipse"; + powermenu = "${pkgs.wlogout}/bin/wlogout"; + in + { + general = { + "col.active_border" = "rgba(313439ee) rgba(313439ee) 0deg"; + "col.inactive_border" = "rbga(121317ee) rgba(313439ee) 0deg"; + }; + + exec-once = [ + "sleep 0.5 && systemctl --user restart xdg-desktop-portal-gtk xdg-desktop-portal-hyprland xdg-desktop-portal pipewire wireplumber" + "${pkgs.hyprpaper}/bin/hyprpaper" + "${pkgs.waybar}/bin/waybar" + "${config.wayland.windowManager.hyprland.package}/bin/hyprctl setcursor macOS 24" + "${pkgs.clipse}/bin/clipse -listen" + ]; + + input = { + kb_layout = "gb"; + sensitivity = 0.6; + }; + + animations = { + enabled = true; + bezier = "myBezier, 0.645, 0.045, 0.355, 1"; + + animation = [ + "windows, 1, 4, myBezier" + "windowsOut, 1, 4, myBezier" + "border, 1, 4, default" + "fade, 1, 4, default" + "workspaces, 1, 4, myBezier" + ]; + }; + + general = { + gaps_in = 5; + gaps_out = 10; + border_size = 3; + layout = "master"; + }; + + misc = { + disable_hyprland_logo = true; + disable_splash_rendering = true; + }; + + windowrulev2 = [ + "opacity 0.8 0.8,initialTitle:^(wezterm)$" + "opacity 0.8 0.8,initialTitle:^(Alacritty)$" + "suppressevent maximize, class:.*" + "float, class:(clipse)" + "size 622 652, class:(clipse)" + "float, class:(systemSearch)" + "size 622 652, class:(systemSearch)" + ]; + + layerrule = [ + "blur,waybar" + ]; + + decoration = { + rounding = 0; + drop_shadow = true; + shadow_range = 8; + shadow_offset = "0, 0"; + active_opacity = 1; + inactive_opacity = 1; + fullscreen_opacity = 1; + blur = { + size = 8; + passes = 2; + }; + }; + + master = { + mfact = 0.5; + }; + + cursor = { + no_hardware_cursors = true; + }; + + monitor = [ "DP-1, 2560x1440@144, 0x0, 1" ]; + + env = [ + "LIBVA_DRIVER_NAME,nvidia" + "XDG_SESSION_TYPE,wayland" + "XDG_CURRENT_DESKTOP,Hyprland" + "GBM_BACKEND,nvidia-drm" + "__GLX_VENDOR_LIBRARY_NAME,nvidia" + "ELECTRON_OZONE_PLATFORM_HINT,auto" + "WLR_NO_HARDWARE_CURSORS,1" + "NIXOS_OZONE_WL,1" + ]; + + # Keybinds + bind = [ + "${mod}, Q, killactive" + "${mod}, F, togglefloating" + "${mod} SHIFT, R, forcerendererreload" + "${mod} SHIFT, E, exit" + "${mod}, M, fullscreen, 0" + "${mod}, P, pin" + "${mod} SHIFT, M, fullscreen, 1" + + # Screenshot + "${mod} SHIFT, S, exec, ${screenshot}" + ", Print, exec, ${screenshot}" + + # Programs + "${mod}, RETURN, exec, ${terminal}" + "${mod} SHIFT, RETURN, bringactivetotop" + "${mod}, SPACE, exec, ${launcher}" + "${mod}, D, exec, ${launcher}" + "${mod}, B, exec, ${browser}" + "${mod}, Z, exec, ${zoom}" + "${mod}, X, exec, ${powermenu}" + ", Insert, exec, ${lock}" + + # Function Keys + "${mod}, F2, exec, ${clipboard_history}" + "${mod}, F3, exec, ${system_search}" + + # Move focus + "${mod}, h, movefocus, l" + "${mod}, j, movefocus, d" + "${mod}, k, movefocus, u" + "${mod}, l, movefocus, r" + + # Moving windows + "${mod} SHIFT, h, movewindow, l" + "${mod} SHIFT, j, movewindow, d" + "${mod} SHIFT, k, movewindow, u" + "${mod} SHIFT, l, movewindow, r" + + # Workspaces + "${mod}, 1, workspace, 1" + "${mod}, 2, workspace, 2" + "${mod}, 3, workspace, 3" + "${mod}, 4, workspace, 4" + "${mod}, 5, workspace, 5" + "${mod}, 6, workspace, 6" + "${mod}, 7, workspace, 7" + "${mod}, 8, workspace, 8" + "${mod}, 9, workspace, 9" + "${mod}, 0, workspace, 10" + + "${mod} SHIFT, 1, movetoworkspacesilent, 1" + "${mod} SHIFT, 2, movetoworkspacesilent, 2" + "${mod} SHIFT, 3, movetoworkspacesilent, 3" + "${mod} SHIFT, 4, movetoworkspacesilent, 4" + "${mod} SHIFT, 5, movetoworkspacesilent, 5" + "${mod} SHIFT, 6, movetoworkspacesilent, 6" + "${mod} SHIFT, 7, movetoworkspacesilent, 7" + "${mod} SHIFT, 8, movetoworkspacesilent, 8" + "${mod} SHIFT, 9, movetoworkspacesilent, 9" + "${mod} SHIFT, 0, movetoworkspacesilent, 10" + + "${mod}, mouse_right, workspace, e-1" + "${mod}, mouse_left, workspace, e+1" + ]; + + bindm = [ + "${mod}, mouse:272, movewindow" + "${mod}, mouse:273, resizewindow" + ]; + }; + }; + + home.packages = with pkgs; [ + wl-clipboard + ]; +} diff --git a/homes/desktop/hyprlock.nix b/homes/desktop/hyprlock.nix new file mode 100644 index 0000000..aedd915 --- /dev/null +++ b/homes/desktop/hyprlock.nix @@ -0,0 +1,39 @@ +{ + programs.hyprlock = { + enable = true; + settings = { + general = { + disable_loading_bar = true; + grace = 300; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "/home/maddie/Code/NixFiles/homes/desktop/hyprpaper/nasa-img-09-13.png"; + blur_passes = 3; + blur_size = 8; + } + ]; + + input-field = [ + { + placeholder_text = ""; + size = "300, 70"; + rounding = -1; + position = "0, 0"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_color = "#ffffff"; + fail_color = "#e06c75"; + inner_color = "#1e2127"; + outer_color = "#5c6370"; + outline_thickness = 3; + shadow_passes = 0; + } + ]; + }; + }; +} diff --git a/homes/desktop/hyprpaper.nix b/homes/desktop/hyprpaper.nix new file mode 100644 index 0000000..ec9311b --- /dev/null +++ b/homes/desktop/hyprpaper.nix @@ -0,0 +1,10 @@ +{ + services.hyprpaper = { + enable = true; + + settings = { + preload = [ "/home/maddie/Code/NixFiles/homes/desktop/hyprpaper/nasa-img-09-13.png" ]; + wallpaper = [ ",/home/maddie/Code/NixFiles/homes/desktop/hyprpaper/nasa-img-09-13.png" ]; + }; + }; +} diff --git a/homes/desktop/hyprpaper/nasa-img-09-13.png b/homes/desktop/hyprpaper/nasa-img-09-13.png new file mode 100644 index 0000000..463660a Binary files /dev/null and b/homes/desktop/hyprpaper/nasa-img-09-13.png differ diff --git a/homes/desktop/kdeconnect.nix b/homes/desktop/kdeconnect.nix new file mode 100644 index 0000000..0ae3dbb --- /dev/null +++ b/homes/desktop/kdeconnect.nix @@ -0,0 +1,3 @@ +{ + services.kdeconnect.enable = true; +} diff --git a/homes/desktop/kitty.nix b/homes/desktop/kitty.nix new file mode 100644 index 0000000..29f67c1 --- /dev/null +++ b/homes/desktop/kitty.nix @@ -0,0 +1,12 @@ +{ + programs.kitty = { + enable = true; + font.name = "JetBrains Mono Nerd Font"; + font.size = 12; + theme = "One Half Dark"; + shellIntegration.enableZshIntegration = true; + settings = { + confirm_os_window_close = -1; + }; + }; +} diff --git a/homes/desktop/librewolf.nix b/homes/desktop/librewolf.nix new file mode 100644 index 0000000..cc16e84 --- /dev/null +++ b/homes/desktop/librewolf.nix @@ -0,0 +1,10 @@ +{ + programs.librewolf = { + enable = true; + settings = { + "browser.uidensity" = 1; + "webgl.disabled" = false; + "privacy.resistFingerprinting" = true; + }; + }; +} diff --git a/homes/desktop/minecraft.nix b/homes/desktop/minecraft.nix new file mode 100644 index 0000000..ceb08cd --- /dev/null +++ b/homes/desktop/minecraft.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + prismlauncher + ]; +} diff --git a/homes/desktop/mpv.nix b/homes/desktop/mpv.nix new file mode 100644 index 0000000..bc80a32 --- /dev/null +++ b/homes/desktop/mpv.nix @@ -0,0 +1,8 @@ +{ + programs.mpv = { + enable = true; + config = { + loop-file = "inf"; + }; + }; +} diff --git a/homes/desktop/ncdu.nix b/homes/desktop/ncdu.nix new file mode 100644 index 0000000..6489223 --- /dev/null +++ b/homes/desktop/ncdu.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + ncdu_2 + ]; +} diff --git a/homes/desktop/steam.nix b/homes/desktop/steam.nix new file mode 100644 index 0000000..818135f --- /dev/null +++ b/homes/desktop/steam.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + steam + steam-run + ]; +} diff --git a/homes/desktop/syncplay.nix b/homes/desktop/syncplay.nix new file mode 100644 index 0000000..0938ad1 --- /dev/null +++ b/homes/desktop/syncplay.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + syncplay + ]; +} diff --git a/homes/desktop/terminals.nix b/homes/desktop/terminals.nix new file mode 100644 index 0000000..e9abb6c --- /dev/null +++ b/homes/desktop/terminals.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + cool-retro-term # Retro-style terminal + st # Suckless terminal + ]; +} diff --git a/homes/desktop/tor-browser.nix b/homes/desktop/tor-browser.nix new file mode 100644 index 0000000..f76222e --- /dev/null +++ b/homes/desktop/tor-browser.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + tor-browser-bundle-bin + ]; +} diff --git a/homes/desktop/uxplay.nix b/homes/desktop/uxplay.nix new file mode 100644 index 0000000..850038f --- /dev/null +++ b/homes/desktop/uxplay.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + uxplay + ]; +} diff --git a/homes/desktop/waybar.nix b/homes/desktop/waybar.nix new file mode 100644 index 0000000..ce4bdc0 --- /dev/null +++ b/homes/desktop/waybar.nix @@ -0,0 +1,136 @@ +{ pkgs, ... }: + +{ + programs.waybar = { + enable = true; + + settings = { + mainBar = { + layer = "top"; + position = "top"; + #margin = "10 10 0 10"; + margin = "0 0 0 0"; + modules-left = [ "hyprland/workspaces" "hyprland/window" ]; + modules-center = [ ]; + modules-right = [ "privacy" "tray" "pulseaudio" "temperature" "custom/mem" "cpu" "disk" "network" "clock" ]; + "hyprland/window" = { + "icon" = true; + }; + "tray" = { + "icon-size" = 21; + "spacing" = 10; + }; + disk = { + "interval" = 30; + "format" = " {specific_used:0.1f}/{specific_total:0.1f} GB"; + "path" = "/"; + unit = "GB"; + }; + temperature = { + thermal-zone = 2; + critical-threshold = 80; + format = " {temperatureC}°C"; + }; + privacy = { + "icon-size" = 17; + "transition-duration" = 250; + "modules" = [ + { + "type" = "screenshare"; + "tooltip" = true; + "tooltip-icon-size" = 24; + } + { + "type" = "audio-in"; + "tooltip" = true; + "tooltip-icon-size" = 24; + } + ]; + }; + network = { + "interface" = "eno1"; + "format" = "{ifname}: Connecting"; + "format-ethernet" = " {ipaddr}"; + "format-disconnected" = "{ifname}: Disconnected"; + "tooltip-format" = "{ifname} via {gwaddr} 󰊗"; + "tooltip-format-wifi" = "{essid} ({signalStrength}%) "; + "tooltip-format-ethernet" = "{ifname} "; + "tooltip-format-disconnected" = "Disconnected"; + "max-length" = 50; + }; + clock = { + "interval" = 1; + "format" = " {:%T}"; + "format-alt" = " {:%a %d %b %Y, %T}"; + "tooltip-format" = "{calendar}"; + "calendar" = { + "mode" = "year"; + "mode-mon-col" = 3; + "weeks-pos" = "right"; + "on-scroll" = 1; + "format" = { + "months" = "{}"; + "days" = "{}"; + "weeks" = "W{}"; + "weekdays" = "{}"; + "today" = "{}"; + }; + }; + "actions" = { + "on-click-right" = "mode"; + "on-scroll-up" = "shift_up"; + "on-scroll-down" = "shift_down"; + }; + }; + pulseaudio = { + "scroll-step" = 1; + "reverse-scrolling" = 1; + "format" = "{icon} {volume}% {format_source}"; + "format-bluetooth" = "{icon}  {volume}% {format_source}"; + "format-bluetooth-muted" = " {icon}  {format_source}"; + "format-muted" = " {format_source}"; + "format-source" = " {volume}%"; + "format-source-muted" = " "; + "format-icons" = { + "headphone" = " "; + "hands-free" = ""; + "headset" = " "; + "phone" = " "; + "portable" = " "; + "car" = " "; + "default" = ["" " " " "]; + }; + "on-click" = "${pkgs.pavucontrol}/bin/pavucontrol"; + "min-length" = 13; + }; + "custom/mem" = { + "format" = " {}"; + "interval" = 5; + "exec" = "free -h | awk '/Mem:/{printf $3}'"; + "tooltip" = false; + "min-length" = 6; + }; + cpu = { + "interval" = 2; + "format" = " {usage}%"; + "min-length" = 6; + }; + + }; + }; + + /*style = '' + @define-color background #282c34; + @define-color active #528BFF; + @define-color hover #1D2025; + @define-color text #ABB2BF; + @define-color altText #ABB2BF; + @define-color critical #E06C75; + @define-color warning #E5C07B; + @define-color charging #98C379; + '' + builtins.readFile ./waybar/main.css;*/ + + style = builtins.readFile ./waybar/main.css; + + }; +} diff --git a/homes/desktop/waybar/main.css b/homes/desktop/waybar/main.css new file mode 100644 index 0000000..ffd33e7 --- /dev/null +++ b/homes/desktop/waybar/main.css @@ -0,0 +1,238 @@ +* { + font-family: Iosevka Nerd Font, JetBrainsMono Nerd Font, sans-serif; + font-size: 17px; +} + +window#waybar { + background-color: #121317; + border-radius: 0px; + color: #ffffff; + transition-property: background-color; + transition-duration: .5s; +} + +window#waybar.hidden { + opacity: 0.2; +} + +button { + /* Use box-shadow instead of border so the text isn't offset */ + box-shadow: inset 0 -3px transparent; + /* Avoid rounded borders under each button name */ + border: none; + border-radius: 0px; +} + +/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ +button:hover { + background: inherit; +} + +/* Workspaces */ +#workspaces { + margin: 0px 5px 0px 0px; +} + +#workspaces button { + border-radius: 0px; + padding: 0 5px; + background: #121317; + color: #D6DEEB; +} + +#workspaces button:hover { + background: #5c6370; +} + +#workspaces button.active { + background: #313439; +} + +#workspaces button.urgent { + background-color: #e06c75; +} + + + +#custom-mem, +#clock, +#battery, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#network, +#pulseaudio, +#wireplumber, +#custom-media, +#tray, +#mode, +#idle_inhibitor, +#scratchpad, +#power-profiles-daemon, +#mpd { + margin: 0px 0px 0px 0px; + border-radius: 0px; + padding: 0 10px; + color: #ffffff; +} + + +/* If workspaces is the rightmost module, omit right margin */ +.modules-right>widget:last-child>#workspaces { + margin-right: 0px; +} + +#clock { + background-color: #D6DEEB; + color: black; +} + +label:focus { + background-color: #000000; +} + +#cpu { + background-color: #2ecc71; + color: #000000; +} + +#memory { + background-color: #d19a66; + color: black; +} + +#custom-mem { + background-color: #d19a66; + color: black; +} + +#disk { + background-color: #c678dd; + color: black; +} + +#network { + background-color: #56b6c2; + color: black; +} + +#network.disconnected { + background-color: #f53c3c; +} + +#pulseaudio { + background-color: #f1c40f; + color: #000000; +} + +#pulseaudio.muted { + background-color: #90b1b1; + color: #2a5c45; +} + +#wireplumber { + background-color: #fff0f5; + color: #000000; +} + +#wireplumber.muted { + background-color: #f53c3c; +} + +#custom-media { + background-color: #66cc99; + color: #2a5c45; + min-width: 100px; +} + +#custom-media.custom-spotify { + background-color: #66cc99; +} + +#custom-media.custom-vlc { + background-color: #ffa000; +} + +#temperature { + background-color: #61afef; + color: black; +} + +#temperature.critical { + background-color: #e06c75; + color: black; +} + +#tray { + background-color: #2980b9; +} + +#tray>.passive { + -gtk-icon-effect: dim; +} + +#tray>.needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; +} + +#idle_inhibitor { + background-color: #2d3436; +} + +#idle_inhibitor.activated { + background-color: #ecf0f1; + color: #2d3436; +} + +#mpd { + background-color: #66cc99; + color: #2a5c45; +} + +#mpd.disconnected { + background-color: #f53c3c; +} + +#mpd.stopped { + background-color: #90b1b1; +} + +#mpd.paused { + background-color: #51a37a; +} + +#language { + background: #00b093; + color: #740864; + padding: 0 5px; + margin: 0 5px; + min-width: 16px; +} + +#keyboard-state { + background: #97e1ad; + color: #000000; + padding: 0 0px; + margin: 0 5px; + min-width: 16px; +} + +#privacy { + padding: 0px; +} + +#privacy-item { + padding: 0 5px; + color: black; +} + +#privacy-item.screenshare { + background-color: #c678dd; +} + +#privacy-item.audio-in { + background-color: #d19a66; +} diff --git a/homes/desktop/wine.nix b/homes/desktop/wine.nix new file mode 100644 index 0000000..8de63c6 --- /dev/null +++ b/homes/desktop/wine.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + bottles + wine + ]; +} diff --git a/homes/desktop/wlogout.nix b/homes/desktop/wlogout.nix new file mode 100644 index 0000000..3dc3edd --- /dev/null +++ b/homes/desktop/wlogout.nix @@ -0,0 +1,93 @@ +{ pkgs, ... }: + +{ + programs.wlogout = { + enable = true; + layout = [ + { + "label" = "lock"; + "action" = "loginctl lock-session"; + "text" = "Lock"; + "keybind" = "l"; + } + { + "label" = "shutdown"; + "action" = "systemctl poweroff"; + "text" = "Shutdown"; + "keybind" = "s"; + } + { + "label" = "logout"; + "action" = "loginctl terminate-user $USER"; + "text" = "Logout"; + "keybind" = "e"; + } + { + "label" = "hibernate"; + "action" = "systemctl hibernate"; + "text" = "Hibernate"; + "keybind" = "h"; + } + { + "label" = "suspend"; + "action" = "systemctl suspend"; + "text" = "Suspend"; + "keybind" = "u"; + } + { + "label" = "reboot"; + "action" = "systemctl reboot"; + "text" = "Reboot"; + "keybind" = "r"; + } + ]; + style = '' + * { + background-image: none; + } + window { + background-color: rgba(30, 33, 39, 0.8); + } + button { + background-color: #1e2127; + border-style: solid; + border-width: 0px; + border-radius: 0; + background-repeat: no-repeat; + background-position: center; + background-size: 25%; + color: #abb2bf; + } + + button:focus, button:active, button:hover { + background-color: #abb2bf; + color: #1e2127; + outline-style: none; + } + + #lock { + background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/lock.png"), url("${pkgs.wlogout}/local/share/wlogout/icons/lock.png")); + } + + #logout { + background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/logout.png"), url("${pkgs.wlogout}/local/share/wlogout/icons/logout.png")); + } + + #suspend { + background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/suspend.png"), url("${pkgs.wlogout}/local/share/wlogout/icons/suspend.png")); + } + + #hibernate { + background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/hibernate.png"), url("${pkgs.wlogout}/local/share/wlogout/icons/hibernate.png")); + } + + #shutdown { + background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/shutdown.png"), url("${pkgs.wlogout}/local/share/wlogout/icons/shutdown.png")); + } + + #reboot { + background-image: image(url("${pkgs.wlogout}/share/wlogout/icons/reboot.png"), url("${pkgs.wlogout}/local/share/wlogout/icons/reboot.png")); + } + ''; + }; +} diff --git a/homes/desktop/xdg.nix b/homes/desktop/xdg.nix new file mode 100644 index 0000000..406b930 --- /dev/null +++ b/homes/desktop/xdg.nix @@ -0,0 +1,59 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + xdg-utils + xdg-user-dirs + ]; + + xdg = { + enable = true; + userDirs.enable = true; + desktopEntries = { + "browser" = { + name = "Web Browser"; + type = "Application"; + exec = "${pkgs.librewolf}/bin/librewolf %f"; + }; + "image" = { + name = "Image Viewer"; + type = "Application"; + exec = "${pkgs.nsxiv}/bin/nsxiv -a %f"; + }; + "text" = { + name = "Text Editor"; + type = "Application"; + exec = "${pkgs.alacritty}/bin/alacritty -e ${pkgs.neovim}/bin/nvim %u"; + }; + "pdf" = { + name = "PDF Reader"; + type = "Application"; + exec = "${pkgs.zathura}/bin/zathura %u"; + }; + }; + mimeApps = { + enable = true; + defaultApplications = { + "application/pdf" = "pdf.desktop"; + "x-scheme-handler/http" = "browser.desktop"; + "x-scheme-handler/https" = "browser.desktop"; + "image/png" = "image.desktop"; + "image/jpeg" = "image.desktop"; + "image/jpg" = "image.desktop"; + "image/gif" = "image.desktop"; + "video/mp4" = "mpv.desktop"; + "text/plain" = "text.desktop"; + "text/html" = "browser.desktop"; + }; + }; + }; + + home = { + sessionVariables = { + # Default programs + EDITOR = "nvim"; + TERMINAL = "st"; + BROWSER = "librewolf"; + }; + }; +} diff --git a/homes/desktop/xorg.nix b/homes/desktop/xorg.nix new file mode 100644 index 0000000..723517f --- /dev/null +++ b/homes/desktop/xorg.nix @@ -0,0 +1,21 @@ +{ config, ... }: + +{ + # Attempt to set keyboard layout + home.keyboard = { + layout = "gb"; + options = [ + "caps:escape" + ]; + }; + + # Force use of XDG Dir Spec + home.sessionVariables = { + XCOMPOSECACHE = "${config.xdg.cacheHome}/x11/xcompose"; + }; + + # Set global font + xresources.properties = { + "*.font" = "Iosevka:pixelsize=12:antialias=true:autohint=true"; + }; +} diff --git a/homes/desktop/zathura.nix b/homes/desktop/zathura.nix new file mode 100644 index 0000000..4de14ad --- /dev/null +++ b/homes/desktop/zathura.nix @@ -0,0 +1,3 @@ +{ + programs.zathura.enable = true; +} diff --git a/homes/laptop/home.nix b/homes/laptop/home.nix new file mode 100644 index 0000000..07c24da --- /dev/null +++ b/homes/laptop/home.nix @@ -0,0 +1,10 @@ +{ username, lib, ... }: + +{ + programs.home-manager.enable = true; + home = { + inherit username; + homeDirectory = lib.mkForce "/Users/${username}"; + stateVersion = "24.11"; + }; +} diff --git a/homes/laptop/ssh.nix b/homes/laptop/ssh.nix new file mode 100644 index 0000000..972b8e6 --- /dev/null +++ b/homes/laptop/ssh.nix @@ -0,0 +1,10 @@ +{ + programs.ssh.extraConfig = '' + Host * + IdentityAgent /Users/maddie/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh + ''; + + home.sessionVariables = { + SSH_AUTH_SOCK = "$HOME/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh"; + }; +} diff --git a/overlays.nix b/overlays.nix new file mode 100644 index 0000000..4145abd --- /dev/null +++ b/overlays.nix @@ -0,0 +1,25 @@ +[ + # My build of suckless dwm + (final: prev: { + st = prev.st.overrideAttrs (oldAttrs: { + src = final.fetchFromGitea { + domain = "git.spyhoodle.me"; + owner = "maddie"; + repo = "st"; + rev = "95838457b677f5dc4397603e6df76df1789c9c36"; + sha256 = "sha256-EuipD68T8I+g1kKHqYy79Iata08Ac0SD24uLXBlM77A="; + }; + buildInputs = oldAttrs.buildInputs ++ [ final.harfbuzz ]; + }); + ncmpcpp = prev.ncmpcpp.override { + visualizerSupport = true; + clockSupport = false; + }; + nerdfonts = prev.nerdfonts.override { + fonts = [ "Iosevka" "JetBrainsMono" "Terminus" ]; + }; + chromium = prev.chromium.override { + enableWideVine = true; + }; + }) +] diff --git a/systems/desktop/audio.nix b/systems/desktop/audio.nix new file mode 100644 index 0000000..ebd5cf1 --- /dev/null +++ b/systems/desktop/audio.nix @@ -0,0 +1,12 @@ +{ + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + wireplumber.enable = true; + }; +} diff --git a/systems/desktop/avahi.nix b/systems/desktop/avahi.nix new file mode 100644 index 0000000..4b452d5 --- /dev/null +++ b/systems/desktop/avahi.nix @@ -0,0 +1,12 @@ +{ + services.avahi = { + enable = true; + nssmdns4 = true; + publish = { + enable = true; + addresses = true; + workstation = true; + userServices = true; + }; + }; +} diff --git a/systems/desktop/bluetooth.nix b/systems/desktop/bluetooth.nix new file mode 100644 index 0000000..1db6b76 --- /dev/null +++ b/systems/desktop/bluetooth.nix @@ -0,0 +1,4 @@ +{ + hardware.bluetooth.enable = true; + services.blueman.enable = true; +} diff --git a/systems/desktop/boot.nix b/systems/desktop/boot.nix new file mode 100644 index 0000000..175be5f --- /dev/null +++ b/systems/desktop/boot.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: + +{ + # Setup bootloader + boot.loader.systemd-boot = { + enable = true; + consoleMode = "max"; + }; + boot.loader.efi.canTouchEfiVariables = true; + boot.initrd.systemd.enable = true; + + # Enable magic sysrq + boot.kernel.sysctl."kernel.sysrq" = 502; + + # Kernel settings + boot.kernelParams = [ "video=2560x1440@180" ]; + + # Use the linux-zen kernel + boot.kernelPackages = pkgs.linuxPackages_zen; +} diff --git a/systems/desktop/clicks-tailscale.nix b/systems/desktop/clicks-tailscale.nix new file mode 100644 index 0000000..fc020b3 --- /dev/null +++ b/systems/desktop/clicks-tailscale.nix @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: 2024 Clicks Codes +# +# SPDX-License-Identifier: GPL-3.0-only + +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.clicks.networking.tailscale; +in +{ + options.clicks.networking.tailscale = { + enable = lib.mkEnableOption "Enable tailscale for this system"; + runExitNode.enable = lib.mkOption { + description = "Enable this system as an exit node on the tailnet"; + default = true; + type = lib.types.bool; + }; + server = lib.mkOption { + description = "Set where your control plane server is"; + default = "clicks.domains"; + example = "controlplane.tailscale.com"; + }; + authKeyFile = lib.mkOption { + type = lib.types.str; + description = "Path to key file for tailscale"; + }; + }; + + config = lib.mkIf cfg.enable { + services.tailscale = { + enable = true; + useRoutingFeatures = if cfg.runExitNode.enable then "both" else "client"; + extraUpFlags = [ + "--login-server=https://${cfg.server}" + "--accept-routes" + ] ++ (if cfg.runExitNode.enable then [ "--advertise-exit-node" ] else [ ]); + }; + + systemd.services.tailscaled.environment.TS_NO_LOGS_NO_SUPPORT = lib.mkIf ( + cfg.server != "controlplane.tailscale.com" + ) "true"; + }; +} diff --git a/systems/desktop/cpu.nix b/systems/desktop/cpu.nix new file mode 100644 index 0000000..dcb9255 --- /dev/null +++ b/systems/desktop/cpu.nix @@ -0,0 +1,6 @@ +{ config, lib, ... }: + +{ + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/systems/desktop/doas.nix b/systems/desktop/doas.nix new file mode 100644 index 0000000..b37ddee --- /dev/null +++ b/systems/desktop/doas.nix @@ -0,0 +1,13 @@ +{ username, ... }: + +{ + security.sudo.enable = false; + security.doas = { + enable = true; + extraRules = [{ + users = [ "${username}" ]; + keepEnv = true; + persist = true; + }]; + }; +} diff --git a/systems/desktop/firewall.nix b/systems/desktop/firewall.nix new file mode 100644 index 0000000..223d511 --- /dev/null +++ b/systems/desktop/firewall.nix @@ -0,0 +1,4 @@ +{ + # Disable the firewall altogether + networking.firewall.enable = false; +} diff --git a/systems/desktop/fonts.nix b/systems/desktop/fonts.nix new file mode 100644 index 0000000..b2d2541 --- /dev/null +++ b/systems/desktop/fonts.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: + +{ + fonts.packages = with pkgs; [ + nerdfonts + font-awesome + source-sans + source-han-sans + source-han-serif + source-han-code-jp + terminus_font + inter + ]; +} diff --git a/systems/desktop/gpg.nix b/systems/desktop/gpg.nix new file mode 100644 index 0000000..5633edc --- /dev/null +++ b/systems/desktop/gpg.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: + +{ + programs.gnupg.agent = { + enable = true; + enableSSHSupport = false; + pinentryPackage = pkgs.pinentry-gnome3; + }; +} diff --git a/systems/desktop/hardware.nix b/systems/desktop/hardware.nix new file mode 100644 index 0000000..cad13ab --- /dev/null +++ b/systems/desktop/hardware.nix @@ -0,0 +1,44 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/0b6949ad-1251-42cb-a132-76d5f20c6bb0"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-80c1fc90-4995-43ac-a022-752af2803ffc".device = "/dev/disk/by-uuid/80c1fc90-4995-43ac-a022-752af2803ffc"; + boot.initrd.luks.devices."luks-3dbc0a96-a442-492d-9b46-e0216adaaa32".device = "/dev/disk/by-uuid/3dbc0a96-a442-492d-9b46-e0216adaaa32"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/DCB7-79E4"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/b2dd867b-5c12-4b61-a476-8410ba3c772d"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/systems/desktop/hyprland.nix b/systems/desktop/hyprland.nix new file mode 100644 index 0000000..e3bab60 --- /dev/null +++ b/systems/desktop/hyprland.nix @@ -0,0 +1,9 @@ +{ inputs, pkgs, ... }: + +{ + programs.hyprland = { + enable = true; + package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; + }; +} diff --git a/systems/desktop/hyprlock.nix b/systems/desktop/hyprlock.nix new file mode 100644 index 0000000..2ed8d27 --- /dev/null +++ b/systems/desktop/hyprlock.nix @@ -0,0 +1,3 @@ +{ + security.pam.services.hyprlock = { }; +} diff --git a/systems/desktop/locale.nix b/systems/desktop/locale.nix new file mode 100644 index 0000000..47b1325 --- /dev/null +++ b/systems/desktop/locale.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: + +{ + # Time zone + time.timeZone = "Europe/London"; + + # Internationalisation properties + i18n.defaultLocale = "en_GB.UTF-8"; + console = { + font = "${pkgs.terminus_font}/share/consolefonts/ter-v24n.psf.gz"; + keyMap = "uk"; + }; +} diff --git a/systems/desktop/ly.nix b/systems/desktop/ly.nix new file mode 100644 index 0000000..2efa817 --- /dev/null +++ b/systems/desktop/ly.nix @@ -0,0 +1,3 @@ +{ + services.displayManager.ly.enable = true; +} diff --git a/systems/desktop/man.nix b/systems/desktop/man.nix new file mode 100644 index 0000000..422f532 --- /dev/null +++ b/systems/desktop/man.nix @@ -0,0 +1,6 @@ +{ + documentation.man = { + enable = true; + generateCaches = true; + }; +} diff --git a/systems/desktop/networking.nix b/systems/desktop/networking.nix new file mode 100644 index 0000000..56feba9 --- /dev/null +++ b/systems/desktop/networking.nix @@ -0,0 +1,12 @@ +{ lib, ... }: + +{ + # DHCP + networking.useDHCP = lib.mkDefault true; + + # Hostname + networking.hostName = "desktop"; + + # Enable wireless support & configuration + networking.wireless.enable = false; +} diff --git a/systems/desktop/nix-ld.nix b/systems/desktop/nix-ld.nix new file mode 100644 index 0000000..4ff6916 --- /dev/null +++ b/systems/desktop/nix-ld.nix @@ -0,0 +1,3 @@ +{ + programs.nix-ld.enable = true; +} diff --git a/systems/desktop/nix.nix b/systems/desktop/nix.nix new file mode 100644 index 0000000..8d52cbe --- /dev/null +++ b/systems/desktop/nix.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: + +{ + nix = { + package = pkgs.nixVersions.stable; + settings = { + experimental-features = [ "nix-command" "flakes" ]; + auto-optimise-store = true; + }; + gc = { + automatic = true; + options = "--delete-older-than 7d"; + }; + }; +} diff --git a/systems/desktop/nixos.nix b/systems/desktop/nixos.nix new file mode 100644 index 0000000..a4cdc42 --- /dev/null +++ b/systems/desktop/nixos.nix @@ -0,0 +1,6 @@ +{ lib, ... }: + +{ + system.stateVersion = "24.11"; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/systems/desktop/nvidia.nix b/systems/desktop/nvidia.nix new file mode 100644 index 0000000..aaa5b13 --- /dev/null +++ b/systems/desktop/nvidia.nix @@ -0,0 +1,13 @@ +{ config, ... }: + +{ + hardware.graphics.enable = true; + hardware.graphics.enable32Bit = true; + hardware.nvidia = { + package = config.boot.kernelPackages.nvidiaPackages.stable; + modesetting.enable = true; + open = false; + }; + services.xserver.videoDrivers = [ "nvidia" ]; + +} diff --git a/systems/desktop/packages.nix b/systems/desktop/packages.nix new file mode 100644 index 0000000..25b4473 --- /dev/null +++ b/systems/desktop/packages.nix @@ -0,0 +1,48 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + # Xorg packages + xorg.xinit + xorg.xkill + xorg.xprop + xorg.xwininfo + xorg.xrandr + xdotool + xclip + + # Processes + killall + appimage-run + + # Filesystems + dosfstools + btrfs-progs + ntfs3g + exfatprogs + libimobiledevice + ifuse + + # Archives + zip + unrar + unzip + p7zip + + # Cli tools + ripgrep + wget + fzf + bat + + # XDG + xdg-utils + xdg-user-dirs + + # Git + git + + # Compiler + gcc + ]; +} diff --git a/systems/desktop/security.nix b/systems/desktop/security.nix new file mode 100644 index 0000000..900c19a --- /dev/null +++ b/systems/desktop/security.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: + +{ + programs.slock.enable = true; + security.wrappers.slock.source = "${pkgs.slock.out}/bin/slock"; +} diff --git a/systems/desktop/ssh.nix b/systems/desktop/ssh.nix new file mode 100644 index 0000000..91b2141 --- /dev/null +++ b/systems/desktop/ssh.nix @@ -0,0 +1,11 @@ +{ + services.openssh = { + enable = true; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; + }; + }; + programs.ssh.hostKeyAlgorithms = [ "sk-ssh-ed25519@openssh.com" "ssh-ed25519" "ecdsa-sha2-nistp256" ]; +} diff --git a/systems/desktop/systemd.nix b/systems/desktop/systemd.nix new file mode 100644 index 0000000..c070b28 --- /dev/null +++ b/systems/desktop/systemd.nix @@ -0,0 +1,6 @@ +{ + # Stop systemd from hanging for ages + systemd.extraConfig = '' + DefaultTimeoutStopSec=10s + ''; +} diff --git a/systems/desktop/tailscale.nix b/systems/desktop/tailscale.nix new file mode 100644 index 0000000..6271e2f --- /dev/null +++ b/systems/desktop/tailscale.nix @@ -0,0 +1,6 @@ +{ + clicks.networking.tailscale = { + enable = true; + }; + services.tailscale.extraUpFlags = [ "--hostname=desktop" ]; +} diff --git a/systems/desktop/users.nix b/systems/desktop/users.nix new file mode 100644 index 0000000..1223e0b --- /dev/null +++ b/systems/desktop/users.nix @@ -0,0 +1,11 @@ +{ pkgs, username, ... }: + +{ + users.users.${username} = { + isNormalUser = true; + shell = pkgs.zsh; + description = "Madeleine"; + extraGroups = [ "dialout" "plugdev" ]; + openssh.authorizedKeys.keyFiles = [ ../../homes/common/ssh/maddie.pub ]; + }; +} diff --git a/systems/desktop/xdg.nix b/systems/desktop/xdg.nix new file mode 100644 index 0000000..119d96e --- /dev/null +++ b/systems/desktop/xdg.nix @@ -0,0 +1,12 @@ +{ pkgs, inputs, ... }: + +{ + xdg.portal = { + enable = true; + xdgOpenUsePortal = true; + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + ]; + }; + programs.dconf.enable = true; +} diff --git a/systems/desktop/xorg.nix b/systems/desktop/xorg.nix new file mode 100644 index 0000000..2869db8 --- /dev/null +++ b/systems/desktop/xorg.nix @@ -0,0 +1,12 @@ +{ + services.xserver = { + # Enable X11 windowing system + enable = true; + + # Set X11 keymap as GB + xkb = { + layout = "gb"; + options = "eurosign:e"; + }; + }; +} diff --git a/systems/desktop/yubikey.nix b/systems/desktop/yubikey.nix new file mode 100644 index 0000000..b5c1099 --- /dev/null +++ b/systems/desktop/yubikey.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: + +{ + services.pcscd.enable = true; + services.udev.packages = [ pkgs.yubikey-personalization ]; + security.pam = { + services = { + login.u2fAuth = true; + doas.u2fAuth = true; + }; + yubico = { + enable = true; + mode = "challenge-response"; + control = "optional"; + }; + }; +} diff --git a/systems/desktop/zsh.nix b/systems/desktop/zsh.nix new file mode 100644 index 0000000..9db376d --- /dev/null +++ b/systems/desktop/zsh.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: + +{ + programs.zsh = { + enable = true; + autosuggestions.enable = true; + syntaxHighlighting.enable = true; + }; + users.defaultUserShell = pkgs.zsh; +} diff --git a/systems/laptop/fonts.nix b/systems/laptop/fonts.nix new file mode 100644 index 0000000..b9c163e --- /dev/null +++ b/systems/laptop/fonts.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + fonts.packages = with pkgs; [ + font-awesome + nerdfonts + ]; +} diff --git a/systems/laptop/gpg.nix b/systems/laptop/gpg.nix new file mode 100644 index 0000000..6d266d3 --- /dev/null +++ b/systems/laptop/gpg.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: + +{ + programs.gnupg.agent.enable = true; + + environment.systemPackages = with pkgs; [ + gnupg + ]; +} diff --git a/systems/laptop/nix.nix b/systems/laptop/nix.nix new file mode 100644 index 0000000..e2f72eb --- /dev/null +++ b/systems/laptop/nix.nix @@ -0,0 +1,20 @@ + +{ pkgs, lib, ... }: + +{ + nix = { + package = pkgs.nixVersions.latest; + settings = { + experimental-features = [ "nix-command" "flakes" ]; + auto-optimise-store = true; + }; + gc = { + automatic = true; + options = "--delete-older-than 7d"; + }; + extraOptions = lib.optionalString (pkgs.system == "aarch64-darwin") '' + extra-platforms = x86_64-darwin aarch64-darwin + ''; + }; + services.nix-daemon.enable = true; +} diff --git a/systems/laptop/packages.nix b/systems/laptop/packages.nix new file mode 100644 index 0000000..b5b605a --- /dev/null +++ b/systems/laptop/packages.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + killall + dosfstools + zip + unzip + unrar + p7zip + ripgrep + wget + fzf + bat + git + ]; +} diff --git a/systems/laptop/ssh.nix b/systems/laptop/ssh.nix new file mode 100644 index 0000000..dfa8375 --- /dev/null +++ b/systems/laptop/ssh.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + openssh + ]; +} diff --git a/systems/laptop/sudo.nix b/systems/laptop/sudo.nix new file mode 100644 index 0000000..12f20cd --- /dev/null +++ b/systems/laptop/sudo.nix @@ -0,0 +1,3 @@ +{ + security.pam.enableSudoTouchIdAuth = true; +} diff --git a/systems/laptop/zsh.nix b/systems/laptop/zsh.nix new file mode 100644 index 0000000..2509e8b --- /dev/null +++ b/systems/laptop/zsh.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: + +{ + programs.zsh = { + enable = true; + enableSyntaxHighlighting = true; + enableCompletion = true; + }; + environment.loginShell = pkgs.zsh; +}