mirror of
https://github.com/gburd/nix-config.git
synced 2024-07-01 23:57:20 +00:00
A fork of Misterio77 and his standard template.
Many thangs to the hard work and generous availability of: git@github.com:Misterio77/nix-config.git
This commit is contained in:
commit
f3fd89af54
11
.editorconfig
Normal file
11
.editorconfig
Normal file
|
@ -0,0 +1,11 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.nix]
|
||||
ident_style = space
|
||||
ident_size = 2
|
3
.gitattributes
vendored
Normal file
3
.gitattributes
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
nixos/hosts/*/secrets/*.yaml diff=sopsdiffer
|
||||
nixos/common/secrets/*.yaml diff=sopsdiffer
|
||||
nix linguist-generated=true
|
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
.direnv
|
||||
result*
|
||||
*.qcow2
|
||||
.nixie
|
26
.hydra.json
Normal file
26
.hydra.json
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"main": {
|
||||
"enabled": 1,
|
||||
"type": 1,
|
||||
"hidden": false,
|
||||
"description": "Build main branch",
|
||||
"flake": "github:gburd/nix-config/main",
|
||||
"checkinterval": 60,
|
||||
"schedulingshares": 10,
|
||||
"enableemail": false,
|
||||
"emailoverride": "",
|
||||
"keepnr": 2
|
||||
},
|
||||
"next": {
|
||||
"enabled": 1,
|
||||
"type": 1,
|
||||
"hidden": false,
|
||||
"description": "Build next branch",
|
||||
"flake": "github:gburd/nix-config/next",
|
||||
"checkinterval": 60,
|
||||
"schedulingshares": 5,
|
||||
"enableemail": false,
|
||||
"emailoverride": "",
|
||||
"keepnr": 1
|
||||
}
|
||||
}
|
46
.sops.yaml
Normal file
46
.sops.yaml
Normal file
|
@ -0,0 +1,46 @@
|
|||
keys:
|
||||
# Users
|
||||
- &users:
|
||||
- &misterio 7088C7421873E0DB97FF17C2245CAB70B4C225E9
|
||||
# Hosts
|
||||
- &hosts:
|
||||
- &atlas age1hm5lf4qk84r4wh00atn6hpts7mpdx80adq26wht2e5qh9ewvhyaszfv82d
|
||||
- &merope age1709qfrwglm75v5x8lpuhryt83k6p6c90npplzzec6a5w8ct93ejscpqpc3
|
||||
- &pleione age1j9ld6ey62hqd33xkyd2fg9362k6xhm5gavsrpsfalwpcs8smxfdqpk84a2
|
||||
- &maia age1dn7pkareh83k8el2yt4dmdfdzn7f45fuc785cnnxgzf3h4r5gqhqd4l93h
|
||||
- &alcyone age1uxvuygmvwpfjrd9d3ulg6ln8dgvaw4l2c90mw0tr72qg3n8vd9ns3dm000
|
||||
- &celaeno age1gxhy9eq38xfplay0kvkeyvsg96g0c4p6rkhajkrj8nc9dswdzqhssgvns0
|
||||
- &electra age1n06f4dcslh8xq686z2fa9ddr3yg5yzj87p727896xsm8xvusdv6qan0grl
|
||||
|
||||
creation_rules:
|
||||
- path_regex: hosts/celaeno/secrets.ya?ml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *celaeno
|
||||
pgp:
|
||||
- *misterio
|
||||
- path_regex: hosts/alcyone/secrets.ya?ml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *alcyone
|
||||
pgp:
|
||||
- *misterio
|
||||
- path_regex: hosts/merope/secrets.ya?ml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *merope
|
||||
pgp:
|
||||
- *misterio
|
||||
|
||||
- path_regex: hosts/common/secrets.ya?ml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *atlas
|
||||
- *merope
|
||||
- *pleione
|
||||
- *maia
|
||||
- *alcyone
|
||||
- *celaeno
|
||||
- *electra
|
||||
pgp:
|
||||
- *misterio
|
85
_flake.nix
Normal file
85
_flake.nix
Normal file
|
@ -0,0 +1,85 @@
|
|||
{
|
||||
description = "Your new nix config";
|
||||
|
||||
inputs = {
|
||||
# Nixpkgs
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
# You can access packages and modules from different nixpkgs revs
|
||||
# at the same time. Here's an working example:
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
|
||||
|
||||
# Home manager
|
||||
home-manager.url = "github:nix-community/home-manager/release-23.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# TODO: Add any other flake you might need
|
||||
# hardware.url = "github:nixos/nixos-hardware";
|
||||
|
||||
# Shameless plug: looking for a way to nixify your themes and make
|
||||
# everything match nicely? Try nix-colors!
|
||||
# nix-colors.url = "github:misterio77/nix-colors";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }@inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
forAllSystems = nixpkgs.lib.genAttrs [
|
||||
"aarch64-linux"
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
];
|
||||
in
|
||||
rec {
|
||||
# Your custom packages
|
||||
# Acessible through 'nix build', 'nix shell', etc
|
||||
packages = forAllSystems (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in import ./pkgs { inherit pkgs; }
|
||||
);
|
||||
# Devshell for bootstrapping
|
||||
# Acessible through 'nix develop' or 'nix-shell' (legacy)
|
||||
devShells = forAllSystems (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in import ./shell.nix { inherit pkgs; }
|
||||
);
|
||||
|
||||
# Your custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays { inherit inputs; };
|
||||
# Reusable nixos modules you might want to export
|
||||
# These are usually stuff you would upstream into nixpkgs
|
||||
nixosModules = import ./modules/nixos;
|
||||
# Reusable home-manager modules you might want to export
|
||||
# These are usually stuff you would upstream into home-manager
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
|
||||
# NixOS configuration entrypoint
|
||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||
nixosConfigurations = {
|
||||
# FIXME replace with your hostname
|
||||
your-hostname = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
modules = [
|
||||
# > Our main nixos configuration file <
|
||||
./nixos/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Standalone home-manager configuration entrypoint
|
||||
# Available through 'home-manager --flake .#your-username@your-hostname'
|
||||
homeConfigurations = {
|
||||
# FIXME replace with your username@hostname
|
||||
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
modules = [
|
||||
# > Our main home-manager configuration file <
|
||||
./home-manager/home.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
63
_home-manager/home.nix
Normal file
63
_home-manager/home.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
# This is your home-manager configuration file
|
||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||
|
||||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
||||
# outputs.homeManagerModules.example
|
||||
|
||||
# Or modules exported from other flakes (such as nix-colors):
|
||||
# inputs.nix-colors.homeManagerModules.default
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
# ./nvim.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: Set your username
|
||||
home = {
|
||||
username = "your-username";
|
||||
homeDirectory = "/home/your-username";
|
||||
};
|
||||
|
||||
# Add stuff for your user as you see fit:
|
||||
# programs.neovim.enable = true;
|
||||
# home.packages = with pkgs; [ steam ];
|
||||
|
||||
# Enable home-manager and git
|
||||
programs.home-manager.enable = true;
|
||||
programs.git.enable = true;
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
home.stateVersion = "23.05";
|
||||
}
|
100
_nixos/configuration.nix
Normal file
100
_nixos/configuration.nix
Normal file
|
@ -0,0 +1,100 @@
|
|||
# This is your system's configuration file.
|
||||
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||
|
||||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/nixos):
|
||||
# outputs.nixosModules.example
|
||||
|
||||
# Or modules from other flakes (such as nixos-hardware):
|
||||
# inputs.hardware.nixosModules.common-cpu-amd
|
||||
# inputs.hardware.nixosModules.common-ssd
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
# ./users.nix
|
||||
|
||||
# Import your generated (nixos-generate-config) hardware configuration
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
# This will add each flake input as a registry
|
||||
# To make nix3 commands consistent with your flake
|
||||
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
|
||||
|
||||
# This will additionally add your inputs to the system's legacy channels
|
||||
# Making legacy nix commands consistent as well, awesome!
|
||||
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
|
||||
settings = {
|
||||
# Enable flakes and new 'nix' command
|
||||
experimental-features = "nix-command flakes";
|
||||
# Deduplicate and optimize nix store
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
};
|
||||
|
||||
# FIXME: Add the rest of your current configuration
|
||||
|
||||
# TODO: Set your hostname
|
||||
networking.hostName = "your-hostname";
|
||||
|
||||
# TODO: This is just an example, be sure to use whatever bootloader you prefer
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
|
||||
users.users = {
|
||||
# FIXME: Replace with your username
|
||||
your-username = {
|
||||
# TODO: You can set an initial password for your user.
|
||||
# If you do, you can skip setting a root password by passing '--no-root-passwd' to nixos-install.
|
||||
# Be sure to change it (using passwd) after rebooting!
|
||||
initialPassword = "correcthorsebatterystaple";
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
|
||||
];
|
||||
# TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc)
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
};
|
||||
|
||||
# This setups a SSH server. Very important if you're setting up a headless system.
|
||||
# Feel free to remove if you don't need it.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
# Forbid root login through SSH.
|
||||
permitRootLogin = "no";
|
||||
# Use keys only. Remove if you want to SSH using password (not recommended)
|
||||
passwordAuthentication = false;
|
||||
};
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "23.05";
|
||||
}
|
10
_nixos/hardware-configuration.nix
Normal file
10
_nixos/hardware-configuration.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
# This is just an example, you should generate yours with nixos-generate-config and put it in here.
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/sda1";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
# Set your system kind (needed for flakes)
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
}
|
16
deploy.sh
Executable file
16
deploy.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
export NIX_SSHOPTS="-A"
|
||||
|
||||
build_remote=false
|
||||
|
||||
hosts="$1"
|
||||
shift
|
||||
|
||||
if [ -z "$hosts" ]; then
|
||||
echo "No hosts to deploy"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
for host in ${hosts//,/ }; do
|
||||
nixos-rebuild --flake .\#$host switch --target-host $host --use-remote-sudo --use-substitutes $@
|
||||
done
|
537
flake.lock
Normal file
537
flake.lock
Normal file
|
@ -0,0 +1,537 @@
|
|||
{
|
||||
"nodes": {
|
||||
"base16-schemes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1680729003,
|
||||
"narHash": "sha256-M9LHTL24/W4oqgbYRkz0B2qpNrkefTs98pfj3MxIXnU=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-schemes",
|
||||
"rev": "dc048afa066287a719ddbab62b3e19e4b5110cf0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-schemes",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"blobs": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1604995301,
|
||||
"narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=",
|
||||
"owner": "simple-nixos-mailserver",
|
||||
"repo": "blobs",
|
||||
"rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "simple-nixos-mailserver",
|
||||
"repo": "blobs",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"composer2nix-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1646178110,
|
||||
"narHash": "sha256-P3acfGwHYjjZQcviPiOT7T7qzzP/drc2mibzrsrNP18=",
|
||||
"owner": "svanderburg",
|
||||
"repo": "composer2nix",
|
||||
"rev": "299caca4aac42d7639a42eb4dde951c010f6e91c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "svanderburg",
|
||||
"ref": "v0.0.6",
|
||||
"repo": "composer2nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"firefly": {
|
||||
"inputs": {
|
||||
"composer2nix-src": "composer2nix-src",
|
||||
"firefly-iii-src": "firefly-iii-src",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689496855,
|
||||
"narHash": "sha256-eLgJaeURjdKuBjyhS97texllfmtjCOhtPo1IOPvRCzI=",
|
||||
"owner": "timhae",
|
||||
"repo": "firefly",
|
||||
"rev": "73aba7e1e9bd61bef0f8f54294beb3528e436806",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "timhae",
|
||||
"repo": "firefly",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"firefly-iii-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1681548383,
|
||||
"narHash": "sha256-ymWotU5wM6nQhsfnyAt+unewJ5D0tJpNK+UedSyfITU=",
|
||||
"owner": "firefly-iii",
|
||||
"repo": "firefly-iii",
|
||||
"rev": "f878af0d3bbfe7b1a51bef758d4e2e9a66118316",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "firefly-iii",
|
||||
"ref": "v6.0.8",
|
||||
"repo": "firefly-iii",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"firefox-addons": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"dir": "pkgs/firefox-addons",
|
||||
"lastModified": 1694750549,
|
||||
"narHash": "sha256-p/qc0XKjlqYc7h0lFF//4wlpFUx9n21PAp8qMLQp38E=",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"rev": "b99fbd02f370f1e93e55a894965a7731e0f105d9",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"dir": "pkgs/firefox-addons",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1668681692,
|
||||
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1690933134,
|
||||
"narHash": "sha256-ab989mN63fQZBFrkk4Q8bYxQCktuHmBIBqUG1jl6/FQ=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "59cf3f1447cfc75087e7273b04b31e689a8599fb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1629284811,
|
||||
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c5d161cc0af116a2e17f54316f0bf43f0819785c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1694710316,
|
||||
"narHash": "sha256-uRh46iIC86D8BD1wCDA5gRrt+hslUXiD0kx/UjnjBcs=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "570256327eb6ca6f7bebe8d93af49459092a0c43",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"repo": "nixos-hardware",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685599623,
|
||||
"narHash": "sha256-Tob4CMOVHue0D3RzguDBCtUmX5ji2PsdbQDbIOIKvsc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "93db05480c0c0f30382d3e80779e8386dcb4f9dd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": "hyprland-protocols",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems",
|
||||
"wlroots": "wlroots",
|
||||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694776019,
|
||||
"narHash": "sha256-hpkAehMA141aQyERaLlFRYSqePjS739+2eS293pJH+A=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland",
|
||||
"rev": "56adec7c1a49c079f320ba3c0c5ae3948946a9e5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland-protocols": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1691753796,
|
||||
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprwm-contrib": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1693997747,
|
||||
"narHash": "sha256-W23nMGmDnyBgxO8O/9jcZtiSpa0taMNcRAD1das/ttw=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "contrib",
|
||||
"rev": "5b67181fced4fb06d26afcf9614b35765c576168",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "contrib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"impermanence": {
|
||||
"locked": {
|
||||
"lastModified": 1694622745,
|
||||
"narHash": "sha256-z397+eDhKx9c2qNafL1xv75lC0Q4nOaFlhaU1TINqb8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "impermanence",
|
||||
"rev": "e9643d08d0d193a2e074a19d4d90c67a874d932e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "impermanence",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nh": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nix-filter": "nix-filter",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694765281,
|
||||
"narHash": "sha256-Edj2wyiszLXpZ6tXrZY6tJEOLJeGQAYd5cM8XfBPk1s=",
|
||||
"owner": "viperml",
|
||||
"repo": "nh",
|
||||
"rev": "8896f7f3647d3adc24adae3d51793a6837eb2b17",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "viperml",
|
||||
"repo": "nh",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-colors": {
|
||||
"inputs": {
|
||||
"base16-schemes": "base16-schemes",
|
||||
"nixpkgs-lib": "nixpkgs-lib_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1682108218,
|
||||
"narHash": "sha256-tMr7BbxualFQlN+XopS8rMMgf2XR9ZfRuwIZtjsWmfI=",
|
||||
"owner": "misterio77",
|
||||
"repo": "nix-colors",
|
||||
"rev": "b92df8f5eb1fa20d8e09810c03c9dc0d94ef2820",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "misterio77",
|
||||
"repo": "nix-colors",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-filter": {
|
||||
"locked": {
|
||||
"lastModified": 1687178632,
|
||||
"narHash": "sha256-HS7YR5erss0JCaUijPeyg2XrisEb959FIct3n2TMGbE=",
|
||||
"owner": "numtide",
|
||||
"repo": "nix-filter",
|
||||
"rev": "d90c75e8319d0dd9be67d933d8eb9d0894ec9174",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "nix-filter",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-mailserver": {
|
||||
"inputs": {
|
||||
"blobs": "blobs",
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-22_11": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-23_05": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689976554,
|
||||
"narHash": "sha256-uWJq3sIhkqfzPmfB2RWd5XFVooGFfSuJH9ER/r302xQ=",
|
||||
"owner": "simple-nixos-mailserver",
|
||||
"repo": "nixos-mailserver",
|
||||
"rev": "c63f6e7b053c18325194ff0e274dba44e8d2271e",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "simple-nixos-mailserver",
|
||||
"repo": "nixos-mailserver",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1686431482,
|
||||
"narHash": "sha256-oPVQ/0YP7yC2ztNsxvWLrV+f0NQ2QAwxbrZ+bgGydEM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d3bb401dcfc5a46ce51cdfb5762e70cc75d082d2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1690881714,
|
||||
"narHash": "sha256-h/nXluEqdiQHs1oSgkOOWF+j8gcJMWhwnZ9PFabN6q0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9e1960bc196baf6881340d53dccb203a951745a2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "lib",
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib_2": {
|
||||
"locked": {
|
||||
"lastModified": 1680397293,
|
||||
"narHash": "sha256-wBpJ73+tJ8fZSWb4tzNbAVahC4HSo2QG3nICDy4ExBQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "b18d328214ca3c627d3cc3f51fd9d1397fdbcd7a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"firefly": "firefly",
|
||||
"firefox-addons": "firefox-addons",
|
||||
"hardware": "hardware",
|
||||
"home-manager": "home-manager",
|
||||
"hyprland": "hyprland",
|
||||
"hyprwm-contrib": "hyprwm-contrib",
|
||||
"impermanence": "impermanence",
|
||||
"nh": "nh",
|
||||
"nix-colors": "nix-colors",
|
||||
"nixos-mailserver": "nixos-mailserver",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"sops-nix": "sops-nix"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694495315,
|
||||
"narHash": "sha256-sZEYXs9T1NVHZSSbMqBEtEm2PGa7dEDcx0ttQkArORc=",
|
||||
"owner": "mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "ea208e55f8742fdcc0986b256bdfa8986f5e4415",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mic92",
|
||||
"repo": "sops-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1605370193,
|
||||
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5021eac20303a61fafe17224c087f5519baed54d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"wlroots": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"host": "gitlab.freedesktop.org",
|
||||
"lastModified": 1694302348,
|
||||
"narHash": "sha256-S9NOc88L/1jpNKJqBu2Hihvn0V1HHCK2hXE4bNBAStg=",
|
||||
"owner": "wlroots",
|
||||
"repo": "wlroots",
|
||||
"rev": "65bbbbbf0c3d6844cee3c4e294d0ba07e1f82211",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"host": "gitlab.freedesktop.org",
|
||||
"owner": "wlroots",
|
||||
"repo": "wlroots",
|
||||
"rev": "65bbbbbf0c3d6844cee3c4e294d0ba07e1f82211",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"xdph": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": [
|
||||
"hyprland",
|
||||
"hyprland-protocols"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694363988,
|
||||
"narHash": "sha256-RF6LXm4J6mBF3B8VcQuABuU4g4tCPHgMYJQSoJ3DW+8=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "aca51609d4c415b30e88b96c6f49f0142cbcdae7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
126
flake.nix
Normal file
126
flake.nix
Normal file
|
@ -0,0 +1,126 @@
|
|||
{
|
||||
description = "My (Greg Burd's) NixOS configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; #nixos-unstable
|
||||
|
||||
hardware.url = "github:nixos/nixos-hardware";
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
nix-colors.url = "github:misterio77/nix-colors";
|
||||
|
||||
sops-nix = {
|
||||
url = "github:mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixpkgs-stable.follows = "nixpkgs";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nh = {
|
||||
url = "github:viperml/nh";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixos-mailserver = {
|
||||
url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixpkgs-22_11.follows = "nixpkgs";
|
||||
inputs.nixpkgs-23_05.follows = "nixpkgs";
|
||||
};
|
||||
# nix-minecraft = {
|
||||
# url = "github:misterio77/nix-minecraft";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
# };
|
||||
firefly = {
|
||||
url = "github:timhae/firefly";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
hyprland = {
|
||||
url = "github:hyprwm/hyprland";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
hyprwm-contrib = {
|
||||
url = "github:hyprwm/contrib";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
firefox-addons = {
|
||||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# disconic.url = "github:misterio77/disconic";
|
||||
# website.url = "github:misterio77/website";
|
||||
# paste-misterio-me.url = "github:misterio77/paste.misterio.me";
|
||||
# yrmos.url = "github:misterio77/yrmos";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }@inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
lib = nixpkgs.lib // home-manager.lib;
|
||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
forEachSystem = f: lib.genAttrs systems (sys: f pkgsFor.${sys});
|
||||
pkgsFor = nixpkgs.legacyPackages;
|
||||
in
|
||||
{
|
||||
inherit lib;
|
||||
nixosModules = import ./modules/nixos;
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
# templates = import ./templates;
|
||||
|
||||
overlays = import ./overlays { inherit inputs outputs; };
|
||||
hydraJobs = import ./hydra.nix { inherit inputs outputs; };
|
||||
|
||||
packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
|
||||
devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; });
|
||||
formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt);
|
||||
|
||||
wallpapers = import ./home/gburd/wallpapers;
|
||||
|
||||
nixosConfigurations = {
|
||||
# Personal laptop - Lenovo Carbon X1 Extreme Gen 5 - x86_64
|
||||
loki = lib.nixosSystem {
|
||||
modules = [ ./hosts/loki ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
|
||||
# Work laptop - MacBook Air macOS/nix - aarch64
|
||||
# ? = lib.nixosSystem {
|
||||
# modules = [ ./hosts/? ];
|
||||
# specialArgs = { inherit inputs outputs; };
|
||||
# };
|
||||
|
||||
# Main desktop - Intel NUC Skull Canyon - x86_64
|
||||
# ? = lib.nixosSystem {
|
||||
# modules = [ ./hosts/? ];
|
||||
# specialArgs = { inherit inputs outputs; };
|
||||
# };
|
||||
|
||||
# Core server (?)
|
||||
# ? = lib.nixosSystem {
|
||||
# modules = [ ./hosts/? ];
|
||||
# specialArgs = { inherit inputs outputs; };
|
||||
# };
|
||||
|
||||
# Build and game server (?)
|
||||
# ? = lib.nixosSystem {
|
||||
# modules = [ ./hosts/? ];
|
||||
# specialArgs = { inherit inputs outputs; };
|
||||
# };
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
# Desktops
|
||||
"gburd@loki" = lib.homeManagerConfiguration {
|
||||
modules = [ ./home/gburd/loki.nix ];
|
||||
pkgs = pkgsFor.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
"gburd@generic" = lib.homeManagerConfiguration {
|
||||
modules = [ ./home/gburd/generic.nix ];
|
||||
pkgs = pkgsFor.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
5
home/gburd/features/cli/bash.nix
Normal file
5
home/gburd/features/cli/bash.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
6
home/gburd/features/cli/bat.nix
Normal file
6
home/gburd/features/cli/bat.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config.theme = "base16";
|
||||
};
|
||||
}
|
46
home/gburd/features/cli/default.nix
Normal file
46
home/gburd/features/cli/default.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
./bash.nix
|
||||
./bat.nix
|
||||
./direnv.nix
|
||||
./fish.nix
|
||||
./gh.nix
|
||||
./git.nix
|
||||
./gpg.nix
|
||||
./jujutsu.nix
|
||||
./nix-index.nix
|
||||
./pfetch.nix
|
||||
./ranger.nix
|
||||
./screen.nix
|
||||
./shellcolor.nix
|
||||
./ssh.nix
|
||||
./starship.nix
|
||||
./xpo.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
comma # Install and run programs by sticking a , before them
|
||||
distrobox # Nice escape hatch, integrates docker images with my environment
|
||||
|
||||
bc # Calculator
|
||||
bottom # System viewer
|
||||
ncdu # TUI disk usage
|
||||
eza # Better ls
|
||||
ripgrep # Better grep
|
||||
fd # Better find
|
||||
httpie # Better curl
|
||||
diffsitter # Better diff
|
||||
jq # JSON pretty printer and manipulator
|
||||
trekscii # Cute startrek cli printer
|
||||
timer # To help with my ADHD paralysis
|
||||
|
||||
nil # Nix LSP
|
||||
nixfmt # Nix formatter
|
||||
nix-inspect # See which pkgs are in your PATH
|
||||
|
||||
ltex-ls # Spell checking LSP
|
||||
|
||||
tly # Tally counter
|
||||
|
||||
inputs.nh.default # nixos-rebuild and home-manager CLI wrapper
|
||||
];
|
||||
}
|
6
home/gburd/features/cli/direnv.nix
Normal file
6
home/gburd/features/cli/direnv.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
123
home/gburd/features/cli/fish.nix
Normal file
123
home/gburd/features/cli/fish.nix
Normal file
|
@ -0,0 +1,123 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
hasPackage = pname: lib.any (p: p ? pname && p.pname == pname) config.home.packages;
|
||||
hasRipgrep = hasPackage "ripgrep";
|
||||
hasExa = hasPackage "eza";
|
||||
hasNeovim = config.programs.neovim.enable;
|
||||
hasEmacs = config.programs.emacs.enable;
|
||||
hasNeomutt = config.programs.neomutt.enable;
|
||||
hasShellColor = config.programs.shellcolor.enable;
|
||||
hasKitty = config.programs.kitty.enable;
|
||||
shellcolor = "${pkgs.shellcolord}/bin/shellcolor";
|
||||
in
|
||||
{
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
shellAbbrs = rec {
|
||||
jqless = "jq -C | less -r";
|
||||
|
||||
n = "nix";
|
||||
nd = "nix develop -c $SHELL";
|
||||
ns = "nix shell";
|
||||
nsn = "nix shell nixpkgs#";
|
||||
nb = "nix build";
|
||||
nbn = "nix build nixpkgs#";
|
||||
nf = "nix flake";
|
||||
|
||||
nr = "nixos-rebuild --flake .";
|
||||
nrs = "nixos-rebuild --flake . switch";
|
||||
snr = "sudo nixos-rebuild --flake .";
|
||||
snrs = "sudo nixos-rebuild --flake . switch";
|
||||
hm = "home-manager --flake .";
|
||||
hms = "home-manager --flake . switch";
|
||||
|
||||
ls = mkIf hasExa "eza";
|
||||
exa = mkIf hasExa "eza";
|
||||
|
||||
e = mkIf hasEmacs "emacsclient -t";
|
||||
|
||||
vrg = mkIf (hasNeomutt && hasRipgrep) "nvimrg";
|
||||
vim = mkIf hasNeovim "nvim";
|
||||
vi = vim;
|
||||
v = vim;
|
||||
|
||||
mutt = mkIf hasNeomutt "neomutt";
|
||||
m = mutt;
|
||||
|
||||
cik = mkIf hasKitty "clone-in-kitty --type os-window";
|
||||
ck = cik;
|
||||
};
|
||||
shellAliases = {
|
||||
# Clear screen and scrollback
|
||||
clear = "printf '\\033[2J\\033[3J\\033[1;1H'";
|
||||
};
|
||||
functions = {
|
||||
# Disable greeting
|
||||
fish_greeting = "";
|
||||
# Grep using ripgrep and pass to nvim
|
||||
nvimrg = mkIf (hasNeomutt && hasRipgrep) "nvim -q (rg --vimgrep $argv | psub)";
|
||||
# Integrate ssh with shellcolord
|
||||
ssh = mkIf hasShellColor ''
|
||||
${shellcolor} disable $fish_pid
|
||||
# Check if kitty is available
|
||||
if set -q KITTY_PID && set -q KITTY_WINDOW_ID && type -q -f kitty
|
||||
kitty +kitten ssh $argv
|
||||
else
|
||||
command ssh $argv
|
||||
end
|
||||
${shellcolor} enable $fish_pid
|
||||
${shellcolor} apply $fish_pid
|
||||
'';
|
||||
};
|
||||
interactiveShellInit =
|
||||
# Open command buffer in vim when alt+e is pressed
|
||||
''
|
||||
bind \ee edit_command_buffer
|
||||
'' +
|
||||
# kitty integration
|
||||
''
|
||||
set --global KITTY_INSTALLATION_DIR "${pkgs.kitty}/lib/kitty"
|
||||
set --global KITTY_SHELL_INTEGRATION enabled
|
||||
source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish"
|
||||
set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d"
|
||||
'' +
|
||||
# Use vim bindings and cursors
|
||||
''
|
||||
fish_vi_key_bindings
|
||||
set fish_cursor_default block blink
|
||||
set fish_cursor_insert line blink
|
||||
set fish_cursor_replace_one underscore blink
|
||||
set fish_cursor_visual block
|
||||
'' +
|
||||
# Use terminal colors
|
||||
''
|
||||
set -U fish_color_autosuggestion brblack
|
||||
set -U fish_color_cancel -r
|
||||
set -U fish_color_command brgreen
|
||||
set -U fish_color_comment brmagenta
|
||||
set -U fish_color_cwd green
|
||||
set -U fish_color_cwd_root red
|
||||
set -U fish_color_end brmagenta
|
||||
set -U fish_color_error brred
|
||||
set -U fish_color_escape brcyan
|
||||
set -U fish_color_history_current --bold
|
||||
set -U fish_color_host normal
|
||||
set -U fish_color_match --background=brblue
|
||||
set -U fish_color_normal normal
|
||||
set -U fish_color_operator cyan
|
||||
set -U fish_color_param brblue
|
||||
set -U fish_color_quote yellow
|
||||
set -U fish_color_redirection bryellow
|
||||
set -U fish_color_search_match 'bryellow' '--background=brblack'
|
||||
set -U fish_color_selection 'white' '--bold' '--background=brblack'
|
||||
set -U fish_color_status red
|
||||
set -U fish_color_user brgreen
|
||||
set -U fish_color_valid_path --underline
|
||||
set -U fish_pager_color_completion normal
|
||||
set -U fish_pager_color_description yellow
|
||||
set -U fish_pager_color_prefix 'white' '--bold' '--underline'
|
||||
set -U fish_pager_color_progress 'brwhite' '--background=cyan'
|
||||
'';
|
||||
};
|
||||
}
|
14
home/gburd/features/cli/gh.nix
Normal file
14
home/gburd/features/cli/gh.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
extensions = with pkgs; [ gh-markdown-preview ];
|
||||
settings = {
|
||||
git_protocol = "ssh";
|
||||
prompt = "enabled";
|
||||
};
|
||||
};
|
||||
home.persistence = {
|
||||
"/persist/home/misterio".directories = [ ".config/gh" ];
|
||||
};
|
||||
}
|
51
home/gburd/features/cli/git.nix
Normal file
51
home/gburd/features/cli/git.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
ssh = "${pkgs.openssh}/bin/ssh";
|
||||
|
||||
git-m7 = pkgs.writeShellScriptBin "git-m7" ''
|
||||
repo="$(git remote -v | grep git@m7.rs | head -1 | cut -d ':' -f2 | cut -d ' ' -f1)"
|
||||
# Add a .git suffix if it's missing
|
||||
if [[ "$repo" != *".git" ]]; then
|
||||
repo="$repo.git"
|
||||
fi
|
||||
|
||||
if [ "$1" == "init" ]; then
|
||||
if [ "$2" == "" ]; then
|
||||
echo "You must specify a name for the repo"
|
||||
exit 1
|
||||
fi
|
||||
${ssh} -A git@m7.rs << EOF
|
||||
git init --bare "$2.git"
|
||||
git -C "$2.git" branch -m main
|
||||
EOF
|
||||
git remote add origin git@m7.rs:"$2.git"
|
||||
elif [ "$1" == "ls" ]; then
|
||||
${ssh} -A git@m7.rs ls
|
||||
else
|
||||
${ssh} -A git@m7.rs git -C "/srv/git/$repo" $@
|
||||
fi
|
||||
'';
|
||||
in
|
||||
{
|
||||
home.packages = [ git-m7 ];
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
aliases = {
|
||||
pushall = "!git remote | xargs -L1 git push --all";
|
||||
graph = "log --decorate --oneline --graph";
|
||||
add-nowhitespace = "!git diff -U0 -w --no-color | git apply --cached --ignore-whitespace --unidiff-zero -";
|
||||
fast-forward = "merge --ff-only";
|
||||
};
|
||||
userName = "Gabriel Fontes";
|
||||
userEmail = "hi@m7.rs";
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
user.signing.key = "CE707A2C17FAAC97907FF8EF2E54EA7BFE630916";
|
||||
commit.gpgSign = true;
|
||||
gpg.program = "${config.programs.gpg.package}/bin/gpg2";
|
||||
};
|
||||
lfs.enable = true;
|
||||
ignores = [ ".direnv" "result" ];
|
||||
};
|
||||
}
|
10
home/gburd/features/cli/gpg-commands.nix
Normal file
10
home/gburd/features/cli/gpg-commands.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
ssh = "${pkgs.openssh}/bin/ssh";
|
||||
gpg-connect-agent = "${pkgs.gnupg}/bin/gpg-connect-agent";
|
||||
in
|
||||
{
|
||||
isUnlocked = "${pkgs.procps}/bin/pgrep 'gpg-agent' &> /dev/null && ${gpg-connect-agent} 'scd getinfo card_list' /bye | ${pkgs.gnugrep}/bin/grep SERIALNO -q";
|
||||
unlock = "${ssh} -T localhost -o StrictHostKeyChecking=no exit";
|
||||
}
|
66
home/gburd/features/cli/gpg.nix
Normal file
66
home/gburd/features/cli/gpg.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
pinentry =
|
||||
if config.gtk.enable then {
|
||||
packages = [ pkgs.pinentry-gnome pkgs.gcr ];
|
||||
name = "gnome3";
|
||||
} else {
|
||||
packages = [ pkgs.pinentry-curses ];
|
||||
name = "curses";
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = pinentry.packages;
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
sshKeys = [ "149F16412997785363112F3DBD713BC91D51B831" ];
|
||||
pinentryFlavor = pinentry.name;
|
||||
enableExtraSocket = true;
|
||||
};
|
||||
|
||||
programs =
|
||||
let
|
||||
fixGpg = ''
|
||||
gpgconf --launch gpg-agent
|
||||
'';
|
||||
in
|
||||
{
|
||||
# Start gpg-agent if it's not running or tunneled in
|
||||
# SSH does not start it automatically, so this is needed to avoid having to use a gpg command at startup
|
||||
# https://www.gnupg.org/faq/whats-new-in-2.1.html#autostart
|
||||
bash.profileExtra = fixGpg;
|
||||
fish.loginShellInit = fixGpg;
|
||||
zsh.loginExtra = fixGpg;
|
||||
|
||||
gpg = {
|
||||
enable = true;
|
||||
settings = {
|
||||
trust-model = "tofu+pgp";
|
||||
};
|
||||
publicKeys = [{
|
||||
source = ../../pgp.asc;
|
||||
trust = 5;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services = {
|
||||
# Link /run/user/$UID/gnupg to ~/.gnupg-sockets
|
||||
# So that SSH config does not have to know the UID
|
||||
link-gnupg-sockets = {
|
||||
Unit = {
|
||||
Description = "link gnupg sockets from /run to /home";
|
||||
};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.coreutils}/bin/ln -Tfs /run/user/%U/gnupg %h/.gnupg-sockets";
|
||||
ExecStop = "${pkgs.coreutils}/bin/rm $HOME/.gnupg-sockets";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
# vim: filetype=nix
|
12
home/gburd/features/cli/jujutsu.nix
Normal file
12
home/gburd/features/cli/jujutsu.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.jujutsu = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
name = config.programs.git.userName;
|
||||
email = config.programs.git.userEmail;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
35
home/gburd/features/cli/nix-index.nix
Normal file
35
home/gburd/features/cli/nix-index.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
update-script = pkgs.writeShellApplication {
|
||||
name = "fetch-nix-index-database";
|
||||
runtimeInputs = with pkgs; [ wget coreutils ];
|
||||
text = ''
|
||||
filename="index-x86_64-linux"
|
||||
mkdir -p ~/.cache/nix-index
|
||||
cd ~/.cache/nix-index
|
||||
wget -N "https://github.com/Mic92/nix-index-database/releases/latest/download/$filename"
|
||||
ln -f "$filename" files
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.nix-index.enable = true;
|
||||
|
||||
systemd.user.services.nix-index-database-sync = {
|
||||
Unit = { Description = "fetch mic92/nix-index-database"; };
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${update-script}/bin/fetch-nix-index-database";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5m";
|
||||
};
|
||||
};
|
||||
systemd.user.timers.nix-index-database-sync = {
|
||||
Unit = { Description = "Automatic github:mic92/nix-index-database fetching"; };
|
||||
Timer = {
|
||||
OnBootSec = "10m";
|
||||
OnUnitActiveSec = "24h";
|
||||
};
|
||||
Install = { WantedBy = [ "timers.target" ]; };
|
||||
};
|
||||
}
|
8
home/gburd/features/cli/pfetch.nix
Normal file
8
home/gburd/features/cli/pfetch.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [ pfetch ];
|
||||
sessionVariables.PF_INFO =
|
||||
"ascii title os kernel uptime shell term desktop scheme palette";
|
||||
};
|
||||
}
|
3
home/gburd/features/cli/ranger.nix
Normal file
3
home/gburd/features/cli/ranger.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ ranger ];
|
||||
}
|
8
home/gburd/features/cli/screen.nix
Normal file
8
home/gburd/features/cli/screen.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = [ pkgs.screen ];
|
||||
home.file.".screenrc".text = ''
|
||||
startup_message off
|
||||
defbce on
|
||||
setenv TERM xterm-256color
|
||||
'';
|
||||
}
|
25
home/gburd/features/cli/shellcolor.nix
Normal file
25
home/gburd/features/cli/shellcolor.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, ... }:
|
||||
let inherit (config.colorscheme) colors;
|
||||
in {
|
||||
programs.shellcolor = {
|
||||
enable = true;
|
||||
settings = {
|
||||
base00 = "${colors.base00}";
|
||||
base01 = "${colors.base01}";
|
||||
base02 = "${colors.base02}";
|
||||
base03 = "${colors.base03}";
|
||||
base04 = "${colors.base04}";
|
||||
base05 = "${colors.base05}";
|
||||
base06 = "${colors.base06}";
|
||||
base07 = "${colors.base07}";
|
||||
base08 = "${colors.base08}";
|
||||
base09 = "${colors.base09}";
|
||||
base0A = "${colors.base0A}";
|
||||
base0B = "${colors.base0B}";
|
||||
base0C = "${colors.base0C}";
|
||||
base0D = "${colors.base0D}";
|
||||
base0E = "${colors.base0E}";
|
||||
base0F = "${colors.base0F}";
|
||||
};
|
||||
};
|
||||
}
|
27
home/gburd/features/cli/ssh.nix
Normal file
27
home/gburd/features/cli/ssh.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ outputs, lib, ... }:
|
||||
let
|
||||
hostnames = builtins.attrNames outputs.nixosConfigurations;
|
||||
in
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
net = {
|
||||
host = builtins.concatStringsSep " " hostnames;
|
||||
forwardAgent = true;
|
||||
remoteForwards = [{
|
||||
bind.address = ''/%d/.gnupg-sockets/S.gpg-agent'';
|
||||
host.address = ''/%d/.gnupg-sockets/S.gpg-agent.extra'';
|
||||
}];
|
||||
};
|
||||
trusted = lib.hm.dag.entryBefore [ "net" ] {
|
||||
host = "m7.rs *.m7.rs *.ts.m7.rs";
|
||||
forwardAgent = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.persistence = {
|
||||
"/persist/home/misterio".directories = [ ".ssh" ];
|
||||
};
|
||||
}
|
118
home/gburd/features/cli/starship.nix
Normal file
118
home/gburd/features/cli/starship.nix
Normal file
|
@ -0,0 +1,118 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
format =
|
||||
let
|
||||
git = "$git_branch$git_commit$git_state$git_status";
|
||||
cloud = "$aws$gcloud$openstack";
|
||||
in
|
||||
''
|
||||
$username$hostname($shlvl)($cmd_duration) $fill ($nix_shell)$custom
|
||||
$directory(${git})(- ${cloud}) $fill $time
|
||||
$jobs$character
|
||||
'';
|
||||
|
||||
fill = {
|
||||
symbol = " ";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
# Core
|
||||
username = {
|
||||
format = "[$user]($style)";
|
||||
show_always = true;
|
||||
};
|
||||
hostname = {
|
||||
format = "[@$hostname]($style) ";
|
||||
ssh_only = false;
|
||||
style = "bold green";
|
||||
};
|
||||
shlvl = {
|
||||
format = "[$shlvl]($style) ";
|
||||
style = "bold cyan";
|
||||
threshold = 2;
|
||||
repeat = true;
|
||||
disabled = false;
|
||||
};
|
||||
cmd_duration = {
|
||||
format = "took [$duration]($style) ";
|
||||
};
|
||||
|
||||
directory = {
|
||||
format = "[$path]($style)( [$read_only]($read_only_style)) ";
|
||||
};
|
||||
nix_shell = {
|
||||
format = "[($name \\(develop\\) <- )$symbol]($style) ";
|
||||
impure_msg = "";
|
||||
symbol = " ";
|
||||
style = "bold red";
|
||||
};
|
||||
custom = {
|
||||
nix_inspect = let
|
||||
excluded = [
|
||||
"kitty" "imagemagick" "ncurses" "user-environment" "pciutils" "binutils-wrapper"
|
||||
];
|
||||
in {
|
||||
disabled = false;
|
||||
when = "test -z $IN_NIX_SHELL";
|
||||
command = "${(lib.getExe pkgs.nix-inspect)} ${(lib.concatStringsSep " " excluded)}";
|
||||
format = "[($output <- )$symbol]($style) ";
|
||||
symbol = " ";
|
||||
style = "bold blue";
|
||||
};
|
||||
};
|
||||
|
||||
character = {
|
||||
error_symbol = "[~~>](bold red)";
|
||||
success_symbol = "[->>](bold green)";
|
||||
vimcmd_symbol = "[<<-](bold yellow)";
|
||||
vimcmd_visual_symbol = "[<<-](bold cyan)";
|
||||
vimcmd_replace_symbol = "[<<-](bold purple)";
|
||||
vimcmd_replace_one_symbol = "[<<-](bold purple)";
|
||||
};
|
||||
|
||||
time = {
|
||||
format = "\\\[[$time]($style)\\\]";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
# Cloud
|
||||
gcloud = {
|
||||
format = "on [$symbol$active(/$project)(\\($region\\))]($style)";
|
||||
};
|
||||
aws = {
|
||||
format = "on [$symbol$profile(\\($region\\))]($style)";
|
||||
};
|
||||
|
||||
# Icon changes only \/
|
||||
aws.symbol = " ";
|
||||
conda.symbol = " ";
|
||||
dart.symbol = " ";
|
||||
directory.read_only = " ";
|
||||
docker_context.symbol = " ";
|
||||
elixir.symbol = " ";
|
||||
elm.symbol = " ";
|
||||
gcloud.symbol = " ";
|
||||
git_branch.symbol = " ";
|
||||
golang.symbol = " ";
|
||||
hg_branch.symbol = " ";
|
||||
java.symbol = " ";
|
||||
julia.symbol = " ";
|
||||
memory_usage.symbol = " ";
|
||||
nim.symbol = " ";
|
||||
nodejs.symbol = " ";
|
||||
package.symbol = " ";
|
||||
perl.symbol = " ";
|
||||
php.symbol = " ";
|
||||
python.symbol = " ";
|
||||
ruby.symbol = " ";
|
||||
rust.symbol = " ";
|
||||
scala.symbol = " ";
|
||||
shlvl.symbol = "";
|
||||
swift.symbol = " ";
|
||||
terraform.symbol = "";
|
||||
};
|
||||
};
|
||||
}
|
6
home/gburd/features/cli/xpo.nix
Normal file
6
home/gburd/features/cli/xpo.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
programs.xpo = {
|
||||
enable = true;
|
||||
defaultServer = "m7.rs";
|
||||
};
|
||||
}
|
16
home/gburd/features/desktop/common/default.nix
Normal file
16
home/gburd/features/desktop/common/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
imports = [
|
||||
./deluge.nix
|
||||
./discord.nix
|
||||
./dragon.nix
|
||||
./firefox.nix
|
||||
./font.nix
|
||||
./gtk.nix
|
||||
./kdeconnect.nix
|
||||
./pavucontrol.nix
|
||||
./playerctl.nix
|
||||
./qt.nix
|
||||
./slack.nix
|
||||
./sublime-music.nix
|
||||
];
|
||||
}
|
3
home/gburd/features/desktop/common/deluge.nix
Normal file
3
home/gburd/features/desktop/common/deluge.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ deluge ];
|
||||
}
|
221
home/gburd/features/desktop/common/discord.nix
Normal file
221
home/gburd/features/desktop/common/discord.nix
Normal file
|
@ -0,0 +1,221 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let inherit (config.colorscheme) colors;
|
||||
in {
|
||||
home.packages = with pkgs; [ discord discocss ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist/home/misterio".directories = [ ".config/discord" ];
|
||||
};
|
||||
|
||||
xdg.configFile."discocss/custom.css".text = ''
|
||||
.theme-dark {
|
||||
--header-primary: #${colors.base05};
|
||||
--header-secondary: #${colors.base04};
|
||||
--text-normal: #${colors.base05};
|
||||
--text-muted: #${colors.base04};
|
||||
--text-link: #${colors.base08};
|
||||
--channels-default: #${colors.base05};
|
||||
--interactive-normal: #${colors.base04};
|
||||
--interactive-hover: #${colors.base05};
|
||||
--interactive-active: #${colors.base05};
|
||||
--interactive-muted: #${colors.base03};
|
||||
--background-primary: #${colors.base00};
|
||||
--background-secondary: #${colors.base01};
|
||||
--background-secondary-alt: #${colors.base02};
|
||||
--background-tertiary: #${colors.base01};
|
||||
--background-accent: #${colors.base01};
|
||||
--background-floating: #${colors.base00};
|
||||
--background-mobile-primary: var(--background-primary);
|
||||
--background-mobile-secondary: var(--background-secondary);
|
||||
--background-modifier-selected: var(--background-secondary);
|
||||
--scrollbar-thin-thumb: #${colors.base02};
|
||||
--scrollbar-auto-thumb: #${colors.base02};
|
||||
--scrollbar-auto-track: #${colors.base01};
|
||||
--scrollbar-auto-scrollbar-color-thumb: #${colors.base02};
|
||||
--scrollbar-auto-scrollbar-color-track: #${colors.base01};
|
||||
--focus-primary: #${colors.base08};
|
||||
--channeltextarea-background: #${colors.base01};
|
||||
--deprecated-card-bg: #${colors.base01};
|
||||
--deprecated-quickswitcher-input-background: #${colors.base01};
|
||||
--deprecated-quickswitcher-input-placeholder: #${colors.base05};
|
||||
--background-modifier-hover: var(--background-secondary);
|
||||
--background-modifier-active: var(--background-secondary-alt);
|
||||
--activity-card-background: var(--background-secondary);
|
||||
}
|
||||
body {
|
||||
font-family: ${config.fontProfiles.regular.family}, sans serif;
|
||||
}
|
||||
.scroller-1Bvpku {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
.scroller-2FKFPG {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
.headerPlaying-j0WQBV, .headerStreaming-2FjmGz {
|
||||
background: var(--background-secondary-alt);
|
||||
}
|
||||
.theme-dark .headerNormal-T_seeN {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
.theme-dark .body-3iLsc4, .theme-dark .footer-1fjuF6 {
|
||||
background-color: var(--background-primary);
|
||||
color: var(--header-secondary);
|
||||
}
|
||||
.theme-dark .quickMessage-1yeL4E {
|
||||
background-color: var(--background-secondary);
|
||||
border-color: var(--background-secondary);
|
||||
}
|
||||
.theme-dark .inset-3sAvek {
|
||||
background-color: var(--background-secondary);
|
||||
}
|
||||
.theme-dark .userSettingsAccount-2eMFVR .viewBody-2Qz-jg {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.theme-dark .modal-yWgWj- {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
.theme-dark .footer-2gL1pp {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
.theme-dark .lookLink-9FtZy-.colorPrimary-3b3xI6 {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.theme-dark .notDetected-33MY4s, .theme-light .notDetected-33MY4s {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
.theme-dark .notDetected-33MY4s .gameName-1RiWHm, .theme-light .notDetected-33MY4s .gameName-1RiWHm {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.theme-dark .gameName-1RiWHm {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.theme-dark .notDetected-33MY4s .lastPlayed-3bQ7Bo, .theme-light .notDetected-33MY4s .lastPlayed-3bQ7Bo {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.theme-dark .nowPlayingAdd-1Kdmh_, .theme-light .nowPlayingAdd-1Kdmh_ {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.css-1k00wn6-singleValue {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.theme-dark .codeRedemptionRedirect-1wVR4b {
|
||||
color: var(--header-primary);
|
||||
background-color: var(--background-primary);
|
||||
border-color: var(--background-primary);
|
||||
}
|
||||
.theme-dark .emptyStateHeader-248f_b {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.theme-dark .emptyStateSubtext-2hdA9c {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.theme-dark .root-1gCeng {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
.theme-dark .date-EErlv4 {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.theme-dark .content-8bidB ol, .theme-dark .content-8biNdB p, .theme-dark .content-8biNdB ul li {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.headerName-fajvi9, .headerTagUsernameNoNickname-2_H881 {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.headerTag-2pZJzA {
|
||||
color: var(--header-secondary);
|
||||
}
|
||||
.theme-dark .activityProfile-2bJRaP .headerText-1HLrL7, .theme-dark .activityUserPopout-2yItg2 .headerText-1HLrL7, .theme-light .activityProfile-2bJRaP .headerText-1HLrL7, .theme-light .activityUserPopout-2yItg2 .headerText-1HLrL7 {
|
||||
color: var(--header-secondary);
|
||||
}
|
||||
.activityName-1IaRLn, .nameNormal-2lqVQK, .nameWrap-3Z4G_9 {
|
||||
color: var(--header-secondary);
|
||||
}
|
||||
.theme-dark .activityProfile-2bJRaP .content-3JfFJh, .theme-dark .activityProfile-2bJRaP .details-38sfDr, .theme-dark .activityProfile-2bJRaP .name-29ETJS, .theme-dark .activityUserPopout-2yItg2 .content-3JfFJh, .theme-dark .activityUserPopout-2yItg2 .details-38sfDr, .theme-dark .activityUserPopout-2yItg2 .name-29ETJS, .theme-light .activityProfile-2bJRaP .content-3JfFJh, .theme-light .activityProfile-2bJRaP .details-38sfDr, .theme-light .activityProfile-2bJRaP .name-29ETJS, .theme-light .activityUserPopout-2yItg2 .content-3JfFJh, .theme-light .activityUserPopout-2yItg2 .details-38sfDr, .theme-light .activityUserPopout-2yItg2 .name-29ETJS {
|
||||
color: var(--header-secondary);
|
||||
}
|
||||
.topSectionPlaying-1J5E4n {
|
||||
background: var(--background-secondary-alt);
|
||||
}
|
||||
.username-3gJmXY {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.discriminator-xUhQkU {
|
||||
color: var(--header-secondary);
|
||||
}
|
||||
.tabBarItem-1b8RUP.item-PXvHYJ {
|
||||
color: var(--header-secondary) !important;
|
||||
border-color: transparent !important;
|
||||
}
|
||||
.theme-dark .keybind-KpFkfr {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.theme-dark .closeButton-1tv5uR {
|
||||
border-color: var(--header-primary);
|
||||
}
|
||||
.barFill-23-gu- {
|
||||
background: var(--text-link);
|
||||
}
|
||||
.focused-3afm-j {
|
||||
background-color: var(--background-secondary) !important;
|
||||
color: var(--text-link) !important;
|
||||
}
|
||||
.colorDefault-2K3EoJ .checkbox-3s5GYZ, .colorDefault-2K3EoJ .radioSelection-1HmrQS {
|
||||
color: var(--text-link);
|
||||
}
|
||||
.colorDefault-2K3EoJ .checkbox-3s5GYZ {
|
||||
color: var(--text-link);
|
||||
}
|
||||
.colorDefault-2K3EoJ .check-1JyqgN {
|
||||
color: var(--background-primary);
|
||||
}
|
||||
.colorDefault-2K3EoJ.focused-3afm-j .checkbox-3s5GYZ {
|
||||
color: var(--background-primary) !important;
|
||||
}
|
||||
.colorDefault-2K3EoJ.focused-3afm-j .check-1JyqgN {
|
||||
color: var(--text-link);
|
||||
}
|
||||
.wrapper-1BJsBx.selected-bZ3Lue .childWrapper-anI2G9, .wrapper-1BJsBx:hover .childWrapper-anI2G9 {
|
||||
color: var(--background-primary);
|
||||
background-color: var(--header-secondary);
|
||||
}
|
||||
.panels-j1Uci_ {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
.navButton-2gQCx- {
|
||||
color: var(--interactive-normal);
|
||||
}
|
||||
.navButtonActive-1MkytQ {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.input-3Xdcic {
|
||||
color: var(--header-primary);
|
||||
}
|
||||
.clickable-2ap7je .header-2o-2hj {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
.peopleColumn-29fq28 {
|
||||
background-color: var(--background-tertiary);
|
||||
}
|
||||
.theme-dark .outer-1AjyKL.active-1xchHY, .theme-dark .outer-1AjyKL.interactive-3B9GmY:hover {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
|
||||
.theme-dark .popout-38lTFE {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
|
||||
.theme-dark .scrollerThemed-2oenus.themedWithTrack-q8E3vB>.scroller-2FKFPG::-webkit-scrollbar-track-piece {
|
||||
background-color: var(--background-primary);
|
||||
border: 4px solid var(--background-secondary);
|
||||
}
|
||||
|
||||
.theme-dark .scrollerThemed-2oenus.themedWithTrack-q8E3vB>.scroller-2FKFPG::-webkit-scrollbar-thumb {
|
||||
background-color: var(--background-secondary);
|
||||
border-color: var(--background-secondary);
|
||||
}
|
||||
.theme-dark .header-sJd8D7 {
|
||||
color: var(--text-normal)
|
||||
}
|
||||
'';
|
||||
}
|
3
home/gburd/features/desktop/common/dragon.nix
Normal file
3
home/gburd/features/desktop/common/dragon.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ xdragon ];
|
||||
}
|
44
home/gburd/features/desktop/common/firefox.nix
Normal file
44
home/gburd/features/desktop/common/firefox.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.browserpass.enable = true;
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
profiles.misterio = {
|
||||
bookmarks = { };
|
||||
extensions = with pkgs.inputs.firefox-addons; [
|
||||
ublock-origin
|
||||
browserpass
|
||||
];
|
||||
bookmarks = { };
|
||||
settings = {
|
||||
"browser.disableResetPrompt" = true;
|
||||
"browser.download.panel.shown" = true;
|
||||
"browser.download.useDownloadDir" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
"browser.shell.defaultBrowserCheckCount" = 1;
|
||||
"browser.startup.homepage" = "https://start.duckduckgo.com";
|
||||
"browser.uiCustomization.state" = ''{"placements":{"widget-overflow-fixed-list":[],"nav-bar":["back-button","forward-button","stop-reload-button","home-button","urlbar-container","downloads-button","library-button","ublock0_raymondhill_net-browser-action","_testpilot-containers-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["import-button","personal-bookmarks"]},"seen":["save-to-pocket-button","developer-button","ublock0_raymondhill_net-browser-action","_testpilot-containers-browser-action"],"dirtyAreaCache":["nav-bar","PersonalToolbar","toolbar-menubar","TabsToolbar","widget-overflow-fixed-list"],"currentVersion":18,"newElementCount":4}'';
|
||||
"dom.security.https_only_mode" = true;
|
||||
"identity.fxaccounts.enabled" = false;
|
||||
"privacy.trackingprotection.enabled" = true;
|
||||
"signon.rememberSignons" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
persistence = {
|
||||
# Not persisting is safer
|
||||
# "/persist/home/misterio".directories = [ ".mozilla/firefox" ];
|
||||
};
|
||||
};
|
||||
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = [ "firefox.desktop" ];
|
||||
"text/xml" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
||||
};
|
||||
}
|
13
home/gburd/features/desktop/common/font.nix
Normal file
13
home/gburd/features/desktop/common/font.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, ... }: {
|
||||
fontProfiles = {
|
||||
enable = true;
|
||||
monospace = {
|
||||
family = "FiraCode Nerd Font";
|
||||
package = pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; };
|
||||
};
|
||||
regular = {
|
||||
family = "Fira Sans";
|
||||
package = pkgs.fira;
|
||||
};
|
||||
};
|
||||
}
|
30
home/gburd/features/desktop/common/gtk.nix
Normal file
30
home/gburd/features/desktop/common/gtk.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) gtkThemeFromScheme;
|
||||
in
|
||||
rec {
|
||||
gtk = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = config.fontProfiles.regular.family;
|
||||
size = 12;
|
||||
};
|
||||
theme = {
|
||||
name = "${config.colorscheme.slug}";
|
||||
package = gtkThemeFromScheme { scheme = config.colorscheme; };
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Papirus";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
};
|
||||
|
||||
services.xsettingsd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"Net/ThemeName" = "${gtk.theme.name}";
|
||||
"Net/IconThemeName" = "${gtk.iconTheme.name}";
|
||||
};
|
||||
};
|
||||
}
|
46
home/gburd/features/desktop/common/kdeconnect.nix
Normal file
46
home/gburd/features/desktop/common/kdeconnect.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
|
||||
kdeconnect-cli = "${pkgs.plasma5Packages.kdeconnect-kde}/bin/kdeconnect-cli";
|
||||
fortune = "${pkgs.fortune}/bin/fortune";
|
||||
|
||||
script-fortune = pkgs.writeShellScriptBin "fortune" ''
|
||||
${kdeconnect-cli} -d $(${kdeconnect-cli} --list-available --id-only) --ping-msg "$(${fortune})"
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
# Hide all .desktop, except for org.kde.kdeconnect.settings
|
||||
xdg.desktopEntries = {
|
||||
"org.kde.kdeconnect.sms" = {
|
||||
exec = "";
|
||||
name = "KDE Connect SMS";
|
||||
settings.NoDisplay = "true";
|
||||
};
|
||||
"org.kde.kdeconnect.nonplasma" = {
|
||||
exec = "";
|
||||
name = "KDE Connect Indicator";
|
||||
settings.NoDisplay = "true";
|
||||
};
|
||||
"org.kde.kdeconnect.app" = {
|
||||
exec = "";
|
||||
name = "KDE Connect";
|
||||
settings.NoDisplay = "true";
|
||||
};
|
||||
};
|
||||
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"kdeconnect-scripts/fortune.sh".source = "${script-fortune}/bin/fortune";
|
||||
};
|
||||
|
||||
home.persistence = {
|
||||
"/persist/home/misterio".directories = [ ".config/kdeconnect" ];
|
||||
};
|
||||
}
|
3
home/gburd/features/desktop/common/pavucontrol.nix
Normal file
3
home/gburd/features/desktop/common/pavucontrol.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ pavucontrol ];
|
||||
}
|
7
home/gburd/features/desktop/common/playerctl.nix
Normal file
7
home/gburd/features/desktop/common/playerctl.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [ playerctl ];
|
||||
services.playerctld = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
11
home/gburd/features/desktop/common/qt.nix
Normal file
11
home/gburd/features/desktop/common/qt.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gtk";
|
||||
style = {
|
||||
name = "gtk2";
|
||||
package = pkgs.qt6gtk2;
|
||||
};
|
||||
};
|
||||
}
|
4
home/gburd/features/desktop/common/slack.nix
Normal file
4
home/gburd/features/desktop/common/slack.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.slack ];
|
||||
}
|
6
home/gburd/features/desktop/common/sublime-music.nix
Normal file
6
home/gburd/features/desktop/common/sublime-music.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
home.packages = [ pkgs.sublime-music ];
|
||||
home.persistence = {
|
||||
"/persist/home/misterio".directories = [ ".config/sublime-music" ];
|
||||
};
|
||||
}
|
39
home/gburd/features/desktop/common/wayland-wm/default.nix
Normal file
39
home/gburd/features/desktop/common/wayland-wm/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hyprland-vnc.nix
|
||||
./gammastep.nix
|
||||
./kitty.nix
|
||||
./mako.nix
|
||||
./qutebrowser.nix
|
||||
./swayidle.nix
|
||||
./swaylock.nix
|
||||
./waybar.nix
|
||||
./wofi.nix
|
||||
./zathura.nix
|
||||
];
|
||||
|
||||
xdg.mimeApps.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
grim
|
||||
gtk3 # For gtk-launch
|
||||
imv
|
||||
mimeo
|
||||
primary-xwayland
|
||||
pulseaudio
|
||||
slurp
|
||||
waypipe
|
||||
wf-recorder
|
||||
wl-clipboard
|
||||
wl-mirror
|
||||
wl-mirror-pick
|
||||
xdg-utils-spawn-terminal # Patched to open terminal
|
||||
ydotool
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
MOZ_ENABLE_WAYLAND = 1;
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
LIBSEAT_BACKEND = "logind";
|
||||
};
|
||||
}
|
13
home/gburd/features/desktop/common/wayland-wm/gammastep.nix
Normal file
13
home/gburd/features/desktop/common/wayland-wm/gammastep.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
services.gammastep = {
|
||||
enable = true;
|
||||
provider = "geoclue2";
|
||||
temperature = {
|
||||
day = 6000;
|
||||
night = 4600;
|
||||
};
|
||||
settings = {
|
||||
general.adjustment-method = "wayland";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
enabledMonitors = lib.filter (m: m.enabled) config.monitors;
|
||||
# A nice VNC script for remotes running hyprland
|
||||
vncsh = pkgs.writeShellScriptBin "vnc.sh" ''
|
||||
ssh $1 bash <<'EOF'
|
||||
pgrep "wayvnc" && exit
|
||||
export HYPRLAND_INSTANCE_SIGNATURE="$(ls /tmp/hypr/ -lt | head -2 | tail -1 | rev | cut -d ' ' -f1 | rev)"
|
||||
export WAYLAND_DISPLAY="wayland-1"
|
||||
ip="$(ip addr show dev tailscale0 | grep 'inet ' | xargs | cut -d ' ' -f2 | cut -d '/' -f1)"
|
||||
xpos="$(hyprctl monitors -j | jq -r 'sort_by(.x)[-1] | .x + .width')"
|
||||
|
||||
${lib.concatLines (lib.forEach enabledMonitors (m: ''
|
||||
hyprctl output create headless
|
||||
monitor="$(hyprctl monitors -j | jq -r 'map(.name)[-1]')"
|
||||
hyprctl keyword monitor $monitor,${toString m.width}x${toString m.height}@${toString m.refreshRate},$(($xpos + ${toString m.x}))x${toString m.y},1
|
||||
screen -d -m wayvnc -k br -S /tmp/vnc-${m.workspace} -f 60 -o $monitor $ip 590${m.workspace}
|
||||
sudo iptables -I INPUT -j ACCEPT -p tcp --dport 590${m.workspace}
|
||||
''))}
|
||||
EOF
|
||||
|
||||
${lib.concatLines (lib.forEach enabledMonitors (m: ''
|
||||
vncviewer $1::590${m.workspace} &
|
||||
''))}
|
||||
|
||||
wait
|
||||
'';
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
vncsh
|
||||
wayvnc
|
||||
tigervnc
|
||||
];
|
||||
}
|
66
home/gburd/features/desktop/common/wayland-wm/kitty.nix
Normal file
66
home/gburd/features/desktop/common/wayland-wm/kitty.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (config.colorscheme) colors;
|
||||
kitty-xterm = pkgs.writeShellScriptBin "xterm" ''
|
||||
${config.programs.kitty.package}/bin/kitty -1 "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
home = {
|
||||
packages = [ kitty-xterm ];
|
||||
sessionVariables = {
|
||||
TERMINAL = "kitty -1";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = config.fontProfiles.monospace.family;
|
||||
size = 12;
|
||||
};
|
||||
settings = {
|
||||
shell_integration = "no-rc"; # I prefer to do it manually
|
||||
scrollback_lines = 4000;
|
||||
scrollback_pager_history_size = 2048;
|
||||
window_padding_width = 15;
|
||||
foreground = "#${colors.base05}";
|
||||
background = "#${colors.base00}";
|
||||
selection_background = "#${colors.base05}";
|
||||
selection_foreground = "#${colors.base00}";
|
||||
url_color = "#${colors.base04}";
|
||||
cursor = "#${colors.base05}";
|
||||
active_border_color = "#${colors.base03}";
|
||||
inactive_border_color = "#${colors.base01}";
|
||||
active_tab_background = "#${colors.base00}";
|
||||
active_tab_foreground = "#${colors.base05}";
|
||||
inactive_tab_background = "#${colors.base01}";
|
||||
inactive_tab_foreground = "#${colors.base04}";
|
||||
tab_bar_background = "#${colors.base01}";
|
||||
color0 = "#${colors.base00}";
|
||||
color1 = "#${colors.base08}";
|
||||
color2 = "#${colors.base0B}";
|
||||
color3 = "#${colors.base0A}";
|
||||
color4 = "#${colors.base0D}";
|
||||
color5 = "#${colors.base0E}";
|
||||
color6 = "#${colors.base0C}";
|
||||
color7 = "#${colors.base05}";
|
||||
color8 = "#${colors.base03}";
|
||||
color9 = "#${colors.base08}";
|
||||
color10 = "#${colors.base0B}";
|
||||
color11 = "#${colors.base0A}";
|
||||
color12 = "#${colors.base0D}";
|
||||
color13 = "#${colors.base0E}";
|
||||
color14 = "#${colors.base0C}";
|
||||
color15 = "#${colors.base07}";
|
||||
color16 = "#${colors.base09}";
|
||||
color17 = "#${colors.base0F}";
|
||||
color18 = "#${colors.base01}";
|
||||
color19 = "#${colors.base02}";
|
||||
color20 = "#${colors.base04}";
|
||||
color21 = "#${colors.base06}";
|
||||
};
|
||||
};
|
||||
}
|
23
home/gburd/features/desktop/common/wayland-wm/mako.nix
Normal file
23
home/gburd/features/desktop/common/wayland-wm/mako.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, ... }:
|
||||
let inherit (config.colorscheme) colors kind;
|
||||
in {
|
||||
services.mako = {
|
||||
enable = true;
|
||||
iconPath =
|
||||
if kind == "dark" then
|
||||
"${config.gtk.iconTheme.package}/share/icons/Papirus-Dark"
|
||||
else
|
||||
"${config.gtk.iconTheme.package}/share/icons/Papirus-Light";
|
||||
font = "${config.fontProfiles.regular.family} 12";
|
||||
padding = "10,20";
|
||||
anchor = "top-center";
|
||||
width = 400;
|
||||
height = 150;
|
||||
borderSize = 2;
|
||||
defaultTimeout = 12000;
|
||||
backgroundColor = "#${colors.base00}dd";
|
||||
borderColor = "#${colors.base03}dd";
|
||||
textColor = "#${colors.base05}dd";
|
||||
layer = "overlay";
|
||||
};
|
||||
}
|
177
home/gburd/features/desktop/common/wayland-wm/qutebrowser.nix
Normal file
177
home/gburd/features/desktop/common/wayland-wm/qutebrowser.nix
Normal file
|
@ -0,0 +1,177 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let inherit (config.colorscheme) colors kind;
|
||||
in
|
||||
{
|
||||
home.persistence = {
|
||||
"/persist/home/misterio".directories = [
|
||||
".config/qutebrowser/bookmarks"
|
||||
".config/qutebrowser/greasemonkey"
|
||||
".local/share/qutebrowser"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = [ "org.qutebrowser.qutebrowser.desktop" ];
|
||||
"text/xml" = [ "org.qutebrowser.qutebrowser.desktop" ];
|
||||
"x-scheme-handler/http" = [ "org.qutebrowser.qutebrowser.desktop" ];
|
||||
"x-scheme-handler/https" = [ "org.qutebrowser.qutebrowser.desktop" ];
|
||||
"x-scheme-handler/qute" = [ "org.qutebrowser.qutebrowser.desktop" ];
|
||||
};
|
||||
|
||||
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
loadAutoconfig = true;
|
||||
settings = {
|
||||
editor.command = [ "xdg-open" "{file}" ];
|
||||
tabs = {
|
||||
show = "multiple";
|
||||
position = "left";
|
||||
tree_tabs = true;
|
||||
};
|
||||
fonts = {
|
||||
default_family = config.fontProfiles.regular.family;
|
||||
default_size = "12pt";
|
||||
};
|
||||
colors = {
|
||||
webpage = {
|
||||
preferred_color_scheme = kind;
|
||||
bg = "#ffffff";
|
||||
};
|
||||
completion = {
|
||||
fg = "#${colors.base05}";
|
||||
match.fg = "#${colors.base09}";
|
||||
even.bg = "#${colors.base00}";
|
||||
odd.bg = "#${colors.base00}";
|
||||
scrollbar = {
|
||||
bg = "#${colors.base00}";
|
||||
fg = "#${colors.base05}";
|
||||
};
|
||||
category = {
|
||||
bg = "#${colors.base00}";
|
||||
fg = "#${colors.base0D}";
|
||||
border = {
|
||||
bottom = "#${colors.base00}";
|
||||
top = "#${colors.base00}";
|
||||
};
|
||||
};
|
||||
item.selected = {
|
||||
bg = "#${colors.base02}";
|
||||
fg = "#${colors.base05}";
|
||||
match.fg = "#${colors.base05}";
|
||||
border = {
|
||||
bottom = "#${colors.base02}";
|
||||
top = "#${colors.base02}";
|
||||
};
|
||||
};
|
||||
};
|
||||
contextmenu = {
|
||||
disabled = {
|
||||
bg = "#${colors.base01}";
|
||||
fg = "#${colors.base04}";
|
||||
};
|
||||
menu = {
|
||||
bg = "#${colors.base00}";
|
||||
fg = "#${colors.base05}";
|
||||
};
|
||||
selected = {
|
||||
bg = "#${colors.base02}";
|
||||
fg = "#${colors.base05}";
|
||||
};
|
||||
};
|
||||
downloads = {
|
||||
bar.bg = "#${colors.base00}";
|
||||
error.fg = "#${colors.base08}";
|
||||
start = {
|
||||
bg = "#${colors.base0D}";
|
||||
fg = "#${colors.base00}";
|
||||
};
|
||||
stop = {
|
||||
bg = "#${colors.base0C}";
|
||||
fg = "#${colors.base00}";
|
||||
};
|
||||
};
|
||||
hints = {
|
||||
bg = "#${colors.base0A}";
|
||||
fg = "#${colors.base00}";
|
||||
match.fg = "#${colors.base05}";
|
||||
};
|
||||
keyhint = {
|
||||
bg = "#${colors.base00}";
|
||||
fg = "#${colors.base05}";
|
||||
suffix.fg = "#${colors.base05}";
|
||||
};
|
||||
messages = {
|
||||
error.bg = "#${colors.base08}";
|
||||
error.border = "#${colors.base08}";
|
||||
error.fg = "#${colors.base00}";
|
||||
info.bg = "#${colors.base00}";
|
||||
info.border = "#${colors.base00}";
|
||||
info.fg = "#${colors.base05}";
|
||||
warning.bg = "#${colors.base0E}";
|
||||
warning.border = "#${colors.base0E}";
|
||||
warning.fg = "#${colors.base00}";
|
||||
};
|
||||
prompts = {
|
||||
bg = "#${colors.base00}";
|
||||
fg = "#${colors.base05}";
|
||||
border = "#${colors.base00}";
|
||||
selected.bg = "#${colors.base02}";
|
||||
};
|
||||
statusbar = {
|
||||
caret.bg = "#${colors.base00}";
|
||||
caret.fg = "#${colors.base0D}";
|
||||
caret.selection.bg = "#${colors.base00}";
|
||||
caret.selection.fg = "#${colors.base0D}";
|
||||
command.bg = "#${colors.base01}";
|
||||
command.fg = "#${colors.base04}";
|
||||
command.private.bg = "#${colors.base01}";
|
||||
command.private.fg = "#${colors.base0E}";
|
||||
insert.bg = "#${colors.base00}";
|
||||
insert.fg = "#${colors.base0C}";
|
||||
normal.bg = "#${colors.base00}";
|
||||
normal.fg = "#${colors.base05}";
|
||||
passthrough.bg = "#${colors.base00}";
|
||||
passthrough.fg = "#${colors.base0A}";
|
||||
private.bg = "#${colors.base00}";
|
||||
private.fg = "#${colors.base0E}";
|
||||
progress.bg = "#${colors.base0D}";
|
||||
url.error.fg = "#${colors.base08}";
|
||||
url.fg = "#${colors.base05}";
|
||||
url.hover.fg = "#${colors.base09}";
|
||||
url.success.http.fg = "#${colors.base0B}";
|
||||
url.success.https.fg = "#${colors.base0B}";
|
||||
url.warn.fg = "#${colors.base0E}";
|
||||
};
|
||||
tabs = {
|
||||
bar.bg = "#${colors.base00}";
|
||||
even.bg = "#${colors.base00}";
|
||||
even.fg = "#${colors.base05}";
|
||||
indicator.error = "#${colors.base08}";
|
||||
indicator.start = "#${colors.base0D}";
|
||||
indicator.stop = "#${colors.base0C}";
|
||||
odd.bg = "#${colors.base00}";
|
||||
odd.fg = "#${colors.base05}";
|
||||
pinned.even.bg = "#${colors.base0B}";
|
||||
pinned.even.fg = "#${colors.base00}";
|
||||
pinned.odd.bg = "#${colors.base0B}";
|
||||
pinned.odd.fg = "#${colors.base00}";
|
||||
pinned.selected.even.bg = "#${colors.base02}";
|
||||
pinned.selected.even.fg = "#${colors.base05}";
|
||||
pinned.selected.odd.bg = "#${colors.base02}";
|
||||
pinned.selected.odd.fg = "#${colors.base05}";
|
||||
selected.even.bg = "#${colors.base02}";
|
||||
selected.even.fg = "#${colors.base05}";
|
||||
selected.odd.bg = "#${colors.base02}";
|
||||
selected.odd.fg = "#${colors.base05}";
|
||||
};
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
c.tabs.padding = {"bottom": 10, "left": 10, "right": 10, "top": 10}
|
||||
'';
|
||||
};
|
||||
}
|
54
home/gburd/features/desktop/common/wayland-wm/swayidle.nix
Normal file
54
home/gburd/features/desktop/common/wayland-wm/swayidle.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
let
|
||||
swaylock = "${config.programs.swaylock.package}/bin/swaylock";
|
||||
pgrep = "${pkgs.procps}/bin/pgrep";
|
||||
pactl = "${pkgs.pulseaudio}/bin/pactl";
|
||||
hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
|
||||
swaymsg = "${config.wayland.windowManager.sway.package}/bin/swaymsg";
|
||||
|
||||
isLocked = "${pgrep} -x ${swaylock}";
|
||||
lockTime = 4 * 60; # TODO: configurable desktop (10 min)/laptop (4 min)
|
||||
|
||||
# Makes two timeouts: one for when the screen is not locked (lockTime+timeout) and one for when it is.
|
||||
afterLockTimeout = { timeout, command, resumeCommand ? null }: [
|
||||
{ timeout = lockTime + timeout; inherit command resumeCommand; }
|
||||
{ command = "${isLocked} && ${command}"; inherit resumeCommand timeout; }
|
||||
];
|
||||
in
|
||||
{
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
systemdTarget = "graphical-session.target";
|
||||
timeouts =
|
||||
# Lock screen
|
||||
[{
|
||||
timeout = lockTime;
|
||||
command = "${swaylock} -i ${config.wallpaper} --daemonize";
|
||||
}] ++
|
||||
# Mute mic
|
||||
(afterLockTimeout {
|
||||
timeout = 10;
|
||||
command = "${pactl} set-source-mute @DEFAULT_SOURCE@ yes";
|
||||
resumeCommand = "${pactl} set-source-mute @DEFAULT_SOURCE@ no";
|
||||
}) ++
|
||||
# Turn off RGB
|
||||
(lib.optionals config.services.rgbdaemon.enable (afterLockTimeout {
|
||||
timeout = 20;
|
||||
command = "systemctl --user stop rgbdaemon";
|
||||
resumeCommand = "systemctl --user start rgbdaemon";
|
||||
})) ++
|
||||
# Turn off displays (hyprland)
|
||||
(lib.optionals config.wayland.windowManager.hyprland.enable (afterLockTimeout {
|
||||
timeout = 40;
|
||||
command = "${hyprctl} dispatch dpms off";
|
||||
resumeCommand = "${hyprctl} dispatch dpms on";
|
||||
})) ++
|
||||
# Turn off displays (sway)
|
||||
(lib.optionals config.wayland.windowManager.sway.enable (afterLockTimeout {
|
||||
timeout = 40;
|
||||
command = "${swaymsg} 'output * dpms off'";
|
||||
resumeCommand = "${swaymsg} 'output * dpms on'";
|
||||
}));
|
||||
};
|
||||
}
|
43
home/gburd/features/desktop/common/wayland-wm/swaylock.nix
Normal file
43
home/gburd/features/desktop/common/wayland-wm/swaylock.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let inherit (config.colorscheme) colors;
|
||||
in
|
||||
{
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
package = pkgs.swaylock-effects;
|
||||
settings = {
|
||||
effect-blur = "20x3";
|
||||
fade-in = 0.1;
|
||||
|
||||
font = config.fontProfiles.regular.family;
|
||||
font-size = 15;
|
||||
|
||||
line-uses-inside = true;
|
||||
disable-caps-lock-text = true;
|
||||
indicator-caps-lock = true;
|
||||
indicator-radius = 40;
|
||||
indicator-idle-visible = true;
|
||||
indicator-y-position = 1000;
|
||||
|
||||
ring-color = "#${colors.base02}";
|
||||
inside-wrong-color = "#${colors.base08}";
|
||||
ring-wrong-color = "#${colors.base08}";
|
||||
key-hl-color = "#${colors.base0B}";
|
||||
bs-hl-color = "#${colors.base08}";
|
||||
ring-ver-color = "#${colors.base09}";
|
||||
inside-ver-color = "#${colors.base09}";
|
||||
inside-color = "#${colors.base01}";
|
||||
text-color = "#${colors.base07}";
|
||||
text-clear-color = "#${colors.base01}";
|
||||
text-ver-color = "#${colors.base01}";
|
||||
text-wrong-color = "#${colors.base01}";
|
||||
text-caps-lock-color = "#${colors.base07}";
|
||||
inside-clear-color = "#${colors.base0C}";
|
||||
ring-clear-color = "#${colors.base0C}";
|
||||
inside-caps-lock-color = "#${colors.base09}";
|
||||
ring-caps-lock-color = "#${colors.base02}";
|
||||
separator-color = "#${colors.base02}";
|
||||
};
|
||||
};
|
||||
}
|
392
home/gburd/features/desktop/common/wayland-wm/waybar.nix
Normal file
392
home/gburd/features/desktop/common/wayland-wm/waybar.nix
Normal file
|
@ -0,0 +1,392 @@
|
|||
{ outputs, config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
# Dependencies
|
||||
cat = "${pkgs.coreutils}/bin/cat";
|
||||
cut = "${pkgs.coreutils}/bin/cut";
|
||||
find = "${pkgs.findutils}/bin/find";
|
||||
grep = "${pkgs.gnugrep}/bin/grep";
|
||||
pgrep = "${pkgs.procps}/bin/pgrep";
|
||||
tail = "${pkgs.coreutils}/bin/tail";
|
||||
wc = "${pkgs.coreutils}/bin/wc";
|
||||
xargs = "${pkgs.findutils}/bin/xargs";
|
||||
timeout = "${pkgs.coreutils}/bin/timeout";
|
||||
ping = "${pkgs.iputils}/bin/ping";
|
||||
|
||||
jq = "${pkgs.jq}/bin/jq";
|
||||
gamemoded = "${pkgs.gamemode}/bin/gamemoded";
|
||||
systemctl = "${pkgs.systemd}/bin/systemctl";
|
||||
journalctl = "${pkgs.systemd}/bin/journalctl";
|
||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||
playerctld = "${pkgs.playerctl}/bin/playerctld";
|
||||
pavucontrol = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
wofi = "${pkgs.wofi}/bin/wofi";
|
||||
|
||||
# Function to simplify making waybar outputs
|
||||
jsonOutput = name: { pre ? "", text ? "", tooltip ? "", alt ? "", class ? "", percentage ? "" }: "${pkgs.writeShellScriptBin "waybar-${name}" ''
|
||||
set -euo pipefail
|
||||
${pre}
|
||||
${jq} -cn \
|
||||
--arg text "${text}" \
|
||||
--arg tooltip "${tooltip}" \
|
||||
--arg alt "${alt}" \
|
||||
--arg class "${class}" \
|
||||
--arg percentage "${percentage}" \
|
||||
'{text:$text,tooltip:$tooltip,alt:$alt,class:$class,percentage:$percentage}'
|
||||
''}/bin/waybar-${name}";
|
||||
in
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar.overrideAttrs (oa: {
|
||||
mesonFlags = (oa.mesonFlags or [ ]) ++ [ "-Dexperimental=true" ];
|
||||
});
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
primary = {
|
||||
mode = "dock";
|
||||
layer = "top";
|
||||
height = 40;
|
||||
margin = "6";
|
||||
position = "top";
|
||||
modules-left = [
|
||||
"custom/menu"
|
||||
] ++ (lib.optionals config.wayland.windowManager.sway.enable [
|
||||
"sway/workspaces"
|
||||
"sway/mode"
|
||||
]) ++ (lib.optionals config.wayland.windowManager.hyprland.enable [
|
||||
"hyprland/workspaces"
|
||||
"hyprland/submap"
|
||||
]) ++ [
|
||||
"custom/currentplayer"
|
||||
"custom/player"
|
||||
];
|
||||
|
||||
modules-center = [
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
"clock"
|
||||
"custom/unread-mail"
|
||||
"custom/gpg-agent"
|
||||
];
|
||||
|
||||
modules-right = [
|
||||
"network"
|
||||
"custom/tailscale-ping"
|
||||
"custom/gamemode"
|
||||
# TODO: currently broken for some reason
|
||||
# "custom/gammastep"
|
||||
"tray"
|
||||
"custom/hostname"
|
||||
];
|
||||
|
||||
clock = {
|
||||
interval = 1;
|
||||
format = "{:%d/%m %H:%M:%S}";
|
||||
format-alt = "{:%Y-%m-%d %H:%M:%S %z}";
|
||||
on-click-left = "mode";
|
||||
tooltip-format = ''
|
||||
<big>{:%Y %B}</big>
|
||||
<tt><small>{calendar}</small></tt>'';
|
||||
};
|
||||
pulseaudio = {
|
||||
format = "{icon} {volume}%";
|
||||
format-muted = " 0%";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
headset = "";
|
||||
portable = "";
|
||||
default = [ "" "" "" ];
|
||||
};
|
||||
on-click = pavucontrol;
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
battery = {
|
||||
bat = "BAT0";
|
||||
interval = 10;
|
||||
format-icons = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
onclick = "";
|
||||
};
|
||||
"sway/window" = {
|
||||
max-length = 20;
|
||||
};
|
||||
network = {
|
||||
interval = 3;
|
||||
format-wifi = " {essid}";
|
||||
format-ethernet = " Connected";
|
||||
format-disconnected = "";
|
||||
tooltip-format = ''
|
||||
{ifname}
|
||||
{ipaddr}/{cidr}
|
||||
Up: {bandwidthUpBits}
|
||||
Down: {bandwidthDownBits}'';
|
||||
on-click = "";
|
||||
};
|
||||
"custom/tailscale-ping" = {
|
||||
interval = 10;
|
||||
return-type = "json";
|
||||
exec =
|
||||
let
|
||||
inherit (builtins) concatStringsSep attrNames;
|
||||
hosts = attrNames outputs.nixosConfigurations;
|
||||
homeMachine = "merope";
|
||||
remoteMachine = "alcyone";
|
||||
in
|
||||
jsonOutput "tailscale-ping" {
|
||||
# Build variables for each host
|
||||
pre = ''
|
||||
set -o pipefail
|
||||
${concatStringsSep "\n" (map (host: ''
|
||||
ping_${host}="$(${timeout} 2 ${ping} -c 1 -q ${host} 2>/dev/null | ${tail} -1 | ${cut} -d '/' -f5 | ${cut} -d '.' -f1)ms" || ping_${host}="Disconnected"
|
||||
'') hosts)}
|
||||
'';
|
||||
# Access a remote machine's and a home machine's ping
|
||||
text = " $ping_${remoteMachine} / $ping_${homeMachine}";
|
||||
# Show pings from all machines
|
||||
tooltip = concatStringsSep "\n" (map (host: "${host}: $ping_${host}") hosts);
|
||||
};
|
||||
format = "{}";
|
||||
on-click = "";
|
||||
};
|
||||
"custom/menu" = {
|
||||
return-type = "json";
|
||||
exec = jsonOutput "menu" {
|
||||
text = "";
|
||||
tooltip = ''$(${cat} /etc/os-release | ${grep} PRETTY_NAME | ${cut} -d '"' -f2)'';
|
||||
};
|
||||
on-click = "${wofi} -S drun -x 10 -y 10 -W 25% -H 60%";
|
||||
};
|
||||
"custom/hostname" = {
|
||||
exec = "echo $USER@$HOSTNAME";
|
||||
};
|
||||
"custom/unread-mail" = {
|
||||
interval = 5;
|
||||
return-type = "json";
|
||||
exec = jsonOutput "unread-mail" {
|
||||
pre = ''
|
||||
count=$(${find} ~/Mail/*/Inbox/new -type f | ${wc} -l)
|
||||
if ${pgrep} mbsync &>/dev/null; then
|
||||
status="syncing"
|
||||
else if [ "$count" == "0" ]; then
|
||||
status="read"
|
||||
else
|
||||
status="unread"
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
text = "$count";
|
||||
alt = "$status";
|
||||
};
|
||||
format = "{icon} ({})";
|
||||
format-icons = {
|
||||
"read" = "";
|
||||
"unread" = "";
|
||||
"syncing" = "";
|
||||
};
|
||||
};
|
||||
"custom/gpg-agent" = {
|
||||
interval = 2;
|
||||
return-type = "json";
|
||||
exec =
|
||||
let gpgCmds = import ../../../cli/gpg-commands.nix { inherit pkgs; };
|
||||
in
|
||||
jsonOutput "gpg-agent" {
|
||||
pre = ''status=$(${gpgCmds.isUnlocked} && echo "unlocked" || echo "locked")'';
|
||||
alt = "$status";
|
||||
tooltip = "GPG is $status";
|
||||
};
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"locked" = "";
|
||||
"unlocked" = "";
|
||||
};
|
||||
on-click = "";
|
||||
};
|
||||
"custom/gamemode" = {
|
||||
exec-if = "${gamemoded} --status | ${grep} 'is active' -q";
|
||||
interval = 2;
|
||||
return-type = "json";
|
||||
exec = jsonOutput "gamemode" {
|
||||
tooltip = "Gamemode is active";
|
||||
};
|
||||
format = " ";
|
||||
};
|
||||
"custom/gammastep" = {
|
||||
interval = 5;
|
||||
return-type = "json";
|
||||
exec = jsonOutput "gammastep" {
|
||||
pre = ''
|
||||
if unit_status="$(${systemctl} --user is-active gammastep)"; then
|
||||
status="$unit_status ($(${journalctl} --user -u gammastep.service -g 'Period: ' | ${tail} -1 | ${cut} -d ':' -f6 | ${xargs}))"
|
||||
else
|
||||
status="$unit_status"
|
||||
fi
|
||||
'';
|
||||
alt = "\${status:-inactive}";
|
||||
tooltip = "Gammastep is $status";
|
||||
};
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"activating" = " ";
|
||||
"deactivating" = " ";
|
||||
"inactive" = "? ";
|
||||
"active (Night)" = " ";
|
||||
"active (Nighttime)" = " ";
|
||||
"active (Transition (Night)" = " ";
|
||||
"active (Transition (Nighttime)" = " ";
|
||||
"active (Day)" = " ";
|
||||
"active (Daytime)" = " ";
|
||||
"active (Transition (Day)" = " ";
|
||||
"active (Transition (Daytime)" = " ";
|
||||
};
|
||||
on-click = "${systemctl} --user is-active gammastep && ${systemctl} --user stop gammastep || ${systemctl} --user start gammastep";
|
||||
};
|
||||
"custom/currentplayer" = {
|
||||
interval = 2;
|
||||
return-type = "json";
|
||||
exec = jsonOutput "currentplayer" {
|
||||
pre = ''
|
||||
player="$(${playerctl} status -f "{{playerName}}" 2>/dev/null || echo "No player active" | ${cut} -d '.' -f1)"
|
||||
count="$(${playerctl} -l | ${wc} -l)"
|
||||
if ((count > 1)); then
|
||||
more=" +$((count - 1))"
|
||||
else
|
||||
more=""
|
||||
fi
|
||||
'';
|
||||
alt = "$player";
|
||||
tooltip = "$player ($count available)";
|
||||
text = "$more";
|
||||
};
|
||||
format = "{icon}{}";
|
||||
format-icons = {
|
||||
"No player active" = " ";
|
||||
"Celluloid" = " ";
|
||||
"spotify" = " ";
|
||||
"ncspot" = " ";
|
||||
"qutebrowser" = " ";
|
||||
"firefox" = " ";
|
||||
"discord" = " ";
|
||||
"sublimemusic" = " ";
|
||||
"kdeconnect" = " ";
|
||||
"chromium" = " ";
|
||||
};
|
||||
on-click = "${playerctld} shift";
|
||||
on-click-right = "${playerctld} unshift";
|
||||
};
|
||||
"custom/player" = {
|
||||
exec-if = "${playerctl} status";
|
||||
exec = ''${playerctl} metadata --format '{"text": "{{title}} - {{artist}}", "alt": "{{status}}", "tooltip": "{{title}} - {{artist}} ({{album}})"}' '';
|
||||
return-type = "json";
|
||||
interval = 2;
|
||||
max-length = 30;
|
||||
format = "{icon} {}";
|
||||
format-icons = {
|
||||
"Playing" = "";
|
||||
"Paused" = " ";
|
||||
"Stopped" = "";
|
||||
};
|
||||
on-click = "${playerctl} play-pause";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
# Cheatsheet:
|
||||
# x -> all sides
|
||||
# x y -> vertical, horizontal
|
||||
# x y z -> top, horizontal, bottom
|
||||
# w x y z -> top, right, bottom, left
|
||||
style = let inherit (config.colorscheme) colors; in /* css */ ''
|
||||
* {
|
||||
font-family: ${config.fontProfiles.regular.family}, ${config.fontProfiles.monospace.family};
|
||||
font-size: 12pt;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
margin-right: -15px;
|
||||
}
|
||||
|
||||
.modules-left {
|
||||
margin-left: -15px;
|
||||
}
|
||||
|
||||
window#waybar.top {
|
||||
opacity: 0.95;
|
||||
padding: 0;
|
||||
background-color: #${colors.base00};
|
||||
border: 2px solid #${colors.base0C};
|
||||
border-radius: 10px;
|
||||
}
|
||||
window#waybar.bottom {
|
||||
opacity: 0.90;
|
||||
background-color: #${colors.base00};
|
||||
border: 2px solid #${colors.base0C};
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
color: #${colors.base05};
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
background-color: #${colors.base01};
|
||||
color: #${colors.base05};
|
||||
padding: 5px 1px;
|
||||
margin: 3px 0;
|
||||
}
|
||||
#workspaces button.hidden {
|
||||
background-color: #${colors.base00};
|
||||
color: #${colors.base04};
|
||||
}
|
||||
#workspaces button.focused,
|
||||
#workspaces button.active {
|
||||
background-color: #${colors.base0A};
|
||||
color: #${colors.base00};
|
||||
}
|
||||
|
||||
#clock {
|
||||
background-color: #${colors.base0C};
|
||||
color: #${colors.base00};
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#custom-menu {
|
||||
background-color: #${colors.base0C};
|
||||
color: #${colors.base00};
|
||||
padding-left: 15px;
|
||||
padding-right: 22px;
|
||||
margin: 0;
|
||||
border-radius: 10px;
|
||||
}
|
||||
#custom-hostname {
|
||||
background-color: #${colors.base0C};
|
||||
color: #${colors.base00};
|
||||
padding-left: 15px;
|
||||
padding-right: 18px;
|
||||
margin-right: 0;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
border-radius: 10px;
|
||||
}
|
||||
#custom-currentplayer {
|
||||
padding-right: 0;
|
||||
}
|
||||
#tray {
|
||||
color: #${colors.base05};
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
54
home/gburd/features/desktop/common/wayland-wm/wezterm.nix
Normal file
54
home/gburd/features/desktop/common/wayland-wm/wezterm.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (config) colorscheme;
|
||||
inherit (colorscheme) colors;
|
||||
in
|
||||
{
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
colorSchemes = {
|
||||
"${colorscheme.slug}" = {
|
||||
foreground = "#${colors.base05}";
|
||||
background = "#${colors.base00}";
|
||||
|
||||
ansi = [
|
||||
"#${colors.base08}"
|
||||
"#${colors.base09}"
|
||||
"#${colors.base0A}"
|
||||
"#${colors.base0B}"
|
||||
"#${colors.base0C}"
|
||||
"#${colors.base0D}"
|
||||
"#${colors.base0E}"
|
||||
"#${colors.base0F}"
|
||||
];
|
||||
brights = [
|
||||
"#${colors.base00}"
|
||||
"#${colors.base01}"
|
||||
"#${colors.base02}"
|
||||
"#${colors.base03}"
|
||||
"#${colors.base04}"
|
||||
"#${colors.base05}"
|
||||
"#${colors.base06}"
|
||||
"#${colors.base07}"
|
||||
];
|
||||
cursor_fg = "#${colors.base00}";
|
||||
cursor_bg = "#${colors.base05}";
|
||||
selection_fg = "#${colors.base00}";
|
||||
selection_bg = "#${colors.base05}";
|
||||
};
|
||||
};
|
||||
extraConfig = /* lua */ ''
|
||||
return {
|
||||
font = wezterm.font("${config.fontProfiles.monospace.family}"),
|
||||
font_size = 12.0,
|
||||
color_scheme = "${colorscheme.slug}",
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
window_close_confirmation = "NeverPrompt",
|
||||
set_environment_variables = {
|
||||
TERM = 'wezterm',
|
||||
},
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
--- a/src/wofi.c Mon Feb 22 23:53:57 2021 -0800
|
||||
+++ b/src/wofi.c Wed Aug 11 13:49:13 2021 -0300
|
||||
@@ -881,12 +881,15 @@
|
||||
}
|
||||
|
||||
void wofi_term_run(const char* cmd) {
|
||||
+ char *shell = getenv("SHELL");
|
||||
+ if (!shell) shell = "sh";
|
||||
+
|
||||
if(terminal != NULL) {
|
||||
- execlp(terminal, terminal, "-e", cmd, NULL);
|
||||
+ execlp(terminal, terminal, "-e", shell, "-c", cmd, NULL);
|
||||
}
|
||||
size_t term_count = sizeof(terminals) / sizeof(char*);
|
||||
for(size_t count = 0; count < term_count; ++count) {
|
||||
- execlp(terminals[count], terminals[count], "-e", cmd, NULL);
|
||||
+ execlp(terminals[count], terminals[count], "-e", shell, "-c", cmd, NULL);
|
||||
}
|
||||
fprintf(stderr, "No terminal emulator found please set term in config or use --term\n");
|
||||
exit(1);
|
25
home/gburd/features/desktop/common/wayland-wm/wofi.nix
Normal file
25
home/gburd/features/desktop/common/wayland-wm/wofi.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
package = pkgs.wofi.overrideAttrs (oa: {
|
||||
patches = (oa.patches or [ ]) ++ [
|
||||
./wofi-run-shell.patch # Fix for https://todo.sr.ht/~scoopta/wofi/174
|
||||
];
|
||||
});
|
||||
settings = {
|
||||
image_size = 48;
|
||||
columns = 3;
|
||||
allow_images = true;
|
||||
insensitive = true;
|
||||
run-always_parse_args = true;
|
||||
run-cache_file = "/dev/null";
|
||||
run-exec_search = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages =
|
||||
let
|
||||
inherit (config.programs.password-store) package enable;
|
||||
in
|
||||
lib.optional enable (pkgs.pass-wofi.override { pass = package; });
|
||||
}
|
32
home/gburd/features/desktop/common/wayland-wm/zathura.nix
Normal file
32
home/gburd/features/desktop/common/wayland-wm/zathura.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ config, ... }:
|
||||
let inherit (config.colorscheme) colors;
|
||||
in {
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
selection-clipboard = "clipboard";
|
||||
font = "${config.fontProfiles.regular.family} 12";
|
||||
recolor = true;
|
||||
default-bg = "#${colors.base00}";
|
||||
default-fg = "#${colors.base01}";
|
||||
statusbar-bg = "#${colors.base02}";
|
||||
statusbar-fg = "#${colors.base04}";
|
||||
inputbar-bg = "#${colors.base00}";
|
||||
inputbar-fg = "#${colors.base07}";
|
||||
notification-bg = "#${colors.base00}";
|
||||
notification-fg = "#${colors.base07}";
|
||||
notification-error-bg = "#${colors.base00}";
|
||||
notification-error-fg = "#${colors.base08}";
|
||||
notification-warning-bg = "#${colors.base00}";
|
||||
notification-warning-fg = "#${colors.base08}";
|
||||
highlight-color = "#${colors.base0A}";
|
||||
highlight-active-color = "#${colors.base0D}";
|
||||
completion-bg = "#${colors.base01}";
|
||||
completion-fg = "#${colors.base05}";
|
||||
completions-highlight-bg = "#${colors.base0D}";
|
||||
completions-highlight-fg = "#${colors.base07}";
|
||||
recolor-lightcolor = "#${colors.base00}";
|
||||
recolor-darkcolor = "#${colors.base06}";
|
||||
};
|
||||
};
|
||||
}
|
3
home/gburd/features/desktop/gnome/default.nix
Normal file
3
home/gburd/features/desktop/gnome/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
imports = [ ../common ];
|
||||
}
|
70
home/gburd/features/desktop/hyprland/basic-binds.nix
Normal file
70
home/gburd/features/desktop/hyprland/basic-binds.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
workspaces =
|
||||
(map toString (lib.range 0 9)) ++
|
||||
(map (n: "F${toString n}") (lib.range 1 12));
|
||||
# Map keys to hyprland directions
|
||||
directions = rec {
|
||||
left = "l"; right = "r"; up = "u"; down = "d";
|
||||
h = left; l = right; k = up; j = down;
|
||||
};
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bindm = [
|
||||
"SUPER,mouse:272,movewindow"
|
||||
"SUPER,mouse:273,resizewindow"
|
||||
];
|
||||
|
||||
bind = [
|
||||
"SUPERSHIFT,q,killactive"
|
||||
"SUPERSHIFT,e,exit"
|
||||
|
||||
"SUPER,s,togglesplit"
|
||||
"SUPER,f,fullscreen,1"
|
||||
"SUPERSHIFT,f,fullscreen,0"
|
||||
"SUPERSHIFT,space,togglefloating"
|
||||
|
||||
"SUPER,minus,splitratio,-0.25"
|
||||
"SUPERSHIFT,minus,splitratio,-0.3333333"
|
||||
|
||||
"SUPER,equal,splitratio,0.25"
|
||||
"SUPERSHIFT,equal,splitratio,0.3333333"
|
||||
|
||||
"SUPER,g,togglegroup"
|
||||
"SUPER,t,lockactivegroup,toggle"
|
||||
"SUPER,apostrophe,changegroupactive,f"
|
||||
"SUPERSHIFT,apostrophe,changegroupactive,b"
|
||||
|
||||
"SUPER,u,togglespecialworkspace"
|
||||
"SUPERSHIFT,u,movetoworkspace,special"
|
||||
] ++
|
||||
# Change workspace
|
||||
(map (n:
|
||||
"SUPER,${n},workspace,name:${n}"
|
||||
) workspaces) ++
|
||||
# Move window to workspace
|
||||
(map (n:
|
||||
"SUPERSHIFT,${n},movetoworkspacesilent,name:${n}"
|
||||
) workspaces) ++
|
||||
# Move focus
|
||||
(lib.mapAttrsToList (key: direction:
|
||||
"SUPER,${key},movefocus,${direction}"
|
||||
) directions) ++
|
||||
# Swap windows
|
||||
(lib.mapAttrsToList (key: direction:
|
||||
"SUPERSHIFT,${key},swapwindow,${direction}"
|
||||
) directions) ++
|
||||
# Move windows
|
||||
(lib.mapAttrsToList (key: direction:
|
||||
"SUPERCONTROL,${key},movewindoworgroup,${direction}"
|
||||
) directions) ++
|
||||
# Move monitor focus
|
||||
(lib.mapAttrsToList (key: direction:
|
||||
"SUPERALT,${key},focusmonitor,${direction}"
|
||||
) directions) ++
|
||||
# Move workspace to other monitor
|
||||
(lib.mapAttrsToList (key: direction:
|
||||
"SUPERALTSHIFT,${key},movecurrentworkspacetomonitor,${direction}"
|
||||
) directions);
|
||||
};
|
||||
}
|
187
home/gburd/features/desktop/hyprland/default.nix
Normal file
187
home/gburd/features/desktop/hyprland/default.nix
Normal file
|
@ -0,0 +1,187 @@
|
|||
{ lib, config, pkgs, ... }: {
|
||||
imports = [
|
||||
../common
|
||||
../common/wayland-wm
|
||||
|
||||
./tty-init.nix
|
||||
./basic-binds.nix
|
||||
./systemd-fixes.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
inputs.hyprwm-contrib.grimblast
|
||||
hyprslurp
|
||||
hyprpicker
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs.inputs.hyprland.hyprland;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
gaps_in = 15;
|
||||
gaps_out = 20;
|
||||
border_size = 2.7;
|
||||
cursor_inactive_timeout = 4;
|
||||
"col.active_border" = "0xff${config.colorscheme.colors.base0C}";
|
||||
"col.inactive_border" = "0xff${config.colorscheme.colors.base02}";
|
||||
"col.group_border_active" = "0xff${config.colorscheme.colors.base0B}";
|
||||
"col.group_border" = "0xff${config.colorscheme.colors.base04}";
|
||||
};
|
||||
input = {
|
||||
kb_layout = "br,us";
|
||||
touchpad.disable_while_typing = false;
|
||||
};
|
||||
dwindle.split_width_multiplier = 1.35;
|
||||
misc.vfr = "on";
|
||||
|
||||
decoration = {
|
||||
active_opacity = 0.94;
|
||||
inactive_opacity = 0.84;
|
||||
fullscreen_opacity = 1.0;
|
||||
rounding = 5;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 5;
|
||||
passes = 3;
|
||||
new_optimizations = true;
|
||||
ignore_opacity = true;
|
||||
};
|
||||
drop_shadow = true;
|
||||
shadow_range = 12;
|
||||
shadow_offset = "3 3";
|
||||
"col.shadow" = "0x44000000";
|
||||
"col.shadow_inactive" = "0x66000000";
|
||||
};
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"easein,0.11, 0, 0.5, 0"
|
||||
"easeout,0.5, 1, 0.89, 1"
|
||||
"easeinback,0.36, 0, 0.66, -0.56"
|
||||
"easeoutback,0.34, 1.56, 0.64, 1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"windowsIn,1,3,easeoutback,slide"
|
||||
"windowsOut,1,3,easeinback,slide"
|
||||
"windowsMove,1,3,easeoutback"
|
||||
"workspaces,1,2,easeoutback,slide"
|
||||
"fadeIn,1,3,easeout"
|
||||
"fadeOut,1,3,easein"
|
||||
"fadeSwitch,1,3,easeout"
|
||||
"fadeShadow,1,3,easeout"
|
||||
"fadeDim,1,3,easeout"
|
||||
"border,1,3,easeout"
|
||||
];
|
||||
};
|
||||
|
||||
exec = [
|
||||
"${pkgs.swaybg}/bin/swaybg -i ${config.wallpaper} --mode fill"
|
||||
];
|
||||
|
||||
bind = let
|
||||
swaylock = "${config.programs.swaylock.package}/bin/swaylock";
|
||||
playerctl = "${config.services.playerctld.package}/bin/playerctl";
|
||||
playerctld = "${config.services.playerctld.package}/bin/playerctld";
|
||||
makoctl = "${config.services.mako.package}/bin/makoctl";
|
||||
wofi = "${config.programs.wofi.package}/bin/wofi";
|
||||
pass-wofi = "${pkgs.pass-wofi.override {
|
||||
pass = config.programs.password-store.package;
|
||||
}}/bin/pass-wofi";
|
||||
|
||||
grimblast = "${pkgs.inputs.hyprwm-contrib.grimblast}/bin/grimblast";
|
||||
pactl = "${pkgs.pulseaudio}/bin/pactl";
|
||||
tly = "${pkgs.tly}/bin/tly";
|
||||
gtk-play = "${pkgs.libcanberra-gtk3}/bin/canberra-gtk-play";
|
||||
notify-send = "${pkgs.libnotify}/bin/notify-send";
|
||||
|
||||
gtk-launch = "${pkgs.gtk3}/bin/gtk-launch";
|
||||
xdg-mime = "${pkgs.xdg-utils}/bin/xdg-mime";
|
||||
defaultApp = type: "${gtk-launch} $(${xdg-mime} query default ${type})";
|
||||
|
||||
terminal = config.home.sessionVariables.TERMINAL;
|
||||
browser = defaultApp "x-scheme-handler/https";
|
||||
editor = defaultApp "text/plain";
|
||||
in [
|
||||
# Program bindings
|
||||
"SUPER,Return,exec,${terminal}"
|
||||
"SUPER,e,exec,${editor}"
|
||||
"SUPER,v,exec,${editor}"
|
||||
"SUPER,b,exec,${browser}"
|
||||
# Brightness control (only works if the system has lightd)
|
||||
",XF86MonBrightnessUp,exec,light -A 10"
|
||||
",XF86MonBrightnessDown,exec,light -U 10"
|
||||
# Volume
|
||||
",XF86AudioRaiseVolume,exec,${pactl} set-sink-volume @DEFAULT_SINK@ +5%"
|
||||
",XF86AudioLowerVolume,exec,${pactl} set-sink-volume @DEFAULT_SINK@ -5%"
|
||||
",XF86AudioMute,exec,${pactl} set-sink-mute @DEFAULT_SINK@ toggle"
|
||||
"SHIFT,XF86AudioMute,exec,${pactl} set-source-mute @DEFAULT_SOURCE@ toggle"
|
||||
",XF86AudioMicMute,exec,${pactl} set-source-mute @DEFAULT_SOURCE@ toggle"
|
||||
# Screenshotting
|
||||
",Print,exec,${grimblast} --notify --freeze copy output"
|
||||
"SHIFT,Print,exec,${grimblast} --notify --freeze copy active"
|
||||
"CONTROL,Print,exec,${grimblast} --notify --freeze copy screen"
|
||||
"SUPER,Print,exec,${grimblast} --notify --freeze copy area"
|
||||
"ALT,Print,exec,${grimblast} --notify --freeze copy area"
|
||||
# Tally counter
|
||||
"SUPER,z,exec,${notify-send} -t 1000 $(${tly} time) && ${tly} add && ${gtk-play} -i dialog-information" # Add new entry
|
||||
"SUPERCONTROL,z,exec,${notify-send} -t 1000 $(${tly} time) && ${tly} undo && ${gtk-play} -i dialog-warning" # Undo last entry
|
||||
"SUPERCONTROLSHIFT,z,exec,${tly} reset && ${gtk-play} -i complete" # Reset
|
||||
"SUPERSHIFT,z,exec,${notify-send} -t 1000 $(${tly} time)" # Show current time
|
||||
] ++
|
||||
|
||||
(lib.optionals config.services.playerctld.enable [
|
||||
# Media control
|
||||
",XF86AudioNext,exec,${playerctl} next"
|
||||
",XF86AudioPrev,exec,${playerctl} previous"
|
||||
",XF86AudioPlay,exec,${playerctl} play-pause"
|
||||
",XF86AudioStop,exec,${playerctl} stop"
|
||||
"ALT,XF86AudioNext,exec,${playerctld} shift"
|
||||
"ALT,XF86AudioPrev,exec,${playerctld} unshift"
|
||||
"ALT,XF86AudioPlay,exec,systemctl --user restart playerctld"
|
||||
]) ++
|
||||
# Screen lock
|
||||
(lib.optionals config.programs.swaylock.enable [
|
||||
",XF86Launch5,exec,${swaylock} -i ${config.wallpaper}"
|
||||
",XF86Launch4,exec,${swaylock} -i ${config.wallpaper}"
|
||||
"SUPER,backspace,exec,${swaylock} -i ${config.wallpaper}"
|
||||
]) ++
|
||||
# Notification manager
|
||||
(lib.optionals config.services.mako.enable [
|
||||
"SUPER,w,exec,${makoctl} dismiss"
|
||||
]) ++
|
||||
|
||||
# Launcher
|
||||
(lib.optionals config.programs.wofi.enable [
|
||||
"SUPER,x,exec,${wofi} -S drun -x 10 -y 10 -W 25% -H 60%"
|
||||
"SUPER,d,exec,${wofi} -S run"
|
||||
] ++ (lib.optionals config.programs.password-store.enable [
|
||||
",Scroll_Lock,exec,${pass-wofi}" # fn+k
|
||||
",XF86Calculator,exec,${pass-wofi}" # fn+f12
|
||||
"SUPER,semicolon,exec,pass-wofi"
|
||||
]));
|
||||
|
||||
monitor = map (m: let
|
||||
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
|
||||
position = "${toString m.x}x${toString m.y}";
|
||||
in
|
||||
"${m.name},${if m.enabled then "${resolution},${position},1" else "disable"}"
|
||||
) (config.monitors);
|
||||
|
||||
workspace = map (m:
|
||||
"${m.name},${m.workspace}"
|
||||
) (lib.filter (m: m.enabled && m.workspace != null) config.monitors);
|
||||
|
||||
};
|
||||
# This is order sensitive, so it has to come here.
|
||||
extraConfig = ''
|
||||
# Passthrough mode (e.g. for VNC)
|
||||
bind=SUPER,P,submap,passthrough
|
||||
submap=passthrough
|
||||
bind=SUPER,P,submap,reset
|
||||
submap=reset
|
||||
'';
|
||||
};
|
||||
}
|
30
home/gburd/features/desktop/hyprland/systemd-fixes.nix
Normal file
30
home/gburd/features/desktop/hyprland/systemd-fixes.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.wayland.windowManager.hyprland;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf (cfg.enable && cfg.systemdIntegration) {
|
||||
# Stolen from https://github.com/alebastr/sway-systemd/commit/0fdb2c4b10beb6079acd6073c5b3014bd58d3b74
|
||||
systemd.user.targets.hyprland-session-shutdown = {
|
||||
Unit = {
|
||||
Description = "Shutdown running Hyprland session";
|
||||
DefaultDependencies = "no";
|
||||
StopWhenUnneeded = "true";
|
||||
|
||||
Conflicts = [
|
||||
"graphical-session.target"
|
||||
"graphical-session-pre.target"
|
||||
"hyprland-session.target"
|
||||
];
|
||||
After = [
|
||||
"graphical-session.target"
|
||||
"graphical-session-pre.target"
|
||||
"hyprland-session.target"
|
||||
];
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland.settings.bind = lib.mkAfter [
|
||||
"SUPERSHIFT,e,exec,systemctl --user start hyprland-session-shutdown.target; hyprctl dispatch exit"
|
||||
];
|
||||
};
|
||||
}
|
19
home/gburd/features/desktop/hyprland/tty-init.nix
Normal file
19
home/gburd/features/desktop/hyprland/tty-init.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
programs = {
|
||||
fish.loginShellInit = ''
|
||||
if test (tty) = "/dev/tty1"
|
||||
exec Hyprland &> /dev/null
|
||||
end
|
||||
'';
|
||||
zsh.loginExtra = ''
|
||||
if [ "$(tty)" = "/dev/tty1" ]; then
|
||||
exec Hyprland &> /dev/null
|
||||
fi
|
||||
'';
|
||||
zsh.profileExtra = ''
|
||||
if [ "$(tty)" = "/dev/tty1" ]; then
|
||||
exec Hyprland &> /dev/null
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
5
home/gburd/features/desktop/wireless/default.nix
Normal file
5
home/gburd/features/desktop/wireless/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./wpa-gui.nix
|
||||
];
|
||||
}
|
3
home/gburd/features/desktop/wireless/wpa-gui.nix
Normal file
3
home/gburd/features/desktop/wireless/wpa-gui.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = [ pkgs.wpa_supplicant_gui ];
|
||||
}
|
33
home/gburd/features/emacs/default.nix
Normal file
33
home/gburd/features/emacs/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacs-gtk;
|
||||
|
||||
overrides = final: _prev: {
|
||||
nix-theme = final.callPackage ./theme.nix { inherit config; };
|
||||
};
|
||||
extraPackages = epkgs: with epkgs; [
|
||||
nix-theme
|
||||
|
||||
nix-mode
|
||||
magit
|
||||
lsp-mode
|
||||
which-key
|
||||
mmm-mode
|
||||
|
||||
evil
|
||||
evil-org
|
||||
evil-collection
|
||||
evil-surround
|
||||
];
|
||||
|
||||
extraConfig = builtins.readFile ./init.el;
|
||||
};
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
client.enable = true;
|
||||
defaultEditor = true;
|
||||
socketActivation.enable = true;
|
||||
};
|
||||
}
|
58
home/gburd/features/emacs/init.el
Normal file
58
home/gburd/features/emacs/init.el
Normal file
|
@ -0,0 +1,58 @@
|
|||
(scroll-bar-mode -1)
|
||||
(tool-bar-mode -1)
|
||||
(tooltip-mode -1)
|
||||
(set-fringe-mode 10)
|
||||
(menu-bar-mode -1)
|
||||
(set-face-attribute 'default nil :font "FiraCode Nerd Font" :height 120)
|
||||
(setq visible-bell t)
|
||||
(global-display-line-numbers-mode)
|
||||
(setq display-line-numbers-type 'relative)
|
||||
|
||||
(setq base16-theme-256-color-source "base16-shell")
|
||||
(load-theme 'base16-${config.colorscheme.slug} t)
|
||||
|
||||
(require 'nix-mode)
|
||||
(add-to-list 'auto-mode-alist '("\\.nix\\'" . nix-mode))
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
|
||||
(global-set-key "\C-cl" 'org-store-link)
|
||||
(global-set-key "\C-ca" 'org-agenda)
|
||||
(setq org-directory "~/Documents/Org")
|
||||
(setq org-agenda-files (directory-files-recursively org-directory "\\.org$"))
|
||||
|
||||
(require 'lsp-mode)
|
||||
(add-hook 'nix-mode-hook #'lsp)
|
||||
|
||||
(require 'which-key)
|
||||
(which-key-mode)
|
||||
|
||||
(require 'mmm-mode)
|
||||
(setq mmm-global-mode 't)
|
||||
|
||||
(mmm-add-classes
|
||||
'((nix-block
|
||||
:front " \/\* \\([a-zA-Z0-9_-]+\\) \*\/ '''[^']"
|
||||
:back "''';"
|
||||
;; :save-matches 1
|
||||
;; :delimiter-mode nil
|
||||
;; :match-submode identity
|
||||
:submode org
|
||||
)))
|
||||
(mmm-add-mode-ext-class 'nix-mode nil 'nix-block)
|
||||
|
||||
|
||||
|
||||
(setq evil-want-keybinding nil)
|
||||
(require 'evil)
|
||||
(evil-mode 1)
|
||||
(setq evil-jumps-across-buffers t)
|
||||
|
||||
(require 'evil-org)
|
||||
(add-hook 'org-mode-hook 'evil-org-mode)
|
||||
(evil-org-set-key-theme '(navigation insert textobjects additional calendar))
|
||||
(require 'evil-org-agenda)
|
||||
(evil-org-agenda-set-keys)
|
||||
|
||||
(evil-collection-init)
|
||||
|
||||
(global-evil-surround-mode 1)
|
42
home/gburd/features/emacs/theme.nix
Normal file
42
home/gburd/features/emacs/theme.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ emacsPackagesFor, writeText, config, ... }:
|
||||
let
|
||||
emacsPackages = emacsPackagesFor config.programs.emacs.package;
|
||||
scheme = config.colorscheme;
|
||||
in
|
||||
emacsPackages.trivialBuild {
|
||||
pname = "theme";
|
||||
src = writeText "nix-${scheme.slug}.el" ''
|
||||
(require 'base16-theme)
|
||||
|
||||
(defvar base16-${scheme.slug}-theme-colors
|
||||
'(:base00 "#${scheme.colors.base00}"
|
||||
:base01 "#${scheme.colors.base01}"
|
||||
:base02 "#${scheme.colors.base02}"
|
||||
:base03 "#${scheme.colors.base03}"
|
||||
:base04 "#${scheme.colors.base04}"
|
||||
:base05 "#${scheme.colors.base05}"
|
||||
:base06 "#${scheme.colors.base06}"
|
||||
:base07 "#${scheme.colors.base07}"
|
||||
:base08 "#${scheme.colors.base08}"
|
||||
:base09 "#${scheme.colors.base09}"
|
||||
:base0A "#${scheme.colors.base0A}"
|
||||
:base0B "#${scheme.colors.base0B}"
|
||||
:base0C "#${scheme.colors.base0C}"
|
||||
:base0D "#${scheme.colors.base0D}"
|
||||
:base0E "#${scheme.colors.base0E}"
|
||||
:base0F "#${scheme.colors.base0F}")
|
||||
"All colors for Base16 ${scheme.name} are defined here.")
|
||||
|
||||
;; Define the theme
|
||||
(deftheme base16-${scheme.slug})
|
||||
|
||||
;; Add all the faces to the theme
|
||||
(base16-theme-define 'base16-${scheme.slug} base16-${scheme.slug}-theme-colors)
|
||||
|
||||
;; Mark the theme as provided
|
||||
(provide-theme 'base16-${scheme.slug})
|
||||
|
||||
(provide 'base16-${scheme.slug}-theme)
|
||||
'';
|
||||
packageRequires = [ emacsPackages.base16-theme ];
|
||||
}
|
9
home/gburd/features/games/default.nix
Normal file
9
home/gburd/features/games/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
./lutris.nix
|
||||
./steam.nix
|
||||
./prism-launcher.nix
|
||||
./runescape.nix
|
||||
];
|
||||
home.packages = with pkgs; [ gamescope ];
|
||||
}
|
11
home/gburd/features/games/factorio.nix
Normal file
11
home/gburd/features/games/factorio.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ lib, pkgs, ... }: {
|
||||
home = {
|
||||
packages = [ pkgs.factorio ];
|
||||
persistence = {
|
||||
"/persist/home/misterio" = {
|
||||
allowOther = true;
|
||||
directories = [ ".factorio" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
18
home/gburd/features/games/lutris.nix
Normal file
18
home/gburd/features/games/lutris.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
home.packages = [ pkgs.lutris ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist/home/misterio" = {
|
||||
allowOther = true;
|
||||
directories = [
|
||||
{
|
||||
# Use symlink, as games may be IO-heavy
|
||||
directory = "Games/Lutris";
|
||||
method = "symlink";
|
||||
}
|
||||
".config/lutris"
|
||||
".local/share/lutris"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
7
home/gburd/features/games/osu.nix
Normal file
7
home/gburd/features/games/osu.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
home.packages = [ pkgs.osu-lazer ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist/home/misterio".directories = [ ".local/share/osu" ];
|
||||
};
|
||||
}
|
7
home/gburd/features/games/prism-launcher.nix
Normal file
7
home/gburd/features/games/prism-launcher.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
home.packages = [ pkgs.prismlauncher-qt5 ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist/home/misterio".directories = [ ".local/share/PrismLauncher" ];
|
||||
};
|
||||
}
|
35
home/gburd/features/games/runescape.nix
Normal file
35
home/gburd/features/games/runescape.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
# Add PULSE_LATENCY_MSEC to .desktop file
|
||||
pulse_latency = 100;
|
||||
runescape = pkgs.runescape.overrideAttrs (oa: {
|
||||
nativeBuildInputs = (oa.nativeBuildInputs or []) ++ [
|
||||
pkgs.makeWrapper
|
||||
];
|
||||
buildCommand = (oa.buildCommand or "") + ''
|
||||
wrapProgram "$out/bin/RuneScape" \
|
||||
--set PULSE_LATENCY_MSEC ${toString pulse_latency} \
|
||||
--run 'echo $PULSE_LATENCY_MSEC'
|
||||
'';
|
||||
});
|
||||
openssl = lib.head (lib.filter (p: p.pname == "openssl") runescape.fhsenv.targetPaths);
|
||||
in {
|
||||
home.packages = [
|
||||
runescape
|
||||
pkgs.hdos
|
||||
pkgs.runelite
|
||||
];
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
openssl.name
|
||||
];
|
||||
|
||||
home.persistence = {
|
||||
"/persist/home/misterio" = {
|
||||
allowOther = true;
|
||||
directories = [
|
||||
"Jagex"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
55
home/gburd/features/games/steam.nix
Normal file
55
home/gburd/features/games/steam.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
steam-with-pkgs = pkgs.steam.override {
|
||||
extraPkgs = pkgs: with pkgs; [
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
xorg.libXScrnSaver
|
||||
libpng
|
||||
libpulseaudio
|
||||
libvorbis
|
||||
stdenv.cc.cc.lib
|
||||
libkrb5
|
||||
keyutils
|
||||
gamescope
|
||||
mangohud
|
||||
];
|
||||
};
|
||||
|
||||
monitor = lib.head (lib.filter (m: m.primary) config.monitors);
|
||||
steam-session = pkgs.writeTextDir "share/wayland-sessions/steam-sesson.desktop" ''
|
||||
[Desktop Entry]
|
||||
Name=Steam Session
|
||||
Exec=${pkgs.gamescope}/bin/gamescope -W ${toString monitor.width} -H ${toString monitor.height} -O ${monitor.name} -e -- steam -gamepadui
|
||||
Type=Application
|
||||
'';
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
steam-with-pkgs
|
||||
steam-session
|
||||
gamescope
|
||||
mangohud
|
||||
protontricks
|
||||
];
|
||||
home.persistence = {
|
||||
"/persist/home/misterio" = {
|
||||
allowOther = true;
|
||||
directories = [
|
||||
".factorio"
|
||||
".config/Hero_Siege"
|
||||
".config/unity3d/Berserk Games/Tabletop Simulator"
|
||||
".config/unity3d/IronGate/Valheim"
|
||||
".local/share/Tabletop Simulator"
|
||||
".local/share/Paradox Interactive"
|
||||
".paradoxlauncher"
|
||||
{
|
||||
# A couple of games don't play well with bindfs
|
||||
directory = ".local/share/Steam";
|
||||
method = "symlink";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
10
home/gburd/features/games/yuzu.nix
Normal file
10
home/gburd/features/games/yuzu.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
home.packages = [ pkgs.yuzu-mainline ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist/home/misterio" = {
|
||||
allowOther = true;
|
||||
directories = [ "Games/Yuzu" ".config/yuzu" ".local/share/yuzu" ];
|
||||
};
|
||||
};
|
||||
}
|
24
home/gburd/features/helix/default.nix
Normal file
24
home/gburd/features/helix/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
inherit (config) colorscheme;
|
||||
in
|
||||
{
|
||||
home.sessionVariables.COLORTERM = "truecolor";
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = colorscheme.slug;
|
||||
editor = {
|
||||
color-modes = true;
|
||||
line-number = "relative";
|
||||
indent-guides.render = true;
|
||||
cursor-shape = {
|
||||
normal = "block";
|
||||
insert = "bar";
|
||||
select = "underline";
|
||||
};
|
||||
};
|
||||
};
|
||||
themes = import ./theme.nix { inherit colorscheme; };
|
||||
};
|
||||
}
|
72
home/gburd/features/helix/theme.nix
Normal file
72
home/gburd/features/helix/theme.nix
Normal file
|
@ -0,0 +1,72 @@
|
|||
{ colorscheme }: {
|
||||
"${colorscheme.slug}" = {
|
||||
palette = builtins.mapAttrs (name: value: "#${value}") colorscheme.colors; # Add leading '#'
|
||||
"attributes" = "base09";
|
||||
"comment" = { fg = "base03"; modifiers = [ "italic" ]; };
|
||||
"constant" = "base09";
|
||||
"constant.character.escape" = "base0C";
|
||||
"constant.numeric" = "base09";
|
||||
"constructor" = "base0D";
|
||||
"debug" = "base03";
|
||||
"diagnostic" = { modifiers = [ "underlined" ]; };
|
||||
"diagnostic.error" = { underline = { style = "curl"; }; };
|
||||
"diagnostic.hint" = { underline = { style = "curl"; }; };
|
||||
"diagnostic.info" = { underline = { style = "curl"; }; };
|
||||
"diagnostic.warning" = { underline = { style = "curl"; }; };
|
||||
"diff.delta" = "base09";
|
||||
"diff.minus" = "base08";
|
||||
"diff.plus" = "base0B";
|
||||
"error" = "base08";
|
||||
"function" = "base0D";
|
||||
"hint" = "base03";
|
||||
"info" = "base0D";
|
||||
"keyword" = "base0E";
|
||||
"label" = "base0E";
|
||||
"markup.bold" = { fg = "base0A"; modifiers = [ "bold" ]; };
|
||||
"markup.heading" = "base0D";
|
||||
"markup.italic" = { fg = "base0E"; modifiers = [ "italic" ]; };
|
||||
"markup.link.text" = "base08";
|
||||
"markup.link.url" = { fg = "base09"; modifiers = [ "underlined" ]; };
|
||||
"markup.list" = "base08";
|
||||
"markup.quote" = "base0C";
|
||||
"markup.raw" = "base0B";
|
||||
"markup.strikethrough" = { modifiers = [ "crossed_out" ]; };
|
||||
"namespace" = "base0E";
|
||||
"operator" = "base05";
|
||||
"special" = "base0D";
|
||||
"string" = "base0B";
|
||||
"type" = "base0A";
|
||||
"ui.background" = { bg = "base00"; };
|
||||
"ui.bufferline" = { fg = "base04"; bg = "base00"; };
|
||||
"ui.bufferline.active" = { fg = "base00"; bg = "base03"; modifiers = [ "bold" ]; };
|
||||
"ui.cursor" = { fg = "base04"; modifiers = [ "reversed" ]; };
|
||||
"ui.cursor.insert" = { fg = "base0A"; modifiers = [ "underlined" ]; };
|
||||
"ui.cursor.match" = { fg = "base0A"; modifiers = [ "underlined" ]; };
|
||||
"ui.cursor.select" = { fg = "base0A"; modifiers = [ "underlined" ]; };
|
||||
"ui.cursorline.primary" = { fg = "base05"; bg = "base01"; };
|
||||
"ui.gutter" = { bg = "base00"; };
|
||||
"ui.help" = { fg = "base06"; bg = "base01"; };
|
||||
"ui.linenr" = { fg = "base03"; bg = "base00"; };
|
||||
"ui.linenr.selected" = { fg = "base04"; bg = "base01"; modifiers = [ "bold" ]; };
|
||||
"ui.menu" = { fg = "base05"; bg = "base01"; };
|
||||
"ui.menu.scroll" = { fg = "base03"; bg = "base01"; };
|
||||
"ui.menu.selected" = { fg = "base01"; bg = "base04"; };
|
||||
"ui.popup" = { bg = "base01"; };
|
||||
"ui.selection" = { bg = "base02"; };
|
||||
"ui.selection.primary" = { bg = "base02"; };
|
||||
"ui.statusline" = { fg = "base0B"; bg = "base02"; };
|
||||
"ui.statusline.inactive" = { bg = "base01"; fg = "base02"; };
|
||||
"ui.statusline.insert" = { fg = "base00"; bg = "base0B"; };
|
||||
"ui.statusline.normal" = { fg = "base00"; bg = "base04"; };
|
||||
"ui.statusline.select" = { fg = "base00"; bg = "base0E"; };
|
||||
"ui.text" = "base05";
|
||||
"ui.text.focus" = "base05";
|
||||
"ui.virtual.indent-guide" = { fg = "base03"; };
|
||||
"ui.virtual.ruler" = { bg = "base01"; };
|
||||
"ui.virtual.whitespace" = { fg = "base01"; };
|
||||
"ui.window" = { bg = "base01"; };
|
||||
"variable" = "base08";
|
||||
"variable.other.member" = "base08";
|
||||
"warning" = "base09";
|
||||
};
|
||||
}
|
11
home/gburd/features/music/default.nix
Normal file
11
home/gburd/features/music/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [ alsa-utils ];
|
||||
services.fluidsynth = {
|
||||
enable = true;
|
||||
soundService = "pipewire-pulse";
|
||||
extraOptions = [
|
||||
"-g 2"
|
||||
];
|
||||
};
|
||||
}
|
178
home/gburd/features/nvim/default.nix
Normal file
178
home/gburd/features/nvim/default.nix
Normal file
|
@ -0,0 +1,178 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
color = pkgs.writeText "color.vim" (import ./theme.nix config.colorscheme);
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./lsp.nix
|
||||
./syntaxes.nix
|
||||
./ui.nix
|
||||
];
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
|
||||
extraConfig = /* vim */ ''
|
||||
"Use system clipboard
|
||||
set clipboard=unnamedplus
|
||||
"Source colorscheme
|
||||
source ${color}
|
||||
|
||||
"Set fold level to highest in file
|
||||
"so everything starts out unfolded at just the right level
|
||||
augroup initial_fold
|
||||
autocmd!
|
||||
autocmd BufWinEnter * let &foldlevel = max(map(range(1, line('$')), 'foldlevel(v:val)'))
|
||||
augroup END
|
||||
|
||||
"Tabs
|
||||
set tabstop=4 "4 char-wide tab
|
||||
set expandtab "Use spaces
|
||||
set softtabstop=0 "Use same length as 'tabstop'
|
||||
set shiftwidth=0 "Use same length as 'tabstop'
|
||||
"2 char-wide overrides
|
||||
augroup two_space_tab
|
||||
autocmd!
|
||||
autocmd FileType json,html,htmldjango,hamlet,nix,scss,typescript,php,haskell,terraform setlocal tabstop=2
|
||||
augroup END
|
||||
|
||||
"Set tera to use htmldjango syntax
|
||||
augroup tera_htmldjango
|
||||
autocmd!
|
||||
autocmd BufRead,BufNewFile *.tera setfiletype htmldjango
|
||||
augroup END
|
||||
|
||||
"Options when composing mutt mail
|
||||
augroup mail_settings
|
||||
autocmd FileType mail set noautoindent wrapmargin=0 textwidth=0 linebreak wrap formatoptions +=w
|
||||
augroup END
|
||||
|
||||
"Fix nvim size according to terminal
|
||||
"(https://github.com/neovim/neovim/issues/11330)
|
||||
augroup fix_size
|
||||
autocmd VimEnter * silent exec "!kill -s SIGWINCH" getpid()
|
||||
augroup END
|
||||
|
||||
"Line numbers
|
||||
set number relativenumber
|
||||
|
||||
"Scroll up and down
|
||||
nmap <C-j> <C-e>
|
||||
nmap <C-k> <C-y>
|
||||
|
||||
"Buffers
|
||||
nmap <C-l> :bnext<CR>
|
||||
nmap <C-h> :bprev<CR>
|
||||
nmap <C-q> :bdel<CR>
|
||||
|
||||
"Loclist
|
||||
nmap <space>l :lwindow<cr>
|
||||
nmap [l :lprev<cr>
|
||||
nmap ]l :lnext<cr>
|
||||
|
||||
nmap <space>L :lhistory<cr>
|
||||
nmap [L :lolder<cr>
|
||||
nmap ]L :lnewer<cr>
|
||||
|
||||
"Quickfix
|
||||
nmap <space>q :cwindow<cr>
|
||||
nmap [q :cprev<cr>
|
||||
nmap ]q :cnext<cr>
|
||||
|
||||
nmap <space>Q :chistory<cr>
|
||||
nmap [Q :colder<cr>
|
||||
nmap ]Q :cnewer<cr>
|
||||
|
||||
"Make
|
||||
nmap <space>m :make<cr>
|
||||
|
||||
"Grep (replace with ripgrep)
|
||||
nmap <space>g :grep<space>
|
||||
if executable('rg')
|
||||
set grepprg=rg\ --vimgrep
|
||||
set grepformat=%f:%l:%c:%m
|
||||
endif
|
||||
|
||||
"Close other splits
|
||||
nmap <space>o :only<cr>
|
||||
|
||||
"Sudo save
|
||||
cmap w!! w !sudo tee > /dev/null %
|
||||
'';
|
||||
extraLuaConfig = /* lua */ ''
|
||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, { desc = "Go to declaration" })
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "Go to definition" })
|
||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, { desc = "Go to implementation" })
|
||||
vim.keymap.set("n", "<space>f", vim.lsp.buf.format, { desc = "Format code" })
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, { desc = "Hover Documentation" })
|
||||
vim.keymap.set("n", "<space>c", vim.lsp.buf.code_action, { desc = "Code action" })
|
||||
|
||||
-- Diagnostic
|
||||
vim.keymap.set("n", "<space>e", vim.diagnostic.open_float, { desc = "Floating diagnostic" })
|
||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Previous diagnostic" })
|
||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Next diagnostic" })
|
||||
vim.keymap.set("n", "gl", vim.diagnostic.setloclist, { desc = "Diagnostics on loclist" })
|
||||
vim.keymap.set("n", "gq", vim.diagnostic.setqflist, { desc = "Diagnostics on quickfix" })
|
||||
|
||||
function add_sign(name, text)
|
||||
vim.fn.sign_define(name, { text = text, texthl = name, numhl = name})
|
||||
end
|
||||
|
||||
add_sign("DiagnosticSignError", " ")
|
||||
add_sign("DiagnosticSignWarn", " ")
|
||||
add_sign("DiagnosticSignHint", " ")
|
||||
add_sign("DiagnosticSignInfo", " ")
|
||||
'';
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-table-mode
|
||||
editorconfig-nvim
|
||||
vim-surround
|
||||
{
|
||||
plugin = nvim-autopairs;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
require('nvim-autopairs').setup{}
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
xdg.configFile."nvim/init.lua".onChange = ''
|
||||
XDG_RUNTIME_DIR=''${XDG_RUNTIME_DIR:-/run/user/$(id -u)}
|
||||
for server in $XDG_RUNTIME_DIR/nvim.*; do
|
||||
nvim --server $server --remote-send ':source $MYVIMRC<CR>' &
|
||||
done
|
||||
'';
|
||||
|
||||
xdg.desktopEntries = {
|
||||
nvim = {
|
||||
name = "Neovim";
|
||||
genericName = "Text Editor";
|
||||
comment = "Edit text files";
|
||||
exec = "nvim %F";
|
||||
icon = "nvim";
|
||||
mimeType = [
|
||||
"text/english"
|
||||
"text/plain"
|
||||
"text/x-makefile"
|
||||
"text/x-c++hdr"
|
||||
"text/x-c++src"
|
||||
"text/x-chdr"
|
||||
"text/x-csrc"
|
||||
"text/x-java"
|
||||
"text/x-moc"
|
||||
"text/x-pascal"
|
||||
"text/x-tcl"
|
||||
"text/x-tex"
|
||||
"application/x-shellscript"
|
||||
"text/x-c"
|
||||
"text/x-c++"
|
||||
];
|
||||
terminal = true;
|
||||
type = "Application";
|
||||
categories = [ "Utility" "TextEditor" ];
|
||||
};
|
||||
};
|
||||
}
|
96
home/gburd/features/nvim/lsp.nix
Normal file
96
home/gburd/features/nvim/lsp.nix
Normal file
|
@ -0,0 +1,96 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
# LSP
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
function add_lsp(binary, server, options)
|
||||
if not options["cmd"] then options["cmd"] = { binary, unpack(options["cmd_args"] or {}) } end
|
||||
if vim.fn.executable(binary) == 1 then server.setup(options) end
|
||||
end
|
||||
|
||||
add_lsp("docker-langserver", lspconfig.dockerls, {})
|
||||
add_lsp("bash-language-server", lspconfig.bashls, {})
|
||||
add_lsp("clangd", lspconfig.clangd, {})
|
||||
add_lsp("nil", lspconfig.nil_ls, {})
|
||||
add_lsp("pylsp", lspconfig.pylsp, {})
|
||||
add_lsp("dart", lspconfig.dartls, {})
|
||||
add_lsp("haskell-language-server", lspconfig.hls, {
|
||||
cmd_args = { "--lsp" }
|
||||
})
|
||||
add_lsp("kotlin-language-server", lspconfig.kotlin_language_server, {})
|
||||
add_lsp("solargraph", lspconfig.solargraph, {})
|
||||
add_lsp("phpactor", lspconfig.phpactor, {})
|
||||
add_lsp("terraform-ls", lspconfig.terraformls, {
|
||||
cmd_args = { "serve" }
|
||||
})
|
||||
add_lsp("texlab", lspconfig.texlab, {})
|
||||
add_lsp("gopls", lspconfig.gopls, {})
|
||||
add_lsp("tsserver", lspconfig.tsserver, {})
|
||||
add_lsp("lua-lsp", lspconfig.lua_ls, {})
|
||||
add_lsp("jdt-language-server", lspconfig.jdtls, {})
|
||||
add_lsp("texlab", lspconfig.texlab, {
|
||||
chktex = {
|
||||
onEdit = true,
|
||||
onOpenAndSave = true
|
||||
}
|
||||
})
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = ltex_extra-nvim;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
local ltex_extra = require('ltex_extra')
|
||||
add_lsp("ltex-ls", lspconfig.ltex, {
|
||||
on_attach = function(client, bufnr)
|
||||
ltex_extra.setup{
|
||||
path = vim.fn.expand("~") .. "/.local/state/ltex"
|
||||
}
|
||||
end
|
||||
})
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = rust-tools-nvim;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
local rust_tools = require('rust-tools')
|
||||
add_lsp("rust-analyzer", rust_tools, {
|
||||
tools = { autoSetHints = true }
|
||||
})
|
||||
vim.api.nvim_set_hl(0, '@lsp.type.comment.rust', {})
|
||||
'';
|
||||
}
|
||||
|
||||
# Completions
|
||||
cmp-nvim-lsp
|
||||
cmp-buffer
|
||||
lspkind-nvim
|
||||
{
|
||||
plugin = nvim-cmp;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
local cmp = require('cmp')
|
||||
|
||||
cmp.setup{
|
||||
formatting = { format = require('lspkind').cmp_format() },
|
||||
-- Same keybinds as vim's vanilla completion
|
||||
mapping = {
|
||||
['<C-n>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
['<C-p>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<C-y>'] = cmp.mapping.confirm(),
|
||||
},
|
||||
sources = {
|
||||
{ name='buffer', option = { get_bufnrs = vim.api.nvim_list_bufs } },
|
||||
{ name='nvim_lsp' },
|
||||
},
|
||||
}
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
59
home/gburd/features/nvim/syntaxes.nix
Normal file
59
home/gburd/features/nvim/syntaxes.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{ pkgs, config, lib, ... }: {
|
||||
programs.neovim = {
|
||||
extraConfig = /* vim */ lib.mkAfter ''
|
||||
function! SetCustomKeywords()
|
||||
syn match Todo /TODO/
|
||||
syn match Done /DONE/
|
||||
syn match Start /START/
|
||||
syn match End /END/
|
||||
endfunction
|
||||
|
||||
autocmd Syntax * call SetCustomKeywords()
|
||||
'';
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
rust-vim
|
||||
dart-vim-plugin
|
||||
plantuml-syntax
|
||||
vim-markdown
|
||||
vim-nix
|
||||
vim-toml
|
||||
vim-syntax-shakespeare
|
||||
gemini-vim-syntax
|
||||
kotlin-vim
|
||||
haskell-vim
|
||||
mermaid-vim
|
||||
pgsql-vim
|
||||
vim-terraform
|
||||
vim-jsx-typescript
|
||||
vim-caddyfile
|
||||
|
||||
{
|
||||
plugin = vimtex;
|
||||
config =
|
||||
let
|
||||
method =
|
||||
if config.programs.zathura.enable
|
||||
then "zathura"
|
||||
else "general";
|
||||
in
|
||||
''
|
||||
let g:vimtex_view_method = '${method}'
|
||||
'';
|
||||
}
|
||||
|
||||
# Tree sitter
|
||||
{
|
||||
plugin = nvim-treesitter.withAllGrammars;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
require('nvim-treesitter.configs').setup{
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
329
home/gburd/features/nvim/theme.nix
Normal file
329
home/gburd/features/nvim/theme.nix
Normal file
|
@ -0,0 +1,329 @@
|
|||
scheme:
|
||||
let c = scheme.colors;
|
||||
in /* vim */ ''
|
||||
let g:colors_name="nix-${scheme.slug}"
|
||||
|
||||
set termguicolors
|
||||
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
hi clear
|
||||
|
||||
hi Normal guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi Bold guifg=NONE guibg=NONE gui=bold guisp=NONE
|
||||
hi Debug guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Directory guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Error guifg=#${c.base00} guibg=#${c.base08} gui=NONE guisp=NONE
|
||||
hi ErrorMsg guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi Exception guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi FoldColumn guifg=#${c.base0C} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi Folded guifg=#${c.base03} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi IncSearch guifg=#${c.base01} guibg=#${c.base09} gui=NONE guisp=NONE
|
||||
hi Italic guifg=NONE guibg=NONE gui=NONE guisp=NONE
|
||||
hi Macro guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi MatchParen guifg=NONE guibg=#${c.base03} gui=NONE guisp=NONE
|
||||
hi ModeMsg guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
|
||||
hi MoreMsg guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Question guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Search guifg=#${c.base01} guibg=#${c.base0A} gui=NONE guisp=NONE
|
||||
hi Substitute guifg=#${c.base01} guibg=#${c.base0A} gui=NONE guisp=NONE
|
||||
hi SpecialKey guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TooLong guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Underlined guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Visual guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi VisualNOS guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi WarningMsg guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi WildMenu guifg=#${c.base08} guibg=#${c.base0A} gui=NONE guisp=NONE
|
||||
hi Title guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Conceal guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi Cursor guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE
|
||||
hi NonText guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
|
||||
hi LineNr guifg=#${c.base04} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi SignColumn guifg=#${c.base04} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi StatusLine guifg=#${c.base0B} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi StatusLineNC guifg=#${c.base04} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi VertSplit guifg=#${c.base01} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi ColorColumn guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi CursorColumn guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi CursorLine guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi CursorLineNr guifg=#${c.base0B} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi QuickFixLine guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi PMenu guifg=#${c.base05} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi PMenuSel guifg=#${c.base01} guibg=#${c.base05} gui=NONE guisp=NONE
|
||||
hi TabLine guifg=#${c.base03} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi TabLineFill guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi TabLineSel guifg=#${c.base0B} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi EndOfBuffer guifg=#${c.base00} guibg=NONE gui=NONE guisp=NONE
|
||||
|
||||
hi Boolean guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Character guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Comment guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Conditional guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Constant guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Define guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Delimiter guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Float guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Function guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Identifier guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Include guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Keyword guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Label guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Number guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Operator guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
|
||||
hi PreProc guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Repeat guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Special guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE
|
||||
hi SpecialChar guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Statement guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi StorageClass guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
|
||||
hi String guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Structure guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Tag guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Type guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
|
||||
hi Typedef guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
|
||||
|
||||
hi Todo guifg=#${c.base01} guibg=#${c.base0A} gui=NONE guisp=NONE
|
||||
hi Done guifg=#${c.base01} guibg=#${c.base0B} gui=NONE guisp=NONE
|
||||
hi Start guifg=#${c.base01} guibg=#${c.base0D} gui=NONE guisp=NONE
|
||||
hi End guifg=#${c.base01} guibg=#${c.base0E} gui=NONE guisp=NONE
|
||||
|
||||
hi DiffAdd guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi DiffChange guifg=#${c.base03} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi DiffDelete guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi DiffText guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi DiffAdded guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi DiffFile guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi DiffNewFile guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi DiffLine guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi DiffRemoved guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
|
||||
hi gitcommitOverflow guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi gitcommitSummary guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
|
||||
hi gitcommitComment guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
|
||||
hi gitcommitUntracked guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
|
||||
hi gitcommitDiscarded guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
|
||||
hi gitcommitSelected guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
|
||||
hi gitcommitHeader guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
|
||||
hi gitcommitSelectedType guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
|
||||
hi gitcommitUnmergedType guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
|
||||
hi gitcommitDiscardedType guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
|
||||
hi gitcommitBranch guifg=#${c.base09} guibg=NONE gui=bold guisp=NONE
|
||||
hi gitcommitUntrackedFile guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
|
||||
hi gitcommitUnmergedFile guifg=#${c.base08} guibg=NONE gui=bold guisp=NONE
|
||||
hi gitcommitDiscardedFile guifg=#${c.base08} guibg=NONE gui=bold guisp=NONE
|
||||
hi gitcommitSelectedFile guifg=#${c.base0B} guibg=NONE gui=bold guisp=NONE
|
||||
|
||||
hi GitGutterAdd guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi GitGutterChange guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi GitGutterDelete guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi GitGutterChangeDelete guifg=#${c.base0E} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
|
||||
hi SpellBad guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base08}
|
||||
hi SpellLocal guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0C}
|
||||
hi SpellCap guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0D}
|
||||
hi SpellRare guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E}
|
||||
|
||||
hi DiagnosticError guifg=#${c.base08} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi DiagnosticWarn guifg=#${c.base0E} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi DiagnosticInfo guifg=#${c.base05} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi DiagnosticHint guifg=#${c.base0C} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi DiagnosticUnderlineError guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base08}
|
||||
hi DiagnosticUnderlineWarning guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E}
|
||||
hi DiagnosticUnderlineWarn guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E}
|
||||
hi DiagnosticUnderlineInformation guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0F}
|
||||
hi DiagnosticUnderlineHint guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0C}
|
||||
|
||||
hi LspReferenceText guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}
|
||||
hi LspReferenceRead guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}
|
||||
hi LspReferenceWrite guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}
|
||||
|
||||
hi link LspDiagnosticsDefaultError DiagnosticError
|
||||
hi link LspDiagnosticsDefaultWarning DiagnosticWarn
|
||||
hi link LspDiagnosticsDefaultInformation DiagnosticInfo
|
||||
hi link LspDiagnosticsDefaultHint DiagnosticHint
|
||||
hi link LspDiagnosticsUnderlineError DiagnosticUnderlineError
|
||||
hi link LspDiagnosticsUnderlineWarning DiagnosticUnderlineWarning
|
||||
hi link LspDiagnosticsUnderlineInformation DiagnosticUnderlineInformation
|
||||
hi link LspDiagnosticsUnderlineHint DiagnosticUnderlineHint
|
||||
|
||||
hi TSAnnotation guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSAttribute guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSBoolean guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSCharacter guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSComment guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE "was italic
|
||||
hi TSConstructor guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSConditional guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSConstant guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSConstBuiltin guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE "was italic
|
||||
hi TSConstMacro guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSError guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSException guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSField guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSFloat guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSFunction guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSFuncBuiltin guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE "was italic
|
||||
hi TSFuncMacro guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSInclude guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSKeyword guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSKeywordFunction guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSKeywordOperator guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSLabel guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSMethod guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSNamespace guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSNone guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSNumber guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSOperator guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSParameter guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSParameterReference guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSProperty guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSPunctDelimiter guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSPunctBracket guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSPunctSpecial guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSRepeat guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSString guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSStringRegex guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSStringEscape guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSSymbol guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSTag guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSTagDelimiter guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSText guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSStrong guifg=NONE guibg=NONE gui=bold guisp=NONE
|
||||
hi TSEmphasis guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE "was italic
|
||||
hi TSUnderline guifg=#${c.base00} guibg=NONE gui=underline guisp=NONE
|
||||
hi TSStrike guifg=#${c.base00} guibg=NONE gui=strikethrough guisp=NONE
|
||||
hi TSTitle guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSLiteral guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSURI guifg=#${c.base09} guibg=NONE gui=underline guisp=NONE
|
||||
hi TSType guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSTypeBuiltin guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE "was italic
|
||||
hi TSVariable guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE
|
||||
hi TSVariableBuiltin guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE "was italic
|
||||
|
||||
hi TSDefinition guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}
|
||||
hi TSDefinitionUsage guifg=NONE guibg=NONE gui=underline guisp=#${c.base04}
|
||||
hi TSCurrentScope guifg=NONE guibg=NONE gui=bold guisp=NONE
|
||||
if has('nvim-0.8.0')
|
||||
highlight! link @annotation TSAnnotation
|
||||
highlight! link @attribute TSAttribute
|
||||
highlight! link @boolean TSBoolean
|
||||
highlight! link @character TSCharacter
|
||||
highlight! link @comment TSComment
|
||||
highlight! link @conditional TSConditional
|
||||
highlight! link @constant TSConstant
|
||||
highlight! link @constant.builtin TSConstBuiltin
|
||||
highlight! link @constant.macro TSConstMacro
|
||||
highlight! link @constructor TSConstructor
|
||||
highlight! link @exception TSException
|
||||
highlight! link @field TSField
|
||||
highlight! link @float TSFloat
|
||||
highlight! link @function TSFunction
|
||||
highlight! link @function.builtin TSFuncBuiltin
|
||||
highlight! link @function.macro TSFuncMacro
|
||||
highlight! link @include TSInclude
|
||||
highlight! link @keyword TSKeyword
|
||||
highlight! link @keyword.function TSKeywordFunction
|
||||
highlight! link @keyword.operator TSKeywordOperator
|
||||
highlight! link @label TSLabel
|
||||
highlight! link @method TSMethod
|
||||
highlight! link @namespace TSNamespace
|
||||
highlight! link @none TSNone
|
||||
highlight! link @number TSNumber
|
||||
highlight! link @operator TSOperator
|
||||
highlight! link @parameter TSParameter
|
||||
highlight! link @parameter.reference TSParameterReference
|
||||
highlight! link @property TSProperty
|
||||
highlight! link @punctuation.bracket TSPunctBracket
|
||||
highlight! link @punctuation.delimiter TSPunctDelimiter
|
||||
highlight! link @punctuation.special TSPunctSpecial
|
||||
highlight! link @repeat TSRepeat
|
||||
highlight! link @storageclass TSStorageClass
|
||||
highlight! link @string TSString
|
||||
highlight! link @string.escape TSStringEscape
|
||||
highlight! link @string.regex TSStringRegex
|
||||
highlight! link @symbol TSSymbol
|
||||
highlight! link @tag TSTag
|
||||
highlight! link @tag.delimiter TSTagDelimiter
|
||||
highlight! link @text TSText
|
||||
highlight! link @strike TSStrike
|
||||
highlight! link @math TSMath
|
||||
highlight! link @type TSType
|
||||
highlight! link @type.builtin TSTypeBuiltin
|
||||
highlight! link @uri TSURI
|
||||
highlight! link @variable TSVariable
|
||||
highlight! link @variable.builtin TSVariableBuiltin
|
||||
endif
|
||||
|
||||
hi IndentBlankLine guifg=#${c.base01} guibg=NONE gui=NONE guisp=NONE
|
||||
|
||||
hi NvimTreeNormal guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
|
||||
hi CmpItemAbbr guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
|
||||
hi CmpItemAbbrDeprecated guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE
|
||||
hi CmpItemAbbrMatch guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
|
||||
hi CmpItemAbbrMatchFuzzy guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
|
||||
hi CmpItemKind guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE
|
||||
hi CmpItemMenu guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE
|
||||
|
||||
hi BufferCurrent guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi BufferCurrentIndex guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi BufferCurrentMod guifg=#${c.base0E} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi BufferCurrentSign guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi BufferCurrentTarget guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi BufferCurrentIcon guifg=NONE guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi BufferVisible guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi BufferVisibleIndex guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi BufferVisibleMod guifg=#${c.base0E} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi BufferVisibleSign guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi BufferVisibleTarget guifg=#${c.base08} guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi BufferVisibleIcon guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE
|
||||
hi BufferInactive guifg=#${c.base04} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi BufferInactiveIndex guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi BufferInactiveMod guifg=#${c.base0E} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi BufferInactiveSign guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi BufferInactiveTarget guifg=#${c.base08} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi BufferInactiveIcon guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi BufferTabpages guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi BufferTabpageFill guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
|
||||
hi NvimInternalError guifg=#${c.base00} guibg=#${c.base08} gui=NONE guisp=NONE
|
||||
|
||||
hi NormalFloat guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi FloatBorder guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi NormalNC guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE
|
||||
hi TermCursor guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE
|
||||
hi TermCursorNC guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE
|
||||
|
||||
hi User1 guifg=#${c.base08} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi User2 guifg=#${c.base0E} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi User3 guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi User4 guifg=#${c.base0C} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi User5 guifg=#${c.base01} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi User6 guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi User7 guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi User8 guifg=#${c.base00} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
hi User9 guifg=#${c.base00} guibg=#${c.base02} gui=NONE guisp=NONE
|
||||
|
||||
hi TreesitterContext guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE "was italic
|
||||
|
||||
let g:terminal_color_background = "#${c.base00}"
|
||||
let g:terminal_color_foreground = "#${c.base05}"
|
||||
|
||||
let g:terminal_color_0 = "#${c.base00}"
|
||||
let g:terminal_color_1 = "#${c.base08}"
|
||||
let g:terminal_color_2 = "#${c.base0B}"
|
||||
let g:terminal_color_3 = "#${c.base0A}"
|
||||
let g:terminal_color_4 = "#${c.base0D}"
|
||||
let g:terminal_color_5 = "#${c.base0E}"
|
||||
let g:terminal_color_6 = "#${c.base0C}"
|
||||
let g:terminal_color_7 = "#${c.base05}"
|
||||
let g:terminal_color_8 = "#${c.base03}"
|
||||
let g:terminal_color_9 = "#${c.base08}"
|
||||
let g:terminal_color_10 = "#${c.base0B}"
|
||||
let g:terminal_color_11 = "#${c.base0A}"
|
||||
let g:terminal_color_12 = "#${c.base0D}"
|
||||
let g:terminal_color_13 = "#${c.base0E}"
|
||||
let g:terminal_color_14 = "#${c.base0C}"
|
||||
let g:terminal_color_15 = "#${c.base07}"
|
||||
''
|
128
home/gburd/features/nvim/ui.nix
Normal file
128
home/gburd/features/nvim/ui.nix
Normal file
|
@ -0,0 +1,128 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
# UI
|
||||
vim-illuminate
|
||||
vim-numbertoggle
|
||||
# vim-markology
|
||||
{
|
||||
plugin = vim-fugitive;
|
||||
type = "viml";
|
||||
config = /* vim */ ''
|
||||
nmap <space>G :Git<CR>
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = nvim-bqf;
|
||||
type = "lua";
|
||||
config = /* lua * */ ''
|
||||
require('bqf').setup{}
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = alpha-nvim;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
|
||||
dashboard.section.header.val = {
|
||||
" ",
|
||||
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ",
|
||||
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ",
|
||||
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ",
|
||||
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ",
|
||||
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ",
|
||||
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ",
|
||||
" ",
|
||||
}
|
||||
dashboard.section.header.opts.hl = "Title"
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button( "n", " New file" , ":enew<CR>"),
|
||||
dashboard.button( "e", " Explore", ":Explore<CR>"),
|
||||
dashboard.button( "g", " Git summary", ":Git | :only<CR>"),
|
||||
dashboard.button( "c", " Nix config flake" , ":cd ~/Documents/NixConfig | :e flake.nix<CR>"),
|
||||
dashboard.button( "q", " Quit nvim", ":qa<CR>"),
|
||||
}
|
||||
|
||||
alpha.setup(dashboard.opts)
|
||||
vim.keymap.set("n", "<space>a", ":Alpha<CR>", { desc = "Open alpha dashboard" })
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = bufferline-nvim;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
require('bufferline').setup{}
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = scope-nvim;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
require('scope').setup{}
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = which-key-nvim;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
require('which-key').setup{}
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = range-highlight-nvim;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
require('range-highlight').setup{}
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = indent-blankline-nvim;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
require('indent_blankline').setup{char_highlight_list={'IndentBlankLine'}}
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = nvim-web-devicons;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
require('nvim-web-devicons').setup{}
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = gitsigns-nvim;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
require('gitsigns').setup{
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
},
|
||||
}
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = nvim-colorizer-lua;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
require('colorizer').setup{}
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = fidget-nvim;
|
||||
type = "lua";
|
||||
config = /* lua */ ''
|
||||
require('fidget').setup{
|
||||
text = {
|
||||
spinner = "dots",
|
||||
},
|
||||
}
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
17
home/gburd/features/pass/default.nix
Normal file
17
home/gburd/features/pass/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, config, ... }: {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
settings = { PASSWORD_STORE_DIR = "$HOME/.password-store"; };
|
||||
package = pkgs.pass.withExtensions (p: [ p.pass-otp ]);
|
||||
};
|
||||
|
||||
services.pass-secret-service = {
|
||||
enable = true;
|
||||
storePath = "${config.home.homeDirectory}/.password-store";
|
||||
extraArgs = [ "-e${config.programs.password-store.package}/bin/pass" ];
|
||||
};
|
||||
|
||||
home.persistence = {
|
||||
"/persist/home/misterio".directories = [ ".password-store" ];
|
||||
};
|
||||
}
|
14
home/gburd/features/productivity/default.nix
Normal file
14
home/gburd/features/productivity/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
imports = [
|
||||
./khal.nix
|
||||
./khard.nix
|
||||
./todoman.nix
|
||||
./vdirsyncer.nix
|
||||
|
||||
./mail.nix
|
||||
./neomutt.nix
|
||||
|
||||
# Pass feature is required
|
||||
../pass
|
||||
];
|
||||
}
|
1
home/gburd/features/productivity/keyring.nix
Normal file
1
home/gburd/features/productivity/keyring.nix
Normal file
|
@ -0,0 +1 @@
|
|||
|
14
home/gburd/features/productivity/khal.nix
Normal file
14
home/gburd/features/productivity/khal.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ khal ];
|
||||
xdg.configFile."khal/config".text = ''
|
||||
[calendars]
|
||||
|
||||
[[calendars]]
|
||||
path = ~/Calendars/*
|
||||
type = discover
|
||||
|
||||
[locale]
|
||||
timeformat = %H:%M
|
||||
dateformat = %d/%m/%Y
|
||||
'';
|
||||
}
|
8
home/gburd/features/productivity/khard.nix
Normal file
8
home/gburd/features/productivity/khard.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ khard ];
|
||||
xdg.configFile."khard/khard.conf".text = ''
|
||||
[addressbooks]
|
||||
[[contacts]]
|
||||
path = ~/Contacts/Main
|
||||
'';
|
||||
}
|
120
home/gburd/features/productivity/mail.nix
Normal file
120
home/gburd/features/productivity/mail.nix
Normal file
|
@ -0,0 +1,120 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
let
|
||||
mbsync = "${config.programs.mbsync.package}/bin/mbsync";
|
||||
pass = "${config.programs.password-store.package}/bin/pass";
|
||||
|
||||
common = rec {
|
||||
realName = "Gabriel Fontes";
|
||||
gpg = {
|
||||
key = "7088 C742 1873 E0DB 97FF 17C2 245C AB70 B4C2 25E9";
|
||||
signByDefault = true;
|
||||
};
|
||||
signature = {
|
||||
showSignature = "append";
|
||||
text = ''
|
||||
${realName}
|
||||
|
||||
https://gsfontes.com
|
||||
PGP: ${gpg.key}
|
||||
'';
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
home.persistence = {
|
||||
"/persist/home/misterio".directories = [ "Mail" ];
|
||||
};
|
||||
|
||||
accounts.email = {
|
||||
maildirBasePath = "Mail";
|
||||
accounts = {
|
||||
personal = rec {
|
||||
primary = true;
|
||||
address = "hi@m7.rs";
|
||||
aliases = ["gabriel@gsfontes.com" "eu@misterio.me"];
|
||||
passwordCommand = "${pass} ${smtp.host}/${address}";
|
||||
|
||||
imap.host = "mail.m7.rs";
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "maildir";
|
||||
expunge = "both";
|
||||
};
|
||||
folders = {
|
||||
inbox = "Inbox";
|
||||
drafts = "Drafts";
|
||||
sent = "Sent";
|
||||
trash = "Trash";
|
||||
};
|
||||
neomutt = {
|
||||
enable = true;
|
||||
extraMailboxes = [ "Archive" "Drafts" "Junk" "Sent" "Trash" ];
|
||||
};
|
||||
|
||||
msmtp.enable = true;
|
||||
smtp.host = "mail.m7.rs";
|
||||
userName = address;
|
||||
} // common;
|
||||
|
||||
college = rec {
|
||||
address = "g.fontes@usp.br";
|
||||
passwordCommand = "${pass} ${smtp.host}/${address}";
|
||||
|
||||
msmtp.enable = true;
|
||||
smtp.host = "smtp.gmail.com";
|
||||
userName = address;
|
||||
} // common;
|
||||
|
||||
zoocha = rec {
|
||||
address = "gabriel@zoocha.com";
|
||||
passwordCommand = "${pass} ${smtp.host}/${address}";
|
||||
|
||||
/* TODO: add imap (conditionally)
|
||||
imap.host = "imap.gmail.com";
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "maildir";
|
||||
expunge = "both";
|
||||
};
|
||||
folders = {
|
||||
inbox = "INBOX";
|
||||
trash = "Trash";
|
||||
};
|
||||
neomutt = {
|
||||
enable = true;
|
||||
};
|
||||
*/
|
||||
|
||||
msmtp.enable = true;
|
||||
smtp.host = "smtp.gmail.com";
|
||||
userName = address;
|
||||
} // common;
|
||||
};
|
||||
};
|
||||
|
||||
programs.mbsync.enable = true;
|
||||
programs.msmtp.enable = true;
|
||||
|
||||
systemd.user.services.mbsync = {
|
||||
Unit = { Description = "mbsync synchronization"; };
|
||||
Service =
|
||||
let gpgCmds = import ../cli/gpg-commands.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
Type = "oneshot";
|
||||
ExecCondition = ''
|
||||
/bin/sh -c "${gpgCmds.isUnlocked}"
|
||||
'';
|
||||
ExecStart = "${mbsync} -a";
|
||||
};
|
||||
};
|
||||
systemd.user.timers.mbsync = {
|
||||
Unit = { Description = "Automatic mbsync synchronization"; };
|
||||
Timer = {
|
||||
OnBootSec = "30";
|
||||
OnUnitActiveSec = "5m";
|
||||
};
|
||||
Install = { WantedBy = [ "timers.target" ]; };
|
||||
};
|
||||
}
|
230
home/gburd/features/productivity/neomutt.nix
Normal file
230
home/gburd/features/productivity/neomutt.nix
Normal file
|
@ -0,0 +1,230 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
xdg = {
|
||||
desktopEntries = {
|
||||
neomutt = {
|
||||
name = "Neomutt";
|
||||
genericName = "Email Client";
|
||||
comment = "Read and send emails";
|
||||
exec = "neomutt %U";
|
||||
icon = "mutt";
|
||||
terminal = true;
|
||||
categories = [ "Network" "Email" "ConsoleOnly" ];
|
||||
type = "Application";
|
||||
mimeType = [ "x-scheme-handler/mailto" ];
|
||||
};
|
||||
};
|
||||
mimeApps.defaultApplications = {
|
||||
"x-scheme-handler/mailto" = "neomutt.desktop";
|
||||
};
|
||||
};
|
||||
|
||||
programs.neomutt = {
|
||||
enable = true;
|
||||
vimKeys = true;
|
||||
checkStatsInterval = 60;
|
||||
sidebar = {
|
||||
enable = true;
|
||||
width = 30;
|
||||
};
|
||||
settings = {
|
||||
mark_old = "no";
|
||||
text_flowed = "yes";
|
||||
reverse_name = "yes";
|
||||
query_command = ''"khard email --parsable '%s'"'';
|
||||
};
|
||||
binds = [
|
||||
{
|
||||
action = "sidebar-toggle-visible";
|
||||
key = "\\\\";
|
||||
map = [ "index" "pager" ];
|
||||
}
|
||||
{
|
||||
action = "group-reply";
|
||||
key = "L";
|
||||
map = [ "index" "pager" ];
|
||||
}
|
||||
{
|
||||
action = "toggle-new";
|
||||
key = "B";
|
||||
map = [ "index" ];
|
||||
}
|
||||
];
|
||||
macros =
|
||||
let
|
||||
browserpipe =
|
||||
"cat /dev/stdin > /tmp/muttmail.html && xdg-open /tmp/muttmail.html";
|
||||
in
|
||||
[
|
||||
{
|
||||
action = "<sidebar-next><sidebar-open>";
|
||||
key = "J";
|
||||
map = [ "index" "pager" ];
|
||||
}
|
||||
{
|
||||
action = "<sidebar-prev><sidebar-open>";
|
||||
key = "K";
|
||||
map = [ "index" "pager" ];
|
||||
}
|
||||
{
|
||||
action =
|
||||
":set confirmappend=no\\n<save-message>+Archive<enter>:set confirmappend=yes\\n";
|
||||
key = "A";
|
||||
map = [ "index" "pager" ];
|
||||
}
|
||||
{
|
||||
action = "<pipe-entry>${browserpipe}<enter><exit>";
|
||||
key = "V";
|
||||
map = [ "attach" ];
|
||||
}
|
||||
{
|
||||
action = "<pipe-message>${pkgs.urlscan}/bin/urlscan<enter><exit>";
|
||||
key = "F";
|
||||
map = [ "pager" ];
|
||||
}
|
||||
{
|
||||
action =
|
||||
"<view-attachments><search>html<enter><pipe-entry>${browserpipe}<enter><exit>";
|
||||
key = "V";
|
||||
map = [ "index" "pager" ];
|
||||
}
|
||||
];
|
||||
extraConfig = let
|
||||
# Collect all addresses and aliases
|
||||
addresses = lib.flatten (lib.mapAttrsToList (n: v: [ v.address ] ++ v.aliases) config.accounts.email.accounts);
|
||||
in ''
|
||||
alternates "${lib.concatStringsSep "|" addresses}"
|
||||
'' + ''
|
||||
# From: https://github.com/altercation/mutt-colors-solarized/blob/master/mutt-colors-solarized-dark-16.muttrc
|
||||
|
||||
# basic colors ---------------------------------------------------------
|
||||
color normal brightyellow default
|
||||
color error red default
|
||||
color tilde black default
|
||||
color message cyan default
|
||||
color markers red white
|
||||
color attachment white default
|
||||
color search brightmagenta default
|
||||
color status brightyellow black
|
||||
color indicator brightblack yellow
|
||||
color tree cyan default # arrow in threads
|
||||
|
||||
# basic monocolor screen
|
||||
mono bold bold
|
||||
mono underline underline
|
||||
mono indicator reverse
|
||||
mono error bold
|
||||
|
||||
# index ----------------------------------------------------------------
|
||||
|
||||
color index red default "~A" # all messages
|
||||
color index blue default "~N" # new messages
|
||||
color index brightred default "~E" # expired messages
|
||||
color index blue default "~N" # new messages
|
||||
color index blue default "~O" # old messages
|
||||
color index brightmagenta default "~Q" # messages that have been replied to
|
||||
color index brightgreen default "~R" # read messages
|
||||
color index blue default "~U" # unread messages
|
||||
color index blue default "~U~$" # unread, unreferenced messages
|
||||
color index cyan default "~v" # messages part of a collapsed thread
|
||||
color index magenta default "~P" # messages from me
|
||||
color index cyan default "~p!~F" # messages to me
|
||||
color index cyan default "~N~p!~F" # new messages to me
|
||||
color index cyan default "~U~p!~F" # unread messages to me
|
||||
color index brightgreen default "~R~p!~F" # messages to me
|
||||
color index red default "~F" # flagged messages
|
||||
color index red default "~F~p" # flagged messages to me
|
||||
color index red default "~N~F" # new flagged messages
|
||||
color index red default "~N~F~p" # new flagged messages to me
|
||||
color index red default "~U~F~p" # new flagged messages to me
|
||||
color index brightcyan default "~v~(!~N)" # collapsed thread with no unread
|
||||
color index yellow default "~v~(~N)" # collapsed thread with some unread
|
||||
color index green default "~N~v~(~N)" # collapsed thread with unread parent
|
||||
color index red black "~v~(~F)!~N" # collapsed thread with flagged, no unread
|
||||
color index yellow black "~v~(~F~N)" # collapsed thread with some unread & flagged
|
||||
color index green black "~N~v~(~F~N)" # collapsed thread with unread parent & flagged
|
||||
color index green black "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged
|
||||
color index cyan black "~v~(~p)" # collapsed thread with unread parent, no unread inside, some to me directly
|
||||
color index yellow red "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial)
|
||||
color index yellow default "~(~N)" # messages in threads with some unread
|
||||
color index green default "~S" # superseded messages
|
||||
color index black red "~D" # deleted messages
|
||||
color index black red "~N~D" # deleted messages
|
||||
color index red default "~T" # tagged messages
|
||||
|
||||
# message headers ------------------------------------------------------
|
||||
|
||||
color hdrdefault brightgreen default
|
||||
color header brightyellow default "^(From)"
|
||||
color header blue default "^(Subject)"
|
||||
|
||||
# body -----------------------------------------------------------------
|
||||
|
||||
color quoted blue default
|
||||
color quoted1 cyan default
|
||||
color quoted2 yellow default
|
||||
color quoted3 red default
|
||||
color quoted4 brightred default
|
||||
|
||||
color signature brightgreen default
|
||||
color bold black default
|
||||
color underline black default
|
||||
color normal default default
|
||||
color body brightcyan default "[;:][-o][)/(|]" # emoticons
|
||||
color body brightcyan default "[;:][)(|]" # emoticons
|
||||
color body brightcyan default "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|\
|
||||
|FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|\
|
||||
|IRL|RTFM|ROTFL|ROFL|YMMV)[*]?"
|
||||
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
|
||||
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
|
||||
|
||||
## pgp
|
||||
|
||||
color body red default "(BAD signature)"
|
||||
color body cyan default "(Good signature)"
|
||||
color body brightblack default "^gpg: Good signature .*"
|
||||
color body brightyellow default "^gpg: "
|
||||
color body brightyellow red "^gpg: BAD signature from.*"
|
||||
mono body bold "^gpg: Good signature"
|
||||
mono body bold "^gpg: BAD signature from.*"
|
||||
|
||||
# yes, an insance URL regex
|
||||
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
|
||||
# and a heavy handed email regex
|
||||
color body magenta default "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])"
|
||||
|
||||
# Various smilies and the like
|
||||
color body brightwhite default "<[Gg]>" # <g>
|
||||
color body brightwhite default "<[Bb][Gg]>" # <bg>
|
||||
color body yellow default " [;:]-*[})>{(<|]" # :-) etc...
|
||||
# *bold*
|
||||
color body blue default "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)"
|
||||
mono body bold "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)"
|
||||
# _underline_
|
||||
color body blue default "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)"
|
||||
mono body underline "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)"
|
||||
# /italic/ (Sometimes gets directory names)
|
||||
color body blue default "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)"
|
||||
mono body underline "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)"
|
||||
|
||||
# Border lines.
|
||||
color body blue default "( *[-+=#*~_]){6,}"
|
||||
|
||||
# From https://github.com/jessfraz/dockerfiles/blob/master/mutt/.mutt/mutt-patch-highlighting.muttrc
|
||||
color body cyan default ^(Signed-off-by).*
|
||||
color body cyan default ^(Docker-DCO-1.1-Signed-off-by).*
|
||||
color body brightwhite default ^(Cc)
|
||||
color body yellow default "^diff \-.*"
|
||||
color body brightwhite default "^index [a-f0-9].*"
|
||||
color body brightblue default "^---$"
|
||||
color body white default "^\-\-\- .*"
|
||||
color body white default "^[\+]{3} .*"
|
||||
color body green default "^[\+][^\+]+.*"
|
||||
color body red default "^\-[^\-]+.*"
|
||||
color body brightblue default "^@@ .*"
|
||||
color body green default "LGTM"
|
||||
color body brightmagenta default "-- Commit Summary --"
|
||||
color body brightmagenta default "-- File Changes --"
|
||||
color body brightmagenta default "-- Patch Links --"
|
||||
'';
|
||||
};
|
||||
}
|
11
home/gburd/features/productivity/todoman.nix
Normal file
11
home/gburd/features/productivity/todoman.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ todoman ];
|
||||
xdg.configFile."todoman/config.py".text = ''
|
||||
path = "~/Calendars/*"
|
||||
default_list = "Personal"
|
||||
date_format = "%d/%m/%Y"
|
||||
time_format = "%H:%M"
|
||||
humanize = True
|
||||
default_due = 0
|
||||
'';
|
||||
}
|
74
home/gburd/features/productivity/vdirsyncer.nix
Normal file
74
home/gburd/features/productivity/vdirsyncer.nix
Normal file
|
@ -0,0 +1,74 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
pass = "${config.programs.password-store.package}/bin/pass";
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [ vdirsyncer ];
|
||||
|
||||
home.persistence = {
|
||||
"/persist/home/misterio".directories =
|
||||
[ "Calendars" "Contacts" ".local/share/vdirsyncer" ];
|
||||
};
|
||||
|
||||
xdg.configFile."vdirsyncer/config".text = ''
|
||||
[general]
|
||||
status_path = "~/.local/share/vdirsyncer/status"
|
||||
|
||||
[pair contacts]
|
||||
a = "contacts_local"
|
||||
b = "contacts_remote"
|
||||
collections = ["from a", "from b"]
|
||||
conflict_resolution = "b wins"
|
||||
|
||||
[storage contacts_local]
|
||||
type = "filesystem"
|
||||
path = "~/Contacts"
|
||||
fileext = ".vcf"
|
||||
|
||||
[storage contacts_remote]
|
||||
type = "carddav"
|
||||
url = "https://dav.m7.rs"
|
||||
username = "hi@m7.rs"
|
||||
password.fetch = ["command", "${pass}", "mail.m7.rs/hi@m7.rs"]
|
||||
|
||||
[pair calendars]
|
||||
a = "calendars_local"
|
||||
b = "calendars_remote"
|
||||
collections = ["from a", "from b"]
|
||||
metadata = ["color"]
|
||||
conflict_resolution = "b wins"
|
||||
|
||||
[storage calendars_local]
|
||||
type = "filesystem"
|
||||
path = "~/Calendars"
|
||||
fileext = ".ics"
|
||||
|
||||
[storage calendars_remote]
|
||||
type = "caldav"
|
||||
url = "https://dav.m7.rs"
|
||||
username = "hi@m7.rs"
|
||||
password.fetch = ["command", "${pass}", "mail.m7.rs/hi@m7.rs"]
|
||||
'';
|
||||
|
||||
systemd.user.services.vdirsyncer = {
|
||||
Unit = { Description = "vdirsyncer synchronization"; };
|
||||
Service =
|
||||
let gpgCmds = import ../cli/gpg-commands.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
Type = "oneshot";
|
||||
ExecCondition = ''
|
||||
/bin/sh -c "${gpgCmds.isUnlocked}"
|
||||
'';
|
||||
ExecStart = "${pkgs.vdirsyncer}/bin/vdirsyncer sync";
|
||||
};
|
||||
};
|
||||
systemd.user.timers.vdirsyncer = {
|
||||
Unit = { Description = "Automatic vdirsyncer synchronization"; };
|
||||
Timer = {
|
||||
OnBootSec = "30";
|
||||
OnUnitActiveSec = "5m";
|
||||
};
|
||||
Install = { WantedBy = [ "timers.target" ]; };
|
||||
};
|
||||
}
|
28
home/gburd/features/rgb/default.nix
Normal file
28
home/gburd/features/rgb/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ config, ... }:
|
||||
let inherit (config.colorscheme) colors;
|
||||
in {
|
||||
services.rgbdaemon = {
|
||||
enable = true;
|
||||
daemons = {
|
||||
swayLock = true;
|
||||
mute = true;
|
||||
player = true;
|
||||
};
|
||||
colors = {
|
||||
background = "${colors.base00}";
|
||||
foreground = "${colors.base05}";
|
||||
secondary = "${colors.base0B}";
|
||||
tertiary = "${colors.base0E}";
|
||||
quaternary = "${colors.base05}";
|
||||
};
|
||||
keyboard = {
|
||||
device = "/dev/input/ckb1/cmd";
|
||||
highlighted = [ "h" "j" "k" "l" "w" "a" "s" "d" "m3" "g11" "profswitch" "lwin" "rwin" ];
|
||||
};
|
||||
mouse = {
|
||||
device = "/dev/input/ckb2/cmd";
|
||||
dpi = 750;
|
||||
highlighted = [ "wheel" "thumb" ];
|
||||
};
|
||||
};
|
||||
}
|
6
home/gburd/generic.nix
Normal file
6
home/gburd/generic.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
imports = [ ./global ];
|
||||
# Disable impermanence
|
||||
home.persistence = lib.mkForce { };
|
||||
}
|
75
home/gburd/global/default.nix
Normal file
75
home/gburd/global/default.nix
Normal file
|
@ -0,0 +1,75 @@
|
|||
{ inputs, lib, pkgs, config, outputs, ... }:
|
||||
let
|
||||
inherit (inputs.nix-colors) colorSchemes;
|
||||
inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) colorschemeFromPicture nixWallpaperFromScheme;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.impermanence.nixosModules.home-manager.impermanence
|
||||
inputs.nix-colors.homeManagerModule
|
||||
../features/cli
|
||||
../features/nvim
|
||||
] ++ (builtins.attrValues outputs.homeManagerModules);
|
||||
|
||||
nixpkgs = {
|
||||
overlays = builtins.attrValues outputs.overlays;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
package = lib.mkDefault pkgs.nix;
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
||||
warn-dirty = false;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
git.enable = true;
|
||||
};
|
||||
|
||||
home = {
|
||||
username = lib.mkDefault "misterio";
|
||||
homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
||||
stateVersion = lib.mkDefault "22.05";
|
||||
sessionPath = [ "$HOME/.local/bin" ];
|
||||
sessionVariables = {
|
||||
FLAKE = "$HOME/Documents/NixConfig";
|
||||
};
|
||||
|
||||
persistence = {
|
||||
"/persist/home/misterio" = {
|
||||
directories = [
|
||||
"Documents"
|
||||
"Downloads"
|
||||
"Pictures"
|
||||
"Videos"
|
||||
".local/bin"
|
||||
];
|
||||
allowOther = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
colorscheme = lib.mkDefault colorSchemes.dracula;
|
||||
wallpaper =
|
||||
let
|
||||
largest = f: xs: builtins.head (builtins.sort (a: b: a > b) (map f xs));
|
||||
largestWidth = largest (x: x.width) config.monitors;
|
||||
largestHeight = largest (x: x.height) config.monitors;
|
||||
in
|
||||
lib.mkDefault (nixWallpaperFromScheme
|
||||
{
|
||||
scheme = config.colorscheme;
|
||||
width = largestWidth;
|
||||
height = largestHeight;
|
||||
logoScale = 4;
|
||||
});
|
||||
home.file.".colorscheme".text = config.colorscheme.slug;
|
||||
}
|
22
home/gburd/loki.nix
Normal file
22
home/gburd/loki.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ inputs, outputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./global
|
||||
./features/desktop/hyprland
|
||||
./features/desktop/wireless
|
||||
./features/productivity
|
||||
./features/pass
|
||||
./features/games
|
||||
];
|
||||
|
||||
wallpaper = outputs.wallpapers.aenami-lunar;
|
||||
colorscheme = inputs.nix-colors.colorSchemes.atelier-heath;
|
||||
|
||||
monitors = [{
|
||||
name = "eDP-1";
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
workspace = "1";
|
||||
primary = true;
|
||||
}];
|
||||
}
|
246
home/gburd/pgp.asc
Normal file
246
home/gburd/pgp.asc
Normal file
|
@ -0,0 +1,246 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Comment: 7088 C742 1873 E0DB 97FF 17C2 245C AB70 B4C2 25E9
|
||||
Comment: Gabriel Fontes <hi@m7.rs>
|
||||
Comment: Gabriel Fontes <gabriel@gsfontes.com>
|
||||
Comment: Gabriel Fontes <eu@misterio.me>
|
||||
Comment: Gabriel Fontes <g.fontes@usp.br>
|
||||
Comment: Gabriel Fontes <gabriel@gelos.club>
|
||||
Comment: Gabriel Fontes <gabriel.fontes@uget.express>
|
||||
Comment: Gabriel Fontes <gabriel@zoocha.com>
|
||||
|
||||
mQGNBGA8hQQBDAC9rURimWM1VWW7Z1RBaWhZiqGz/qSG+8zjvvr74fYNRqYsIV2S
|
||||
/I8xxS1r9GAS9RXyiipW1lzi/pCc6wYMwukR+QiZi4ED6JEhfGSeJYPzQBZCBZWP
|
||||
ryYLPv5YNZCQ8tHBG9vySH5ACmWV/AtQUrzD3IhBq6TcDR/lBpLW+qTTEUkkokJn
|
||||
GkygHbbuo+FxNvo1gkqdGb+eagVTs3G3kkKKqk3B8CDFPZbkurEPw46n2uLuS41g
|
||||
3qC0jACazaphGfOo/fSaA9vBzb7m24aAMJXZ2pY4EKJ59tLccUIZrXj+3p3DV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SdzD97
|
||||
LyE=
|
||||
=UHEm
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
1
home/gburd/ssh.pub
Normal file
1
home/gburd/ssh.pub
Normal file
|
@ -0,0 +1 @@
|
|||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDci4wJghnRRSqQuX1z2xeaUR+p/muKzac0jw0mgpXE2T/3iVlMJJ3UXJ+tIbySP6ezt0GVmzejNOvUarPAm0tOcW6W0Ejys2Tj+HBRU19rcnUtf4vsKk8r5PW5MnwS8DqZonP5eEbhW2OrX5ZsVyDT+Bqrf39p3kOyWYLXT2wA7y928g8FcXOZjwjTaWGWtA+BxAvbJgXhU9cl/y45kF69rfmc3uOQmeXpKNyOlTk6ipSrOfJkcHgNFFeLnxhJ7rYxpoXnxbObGhaNqn7gc5mt+ek+fwFzZ8j6QSKFsPr0NzwTFG80IbyiyrnC/MeRNh7SQFPAESIEP8LK3PoNx2l1M+MjCQXsb4oIG2oYYMRa2yx8qZ3npUOzMYOkJFY1uI/UEE/j/PlQSzMHfpmWus4o2sijfr8OmVPGeoU/UnVPyINqHhyAd1d3Iji3y3LMVemHtp5wVcuswABC7IRVVKZYrMCXMiycY5n00ch6XTaXBwCY00y8B3Mzkd7Ofq98YHc= hi@m7.rs
|
9
home/gburd/wallpapers/default.nix
Normal file
9
home/gburd/wallpapers/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
builtins.listToAttrs (map
|
||||
(wallpaper: {
|
||||
inherit (wallpaper) name;
|
||||
value = builtins.fetchurl {
|
||||
inherit (wallpaper) sha256;
|
||||
url = "https://i.imgur.com/${wallpaper.id}.${wallpaper.ext}";
|
||||
};
|
||||
})
|
||||
(builtins.fromJSON (builtins.readFile ./list.json)))
|
23
home/gburd/wallpapers/from_album.sh
Executable file
23
home/gburd/wallpapers/from_album.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env -S nix shell nixpkgs#httpie nixpkgs#jq --command bash
|
||||
|
||||
function fetch_image() {
|
||||
jq -n \
|
||||
--arg name "$(echo $1 | cut -d '|' -f 1)" \
|
||||
--arg ext "$(echo $1 | cut -d '|' -f 2 | cut -d '/' -f 2)" \
|
||||
--arg id "$(echo $1 | cut -d '|' -f 3)" \
|
||||
--arg sha256 "$(nix-prefetch-url https://i.imgur.com/$id.$ext)" \
|
||||
'{"name": $name, "ext": $ext, "id": $id, "sha256": $sha256}'
|
||||
}
|
||||
|
||||
album="bXDPRpV" # https://imgur.com/a/bXDPRpV
|
||||
clientid="0c2b2b57cdbe5d8"
|
||||
|
||||
result=$(https api.imgur.com/3/album/$album Authorization:"Client-ID $clientid")
|
||||
images=$(echo $result | jq -r '.data.images[] | "\(.description)|\(.type)|\(.id)"')
|
||||
|
||||
echo "["
|
||||
while read -r image; do
|
||||
fetch_image $image
|
||||
done <<< "$images"
|
||||
wait
|
||||
echo "]"
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue