Compare commits
74 Commits
feat/kile-
...
main
Author | SHA1 | Date |
---|---|---|
Ricard Illa | 4b827fb7ff | |
Ricard Illa | fc221684e2 | |
Ricard Illa | 96cc9788d7 | |
Ricard Illa | 20cc9f7d24 | |
Ricard Illa | 4139badc69 | |
Ricard Illa | 42ad65fc34 | |
Ricard Illa | 36a64d5fdc | |
Ricard Illa | 9f8742fc42 | |
Ricard Illa | 3439390ee8 | |
Ricard Illa | e9c3b32d75 | |
Ricard Illa | 7dfb905377 | |
Ricard Illa | e91da8ca95 | |
Ricard Illa | 936b7a3202 | |
Ricard Illa | 4cf2bd1775 | |
Ricard Illa | 47c5f29379 | |
Ricard Illa | 0e81b3822d | |
Ricard Illa | ad6be17486 | |
Ricard Illa | 7e562a8bc6 | |
Ricard Illa | 8fb7204fee | |
Ricard Illa | 280853dc66 | |
Ricard Illa | 6ab585ff13 | |
Ricard Illa | 79e3c5c266 | |
Ricard Illa | b32f7b2c0c | |
Ricard Illa | 927bd5b8a2 | |
Ricard Illa | d671eee239 | |
Ricard Illa | de13ab6b0e | |
Ricard Illa | 8e90c64dbe | |
Ricard Illa | 7f32325af8 | |
Ricard Illa | afe7d7cb08 | |
Ricard Illa | 6e81da9740 | |
Ricard Illa | 5dc7a83abe | |
Ricard Illa | 476aeacbe0 | |
Ricard Illa | 5733559ad2 | |
Ricard Illa | e9fc34edfc | |
Ricard Illa | 91fb654395 | |
Ricard Illa | cecff8d0aa | |
Ricard Illa | be4d78b4f6 | |
Ricard Illa | 0a938c80d4 | |
Ricard Illa | 1e7b52a429 | |
Ricard Illa | 5af9991793 | |
Ricard Illa | 8d094b9552 | |
Ricard Illa | ee92a7bd9a | |
Ricard Illa | 56eac5d1c4 | |
Ricard Illa | c02a648c34 | |
Ricard Illa | a98c48b2ce | |
Ricard Illa | 5418024c25 | |
Ricard Illa | 99b3248bcb | |
Ricard Illa | a16c36c7e4 | |
Ricard Illa | 5455af3d42 | |
Ricard Illa | bb542b005d | |
Ricard Illa | 9a30953070 | |
Ricard Illa | 74709d3830 | |
Ricard Illa | 19f06c6a14 | |
Ricard Illa | 83d1e5fafa | |
Ricard Illa | 5a48c6cb3a | |
Ricard Illa | 66b0d86c42 | |
Ricard Illa | d23c70e2a2 | |
Ricard Illa | 3bf3943bf2 | |
Ricard Illa | 60985280b3 | |
Ricard Illa | 23fbc255a2 | |
Ricard Illa | eeb0baf8b0 | |
Ricard Illa | e3eada2ea2 | |
Ricard Illa | 74a20a778d | |
Ricard Illa | 87bbdd7267 | |
Ricard Illa | 720875ddca | |
Ricard Illa | 4d538fbc8e | |
Ricard Illa | 00b34c2b36 | |
Ricard Illa | a47d59dc29 | |
Ricard Illa | 845f9a305a | |
Ricard Illa | 52579d9477 | |
Ricard Illa | 7b863a7792 | |
Ricard Illa | 4efd68ca67 | |
Ricard Illa | e44f932500 | |
Ricard Illa | 26440ac058 |
310
capibara.nix
310
capibara.nix
|
@ -1,310 +0,0 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, stablePkgs, impermanence, ... }:
|
||||
|
||||
let
|
||||
home = "/home/rilla";
|
||||
offline-backups = pkgs.writeScriptBin "offline-backups" ''
|
||||
#!${pkgs.dash}/bin/dash
|
||||
|
||||
set -xe
|
||||
|
||||
for x in 0 1 2; do
|
||||
${pkgs.systemd}/bin/systemctl start "mnt-backups-''${x}.mount"
|
||||
done && \
|
||||
/run/wrappers/bin/doas -u btrbk \
|
||||
${pkgs.btrbk}/bin/btrbk \
|
||||
--config /etc/btrbk/offline-backups.conf \
|
||||
--progress \
|
||||
--verbose \
|
||||
"$@"
|
||||
'';
|
||||
|
||||
in {
|
||||
imports = [ ./nixos/hardware-configuration/capibara.nix ./nixos/common.nix ];
|
||||
|
||||
home-manager = {
|
||||
users.rilla.imports =
|
||||
[ home/capibara.nix "${impermanence}/home-manager.nix" ];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
|
||||
"/mnt/btr_root" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/mnt/btr_data" = {
|
||||
device = "/dev/mapper/data";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/mnt/persist" = {
|
||||
device = "/dev/mapper/data";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=persist" "compress=zstd" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/mnt/logs" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=logs" "compress=zstd" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/mnt/data" = {
|
||||
device = "/dev/mapper/data";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=data" "compress=zstd" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/c99d1f1b-45a4-4a25-b5b8-bc76464c6825";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
"/swap" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=swap" ];
|
||||
};
|
||||
|
||||
"/mnt/vfs_share" = {
|
||||
device = "/dev/mapper/data";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=vfs_share" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/mnt/backups/0" = {
|
||||
device = "/dev/mapper/backups0";
|
||||
fsType = "btrfs";
|
||||
options = [ "noauto" "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/mnt/backups/1" = {
|
||||
device = "/dev/mapper/backups1";
|
||||
fsType = "btrfs";
|
||||
options = [ "noauto" "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/mnt/backups/2" = {
|
||||
device = "/dev/mapper/backups2";
|
||||
fsType = "btrfs";
|
||||
options = [ "noauto" "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
crypttab = {
|
||||
text = ''
|
||||
backups0 UUID="e45232d5-f46f-46f3-a150-be26374b3357" /etc/luks-keys/backups.bin noauto
|
||||
backups1 UUID="5b3da928-4862-4451-89cd-5bd6a95466d0" /etc/luks-keys/backups.bin noauto
|
||||
backups2 UUID="cbfa9cba-dee2-4d0b-8cde-2f1d1849b22c" /etc/luks-keys/backups.bin noauto
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables = {
|
||||
NIXOS_CONFIG = "${home}/configs/nix-config/capibara.nix";
|
||||
LV2_PATH =
|
||||
"${home}/.nix-profile/lib/lv2:${home}/Audio/plugins/lv2:/run/current-system/sw/lib/lv2";
|
||||
LXVST_PATH =
|
||||
"${home}/.nix-profile/lib/lxvst:${home}/Audio/plugins/lxvst:/run/current-system/sw/lib/lxvst";
|
||||
LADSPA_PATH =
|
||||
"${home}/.nix-profile/lib/ladspa:${home}/Audio/plugins/ladspa:/run/current-system/sw/lib/ladspa";
|
||||
};
|
||||
|
||||
networking.networkmanager.wifi.macAddress = "CC:AF:78:75:29:32";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
programs.steam.enable = true;
|
||||
|
||||
boot = {
|
||||
|
||||
loader = {
|
||||
grub = {
|
||||
efiSupport = false;
|
||||
efiInstallAsRemovable = false;
|
||||
enable = true;
|
||||
device = "/dev/disk/by-id/ata-KINGSTON_SKC600MS512G_50026B7783FC3D2F";
|
||||
};
|
||||
};
|
||||
initrd = {
|
||||
luks = {
|
||||
devices = {
|
||||
root = {
|
||||
device = "/dev/disk/by-uuid/869b4b9e-5004-4625-877f-6b1c9489ac8f";
|
||||
allowDiscards = true;
|
||||
};
|
||||
data = {
|
||||
device = "/dev/disk/by-uuid/6a9246a0-984b-471c-9950-be16db3060f5";
|
||||
allowDiscards = true;
|
||||
};
|
||||
};
|
||||
reusePassphrases = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.earlyoom.enable = true;
|
||||
|
||||
# Power management
|
||||
powerManagement.enable = true;
|
||||
services.upower.enable = true;
|
||||
# services.thermald.enable = true;
|
||||
services.tlp.enable = true;
|
||||
services.power-profiles-daemon.enable = false;
|
||||
environment.systemPackages = with pkgs; [ powertop acpi offline-backups ];
|
||||
|
||||
#services.beesd.filesystems = {
|
||||
# root = {
|
||||
# spec = "/dev/mapper/root";
|
||||
# hashTableSizeMB = 256;
|
||||
# verbosity = "info";
|
||||
# extraOptions = [ "--loadavg-target" "2.0" ];
|
||||
# };
|
||||
#};
|
||||
|
||||
# todo: target and/or archive
|
||||
services.btrbk.instances = {
|
||||
btrbk = {
|
||||
onCalendar = "*:0/30"; # every 30 minutes
|
||||
settings = {
|
||||
snapshot_preserve = "2d";
|
||||
snapshot_preserve_min = "latest";
|
||||
snapshot_create = "onchange";
|
||||
volume."/mnt/btr_data" = {
|
||||
snapshot_dir = "btrbk_snapshots";
|
||||
subvolume = {
|
||||
data = { };
|
||||
persist = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# doas -u btrbk btrbk -c /etc/btrbk/offline-backups.conf --dry-run --progress --verbose run
|
||||
offline-backups = {
|
||||
onCalendar = null;
|
||||
settings = {
|
||||
ssh_user = "btrbk";
|
||||
ssh_identity = "/etc/btrbk/id_ed25519";
|
||||
backend_remote = "btrfs-progs-doas";
|
||||
snapshot_create = "onchange";
|
||||
snapshot_preserve_min = "latest";
|
||||
target_preserve_min = "all";
|
||||
volume = {
|
||||
|
||||
"ssh://narwhal:22/mnt/btr_pool" = {
|
||||
stream_buffer = "50%";
|
||||
stream_compress = "zstd";
|
||||
snapshot_dir = "btrbk_snapshots_offline";
|
||||
subvolume = {
|
||||
backups = { };
|
||||
books = { };
|
||||
certs = { };
|
||||
data = { };
|
||||
docker_volumes = { };
|
||||
home = { };
|
||||
http = { };
|
||||
music = { };
|
||||
secrets = { };
|
||||
transmission = { };
|
||||
videos = { };
|
||||
};
|
||||
target = {
|
||||
"/mnt/backups/0/btr_backup/narwhal" = { };
|
||||
"/mnt/backups/1/btr_backup/narwhal" = { };
|
||||
"/mnt/backups/2/btr_backup/narwhal" = { };
|
||||
};
|
||||
};
|
||||
|
||||
"ssh://suricata:22/mnt/btr_pool" = {
|
||||
stream_buffer = "50%";
|
||||
snapshot_dir = "btrbk_snapshots_offline";
|
||||
compat_remote = "busybox";
|
||||
subvolume = {
|
||||
home = { };
|
||||
rancher_config = { };
|
||||
backups = { };
|
||||
configs = { };
|
||||
};
|
||||
target = {
|
||||
"/mnt/backups/0/btr_backup/suricata" = { };
|
||||
"/mnt/backups/1/btr_backup/suricata" = { };
|
||||
"/mnt/backups/2/btr_backup/suricata" = { };
|
||||
};
|
||||
};
|
||||
|
||||
"ssh://caladan/mnt/btr_pool" = {
|
||||
stream_buffer = "50%";
|
||||
snapshot_dir = "btrbk_snapshots_offline";
|
||||
compat_remote = "busybox";
|
||||
subvolume = {
|
||||
certs = { };
|
||||
volumes = { };
|
||||
};
|
||||
target = {
|
||||
"/mnt/backups/0/btr_backup/caladan" = { };
|
||||
"/mnt/backups/1/btr_backup/caladan" = { };
|
||||
"/mnt/backups/2/btr_backup/caladan" = { };
|
||||
};
|
||||
};
|
||||
|
||||
"/mnt/btr_data" = {
|
||||
snapshot_dir = "btrbk_snapshots_offline";
|
||||
subvolume = {
|
||||
data = { };
|
||||
persist = { };
|
||||
};
|
||||
target = {
|
||||
"/mnt/backups/0/btr_backup/capibara" = { };
|
||||
"/mnt/backups/1/btr_backup/capibara" = { };
|
||||
"/mnt/backups/2/btr_backup/capibara" = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver.deviceSection = ''
|
||||
Option "TearFree" "true"
|
||||
'';
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "capibara";
|
||||
interfaces = {
|
||||
eno0.useDHCP = true;
|
||||
wlp2s0.useDHCP = true;
|
||||
};
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
157
echidna.nix
157
echidna.nix
|
@ -1,157 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
choose-pass =
|
||||
pkgs.callPackage ./macos/choose-pass.nix { inherit config pkgs; };
|
||||
in {
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
# nixpkgs.config.permittedInsecurePackages = [ "python-2.7.18.6" ];
|
||||
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
# environment.systemPackages = [ ];
|
||||
environment.systemPackages = [
|
||||
(pkgs.pass.withExtensions (exts: [ exts.pass-otp ]))
|
||||
choose-pass
|
||||
# pkgs.khal
|
||||
pkgs.alacritty
|
||||
pkgs.gopass
|
||||
pkgs.ansible
|
||||
pkgs.bat
|
||||
pkgs.black
|
||||
pkgs.cheat
|
||||
pkgs.cmatrix
|
||||
pkgs.colima
|
||||
pkgs.coreutils-full
|
||||
pkgs.csvkit
|
||||
pkgs.curl
|
||||
pkgs.diff-so-fancy
|
||||
pkgs.docker-client
|
||||
pkgs.docker-machine
|
||||
pkgs.exa
|
||||
pkgs.fzf
|
||||
pkgs.getopt
|
||||
pkgs.gnupg
|
||||
pkgs.go
|
||||
pkgs.google-cloud-sdk
|
||||
pkgs.gping
|
||||
pkgs.hlint
|
||||
pkgs.htop
|
||||
pkgs.imagemagick
|
||||
pkgs.jq
|
||||
pkgs.khard
|
||||
pkgs.libmysqlclient.dev
|
||||
pkgs.mosh
|
||||
pkgs.mpc-cli
|
||||
pkgs.ncmpcpp
|
||||
pkgs.neofetch
|
||||
pkgs.neomutt
|
||||
pkgs.newsboat
|
||||
pkgs.nixfmt
|
||||
pkgs.nodePackages.pyright
|
||||
pkgs.python310Packages.python-lsp-server
|
||||
# pkgs.python310Packages.pylsp-mypy
|
||||
pkgs.openssh
|
||||
pkgs.pinentry_mac
|
||||
pkgs.pipenv
|
||||
pkgs.python310Full
|
||||
pkgs.python310Packages.pip
|
||||
pkgs.python310Packages.virtualenvwrapper
|
||||
# pkgs.pythonFull
|
||||
pkgs.ripgrep
|
||||
pkgs.shellcheck
|
||||
pkgs.shfmt
|
||||
pkgs.sqlfluff
|
||||
pkgs.starship
|
||||
pkgs.stow
|
||||
pkgs.terraform
|
||||
pkgs.tmux
|
||||
pkgs.tree
|
||||
pkgs.urlscan
|
||||
pkgs.vagrant
|
||||
pkgs.vdirsyncer
|
||||
pkgs.virtualenv
|
||||
pkgs.wget
|
||||
pkgs.wireguard-go
|
||||
pkgs.wireguard-tools
|
||||
pkgs.yubikey-personalization
|
||||
pkgs.zsh
|
||||
];
|
||||
# Use a custom configuration.nix location.
|
||||
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
|
||||
environment.darwinConfig = "/Users/rilla/configs/nix-config/echidna.nix";
|
||||
# environment.variables.DOCKER_HOST = "tcp://localhost:2375";
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
services.nix-daemon.enable = true;
|
||||
# nix.package = pkgs.nix;
|
||||
|
||||
# Create /etc/bashrc that loads the nix-darwin environment.
|
||||
programs.zsh.enable = true; # default shell on catalina
|
||||
# programs.fish.enable = true;
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
onActivation = {
|
||||
cleanup = "zap";
|
||||
autoUpdate = true;
|
||||
upgrade = true;
|
||||
};
|
||||
global = {
|
||||
brewfile = true;
|
||||
lockfiles = true;
|
||||
};
|
||||
casks = [ "kmbmpdc" "librewolf" "virtualbox" "bluetility" ];
|
||||
brews = [
|
||||
"pyenv"
|
||||
"pyenv-virtualenv"
|
||||
"mpd"
|
||||
"choose-gui"
|
||||
"vitetris"
|
||||
"yabai"
|
||||
"skhd"
|
||||
"spacebar"
|
||||
"gnu-getopt"
|
||||
"coreutils"
|
||||
"pinentry-mac"
|
||||
];
|
||||
taps = [
|
||||
"homebrew/bundle"
|
||||
"homebrew/cask"
|
||||
"homebrew/core"
|
||||
"homebrew/services"
|
||||
"koekeishiya/formulae"
|
||||
"cmacrae/formulae"
|
||||
];
|
||||
};
|
||||
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
fonts = [
|
||||
(pkgs.nerdfonts.override { fonts = [ "Hack" "MPlus" ]; })
|
||||
pkgs.inter
|
||||
pkgs.hack-font
|
||||
pkgs.libertinus
|
||||
];
|
||||
};
|
||||
|
||||
users.users.rilla = {
|
||||
name = "rilla";
|
||||
home = "/Users/rilla";
|
||||
};
|
||||
|
||||
home-manager = { users.rilla.imports = [ home/echidna.nix ]; };
|
||||
|
||||
system.stateVersion = 4;
|
||||
}
|
88
flake.lock
88
flake.lock
|
@ -1,17 +1,40 @@
|
|||
{
|
||||
"nodes": {
|
||||
"darwin": {
|
||||
"agenix": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1684774948,
|
||||
"narHash": "sha256-hJTaw4dYzcB+lsasKejnafq0CxPsVetn9RLXrcL+4jE=",
|
||||
"lastModified": 1690228878,
|
||||
"narHash": "sha256-9Xe7JV0krp4RJC9W9W9WutZVlw6BlHTFMiUP/k48LQY=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "d8c973fd228949736dedf61b7f8cc1ece3236792",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1673295039,
|
||||
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "b8c286c82c6b47826a6c0377e7017052ad91353c",
|
||||
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -24,15 +47,36 @@
|
|||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685019994,
|
||||
"narHash": "sha256-81o6SKZPALvib21hIOMx2lIhFSs0mRy0PfPvg0zsfTk=",
|
||||
"lastModified": 1682203081,
|
||||
"narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d1f04b0f365a34896a37d9015637796537ec88a3",
|
||||
"rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1691882297,
|
||||
"narHash": "sha256-e1/LAQSGLnBywfA1TfMl0Vj3tvYka73XOZ/D2/CJowE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c3ab5ea047e6dc73df530948f7367455749d8906",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -44,11 +88,11 @@
|
|||
},
|
||||
"impermanence": {
|
||||
"locked": {
|
||||
"lastModified": 1684264534,
|
||||
"narHash": "sha256-K0zr+ry3FwIo3rN2U/VWAkCJSgBslBisvfRIPwMbuCQ=",
|
||||
"lastModified": 1690797372,
|
||||
"narHash": "sha256-GImz19e33SeVcIvBB7NnhbJSbTpFFmNtWLh7Z85Y188=",
|
||||
"owner": "nix-community",
|
||||
"repo": "impermanence",
|
||||
"rev": "89253fb1518063556edd5e54509c30ac3089d5e6",
|
||||
"rev": "e3a7acd113903269a1b5c8b527e84ce7ee859851",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -59,11 +103,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1684899633,
|
||||
"narHash": "sha256-NtwerXX8UFsoNy6k+DukJMriWtEjQtMU/Urbff2O2Dg=",
|
||||
"lastModified": 1691871742,
|
||||
"narHash": "sha256-6yDNjfbAMpwzWL4y75fxs6beXHRANfYX8BNSPjYehck=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "4cc688ee711159b9bcb5a367be44007934e1a49d",
|
||||
"rev": "430a56dd16fe583a812b2df44dca002acab2f4f6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -75,11 +119,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1684935479,
|
||||
"narHash": "sha256-6QMMsXMr2nhmOPHdti2j3KRHt+bai2zw+LJfdCl97Mk=",
|
||||
"lastModified": 1691654369,
|
||||
"narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f91ee3065de91a3531329a674a45ddcb3467a650",
|
||||
"rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -90,23 +134,23 @@
|
|||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1684936879,
|
||||
"narHash": "sha256-BOSq/QiX7MDs8tUnAt4+nYTJctgYkzVSNL95qlfMYeM=",
|
||||
"lastModified": 1691831739,
|
||||
"narHash": "sha256-6e12VCvA7jOjhzJ1adLiUV1GTPXGBcCfhggsDwiuNB4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "99fe1b870522d6ee3e692c2b6e663d6868a3fde4",
|
||||
"rev": "3fe694c4156b84dac12627685c7ae592a71e2206",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-22.11",
|
||||
"ref": "nixos-23.05",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": "home-manager",
|
||||
"agenix": "agenix",
|
||||
"home-manager": "home-manager_2",
|
||||
"impermanence": "impermanence",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs",
|
||||
|
|
66
flake.nix
66
flake.nix
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "nixpkgs/nixos-22.11";
|
||||
nixpkgs-stable.url = "nixpkgs/nixos-23.05";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
|
@ -9,50 +9,68 @@
|
|||
};
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
darwin = {
|
||||
url = "github:lnl7/nix-darwin/master";
|
||||
agenix = {
|
||||
url = "github:ryantm/agenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-stable, nixos-hardware, home-manager
|
||||
, impermanence, darwin }@inputs: {
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, nixpkgs-stable
|
||||
, nixos-hardware
|
||||
, home-manager
|
||||
, impermanence
|
||||
, agenix
|
||||
, ...
|
||||
}@inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
in
|
||||
rec {
|
||||
overlays = import ./overlays { inherit inputs; };
|
||||
nixosModules = import ./modules/nixos;
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
secrets = import ./secrets;
|
||||
stablePkgs = nixpkgs-stable.legacyPackages."x86_64-linux";
|
||||
|
||||
nixosConfigurations = {
|
||||
trantor = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
# unstablePkgs = nixpkgs-unstable.legacyPackages."x86_64-linux";
|
||||
stablePkgs = nixpkgs-stable.legacyPackages."x86_64-linux";
|
||||
impermanence = impermanence;
|
||||
};
|
||||
|
||||
modules = [
|
||||
./trantor.nix
|
||||
./hosts/trantor
|
||||
home-manager.nixosModules.home-manager
|
||||
impermanence.nixosModules.impermanence
|
||||
agenix.nixosModules.default
|
||||
];
|
||||
};
|
||||
|
||||
capibara = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
# unstablePkgs = nixpkgs-unstable.legacyPackages."x86_64-linux";
|
||||
stablePkgs = nixpkgs-stable.legacyPackages."x86_64-linux";
|
||||
impermanence = impermanence;
|
||||
};
|
||||
|
||||
specialArgs = { inherit stablePkgs impermanence inputs outputs; };
|
||||
modules = [
|
||||
./capibara.nix
|
||||
./hosts/capibara
|
||||
nixos-hardware.nixosModules.lenovo-thinkpad-x230
|
||||
home-manager.nixosModules.home-manager
|
||||
impermanence.nixosModules.impermanence
|
||||
agenix.nixosModules.default
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
darwinConfigurations.echidna = darwin.lib.darwinSystem {
|
||||
system = "x86_64-darwin";
|
||||
modules = [ ./echidna.nix home-manager.darwinModule ];
|
||||
homeConfigurations = {
|
||||
|
||||
"rilla@echidna" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
modules = [ ./hosts/echidna/home.nix ];
|
||||
};
|
||||
|
||||
"ricard@coder-workspace" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
modules = [ ./hosts/coder-workspace/home.nix ];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
|
@ -1,7 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./nixos.nix ];
|
||||
# programs.alacritty.settings.font.size = 9;
|
||||
programs.alacritty.settings.font.size = 7;
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./common.nix ];
|
||||
programs.alacritty = {
|
||||
settings = {
|
||||
font = {
|
||||
offset = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# imports = [ ./firefox ];
|
||||
|
||||
home.packages = [ pkgs.librewolf pkgs.firefox pkgs.tor-browser-bundle-bin ];
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
};
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# nix-env -f '<nixpkgs>' -qaP -A nur.repos.rycee.firefox-addons
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
# maybe enable tridactyl?
|
||||
# nix-env -f '<nixpkgs>' -qaP -A nur.repos.rycee.firefox-addons
|
||||
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
# browserpass
|
||||
# canvasblocker
|
||||
# clearurls
|
||||
# cookie-autodelete
|
||||
# darkreader
|
||||
# floccus
|
||||
# foxyproxy-standard
|
||||
# https-everywhere
|
||||
# i-dont-care-about-cookies
|
||||
# localcdn
|
||||
# noscript
|
||||
# privacy-possum
|
||||
# privacy-redirect
|
||||
# ublock-origin
|
||||
# vimium
|
||||
# # todo: AdNauseam, wallabagger, DownThemAll! Wayback Machine
|
||||
# ];
|
||||
profiles = {
|
||||
default = {
|
||||
id = 0;
|
||||
name = "default";
|
||||
isDefault = true;
|
||||
settings = {
|
||||
# change some values from arkenfox's defaults
|
||||
"privacy.resistFingerprinting" =
|
||||
false; # if true, this would the window size to rounded dimensions, which is too annoying on a tiling window manager
|
||||
"extensions.pocket.enabled" = false;
|
||||
"identity.fxaccounts.enabled" = false;
|
||||
"browser.search.suggest.enabled" = true;
|
||||
"browser.urlbar.suggest.searches" = true;
|
||||
"keyword.enable" = true;
|
||||
|
||||
# for Firefox-UI-Fix
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"browser.proton.enabled" = true;
|
||||
"svg.context-properties.content.enabled" = true;
|
||||
"layout.css.backdrop-filter.enabled" = true;
|
||||
"browser.compactmode.show" = true;
|
||||
"browser.urlbar.suggest.calculator" = true;
|
||||
|
||||
"browser.uidensity" = 1;
|
||||
|
||||
# "browser.search.region" = "GB";
|
||||
# "browser.search.isUS" = false;
|
||||
# "distribution.searchplugins.defaultLocale" = "en-GB";
|
||||
# "general.useragent.locale" = "en-GB";
|
||||
# "browser.bookmarks.showMobileBookmarks" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
# [ ./nixos-common.nix ./desktop-sway ./alacritty/capibara.nix ./theming ];
|
||||
# [ ./nixos-common.nix ./desktop-xmonad/capibara.nix ./alacritty/capibara.nix ./theming ];
|
||||
[ ./nixos-common.nix ./desktop-river ./alacritty/capibara.nix ./theming ];
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{ config, pkgs, contacts, addressbook, ... }:
|
||||
|
||||
let
|
||||
shell = "${pkgs.dash}/bin/dash";
|
||||
vdirsyncer = "${pkgs.vdirsyncer}/bin/vdirsyncer";
|
||||
mkdir = "${pkgs.coreutils}/bin/mkdir";
|
||||
cat = "${pkgs.coreutils}/bin/cat";
|
||||
abook = "${pkgs.abook}/bin/abook";
|
||||
dirname = "${pkgs.coreutils}/bin/dirname";
|
||||
in
|
||||
pkgs.writeScriptBin "davsync" ''
|
||||
#!${shell}
|
||||
${vdirsyncer} discover && \
|
||||
${vdirsyncer} sync && \
|
||||
${mkdir} -p "$(${dirname} ${addressbook})" && \
|
||||
${cat} "${contacts}"/*/*/* | \
|
||||
${abook} \
|
||||
--convert \
|
||||
--informat vcard \
|
||||
--outformat abook > \
|
||||
"${config.home.homeDirectory}/.abook/adressbook"
|
||||
''
|
|
@ -1,12 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
contacts = "${config.home.homeDirectory}/Contacts";
|
||||
addressbook = "${config.home.homeDirectory}/.abook/addressbook";
|
||||
davsync = pkgs.callPackage ./davsync.nix {
|
||||
inherit config pkgs contacts addressbook;
|
||||
};
|
||||
in {
|
||||
imports = [ ./common.nix ];
|
||||
home.packages = [ davsync pkgs.vdirsyncer pkgs.khal pkgs.khard pkgs.abook ];
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
shell = "${pkgs.dash}/bin/dash";
|
||||
|
||||
default_master_ratio = "0.6";
|
||||
up_layout = "Up ((h: v v) 1 ${default_master_ratio} 0)";
|
||||
down_layout = "Down ((h: v v) 1 ${default_master_ratio} 1)";
|
||||
left_layout = "Left ((v: h h) 1 ${default_master_ratio} 0)";
|
||||
right_layout = "Right ((v: h h) 1 ${default_master_ratio} 1)";
|
||||
deck_layout = "Deck deck";
|
||||
full_layout = "Full full";
|
||||
wide_layout = "Wide ((v: h h h) 1 0.5 1)";
|
||||
column_layout = "Cols (v: v)";
|
||||
default_layout = left_layout;
|
||||
|
||||
riverctl = "${pkgs.river}/bin/riverctl";
|
||||
kile = "${pkgs.kile-wl}/bin/kile";
|
||||
kile_namespace = "kile";
|
||||
|
||||
in {
|
||||
|
||||
systemd.user.services.kile-wl = {
|
||||
Unit = {
|
||||
Description = "kile layout generator";
|
||||
BindsTo = [ "river-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart =
|
||||
"${kile} --namespace ${kile_namespace} --layout '${default_layout}'";
|
||||
};
|
||||
Install = { WantedBy = [ "river-session.target" ]; };
|
||||
};
|
||||
|
||||
xdg.dataFile.init-kile = {
|
||||
executable = true;
|
||||
target = "${config.xdg.configHome}/river/init-kile";
|
||||
text = ''
|
||||
#!${shell}
|
||||
|
||||
# Super+H and Super+L to decrease/increase the main ratio
|
||||
${riverctl} map -repeat normal Super Equal send-layout-cmd ${kile_namespace} "mod_main_ratio +0.01"
|
||||
${riverctl} map -repeat normal Super Minus send-layout-cmd ${kile_namespace} "mod_main_ratio -0.01"
|
||||
|
||||
# Super+Comma and Super+Period. to increment/decrement the main count
|
||||
${riverctl} map normal Super Comma send-layout-cmd ${kile_namespace} "mod_main_amount +1"
|
||||
${riverctl} map normal Super Period send-layout-cmd ${kile_namespace} "mod_main_amount -1"
|
||||
|
||||
# Super+{Up,Right,Down,Left} to change layout orientation
|
||||
${riverctl} map normal Super+Control K send-layout-cmd ${kile_namespace} "focused ${up_layout}"
|
||||
${riverctl} map normal Super+Control J send-layout-cmd ${kile_namespace} "focused ${down_layout}"
|
||||
${riverctl} map normal Super+Control H send-layout-cmd ${kile_namespace} "focused ${left_layout}"
|
||||
${riverctl} map normal Super+Control L send-layout-cmd ${kile_namespace} "focused ${right_layout}"
|
||||
${riverctl} map normal Super+Control D send-layout-cmd ${kile_namespace} "focused ${deck_layout}"
|
||||
${riverctl} map normal Super+Control F send-layout-cmd ${kile_namespace} "focused ${full_layout}"
|
||||
${riverctl} map normal Super+Control W send-layout-cmd ${kile_namespace} "focused ${wide_layout}"
|
||||
${riverctl} map normal Super+Control C send-layout-cmd ${kile_namespace} "focused ${column_layout}"
|
||||
${riverctl} map normal Super+Shift Space send-layout-cmd ${kile_namespace} "focused ${default_layout}"
|
||||
|
||||
${riverctl} default-layout ${kile_namespace}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
# usage: bemenu [options]
|
||||
# Options
|
||||
# -h, --help display this help and exit.
|
||||
# -v, --version display version.
|
||||
# -i, --ignorecase match items case insensitively.
|
||||
# -F, --filter filter entries for a given string.
|
||||
# -w, --wrap wraps cursor selection.
|
||||
# -l, --list list items vertically with the given number of lines.
|
||||
# -p, --prompt defines the prompt text to be displayed.
|
||||
# -P, --prefix text to show before highlighted item.
|
||||
# -I, --index select item at index automatically.
|
||||
# -x, --password hide input.
|
||||
# -s, --no-spacing disable the title spacing on entries.
|
||||
# --scrollbar display scrollbar. (none (default), always, autohide)
|
||||
# --ifne only display menu if there are items.
|
||||
# --fork always fork. (bemenu-run)
|
||||
# --no-exec do not execute command. (bemenu-run)
|
||||
#
|
||||
# Use BEMENU_BACKEND env variable to force backend:
|
||||
# curses ncurses based terminal backend
|
||||
# wayland wayland backend
|
||||
# x11 x11 backend
|
||||
#
|
||||
# If BEMENU_BACKEND is empty, one of the GUI backends is selected automatically.
|
||||
#
|
||||
# Backend specific options
|
||||
# c = ncurses, w == wayland, x == x11
|
||||
# (...) At end of help indicates the backend support for option.
|
||||
#
|
||||
# -b, --bottom appears at the bottom of the screen. (wx)
|
||||
# -c, --center appears at the center of the screen. (wx)
|
||||
# -f, --grab show the menu before reading stdin. (wx)
|
||||
# -n, --no-overlap adjust geometry to not overlap with panels. (w)
|
||||
# -m, --monitor index of monitor where menu will appear. (wx)
|
||||
# -H, --line-height defines the height to make each menu line (0 = default height). (wx)
|
||||
# -M, --margin defines the empty space on either side of the menu. (wx)
|
||||
# -W, --width-factor defines the relative width factor of the menu (from 0 to 1). (wx)
|
||||
# -B, --border defines the width of the border in pixels around the menu. (wx)
|
||||
# --ch defines the height of the cursor (0 = scales with line height). (wx)
|
||||
# --cw defines the width of the cursor. (wx)
|
||||
# --hp defines the horizontal padding for the entries in single line mode. (wx)
|
||||
# --fn defines the font to be used ('name [size]'). (wx)
|
||||
# --tb defines the title background color. (wx)
|
||||
# --tf defines the title foreground color. (wx)
|
||||
# --fb defines the filter background color. (wx)
|
||||
# --ff defines the filter foreground color. (wx)
|
||||
# --nb defines the normal background color. (wx)
|
||||
# --nf defines the normal foreground color. (wx)
|
||||
# --hb defines the highlighted background color. (wx)
|
||||
# --hf defines the highlighted foreground color. (wx)
|
||||
# --fbb defines the feedback background color. (wx)
|
||||
# --fbf defines the feedback foreground color. (wx)
|
||||
# --sb defines the selected background color. (wx)
|
||||
# --sf defines the selected foreground color. (wx)
|
||||
# --ab defines the alternating background color. (wx)
|
||||
# --af defines the alternating foreground color. (wx)
|
||||
# --scb defines the scrollbar background color. (wx)
|
||||
# --scf defines the scrollbar foreground color. (wx)
|
||||
# --bdr defines the border color. (wx)
|
||||
|
||||
let
|
||||
bemenuColors = {
|
||||
titleBackground = "#282828E0";
|
||||
titleForeground = "#fbf1c7";
|
||||
filterBackground = "#282828E0";
|
||||
filterForeground = "#ebdbb2";
|
||||
normalBackground = "#282828E0";
|
||||
normalForeground = "#ebdbb2";
|
||||
highlightedBackground = "#458588E0";
|
||||
highlightedForeground = "#fbf1c7";
|
||||
scrollbarBackground = "#282828E0";
|
||||
scrollbarForeground = "#458588E0";
|
||||
};
|
||||
in {
|
||||
home.packages = [ pkgs.bemenu ];
|
||||
home.sessionVariables.BEMENU_OPTS = ''
|
||||
--ignorecase \
|
||||
--list 20 \
|
||||
--prompt '❯' \
|
||||
--scrollbar none \
|
||||
--wrap \
|
||||
--scrollbar autohide \
|
||||
--no-overlap \
|
||||
--monitor all \
|
||||
--fn 'Inter 13px' \
|
||||
--tb '${bemenuColors.titleBackground}' \
|
||||
--tf '${bemenuColors.titleForeground}' \
|
||||
--fb '${bemenuColors.filterBackground}' \
|
||||
--ff '${bemenuColors.filterForeground}' \
|
||||
--nb '${bemenuColors.normalBackground}' \
|
||||
--ab '${bemenuColors.normalBackground}' \
|
||||
--nf '${bemenuColors.normalForeground}' \
|
||||
--af '${bemenuColors.normalForeground}' \
|
||||
--hb '${bemenuColors.highlightedBackground}' \
|
||||
--hf '${bemenuColors.highlightedForeground}' \
|
||||
--scb '${bemenuColors.scrollbarBackground}' \
|
||||
--scf '${bemenuColors.scrollbarForeground}'
|
||||
'';
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./sway.nix ./waybar.nix ./bemenu.nix ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
swaylock
|
||||
swayidle
|
||||
wl-clipboard
|
||||
wtype
|
||||
brightnessctl
|
||||
foot
|
||||
];
|
||||
|
||||
programs.mako = {
|
||||
enable = true;
|
||||
actions = true;
|
||||
anchor = "top-right";
|
||||
backgroundColor = "#282828E6";
|
||||
borderColor = "#458588";
|
||||
borderRadius = 0;
|
||||
borderSize = 1;
|
||||
font = "Inter 10";
|
||||
icons = true;
|
||||
textColor = "#ebdbb2";
|
||||
defaultTimeout = 5000;
|
||||
};
|
||||
|
||||
home.file.".config/swaylock/config".text = ''
|
||||
ignore-empty-password
|
||||
font=Inter
|
||||
|
||||
color=282828E6
|
||||
inside-color=504945
|
||||
ring-color=504945
|
||||
line-color=504945
|
||||
separator-color=504945
|
||||
|
||||
inside-clear-color=FE8019
|
||||
line-clear-color=FE8019
|
||||
ring-clear-color=FE8019
|
||||
|
||||
inside-ver-color=458588
|
||||
line-ver-color=458588
|
||||
ring-ver-color=458588
|
||||
|
||||
inside-wrong-color=CC241D
|
||||
line-wrong-color=CC241D
|
||||
ring-wrong-color=CC241D
|
||||
|
||||
key-hl-color=B8BB26
|
||||
bs-hl-color=FB4934
|
||||
|
||||
text-color=282828
|
||||
text-clear-color=282828
|
||||
text-ver-color=282828
|
||||
text-wrong-color=282828
|
||||
'';
|
||||
|
||||
programs.zsh.loginExtra = ''
|
||||
[[ -z "''${DISPLAY}" ]] && [[ "$(tty)" = "/dev/tty1" ]] && \
|
||||
exec ${pkgs.sway}/bin/sway 1> "${config.home.homeDirectory}/.sway-errors" 2>&1
|
||||
'';
|
||||
}
|
|
@ -1,172 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.wayland.windowManager.sway.config;
|
||||
pactl = "${pkgs.pulseaudio}/bin/pactl";
|
||||
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
|
||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||
wallpapers = "${config.home.homeDirectory}/Images/wallpapers/enabled";
|
||||
|
||||
# # todo: do it properly like in https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/security/pass/rofi-pass.nix
|
||||
# tessenSrc = builtins.fetchTarball {
|
||||
# url =
|
||||
# "https://github.com/ayushnix/tessen/releases/download/v1.3.1/tessen-1.3.1.tar.gz";
|
||||
# };
|
||||
|
||||
# tessen = pkgs.runCommandLocal "tessen" {
|
||||
# nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
# } ''
|
||||
# install -m755 ${tessenSrc}/tessen -D $out/bin/tessen
|
||||
# patchShebangs $out/bin/tessen
|
||||
# wrapProgram $out/bin/tessen \
|
||||
# --prefix PATH: ${pkgs.lib.makeBinPath [ pkgs.bash ]}
|
||||
# '';
|
||||
|
||||
in {
|
||||
# home.packages = [ tessen ];
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
config = {
|
||||
modifier = "Mod4";
|
||||
terminal = "alacritty";
|
||||
menu = "${pkgs.bemenu}/bin/bemenu-run";
|
||||
|
||||
left = "h";
|
||||
down = "j";
|
||||
up = "k";
|
||||
right = "l";
|
||||
|
||||
output = {
|
||||
"LVDS-1" = {
|
||||
resolution = "1366x768";
|
||||
bg =
|
||||
"`${pkgs.findutils}/bin/find ${wallpapers} -type f | ${pkgs.coreutils}/bin/shuf -n 1` fill";
|
||||
};
|
||||
};
|
||||
|
||||
input = {
|
||||
"type:keyboard" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
xkb_options = "caps:escape";
|
||||
};
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
|
||||
"${cfg.modifier}+Shift+c" = "kill";
|
||||
"${cfg.modifier}+r" = "exec ${cfg.menu}";
|
||||
"${cfg.modifier}+Shift+r" = "reload";
|
||||
"${cfg.modifier}+Shift+Escape" = "exec ${pkgs.sway}/bin/swaymsg exit";
|
||||
"${cfg.modifier}+Escape" = "exec ${pkgs.swaylock}/bin/swaylock";
|
||||
|
||||
"${cfg.modifier}+${cfg.left}" = "focus left";
|
||||
"${cfg.modifier}+${cfg.down}" = "focus down";
|
||||
"${cfg.modifier}+${cfg.up}" = "focus up";
|
||||
"${cfg.modifier}+${cfg.right}" = "focus right";
|
||||
|
||||
"${cfg.modifier}+Shift+${cfg.left}" = "move left";
|
||||
"${cfg.modifier}+Shift+${cfg.down}" = "move down";
|
||||
"${cfg.modifier}+Shift+${cfg.up}" = "move up";
|
||||
"${cfg.modifier}+Shift+${cfg.right}" = "move right";
|
||||
|
||||
"${cfg.modifier}+Control+${cfg.left}" = "move workspace to output left";
|
||||
"${cfg.modifier}+Control+${cfg.down}" = "move workspace to output down";
|
||||
"${cfg.modifier}+Control+${cfg.up}" = "move workspace to output up";
|
||||
"${cfg.modifier}+Control+${cfg.right}" =
|
||||
"move workspace to output right";
|
||||
|
||||
"${cfg.modifier}+Shift+w" = "move window to output left";
|
||||
"${cfg.modifier}+Shift+e" = "move window to output right";
|
||||
"${cfg.modifier}+w" = "focus output left";
|
||||
"${cfg.modifier}+e" = "focus output right";
|
||||
|
||||
"${cfg.modifier}+1" = "workspace number 1";
|
||||
"${cfg.modifier}+2" = "workspace number 2";
|
||||
"${cfg.modifier}+3" = "workspace number 3";
|
||||
"${cfg.modifier}+4" = "workspace number 4";
|
||||
"${cfg.modifier}+5" = "workspace number 5";
|
||||
"${cfg.modifier}+6" = "workspace number 6";
|
||||
"${cfg.modifier}+7" = "workspace number 7";
|
||||
"${cfg.modifier}+8" = "workspace number 8";
|
||||
"${cfg.modifier}+9" = "workspace number 9";
|
||||
|
||||
"${cfg.modifier}+Shift+1" = "move container to workspace number 1";
|
||||
"${cfg.modifier}+Shift+2" = "move container to workspace number 2";
|
||||
"${cfg.modifier}+Shift+3" = "move container to workspace number 3";
|
||||
"${cfg.modifier}+Shift+4" = "move container to workspace number 4";
|
||||
"${cfg.modifier}+Shift+5" = "move container to workspace number 5";
|
||||
"${cfg.modifier}+Shift+6" = "move container to workspace number 6";
|
||||
"${cfg.modifier}+Shift+7" = "move container to workspace number 7";
|
||||
"${cfg.modifier}+Shift+8" = "move container to workspace number 8";
|
||||
"${cfg.modifier}+Shift+9" = "move container to workspace number 9";
|
||||
|
||||
"${cfg.modifier}+b" = "splith";
|
||||
"${cfg.modifier}+v" = "splitv";
|
||||
|
||||
"${cfg.modifier}+s" = "layout stacking";
|
||||
"${cfg.modifier}+t" = "layout tabbed";
|
||||
# "${cfg.modifier}+e" = "layout toggle split";
|
||||
|
||||
"${cfg.modifier}+m" = "fullscreen toggle";
|
||||
|
||||
"${cfg.modifier}+a" = "focus parent";
|
||||
"${cfg.modifier}+f" = "floating toggle";
|
||||
# "${cfg.modifier}+space" = "focus mode_toggle";
|
||||
"${cfg.modifier}+d" = "mode resize";
|
||||
|
||||
"${cfg.modifier}+space" = "layout toggle all";
|
||||
"${cfg.modifier}+Shift+space" = "layout default";
|
||||
|
||||
# "${cfg.modifier}+p" = "exec ${tessen}/bin/tessen";
|
||||
|
||||
"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";
|
||||
"XF86AudioMicMute" =
|
||||
"exec ${pactl} set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
"XF86MonBrightnessDown" = "exec ${brightnessctl} set 5%-";
|
||||
"XF86MonBrightnessUp" = "exec ${brightnessctl} set +5%";
|
||||
"XF86AudioPlay" = "exec ${playerctl} play-pause";
|
||||
"XF86AudioNext" = "exec ${playerctl} next";
|
||||
"XF86AudioPrev" = "exec ${playerctl} previous";
|
||||
"XF86Search" = "exec ${cfg.menu}";
|
||||
};
|
||||
|
||||
colors = {
|
||||
|
||||
focused = rec {
|
||||
childBorder = "#458588";
|
||||
background = "#282828";
|
||||
text = "#fbf1c7";
|
||||
indicator = "#3c3836";
|
||||
border = "#83a598";
|
||||
};
|
||||
|
||||
unfocused = rec {
|
||||
childBorder = "#504945";
|
||||
background = "#282828";
|
||||
text = "#ebdbb2";
|
||||
indicator = "#3c3836";
|
||||
border = "#bdae93";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
focus.followMouse = true;
|
||||
window.border = 3;
|
||||
workspaceAutoBackAndForth = true;
|
||||
|
||||
bars = [ ];
|
||||
|
||||
startup = [{
|
||||
command = "${pkgs.autotiling}/bin/autotiling";
|
||||
always = true;
|
||||
}];
|
||||
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,150 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = [
|
||||
{
|
||||
modules-left = [ "sway/workspaces" ];
|
||||
modules-center = [ "sway/window" ];
|
||||
modules-right = [ "tray" "pulseaudio" "battery" "network" "clock" ];
|
||||
modules = {
|
||||
clock.format = "{: %m/%d <span color=\"#a89984\">|</span> %H:%M}";
|
||||
network = {
|
||||
format-icons = [
|
||||
"<span color=\"#fb4944\">直</span>"
|
||||
"<span color=\"#fabd2f\">直</span>"
|
||||
"<span color=\"#b8bb26\">直</span>"
|
||||
];
|
||||
format = "({ifname})";
|
||||
format-wifi = "{icon} {signalStrength}";
|
||||
format-disconnected = "<span color=\"#a89974\">睊</span>";
|
||||
format-ethernet = "";
|
||||
};
|
||||
battery = {
|
||||
states = {
|
||||
good = 95;
|
||||
warning = 50;
|
||||
critical = 20;
|
||||
};
|
||||
format-icons = {
|
||||
discharging = [
|
||||
"<span color=\"#fb4944\"></span>"
|
||||
"<span color=\"#fb4944\"></span>"
|
||||
"<span color=\"#fb4944\"></span>"
|
||||
"<span color=\"#fabd2f\"></span>"
|
||||
"<span color=\"#fabd2f\"></span>"
|
||||
"<span color=\"#fabd2f\"></span>"
|
||||
"<span color=\"#b8bb26\"></span>"
|
||||
"<span color=\"#b8bb26\"></span>"
|
||||
"<span color=\"#b8bb26\"></span>"
|
||||
]; #
|
||||
charging = [
|
||||
"<span color=\"#fb4944\"></span>"
|
||||
"<span color=\"#fb4944\"></span>"
|
||||
"<span color=\"#fabd2f\"></span>"
|
||||
"<span color=\"#fabd2f\"></span>"
|
||||
"<span color=\"#b8bb26\"></span>"
|
||||
"<span color=\"#b8bb26\"></span>"
|
||||
]; #
|
||||
};
|
||||
format = " {capacity}";
|
||||
format-full = "";
|
||||
format-good-charging = "";
|
||||
format-plugged = "";
|
||||
format-charging = "{icon} {capacity}";
|
||||
format-discharging = "{icon} {capacity} ({time})";
|
||||
interval = 5;
|
||||
};
|
||||
pulseaudio = {
|
||||
states = {
|
||||
high = 101;
|
||||
very_high = 111;
|
||||
};
|
||||
format-icons = [
|
||||
"<span color=\"#a89974\">奄</span>"
|
||||
"<span color=\"#83a587\">奔</span>"
|
||||
"<span color=\"#b8bb26\">墳</span>"
|
||||
];
|
||||
format = "{icon} {volume}";
|
||||
format-bluetooth = "{icon} {volume}";
|
||||
format-muted = "ﱝ";
|
||||
};
|
||||
|
||||
tray.icon-size = 14;
|
||||
};
|
||||
}
|
||||
];
|
||||
style = ''
|
||||
* {
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
font-family: Inter, "mplus Nerd Font";
|
||||
font-size: 13px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: #282828;
|
||||
color: #ebdbb2;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#window {
|
||||
color: #fbf1c7;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: #458588;
|
||||
color: #fbf1c7;
|
||||
}
|
||||
|
||||
#tray,
|
||||
#pulseaudio,
|
||||
#battery,
|
||||
#network,
|
||||
#cpu,
|
||||
#memory,
|
||||
#clock {
|
||||
color: #fbf1c7;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
#tray,
|
||||
#pulseaudio,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#network {
|
||||
border-right: 1px solid #a89984;
|
||||
}
|
||||
|
||||
#pulseaudio.high {
|
||||
color: #fabd2f;
|
||||
}
|
||||
|
||||
#pulseaudio.very_high {
|
||||
color: #fb4944;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
color: #a8997a;
|
||||
}
|
||||
|
||||
'';
|
||||
systemd.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
ext_monitor_fingerprint =
|
||||
"00ffffffffffff0009d1e67845540000261d0103803c22782e4825a756529c270f5054a56b80d1c0b300a9c08180810081c001010101023a801871382d40582c450056502100001e000000ff004c394b30303333313031510a20000000fd00324c1e5311000a202020202020000000fc0042656e51204757323738300a200117020322f14f901f04130312021101140607151605230907078301000065030c001000023a801871382d40582c450056502100001f011d8018711c1620582c250056502100009f011d007251d01e206e28550056502100001e8c0ad08a20e02d10103e960056502100001800000000000000000000000000000000000000000047";
|
||||
lvds_fingerprint =
|
||||
"00ffffffffffff0030e4d8020000000000160103801c1078ea8855995b558f261d505400000001010101010101010101010101010101601d56d85000183030404700159c1000001b000000000000000000000000000000000000000000fe004c4720446973706c61790a2020000000fe004c503132355748322d534c42330059";
|
||||
lvds_config = {
|
||||
enable = true;
|
||||
crtc = 0;
|
||||
mode = "1366x768";
|
||||
position = "0x0";
|
||||
rate = "60.00";
|
||||
};
|
||||
hdmi_config = {
|
||||
enable = true;
|
||||
primary = true;
|
||||
crtc = 0;
|
||||
mode = "1920x1080";
|
||||
position = "0x0";
|
||||
rate = "60.00";
|
||||
};
|
||||
in {
|
||||
imports = [ ./common.nix ];
|
||||
programs.autorandr.profiles = {
|
||||
|
||||
default = {
|
||||
fingerprint."LVDS-1" = lvds_fingerprint;
|
||||
config."LVDS-1" = lvds_config;
|
||||
};
|
||||
|
||||
docked = {
|
||||
fingerprint = {
|
||||
"HDMI-2" = ext_monitor_fingerprint;
|
||||
"LVDS-1" = lvds_fingerprint;
|
||||
};
|
||||
config = {
|
||||
"LVDS-1" = lvds_config // { position = "1920x0"; };
|
||||
"HDMI-2" = hdmi_config;
|
||||
};
|
||||
};
|
||||
docked_closed = {
|
||||
fingerprint."HDMI-2" = ext_monitor_fingerprint;
|
||||
config."HDMI-2" = hdmi_config;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.autorandr = {
|
||||
enable = true;
|
||||
hooks.postswitch = {
|
||||
"change-background" =
|
||||
"/run/current-system/sw/bin/systemctl --user restart random-background.service";
|
||||
"restart-xmonad" = "${pkgs.xmonad-with-packages}/bin/xmonad --restart";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
ext_monitor_fingerprint =
|
||||
"00ffffffffffff0009d1e67845540000261d0103803c22782e4825a756529c270f5054a56b80d1c0b300a9c08180810081c001010101023a801871382d40582c450056502100001e000000ff004c394b30303333313031510a20000000fd00324c1e5311000a202020202020000000fc0042656e51204757323738300a200117020322f14f901f04130312021101140607151605230907078301000065030c001000023a801871382d40582c450056502100001f011d8018711c1620582c250056502100009f011d007251d01e206e28550056502100001e8c0ad08a20e02d10103e960056502100001800000000000000000000000000000000000000000047";
|
||||
edp_fingerprint =
|
||||
"00ffffffffffff0030e46e040000000000180104a52615780a0bb5a35955a0270c5054000000010101010101010101010101010101012e3680a070381f40302035007ed71000001b1f2480a070381f40302035007ed71000001b00000000000000000000000000000000000000000002000a30ff0a3c96191d4896000000003f";
|
||||
edp_config = {
|
||||
enable = true;
|
||||
crtc = 0;
|
||||
# mode = "1368x768";
|
||||
mode = "1920x1080";
|
||||
# position = "1920x0";
|
||||
position = "0x0";
|
||||
rate = "60.00";
|
||||
# rotate = "left";
|
||||
};
|
||||
hdmi_config = {
|
||||
enable = true;
|
||||
primary = true;
|
||||
crtc = 0;
|
||||
mode = "1920x1080";
|
||||
position = "0x0";
|
||||
rate = "60.00";
|
||||
};
|
||||
in {
|
||||
imports = [ ./common.nix ];
|
||||
programs.autorandr.profiles = {
|
||||
|
||||
default = {
|
||||
fingerprint = {
|
||||
"HDMI-1-1" = ext_monitor_fingerprint;
|
||||
"eDP-1-1" = edp_fingerprint;
|
||||
};
|
||||
config = {
|
||||
"HDMI-1-1" = hdmi_config;
|
||||
"eDP-1-1" = edp_config;
|
||||
};
|
||||
};
|
||||
|
||||
default_intel = {
|
||||
fingerprint = {
|
||||
"HDMI-1" = ext_monitor_fingerprint;
|
||||
"eDP-1" = edp_fingerprint;
|
||||
};
|
||||
config = {
|
||||
"HDMI-1" = hdmi_config;
|
||||
"eDP-1" = edp_config;
|
||||
};
|
||||
};
|
||||
|
||||
nomonitor_intel = {
|
||||
fingerprint."eDP-1" = edp_fingerprint;
|
||||
config."eDP-1" = edp_config // { position = "0x0"; };
|
||||
};
|
||||
onlymonitor_intel = {
|
||||
fingerprint = { "HDMI-1" = ext_monitor_fingerprint; };
|
||||
config = { "HDMI-1" = hdmi_config; };
|
||||
};
|
||||
nomonitor_nvidia = {
|
||||
fingerprint."eDP-1-1" = edp_fingerprint;
|
||||
config."eDP-1-1" = edp_config // { position = "0x0"; };
|
||||
};
|
||||
onlymonitor_nvidia = {
|
||||
fingerprint = { "HDMI-1-1" = ext_monitor_fingerprint; };
|
||||
config = { "HDMI-1-1" = hdmi_config; };
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
desktopConfig = import ./desktop_config.nix {
|
||||
config = config;
|
||||
pkgs = pkgs;
|
||||
};
|
||||
in desktopConfig // {
|
||||
imports = [ ./common.nix ./autorandr/capibara.nix ];
|
||||
home.file.".xinitrc".text = ''
|
||||
exec ${config.home.homeDirectory}/.xsession
|
||||
'';
|
||||
|
||||
services.picom = {
|
||||
enable = true;
|
||||
fade = false;
|
||||
shadow = true;
|
||||
shadowExclude = [ "name ~= 'stalonetray'" ];
|
||||
vSync = true;
|
||||
};
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
obtoxmd = pkgs.callPackage ./obtoxmd.nix { inherit config pkgs; };
|
||||
in {
|
||||
imports = [ ./rofi.nix ./misc.nix ];
|
||||
home = {
|
||||
keyboard = {
|
||||
layout = "us";
|
||||
options = [ "caps:escape" ];
|
||||
variant = "altgr-intl";
|
||||
};
|
||||
packages = [ obtoxmd pkgs.openbox pkgs.xsel ];
|
||||
file = {
|
||||
".xmonad/icons/3cols.xpm".source = ./icons/3cols.xpm;
|
||||
".xmonad/icons/float.xpm".source = ./icons/float.xpm;
|
||||
".xmonad/icons/full.xpm".source = ./icons/full.xpm;
|
||||
".xmonad/icons/grid.xpm".source = ./icons/grid.xpm;
|
||||
".xmonad/icons/mtall.xpm".source = ./icons/mtall.xpm;
|
||||
".xmonad/icons/tabs.xpm".source = ./icons/tabs.xpm;
|
||||
".xmonad/icons/tall.xpm".source = ./icons/tall.xpm;
|
||||
};
|
||||
};
|
||||
|
||||
xsession = {
|
||||
enable = true;
|
||||
initExtra = ''
|
||||
xset s off -dpms
|
||||
${pkgs.autorandr}/bin/autorandr --change --default default
|
||||
export WINIT_X11_SCALE_FACTOR=1.33
|
||||
'';
|
||||
};
|
||||
|
||||
services.stalonetray = {
|
||||
enable = true;
|
||||
config = {
|
||||
icon_size = 16;
|
||||
background = "#282828"; # todo
|
||||
sticky = true;
|
||||
geometry = "3x1-350+0";
|
||||
icon_gravity = "E";
|
||||
grow_gravity = "E";
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh.loginExtra = ''
|
||||
[[ -z "''${DISPLAY}" ]] && [[ "$(tty)" = "/dev/tty1" ]] && \
|
||||
exec "${pkgs.xorg.xinit}/bin/startx" 1> "${config.home.homeDirectory}/.xsession-errors" 2>&1
|
||||
'';
|
||||
|
||||
}
|
|
@ -1,249 +0,0 @@
|
|||
{ config, pkgs, fontSize ? "10", monoFontSize ? "9", ... }:
|
||||
|
||||
let
|
||||
gruvbox-dark = {
|
||||
bg = "#282828";
|
||||
bg1 = "#3c3836";
|
||||
bg2 = "#504945";
|
||||
|
||||
fg = "#ebdbb2";
|
||||
fg0 = "#fbf1c7";
|
||||
fg3 = "#bdae93";
|
||||
|
||||
red = "#cc241d";
|
||||
green = "#98971a";
|
||||
yellow = "#d79921";
|
||||
blue = "#458588";
|
||||
purple = "#b16286";
|
||||
aqua = "#689d6a";
|
||||
gray = "#a89984";
|
||||
|
||||
gray2 = "#928374";
|
||||
red-light = "#fb4934";
|
||||
green-light = "#b8bb26";
|
||||
yellow-light = "#fabd2f";
|
||||
blue-light = "#83a598";
|
||||
purple-light = "#d3869b";
|
||||
aqua-light = "#8ec07c";
|
||||
|
||||
};
|
||||
colors = {
|
||||
fg = gruvbox-dark.fg;
|
||||
selFg = gruvbox-dark.fg0;
|
||||
bg = gruvbox-dark.bg;
|
||||
sel = gruvbox-dark.blue;
|
||||
inactive = gruvbox-dark.gray;
|
||||
inactiveBorder = gruvbox-dark.bg2;
|
||||
urgent = gruvbox-dark.red;
|
||||
};
|
||||
rofiTransparency = "96";
|
||||
font = {
|
||||
name = "Inter";
|
||||
size = fontSize;
|
||||
};
|
||||
monoFont = {
|
||||
name = "Hack";
|
||||
size = monoFontSize;
|
||||
};
|
||||
|
||||
hmonitors = pkgs.haskellPackages.callPackage ./hmonitors.nix { };
|
||||
|
||||
hmonitorsQuery = "${hmonitors}/bin/hmonitors-query";
|
||||
acpi = "${pkgs.acpi}/bin/acpi";
|
||||
nmcli = "${pkgs.networkmanager}/bin/nmcli";
|
||||
pamixer = "${pkgs.pamixer}/bin/pamixer";
|
||||
|
||||
in {
|
||||
|
||||
xsession.windowManager.xmonad = {
|
||||
enable = true;
|
||||
enableContribAndExtras = true;
|
||||
extraPackages = haskellPackages: [
|
||||
haskellPackages.monad-logger
|
||||
haskellPackages.dbus
|
||||
];
|
||||
config = ./xmonad/xmonad.hs;
|
||||
libFiles = {
|
||||
"Bindings.hs" = ./xmonad/lib/Bindings.hs;
|
||||
"DefaultConfig.hs" = ./xmonad/lib/DefaultConfig.hs;
|
||||
"Layouts.hs" = ./xmonad/lib/Layouts.hs;
|
||||
"ManageHook.hs" = ./xmonad/lib/ManageHook.hs;
|
||||
"Prompts.hs" = ./xmonad/lib/Prompts.hs;
|
||||
"Utils.hs" = ./xmonad/lib/Utils.hs;
|
||||
"Xmobar.hs" = ./xmonad/lib/Xmobar.hs;
|
||||
"HostConfig.hs" = pkgs.writeText "HostConfig.hs" ''
|
||||
module HostConfig
|
||||
( fontConfig
|
||||
, colorConfig
|
||||
, FontConfig (FontConfig)
|
||||
, fontSize
|
||||
, fontName
|
||||
, ColorConfig (ColorConfig)
|
||||
, fgColor
|
||||
, selFgColor
|
||||
, bgColor
|
||||
, selColor
|
||||
, inactiveColor
|
||||
, inactiveBorderColor
|
||||
, urgentColor
|
||||
) where
|
||||
|
||||
fontConfig :: FontConfig
|
||||
fontConfig = FontConfig
|
||||
{ fontSize = ${font.size}
|
||||
, fontName = "${font.name}"
|
||||
}
|
||||
|
||||
colorConfig :: ColorConfig
|
||||
colorConfig = ColorConfig
|
||||
{ fgColor = "${colors.fg}"
|
||||
, selFgColor = "${colors.selFg}"
|
||||
, bgColor = "${colors.bg}"
|
||||
, selColor = "${colors.sel}"
|
||||
, inactiveColor = "${colors.inactive}"
|
||||
, inactiveBorderColor = "${colors.inactiveBorder}"
|
||||
, urgentColor = "${colors.urgent}"
|
||||
}
|
||||
|
||||
data FontConfig = FontConfig
|
||||
{ fontSize :: Int
|
||||
, fontName :: String
|
||||
} deriving Show
|
||||
|
||||
data ColorConfig = ColorConfig
|
||||
{ fgColor :: String
|
||||
, selFgColor :: String
|
||||
, bgColor :: String
|
||||
, selColor :: String
|
||||
, inactiveColor :: String
|
||||
, inactiveBorderColor :: String
|
||||
, urgentColor :: String
|
||||
} deriving Show
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
programs.xmobar = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
Config
|
||||
{ font = "${font.name} ${font.size}"
|
||||
, additionalFonts = ["mplus Nerd Font 12"]
|
||||
, bgColor = "${colors.bg}"
|
||||
, fgColor = "${colors.fg}"
|
||||
, alignSep = "}{"
|
||||
, sepChar = "%"
|
||||
, template = "%StdinReader% }{ %vol%%bat%%net%%date%"
|
||||
, lowerOnStart = True
|
||||
, hideOnStart = False
|
||||
, persistent = True
|
||||
, allDesktops = True
|
||||
, position = TopW L 100
|
||||
, commands =
|
||||
[ Run Com "${hmonitorsQuery}" ["date"] "date" 10
|
||||
, Run Com "${hmonitorsQuery}" ["bat"] "bat" 10
|
||||
-- , Run Com "${hmonitorsQuery}" ["net"] "net" 20
|
||||
, Run Com "${hmonitorsQuery}" ["vol"] "vol" 5
|
||||
, Run StdinReader
|
||||
]
|
||||
}
|
||||
, wmClass = "xmobar"
|
||||
, wmName = "xmobar"
|
||||
, border = NoBorder
|
||||
, borderColor = "${colors.bg}"
|
||||
, pickBroadest = False
|
||||
, alpha = 255
|
||||
, iconRoot = "."
|
||||
'';
|
||||
};
|
||||
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
settings = {
|
||||
global = {
|
||||
font = "${font.name} ${font.size}";
|
||||
format = "<b>%s</b>\\n%b";
|
||||
sort = "yes";
|
||||
indicate_hidden = "yes";
|
||||
alignment = "left";
|
||||
bounce_freq = 0;
|
||||
show_age_threshold = 60;
|
||||
word_wrap = "yes";
|
||||
ignore_newline = "no";
|
||||
geometry = "300x5-30+20";
|
||||
shrink = "yes";
|
||||
transparency = 0;
|
||||
idle_threshold = 10;
|
||||
monitor = 0;
|
||||
follow = "mouse";
|
||||
sticky_history = "yes";
|
||||
history_length = 20;
|
||||
show_indicators = "yes";
|
||||
line_height = 0;
|
||||
separator_height = 2;
|
||||
padding = 8;
|
||||
horizontal_padding = 8;
|
||||
separator_color = "frame";
|
||||
startup_notification = false;
|
||||
dmenu = "${pkgs.rofi}/bin/rofi -dmenu -p dunst:";
|
||||
browser = "${pkgs.firefox}/bin/firefox";
|
||||
icon_position = "left";
|
||||
frame_width = 0;
|
||||
frame_color = colors.inactive;
|
||||
};
|
||||
shortcuts = {
|
||||
close = "ctrl+space";
|
||||
close_all = "ctrl+shift+space";
|
||||
context = "ctrl+shift+period";
|
||||
};
|
||||
urgency_low = {
|
||||
background = "${colors.bg}${rofiTransparency}";
|
||||
foreground = colors.fg;
|
||||
timeout = 10;
|
||||
};
|
||||
urgency_normal = {
|
||||
background = "${colors.sel}${rofiTransparency}";
|
||||
foreground = colors.selFg;
|
||||
timeout = 10;
|
||||
};
|
||||
urgency_critical = {
|
||||
background = "${colors.urgent}${rofiTransparency}";
|
||||
foreground = colors.selFg;
|
||||
timeout = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
font = "${monoFont.name} ${monoFont.size}";
|
||||
default-bg = colors.bg;
|
||||
default-fg = gruvbox-dark.bg1;
|
||||
statusbar-fg = gruvbox-dark.fg3;
|
||||
statusbar-bg = gruvbox-dark.bg2;
|
||||
inputbar-bg = colors.bg;
|
||||
inputbar-fg = colors.sel;
|
||||
notification-bg = colors.bg;
|
||||
notification-fg = colors.sel;
|
||||
notification-error-bg = colors.bg;
|
||||
notification-error-fg = gruvbox-dark.red-light;
|
||||
notification-warning-bg = colors.bg;
|
||||
notification-warning-fg = gruvbox-dark.red-light;
|
||||
highlight-color = gruvbox-dark.yellow-light;
|
||||
highlight-active-color = gruvbox-dark.blue-light;
|
||||
completion-bg = gruvbox-dark.bg1;
|
||||
completion-fg = gruvbox-dark.blue-light;
|
||||
completion-highlight-fg = colors.selFg;
|
||||
completion-highlight-bg = gruvbox-dark.blue-light;
|
||||
recolor-lightcolor = colors.bg;
|
||||
recolor-darkcolor = colors.fg;
|
||||
recolor = false;
|
||||
recolor-keephue = false;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ mkDerivation, base, containers, lib, process, regex-compat, split, time }:
|
||||
mkDerivation {
|
||||
pname = "hmonitors";
|
||||
version = "0.1.0.0";
|
||||
src = builtins.fetchGit {
|
||||
name = "hmonitors";
|
||||
url = "https://git.monotremata.xyz/rilla/hmonitors.git";
|
||||
ref = "main";
|
||||
rev = "a17f3f0e273b44c021d42c68f186fe1ae4149102";
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [ base containers process regex-compat split time ];
|
||||
executableHaskellDepends = [ base ];
|
||||
license = lib.licenses.bsd3;
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
/* XPM */
|
||||
static char *_cols[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 2 1 ",
|
||||
" c #EBDBB2",
|
||||
". c None",
|
||||
/* pixels */
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. "
|
||||
};
|
|
@ -1,24 +0,0 @@
|
|||
/* XPM */
|
||||
static char *float[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 2 1 ",
|
||||
" c #EBDBB2",
|
||||
". c None",
|
||||
/* pixels */
|
||||
".. ",
|
||||
".. ",
|
||||
".. ",
|
||||
".. ",
|
||||
".. ",
|
||||
".. ",
|
||||
".. ",
|
||||
"......... ",
|
||||
"......... ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .........",
|
||||
" ........."
|
||||
};
|
|
@ -1,23 +0,0 @@
|
|||
/* XPM */
|
||||
static char *full[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 1 1 ",
|
||||
" c #EBDBB2",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "
|
||||
};
|
|
@ -1,24 +0,0 @@
|
|||
/* XPM */
|
||||
static char *grid[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 2 1 ",
|
||||
" c #EBDBB2",
|
||||
". c None",
|
||||
/* pixels */
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
"................",
|
||||
"................",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. "
|
||||
};
|
|
@ -1,24 +0,0 @@
|
|||
/* XPM */
|
||||
static char *mtall[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 2 1 ",
|
||||
" c #EBDBB2",
|
||||
". c None",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
"................",
|
||||
"................",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. "
|
||||
};
|
|
@ -1,24 +0,0 @@
|
|||
/* XPM */
|
||||
static char *tabs[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 2 1 ",
|
||||
" c #EBDBB2",
|
||||
". c None",
|
||||
/* pixels */
|
||||
" ",
|
||||
" .............. ",
|
||||
" ",
|
||||
"................",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "
|
||||
};
|
|
@ -1,24 +0,0 @@
|
|||
/* XPM */
|
||||
static char *tall[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 2 1 ",
|
||||
" c #EBDBB2",
|
||||
". c None",
|
||||
/* pixels */
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .........",
|
||||
" .........",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .........",
|
||||
" .........",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. "
|
||||
};
|
|
@ -1,24 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let wallpapers = "${config.home.homeDirectory}/Images/wallpapers/enabled";
|
||||
in {
|
||||
services.random-background = {
|
||||
enable = true;
|
||||
enableXinerama = true;
|
||||
display = "fill";
|
||||
imageDirectory = wallpapers;
|
||||
};
|
||||
|
||||
systemd.user.services.xbanish = {
|
||||
Unit = {
|
||||
Description = "Xbanish";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.xbanish}/bin/xbanish";
|
||||
};
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ config, pkgs, ...}:
|
||||
|
||||
let
|
||||
shell = "${pkgs.dash}/bin/dash";
|
||||
xmonad = "${pkgs.haskellPackages.xmonad}/bin/xmonad";
|
||||
openbox = "${pkgs.openbox}/bin/openbox";
|
||||
in
|
||||
pkgs.writeScriptBin "obtoxmd" ''
|
||||
#!${shell}
|
||||
${openbox}
|
||||
${xmonad}
|
||||
''
|
|
@ -1,140 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
gruvbox-dark = {
|
||||
bg = "#282828";
|
||||
bg1 = "#3c3836";
|
||||
bg2 = "#504945";
|
||||
|
||||
fg = "#ebdbb2";
|
||||
fg0 = "#fbf1c7";
|
||||
fg3 = "#bdae93";
|
||||
|
||||
red = "#cc241d";
|
||||
green = "#98971a";
|
||||
yellow = "#d79921";
|
||||
blue = "#458588";
|
||||
purple = "#b16286";
|
||||
aqua = "#689d6a";
|
||||
gray = "#a89984";
|
||||
|
||||
gray2 = "#928374";
|
||||
red-light = "#fb4934";
|
||||
green-light = "#b8bb26";
|
||||
yellow-light = "#fabd2f";
|
||||
blue-light = "#83a598";
|
||||
purple-light = "#d3869b";
|
||||
aqua-light = "#8ec07c";
|
||||
|
||||
};
|
||||
colors = {
|
||||
fg = gruvbox-dark.fg;
|
||||
selFg = gruvbox-dark.fg0;
|
||||
bg = gruvbox-dark.bg;
|
||||
sel = gruvbox-dark.blue;
|
||||
inactive = gruvbox-dark.gray;
|
||||
inactiveBorder = gruvbox-dark.bg2;
|
||||
urgent = gruvbox-dark.red;
|
||||
};
|
||||
rofiTransparency = "96";
|
||||
font = {
|
||||
name = "Inter";
|
||||
size = "10";
|
||||
};
|
||||
monoFont = {
|
||||
name = "Hack";
|
||||
size = "9";
|
||||
};
|
||||
|
||||
in {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
font = "${font.name} ${font.size}";
|
||||
extraConfig = {
|
||||
display-run = " ";
|
||||
# display-drun = " ";
|
||||
display-window = " ";
|
||||
drun-display-format = "{name}";
|
||||
modi = "window,run,drun,ssh";
|
||||
show-icons = false;
|
||||
};
|
||||
theme = let inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
"*" = {
|
||||
background-color = mkLiteral "transparent";
|
||||
border = 0;
|
||||
margin = 0;
|
||||
padding = 0;
|
||||
spacing = 0;
|
||||
};
|
||||
element = {
|
||||
padding = 2;
|
||||
orientation = "vertical";
|
||||
};
|
||||
"element-text" = { text-color = mkLiteral colors.fg; };
|
||||
|
||||
"element selected" = {
|
||||
text-color = mkLiteral colors.selFg;
|
||||
background-color = mkLiteral "${colors.sel}A0";
|
||||
};
|
||||
entry = {
|
||||
padding = mkLiteral "0 0 6 3";
|
||||
text-color = mkLiteral colors.fg;
|
||||
};
|
||||
inputbar = {
|
||||
children = map mkLiteral [ "prompt" "entry" ];
|
||||
border = mkLiteral "0 0 1 0";
|
||||
border-color = mkLiteral gruvbox-dark.gray2;
|
||||
margin = mkLiteral "0 0 5 0";
|
||||
};
|
||||
listview = {
|
||||
columns = 1;
|
||||
fixed-height = false;
|
||||
};
|
||||
mainbox = {
|
||||
children = map mkLiteral [ "inputbar" "listview" ];
|
||||
margin = 6;
|
||||
};
|
||||
prompt = {
|
||||
padding = mkLiteral "0 0 0 6";
|
||||
text-color = mkLiteral colors.fg;
|
||||
background-color = mkLiteral "transparent";
|
||||
};
|
||||
window = {
|
||||
transparency = "real";
|
||||
background-color = mkLiteral "${colors.bg}D0";
|
||||
y-offset = mkLiteral "-25%";
|
||||
border = 2;
|
||||
border-color = mkLiteral colors.sel;
|
||||
};
|
||||
};
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||
pass = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
URL_field='url'
|
||||
USERNAME_field='user'
|
||||
AUTOTYPE_field='autotype'
|
||||
delay=2
|
||||
wait=0.2
|
||||
xdotool_delay=12
|
||||
EDITOR='gvim -f'
|
||||
BROWSER='xdg-open'
|
||||
default_do='typePass' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
|
||||
auto_enter='false'
|
||||
notify='false'
|
||||
default_autotype='user :tab pass'
|
||||
help_color="${gruvbox-dark.blue-light}"
|
||||
clip=primary
|
||||
clip_clear=45
|
||||
edit_new_pass="true"
|
||||
default_user=":filename"
|
||||
autotype="Alt+1"
|
||||
type_user="Alt+u"
|
||||
type_pass="Alt+p"
|
||||
copy_name=""
|
||||
copy_pass=""
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
desktopConfig = import ./desktop_config.nix {
|
||||
config = config;
|
||||
pkgs = pkgs;
|
||||
fontSize = "11";
|
||||
monoFontSize = "13";
|
||||
};
|
||||
in desktopConfig // {
|
||||
imports = [ ./common.nix ./autorandr/trantor.nix ];
|
||||
|
||||
services.picom = {
|
||||
enable = true;
|
||||
fade = false;
|
||||
shadow = true;
|
||||
backend = "glx";
|
||||
shadowExclude = [ "name ~= 'stalonetray'" ];
|
||||
settings.unredir-if-possible = false;
|
||||
vSync = true;
|
||||
};
|
||||
|
||||
home.file.".xinitrc".text = ''
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource modesetting NVIDIA-0
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --auto
|
||||
${pkgs.acpilight}/bin/xbacklight -set 100
|
||||
exec ${config.home.homeDirectory}/.xsession
|
||||
'';
|
||||
}
|
|
@ -1,376 +0,0 @@
|
|||
module Bindings
|
||||
( keybinds
|
||||
, mousebinds
|
||||
) where
|
||||
|
||||
--
|
||||
-- q , w , e : screen naviagation
|
||||
-- h , j , k , l : vim-style 2D navitgation
|
||||
-- n , p : next/previous
|
||||
-- r : run
|
||||
-- t : tile
|
||||
-- g : toggle spacing (gaps)
|
||||
-- b " toggle bar
|
||||
-- x , y : reflect
|
||||
-- z : minimize
|
||||
-- [ , ] : tab navigation
|
||||
|
||||
import System.Exit (exitSuccess)
|
||||
|
||||
import Data.Monoid ( appEndo )
|
||||
import Data.Ratio ( (%) )
|
||||
import qualified Data.Map as M
|
||||
|
||||
import XMonad ( (.|.) , gets )
|
||||
import XMonad.Util.Types ( Direction2D (U, D, L, R) )
|
||||
import XMonad.Hooks.ManageDocks ( ToggleStruts (ToggleStruts) )
|
||||
import XMonad.Util.Run ( safeSpawn )
|
||||
import XMonad.Util.Paste ( pasteSelection )
|
||||
import XMonad.Layout.ResizableTile ( MirrorResize (MirrorShrink, MirrorExpand) )
|
||||
import XMonad.Layout.Reflect ( REFLECTX (REFLECTX) , REFLECTY (REFLECTY) )
|
||||
import XMonad.Layout.MultiToggle ( Toggle (Toggle) )
|
||||
import XMonad.Layout.BoringWindows ( focusUp , focusDown )
|
||||
import XMonad.Layout.Maximize ( maximizeRestore )
|
||||
import XMonad.Actions.CopyWindow ( kill1 )
|
||||
-- import XMonad.Actions.FloatKeys ( keysResizeWindow, keysMoveWindow, ChangeDim )
|
||||
import XMonad.Actions.FloatKeys
|
||||
import XMonad.Actions.Navigation2D ( switchLayer , windowGo , windowSwap )
|
||||
import XMonad.Hooks.ManageHelpers ( doRectFloat )
|
||||
|
||||
import XMonad.Core
|
||||
( Layout
|
||||
, X
|
||||
, terminal
|
||||
, modMask
|
||||
, layoutHook
|
||||
, XConfig (XConfig)
|
||||
, whenJust
|
||||
, runQuery
|
||||
, windowset
|
||||
, io
|
||||
, ScreenId
|
||||
, WindowSpace
|
||||
)
|
||||
|
||||
import XMonad.Layout.IndependentScreens
|
||||
( workspaces'
|
||||
, onCurrentScreen
|
||||
, unmarshallS
|
||||
)
|
||||
|
||||
import XMonad.Layout.SubLayouts
|
||||
( onGroup
|
||||
, pushGroup
|
||||
, GroupMsg (MergeAll, UnMerge)
|
||||
)
|
||||
|
||||
import Graphics.X11.Types
|
||||
( Window , ButtonMask , KeyMask , KeySym , Button
|
||||
, button1 , button2 , button3
|
||||
, shiftMask , controlMask
|
||||
, xK_Return , xK_Escape , xK_Insert , xK_Right , xK_Left
|
||||
, xK_space , xK_plus , xK_minus , xK_comma , xK_period
|
||||
, xK_bracketleft , xK_bracketright
|
||||
, xK_1 , xK_9 , xK_0
|
||||
, xK_b , xK_c , xK_e , xK_g , xK_h , xK_j , xK_k , xK_l , xK_m
|
||||
, xK_n , xK_o , xK_p , xK_q , xK_r , xK_t , xK_u , xK_w , xK_x
|
||||
, xK_y , xK_z
|
||||
, xK_KP_End , xK_KP_Down , xK_KP_Next
|
||||
, xK_KP_Add, xK_KP_Subtract, xK_KP_Insert, xK_KP_Enter
|
||||
)
|
||||
|
||||
import Graphics.X11.ExtraTypes.XF86
|
||||
( xF86XK_AudioMute
|
||||
, xF86XK_AudioLowerVolume , xF86XK_AudioRaiseVolume
|
||||
, xF86XK_AudioPlay , xF86XK_AudioStop
|
||||
, xF86XK_AudioPrev , xF86XK_AudioNext
|
||||
, xF86XK_RotateWindows
|
||||
, xF86XK_MonBrightnessUp , xF86XK_MonBrightnessDown
|
||||
)
|
||||
|
||||
import XMonad.Layout
|
||||
( IncMasterN (..)
|
||||
, Resize (Shrink, Expand)
|
||||
, ChangeLayout (NextLayout)
|
||||
)
|
||||
|
||||
import XMonad.Operations
|
||||
( windows
|
||||
, sendMessage
|
||||
, setLayout
|
||||
, withFocused
|
||||
, screenWorkspace
|
||||
, restart
|
||||
, mouseResizeWindow
|
||||
, mouseMoveWindow
|
||||
, focus
|
||||
, D
|
||||
)
|
||||
|
||||
import XMonad.StackSet
|
||||
( StackSet (..)
|
||||
, RationalRect (..)
|
||||
, Workspace (..)
|
||||
, shift
|
||||
, view
|
||||
, swapUp
|
||||
, swapDown
|
||||
, sink
|
||||
, view
|
||||
, floating
|
||||
, screen
|
||||
, shiftMaster
|
||||
, focusDown'
|
||||
, focusUp'
|
||||
)
|
||||
|
||||
import XMonad.Layout.Spacing
|
||||
( toggleScreenSpacingEnabled
|
||||
, toggleWindowSpacingEnabled
|
||||
)
|
||||
|
||||
import XMonad.Actions.Minimize
|
||||
( minimizeWindow
|
||||
, withLastMinimized
|
||||
, maximizeWindowAndFocus
|
||||
)
|
||||
|
||||
import XMonad.Actions.CycleWS
|
||||
( toggleWS'
|
||||
, WSType (WSIs)
|
||||
, shiftTo
|
||||
, moveTo
|
||||
, Direction1D (Next, Prev)
|
||||
)
|
||||
|
||||
import ManageHook ( scratchpadKeybinds )
|
||||
import Prompts ( promptKeybinds )
|
||||
import Utils ( mkSubmap )
|
||||
|
||||
mousebinds :: XConfig Layout -> M.Map (KeyMask, Button) (Window -> X ())
|
||||
mousebinds XConfig {modMask = modm} = M.fromList bindings
|
||||
where
|
||||
bindings =
|
||||
[ ((modm, button1), move)
|
||||
, ((modm, button2), toMaster)
|
||||
, ((modm, button3), resize)
|
||||
]
|
||||
move = mouseDo mouseMoveWindow
|
||||
resize = mouseDo mouseResizeWindow
|
||||
toMaster = mouseDo return
|
||||
mouseDo f w = focus w >> f w >> windows shiftMaster
|
||||
|
||||
keybinds :: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
|
||||
keybinds = foldr1 keyComb
|
||||
[ wmBinds
|
||||
, spawnBinds
|
||||
, promptKeybinds
|
||||
, scratchpadKeybinds
|
||||
, workspaceBinds
|
||||
, screenBinds
|
||||
]
|
||||
where
|
||||
keyComb f g conf = M.union (f conf) (g conf)
|
||||
|
||||
spawnBinds :: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
|
||||
spawnBinds conf = M.fromList . map mkSpawn $ bindList
|
||||
where
|
||||
bindList = singles ++ playerctl ++ xbacklight ++ pamixer
|
||||
singles =
|
||||
[ ((modm, xK_Return), terminal conf, [])
|
||||
, ((0, xF86XK_RotateWindows), "thinkpad-rotate", [])
|
||||
, ((modm, xK_Escape), "slock", [])
|
||||
]
|
||||
-- mpc = withCmd "mpc"
|
||||
-- [ ((0, xK_KP_End), ["prev"])
|
||||
-- , ((0, xK_KP_Down), ["toggle"])
|
||||
-- , ((0, xK_KP_Next), ["next"])
|
||||
-- , ((0, xF86XK_AudioPlay), ["toggle"])
|
||||
-- , ((0, xF86XK_AudioStop), ["stop"])
|
||||
-- , ((0, xF86XK_AudioPrev), ["prev"])
|
||||
-- , ((0, xF86XK_AudioNext), ["next"])
|
||||
-- ]
|
||||
playerctl = withCmd "playerctl"
|
||||
[ ((0, xK_KP_End), ["previous"])
|
||||
, ((0, xK_KP_Down), ["play-pause"])
|
||||
, ((0, xK_KP_Next), ["next"])
|
||||
, ((0, xF86XK_AudioPlay), ["play-pause"])
|
||||
, ((0, xF86XK_AudioStop), ["stop"])
|
||||
, ((0, xF86XK_AudioPrev), ["previous"])
|
||||
, ((0, xF86XK_AudioNext), ["next"])
|
||||
]
|
||||
xbacklight = withCmd "xbacklight"
|
||||
[ ((0, xF86XK_MonBrightnessUp), ["-inc", "10"])
|
||||
, ((0, xF86XK_MonBrightnessDown), ["-dec", "10"])
|
||||
]
|
||||
pamixer = withCmd "pamixer"
|
||||
[ ((0, xK_KP_Subtract), ["--decrease", "5"])
|
||||
, ((0, xK_KP_Add), ["--increase", "5", "--allow-boost"])
|
||||
, ((0, xK_KP_Enter), ["--set-volume", "100"])
|
||||
, ((0, xK_KP_Insert), ["--togle-mute"])
|
||||
, ((0, xF86XK_AudioLowerVolume), ["--decrease", "5"])
|
||||
, ((0, xF86XK_AudioRaiseVolume), ["--increase", "5", "--allow-boost"])
|
||||
, ((0, xF86XK_AudioMute), ["--toggle-mute"])
|
||||
]
|
||||
mkSpawn (comb,cmd,args) = (comb, safeSpawn cmd args)
|
||||
withCmd cmd = map (\(comb,args) -> (comb,cmd,args))
|
||||
modm = modMask conf
|
||||
|
||||
wmBinds :: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
|
||||
wmBinds conf@XConfig {modMask = modm} = M.fromList
|
||||
[ ((0, xK_Insert), pasteSelection)
|
||||
|
||||
, ((modm .|. shiftMask, xK_o), restart "obtoxmd" True)
|
||||
, ((modm .|. shiftMask, xK_r), restart "xmonad" True)
|
||||
, ((modm .|. shiftMask, xK_Escape), io exitSuccess)
|
||||
|
||||
-- navigating windows
|
||||
, ((modm, xK_j), windowGo D False)
|
||||
, ((modm, xK_k), windowGo U False)
|
||||
, ((modm, xK_h), windowGo L False)
|
||||
, ((modm, xK_l), windowGo R False)
|
||||
, ((modm, xK_n), focusDown)
|
||||
, ((modm, xK_p), focusUp)
|
||||
|
||||
-- sublayout things
|
||||
, ((modm .|. controlMask, xK_m), withFocused (sendMessage . MergeAll))
|
||||
, ((modm .|. controlMask, xK_u), withFocused (sendMessage . UnMerge))
|
||||
, ((modm .|. controlMask, xK_h), sendMessage $ pushGroup L)
|
||||
, ((modm .|. controlMask, xK_l), sendMessage $ pushGroup R)
|
||||
, ((modm .|. controlMask, xK_k), sendMessage $ pushGroup U)
|
||||
, ((modm .|. controlMask, xK_j), sendMessage $ pushGroup D)
|
||||
, ((modm, xK_bracketleft), onGroup focusUp')
|
||||
, ((modm, xK_bracketright), onGroup focusDown')
|
||||
|
||||
-- moving windows
|
||||
, ((modm .|. shiftMask, xK_j), move M.! "D")
|
||||
, ((modm .|. shiftMask, xK_k), move M.! "U")
|
||||
, ((modm .|. shiftMask, xK_h), move M.! "L")
|
||||
, ((modm .|. shiftMask, xK_l), move M.! "R")
|
||||
, ((modm .|. shiftMask, xK_n), windows swapDown)
|
||||
, ((modm .|. shiftMask, xK_p), windows swapUp)
|
||||
|
||||
-- resizing windows
|
||||
, ((modm, xK_plus ), resize M.! "+")
|
||||
, ((modm, xK_minus), resize M.! "-")
|
||||
, ((modm .|. shiftMask .|. controlMask, xK_h), resize M.! "L")
|
||||
, ((modm .|. shiftMask .|. controlMask, xK_l), resize M.! "R")
|
||||
, ((modm .|. shiftMask .|. controlMask, xK_j), resize M.! "D")
|
||||
, ((modm .|. shiftMask .|. controlMask, xK_k), resize M.! "U")
|
||||
|
||||
, ((modm .|. controlMask, xK_space), switchLayer)
|
||||
|
||||
, ((modm .|. shiftMask, xK_c ), kill1)
|
||||
, ((modm, xK_space ), sendMessage NextLayout)
|
||||
, ((modm .|. shiftMask, xK_space ), setLayout $ layoutHook conf)
|
||||
, ((modm, xK_x ), sendMessage $ Toggle REFLECTX)
|
||||
, ((modm, xK_y ), sendMessage $ Toggle REFLECTY)
|
||||
, ((modm, xK_z ), withFocused minimizeWindow)
|
||||
, ((modm .|. shiftMask, xK_z ), unminimize)
|
||||
, ((modm, xK_m ), toggleMax)
|
||||
|
||||
, ((modm, xK_t ), withFocused $ windows . sink)
|
||||
, ((modm .|. shiftMask, xK_t ), untile)
|
||||
|
||||
, ((modm, xK_comma ), sendMessage (IncMasterN 1))
|
||||
, ((modm, xK_period), sendMessage (IncMasterN (-1)))
|
||||
, ((modm, xK_g ), toggleSpacing)
|
||||
, ((modm, xK_b ), sendMessage ToggleStruts)
|
||||
|
||||
, ((modm, xK_Right ), moveTo Next spacesOnCurrentScreen)
|
||||
, ((modm, xK_Left ), moveTo Prev spacesOnCurrentScreen)
|
||||
, ((modm .|. shiftMask, xK_Right ), shiftTo Next spacesOnCurrentScreen)
|
||||
, ((modm .|. shiftMask, xK_Left ), shiftTo Prev spacesOnCurrentScreen)
|
||||
|
||||
, ((modm, xK_0), toggleWS' ["NSP"])
|
||||
]
|
||||
|
||||
where
|
||||
toggleSpacing = toggleWindowSpacingEnabled >> toggleScreenSpacingEnabled
|
||||
toggleMax = withFocused (sendMessage . maximizeRestore)
|
||||
unminimize = withLastMinimized maximizeWindowAndFocus
|
||||
|
||||
untile = withFocused rectFloatFocused
|
||||
where
|
||||
rectFloatFocused focused = action focused >>= windows
|
||||
action = fmap appEndo . doIt
|
||||
doIt = runQuery $ doRectFloat rect
|
||||
rect = RationalRect 0.05 0.05 0.9 0.9
|
||||
|
||||
resize :: M.Map [Char] (X())
|
||||
resize = M.intersectionWith onFloat flt tilling
|
||||
where
|
||||
|
||||
flt :: M.Map [Char] (Window -> X())
|
||||
flt = M.fromList
|
||||
[ ("L", keysResizeWindow (-n, 0) (0, 0))
|
||||
, ("R", keysResizeWindow ( n, 0) (0, 0))
|
||||
, ("D", keysResizeWindow ( 0, n) (0, 0))
|
||||
, ("U", keysResizeWindow ( 0, -n) (0, 0))
|
||||
, ("+", keysResizeWindow ( n, n) (1%2, 1%2))
|
||||
, ("-", keysResizeWindow (-n, -n) (1%2, 1%2))
|
||||
]
|
||||
|
||||
tilling :: M.Map [Char] (X())
|
||||
tilling = M.fromList
|
||||
[ ("L", sendMessage Shrink)
|
||||
, ("R", sendMessage Expand)
|
||||
, ("D", sendMessage MirrorShrink)
|
||||
, ("U", sendMessage MirrorExpand)
|
||||
, ("+", return ())
|
||||
, ("-", return ())
|
||||
]
|
||||
n = 10
|
||||
|
||||
move :: M.Map [Char] (X())
|
||||
move = M.intersectionWith onFloat flt tilling
|
||||
where
|
||||
|
||||
flt :: M.Map [Char] (Window -> X())
|
||||
flt = M.fromList
|
||||
[ ("L", keysMoveWindow (-n, 0))
|
||||
, ("R", keysMoveWindow ( n, 0))
|
||||
, ("D", keysMoveWindow ( 0, n))
|
||||
, ("U", keysMoveWindow ( 0, -n))
|
||||
]
|
||||
|
||||
tilling :: M.Map [Char] (X())
|
||||
tilling = M.fromList
|
||||
[ ("L", windowSwap L False)
|
||||
, ("R", windowSwap R False)
|
||||
, ("D", windowSwap D False)
|
||||
, ("U", windowSwap U False)
|
||||
]
|
||||
n = 10
|
||||
|
||||
onFloat a b = withFocused $ ifFloat a (const b)
|
||||
where
|
||||
ifFloat x y w = isFloat w >>= picker x y w
|
||||
|
||||
picker x _ w True = x w
|
||||
picker _ y w False = y w
|
||||
|
||||
isFloat :: Window -> X Bool
|
||||
isFloat w = M.member w . floating <$> gets windowset
|
||||
|
||||
spacesOnCurrentScreen :: WSType
|
||||
spacesOnCurrentScreen = WSIs $ isOnScreen <$> currentScreen
|
||||
where
|
||||
|
||||
isOnScreen :: ScreenId -> WindowSpace -> Bool
|
||||
isOnScreen s = (s ==) . unmarshallS . tag
|
||||
|
||||
currentScreen :: X ScreenId
|
||||
currentScreen = gets $ screen . current . windowset
|
||||
|
||||
workspaceBinds :: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
|
||||
workspaceBinds conf@XConfig {modMask = modm} = M.fromList $
|
||||
[((m .|. modm, k), windows $ onCurrentScreen f i)
|
||||
| (i, k) <- zip (workspaces' conf) [xK_1 .. xK_9]
|
||||
, (f, m) <- [(view, 0), (shift, shiftMask)]]
|
||||
|
||||
screenBinds :: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
|
||||
screenBinds XConfig {modMask = modm} = M.fromList $
|
||||
[((m .|. modm, k), screenWorkspace i >>= flip whenJust (windows . f))
|
||||
| (i, k) <- zip [0,1] [xK_w, xK_e]
|
||||
, (f, m) <- [(view, 0), (shift, shiftMask)]]
|
|
@ -1,85 +0,0 @@
|
|||
module DefaultConfig
|
||||
( mkPP
|
||||
, wsNamer
|
||||
, defaultPP
|
||||
) where
|
||||
|
||||
import MyConfig
|
||||
( workspaceLog
|
||||
, layoutLog
|
||||
, taskbar
|
||||
)
|
||||
|
||||
import Theme
|
||||
( inactiveColor
|
||||
, urgentColor
|
||||
, selFg
|
||||
, selectionColor
|
||||
)
|
||||
|
||||
import GHC.IO.Handle.Types (Handle)
|
||||
|
||||
import XMonad.Hooks.DynamicLog
|
||||
( ppCurrent
|
||||
, ppOutput
|
||||
, ppExtras
|
||||
, ppVisible
|
||||
, ppHidden
|
||||
, ppHiddenNoWindows
|
||||
, ppUrgent
|
||||
, ppOrder
|
||||
, ppTitle
|
||||
, ppSep
|
||||
, ppLayout
|
||||
, PP
|
||||
, xmobarColor
|
||||
, wrap
|
||||
, shorten
|
||||
)
|
||||
|
||||
import XMonad.Config (def)
|
||||
|
||||
import XMonad.Util.Run (hPutStrLn)
|
||||
|
||||
|
||||
mkPP :: (String -> String) -> Bool -> Handle -> Int -> PP
|
||||
mkPP workspaceNamer complete bar screen = common
|
||||
{ ppOutput = hPutStrLn bar
|
||||
, ppExtras = extras complete
|
||||
}
|
||||
where
|
||||
common = def
|
||||
{ ppCurrent = const ""
|
||||
, ppVisible = const ""
|
||||
, ppHidden = const ""
|
||||
, ppHiddenNoWindows = const ""
|
||||
, ppUrgent = xmobarColor urgentColor ""
|
||||
, ppOrder = order complete
|
||||
, ppTitle = title complete
|
||||
, ppSep = xmobarColor inactiveColor "" "|"
|
||||
, ppLayout = const ""
|
||||
}
|
||||
|
||||
extras True =
|
||||
[ workspaceLog workspaceNamer screen
|
||||
, layoutLog screen
|
||||
, taskbar screen
|
||||
]
|
||||
extras False =
|
||||
[ workspaceLog workspaceNamer screen
|
||||
, layoutLog screen
|
||||
]
|
||||
|
||||
order True (_:_:_:xs) = xs
|
||||
order False (_:_:t:ws:l:_) = [ws, l, t]
|
||||
order _ _ = []
|
||||
|
||||
title True = const ""
|
||||
title False = wrap " " "" . xmobarColor selFg selectionColor . wrap " " " " . shorten 80
|
||||
|
||||
wsNamer :: String -> String
|
||||
wsNamer "NSP" = ""
|
||||
wsNamer x = x
|
||||
|
||||
defaultPP :: Handle -> Int -> PP
|
||||
defaultPP = mkPP wsNamer True
|
|
@ -1,124 +0,0 @@
|
|||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
|
||||
|
||||
module Layouts (myLayoutHook) where
|
||||
|
||||
import Text.Printf (printf)
|
||||
|
||||
import XMonad.Config (def)
|
||||
import XMonad.Core ( LayoutClass )
|
||||
import XMonad.Hooks.ManageDocks (avoidStruts)
|
||||
|
||||
import XMonad.Layout ( Mirror (Mirror) , (|||) )
|
||||
import XMonad.Layout.PerWorkspace ( onWorkspaces )
|
||||
import XMonad.Layout.LayoutModifier ( ModifiedLayout , LayoutModifier )
|
||||
import XMonad.Layout.BoringWindows ( boringWindows )
|
||||
import XMonad.Layout.Decoration ( Theme , DefaultShrinker , Decoration )
|
||||
import XMonad.Layout.Maximize ( maximizeWithPadding )
|
||||
import XMonad.Layout.Minimize ( minimize )
|
||||
import XMonad.Layout.MultiToggle ( mkToggle , single )
|
||||
import XMonad.Layout.Renamed ( renamed, Rename (Replace) )
|
||||
import XMonad.Layout.NoBorders ( smartBorders )
|
||||
import XMonad.Layout.ResizableTile ( ResizableTall (..) )
|
||||
import XMonad.Layout.Spacing ( Spacing , spacingRaw , Border (..) )
|
||||
import XMonad.Layout.WindowNavigation ( windowNavigation )
|
||||
import XMonad.Layout.SubLayouts ( subLayout , Sublayout )
|
||||
import XMonad.Layout.Simplest ( Simplest(Simplest) )
|
||||
import XMonad.Layout.Grid ( Grid(Grid) )
|
||||
import XMonad.Layout.Reflect
|
||||
( REFLECTX (REFLECTX)
|
||||
, REFLECTY (REFLECTY)
|
||||
)
|
||||
import XMonad.Layout.Tabbed
|
||||
( shrinkText
|
||||
, addTabs
|
||||
, TabbedDecoration
|
||||
)
|
||||
import qualified XMonad.Layout.Tabbed as T
|
||||
( activeColor
|
||||
, inactiveColor
|
||||
, activeBorderColor
|
||||
, inactiveBorderColor
|
||||
, urgentColor
|
||||
, activeTextColor
|
||||
, inactiveTextColor
|
||||
, urgentTextColor
|
||||
, fontName
|
||||
)
|
||||
|
||||
import XMonad.Layout.PositionStoreFloat (positionStoreFloat)
|
||||
import XMonad.Layout.NoFrillsDecoration (noFrillsDeco)
|
||||
import XMonad.Layout.BorderResize (borderResize)
|
||||
|
||||
import HostConfig
|
||||
( FontConfig
|
||||
, fontName
|
||||
, fontSize
|
||||
, ColorConfig
|
||||
, fgColor
|
||||
, selFgColor
|
||||
, bgColor
|
||||
, selColor
|
||||
, inactiveColor
|
||||
, inactiveBorderColor
|
||||
, urgentColor
|
||||
, colorConfig
|
||||
, fontConfig
|
||||
)
|
||||
|
||||
named :: String -> l a -> ModifiedLayout Rename l a
|
||||
named x = renamed [Replace x]
|
||||
|
||||
myLayoutHook = commonMods mainLayouts
|
||||
where
|
||||
tileMods = mkToggle (single REFLECTX) . mkToggle (single REFLECTY)
|
||||
. smartBorders
|
||||
. windowNavigation . mySubTabbed theme
|
||||
. spaces
|
||||
commonMods = avoidStruts
|
||||
. maximizeWithPadding 0
|
||||
. minimize
|
||||
. boringWindows
|
||||
tLayouts = tileMods $ named "tall" tall ||| named "mtall" mtall
|
||||
mainLayouts = tLayouts ||| floating theme
|
||||
|
||||
floating theme = named "float" . floatingDeco . borderResize $ positionStoreFloat
|
||||
where
|
||||
floatingDeco = noFrillsDeco shrinkText theme
|
||||
|
||||
mySubTabbed
|
||||
:: (Eq a, LayoutModifier (Sublayout Simplest) a, LayoutClass l a)
|
||||
=> Theme
|
||||
-> l a
|
||||
-> ModifiedLayout
|
||||
(Decoration TabbedDecoration DefaultShrinker)
|
||||
(ModifiedLayout (Sublayout Simplest) l)
|
||||
a
|
||||
mySubTabbed theme x = addTabs shrinkText theme $ subLayout [] Simplest x
|
||||
|
||||
spaces :: l a -> ModifiedLayout Spacing l a
|
||||
spaces = spacingRaw False b False b False
|
||||
where
|
||||
b = Border defSpacing defSpacing defSpacing defSpacing
|
||||
defSpacing = 5
|
||||
|
||||
tall :: ResizableTall a
|
||||
tall = ResizableTall 1 (3/100) (1/2) []
|
||||
|
||||
mtall :: Mirror ResizableTall a
|
||||
mtall = Mirror tall
|
||||
|
||||
theme :: Theme
|
||||
theme = def
|
||||
{ T.activeColor = selColor colorConfig
|
||||
, T.activeBorderColor = inactiveColor colorConfig
|
||||
, T.activeTextColor = selFgColor colorConfig
|
||||
|
||||
, T.inactiveColor = bgColor colorConfig
|
||||
, T.inactiveBorderColor = inactiveBorderColor colorConfig
|
||||
, T.inactiveTextColor = fgColor colorConfig
|
||||
|
||||
, T.urgentColor = urgentColor colorConfig
|
||||
, T.urgentTextColor = urgentColor colorConfig
|
||||
, T.fontName = printf "xft:%s:size=%d" (fontName fontConfig) (fontSize fontConfig)
|
||||
}
|
|
@ -1,135 +0,0 @@
|
|||
module ManageHook
|
||||
( myManageHook
|
||||
, scratchpadKeybinds
|
||||
) where
|
||||
|
||||
import Text.Printf (printf)
|
||||
import qualified Data.Map as M
|
||||
|
||||
import XMonad.Core
|
||||
( ManageHook
|
||||
, X
|
||||
, XConfig(XConfig)
|
||||
, modMask
|
||||
, Layout
|
||||
)
|
||||
|
||||
import XMonad.StackSet (RationalRect (RationalRect))
|
||||
import XMonad.Hooks.ManageHelpers (isFullscreen, doFullFloat)
|
||||
|
||||
import Graphics.X11.Types
|
||||
( KeySym , ButtonMask
|
||||
, xK_s , xK_t , xK_m
|
||||
, xK_Return
|
||||
)
|
||||
|
||||
import XMonad.ManageHook
|
||||
( className
|
||||
, (=?)
|
||||
, resource
|
||||
, composeAll
|
||||
, (-->)
|
||||
, doFloat
|
||||
, doShift
|
||||
, stringProperty
|
||||
)
|
||||
|
||||
import XMonad.Util.NamedScratchpad
|
||||
( NamedScratchpad (NS)
|
||||
, customFloating
|
||||
, namedScratchpadManageHook
|
||||
, namedScratchpadAction
|
||||
)
|
||||
|
||||
import Utils ( mkSubmap )
|
||||
|
||||
scratchpadKeybinds :: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
|
||||
scratchpadKeybinds XConfig {modMask = modm} = M.fromList
|
||||
[ ((modm, xK_s), mkSubmap modm . map buildSubmap $
|
||||
[ (xK_Return, "scratchpad")
|
||||
, (xK_m, "mixer")
|
||||
-- , (xK_p, "player")
|
||||
, (xK_t, "top")
|
||||
-- , (xK_w, "whatsapp")
|
||||
-- , (xK_g, "hangouts")
|
||||
])
|
||||
]
|
||||
where
|
||||
buildSubmap (key,name) = ((0,key), namedScratchpadAction myScratchpads name)
|
||||
|
||||
myScratchpads :: [NamedScratchpad]
|
||||
myScratchpads =
|
||||
[ termApp "scratchpad" "zsh" mngTopScratch
|
||||
, termApp "top" "top" mngBigFloat
|
||||
--, termApp "player" "ncmpcpp" mngBiggerFloat
|
||||
|
||||
--, NS "mixer" "pavucontrol" (className =? "Pavucontrol") mngSmallerFloat
|
||||
|
||||
-- , chromiumApp "whatsapp" "web.whatsapp.com" mngSmallFloat
|
||||
-- , chromiumApp "hangouts" "hangouts.google.com" mngSmallFloat
|
||||
]
|
||||
|
||||
myManageHook :: ManageHook
|
||||
myManageHook = mkManageHook myScratchpads
|
||||
|
||||
termApp :: String -> String -> ManageHook -> NamedScratchpad
|
||||
termApp name app = NS name cmd findIt
|
||||
where
|
||||
cmd = printf fmt name name app
|
||||
fmt = "alacritty --class %s --command tmux new -A -s %s %s"
|
||||
findIt = resource =? name
|
||||
|
||||
--chromiumApp :: String -> String -> ManageHook -> NamedScratchpad
|
||||
--chromiumApp name url = NS name cmd findIt
|
||||
-- where
|
||||
-- cmd = printf "chromium --app=https://%s" url
|
||||
-- findIt = resource =? url
|
||||
|
||||
--mngSmallerFloat :: ManageHook
|
||||
--mngSmallerFloat = centeredFloat 0.6
|
||||
|
||||
--mngSmallFloat :: ManageHook
|
||||
--mngSmallFloat = centeredFloat 0.7
|
||||
|
||||
mngBigFloat :: ManageHook
|
||||
mngBigFloat = centeredFloat 0.8
|
||||
|
||||
--mngBiggerFloat :: ManageHook
|
||||
--mngBiggerFloat = centeredFloat 0.9
|
||||
|
||||
centeredFloat :: Rational -> ManageHook
|
||||
centeredFloat s = customFloating $ RationalRect p p s s
|
||||
where
|
||||
p = (1-s) / 2
|
||||
|
||||
mngTopScratch :: ManageHook
|
||||
mngTopScratch = customFloating $ RationalRect l t w h
|
||||
where
|
||||
h = 0.3 -- height, 30%
|
||||
w = 1 -- width, 100%
|
||||
t = 0 -- distance from top edge, 0%
|
||||
l = 1 - w -- distance from left edge, 0%
|
||||
|
||||
mkManageHook :: [NamedScratchpad] -> ManageHook
|
||||
mkManageHook scratchpads = composeAll
|
||||
[ isFullscreen --> doFullFloat
|
||||
, className =? "MPlayer" --> doFloat
|
||||
, className =? "VirtualBox" --> doFloat
|
||||
, className =? "Pinentry" --> doFloat
|
||||
, className =? "qjackctl" --> doFloat
|
||||
, className =? "Xmessage" --> doFloat
|
||||
, className =? "SuperCollider" --> doFloat
|
||||
, role =? "gimp-dock" --> doFloat
|
||||
, role =? "GtkFileChooserDialog" --> doFloat
|
||||
|
||||
--, className =? "Signal" --> doShift "msg"
|
||||
--, className =? "Slack" --> doShift "msg"
|
||||
--, className =? "Element" --> doShift "msg"
|
||||
--, className =? "TelegramDesktop" --> doShift "msg"
|
||||
--, resource =? "hangouts.google.com" --> doShift "msg"
|
||||
--, resource =? "web.whatsapp.com" --> doShift "msg"
|
||||
|
||||
, namedScratchpadManageHook scratchpads
|
||||
]
|
||||
where
|
||||
role = stringProperty "WM_WINDOW_ROLE"
|
|
@ -1,60 +0,0 @@
|
|||
module Polybar (polybarLogHook, mkDbusClient) where
|
||||
|
||||
import XMonad.Hooks.DynamicLog
|
||||
|
||||
import Text.Printf (printf)
|
||||
|
||||
import XMonad.Layout.IndependentScreens (marshallPP)
|
||||
|
||||
import qualified DBus as D
|
||||
import qualified DBus.Client as D
|
||||
import qualified Codec.Binary.UTF8.String as UTF8
|
||||
|
||||
|
||||
mkDbusClient :: IO D.Client
|
||||
mkDbusClient = do
|
||||
dbus <- D.connectSession
|
||||
D.requestName dbus (D.busName_ "org.xmonad.log") opts
|
||||
return dbus
|
||||
where
|
||||
opts = [D.nameAllowReplacement, D.nameReplaceExisting, D.nameDoNotQueue]
|
||||
|
||||
monitorMsg :: Int -> String -> String
|
||||
monitorMsg = printf "{\"%d\": \"%s\"}"
|
||||
|
||||
-- Emit a DBus signal on log updates
|
||||
dbusOutput :: D.Client -> String -> IO ()
|
||||
dbusOutput dbus str =
|
||||
let opath = D.objectPath_ "/org/xmonad/Log"
|
||||
iname = D.interfaceName_ "org.xmonad.Log"
|
||||
mname = D.memberName_ "Update"
|
||||
signal = D.signal opath iname mname
|
||||
body = [D.toVariant $ UTF8.decodeString $ monitorMsg 0 str]
|
||||
in D.emit dbus $ signal { D.signalBody = body }
|
||||
|
||||
polybarFmt :: String -> String -> String -> String
|
||||
polybarFmt var color elem = "%{" ++ var ++ color ++ "}" ++ elem ++ "%{" ++ var ++ "-}"
|
||||
|
||||
polybarFg :: String -> String -> String
|
||||
polybarFg = polybarFmt "F"
|
||||
|
||||
polybarBg :: String -> String -> String
|
||||
polybarBg = polybarFmt "B"
|
||||
|
||||
polybarBgFg :: String -> String -> String -> String
|
||||
polybarBgFg bg fg = polybarBg bg . polybarFg fg
|
||||
|
||||
polybarHook :: D.Client -> PP
|
||||
polybarHook dbus = def
|
||||
{ ppOutput = dbusOutput dbus
|
||||
, ppCurrent = polybarBgFg "#458588" "#fbf1c7"
|
||||
, ppVisible = polybarFg "#ebdbb2"
|
||||
, ppUrgent = polybarBgFg "#cc241d" "#fbf1c7"
|
||||
, ppHidden = polybarFg "#ebdbb2"
|
||||
, ppLayout = const ""
|
||||
, ppHiddenNoWindows = const ""
|
||||
, ppTitle = shorten 100 . polybarFg "#fbf1c7"
|
||||
, ppSep = polybarFg "#a89974" " | "
|
||||
}
|
||||
|
||||
polybarLogHook dbus = dynamicLogWithPP $ (marshallPP 0 . polybarHook) dbus
|
|
@ -1,92 +0,0 @@
|
|||
module Prompts ( promptKeybinds ) where
|
||||
|
||||
import Text.Printf (printf)
|
||||
import qualified Data.Map as M ( Map , fromList )
|
||||
|
||||
import Graphics.X11.Types
|
||||
( KeySym , ButtonMask
|
||||
, xK_Tab
|
||||
, xK_a , xK_b , xK_c , xK_p , xK_r , xK_s , xK_u , xK_t
|
||||
)
|
||||
import Graphics.X11.ExtraTypes.XF86 ( xF86XK_Launch1 )
|
||||
|
||||
import XMonad.Core ( X , modMask , XConfig(XConfig) , Layout )
|
||||
import XMonad.Util.Run ( safeSpawn )
|
||||
|
||||
import qualified XMonad.Prompt as P
|
||||
( XPConfig
|
||||
, def
|
||||
, font
|
||||
, bgColor
|
||||
, fgColor
|
||||
, bgHLight
|
||||
, fgHLight
|
||||
, bgColor
|
||||
, borderColor
|
||||
, promptBorderWidth
|
||||
, alwaysHighlight
|
||||
, defaultPrompter
|
||||
)
|
||||
|
||||
import HostConfig
|
||||
( ColorConfig
|
||||
, FontConfig
|
||||
, fontConfig
|
||||
, colorConfig
|
||||
, fontName
|
||||
, fontSize
|
||||
, bgColor
|
||||
, fgColor
|
||||
, selColor
|
||||
, selFgColor
|
||||
)
|
||||
|
||||
import Utils ( mkSubmap )
|
||||
|
||||
promptKeybinds :: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
|
||||
promptKeybinds XConfig {modMask = modm} = M.fromList
|
||||
[ ((0, xF86XK_Launch1), run)
|
||||
, ((modm, xK_r), run)
|
||||
, ((modm, xK_a) , subMapMaker
|
||||
[ ( xK_r , drun )
|
||||
, ( xK_p , pass )
|
||||
, ( xK_Tab , window )
|
||||
, ( xK_t , todo )
|
||||
, ( xK_c , clipmenu )
|
||||
, ( xK_b , buku )
|
||||
, ( xK_s , ssh )
|
||||
])
|
||||
]
|
||||
where
|
||||
run = safeSpawn "rofi" ["-show", "run"]
|
||||
drun = safeSpawn "rofi" ["-show", "drun"]
|
||||
pass = safeSpawn "rofi-pass" []
|
||||
buku = safeSpawn "rofi-buku" []
|
||||
ssh = safeSpawn "rofi" ["-show", "ssh"]
|
||||
window = safeSpawn "rofi" ["-show", "window"]
|
||||
clipmenu = safeSpawn "clipmenu" dmenuArgs
|
||||
todo = safeSpawn "todo-rofi" []
|
||||
subMapMaker = mkSubmap modm . map (\(key,action) -> ((0,key),action))
|
||||
|
||||
dmenuArgs :: [String]
|
||||
dmenuArgs =
|
||||
[ "-b" -- bottom
|
||||
, "-fn", printf "%s:size=%d" (fontName fontConfig) (fontSize fontConfig)
|
||||
, "-nb", bgColor colorConfig -- normal background
|
||||
, "-nf", fgColor colorConfig -- normal foreground
|
||||
, "-sb", selColor colorConfig -- selected background
|
||||
, "-sf", selFgColor colorConfig -- selected foreground
|
||||
]
|
||||
|
||||
theme :: P.XPConfig
|
||||
theme = P.def
|
||||
{ P.font = printf "xft:%s:size=%d" (fontName fontConfig) (fontSize fontConfig)
|
||||
, P.bgColor = bgColor colorConfig
|
||||
, P.fgColor = fgColor colorConfig
|
||||
, P.bgHLight = selColor colorConfig
|
||||
, P.fgHLight = selFgColor colorConfig
|
||||
, P.borderColor = bgColor colorConfig
|
||||
, P.promptBorderWidth = 0
|
||||
, P.alwaysHighlight = True
|
||||
, P.defaultPrompter = const ""
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
module Utils ( mkSubmap ) where
|
||||
|
||||
import qualified Data.Map as M ( fromList )
|
||||
|
||||
import XMonad ( (.|.) )
|
||||
import Graphics.X11.Types ( KeyMask , KeySym , ButtonMask )
|
||||
|
||||
import XMonad.Core ( X )
|
||||
import XMonad.Actions.Submap ( submap )
|
||||
|
||||
mkSubmap :: ButtonMask -> [((KeyMask, KeySym), X ())] -> X ()
|
||||
mkSubmap modm = submap . M.fromList . concatMap buildSubmaps
|
||||
where
|
||||
buildSubmaps x = map (buildSubmap x) [0,modm]
|
||||
buildSubmap ((modKey,key),action) m = ((modKey .|. m,key),action)
|
|
@ -1,119 +0,0 @@
|
|||
module Xmobar (mkBars) where
|
||||
|
||||
import XMonad.Layout.IndependentScreens (marshallPP)
|
||||
|
||||
import GHC.IO.Handle.Types (Handle)
|
||||
import Text.Printf (printf)
|
||||
|
||||
import Data.List (intercalate, isPrefixOf)
|
||||
import Graphics.X11.Types (Window)
|
||||
|
||||
import XMonad.Core
|
||||
( Layout
|
||||
, ScreenDetail
|
||||
, ScreenId (S)
|
||||
, withWindowSet
|
||||
, WorkspaceId
|
||||
, WindowSet
|
||||
, description
|
||||
, X
|
||||
)
|
||||
|
||||
import XMonad (MonadIO)
|
||||
import XMonad.Config (def)
|
||||
import XMonad.Util.Run (hPutStrLn, spawnPipe)
|
||||
import XMonad.Util.NamedWindows (getName)
|
||||
import XMonad.Util.Loggers (Logger)
|
||||
|
||||
import XMonad.StackSet ( Workspace (..) , screen , workspace , current )
|
||||
import qualified XMonad.StackSet as S
|
||||
|
||||
import XMonad.Hooks.DynamicLog
|
||||
( PP
|
||||
, ppCurrent
|
||||
, ppExtras
|
||||
, ppHidden
|
||||
, ppHiddenNoWindows
|
||||
, ppLayout
|
||||
, ppOrder
|
||||
, ppOutput
|
||||
, ppSep
|
||||
, ppTitle
|
||||
, ppUrgent
|
||||
, ppVisible
|
||||
, shorten
|
||||
, wrap
|
||||
, xmobarAction
|
||||
, xmobarColor
|
||||
, dynamicLogWithPP
|
||||
)
|
||||
|
||||
import HostConfig
|
||||
( colorConfig
|
||||
, fontConfig
|
||||
, FontConfig
|
||||
, fontName
|
||||
, fontSize
|
||||
|
||||
, ColorConfig
|
||||
, bgColor
|
||||
, fgColor
|
||||
, selFgColor
|
||||
, selColor
|
||||
, inactiveColor
|
||||
, urgentColor
|
||||
)
|
||||
|
||||
mkBars :: MonadIO m => [Int] -> m (X ())
|
||||
mkBars screens = do
|
||||
xmprocs <- mkXmprocs screens
|
||||
return $ mapM_ dynamicLogWithPP $ zipWith mkPP xmprocs screens
|
||||
|
||||
mkXmprocs :: MonadIO m => [Int] -> m [Handle]
|
||||
mkXmprocs = mapM (spawnPipe . printf "xmobar --screen='%d'")
|
||||
|
||||
mkPP :: Handle -> Int -> PP
|
||||
mkPP bar nscreen = marshallPP (S nscreen) $ def
|
||||
{ ppOutput = hPutStrLn bar
|
||||
, ppCurrent = xmobarColor (selFgColor colorConfig) (selColor colorConfig)
|
||||
, ppVisible = xmobarColor (fgColor colorConfig) ""
|
||||
, ppHidden = xmobarColor (fgColor colorConfig) ""
|
||||
, ppHiddenNoWindows = const ""
|
||||
, ppUrgent = xmobarColor (urgentColor colorConfig) ""
|
||||
, ppLayout = getLayoutIcon . layoutNameCleaner
|
||||
, ppTitle = xmobarColor (selFgColor colorConfig) "" . shorten 100
|
||||
, ppSep = xmobarColor (inactiveColor colorConfig) "" " | "
|
||||
}
|
||||
|
||||
layoutNameCleaner = unwords . filter (not . (`elem` toClean)) . words
|
||||
where
|
||||
toClean =
|
||||
[ "Simple"
|
||||
, "Simplest"
|
||||
, "Minimize"
|
||||
, "Maximize"
|
||||
, "ImageButtonDeco"
|
||||
, "DefaultDecoration"
|
||||
, "Spacing"
|
||||
, "ReflectX"
|
||||
, "ReflectY"
|
||||
, "Tabbed"
|
||||
, "0"
|
||||
]
|
||||
|
||||
getLayoutIcon :: String -> String
|
||||
getLayoutIcon "empty" = ""
|
||||
getLayoutIcon x
|
||||
| x `elem` icons = printf "<icon=%s/%s.xpm/>" iconsDir x
|
||||
| otherwise = x
|
||||
where
|
||||
iconsDir = "/home/rilla/.xmonad/icons"
|
||||
icons =
|
||||
[ "3cols"
|
||||
, "float"
|
||||
, "full"
|
||||
, "grid"
|
||||
, "mtall"
|
||||
, "tabs"
|
||||
, "tall"
|
||||
]
|
|
@ -1,92 +0,0 @@
|
|||
import XMonad ( xmonad )
|
||||
import XMonad.Core
|
||||
( ScreenId (S)
|
||||
, terminal
|
||||
, modMask
|
||||
, borderWidth
|
||||
, normalBorderColor
|
||||
, focusedBorderColor
|
||||
, workspaces
|
||||
, keys
|
||||
, mouseBindings
|
||||
, layoutHook
|
||||
, manageHook
|
||||
, XConfig
|
||||
( logHook
|
||||
, focusFollowsMouse
|
||||
, startupHook
|
||||
, handleEventHook
|
||||
)
|
||||
)
|
||||
import XMonad.Config ( def )
|
||||
|
||||
import XMonad.Hooks.ServerMode ( serverModeEventHook )
|
||||
import XMonad.Hooks.EwmhDesktops ( ewmh )
|
||||
import XMonad.Hooks.ManageDocks ( docks )
|
||||
import XMonad.Hooks.SetWMName ( setWMName )
|
||||
|
||||
import XMonad.Layout.IndependentScreens ( countScreens , withScreens )
|
||||
import XMonad.Util.Replace ( replace )
|
||||
|
||||
import XMonad.Actions.UpdatePointer ( updatePointer )
|
||||
import XMonad.Actions.Navigation2D
|
||||
( withNavigation2DConfig
|
||||
, Navigation2DConfig
|
||||
, centerNavigation
|
||||
, singleWindowRect
|
||||
, defaultTiledNavigation
|
||||
, layoutNavigation
|
||||
, unmappedWindowRect
|
||||
)
|
||||
|
||||
import Graphics.X11.Types ( mod4Mask )
|
||||
|
||||
import HostConfig
|
||||
( colorConfig
|
||||
, selColor
|
||||
, inactiveBorderColor
|
||||
)
|
||||
import ManageHook ( myManageHook )
|
||||
import Xmobar ( mkBars )
|
||||
import Bindings ( keybinds, mousebinds )
|
||||
import Layouts ( myLayoutHook )
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
replace
|
||||
nscreens <- countScreens
|
||||
let
|
||||
myScreens = [0 .. nscreens-1]
|
||||
wsLs = withScreens (S nscreens) myWorkspaces
|
||||
bars <- mkBars myScreens
|
||||
xmonad $ opts def
|
||||
{ terminal = "alacritty"
|
||||
, modMask = mod4Mask
|
||||
, borderWidth = 4
|
||||
, normalBorderColor = inactiveBorderColor colorConfig
|
||||
, focusedBorderColor = selColor colorConfig
|
||||
, workspaces = wsLs
|
||||
, keys = keybinds
|
||||
, mouseBindings = mousebinds
|
||||
, layoutHook = myLayoutHook
|
||||
, manageHook = myManageHook
|
||||
, logHook = bars >> updatePtr
|
||||
, focusFollowsMouse = True
|
||||
, handleEventHook = serverModeEventHook
|
||||
, startupHook = setWMName "LG3D"
|
||||
}
|
||||
where
|
||||
opts = docks . ewmh . withNavigation2DConfig myNav2DConf
|
||||
updatePtr = updatePointer (0.9, 0.9) (0, 0)
|
||||
|
||||
myNav2DConf :: Navigation2DConfig
|
||||
myNav2DConf = def
|
||||
{ defaultTiledNavigation = centerNavigation
|
||||
, layoutNavigation = [("Full", centerNavigation)]
|
||||
, unmappedWindowRect = [("Full", singleWindowRect)]
|
||||
}
|
||||
|
||||
myWorkspaces :: [String]
|
||||
myWorkspaces = map show ids
|
||||
where ids :: [Int]
|
||||
ids = [1..9]
|
|
@ -1,10 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
imports = [ ./neovim ];
|
||||
home.stateVersion = "22.11";
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(nerdfonts.override {
|
||||
fonts = [
|
||||
"Hack" # my default monospace font
|
||||
"MPlus" # to display symbols on xmobar
|
||||
"InconsolataGo" # sometimes I use it as a change from Hack
|
||||
"CascadiaCode" # used by rofi; todo: set fontconfig to use MPlus instead
|
||||
];
|
||||
})
|
||||
inter # Inter is my default sans-serif font
|
||||
hack-font # Hack is my default monospace font
|
||||
libertinus # Libertinus Serif is my default serif font
|
||||
];
|
||||
#fonts.fontconfig.enable = true;
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./common.nix ];
|
||||
programs.git.userEmail = "rilla@monotremata.xyz";
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./common.nix ];
|
||||
programs.git.userEmail = "ricard@trkkn.com";
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
hostname = "woodpecker.monotremata.xyz";
|
||||
shell = "${pkgs.dash}/bin/dash";
|
||||
pass = "${pkgs.pass}/bin/pass";
|
||||
woodpecker-cli = "${pkgs.woodpecker-cli}/bin/woodpecker-cli";
|
||||
in pkgs.writeScriptBin "woodpecker-cli" ''
|
||||
#!${shell}
|
||||
WOODPECKER_SERVER="https://${hostname}"
|
||||
WOODPECKER_TOKEN=$(${pass} "${hostname}/token")
|
||||
export WOODPECKER_SERVER
|
||||
export WOODPECKER_TOKEN
|
||||
${woodpecker-cli} "$@"
|
||||
''
|
|
@ -1,7 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let printf = "${pkgs.coreutils-full}/bin/printf";
|
||||
in
|
||||
pkgs.writeShellScript "lf-cleaner.sh" ''
|
||||
[ -n "$FIFO_UEBERZUG" ] && ${printf} '{"action": "remove", "identifier": "PREVIEW"}\n' > "$FIFO_UEBERZUG"
|
||||
''
|
|
@ -1,10 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let mailsync = pkgs.callPackage ./mailsync.nix { inherit config pkgs; };
|
||||
in {
|
||||
imports = [ ./common.nix ];
|
||||
home.packages = [ mailsync pkgs.urlscan pkgs.abook ];
|
||||
programs.neomutt.settings.query_command =
|
||||
''"${pkgs.abook}/bin/abook --mutt-query '%s'"'';
|
||||
programs.alot.enable = true;
|
||||
}
|
|
@ -1,132 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
shell = "${pkgs.dash}/bin/dash";
|
||||
pidof = "${pkgs.procps}/bin/pidof";
|
||||
pgrep = "${pkgs.procps}/bin/pgrep";
|
||||
grep = "${pkgs.gnugrep}/bin/grep";
|
||||
sed = "${pkgs.gnused}/bin/sed";
|
||||
awk = "${pkgs.gawk}/bin/awk";
|
||||
perl = "${pkgs.perl}/bin/perl";
|
||||
find = "${pkgs.findutils}/bin/find";
|
||||
|
||||
notifySend = "${pkgs.libnotify}/bin/notify-send";
|
||||
notmuch = "${pkgs.notmuch}/bin/notmuch";
|
||||
head = "${pkgs.coreutils}/bin/head";
|
||||
touch = "${pkgs.coreutils}/bin/touch";
|
||||
tr = "${pkgs.coreutils}/bin/tr";
|
||||
|
||||
mbsyncrc = "${config.home.homeDirectory}/.mbsyncrc";
|
||||
mbsync = "${pkgs.isync}/bin/mbsync -c ${mbsyncrc}";
|
||||
|
||||
maildir = "${config.home.homeDirectory}/Maildir";
|
||||
passwordStoreDir = "${config.home.homeDirectory}/.password-store";
|
||||
notmuchConfig = "${config.home.homeDirectory}/.config/notmuch/default/config";
|
||||
gnupghome = "${config.home.homeDirectory}/.gnupg";
|
||||
lastrun = "${config.home.homeDirectory}/.mailsynclastrun";
|
||||
in pkgs.writeScriptBin "mailsync" ''
|
||||
#!${shell}
|
||||
|
||||
# Run only if not already running in other instance
|
||||
${pidof} mbsync >/dev/null && {
|
||||
echo "mbsync is already running."
|
||||
exit
|
||||
}
|
||||
|
||||
export PASSWORD_STORE_DIR="${passwordStoreDir}"
|
||||
export NOTMUCH_CONFIG="${notmuchConfig}"
|
||||
export GNUPGHOME="${gnupghome}"
|
||||
export GPG_TTY=$TTY
|
||||
|
||||
notify() {
|
||||
pgrepoutput="$(${pgrep} -a X\(org\|wayland\))"
|
||||
displays="$(echo "$pgrepoutput" | ${grep} -wo "[0-9]*:[0-9]\+" | sort -u)"
|
||||
[ -n "$pgrepoutput" ] && for x in ''${displays:-0:}; do
|
||||
export DISPLAY=$x
|
||||
${notifySend} \
|
||||
--app-name="email" \
|
||||
"email" \
|
||||
"📬 $2 new mail(s) in \`$1\` account."
|
||||
done
|
||||
}
|
||||
|
||||
messageinfo() {
|
||||
from="$1"
|
||||
subject="$2"
|
||||
pgrepoutput="$(${pgrep} -a X\(org\|wayland\))"
|
||||
displays="$(echo "$pgrepoutput" | ${grep} -wo "[0-9]*:[0-9]\+" | sort -u)"
|
||||
[ -n "$pgrepoutput" ] && for x in ''${displays:-0:}; do
|
||||
export DISPLAY=$x
|
||||
${notifySend} \
|
||||
--app-name="email" \
|
||||
"📧$from:" \
|
||||
"$subject"
|
||||
done
|
||||
}
|
||||
|
||||
# Check account for new mail. Notify if there is new content.
|
||||
syncandnotify() {
|
||||
accounts="$1"
|
||||
acc="$(echo "$account" | ${sed} "s/.*\///")"
|
||||
if [ -z "$opts" ]; then
|
||||
${mbsync} "$acc"
|
||||
else
|
||||
${mbsync} "$opts" "$acc"
|
||||
fi
|
||||
new=$(
|
||||
${find} \
|
||||
"${maildir}/$acc/INBOX/new/" \
|
||||
"${maildir}/$acc/Inbox/new/" \
|
||||
"${maildir}/mail/$acc/inbox/new/" \
|
||||
-type f \
|
||||
-newer "${lastrun}" \
|
||||
2> /dev/null
|
||||
)
|
||||
newcount=$(echo "$new" | ${sed} '/^\s*$/d' | wc -l)
|
||||
if [ "$newcount" -gt 5 ]; then
|
||||
notify "$acc" "$newcount"
|
||||
elif [ "$newcount" -gt 0 ]; then
|
||||
for file in $new; do
|
||||
# Extract subject and sender from mail.
|
||||
from=$(
|
||||
${awk} '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | \
|
||||
${perl} -CS -MEncode -ne 'print decode("MIME-Header", $_)' | \
|
||||
${awk} '{ $1=""; if (NF>=3)$NF=""; print $0 }' | \
|
||||
${sed} 's/^[[:blank:]]*[\"'\'''\<]*//;s/[\"'\'''\>]*[[:blank:]]*$//'
|
||||
)
|
||||
subject=$(
|
||||
${awk} '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | \
|
||||
${head} -n 1 | ${perl} -CS -MEncode -ne 'print decode("MIME-Header", $_)' | \
|
||||
${sed} 's/^Subject: //' | \
|
||||
${sed} 's/^{[[:blank:]]*[\"'\'''\<]*//;s/[\"'\'''\>]*[[:blank:]]*$//' | \
|
||||
${tr} -d '\n'
|
||||
)
|
||||
messageinfo "$from" "$subject" &
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# Sync accounts passed as argument or all.
|
||||
if [ "$#" -eq "0" ]; then
|
||||
accounts="$(${awk} '/^Channel/ {print $2}' "${mbsyncrc}")"
|
||||
else
|
||||
for arg in "$@"; do
|
||||
[ "''${arg%''${arg#?}}" = '-' ] && \
|
||||
opts="''${opts:+''${opts} }''${arg}" && \
|
||||
shift 1
|
||||
done
|
||||
accounts=$*
|
||||
fi
|
||||
|
||||
# Parallelize multiple accounts
|
||||
for account in $accounts; do
|
||||
syncandnotify "''${account}" &
|
||||
done
|
||||
|
||||
wait
|
||||
|
||||
${notmuch} new 2>/dev/null
|
||||
|
||||
#Create a touch file that indicates the time of the last run of mailsync
|
||||
${touch} "${lastrun}"
|
||||
''
|
|
@ -1,42 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let master-host = "music.monotremata.xyz";
|
||||
in {
|
||||
imports = [ ./common.nix ];
|
||||
home.packages = [ pkgs.mpc_cli pkgs.mpdris2 ];
|
||||
services.mpdris2 = {
|
||||
enable = true;
|
||||
notifications = false;
|
||||
mpd = {
|
||||
host = "localhost";
|
||||
musicDirectory = null;
|
||||
};
|
||||
};
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
musicDirectory = "https://${master-host}";
|
||||
dbFile = null;
|
||||
network = {
|
||||
listenAddress = "any";
|
||||
port = 6600;
|
||||
};
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "pipewire audio"
|
||||
}
|
||||
audio_output {
|
||||
type "fifo"
|
||||
name "my_fifo"
|
||||
path "/tmp/mpd.fifo"
|
||||
format "44100:16:2"
|
||||
}
|
||||
database {
|
||||
plugin "proxy"
|
||||
host "${master-host}"
|
||||
port "6600"
|
||||
}
|
||||
'';
|
||||
};
|
||||
programs.ncmpcpp.mpdMusicDir = null;
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
withPython3 = true;
|
||||
extraPackages = with pkgs; [
|
||||
black
|
||||
efm-langserver
|
||||
hlint
|
||||
jq
|
||||
lua54Packages.luacheck
|
||||
nixfmt
|
||||
nodePackages.pyright
|
||||
pylint
|
||||
ruff
|
||||
shfmt
|
||||
stylua
|
||||
];
|
||||
extraPython3Packages = pyPkgs: with pyPkgs; [ pylint ];
|
||||
plugins = [ pkgs.vimPlugins.packer-nvim ];
|
||||
extraLuaConfig = builtins.readFile ./init.lua;
|
||||
};
|
||||
}
|
|
@ -1,262 +0,0 @@
|
|||
-- luacheck: globals vim
|
||||
|
||||
require("packer").startup(function(use)
|
||||
use("tpope/vim-sensible")
|
||||
|
||||
use("vimwiki/vimwiki")
|
||||
use("freitass/todo.txt-vim")
|
||||
use("ledger/vim-ledger")
|
||||
|
||||
use("Shougo/deoplete.nvim")
|
||||
use("dense-analysis/ale")
|
||||
|
||||
use("psliwka/vim-smoothie")
|
||||
|
||||
-- navigation
|
||||
use("easymotion/vim-easymotion")
|
||||
use("tpope/vim-unimpaired")
|
||||
use("tpope/vim-surround")
|
||||
use("christoomey/vim-tmux-navigator")
|
||||
|
||||
-- fern
|
||||
use("lambdalisue/fern.vim")
|
||||
use("lambdalisue/nerdfont.vim")
|
||||
use("lambdalisue/fern-renderer-nerdfont.vim")
|
||||
use("lambdalisue/glyph-palette.vim")
|
||||
use("lambdalisue/fern-git-status.vim")
|
||||
use("lambdalisue/fern-mapping-git.vim") -- to check
|
||||
use("lambdalisue/fern-hijack.vim")
|
||||
|
||||
-- airline
|
||||
use("vim-airline/vim-airline")
|
||||
use("vim-airline/vim-airline-themes")
|
||||
|
||||
use("tpope/vim-fugitive")
|
||||
use("airblade/vim-gitgutter")
|
||||
|
||||
use("honza/vim-snippets")
|
||||
use("SirVer/ultisnips")
|
||||
|
||||
use("junegunn/fzf.vim")
|
||||
|
||||
use("junegunn/goyo.vim")
|
||||
use("junegunn/limelight.vim")
|
||||
|
||||
use("preservim/nerdcommenter")
|
||||
|
||||
use("luochen1990/rainbow")
|
||||
use("ap/vim-css-color")
|
||||
|
||||
use("Yggdroot/indentLine")
|
||||
|
||||
use("gruvbox-community/gruvbox")
|
||||
|
||||
-- language support
|
||||
use("darrikonn/vim-gofmt")
|
||||
use("Glench/Vim-Jinja2-Syntax")
|
||||
use("preservim/vim-markdown")
|
||||
use("LnL7/vim-nix")
|
||||
use("hashivim/vim-terraform")
|
||||
use("LaTeX-Box-Team/LaTeX-Box")
|
||||
use("vito-c/jq.vim")
|
||||
use("tpope/vim-haml")
|
||||
use({ "psf/black", branch = "stable" })
|
||||
use("elzr/vim-json")
|
||||
use("z0mbix/vim-shfmt")
|
||||
use("ckipp01/stylua-nvim")
|
||||
|
||||
use("jpalardy/vim-slime")
|
||||
use("neovim/nvim-lspconfig")
|
||||
use("lukas-reineke/lsp-format.nvim")
|
||||
|
||||
use("sheerun/vim-polyglot")
|
||||
end)
|
||||
|
||||
local o = vim.opt
|
||||
|
||||
local function map(mode, shortcut, command)
|
||||
vim.api.nvim_set_keymap(mode, shortcut, command, { noremap = true, silent = true })
|
||||
end
|
||||
|
||||
local function nmap(shortcut, command)
|
||||
map("n", shortcut, command)
|
||||
end
|
||||
|
||||
--local function imap(shortcut, command)
|
||||
-- map("i", shortcut, command)
|
||||
--end
|
||||
|
||||
o.wrap = false
|
||||
o.number = true
|
||||
o.compatible = false
|
||||
o.mouse = "a" -- mouse support
|
||||
o.showcmd = true -- show incomplete cmds down the bottom
|
||||
o.showmode = true -- show current mode
|
||||
o.showmatch = true -- set show matching parenthesis
|
||||
o.visualbell = true -- no sounds
|
||||
o.autoread = true -- reload files changed outside of vim
|
||||
o.backspace = [[indent,eol,start]] -- allow backspacing over everything in insert mode
|
||||
o.ignorecase = true -- ignore case when searching
|
||||
o.shiftround = true -- use multiple of shiftwidth when indenting with '<' and '>'
|
||||
o.smartcase = true -- ignore case if searching pattern is all lowecase, case-sensitive otherwise
|
||||
o.smarttab = true -- insert tabs on the start of a line according to shiftwidth, not tabstop
|
||||
o.hlsearch = true -- highlight search terms
|
||||
o.incsearch = true -- show search matches as you type
|
||||
o.hidden = true
|
||||
o.ruler = true
|
||||
o.clipboard = "unnamed" -- system clipboard
|
||||
o.colorcolumn = "80"
|
||||
|
||||
vim.cmd("syntax on")
|
||||
vim.cmd("filetype plugin on")
|
||||
|
||||
if vim.fn.has("multi_byte") == 1 and vim.o.encoding == "utf-8" then
|
||||
o.listchars = [[tab:▸ ,extends:❯,precedes:❮,nbsp:±,trail:…]]
|
||||
else
|
||||
o.listchars = [[tab:> ,extends:>,precedes:<,nbsp:.,trail:_]]
|
||||
end
|
||||
|
||||
vim.g.mapleader = ","
|
||||
vim.g.maplocaleader = "\\"
|
||||
|
||||
o.splitbelow = true
|
||||
o.splitright = true
|
||||
nmap("<A-r>", "<C-w>r")
|
||||
|
||||
nmap("<A-1>", "1gt")
|
||||
nmap("<A-2>", "2gt")
|
||||
nmap("<A-3>", "3gt")
|
||||
nmap("<A-4>", "4gt")
|
||||
nmap("<A-5>", "5gt")
|
||||
nmap("<A-6>", "6gt")
|
||||
nmap("<A-7>", "7gt")
|
||||
nmap("<A-8>", "8gt")
|
||||
nmap("<A-9>", ":tablast<cr>")
|
||||
|
||||
nmap("<C-l>", ":nohl<CR><C-l>")
|
||||
|
||||
-- todo: try to do it with `vim.api.nvim_set_hl`
|
||||
vim.cmd("hi CursorLine cterm=NONE,underline ctermbg=NONE") -- highlight line when in insert mode
|
||||
|
||||
o.timeoutlen = 1000
|
||||
o.ttimeoutlen = 0
|
||||
|
||||
vim.cmd("autocmd InsertEnter * :set cursorline")
|
||||
vim.cmd("autocmd InsertLeave * :set nocursorline")
|
||||
|
||||
-- indentation
|
||||
vim.cmd("filetype indent on")
|
||||
o.softtabstop = 4
|
||||
o.expandtab = true
|
||||
o.shiftwidth = 4
|
||||
o.tabstop = 4
|
||||
o.autoindent = true
|
||||
o.copyindent = true
|
||||
|
||||
-- folds
|
||||
o.foldmethod = "indent"
|
||||
o.foldnestmax = 3
|
||||
o.foldenable = false
|
||||
|
||||
o.termguicolors = true
|
||||
vim.g.gruvbox_contrast_dark = "hard"
|
||||
vim.g.gruvbox_contrast_light = "hard"
|
||||
vim.g.gruvbox_italic = 1
|
||||
vim.g.gruvbox_invert_indent_guides = 1
|
||||
vim.g.gruvbox_vert_split = "bg1"
|
||||
vim.cmd("colorscheme gruvbox")
|
||||
o.background = "dark"
|
||||
|
||||
vim.g.markdown_syntax_conceal = 0
|
||||
|
||||
o.updatetime = 100 -- to make gigutter more responsive
|
||||
|
||||
vim.g["fern#renderer"] = "nerdfont"
|
||||
vim.cmd([[
|
||||
function! s:init_fern() abort
|
||||
nmap <buffer> T <Plug>(fern-action-open:tab)
|
||||
nmap <buffer> S <Plug>(fern-action-open:split)
|
||||
nmap <buffer> V <Plug>(fern-action-open:vsplit)
|
||||
nmap <buffer> <Space> <Plug>(fern-action-mark:toggle)
|
||||
endfunction
|
||||
|
||||
augroup fern-custom
|
||||
autocmd! *
|
||||
autocmd FileType fern call s:init_fern()
|
||||
augroup END
|
||||
|
||||
augroup my-glyph-palette
|
||||
autocmd! *
|
||||
autocmd FileType fern call glyph_palette#apply()
|
||||
autocmd FileType nerdtree,startify call glyph_palette#apply()
|
||||
augroup END
|
||||
]])
|
||||
nmap("<leader>t", ":Fern . -drawer -toggle<cr>")
|
||||
nmap("<leader>f", ":Files<cr>")
|
||||
nmap("<leader>rg", ":Rg<cr>")
|
||||
nmap("<leader><Bs>", ": cd ..<cr>")
|
||||
nmap("<leader>b", ": Buffers<cr>")
|
||||
|
||||
vim.g["indentLine_char"] = "▏"
|
||||
vim.g["indentLine_setConceal"] = 0
|
||||
|
||||
vim.g["slime_target"] = "tmux"
|
||||
vim.g["slime_python_ipython"] = 1
|
||||
|
||||
vim.g["tmux_navigator_no_mappings"] = 1
|
||||
nmap("<A-h>", ":TmuxNavigateLeft<cr>")
|
||||
nmap("<A-j>", ":TmuxNavigateDown<cr>")
|
||||
nmap("<A-k>", ":TmuxNavigateUp<cr>")
|
||||
nmap("<A-l>", ":TmuxNavigateRight<cr>")
|
||||
|
||||
vim.g["airline_theme"] = "base16_gruvbox_dark_hard"
|
||||
vim.g["airline#extensions#tabline#enabled"] = 1
|
||||
vim.g["airline#extensions#ale#enabled"] = 1
|
||||
|
||||
vim.g["ale_lint_on_text_changed"] = "never"
|
||||
vim.g["ale_lint_on_insert_leave"] = 0
|
||||
vim.g["ale_lint_on_enter"] = 0
|
||||
|
||||
vim.g["deoplete#enable_at_startup"] = 1
|
||||
|
||||
-- vim.g["black_virtualenv"] = "/Users/rilla/virtualenvs/black"
|
||||
|
||||
vim.g["shfmt_extra_args"] = "-i 4"
|
||||
vim.g["NERDDefaultAlign"] = "left"
|
||||
|
||||
vim.g["UltiSnipsExpandTrigger"] = "<tab>"
|
||||
vim.g["UltiSnipsJumpForwardTrigger"] = "<c-b>"
|
||||
vim.g["UltiSnipsJumpBackwardTrigger"] = "<c-z>"
|
||||
|
||||
local formatters = {
|
||||
go = ":GoFmt<CR>",
|
||||
json = ":%!jq --indent 4 .<CR>",
|
||||
nix = ":%!nixfmt < %<CR>",
|
||||
-- python = ":Black<CR>",
|
||||
python = [[<cmd>lua vim.lsp.buf.format()<CR>]],
|
||||
sh = ":Shfmt<CR>",
|
||||
sql = ":%!sqlfluff fix -<CR>",
|
||||
terraform = ":TerraformFmt<CR>",
|
||||
lua = [[<cmd>lua require("stylua-nvim").format_file()<CR>]],
|
||||
}
|
||||
|
||||
for pattern, command in pairs(formatters) do
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = pattern,
|
||||
callback = function()
|
||||
nmap("<C-f>", command)
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
require("lspconfig").pyright.setup({})
|
||||
|
||||
require("lspconfig").efm.setup({
|
||||
init_options = { documentFormatting = true },
|
||||
settings = {
|
||||
rootMarkers = { ".git/", "pyproject.toml" },
|
||||
languages = {
|
||||
python = { { formatCommand = "black -", formatStdin = true } },
|
||||
},
|
||||
},
|
||||
})
|
|
@ -1,266 +0,0 @@
|
|||
{ config, inputs, pkgs, stablePkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
nixpkgs.config = { allowUnfree = true; };
|
||||
|
||||
nixpkgs.overlays = [
|
||||
# (self: super: {
|
||||
# # use lf fork with support for sixel graphics
|
||||
# lf = super.lf.overrideAttrs (old: {
|
||||
# src = super.fetchFromGitHub {
|
||||
# owner = "horriblename";
|
||||
# repo = "lf";
|
||||
# rev = "8997e5b03772d5628ed6a490777048581d978674";
|
||||
# sha256 = "rJq2Tv3py6HvRI1O2odTdGb1ksdijhO3FcJsPj5dm34=";
|
||||
# };
|
||||
# });
|
||||
# })
|
||||
|
||||
(self: super: {
|
||||
# get latest version of kile-wl for compatibility with river's latest version
|
||||
kile-wl = super.kile-wl.overrideAttrs (old: rec {
|
||||
version = "2023-04-13";
|
||||
src = super.fetchFromGitLab {
|
||||
owner = "snakedye";
|
||||
repo = "kile";
|
||||
rev = "d5b6c1fd0f260e823e08811dae202e9394037c43";
|
||||
sha256 = "sha256-bWtuLSw4e57YOjdzbY7yobbe4kp67YzG15nhNce3pxA=";
|
||||
};
|
||||
cargoDeps = old.cargoDeps.overrideAttrs (_: {
|
||||
inherit src;
|
||||
outputHash = "sha256-yXIW1/KHmUS9ubRYI8nAKD2VZaQ+vCyCBhm788pLpwA=";
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
# I need the stable version of river to keep it compatible with kile
|
||||
# (self: super: { river = stablePkgs.river; })
|
||||
|
||||
# these packages seem to be broken on the unstable channel, so I'm using
|
||||
# the stable versions for now
|
||||
];
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
# programs.home-manager.enable = true;
|
||||
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
home.username = "rilla";
|
||||
home.homeDirectory = "/home/rilla";
|
||||
|
||||
imports = [
|
||||
./arduino
|
||||
./barrier
|
||||
./browsers
|
||||
./cheat
|
||||
./dav
|
||||
./drawterm
|
||||
./fonts
|
||||
./git
|
||||
./gotify
|
||||
./gpg
|
||||
./idasen
|
||||
./lf
|
||||
./mail
|
||||
./maker
|
||||
# ./minidisc
|
||||
./mpd
|
||||
./msg
|
||||
./music
|
||||
./neovim
|
||||
./nsxiv
|
||||
./pass
|
||||
./rss
|
||||
./snapcast
|
||||
./sound
|
||||
./ssh
|
||||
./syncthing
|
||||
./tmux
|
||||
./vitetris
|
||||
./wallets
|
||||
./wine
|
||||
./xdg
|
||||
./zsh
|
||||
];
|
||||
|
||||
home.persistence = {
|
||||
"/mnt/data/${config.home.homeDirectory}" = {
|
||||
directories = [
|
||||
"Audio"
|
||||
"Calendars"
|
||||
"Contacts"
|
||||
"Documents"
|
||||
"Downloads"
|
||||
"Images"
|
||||
"Maildir"
|
||||
"Monero"
|
||||
"code"
|
||||
"misc"
|
||||
"workspace"
|
||||
];
|
||||
allowOther = true;
|
||||
};
|
||||
|
||||
"/mnt/vfs_share/${config.home.homeDirectory}" = {
|
||||
directories = [ "vfs_share" ];
|
||||
allowOther = true;
|
||||
};
|
||||
|
||||
"/mnt/persist/${config.home.homeDirectory}" = {
|
||||
directories = [
|
||||
".Slic3r"
|
||||
".abook"
|
||||
".bitmonero"
|
||||
".config/Element"
|
||||
".config/Nextcloud"
|
||||
".config/Signal"
|
||||
".config/SuperCollider"
|
||||
".config/ardour6"
|
||||
".config/chromium"
|
||||
".config/kdeconnect"
|
||||
".config/kicad"
|
||||
".config/nvim/plugin"
|
||||
".config/syncthing"
|
||||
".config/tea"
|
||||
".config/whatsapp-for-linux"
|
||||
".electrum"
|
||||
".gnupg"
|
||||
".hydrogen"
|
||||
".john"
|
||||
".kube"
|
||||
".librewolf"
|
||||
".local/share/Bisq"
|
||||
".local/share/Nextcloud"
|
||||
".local/share/Steam"
|
||||
".local/share/SuperCollider"
|
||||
".local/share/TelegramDesktop"
|
||||
".local/share/nvim"
|
||||
{
|
||||
directory = ".local/share/containers";
|
||||
method = "symlink";
|
||||
}
|
||||
".local/share/dino"
|
||||
".local/share/direnv"
|
||||
".local/share/gopass/stores"
|
||||
".local/share/keyrings"
|
||||
".local/share/mpd"
|
||||
".local/share/tor-browser"
|
||||
".local/share/webkitgtk"
|
||||
".local/state/wireplumber"
|
||||
".local/state/zsh"
|
||||
".mozilla"
|
||||
".newsboat"
|
||||
".password-store"
|
||||
".platformio"
|
||||
".vagrant.d"
|
||||
".vdirsyncer"
|
||||
".virtualenvs"
|
||||
".wine"
|
||||
"Nextcloud"
|
||||
"configs"
|
||||
# ".cache"
|
||||
];
|
||||
files = [ ".mailsynclastrun" ".ssh/known_hosts" ".lmmsrc.xml" ];
|
||||
allowOther = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "${pkgs.neovim}/bin/nvim";
|
||||
VISUAL = "${pkgs.neovim}/bin/nvim";
|
||||
BROWSER = "${pkgs.firefox}/bin/firefox";
|
||||
# OPENER = "todo"; # todo
|
||||
TERMINAL = "${pkgs.alacritty}/bin/alacritty";
|
||||
CM_LAUNCHER = "rofi"; # for clipmenu
|
||||
LEDGER_FILE = "${config.home.homeDirectory}/finance/2021.journal";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# calibre
|
||||
R
|
||||
acpi
|
||||
android-tools
|
||||
ansible
|
||||
bind.dnsutils
|
||||
# pyenv
|
||||
docker-compose
|
||||
file
|
||||
gimp
|
||||
gnumake
|
||||
html-tidy
|
||||
htop
|
||||
inetutils # telnet
|
||||
j2cli
|
||||
john
|
||||
jq
|
||||
killall
|
||||
kubectl
|
||||
libnotify
|
||||
libreoffice
|
||||
lxqt.pcmanfm-qt
|
||||
mosh
|
||||
mpv
|
||||
neofetch
|
||||
pynitrokey
|
||||
networkmanagerapplet
|
||||
nextcloud-client
|
||||
pandoc
|
||||
podman-compose
|
||||
pv
|
||||
ripgrep
|
||||
sassc
|
||||
screen
|
||||
shellcheck
|
||||
signify
|
||||
unzip
|
||||
vagrant
|
||||
virt-manager
|
||||
virtiofsd
|
||||
wget
|
||||
];
|
||||
|
||||
# services.kdeconnect = {
|
||||
# enable = true;
|
||||
# indicator = true;
|
||||
# };
|
||||
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = { theme = "gruvbox-dark"; };
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# defaultOptions = [
|
||||
# "--preview --preview 'bat --color=always --style=header,grid --line-range :300 {}'"
|
||||
# ];
|
||||
tmux.enableShellIntegration = true;
|
||||
};
|
||||
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
components = [ "secrets" ];
|
||||
};
|
||||
|
||||
#services.nextcloud-client = {
|
||||
# enable = true;
|
||||
# startInBackground = true;
|
||||
#};
|
||||
|
||||
dconf.settings = {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
"autoconnect" = [ "qemu:///system" ];
|
||||
"uris" = [ "qemu:///system" ];
|
||||
};
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
home.stateVersion = "22.11";
|
||||
}
|
|
@ -1,200 +0,0 @@
|
|||
#ifdef _WINDOW_CONFIG
|
||||
|
||||
/* default window dimensions (overwritten via -g option): */
|
||||
static const int WIN_WIDTH = 800;
|
||||
static const int WIN_HEIGHT = 600;
|
||||
|
||||
/* colors and font can be overwritten via X resource properties.
|
||||
* See nsxiv(1), X(7) section Resources and xrdb(1) for more information.
|
||||
*/
|
||||
static const char *DEFAULT_WIN_BG = "#282828";
|
||||
static const char *DEFAULT_WIN_FG = "#ebdbb2";
|
||||
static const char *DEFAULT_MARK_COLOR = NULL; /* NULL means it will default to window foreground */
|
||||
#if HAVE_LIBFONTS
|
||||
static const char *DEFAULT_BAR_BG = "#282828"; /* NULL means it will default to window background */
|
||||
static const char *DEFAULT_BAR_FG = "#ebdbb2"; /* NULL means it will default to window foreground */
|
||||
static const char *DEFAULT_FONT = "Inter:size=9";
|
||||
|
||||
/* if true, statusbar appears on top of the window */
|
||||
static const bool TOP_STATUSBAR = false;
|
||||
#endif /* HAVE_LIBFONTS */
|
||||
|
||||
#endif
|
||||
#ifdef _IMAGE_CONFIG
|
||||
|
||||
/* levels (in percent) to use when zooming via '-' and '+':
|
||||
* (first/last value is used as min/max zoom level)
|
||||
*/
|
||||
static const float zoom_levels[] = {
|
||||
12.5, 25.0, 50.0, 75.0,
|
||||
100.0, 150.0, 200.0, 400.0, 800.0
|
||||
};
|
||||
|
||||
/* default slideshow delay (in sec, overwritten via -S option): */
|
||||
static const int SLIDESHOW_DELAY = 5;
|
||||
|
||||
/* gamma correction: the user-visible ranges [-GAMMA_RANGE, 0] and
|
||||
* (0, GAMMA_RANGE] are mapped to the ranges [0, 1], and (1, GAMMA_MAX].
|
||||
*/
|
||||
static const double GAMMA_MAX = 10.0;
|
||||
static const int GAMMA_RANGE = 32;
|
||||
|
||||
/* command i_scroll pans image 1/PAN_FRACTION of screen width/height */
|
||||
static const int PAN_FRACTION = 5;
|
||||
|
||||
/* if false, pixelate images at zoom level != 100%,
|
||||
* toggled with 'a' key binding
|
||||
*/
|
||||
static const bool ANTI_ALIAS = true;
|
||||
|
||||
/* if true, use a checkerboard background for alpha layer,
|
||||
* toggled with 'A' key binding
|
||||
*/
|
||||
static const bool ALPHA_LAYER = false;
|
||||
|
||||
/* percentage of memory to use for imlib2's cache size.
|
||||
* 3 means use 3% of total memory which is about 245MiB on 8GiB machine.
|
||||
* 0 or less means disable cache.
|
||||
* 100 means use all available memory (but not above CACHE_SIZE_LIMIT).
|
||||
*/
|
||||
static const int CACHE_SIZE_MEM_PERCENTAGE = 3; /* use 3% of total memory for cache */
|
||||
static const int CACHE_SIZE_LIMIT = 256 * 1024 * 1024; /* but not above 256MiB */
|
||||
static const int CACHE_SIZE_FALLBACK = 32 * 1024 * 1024; /* fallback to 32MiB if we can't determine total memory */
|
||||
|
||||
#endif
|
||||
#ifdef _THUMBS_CONFIG
|
||||
|
||||
/* thumbnail sizes in pixels (width == height): */
|
||||
static const int thumb_sizes[] = { 32, 64, 96, 128, 160 };
|
||||
|
||||
/* thumbnail size at startup, index into thumb_sizes[]: */
|
||||
static const int THUMB_SIZE = 3;
|
||||
|
||||
#endif
|
||||
#ifdef _MAPPINGS_CONFIG
|
||||
|
||||
/* these modifiers will be used when processing keybindings */
|
||||
static const unsigned int USED_MODMASK = ShiftMask | ControlMask | Mod1Mask;
|
||||
|
||||
/* abort the keyhandler */
|
||||
static const KeySym KEYHANDLER_ABORT = XK_Escape;
|
||||
|
||||
/* keyboard mappings for image and thumbnail mode: */
|
||||
static const keymap_t keys[] = {
|
||||
/* modifiers key function argument */
|
||||
{ 0, XK_q, g_quit, 0 },
|
||||
{ 0, XK_Return, g_switch_mode, None },
|
||||
{ 0, XK_f, g_toggle_fullscreen, None },
|
||||
{ 0, XK_b, g_toggle_bar, None },
|
||||
{ ControlMask, XK_x, g_prefix_external, None },
|
||||
{ 0, XK_g, g_first, None },
|
||||
{ 0, XK_G, g_n_or_last, None },
|
||||
{ 0, XK_r, g_reload_image, None },
|
||||
{ 0, XK_D, g_remove_image, None },
|
||||
{ ControlMask, XK_h, g_scroll_screen, DIR_LEFT },
|
||||
{ ControlMask, XK_Left, g_scroll_screen, DIR_LEFT },
|
||||
{ ControlMask, XK_j, g_scroll_screen, DIR_DOWN },
|
||||
{ ControlMask, XK_Down, g_scroll_screen, DIR_DOWN },
|
||||
{ ControlMask, XK_k, g_scroll_screen, DIR_UP },
|
||||
{ ControlMask, XK_Up, g_scroll_screen, DIR_UP },
|
||||
{ ControlMask, XK_l, g_scroll_screen, DIR_RIGHT },
|
||||
{ ControlMask, XK_Right, g_scroll_screen, DIR_RIGHT },
|
||||
{ 0, XK_plus, g_zoom, +1 },
|
||||
{ 0, XK_KP_Add, g_zoom, +1 },
|
||||
{ 0, XK_minus, g_zoom, -1 },
|
||||
{ 0, XK_KP_Subtract, g_zoom, -1 },
|
||||
{ 0, XK_m, g_toggle_image_mark, None },
|
||||
{ 0, XK_M, g_mark_range, None },
|
||||
{ ControlMask, XK_m, g_reverse_marks, None },
|
||||
{ ControlMask, XK_u, g_unmark_all, None },
|
||||
{ 0, XK_N, g_navigate_marked, +1 },
|
||||
{ 0, XK_P, g_navigate_marked, -1 },
|
||||
{ 0, XK_braceleft, g_change_gamma, -1 },
|
||||
{ 0, XK_braceright, g_change_gamma, +1 },
|
||||
{ ControlMask, XK_g, g_change_gamma, 0 },
|
||||
|
||||
{ 0, XK_h, t_move_sel, DIR_LEFT },
|
||||
{ 0, XK_Left, t_move_sel, DIR_LEFT },
|
||||
{ 0, XK_j, t_move_sel, DIR_DOWN },
|
||||
{ 0, XK_Down, t_move_sel, DIR_DOWN },
|
||||
{ 0, XK_k, t_move_sel, DIR_UP },
|
||||
{ 0, XK_Up, t_move_sel, DIR_UP },
|
||||
{ 0, XK_l, t_move_sel, DIR_RIGHT },
|
||||
{ 0, XK_Right, t_move_sel, DIR_RIGHT },
|
||||
{ 0, XK_R, t_reload_all, None },
|
||||
|
||||
{ 0, XK_n, i_navigate, +1 },
|
||||
{ 0, XK_n, i_scroll_to_edge, DIR_LEFT | DIR_UP },
|
||||
{ 0, XK_space, i_navigate, +1 },
|
||||
{ 0, XK_p, i_navigate, -1 },
|
||||
{ 0, XK_p, i_scroll_to_edge, DIR_LEFT | DIR_UP },
|
||||
{ 0, XK_BackSpace, i_navigate, -1 },
|
||||
{ 0, XK_bracketright, i_navigate, +10 },
|
||||
{ 0, XK_bracketleft, i_navigate, -10 },
|
||||
{ ControlMask, XK_6, i_alternate, None },
|
||||
{ ControlMask, XK_n, i_navigate_frame, +1 },
|
||||
{ ControlMask, XK_p, i_navigate_frame, -1 },
|
||||
{ ControlMask, XK_space, i_toggle_animation, None },
|
||||
{ ControlMask, XK_a, i_toggle_animation, None },
|
||||
{ 0, XK_h, i_scroll, DIR_LEFT },
|
||||
{ 0, XK_Left, i_scroll, DIR_LEFT },
|
||||
{ 0, XK_j, i_scroll, DIR_DOWN },
|
||||
{ 0, XK_Down, i_scroll, DIR_DOWN },
|
||||
{ 0, XK_k, i_scroll, DIR_UP },
|
||||
{ 0, XK_Up, i_scroll, DIR_UP },
|
||||
{ 0, XK_l, i_scroll, DIR_RIGHT },
|
||||
{ 0, XK_Right, i_scroll, DIR_RIGHT },
|
||||
{ 0, XK_H, i_scroll_to_edge, DIR_LEFT },
|
||||
{ 0, XK_J, i_scroll_to_edge, DIR_DOWN },
|
||||
{ 0, XK_K, i_scroll_to_edge, DIR_UP },
|
||||
{ 0, XK_L, i_scroll_to_edge, DIR_RIGHT },
|
||||
{ 0, XK_z, i_scroll_to_center, None },
|
||||
{ 0, XK_equal, i_set_zoom, 100 },
|
||||
{ 0, XK_w, i_fit_to_win, SCALE_DOWN },
|
||||
{ 0, XK_W, i_fit_to_win, SCALE_FIT },
|
||||
{ 0, XK_F, i_fit_to_win, SCALE_FILL },
|
||||
{ 0, XK_e, i_fit_to_win, SCALE_WIDTH },
|
||||
{ 0, XK_E, i_fit_to_win, SCALE_HEIGHT },
|
||||
{ 0, XK_less, i_rotate, DEGREE_270 },
|
||||
{ 0, XK_greater, i_rotate, DEGREE_90 },
|
||||
{ 0, XK_question, i_rotate, DEGREE_180 },
|
||||
{ 0, XK_bar, i_flip, FLIP_HORIZONTAL },
|
||||
{ 0, XK_underscore, i_flip, FLIP_VERTICAL },
|
||||
{ 0, XK_a, i_toggle_antialias, None },
|
||||
{ 0, XK_A, i_toggle_alpha, None },
|
||||
{ 0, XK_s, i_slideshow, None },
|
||||
};
|
||||
|
||||
/* mouse button mappings for image mode: */
|
||||
static const button_t buttons_img[] = {
|
||||
/* modifiers button function argument */
|
||||
{ 0, 1, i_cursor_navigate, None },
|
||||
{ ControlMask, 1, i_drag, DRAG_RELATIVE },
|
||||
{ 0, 2, i_drag, DRAG_ABSOLUTE },
|
||||
{ 0, 3, g_switch_mode, None },
|
||||
{ 0, 4, g_zoom, +1 },
|
||||
{ 0, 5, g_zoom, -1 },
|
||||
};
|
||||
|
||||
/* mouse button mappings for thumbnail mode: */
|
||||
static const button_t buttons_tns[] = {
|
||||
/* modifiers button function argument */
|
||||
{ 0, 1, t_select, None },
|
||||
{ 0, 3, t_drag_mark_image, None },
|
||||
{ 0, 4, t_scroll, DIR_UP },
|
||||
{ 0, 5, t_scroll, DIR_DOWN },
|
||||
{ ControlMask, 4, g_scroll_screen, DIR_UP },
|
||||
{ ControlMask, 5, g_scroll_screen, DIR_DOWN },
|
||||
};
|
||||
|
||||
/* true means NAV_WIDTH is relative (33%), false means absolute (33 pixels) */
|
||||
static const bool NAV_IS_REL = true;
|
||||
/* width of navigation area, 0 disables cursor navigation, */
|
||||
static const unsigned int NAV_WIDTH = 33;
|
||||
|
||||
/* mouse cursor on left, middle and right part of the window */
|
||||
static const cursor_t imgcursor[3] = {
|
||||
CURSOR_LEFT, CURSOR_ARROW, CURSOR_RIGHT
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,5 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
# https://raw.githubusercontent.com/nsxiv/nsxiv/master/config.def.h
|
||||
let config = builtins.readFile ./config.h;
|
||||
in { home.packages = [ (pkgs.nsxiv.override { conf = config; }) ]; }
|
|
@ -1,10 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
shell = "${pkgs.dash}/bin/dash";
|
||||
newsboat = "${pkgs.newsboat}/bin/newsboat";
|
||||
in
|
||||
pkgs.writeScriptBin "rsssync" ''
|
||||
#!${shell}
|
||||
${newsboat} --execute="reload"
|
||||
''
|
|
@ -1,21 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let snapserver_ip = "192.168.1.144";
|
||||
in
|
||||
{
|
||||
home.packages = [ pkgs.snapcast ];
|
||||
|
||||
systemd.user.services.snapclient = {
|
||||
Unit = {
|
||||
After = [ "pipewire.service" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.snapcast}/bin/snapclient --host ${snapserver_ip}";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "pipewire.service" ];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
ssh-rsa-cert-v01@openssh.com AAAAHHNzaC1yc2EtY2VydC12MDFAb3BlbnNzaC5jb20AAAAg/2+dgwO+Ofq3Wvy8Vzx2NdEOdqx4b10w2lGINu318G4AAAADAQABAAACAQDaiwmnSKC4DpznZlode1987DvGVLWqkvDZXZ6ey/LOZhRHvNnr5lP4Ke034R17mHHuTlzzuTKUKTN6JcIxBURGUwjWgNQO5z+7SapdOvPpw7M8wOlgp92CbIMiE/tReNbUi2e584Y5NR4tMCQm+FPvQ7c7nY/WoxJ6VSiKBbXzN+IrB9H6ZAVyfAlzHpxhwXeuP5xFwTtapzyzyc4phvuIhbXUc9NOZHXwoAR2La/0TVOgDyktEmCq6aGet03Azz6KPRptdnf4g9V3u8YivccXfd9WTrJr9fj1fWjDU9bBKVU6GtdcSwfqKwa6X4sQIZfONKvVEfqbIIEB70FsXHcdfnm3EN5L1PWbC441Q8bB1zvu/GnlXTlxDFmzByxnbLWTSPLuQyKq5sv9va8Jl9QEVpS3qWJbPHYBTevgboTExyLmpEfsCI+Of86Oxb8PNjyhX1/oWiy8S3w+5oQgAb+yNfSVPnX7CO4oGQhnttoXHA94LzxArYr9zZIp2asRMlc4VVWVH/jQ4FdLDjvKNARYiytOplZBPvFOHJiGb/rfjZKbMPPE+3V1WQPZ6B2nlWN5QxTpnLgTQnONr5rlSrvzFPY8BISUAYcdOCErG4agHDkHFZqWn8u+51wUZUnXo4NI+rty4Nzmc/kPfqWyv/8mSJfihidfuuHGEEzCk1qVdQAAAAAAAAAAAAAAAQAAAAd5dWJpa2V5AAAAIgAAAAVyaWxsYQAAAAdhbnNpYmxlAAAACndvb2RwZWNrZXIAAAAAAAAAAP//////////AAAAAAAAAIIAAAAVcGVybWl0LVgxMS1mb3J3YXJkaW5nAAAAAAAAABdwZXJtaXQtYWdlbnQtZm9yd2FyZGluZwAAAAAAAAAWcGVybWl0LXBvcnQtZm9yd2FyZGluZwAAAAAAAAAKcGVybWl0LXB0eQAAAAAAAAAOcGVybWl0LXVzZXItcmMAAAAAAAAAAAAAADMAAAALc3NoLWVkMjU1MTkAAAAgdagSWswPONV2NxMqMFGoz+6IG2BMdoHBsEwwXId5P5AAAABTAAAAC3NzaC1lZDI1NTE5AAAAQGBK6cVFrPbg1/NgOYNYUKuCgNjCsJaIMXWaIt0lW5V8GRDQjdxfzNlEAlJv6+z0s58Ar4sartbuxxWyJGnL9wk= cardno:000611073199
|
|
@ -1 +0,0 @@
|
|||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDaiwmnSKC4DpznZlode1987DvGVLWqkvDZXZ6ey/LOZhRHvNnr5lP4Ke034R17mHHuTlzzuTKUKTN6JcIxBURGUwjWgNQO5z+7SapdOvPpw7M8wOlgp92CbIMiE/tReNbUi2e584Y5NR4tMCQm+FPvQ7c7nY/WoxJ6VSiKBbXzN+IrB9H6ZAVyfAlzHpxhwXeuP5xFwTtapzyzyc4phvuIhbXUc9NOZHXwoAR2La/0TVOgDyktEmCq6aGet03Azz6KPRptdnf4g9V3u8YivccXfd9WTrJr9fj1fWjDU9bBKVU6GtdcSwfqKwa6X4sQIZfONKvVEfqbIIEB70FsXHcdfnm3EN5L1PWbC441Q8bB1zvu/GnlXTlxDFmzByxnbLWTSPLuQyKq5sv9va8Jl9QEVpS3qWJbPHYBTevgboTExyLmpEfsCI+Of86Oxb8PNjyhX1/oWiy8S3w+5oQgAb+yNfSVPnX7CO4oGQhnttoXHA94LzxArYr9zZIp2asRMlc4VVWVH/jQ4FdLDjvKNARYiytOplZBPvFOHJiGb/rfjZKbMPPE+3V1WQPZ6B2nlWN5QxTpnLgTQnONr5rlSrvzFPY8BISUAYcdOCErG4agHDkHFZqWn8u+51wUZUnXo4NI+rty4Nzmc/kPfqWyv/8mSJfihidfuuHGEEzCk1qVdQ== cardno:000611073199
|
|
@ -1,5 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./nixos-common.nix ./desktop-river ./theming/trantor.nix ];
|
||||
}
|
|
@ -0,0 +1,168 @@
|
|||
# capibara
|
||||
|
||||
{ inputs, outputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./file-systems.nix
|
||||
./home-manager.nix
|
||||
./snapcast.nix
|
||||
outputs.nixosModules.common
|
||||
outputs.nixosModules.desktop
|
||||
];
|
||||
|
||||
networking.networkmanager.wifi.macAddress = "CC:AF:78:75:29:32";
|
||||
|
||||
programs.steam.enable = true;
|
||||
services.earlyoom.enable = true;
|
||||
|
||||
# Power management
|
||||
powerManagement.enable = true;
|
||||
services.upower.enable = true;
|
||||
# services.thermald.enable = true;
|
||||
services.tlp.enable = true;
|
||||
services.power-profiles-daemon.enable = false;
|
||||
environment.systemPackages = with pkgs; [ powertop acpi ];
|
||||
|
||||
environment.etc = {
|
||||
ssh-pub-key = {
|
||||
target = "ssh/ssh_host_ed25519_key.pub";
|
||||
source = ./ssh_host_ed25519_key.pub;
|
||||
};
|
||||
ssh-pub-key-cert = {
|
||||
target = "ssh/ssh_host_ed25519_key-cert.pub";
|
||||
source = ./ssh_host_ed25519_key-cert.pub;
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets.ssh-key = {
|
||||
file = outputs.secrets.capibara.ssh_host_ed25519_key;
|
||||
mode = "400";
|
||||
owner = "root";
|
||||
group = "root";
|
||||
symlink = false;
|
||||
path = "/mnt/persist/etc/ssh/ssh_host_ed25519_key";
|
||||
};
|
||||
|
||||
# todo: target and/or archive
|
||||
services.btrbk.instances = {
|
||||
btrbk = {
|
||||
onCalendar = "*:0/30"; # every 30 minutes
|
||||
settings = {
|
||||
snapshot_preserve = "2d";
|
||||
snapshot_preserve_min = "latest";
|
||||
snapshot_create = "onchange";
|
||||
volume."/mnt/btr_data" = {
|
||||
snapshot_dir = "btrbk_snapshots";
|
||||
subvolume = {
|
||||
data = { };
|
||||
persist = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# doas -u btrbk btrbk -c /etc/btrbk/offline-backups.conf --dry-run --progress --verbose run
|
||||
offline-backups = {
|
||||
onCalendar = null;
|
||||
settings = {
|
||||
ssh_user = "btrbk";
|
||||
ssh_identity = "/etc/btrbk/id_ed25519";
|
||||
backend_remote = "btrfs-progs-doas";
|
||||
snapshot_create = "onchange";
|
||||
snapshot_preserve_min = "latest";
|
||||
target_preserve_min = "all";
|
||||
volume = {
|
||||
|
||||
"ssh://narwhal:22/mnt/btr_pool" = {
|
||||
stream_buffer = "50%";
|
||||
stream_compress = "zstd";
|
||||
snapshot_dir = "btrbk_snapshots_offline";
|
||||
subvolume = {
|
||||
backups = { };
|
||||
books = { };
|
||||
certs = { };
|
||||
data = { };
|
||||
docker_volumes = { };
|
||||
home = { };
|
||||
http = { };
|
||||
music = { };
|
||||
secrets = { };
|
||||
transmission = { };
|
||||
videos = { };
|
||||
};
|
||||
target = {
|
||||
"/mnt/backups/0/btr_backup/narwhal" = { };
|
||||
"/mnt/backups/1/btr_backup/narwhal" = { };
|
||||
"/mnt/backups/2/btr_backup/narwhal" = { };
|
||||
};
|
||||
};
|
||||
|
||||
"ssh://suricata:22/mnt/btr_pool" = {
|
||||
stream_buffer = "50%";
|
||||
snapshot_dir = "btrbk_snapshots_offline";
|
||||
compat_remote = "busybox";
|
||||
subvolume = {
|
||||
home = { };
|
||||
rancher_config = { };
|
||||
backups = { };
|
||||
configs = { };
|
||||
};
|
||||
target = {
|
||||
"/mnt/backups/0/btr_backup/suricata" = { };
|
||||
"/mnt/backups/1/btr_backup/suricata" = { };
|
||||
"/mnt/backups/2/btr_backup/suricata" = { };
|
||||
};
|
||||
};
|
||||
|
||||
"ssh://caladan/mnt/btr_pool" = {
|
||||
stream_buffer = "50%";
|
||||
snapshot_dir = "btrbk_snapshots_offline";
|
||||
compat_remote = "busybox";
|
||||
subvolume = {
|
||||
certs = { };
|
||||
volumes = { };
|
||||
};
|
||||
target = {
|
||||
"/mnt/backups/0/btr_backup/caladan" = { };
|
||||
"/mnt/backups/1/btr_backup/caladan" = { };
|
||||
"/mnt/backups/2/btr_backup/caladan" = { };
|
||||
};
|
||||
};
|
||||
|
||||
"/mnt/btr_data" = {
|
||||
snapshot_dir = "btrbk_snapshots_offline";
|
||||
subvolume = {
|
||||
data = { };
|
||||
persist = { };
|
||||
};
|
||||
target = {
|
||||
"/mnt/backups/0/btr_backup/capibara" = { };
|
||||
"/mnt/backups/1/btr_backup/capibara" = { };
|
||||
"/mnt/backups/2/btr_backup/capibara" = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ];
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "capibara";
|
||||
interfaces = {
|
||||
eno0.useDHCP = true;
|
||||
wlp2s0.useDHCP = true;
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
|
@ -0,0 +1,135 @@
|
|||
{ config, pkgs, stablePkgs, ... }:
|
||||
|
||||
{
|
||||
boot = {
|
||||
|
||||
loader = {
|
||||
grub = {
|
||||
efiSupport = false;
|
||||
efiInstallAsRemovable = false;
|
||||
enable = true;
|
||||
device = "/dev/disk/by-id/ata-KINGSTON_SKC600MS512G_50026B7783FC3D2F";
|
||||
};
|
||||
};
|
||||
initrd = {
|
||||
luks = {
|
||||
devices = {
|
||||
root = {
|
||||
device = "/dev/disk/by-uuid/869b4b9e-5004-4625-877f-6b1c9489ac8f";
|
||||
allowDiscards = true;
|
||||
};
|
||||
data = {
|
||||
device = "/dev/disk/by-uuid/6a9246a0-984b-471c-9950-be16db3060f5";
|
||||
allowDiscards = true;
|
||||
};
|
||||
};
|
||||
reusePassphrases = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "tmpfs";
|
||||
fsType = "tmpfs";
|
||||
options = [ "defaults" "size=2G" "mode=755" ];
|
||||
};
|
||||
|
||||
"/mnt/btr_root" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/mnt/btr_data" = {
|
||||
device = "/dev/mapper/data";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/mnt/persist" = {
|
||||
device = "/dev/mapper/data";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=persist" "compress=zstd" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/mnt/logs" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=logs" "compress=zstd" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/mnt/data" = {
|
||||
device = "/dev/mapper/data";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=data" "compress=zstd" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/mnt/secrets" = {
|
||||
device = "narwhal:/secrets";
|
||||
fsType = "nfs";
|
||||
options = [ "noauto" ];
|
||||
};
|
||||
|
||||
"/mnt/secrets/gnupg" = {
|
||||
device = "/dev/mapper/gnupg_secrets";
|
||||
fsType = "btrfs";
|
||||
options = [ "noauto" ];
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/c99d1f1b-45a4-4a25-b5b8-bc76464c6825";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
"/swap" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=swap" ];
|
||||
};
|
||||
|
||||
"/mnt/vfs_share" = {
|
||||
device = "/dev/mapper/data";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=vfs_share" "compress=zstd" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/mnt/backups/0" = {
|
||||
device = "/dev/mapper/backups0";
|
||||
fsType = "btrfs";
|
||||
options = [ "noauto" "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/mnt/backups/1" = {
|
||||
device = "/dev/mapper/backups1";
|
||||
fsType = "btrfs";
|
||||
options = [ "noauto" "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/mnt/backups/2" = {
|
||||
device = "/dev/mapper/backups2";
|
||||
fsType = "btrfs";
|
||||
options = [ "noauto" "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/swap/swapfile"; }];
|
||||
|
||||
environment.etc.crypttab.text = ''
|
||||
backups0 UUID="e45232d5-f46f-46f3-a150-be26374b3357" /etc/luks-keys/backups.bin noauto
|
||||
backups1 UUID="5b3da928-4862-4451-89cd-5bd6a95466d0" /etc/luks-keys/backups.bin noauto
|
||||
backups2 UUID="cbfa9cba-dee2-4d0b-8cde-2f1d1849b22c" /etc/luks-keys/backups.bin noauto
|
||||
gnupg_secrets /mnt/secrets/gnupg.img none noauto
|
||||
'';
|
||||
}
|
|
@ -1,6 +1,3 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
|
@ -0,0 +1,23 @@
|
|||
{ inputs, outputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
users.rilla = {
|
||||
home = {
|
||||
packages = [ pkgs.offline-backups ];
|
||||
stateVersion = "22.11";
|
||||
username = "rilla";
|
||||
homeDirectory = "/home/rilla";
|
||||
};
|
||||
imports = [
|
||||
outputs.homeManagerModules.common
|
||||
outputs.homeManagerModules.extra
|
||||
outputs.homeManagerModules.snapclient
|
||||
];
|
||||
snapclient.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.snapserver = {
|
||||
enable = true;
|
||||
codec = "flac";
|
||||
http.docRoot = "${pkgs.snapcast}/share/snapserver/snapweb";
|
||||
streams = {
|
||||
pipewire = {
|
||||
type = "pipe";
|
||||
location = "/run/snapserver/pipewire";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.snapcast-sink = {
|
||||
wantedBy = [ "pipewire.service" ];
|
||||
after = [ "pipewire.service" ];
|
||||
bindsTo = [ "pipewire.service" ];
|
||||
path = with pkgs; [ gawk pulseaudio ];
|
||||
script = ''
|
||||
pactl load-module module-pipe-sink file=/run/snapserver/pipewire sink_name=Snapcast format=s16le rate=48000
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
ssh-ed25519-cert-v01@openssh.com AAAAIHNzaC1lZDI1NTE5LWNlcnQtdjAxQG9wZW5zc2guY29tAAAAIN1uoV7+UFX6EIdPzs9CdvxVxWYjT1jmLfT4OmJndjHQAAAAIAEfm3I/CAHARsvbiqemh6UYPFocE7D3NnwSqcbIc48qAAAAAAAAAAAAAAACAAAACGNhcGliYXJhAAAADAAAAAhjYXBpYmFyYQAAAABjE3hcAAAAAGTzWssAAAAAAAAAAAAAAAAAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIHperHwojXZeo3QWAu1f3kiCKeaHHSqBXJM6ZZEefxddAAAAUwAAAAtzc2gtZWQyNTUxOQAAAEDSalFb6LEVRYSH34+67zhOj9frcSEIwVxG8chQig+SVROJ2UV2bjhiLoXN/9bhjtYTvlm/P2QkEbS2oQHYj3oC root@narwhal
|
|
@ -0,0 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAEfm3I/CAHARsvbiqemh6UYPFocE7D3NnwSqcbIc48q root@narwhal
|
|
@ -0,0 +1,23 @@
|
|||
{ inputs, outputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ outputs.homeManagerModules.common ];
|
||||
|
||||
home = {
|
||||
username = "ricard";
|
||||
homeDirectory = "/home/ricard";
|
||||
};
|
||||
|
||||
home.stateVersion = "23.05";
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
{ inputs, outputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home = {
|
||||
username = "rilla";
|
||||
homeDirectory = "/home/rilla";
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
outputs.homeManagerModules.common
|
||||
outputs.homeManagerModules.dav
|
||||
outputs.homeManagerModules.mpd
|
||||
outputs.homeManagerModules.foot
|
||||
outputs.homeManagerModules.mail
|
||||
outputs.homeManagerModules.rss
|
||||
];
|
||||
|
||||
home.sessionPath = [
|
||||
"$HOME/.local/bin"
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [ wl-clipboard libnotify ];
|
||||
|
||||
home.stateVersion = "23.05";
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
{ inputs, outputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./file-systems.nix
|
||||
./home-manager.nix
|
||||
outputs.nixosModules.common
|
||||
outputs.nixosModules.desktop
|
||||
];
|
||||
|
||||
programs.steam.enable = true;
|
||||
|
||||
environment.etc = {
|
||||
ssh-pub-key = {
|
||||
target = "ssh/ssh_host_ed25519_key.pub";
|
||||
source = ./ssh_host_ed25519_key.pub;
|
||||
};
|
||||
ssh-pub-key-cert = {
|
||||
target = "ssh/ssh_host_ed25519_key-cert.pub";
|
||||
source = ./ssh_host_ed25519_key-cert.pub;
|
||||
};
|
||||
};
|
||||
|
||||
# todo: target and/or archive
|
||||
services.btrbk = {
|
||||
sshAccess = [{
|
||||
roles = [ "info" "source" "target" "delete" "snapshot" "send" "receive" ];
|
||||
key =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAJy2lSOeG4iCUlk+W0TK9DnJyHe/0XUU0PD0kokbWKF btrbk";
|
||||
}];
|
||||
instances.btrbk = {
|
||||
onCalendar = "*:0/30"; # every 30 minutes
|
||||
settings = {
|
||||
snapshot_preserve = "2d";
|
||||
snapshot_preserve_min = "latest";
|
||||
snapshot_create = "onchange";
|
||||
volume."/mnt/btr_user" = {
|
||||
snapshot_dir = "btrbk_snapshots";
|
||||
subvolume = {
|
||||
data = { };
|
||||
persist = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "trantor";
|
||||
interfaces = {
|
||||
enp3s0f1.useDHCP = true;
|
||||
wlp4s0.useDHCP = true;
|
||||
};
|
||||
networkmanager.wifi.macAddress = "80:FA:5B:41:12:0F";
|
||||
};
|
||||
|
||||
services.xserver = { videoDrivers = [ "nvidia" ]; };
|
||||
hardware.nvidia = {
|
||||
nvidiaPersistenced = true;
|
||||
modesetting.enable = true;
|
||||
prime = {
|
||||
sync.enable = true;
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
intelBusId = "PCI:0:2:0";
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
|
@ -0,0 +1,154 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot = {
|
||||
loader = {
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot/efi";
|
||||
};
|
||||
grub = {
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
enableCryptodisk = true;
|
||||
efiSupport = true;
|
||||
};
|
||||
};
|
||||
initrd = {
|
||||
luks = {
|
||||
#yubikeySupport = true;
|
||||
devices = {
|
||||
"system" = {
|
||||
device = "/dev/disk/by-uuid/b9778e01-a86c-4c6b-beb3-f97888d4a6eb";
|
||||
keyFile = "/system_keyfile.bin";
|
||||
allowDiscards = true;
|
||||
# yubikey = {
|
||||
# slot = 2;
|
||||
# twoFactor = false;
|
||||
# gracePeriod = 30;
|
||||
# keyLength = 64;
|
||||
# saltLength = 16;
|
||||
# storage = {
|
||||
# device = "/dev/nvme0n1p1";
|
||||
# fsType = "vfat";
|
||||
# path = "/crypt-storage/default";
|
||||
# };
|
||||
# };
|
||||
};
|
||||
"user" = {
|
||||
device = "/dev/disk/by-uuid/d8e9b35d-704a-4f66-bc19-0dd3e158de36";
|
||||
keyFile = "/user_keyfile.bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
secrets = {
|
||||
"/system_keyfile.bin" = "/etc/luks-keys/system.bin";
|
||||
"/user_keyfile.bin" = "/etc/luks-keys/user.bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
|
||||
"/" = {
|
||||
device = "tmpfs";
|
||||
fsType = "tmpfs";
|
||||
options = [ "defaults" "size=2G" "mode=755" ];
|
||||
};
|
||||
|
||||
"/boot/efi" = {
|
||||
device = "/dev/disk/by-uuid/0BFA-9A66";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
"/mnt/btr_system" = {
|
||||
device = "/dev/mapper/system";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/mnt/btr_user" = {
|
||||
device = "/dev/mapper/user";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/mnt/persist" = {
|
||||
device = "/dev/mapper/user";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=persist" "compress=zstd" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/mnt/data" = {
|
||||
device = "/dev/mapper/user";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=data" "compress=zstd" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/mnt/vfs_share" = {
|
||||
device = "/dev/mapper/user";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=vfs_share" "compress=zstd" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
device = "/dev/mapper/system";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/mnt/logs" = {
|
||||
device = "/dev/mapper/system";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=logs" "compress=zstd" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/mapper/system";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=boot" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/swap" = {
|
||||
device = "/dev/mapper/system";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=swap" ];
|
||||
};
|
||||
|
||||
"/mnt/narwhal" = {
|
||||
device = "narwhal:/";
|
||||
fsType = "nfs";
|
||||
};
|
||||
|
||||
"/mnt/backups/0" = {
|
||||
device = "/dev/mapper/backups0";
|
||||
fsType = "btrfs";
|
||||
options = [ "noauto" "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/mnt/backups/1" = {
|
||||
device = "/dev/mapper/backups1";
|
||||
fsType = "btrfs";
|
||||
options = [ "noauto" "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
"/mnt/backups/2" = {
|
||||
device = "/dev/mapper/backups2";
|
||||
fsType = "btrfs";
|
||||
options = [ "noauto" "subvolid=5" "compress=zstd" ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/swap/swapfile"; }];
|
||||
|
||||
environment.etc.crypttab.text = ''
|
||||
backups0 UUID="e45232d5-f46f-46f3-a150-be26374b3357" /etc/luks-keys/backups.bin noauto
|
||||
backups1 UUID="5b3da928-4862-4451-89cd-5bd6a95466d0" /etc/luks-keys/backups.bin noauto
|
||||
backups2 UUID="cbfa9cba-dee2-4d0b-8cde-2f1d1849b22c" /etc/luks-keys/backups.bin noauto
|
||||
'';
|
||||
}
|
|
@ -1,6 +1,3 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
|
@ -0,0 +1,22 @@
|
|||
{ inputs, outputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
users.rilla = {
|
||||
home = {
|
||||
username = "rilla";
|
||||
homeDirectory = "/home/rilla";
|
||||
packages = [ pkgs.offline-backups ];
|
||||
stateVersion = "22.11";
|
||||
};
|
||||
imports = [
|
||||
outputs.homeManagerModules.common
|
||||
outputs.homeManagerModules.extra
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
ssh-ed25519-cert-v01@openssh.com AAAAIHNzaC1lZDI1NTE5LWNlcnQtdjAxQG9wZW5zc2guY29tAAAAINaIBi2J/1pJ2bchrc74aBONRywW+aUnEwR9P/gwqo2lAAAAIG1qvkkxHQlAIjQIYoTokx+UgsRQd48kf2iuvbWJZHE2AAAAAAAAAAAAAAACAAAAB3RyYW50b3IAAAALAAAAB3RyYW50b3IAAAAAYxN4XAAAAABk81rLAAAAAAAAAAAAAAAAAAAAMwAAAAtzc2gtZWQyNTUxOQAAACB6Xqx8KI12XqN0FgLtX95Iginmhx0qgVyTOmWRHn8XXQAAAFMAAAALc3NoLWVkMjU1MTkAAABA/pGJOglx8wKauMh+naAQyHnV99z4YY9jXHKgYcVuORQzTPpLWOHMyiKbrz1Y9z3n4PrS6PIs9FKf8NRQU87ODQ== root@narwhal
|
|
@ -0,0 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG1qvkkxHQlAIjQIYoTokx+UgsRQd48kf2iuvbWJZHE2 root@narwhal
|
|
@ -0,0 +1,11 @@
|
|||
echidna:
|
||||
home-manager switch --flake .#rilla@echidna
|
||||
|
||||
coder-workspace:
|
||||
home-manager switch --flake .#ricard@coder-workspace
|
||||
|
||||
capibara:
|
||||
doas nixos-rebuild switch --flake .#capibara
|
||||
|
||||
trantor:
|
||||
doas nixos-rebuild switch --flake .#trantor
|
|
@ -1,18 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
pkgs.writeScriptBin "choose-pass" ''
|
||||
#!${pkgs.dash}/bin/dash
|
||||
|
||||
prefix=''${PASSWORD_STORE_DIR-"''${HOME}/.password-store"}
|
||||
|
||||
sel=$(
|
||||
${pkgs.findutils}/bin/find "$prefix" -name '*.gpg' | \
|
||||
${pkgs.gnused}/bin/sed -E "s|^''${prefix}/?||" | \
|
||||
${pkgs.gnused}/bin/sed 's/.gpg$//' | \
|
||||
/usr/local/bin/choose -f Inter -s 20 -c fbf1c7 -b 458588
|
||||
)
|
||||
|
||||
[ -n "$sel" ] || exit
|
||||
|
||||
${pkgs.pass}/bin/pass show "$sel" | tr -d "\n" | /usr/bin/pbcopy
|
||||
''
|
|
@ -1,131 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let choose-pass = pkgs.callPackage ./choose-pass.nix { inherit config pkgs; };
|
||||
in {
|
||||
# services.yabai = {
|
||||
# enable = true;
|
||||
# package = pkgs.yabai;
|
||||
# # enableScriptingAddition = true;
|
||||
# enableScriptingAddition = false;
|
||||
# config = {
|
||||
# external_bar = "all:28:0";
|
||||
# layout = "bsp";
|
||||
# auto_balance = "off";
|
||||
# mouse_modifier = "fn";
|
||||
# mouse_action1 = "move";
|
||||
# mouse_action2 = "resize";
|
||||
# mouse_follows_focus = "on";
|
||||
# focus_follows_mouse = "autoraise";
|
||||
# window_topmost = "on"; # floating windows always on top
|
||||
# window_shadow = "float";
|
||||
# window_opacity = "on";
|
||||
# active_window_opacity = "1.0";
|
||||
# normal_window_opacity = "1.0";
|
||||
# window_border = "on";
|
||||
# window_border_width = 8;
|
||||
# active_window_border_color = "0xff458588";
|
||||
# normal_window_border_color = "0xff504945";
|
||||
# };
|
||||
# extraConfig = ''
|
||||
# yabai -m rule --add app="^choose" manage=off
|
||||
# '';
|
||||
# };
|
||||
|
||||
services.skhd = {
|
||||
enable = true;
|
||||
package = pkgs.skhd;
|
||||
skhdConfig = ''
|
||||
# ctrl + alt - return : osascript /Users/rilla/configs/scripts/osascripts/iterm.scpt
|
||||
ctrl + alt - return : ${pkgs.alacritty}/bin/alacritty
|
||||
|
||||
ctrl + alt - 1 : yabai -m space --focus 1
|
||||
ctrl + alt - 2 : yabai -m space --focus 2
|
||||
ctrl + alt - 3 : yabai -m space --focus 3
|
||||
ctrl + alt - 4 : yabai -m space --focus 4
|
||||
ctrl + alt - 5 : yabai -m space --focus 5
|
||||
ctrl + alt - 6 : yabai -m space --focus 6
|
||||
ctrl + alt - 7 : yabai -m space --focus 7
|
||||
ctrl + alt - 8 : yabai -m space --focus 8
|
||||
ctrl + alt - 9 : yabai -m space --focus 9
|
||||
ctrl + alt - 0 : yabai -m space --focus 10
|
||||
|
||||
ctrl + alt - n : yabai -m window --focus next || yabai -m window --focus first
|
||||
ctrl + alt - p : yabai -m window --focus prev || yabai -m window --focus last
|
||||
|
||||
ctrl + alt + shift - r : yabai -m space --rotate 90
|
||||
|
||||
ctrl + alt + shift - 1 : yabai -m window --space 1
|
||||
ctrl + alt + shift - 2 : yabai -m window --space 2
|
||||
ctrl + alt + shift - 3 : yabai -m window --space 3
|
||||
ctrl + alt + shift - 4 : yabai -m window --space 4
|
||||
ctrl + alt + shift - 5 : yabai -m window --space 5
|
||||
ctrl + alt + shift - 6 : yabai -m window --space 6
|
||||
ctrl + alt + shift - 7 : yabai -m window --space 7
|
||||
ctrl + alt + shift - 8 : yabai -m window --space 8
|
||||
ctrl + alt + shift - 9 : yabai -m window --space 9
|
||||
ctrl + alt + shift - 0 : yabai -m window --space 10
|
||||
|
||||
# ctrl + alt + shift - space : yabai -m space --balance
|
||||
ctrl + alt - space : yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .["type"] == "bsp" then "float" else "bsp" end')
|
||||
ctrl + alt - b : yabai -m space --balance
|
||||
ctrl + alt + shift - space : yabai -m space --layout bsp
|
||||
|
||||
# ctrl + alt + shift - c : yabai -m window --close
|
||||
|
||||
ctrl + alt - right : yabai -m space --focus next || yabai -m space --focus first
|
||||
ctrl + alt - left : yabai -m space --focus prev || yabai -m space --focus last
|
||||
|
||||
ctrl + alt - h : yabai -m window --focus west
|
||||
ctrl + alt - l : yabai -m window --focus east
|
||||
ctrl + alt - j : yabai -m window --focus south
|
||||
ctrl + alt - k : yabai -m window --focus north
|
||||
|
||||
ctrl + alt + shift - h : yabai -m window --swap west
|
||||
ctrl + alt + shift - l : yabai -m window --swap east
|
||||
ctrl + alt + shift - j : yabai -m window --swap south
|
||||
ctrl + alt + shift - k : yabai -m window --swap north
|
||||
|
||||
ctrl + alt - w : yabai -m display --focus 1
|
||||
ctrl + alt - e : yabai -m display --focus 2
|
||||
|
||||
ctrl + alt - g : yabai -m space --toggle gap && yabai -m space --toggle padding
|
||||
|
||||
ctrl + alt - x : yabai -m space --mirror y-axis
|
||||
ctrl + alt - y : yabai -m space --mirror x-axis
|
||||
|
||||
ctrl + alt - m : yabai -m window --toggle zoom-fullscreen
|
||||
ctrl + alt - t : yabai -m window --toggle float
|
||||
|
||||
:: choose
|
||||
ctrl + alt - a ; choose
|
||||
choose < p : skhd -k 'escape'; ${choose-pass}/bin/choose-pass
|
||||
choose < escape ; default
|
||||
|
||||
play : ${pkgs.mpc_cli}/bin/mpc toggle
|
||||
'';
|
||||
};
|
||||
|
||||
# services.spacebar = {
|
||||
# enable = true;
|
||||
# package = pkgs.spacebar;
|
||||
# config = {
|
||||
# position = "top";
|
||||
# height = 28;
|
||||
# spacing_left = 25;
|
||||
# spacing_right = 25;
|
||||
# text_font = ''"Inter:Regular:12.0"'';
|
||||
# icon_font = ''"Font Awesome 5 Free:Solid:12.0"'';
|
||||
# background_color = "0xff282828";
|
||||
# foreground_color = "0xffebdbb2";
|
||||
|
||||
# space_icon_color = "0xff83a598";
|
||||
# space_icon = "•";
|
||||
# space_icon_strip = "1 2 3 4 5 6 7 8 9 10";
|
||||
|
||||
# power_icon_strip = " ";
|
||||
|
||||
# clock_icon = "";
|
||||
# clock_format = ''"%d/%m/%y %R"'';
|
||||
# };
|
||||
# };
|
||||
}
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
{
|
||||
imports = [ ./common.nix ];
|
||||
home.packages = [ pkgs.vitetris ];
|
||||
programs.alacritty.settings.font.size = 7;
|
||||
}
|
|
@ -44,6 +44,10 @@
|
|||
family = "Hack Nerd Font";
|
||||
style = "Italic";
|
||||
};
|
||||
offset = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
};
|
||||
selection = { save_to_clipboard = true; };
|
||||
shell = {
|
|
@ -1,6 +1,6 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./nixos.nix ];
|
||||
imports = [ ./common.nix ];
|
||||
programs.alacritty.settings.font.size = 7.5;
|
||||
}
|
|
@ -9,7 +9,6 @@ in
|
|||
# enableDragDrop = true;
|
||||
enableCrypto = true;
|
||||
name = "capibara";
|
||||
server = "echidna";
|
||||
};
|
||||
|
||||
home.file.".local/share/barrier/SSL/Fingerprints/TrustedServers.txt".text = "${fingerprint}\n";
|
|
@ -0,0 +1,16 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = [ pkgs.librewolf pkgs.tor-browser-bundle-bin ];
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox-esr;
|
||||
};
|
||||
home.sessionVariables.BROWSER = "${pkgs.firefox-esr}/bin/firefox";
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
# common
|
||||
|
||||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
imports = [
|
||||
../cheat
|
||||
../fonts
|
||||
../git
|
||||
../gpg
|
||||
../lf
|
||||
../neovim
|
||||
../pass
|
||||
../ssh
|
||||
../tmux
|
||||
../vitetris
|
||||
../xdg
|
||||
../zsh
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
R
|
||||
ansible
|
||||
bind.dnsutils
|
||||
docker-compose
|
||||
file
|
||||
gnumake
|
||||
html-tidy
|
||||
htop
|
||||
inetutils # telnet
|
||||
j2cli
|
||||
jq
|
||||
just
|
||||
killall
|
||||
kubectl
|
||||
mosh
|
||||
neofetch
|
||||
pandoc
|
||||
podman-compose
|
||||
pv
|
||||
ripgrep
|
||||
sassc
|
||||
screen
|
||||
shellcheck
|
||||
signify
|
||||
unzip
|
||||
wget
|
||||
];
|
||||
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = { theme = "gruvbox-dark"; };
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
tmux.enableShellIntegration = true;
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
|
@ -4,9 +4,16 @@ let
|
|||
calendars = "${config.home.homeDirectory}/Calendars";
|
||||
contacts = "${config.home.homeDirectory}/Contacts";
|
||||
addressbook = "${config.home.homeDirectory}/.abook/addressbook";
|
||||
davsync = pkgs.callPackage ./davsync.nix {
|
||||
inherit config pkgs contacts addressbook;
|
||||
};
|
||||
pass = "${pkgs.pass}/bin/pass";
|
||||
tokens = "${config.home.homeDirectory}/.vdirsyncer/tokens/";
|
||||
in {
|
||||
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [ dav-sync vdirsyncer khal khard abook ];
|
||||
|
||||
home.file.".config/vdirsyncer/config".text = ''
|
||||
[general]
|
||||
status_path = "${config.home.homeDirectory}/.vdirsyncer/status/"
|
||||
|
@ -21,7 +28,7 @@ in {
|
|||
[pair nextcloud_calendar]
|
||||
a = "nextcloud_calendar_local"
|
||||
b = "nextcloud_calendar_remote"
|
||||
collections = ["personal", "contact_birthdays", "yoga", "events"]
|
||||
collections = ["personal", "contact_birthdays", "events"]
|
||||
metadata = ["color"]
|
||||
|
||||
[storage nextcloud_calendar_local]
|
||||
|
@ -93,47 +100,6 @@ in {
|
|||
token_file = "${tokens}/google_contacts"
|
||||
client_id.fetch = ["command", "${pass}", "google.com/vdirsyncer/client_id"]
|
||||
client_secret.fetch = ["command", "${pass}", "google.com/vdirsyncer/client_secret"]
|
||||
|
||||
|
||||
###########
|
||||
# trakken #
|
||||
###########
|
||||
|
||||
## calendar
|
||||
|
||||
[pair trakken_calendar_sync]
|
||||
a = "trakken_calendar_remote"
|
||||
b = "trakken_calendar_local"
|
||||
collections = [["trakken_cal", "ricard@trkkn.com", "ricard@trkkn.com"]]
|
||||
|
||||
[storage trakken_calendar_local]
|
||||
type = "filesystem"
|
||||
path = "${calendars}/trakken/"
|
||||
fileext = ".ics"
|
||||
|
||||
[storage trakken_calendar_remote]
|
||||
type = "google_calendar"
|
||||
token_file = "${tokens}/trakken_calendar"
|
||||
client_id.fetch = ["command", "${pass}", "google.com/vdirsyncer/client_id"]
|
||||
client_secret.fetch = ["command", "${pass}", "google.com/vdirsyncer/client_secret"]
|
||||
|
||||
## contacts
|
||||
|
||||
[pair trakken_contacts]
|
||||
a = "trakken_contacts_local"
|
||||
b = "trakken_contacts_remote"
|
||||
collections = [["trakken_contacts", "default", "default"]]
|
||||
|
||||
[storage trakken_contacts_local]
|
||||
type = "filesystem"
|
||||
path = "${contacts}/trakken"
|
||||
fileext = ".vcf"
|
||||
|
||||
[storage trakken_contacts_remote]
|
||||
type = "google_contacts"
|
||||
token_file = "${tokens}/trakken_contacts"
|
||||
client_id.fetch = ["command", "${pass}", "google.com/vdirsyncer/client_id"]
|
||||
client_secret.fetch = ["command", "${pass}", "google.com/vdirsyncer/client_secret"]
|
||||
'';
|
||||
|
||||
home.file.".config/khal/config".text = ''
|
||||
|
@ -151,14 +117,6 @@ in {
|
|||
path = ${calendars}/google/r.illa.pujagut@gmail.com/
|
||||
color = dark blue
|
||||
|
||||
[[trakken]]
|
||||
path = ${calendars}/trakken/ricard@trkkn.com/
|
||||
color = dark red
|
||||
|
||||
[[yoga]]
|
||||
path = ${calendars}/nextcloud/yoga/
|
||||
color = dark magenta
|
||||
|
||||
[[events]]
|
||||
path = ${calendars}/nextcloud/events
|
||||
color = brown
|
||||
|
@ -189,8 +147,6 @@ in {
|
|||
path = ${contacts}/nextcloud/contacts/
|
||||
[[google]]
|
||||
path = ${contacts}/google/default/
|
||||
[[trakken]]
|
||||
path = ${contacts}/trakken/default/
|
||||
|
||||
[general]
|
||||
debug = no
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
common = import ./common;
|
||||
extra = import ./extra;
|
||||
|
||||
alacritty = import ./alacritty;
|
||||
arduino = import ./arduino;
|
||||
barrier = import ./barrier;
|
||||
browsers = import ./browsers;
|
||||
cheat = import ./cheat;
|
||||
dav = import ./dav;
|
||||
default.txt = import ./default.txt;
|
||||
desktop-river = import ./desktop-river;
|
||||
desktop-xmonad = import ./desktop-xmonad;
|
||||
drawterm = import ./drawterm;
|
||||
fonts = import ./fonts;
|
||||
foot = import ./foot;
|
||||
gcloud = import ./gcloud;
|
||||
git = import ./git;
|
||||
gotify = import ./gotify;
|
||||
gpg = import ./gpg;
|
||||
idasen = import ./idasen;
|
||||
lf = import ./lf;
|
||||
mail = import ./mail;
|
||||
maker = import ./maker;
|
||||
minidisc = import ./minidisc;
|
||||
mpd = import ./mpd;
|
||||
msg = import ./msg;
|
||||
music = import ./music;
|
||||
neovim = import ./neovim;
|
||||
pass = import ./pass;
|
||||
rss = import ./rss;
|
||||
snapclient = import ./snapclient;
|
||||
sound = import ./sound;
|
||||
ssh = import ./ssh;
|
||||
syncthing = import ./syncthing;
|
||||
theming = import ./theming;
|
||||
tmux = import ./tmux;
|
||||
vitetris = import ./vitetris;
|
||||
wallets = import ./wallets;
|
||||
wine = import ./wine;
|
||||
xdg = import ./xdg;
|
||||
zsh = import ./zsh;
|
||||
}
|
|
@ -3,10 +3,10 @@
|
|||
{
|
||||
imports = [
|
||||
./bemenu.nix
|
||||
./foot.nix
|
||||
./fusuma.nix
|
||||
./init.nix
|
||||
./kanshi.nix
|
||||
./kile.nix
|
||||
./kile
|
||||
./mako.nix
|
||||
./swaybg.nix
|
||||
./swaylock.nix
|
||||
|
@ -18,28 +18,29 @@
|
|||
glib
|
||||
gsettings-desktop-schemas
|
||||
imv
|
||||
kile-wl
|
||||
light
|
||||
pamixer
|
||||
playerctl
|
||||
ristate
|
||||
river
|
||||
swaybg
|
||||
wl-clipboard
|
||||
wtype
|
||||
xdg-utils
|
||||
(pkgs.callPackage ./screenshot.nix { inherit config pkgs; })
|
||||
];
|
||||
|
||||
programs.zsh.loginExtra = ''
|
||||
programs. zsh. loginExtra = ''
|
||||
if [[ -z "''${DISPLAY}" ]] && [[ "''${XDG_VTNR}" -eq 1 ]]; then
|
||||
exec ${pkgs.river}/bin/river
|
||||
exec ${ pkgs. river}/bin/river
|
||||
fi
|
||||
'';
|
||||
|
||||
home.sessionVariables.XKB_DEFAULT_LAYOUT = "us";
|
||||
home.sessionVariables.XKB_DEFAULT_VARIANT = "altgr-intl";
|
||||
home.sessionVariables.XKB_DEFAULT_OPTIONS = "caps:escape";
|
||||
home. sessionVariables. XKB_DEFAULT_LAYOUT = "us";
|
||||
home. sessionVariables. XKB_DEFAULT_VARIANT = "altgr-intl";
|
||||
home. sessionVariables. XKB_DEFAULT_OPTIONS = "caps:escape";
|
||||
|
||||
systemd.user.targets.river-session = {
|
||||
systemd. user. targets. river-session = {
|
||||
Unit = {
|
||||
Description = "river window manager session";
|
||||
BindsTo = "graphical-session.target";
|
||||
|
@ -48,16 +49,21 @@
|
|||
};
|
||||
};
|
||||
|
||||
systemd.user.services.network-manager-applet = {
|
||||
systemd. user. services. network-manager-applet = {
|
||||
Unit = {
|
||||
Description = "nm-applet";
|
||||
BindsTo = [ "river-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet --indicator";
|
||||
ExecStart = "${ pkgs. networkmanagerapplet}/bin/nm-applet --indicator";
|
||||
};
|
||||
Install = { WantedBy = [ "river-session.target" ]; };
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
XDG_CURRENT_DESKTOP = "river";
|
||||
MOZ_ENABLE_WAYLAND = 1;
|
||||
};
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.fusuma = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [ coreutils ydotool ];
|
||||
settings = {};
|
||||
# settings = {
|
||||
# swipe."3" = {
|
||||
# left.command = "do the thing";
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
|
@ -161,6 +161,8 @@ in {
|
|||
${riverctl} map $mode None XF86MonBrightnessDown spawn '${light} -U 5'
|
||||
done
|
||||
|
||||
${riverctl} attach-mode bottom
|
||||
|
||||
# Set background and border color
|
||||
${riverctl} background-color 0x282828
|
||||
${riverctl} border-color-focused 0x458588
|
|
@ -0,0 +1,63 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
shell = "${pkgs.dash}/bin/dash";
|
||||
riverctl = "${pkgs.river}/bin/riverctl";
|
||||
kile = "${pkgs.kile-wl}/bin/kile";
|
||||
|
||||
in {
|
||||
|
||||
home.packages = with pkgs; [ kile-wl ];
|
||||
|
||||
systemd.user.services.kile-wl = {
|
||||
Unit = {
|
||||
Description = "kile layout generator";
|
||||
BindsTo = [ "river-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${kile}";
|
||||
};
|
||||
Install = { WantedBy = [ "river-session.target" ]; };
|
||||
};
|
||||
|
||||
xdg.dataFile = {
|
||||
layout = {
|
||||
target = "${config.xdg.configHome}/river/layout.kl";
|
||||
source = ./layout.kl;
|
||||
};
|
||||
init-kile = {
|
||||
executable = true;
|
||||
target = "${config.xdg.configHome}/river/init-kile";
|
||||
text = ''
|
||||
#!${shell}
|
||||
|
||||
${riverctl} default-layout kile
|
||||
|
||||
# Super+H and Super+L to decrease/increase the main ratio
|
||||
${riverctl} map -repeat normal Super Equal send-layout-cmd kile "mod-main-ratio +0.01"
|
||||
${riverctl} map -repeat normal Super Minus send-layout-cmd kile "mod-main-ratio -0.01"
|
||||
|
||||
# Super+Comma and Super+Period. to increment/decrement the main count
|
||||
${riverctl} map normal Super Comma send-layout-cmd kile "mod-main-count +1"
|
||||
${riverctl} map normal Super Period send-layout-cmd kile "mod-main-count -1"
|
||||
|
||||
${riverctl} map normal Super G send-layout-cmd kile "padding 5"
|
||||
${riverctl} map normal Super+Shift G send-layout-cmd kile "padding 0"
|
||||
|
||||
# Super+{Up,Right,Down,Left} to change layout orientation
|
||||
${riverctl} map normal Super+Control K send-layout-cmd kile "layout up"
|
||||
${riverctl} map normal Super+Control J send-layout-cmd kile "layout down"
|
||||
${riverctl} map normal Super+Control H send-layout-cmd kile "layout left"
|
||||
${riverctl} map normal Super+Control L send-layout-cmd kile "layout right"
|
||||
${riverctl} map normal Super+Control D send-layout-cmd kile "layout deck"
|
||||
${riverctl} map normal Super+Control F send-layout-cmd kile "layout full"
|
||||
${riverctl} map normal Super+Control W send-layout-cmd kile "layout wide"
|
||||
${riverctl} map normal Super+Control C send-layout-cmd kile "layout cols"
|
||||
${riverctl} map normal Super+Shift Space send-layout-cmd kile "layout default"
|
||||
|
||||
${riverctl} send-layout-cmd kile "padding 5"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
const ver_base (Horizontal | Vertical Vertical)
|
||||
const hor_base (Vertical | Horizontal Horizontal)
|
||||
|
||||
const up ([- 0 -] ver_base)
|
||||
const down ([- 1 -] ver_base)
|
||||
const left ([- 0 -] hor_base)
|
||||
const right ([- 1 -] hor_base)
|
||||
|
||||
const deck Deck
|
||||
const full Full
|
||||
# const wide ([- 1 -] (Vertical | Horizontal Horizontal Horizontal))
|
||||
const wide (
|
||||
3 <
|
||||
([1 0 -] (Vertical | Horizontal Horizontal))
|
||||
? (
|
||||
4 <
|
||||
([1 1 -] (Vertical | Horizontal Horizontal Horizontal))
|
||||
? ([- 1 -] (Vertical | Horizontal Horizontal Horizontal))
|
||||
)
|
||||
)
|
||||
|
||||
const cols ([0 - -] Vertical)
|
||||
|
||||
const default left
|
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
shell = "${pkgs.dash}/bin/dash";
|
||||
grim = "${pkgs.grim}/bin/grim";
|
||||
slurp = "${pkgs.slurp}/bin/slurp";
|
||||
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
|
||||
in
|
||||
pkgs.writeScriptBin "screenshot" ''
|
||||
#!${shell}
|
||||
${grim} -g "$(${slurp} -d)" - | ${wl-copy} -t image/png
|
||||
''
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue