Compare commits
No commits in common. "main" and "wezterm" have entirely different histories.
133 changed files with 5125 additions and 9904 deletions
|
@ -1,37 +0,0 @@
|
|||
on: [push]
|
||||
jobs:
|
||||
check:
|
||||
runs-on: nixos-host
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# cache not needed since we now run on the host directly
|
||||
# - name: Load cached nix store
|
||||
# id: cache-nix-store
|
||||
# uses: actions/cache/restore@v4
|
||||
# with:
|
||||
# path: /nix/store
|
||||
# key: ${{ runner.os }}-nix-store
|
||||
|
||||
- name: Build server
|
||||
run: |
|
||||
nix shell nixpkgs#nixos-rebuild -c nixos-rebuild build --flake .#beefcake
|
||||
|
||||
- name: Build router
|
||||
run: |
|
||||
nix shell nixpkgs#nixos-rebuild -c nixos-rebuild build --flake .#router
|
||||
|
||||
- name: Build desktop
|
||||
run: |
|
||||
nix shell nixpkgs#nixos-rebuild -c nixos-rebuild build --flake .#dragon
|
||||
|
||||
- name: Build laptop
|
||||
run: |
|
||||
nix shell nixpkgs#nixos-rebuild -c nixos-rebuild build --flake .#foxtrot
|
||||
|
||||
# - name: Save nix store
|
||||
# uses: actions/cache/save@v4
|
||||
# with:
|
||||
# path: /nix/store
|
||||
# key: ${{ steps.cache-nix-store.outputs.cache-primary-key }}
|
|
@ -1,25 +0,0 @@
|
|||
on: [push]
|
||||
jobs:
|
||||
check:
|
||||
runs-on: nixos-host
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# cache not needed since we now run on the host directly
|
||||
# - name: Load cached nix store
|
||||
# id: cache-nix-store
|
||||
# uses: actions/cache/restore@v4
|
||||
# with:
|
||||
# path: /nix/store
|
||||
# key: ${{ runner.os }}-nix-store
|
||||
|
||||
- name: Check nix flake
|
||||
run: |
|
||||
nix flake check
|
||||
|
||||
# - name: Save nix store
|
||||
# uses: actions/cache/save@v4
|
||||
# with:
|
||||
# path: /nix/store
|
||||
# key: ${{ steps.cache-nix-store.outputs.cache-primary-key }}
|
32
.sops.yaml
32
.sops.yaml
|
@ -1,19 +1,6 @@
|
|||
keys:
|
||||
# list any public keys here
|
||||
|
||||
# pass age-key | rg '# pub'
|
||||
- &daniel age1stdue5q5teskee057ced6rh9pzzr93xsy66w4sc3zu49rgxl7cjshztt45
|
||||
|
||||
# per-host keys can be derived from a target host's ssh keys like so:
|
||||
# ssh host "nix shell nixpkgs#ssh-to-age -c $SHELL -c 'cat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age'"
|
||||
- &sshd-at-beefcake age1etv56f7kf78a55lxqtydrdd32dpmsjnxndf4u28qezxn6p7xt9esqvqdq7
|
||||
- &sshd-at-router age1zd7c3g5d20shdftq8ghqm0r92488dg4pdp4gulur7ex3zx2yq35ssxawpn
|
||||
- &sshd-at-dragon age1ez4why08hdx0qf940cjzs6ep4q5rk2gqq7lp99pe58fktpwv65esx4xrht
|
||||
- &ssh-foxtrot age1njnet9ltjuxasqv3ckn67r5natke6xgd8wlx8psf64pyc4duvurqhedw80
|
||||
|
||||
# after updating this file, you may need to update the keys for any associated files like so:
|
||||
# sops updatekeys secrets.file
|
||||
|
||||
- &daniel age1stdue5q5teskee057ced6rh9pzzr93xsy66w4sc3zu49rgxl7cjshztt45 # pass age-key | rg '# pub'
|
||||
- &sshd-at-beefcake age1k8s590x34ghz7yrjyrgzkd24j252srf0mhfy34halp4frwr065csrlt2ev # ssh beefcake "nix-shell -p ssh-to-age --run 'cat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age'"
|
||||
creation_rules:
|
||||
- path_regex: secrets/[^/]+\.(ya?ml|json|env|ini)$
|
||||
key_groups:
|
||||
|
@ -24,18 +11,3 @@ creation_rules:
|
|||
- age:
|
||||
- *daniel
|
||||
- *sshd-at-beefcake
|
||||
- path_regex: secrets/router/[^/]+\.(ya?ml|json|env|ini)$
|
||||
key_groups:
|
||||
- age:
|
||||
- *daniel
|
||||
- *sshd-at-router
|
||||
- path_regex: secrets/dragon/[^/]+\.(ya?ml|json|env|ini)$
|
||||
key_groups:
|
||||
- age:
|
||||
- *daniel
|
||||
- *sshd-at-dragon
|
||||
- path_regex: secrets/foxtrot/[^/]+\.(ya?ml|json|env|ini)$
|
||||
key_groups:
|
||||
- age:
|
||||
- *daniel
|
||||
- *ssh-foxtrot
|
||||
|
|
|
@ -1,85 +1,4 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.attrsets) mapAttrs' filterAttrs;
|
||||
in {
|
||||
standardWithHibernateSwap = {
|
||||
disks ? ["/dev/sda"],
|
||||
swapSize,
|
||||
...
|
||||
}: {
|
||||
/*
|
||||
this is my standard partitioning scheme for my machines which probably want hibernation capabilities
|
||||
a UEFI-compatible boot partition
|
||||
it includes an LUKS-encrypted btrfs volume
|
||||
a swap partition big enough to dump all the machine's RAM into
|
||||
*/
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
primary = {
|
||||
type = "disk";
|
||||
device = builtins.elemAt disks 0;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
label = "EFI";
|
||||
name = "ESP";
|
||||
size = "4G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
size = swapSize;
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both";
|
||||
resumeDevice = true; # resume from hiberation from this device
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
extraOpenArgs = ["--allow-discards"];
|
||||
# if you want to use the key for interactive login be sure there is no trailing newline
|
||||
# for example use `echo -n "password" > /tmp/secret.key`
|
||||
keyFile = "/tmp/secret.key"; # Interactive
|
||||
# settings.keyFile = "/tmp/password.key";
|
||||
# additionalKeyFiles = ["/tmp/additionalSecret.key"];
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"/nixos" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
};
|
||||
"/home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
{
|
||||
standard = {disks ? ["/dev/vda"], ...}: {
|
||||
# this is my standard partitioning scheme for my machines: an LUKS-encrypted
|
||||
# btrfs volume
|
||||
|
@ -142,7 +61,67 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: figure out what I can't have an optiona/default 'name' attribute here so I can DRY with "standard"
|
||||
thinker = {disks ? ["/dev/vda"], ...}: {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
vdb = {
|
||||
type = "disk";
|
||||
device = builtins.elemAt disks 0;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
label = "EFI";
|
||||
name = "ESP";
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
extraOpenArgs = ["--allow-discards"];
|
||||
# if you want to use the key for interactive login be sure there is no trailing newline
|
||||
# for example use `echo -n "password" > /tmp/secret.key`
|
||||
keyFile = "/tmp/secret.key"; # Interactive
|
||||
# settings.keyFile = "/tmp/password.key";
|
||||
# additionalKeyFiles = ["/tmp/additionalSecret.key"];
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
};
|
||||
"/home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = ["compress=zstd" "noatime"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
unencrypted = {disks ? ["/dev/vda"], ...}: {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
|
@ -193,203 +172,6 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
beefcake = let
|
||||
zpools = {
|
||||
zroot = {
|
||||
/*
|
||||
TODO: at the time of writing, disko does not support draid6
|
||||
so I'm building/managing the array manually for the time being
|
||||
the root pool is just a single disk right now
|
||||
*/
|
||||
name = "zroot";
|
||||
config = {
|
||||
type = "zpool";
|
||||
# mode = "draid6";
|
||||
rootFsOptions = {
|
||||
compression = "zstd";
|
||||
"com.sun:auto-snapshot" = "false";
|
||||
};
|
||||
mountpoint = "/";
|
||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
|
||||
|
||||
datasets = {
|
||||
zfs_fs = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/zfs_fs";
|
||||
options."com.sun:auto-snapshot" = "true";
|
||||
};
|
||||
zfs_unmounted_fs = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "none";
|
||||
};
|
||||
zfs_legacy_fs = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "legacy";
|
||||
mountpoint = "/zfs_legacy_fs";
|
||||
};
|
||||
zfs_testvolume = {
|
||||
type = "zfs_volume";
|
||||
size = "10M";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/ext4onzfs";
|
||||
};
|
||||
};
|
||||
encrypted = {
|
||||
type = "zfs_fs";
|
||||
options = {
|
||||
mountpoint = "none";
|
||||
encryption = "aes-256-gcm";
|
||||
keyformat = "passphrase";
|
||||
keylocation = "file:///tmp/secret.key";
|
||||
};
|
||||
# use this to read the key during boot
|
||||
/*
|
||||
postCreateHook = ''
|
||||
zfs set keylocation="prompt" "zroot/$name";
|
||||
'';
|
||||
*/
|
||||
};
|
||||
"encrypted/test" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/zfs_crypted";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
zstorage = {
|
||||
/*
|
||||
PARITY_COUNT=3 NUM_DRIVES=8 HOT_SPARES=2 sudo -E zpool create -f -O mountpoint=none -O compression=on -O xattr=sa -O acltype=posixacl -o ashift=12 -O atime=off -O recordsize=64K zstorage draid{$PARITY_COUNT}:{$NUM_DRIVES}c:{$HOT_SPARES}s /dev/disk/by-id/scsi-35000039548cb637c /dev/disk/by-id/scsi-35000039548cb7c8c /dev/disk/by-id/scsi-35000039548cb85c8 /dev/disk/by-id/scsi-35000039548d9b504 /dev/disk/by-id/scsi-35000039548da2b08 /dev/disk/by-id/scsi-35000039548dad2fc /dev/disk/by-id/scsi-350000399384be921 /dev/disk/by-id/scsi-35000039548db096c
|
||||
sudo zfs create -o mountpoint=legacy zstorage/nix
|
||||
sudo zfs create -o canmount=on -o mountpoint=/storage zstorage/storage
|
||||
*/
|
||||
name = "zstorage";
|
||||
config = {};
|
||||
};
|
||||
};
|
||||
diskClass = {
|
||||
storage = {
|
||||
type = "zfs";
|
||||
pool = zpools.zroot.name;
|
||||
};
|
||||
boot = {
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
zfs = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = zpools.zroot.name;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
bootDisks = {
|
||||
"/dev/sdi" = {
|
||||
name = "i";
|
||||
enable = true;
|
||||
};
|
||||
"/dev/sdj" = {
|
||||
name = "j";
|
||||
enable = true;
|
||||
}; # TODO: join current boot drive to new boot pool
|
||||
};
|
||||
storageDisks = {
|
||||
"/dev/sda" = {
|
||||
enable = true;
|
||||
name = "a";
|
||||
};
|
||||
"/dev/sdb" = {
|
||||
enable = true;
|
||||
name = "b";
|
||||
};
|
||||
"/dev/sdc" = {
|
||||
enable = true;
|
||||
name = "c";
|
||||
};
|
||||
"/dev/sdd" = {
|
||||
enable = true;
|
||||
name = "d";
|
||||
};
|
||||
|
||||
# TODO: start small
|
||||
"/dev/sde" = {
|
||||
enable = false;
|
||||
name = "e";
|
||||
};
|
||||
"/dev/sdf" = {
|
||||
enable = false;
|
||||
name = "f";
|
||||
};
|
||||
"/dev/sdg" = {
|
||||
enable = false;
|
||||
name = "g";
|
||||
};
|
||||
"/dev/sdh" = {
|
||||
enable = false;
|
||||
name = "h";
|
||||
};
|
||||
|
||||
# gap for two boot drives
|
||||
|
||||
"/dev/sdk" = {
|
||||
enable = false;
|
||||
name = "k";
|
||||
};
|
||||
"/dev/sdl" = {
|
||||
enable = false;
|
||||
name = "l";
|
||||
};
|
||||
"/dev/sdm" = {
|
||||
enable = false;
|
||||
name = "m";
|
||||
};
|
||||
"/dev/sdn" = {
|
||||
# TODO: this is my holding cell for random stuff right now
|
||||
enable = false;
|
||||
name = "n";
|
||||
};
|
||||
};
|
||||
|
||||
diskoBoot = mapAttrs' (device: {name, ...}: {
|
||||
name = "boot-${name}";
|
||||
value = {
|
||||
inherit device;
|
||||
type = "disk";
|
||||
content = diskClass.boot.content;
|
||||
};
|
||||
}) (filterAttrs (_: {enable, ...}: enable) bootDisks);
|
||||
|
||||
diskoStorage = mapAttrs' (device: {name, ...}: {
|
||||
name = "storage-${name}";
|
||||
value = {
|
||||
inherit device;
|
||||
type = "disk";
|
||||
content = diskClass.storage.content;
|
||||
};
|
||||
}) (filterAttrs (_: {enable, ...}: enable) storageDisks);
|
||||
in {
|
||||
disko.devices = {
|
||||
disk = diskoBoot // diskoStorage;
|
||||
zpool = {
|
||||
zroot = zpools.zroot.config;
|
||||
};
|
||||
};
|
||||
};
|
||||
legacy = {disks ? ["/dev/vda"], ...}: {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
|
|
708
flake.lock
708
flake.lock
File diff suppressed because it is too large
Load diff
968
flake.nix
968
flake.nix
|
@ -1,45 +1,196 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
# I have this as a separate input so I don't rebuild the font every time I
|
||||
# want to upgrade nixpkgs
|
||||
nixpkgsForIosevka.url = "github:nixos/nixpkgs?rev=5863c27340ba4de8f83e7e3c023b9599c3cb3c80";
|
||||
|
||||
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
||||
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# pre-commit-hooks.inputs.nixpkgs-unstable.follows = "nixpkgs";
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager/master";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
helix.url = "github:helix-editor/helix/master";
|
||||
# I think if I force this to follow nixpkgs, I won't get caching benefits
|
||||
# helix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
disko.url = "github:nix-community/disko/master";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
# sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs";
|
||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs";
|
||||
|
||||
git-hooks.url = "github:cachix/git-hooks.nix";
|
||||
git-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
home-manager-unstable.url = "github:nix-community/home-manager";
|
||||
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
|
||||
helix.url = "github:helix-editor/helix/master";
|
||||
hardware.url = "github:nixos/nixos-hardware";
|
||||
# hardware.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
wezterm.url = "github:wez/wezterm?dir=nix";
|
||||
wezterm.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git";
|
||||
api-lyte-dev.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
slippi.url = "github:lytedev/slippi-nix";
|
||||
# slippi.url = "git+file:///home/daniel/code/open-source/slippi-nix";
|
||||
slippi.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
slippi.inputs.home-manager.follows = "home-manager-unstable";
|
||||
ssbm.url = "github:lytedev/ssbm-nix";
|
||||
# I think if I force this to follow nixpkgs, I won't get caching benefits
|
||||
ssbm.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
jovian.url = "github:Jovian-Experiments/Jovian-NixOS/development";
|
||||
jovian.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
|
||||
# nnf.url = "github:thelegy/nixos-nftables-firewall?rev=71fc2b79358d0dbacde83c806a0f008ece567b7b";
|
||||
|
||||
mobile-nixos = {
|
||||
url = "github:lytedev/mobile-nixos";
|
||||
flake = false;
|
||||
# TODO: doesn't (can't?) support the forge mod loader yet
|
||||
# nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgsForIosevka,
|
||||
home-manager,
|
||||
hardware,
|
||||
pre-commit-hooks,
|
||||
api-lyte-dev,
|
||||
...
|
||||
} @ inputs: let
|
||||
# TODO: make @ inputs unnecessary by making arguments explicit in all modules?
|
||||
inherit (self) outputs;
|
||||
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
in {
|
||||
colors = (import ./lib/colors.nix {inherit nixpkgs;}).schemes.catppuccin-mocha-sapphire;
|
||||
# colors = (import ./lib/colors.nix inputs).color-schemes.donokai;
|
||||
|
||||
font = {
|
||||
name = "IosevkaLyteTerm";
|
||||
size = 12;
|
||||
};
|
||||
|
||||
# Your custom packages
|
||||
# Acessible through 'nix build', 'nix shell', etc
|
||||
packages = forAllSystems (system:
|
||||
import ./pkgs {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pkgsForIosevka = nixpkgsForIosevka.legacyPackages.${system};
|
||||
});
|
||||
|
||||
# Formatter for your nix files, available through 'nix fmt'
|
||||
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||
|
||||
checks = forAllSystems (system: {
|
||||
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
alejandra.enable = true;
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
devShell = forAllSystems (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
inherit (outputs.checks.${system}.pre-commit-check) shellHook;
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
lua-language-server
|
||||
];
|
||||
});
|
||||
|
||||
# Your custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays {inherit nixpkgs nixpkgsForIosevka;};
|
||||
|
||||
# Reusable nixos modules you might want to export
|
||||
# These are usually stuff you would upstream into nixpkgs
|
||||
nixosModules = import ./modules/nixos;
|
||||
|
||||
# Reusable home-manager modules you might want to export
|
||||
# These are usually stuff you would upstream into home-manager
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
|
||||
# NixOS configuration entrypoint
|
||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||
nixosConfigurations = builtins.mapAttrs (name: {
|
||||
system,
|
||||
modules,
|
||||
...
|
||||
}:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs outputs system api-lyte-dev hardware;
|
||||
};
|
||||
# extraSpecialArgs = {
|
||||
# inherit inputs outputs system api-lyte-dev;
|
||||
# };
|
||||
modules =
|
||||
[
|
||||
self.nixosModules.common
|
||||
]
|
||||
++ modules;
|
||||
}) (import ./nixos);
|
||||
|
||||
# Standalone home-manager configuration entrypoint
|
||||
# Available through 'home-manager --flake .#your-username@your-hostname'
|
||||
homeConfigurations = {
|
||||
# TODO: non-system-specific home configurations?
|
||||
"deck" = let
|
||||
system = "x86_64-linux";
|
||||
in
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs system;
|
||||
inherit (outputs) colors font;
|
||||
};
|
||||
modules = with outputs.homeManagerModules; [
|
||||
common
|
||||
{
|
||||
home.homeDirectory = "/home/deck";
|
||||
home.username = "deck";
|
||||
home.stateVersion = "24.05";
|
||||
}
|
||||
linux
|
||||
];
|
||||
};
|
||||
workm1 = let
|
||||
system = "aarch64-darwin";
|
||||
in
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs system;
|
||||
inherit (outputs) colors font;
|
||||
};
|
||||
modules = with outputs.homeManagerModules; [
|
||||
common
|
||||
{
|
||||
home.homeDirectory = "/Users/daniel.flanagan";
|
||||
home.username = "daniel.flanagan";
|
||||
home.stateVersion = "24.05";
|
||||
}
|
||||
macos
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Disk partition schemes and functions
|
||||
diskoConfigurations = import ./disko;
|
||||
|
||||
# Flake templates for easily setting up Nix in a project using common patterns I like
|
||||
templates = import ./templates/all.nix;
|
||||
|
||||
# TODO: nix-on-droid for phone terminal usage?
|
||||
# TODO: nix-darwin for work?
|
||||
# TODO: nixos ISO?
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
|
@ -48,772 +199,17 @@
|
|||
extra-substituters = [
|
||||
"https://cache.nixos.org/"
|
||||
"https://helix.cachix.org"
|
||||
"https://ssbm-nix.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://nix.h.lyte.dev"
|
||||
"https://hyprland.cachix.org"
|
||||
];
|
||||
|
||||
extra-trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
|
||||
"ssbm-nix.cachix.org-1:YN104LKAWaKQIecOphkftXgXlYZVK/IRHM1UD7WAIew="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"h.lyte.dev-2:te9xK/GcWPA/5aXav8+e5RHImKYMug8hIIbhHsKPN0M="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
disko,
|
||||
sops-nix,
|
||||
git-hooks,
|
||||
wezterm,
|
||||
home-manager,
|
||||
home-manager-unstable,
|
||||
helix,
|
||||
hardware,
|
||||
jovian,
|
||||
mobile-nixos,
|
||||
# nnf,
|
||||
# hyprland,
|
||||
slippi,
|
||||
...
|
||||
}: let
|
||||
inherit (self) outputs;
|
||||
inherit (outputs) nixosModules homeManagerModules overlays;
|
||||
|
||||
# TODO: make @ inputs unnecessary by making arguments explicit in all modules?
|
||||
systems = ["aarch64-linux" "aarch64-darwin" "x86_64-darwin" "x86_64-linux"];
|
||||
forSystems = nixpkgs.lib.genAttrs systems;
|
||||
pkgsFor = system: (import nixpkgs {inherit system;}).extend overlays.default;
|
||||
genPkgs = func: (forSystems (system: func (pkgsFor system)));
|
||||
# pkg = callee: overrides: genPkgs (pkgs: pkgs.callPackage callee overrides);
|
||||
|
||||
unstable = {
|
||||
forSystems = nixpkgs-unstable.lib.genAttrs systems;
|
||||
pkgsFor = system: (import nixpkgs-unstable {inherit system;}).extend overlays.default;
|
||||
genPkgs = func: (forSystems (system: func (pkgsFor system)));
|
||||
pkg = callee: overrides: genPkgs (pkgs: pkgs.callPackage callee overrides);
|
||||
};
|
||||
|
||||
style = {
|
||||
colors = (import ./lib/colors.nix {inherit (nixpkgs) lib;}).schemes.catppuccin-mocha-sapphire;
|
||||
|
||||
font = {
|
||||
name = "IosevkaLyteTerm";
|
||||
size = 12;
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
moduleArgs = {
|
||||
# inherit style;
|
||||
inherit helix slippi hyprland hardware disko home-manager;
|
||||
inherit (outputs) nixosModules homeManagerModules diskoConfigurations overlays;
|
||||
};
|
||||
*/
|
||||
|
||||
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev";
|
||||
in {
|
||||
/*
|
||||
kind of a quirk, but package definitions are actually in the "additions"
|
||||
overlay I did this to work around some recursion problems
|
||||
TODO: https://discourse.nixos.org/t/infinite-recursion-getting-started-with-overlays/48880
|
||||
*/
|
||||
packages = genPkgs (pkgs: {inherit (pkgs) iosevkaLyteTerm iosevkaLyteTermSubset nix-base-container-image;});
|
||||
diskoConfigurations = import ./disko {inherit (nixpkgs) lib;};
|
||||
templates = import ./templates;
|
||||
formatter = genPkgs (p: p.alejandra);
|
||||
|
||||
checks = genPkgs ({system, ...}: {
|
||||
git-hooks = git-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
alejandra.enable = true;
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
devShells = genPkgs ({
|
||||
system,
|
||||
pkgs,
|
||||
mkShell,
|
||||
...
|
||||
}: {
|
||||
default = mkShell {
|
||||
inherit (outputs.checks.${system}.git-hooks) shellHook;
|
||||
packages = with pkgs; [
|
||||
lua-language-server
|
||||
nodePackages.bash-language-server
|
||||
];
|
||||
};
|
||||
});
|
||||
|
||||
overlays = {
|
||||
# the default overlay composes all the other overlays together
|
||||
default = final: prev: {
|
||||
overlays = with overlays; [
|
||||
additions
|
||||
modifications
|
||||
unstable-packages
|
||||
];
|
||||
};
|
||||
|
||||
additions = final: prev: let
|
||||
iosevkaLyteTerm = prev.callPackage ./packages/iosevkaLyteTerm.nix {};
|
||||
in {
|
||||
inherit iosevkaLyteTerm;
|
||||
iosevkaLyteTermSubset = prev.callPackage ./packages/iosevkaLyteTermSubset.nix {
|
||||
inherit iosevkaLyteTerm;
|
||||
};
|
||||
nix-base-container-image = final.dockerTools.buildImageWithNixDb {
|
||||
name = "git.lyte.dev/lytedev/nix";
|
||||
tag = "latest";
|
||||
|
||||
copyToRoot = with final; [
|
||||
bash
|
||||
coreutils
|
||||
curl
|
||||
gawk
|
||||
gitFull
|
||||
git-lfs
|
||||
gnused
|
||||
nodejs
|
||||
wget
|
||||
sudo
|
||||
nixVersions.stable
|
||||
cacert
|
||||
gnutar
|
||||
gzip
|
||||
openssh
|
||||
xz
|
||||
(pkgs.writeTextFile {
|
||||
name = "nix.conf";
|
||||
destination = "/etc/nix/nix.conf";
|
||||
text = ''
|
||||
accept-flake-config = true
|
||||
experimental-features = nix-command flakes
|
||||
build-users-group =
|
||||
substituters = https://nix.h.lyte.dev https://cache.nixos.org/
|
||||
trusted-substituters = https://nix.h.lyte.dev https://cache.nixos.org/
|
||||
trusted-public-keys = h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
||||
'';
|
||||
})
|
||||
];
|
||||
|
||||
extraCommands = ''
|
||||
# enable /usr/bin/env for scripts
|
||||
mkdir -p usr
|
||||
ln -s ../bin usr/bin
|
||||
|
||||
# create /tmp
|
||||
mkdir -p tmp
|
||||
|
||||
# create HOME
|
||||
mkdir -vp root
|
||||
'';
|
||||
config = {
|
||||
Cmd = ["/bin/bash"];
|
||||
Env = [
|
||||
"LANG=en_GB.UTF-8"
|
||||
"ENV=/etc/profile.d/nix.sh"
|
||||
"BASH_ENV=/etc/profile.d/nix.sh"
|
||||
"NIX_BUILD_SHELL=/bin/bash"
|
||||
"PAGER=cat"
|
||||
"PATH=/usr/bin:/bin"
|
||||
"SSL_CERT_FILE=${final.cacert}/etc/ssl/certs/ca-bundle.crt"
|
||||
"USER=root"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
modifications = final: prev: let
|
||||
wezterm-input = wezterm;
|
||||
in rec {
|
||||
helix = helix.outputs.packages.${prev.system}.helix;
|
||||
final.helix = helix;
|
||||
/*
|
||||
TODO: would love to use a current wezterm build so I can make use of ssh/mux functionality without breakage
|
||||
source: https://github.com/wez/wezterm/issues/3771
|
||||
not-yet-merged (abandoned?): https://github.com/wez/wezterm/pull/4737
|
||||
I did try using the latest code via the flake, but alas it did not resolve my issues with mux'ing
|
||||
*/
|
||||
wezterm = wezterm-input.outputs.packages.${prev.system}.default;
|
||||
# wezterm = (import nixpkgs {inherit (prev) system;}).wezterm;
|
||||
final.wezterm = wezterm;
|
||||
|
||||
# zellij = prev.zellij.overrideAttrs rec {
|
||||
# version = "0.41.0";
|
||||
# src = prev.fetchFromGitHub {
|
||||
# owner = "zellij-org";
|
||||
# repo = "zellij";
|
||||
# rev = "v0.41.0";
|
||||
# hash = "sha256-A+JVWYz0t9cVA8XZciOwDkCecsC2r5TU2O9i9rVg7do=";
|
||||
# };
|
||||
# cargoDeps = prev.zellij.cargoDeps.overrideAttrs (prev.lib.const {
|
||||
# name = "zellij-vendor.tar.gz";
|
||||
# inherit src;
|
||||
# outputHash = "sha256-WxrMI7fV0pNsGjbNpXLr+xnMdWYkC4WxIeN4OK3ZPIE=";
|
||||
# });
|
||||
# };
|
||||
# final.zellij = zellij;
|
||||
};
|
||||
|
||||
unstable-packages = final: _prev: {
|
||||
unstable-packages = import nixpkgs-unstable {
|
||||
system = final.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nixosModules = import ./modules/nixos {
|
||||
inherit home-manager home-manager-unstable helix nixosModules homeManagerModules pubkey overlays style sops-nix disko;
|
||||
flakeInputs = self.inputs;
|
||||
};
|
||||
|
||||
homeManagerModules = import ./modules/home-manager {
|
||||
inherit home-manager home-manager-unstable helix nixosModules homeManagerModules pubkey overlays style;
|
||||
inherit (nixpkgs) lib;
|
||||
flakeInputs = self.inputs;
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
beefcake = let
|
||||
system = "x86_64-linux";
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = with nixosModules; [
|
||||
home-manager-defaults
|
||||
|
||||
# TODO: disko?
|
||||
hardware.nixosModules.common-cpu-intel
|
||||
|
||||
outputs.nixosModules.deno-netlify-ddns-client
|
||||
{
|
||||
services.deno-netlify-ddns-client = {
|
||||
enable = true;
|
||||
username = "beefcake.h";
|
||||
# TODO: router doesn't even do ipv6 yet...
|
||||
ipv6 = false;
|
||||
};
|
||||
}
|
||||
|
||||
family-users
|
||||
common
|
||||
podman
|
||||
troubleshooting-tools
|
||||
virtual-machines
|
||||
virtual-machines-gui
|
||||
linux
|
||||
fonts
|
||||
|
||||
./nixos/beefcake.nix
|
||||
|
||||
{
|
||||
services.kanidm.package = (unstable.pkgsFor system).kanidm;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
dragon = nixpkgs-unstable.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with nixosModules; [
|
||||
home-manager-unstable-defaults
|
||||
|
||||
outputs.diskoConfigurations.standard
|
||||
hardware.nixosModules.common-cpu-amd
|
||||
hardware.nixosModules.common-pc-ssd
|
||||
|
||||
common
|
||||
password-manager
|
||||
wifi
|
||||
graphical-workstation
|
||||
virtual-machines
|
||||
virtual-machines-gui
|
||||
music-production
|
||||
# plasma6
|
||||
gaming
|
||||
slippi.nixosModules.default
|
||||
|
||||
outputs.nixosModules.deno-netlify-ddns-client
|
||||
{
|
||||
services.deno-netlify-ddns-client = {
|
||||
enable = true;
|
||||
username = "dragon.h";
|
||||
# TODO: router doesn't even do ipv6 yet...
|
||||
ipv6 = false;
|
||||
};
|
||||
}
|
||||
|
||||
./nixos/dragon.nix
|
||||
|
||||
{
|
||||
home-manager.users.daniel = {
|
||||
imports = with homeManagerModules; [
|
||||
senpai
|
||||
iex
|
||||
cargo
|
||||
firefox-no-tabs
|
||||
linux-desktop-environment-config
|
||||
slippi.homeManagerModules.default
|
||||
"h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0="
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
bigtower = nixpkgs-unstable.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with nixosModules; [
|
||||
home-manager-unstable-defaults
|
||||
|
||||
outputs.diskoConfigurations.unencrypted
|
||||
hardware.nixosModules.common-cpu-amd
|
||||
hardware.nixosModules.common-pc-ssd
|
||||
|
||||
common
|
||||
# wifi
|
||||
graphical-workstation
|
||||
music-production
|
||||
gaming
|
||||
|
||||
./nixos/bigtower.nix
|
||||
|
||||
{
|
||||
home-manager.users.daniel = {
|
||||
imports = with homeManagerModules; [
|
||||
firefox-no-tabs
|
||||
linux-desktop-environment-config
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
htpc = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with nixosModules; [
|
||||
home-manager-defaults
|
||||
|
||||
hardware.nixosModules.common-pc-ssd
|
||||
common
|
||||
gaming
|
||||
graphical-workstation
|
||||
plasma6
|
||||
|
||||
./nixos/htpc.nix
|
||||
|
||||
{
|
||||
home-manager.users.daniel = {
|
||||
imports = with homeManagerModules; [
|
||||
linux-desktop-environment-config
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
steamdeck1 = nixpkgs-unstable.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with nixosModules; [
|
||||
home-manager-unstable-defaults
|
||||
|
||||
outputs.diskoConfigurations.standard
|
||||
hardware.nixosModules.common-pc-ssd
|
||||
common
|
||||
gaming
|
||||
graphical-workstation
|
||||
plasma6
|
||||
|
||||
jovian.outputs.nixosModules.jovian
|
||||
|
||||
{
|
||||
networking.hostName = "steamdeck1";
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
home-manager.users.daniel = {
|
||||
imports = with homeManagerModules; [
|
||||
firefox-no-tabs
|
||||
linux-desktop-environment-config
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
foxtrot = nixpkgs-unstable.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with nixosModules; [
|
||||
home-manager-unstable-defaults
|
||||
|
||||
outputs.diskoConfigurations.standard
|
||||
hardware.nixosModules.framework-13-7040-amd
|
||||
|
||||
common
|
||||
kde-connect
|
||||
password-manager
|
||||
graphical-workstation
|
||||
# plasma6
|
||||
virtual-machines
|
||||
virtual-machines-gui
|
||||
laptop
|
||||
gaming
|
||||
cross-compiler
|
||||
|
||||
./nixos/foxtrot.nix
|
||||
|
||||
({pkgs, ...}: {
|
||||
home-manager.users.daniel = {
|
||||
imports = with homeManagerModules; [
|
||||
senpai
|
||||
iex
|
||||
cargo
|
||||
firefox-no-tabs
|
||||
linux-desktop-environment-config
|
||||
];
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
fw-ectool
|
||||
(writeShellApplication
|
||||
{
|
||||
name = "reset-wifi-module";
|
||||
runtimeInputs = with pkgs; [kmod];
|
||||
text = ''
|
||||
modprobe -rv mt7921e
|
||||
modprobe -v mt7921e
|
||||
'';
|
||||
})
|
||||
(writeShellApplication
|
||||
{
|
||||
name = "perfmode";
|
||||
# we use command -v $cmd here because we only want to invoke these calls _if_ the related package is installed on the system
|
||||
# otherwise, they will likely have no effect anyways
|
||||
text = ''
|
||||
command -v powerprofilesctl &>/dev/null && bash -x -c 'powerprofilesctl set balanced'
|
||||
command -v swaymsg &>/dev/null && bash -x -c 'swaymsg output eDP-1 mode 2880x1920@120Hz'
|
||||
'';
|
||||
})
|
||||
(writeShellApplication
|
||||
{
|
||||
name = "battmode";
|
||||
text = ''
|
||||
command -v powerprofilesctl &>/dev/null && bash -x -c 'powerprofilesctl set power-saver'
|
||||
command -v swaymsg &>/dev/null && bash -x -c 'swaymsg output eDP-1 mode 2880x1920@60Hz'
|
||||
'';
|
||||
})
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
thablet = nixpkgs-unstable.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with nixosModules; [
|
||||
home-manager-unstable-defaults
|
||||
outputs.diskoConfigurations.standard
|
||||
hardware.nixosModules.lenovo-thinkpad-x1-yoga
|
||||
|
||||
common
|
||||
password-manager
|
||||
graphical-workstation
|
||||
plasma6
|
||||
music-production
|
||||
laptop
|
||||
gaming
|
||||
|
||||
./nixos/thablet.nix
|
||||
|
||||
{
|
||||
home-manager.users.daniel = {
|
||||
imports = with homeManagerModules; [
|
||||
senpai
|
||||
iex
|
||||
cargo
|
||||
firefox-no-tabs
|
||||
linux-desktop-environment-config
|
||||
# slippi.homeManagerModules.default
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
/*
|
||||
grablet = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with nixosModules; [
|
||||
common
|
||||
|
||||
outputs.diskoConfigurations.standard
|
||||
hardware.nixosModules.common-cpu-intel-kaby-lake
|
||||
hardware.nixosModules.common-pc-laptopp-ssd
|
||||
graphical-workstation
|
||||
laptop
|
||||
gaming
|
||||
|
||||
./nixos/thablet.nix
|
||||
|
||||
{
|
||||
home-manager.users.daniel = {
|
||||
imports = with homeManagerModules; [
|
||||
iex
|
||||
cargo
|
||||
linux-desktop-environment-config
|
||||
];
|
||||
};
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
}
|
||||
];
|
||||
};
|
||||
*/
|
||||
|
||||
thinker = nixpkgs-unstable.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with nixosModules; [
|
||||
home-manager-unstable-defaults
|
||||
|
||||
{
|
||||
_module.args = {
|
||||
disks = ["/dev/nvme0n1"];
|
||||
swapSize = "32G";
|
||||
};
|
||||
}
|
||||
outputs.diskoConfigurations.standardWithHibernateSwap
|
||||
hardware.nixosModules.lenovo-thinkpad-t480
|
||||
hardware.nixosModules.common-pc-laptop-ssd
|
||||
|
||||
music-production
|
||||
common
|
||||
password-manager
|
||||
graphical-workstation
|
||||
plasma6
|
||||
laptop
|
||||
gaming
|
||||
|
||||
./nixos/thinker.nix
|
||||
|
||||
{
|
||||
home-manager.users.daniel = {
|
||||
imports = with homeManagerModules; [
|
||||
senpai
|
||||
iex
|
||||
cargo
|
||||
firefox-no-tabs
|
||||
linux-desktop-environment-config
|
||||
slippi.homeManagerModules.default
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
musicbox = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with nixosModules; [
|
||||
home-manager-defaults
|
||||
|
||||
{
|
||||
_module.args = {
|
||||
disks = ["/dev/sda"];
|
||||
# swapSize = "8G";
|
||||
};
|
||||
}
|
||||
outputs.diskoConfigurations.unencrypted
|
||||
hardware.nixosModules.common-pc-laptop-ssd
|
||||
|
||||
music-production
|
||||
common
|
||||
graphical-workstation
|
||||
wifi
|
||||
|
||||
# ./nixos/musicbox.nix
|
||||
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
home-manager.users.daniel = {
|
||||
imports = with homeManagerModules; [
|
||||
firefox-no-tabs
|
||||
linux-desktop-environment-config
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
rascal = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with nixosModules; [
|
||||
home-manager-defaults
|
||||
hardware.nixosModules.common-cpu-amd
|
||||
common
|
||||
linux
|
||||
./nixos/rascal.nix
|
||||
];
|
||||
};
|
||||
|
||||
router = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with nixosModules; [
|
||||
home-manager-defaults
|
||||
outputs.diskoConfigurations.unencrypted
|
||||
common
|
||||
linux
|
||||
troubleshooting-tools
|
||||
|
||||
outputs.nixosModules.deno-netlify-ddns-client
|
||||
{
|
||||
services.deno-netlify-ddns-client = {
|
||||
enable = true;
|
||||
username = "router.h";
|
||||
# TODO: ipv6
|
||||
ipv6 = false;
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
NOTE: maybe use this someday, but I think I need more concrete
|
||||
networking knowledge before I know how to use it well. Additionally,
|
||||
I can use my existing firewall configuration more easily if I manage
|
||||
it directly.
|
||||
nnf.nixosModules.default
|
||||
*/
|
||||
|
||||
./nixos/router.nix
|
||||
];
|
||||
};
|
||||
|
||||
# pinephone-image =
|
||||
# (import "${mobile-nixos}/lib/eval-with-configuration.nix" {
|
||||
# configuration = with nixosModules; [
|
||||
# linux
|
||||
# home-manager-defaults
|
||||
|
||||
# # outputs.diskoConfigurations.unencrypted # can I even disko with an image-based installation?
|
||||
# common
|
||||
# wifi
|
||||
|
||||
# # TODO: how do I get a minimally useful mobile environment?
|
||||
# # for me, this means an on-screen keyboard and suspend support I think?
|
||||
# # I can live in a tty if needed and graphical stuff can all evolve later
|
||||
# # not worried about modem
|
||||
# # maybe/hopefully I can pull in or define my own sxmo via nix?
|
||||
# ];
|
||||
# device = "pine64-pinephone";
|
||||
# pkgs = pkgsFor "aarch64-linux";
|
||||
# })
|
||||
# .outputs
|
||||
# .disk-image;
|
||||
|
||||
pinephone = let
|
||||
inherit (nixpkgs-unstable) lib;
|
||||
in
|
||||
lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
# lib.nixosSystem {
|
||||
|
||||
modules = with nixosModules; [
|
||||
{
|
||||
imports = [
|
||||
(import "${mobile-nixos}/lib/configuration.nix" {
|
||||
device = "pine64-pinephone";
|
||||
})
|
||||
];
|
||||
|
||||
# nixpkgs.hostPlatform.system = "aarch64-linux";
|
||||
nixpkgs.buildPlatform = "x86_64-linux";
|
||||
|
||||
# TODO: quirk: since the pinephone kernel doesn't seem to have "rpfilter" support, firewall ain't working
|
||||
networking.firewall.enable = lib.mkForce false;
|
||||
|
||||
# TODO: quirk: since git send-email requires perl support, which we don't seem to have on the pinephone, we're just disabling git for now
|
||||
# TODO: would likely be easier/better to somehow ignore the assertion? probably a way to do that...
|
||||
programs.git.enable = lib.mkForce false;
|
||||
|
||||
# this option is conflicted, presumably due to some assumption in my defaults/common config
|
||||
# the sd-image module we're importing above has this set to true, so we better go with that?
|
||||
# that said, I think the mobile-nixos bootloader module has this set to false, so...
|
||||
# TODO: what does this mean?
|
||||
boot.loader.generic-extlinux-compatible.enable = lib.mkForce true;
|
||||
|
||||
# another conflicting option since I think I default to NetworkManager and this conflicts with networking.wireless.enable
|
||||
networking.networkmanager.enable = lib.mkForce false;
|
||||
networking.wireless.enable = lib.mkForce true;
|
||||
}
|
||||
|
||||
# TODO: how do I build this as a .img to flash to an SD card?
|
||||
|
||||
# for testing, this seems to work `nixos-rebuild build --impure --flake .#pinephone`
|
||||
|
||||
# TODO: would like to use the mobile-nixos installer?
|
||||
"${nixpkgs-unstable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix"
|
||||
|
||||
linux
|
||||
home-manager-unstable-defaults
|
||||
|
||||
# outputs.diskoConfigurations.unencrypted # can I even disko with an image-based installation?
|
||||
common
|
||||
wifi
|
||||
|
||||
{
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
|
||||
{
|
||||
# nixpkgs.buildPlatform = "x86_64-linux";
|
||||
# nixpkgs.hostPlatform = lib.systems.examples.aarch64-multiplatform;
|
||||
# nixpkgs.localSystem.system = lib.systems.examples.x86_64-linux;
|
||||
# nixpkgs.crossSystem = lib.mkForce null;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
images.pinephone = outputs.nixosConfigurations.pinephone.config.system.build.sdImage;
|
||||
|
||||
homeConfigurations = {
|
||||
"deck" = let
|
||||
system = "x86_64-linux";
|
||||
pkgs = unstable.pkgsFor system;
|
||||
in
|
||||
home-manager-unstable.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = with homeManagerModules; [
|
||||
common
|
||||
{
|
||||
home = {
|
||||
homeDirectory = "/home/deck";
|
||||
username = "deck";
|
||||
stateVersion = "24.11";
|
||||
};
|
||||
}
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
ludusavi
|
||||
rclone
|
||||
];
|
||||
}
|
||||
linux
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
TODO: nix-on-droid for phone terminal usage? mobile-nixos?
|
||||
TODO: nix-darwin for work?
|
||||
TODO: nixos ISO?
|
||||
*/
|
||||
};
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 28 KiB |
|
@ -1,380 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="141.5919mm"
|
||||
height="122.80626mm"
|
||||
viewBox="0 0 501.70361 435.14028"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
|
||||
sodipodi:docname="Nix_snowflake_lytedev.svg"
|
||||
inkscape:export-filename="Nix_snowflake_lytedev.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs4">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient5562">
|
||||
<stop
|
||||
style="stop-color:#699ad7;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop5564" />
|
||||
<stop
|
||||
id="stop5566"
|
||||
offset="0.24345198"
|
||||
style="stop-color:#7eb1dd;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#7ebae4;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop5568" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient5053">
|
||||
<stop
|
||||
style="stop-color:#415e9a;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop5055" />
|
||||
<stop
|
||||
id="stop5057"
|
||||
offset="0.23168644"
|
||||
style="stop-color:#4a6baf;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#5277c3;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop5059" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient5960"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop5962"
|
||||
offset="0"
|
||||
style="stop-color:#637ddf;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#649afa;stop-opacity:1"
|
||||
offset="0.23168644"
|
||||
id="stop5964" />
|
||||
<stop
|
||||
id="stop5966"
|
||||
offset="1"
|
||||
style="stop-color:#719efa;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient5867">
|
||||
<stop
|
||||
style="stop-color:#7363df;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop5869" />
|
||||
<stop
|
||||
id="stop5871"
|
||||
offset="0.23168644"
|
||||
style="stop-color:#6478fa;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#719efa;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop5873" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
y2="515.97058"
|
||||
x2="282.26105"
|
||||
y1="338.62445"
|
||||
x1="213.95642"
|
||||
gradientTransform="translate(983.36076,601.38885)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient5855"
|
||||
xlink:href="#linearGradient5960"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
y2="515.97058"
|
||||
x2="282.26105"
|
||||
y1="338.62445"
|
||||
x1="213.95642"
|
||||
gradientTransform="translate(-197.75174,-337.1451)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient5855-8"
|
||||
xlink:href="#linearGradient5867"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
y2="247.58188"
|
||||
x2="-702.75317"
|
||||
y1="102.74675"
|
||||
x1="-775.20807"
|
||||
gradientTransform="translate(983.36076,601.38885)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient4544"
|
||||
xlink:href="#linearGradient5960"
|
||||
inkscape:collect="always" />
|
||||
<clipPath
|
||||
id="clipPath4501"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<circle
|
||||
r="241.06563"
|
||||
cy="686.09473"
|
||||
cx="335.13995"
|
||||
id="circle4503"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#adadad;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
id="clipPath5410"
|
||||
clipPathUnits="userSpaceOnUse">
|
||||
<circle
|
||||
r="241.13741"
|
||||
cy="340.98975"
|
||||
cx="335.98114"
|
||||
id="circle5412"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
</clipPath>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient5053"
|
||||
id="linearGradient5137"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(864.55062,-2197.497)"
|
||||
x1="-584.19934"
|
||||
y1="782.33563"
|
||||
x2="-496.29703"
|
||||
y2="937.71399" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient5053"
|
||||
id="linearGradient5147"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(864.55062,-2197.497)"
|
||||
x1="-584.19934"
|
||||
y1="782.33563"
|
||||
x2="-496.29703"
|
||||
y2="937.71399" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient5562"
|
||||
id="linearGradient5162"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(70.505061,-1761.3076)"
|
||||
x1="200.59668"
|
||||
y1="351.41116"
|
||||
x2="290.08701"
|
||||
y2="506.18814" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient5562"
|
||||
id="linearGradient5172"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(70.505061,-1761.3076)"
|
||||
x1="200.59668"
|
||||
y1="351.41116"
|
||||
x2="290.08701"
|
||||
y2="506.18814" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient5562"
|
||||
id="linearGradient5182"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(70.505061,-1761.3076)"
|
||||
x1="200.59668"
|
||||
y1="351.41116"
|
||||
x2="290.08701"
|
||||
y2="506.18814" />
|
||||
<linearGradient
|
||||
y2="506.18814"
|
||||
x2="290.08701"
|
||||
y1="351.41116"
|
||||
x1="200.59668"
|
||||
gradientTransform="translate(70.505061,-1761.3076)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient5201"
|
||||
xlink:href="#linearGradient5562"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
y2="937.71399"
|
||||
x2="-496.29703"
|
||||
y1="782.33563"
|
||||
x1="-584.19934"
|
||||
gradientTransform="translate(864.55062,-2197.497)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient5205"
|
||||
xlink:href="#linearGradient5053"
|
||||
inkscape:collect="always" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.98318225"
|
||||
inkscape:cx="112.8987"
|
||||
inkscape:cy="191.21582"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="2059"
|
||||
inkscape:window-height="1588"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:snap-global="true"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:showpageshadow="0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#505050" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="print-logo"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
style="display:inline"
|
||||
transform="translate(-156.33871,933.1905)">
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 309.40365,-710.2521 122.19683,211.6751 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4902 -33.22946,-57.8256 z"
|
||||
id="path4861"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccccc" />
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#df3c59;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 353.50926,-797.4433 -122.21756,211.6631 -28.53477,-48.37 32.93839,-56.6875 -65.41521,-0.1719 -13.9414,-24.1698 14.23637,-24.721 93.11177,0.2939 33.46371,-57.6903 z"
|
||||
id="use4863"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccccc" />
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#df3c59;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 362.88537,-628.243 244.41439,0.012 -27.62229,48.8968 -65.56199,-0.1817 32.55876,56.7371 -13.96098,24.1585 -28.52722,0.032 -46.3013,-80.7841 -66.69317,-0.1353 z"
|
||||
id="use4865"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccccc" />
|
||||
<path
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#df3c59;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 505.14318,-720.9886 -122.19683,-211.6751 56.15706,-0.5268 32.6236,56.8692 32.85645,-56.5653 27.90237,0.011 14.29086,24.6896 -46.81047,80.4902 33.22946,57.8256 z"
|
||||
id="use4867"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4873"
|
||||
d="m 309.40365,-710.2521 122.19683,211.6751 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4902 -33.22946,-57.8256 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#8e293b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="use4875"
|
||||
d="m 451.3364,-803.53264 -244.4144,-0.012 27.62229,-48.89685 65.56199,0.18175 -32.55875,-56.73717 13.96097,-24.15851 28.52722,-0.0315 46.3013,80.78414 66.69317,0.13524 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#8e293b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="use4877"
|
||||
d="m 460.87178,-633.8425 122.21757,-211.66304 28.53477,48.37003 -32.93839,56.68751 65.4152,0.1718 13.9414,24.1698 -14.23636,24.7211 -93.11177,-0.294 -33.46371,57.6904 z"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#8e293b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<g
|
||||
id="layer2"
|
||||
inkscape:label="guides"
|
||||
style="display:none"
|
||||
transform="translate(72.039038,-1799.4476)">
|
||||
<path
|
||||
d="M 460.60629,594.72881 209.74183,594.7288 84.309616,377.4738 209.74185,160.21882 l 250.86446,1e-5 125.43222,217.255 z"
|
||||
inkscape:randomized="0"
|
||||
inkscape:rounded="0"
|
||||
inkscape:flatsided="true"
|
||||
sodipodi:arg2="1.5707963"
|
||||
sodipodi:arg1="1.0471976"
|
||||
sodipodi:r2="217.25499"
|
||||
sodipodi:r1="250.86446"
|
||||
sodipodi:cy="377.47382"
|
||||
sodipodi:cx="335.17407"
|
||||
sodipodi:sides="6"
|
||||
id="path6032"
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.236;fill:#4e4d52;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
sodipodi:type="star" />
|
||||
<path
|
||||
transform="translate(0,-308.26772)"
|
||||
sodipodi:type="star"
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#4e4d52;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="path5875"
|
||||
sodipodi:sides="6"
|
||||
sodipodi:cx="335.17407"
|
||||
sodipodi:cy="685.74158"
|
||||
sodipodi:r1="100.83495"
|
||||
sodipodi:r2="87.32563"
|
||||
sodipodi:arg1="1.0471976"
|
||||
sodipodi:arg2="1.5707963"
|
||||
inkscape:flatsided="true"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 385.59154,773.06721 -100.83495,0 -50.41747,-87.32564 50.41748,-87.32563 100.83495,10e-6 50.41748,87.32563 z" />
|
||||
<path
|
||||
transform="translate(0,-308.26772)"
|
||||
sodipodi:nodetypes="ccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5851"
|
||||
d="m 1216.5591,938.53395 123.0545,228.14035 -42.6807,-1.2616 -43.4823,-79.7725 -39.6506,80.3267 -32.6875,-19.7984 53.4737,-100.2848 -37.1157,-73.88955 z"
|
||||
style="fill:url(#linearGradient5855);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.415;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#c53a3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect5884"
|
||||
width="48.834862"
|
||||
height="226.22897"
|
||||
x="-34.74221"
|
||||
y="446.17056"
|
||||
transform="rotate(-30)" />
|
||||
<path
|
||||
transform="translate(0,-308.26772)"
|
||||
sodipodi:type="star"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.509;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="path3428"
|
||||
sodipodi:sides="6"
|
||||
sodipodi:cx="223.93674"
|
||||
sodipodi:cy="878.63831"
|
||||
sodipodi:r1="28.048939"
|
||||
sodipodi:r2="24.291094"
|
||||
sodipodi:arg1="0"
|
||||
sodipodi:arg2="0.52359878"
|
||||
inkscape:flatsided="true"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 251.98568,878.63831 -14.02447,24.29109 h -28.04894 l -14.02447,-24.29109 14.02447,-24.2911 h 28.04894 z" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#rect5884"
|
||||
id="use4252"
|
||||
transform="rotate(60,268.29786,489.4515)"
|
||||
width="100%"
|
||||
height="100%" />
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.650794;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect4254"
|
||||
width="5.3947482"
|
||||
height="115.12564"
|
||||
x="545.71014"
|
||||
y="467.07007"
|
||||
transform="rotate(30,575.23539,-154.13386)" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 19 KiB |
|
@ -1,4 +1,4 @@
|
|||
{lib, ...}: {
|
||||
{nixpkgs, ...}: {
|
||||
schemes = let
|
||||
mkColorScheme = scheme @ {
|
||||
scheme-name,
|
||||
|
@ -22,6 +22,7 @@
|
|||
}: let
|
||||
base =
|
||||
{
|
||||
# aliases?
|
||||
text = fg;
|
||||
primary = blue;
|
||||
urgent = red;
|
||||
|
@ -49,14 +50,14 @@
|
|||
}
|
||||
// scheme;
|
||||
in
|
||||
base
|
||||
// {
|
||||
withHashPrefix = lib.mapAttrs (_: value: "#${value}") base;
|
||||
};
|
||||
{
|
||||
withHashPrefix = nixpkgs.lib.mapAttrs (_: value: "#${value}") base;
|
||||
}
|
||||
// base;
|
||||
in {
|
||||
donokai = mkColorScheme {
|
||||
scheme-name = "donokai";
|
||||
bg = "110f0a";
|
||||
bg = "111111";
|
||||
bg2 = "181818";
|
||||
bg3 = "222222";
|
||||
bg4 = "292929";
|
||||
|
|
|
@ -80,7 +80,6 @@ nix-shell --packages git --run "sudo nix run \
|
|||
# install
|
||||
nix-shell --packages git \
|
||||
--run "sudo nixos-install \
|
||||
--no-write-lock-file \
|
||||
--flake 'git+https://git.lyte.dev/lytedev/nix#${FLAKE_ATTR}' \
|
||||
--option trusted-substituters 'https://cache.nixos.org https://nix.h.lyte.dev' \
|
||||
--option trusted-public-keys 'cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0='"
|
||||
|
|
5
modules/home-manager/base.nix
Normal file
5
modules/home-manager/base.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{outputs, ...}: {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
sway
|
||||
];
|
||||
}
|
26
modules/home-manager/bat.nix
Normal file
26
modules/home-manager/bat.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
# pkgs,
|
||||
# colors,
|
||||
...
|
||||
}: {
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "ansi";
|
||||
};
|
||||
# themes = {
|
||||
# "Catppuccin-mocha" = builtins.readFile (pkgs.fetchFromGitHub
|
||||
# {
|
||||
# owner = "catppuccin";
|
||||
# repo = "bat";
|
||||
# rev = "477622171ec0529505b0ca3cada68fc9433648c6";
|
||||
# sha256 = "6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
|
||||
# }
|
||||
# + "/Catppuccin-mocha.tmTheme");
|
||||
# };
|
||||
};
|
||||
|
||||
home.shellAliases = {
|
||||
cat = "bat";
|
||||
};
|
||||
}
|
34
modules/home-manager/broot.nix
Normal file
34
modules/home-manager/broot.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{colors, ...}: {
|
||||
programs.broot = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
settings = {
|
||||
modal = true; # vim mode?
|
||||
|
||||
verbs = [
|
||||
{
|
||||
invocation = "edit";
|
||||
shortcut = "e";
|
||||
execution = "$EDITOR {file}";
|
||||
}
|
||||
];
|
||||
|
||||
skin = with colors.withHashPrefix; {
|
||||
status_normal_fg = fg;
|
||||
status_normal_bg = bg;
|
||||
status_error_fg = red;
|
||||
status_error_bg = yellow;
|
||||
tree_fg = red;
|
||||
selected_line_bg = bg2;
|
||||
permissions_fg = purple;
|
||||
size_bar_full_bg = red;
|
||||
size_bar_void_bg = bg;
|
||||
directory_fg = yellow;
|
||||
input_fg = blue;
|
||||
flag_value_fg = yellow;
|
||||
table_border_fg = red;
|
||||
code_fg = yellow;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
9
modules/home-manager/cargo.nix
Normal file
9
modules/home-manager/cargo.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{config, ...}: {
|
||||
home.file."${config.xdg.configHome}/cargo/config.toml" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
[build]
|
||||
rustdocflags = ["--default-theme=ayu"];
|
||||
'';
|
||||
};
|
||||
}
|
118
modules/home-manager/common.nix
Normal file
118
modules/home-manager/common.nix
Normal file
|
@ -0,0 +1,118 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
system,
|
||||
inputs,
|
||||
outputs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
# TODO: fonts? right now they are only handled at the nixos-level (desktop-usage module)
|
||||
# TODO: wallpaper?
|
||||
|
||||
imports = with outputs.homeManagerModules; [
|
||||
# nix-colors.homeManagerModules.default
|
||||
fish
|
||||
bat
|
||||
helix
|
||||
git
|
||||
zellij
|
||||
broot
|
||||
nnn
|
||||
htop
|
||||
tmux
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
services.ssh-agent.enable = true;
|
||||
|
||||
home = {
|
||||
username = lib.mkDefault "lytedev";
|
||||
homeDirectory = lib.mkDefault "/home/lytedev";
|
||||
stateVersion = lib.mkDefault "23.11";
|
||||
|
||||
sessionVariables = {
|
||||
EDITOR = "hx";
|
||||
VISUAL = "hx";
|
||||
PAGER = "less";
|
||||
MANPAGER = "less";
|
||||
};
|
||||
|
||||
packages = [
|
||||
# tools I use when editing nix code
|
||||
pkgs.nil
|
||||
pkgs.alejandra
|
||||
|
||||
# common scripts
|
||||
(pkgs.buildEnv {
|
||||
name = "my-scripts-common";
|
||||
paths = [./scripts/common];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
# TODO: not common?
|
||||
# programs.password-store = {
|
||||
# enable = true;
|
||||
# package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
|
||||
# };
|
||||
|
||||
# programs.gitui = {
|
||||
# enable = true;
|
||||
# };
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
package = inputs.nixpkgs.legacyPackages.${system}.eza;
|
||||
};
|
||||
|
||||
programs.skim = {
|
||||
# https://github.com/lotabout/skim/issues/494
|
||||
enable = false;
|
||||
enableFishIntegration = true;
|
||||
defaultOptions = ["--no-clear-start" "--color=16"];
|
||||
};
|
||||
|
||||
programs.atuin = {
|
||||
enable = true;
|
||||
enableBashIntegration = config.programs.bash.enable;
|
||||
enableFishIntegration = config.programs.fish.enable;
|
||||
enableZshIntegration = config.programs.zsh.enable;
|
||||
enableNushellIntegration = config.programs.nushell.enable;
|
||||
|
||||
flags = [
|
||||
"--disable-up-arrow"
|
||||
];
|
||||
|
||||
settings = {
|
||||
auto_sync = true;
|
||||
sync_frequency = "1m";
|
||||
sync_address = "https://atuin.h.lyte.dev";
|
||||
keymap_mode = "vim-insert";
|
||||
};
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
# using good ol' fzf until skim sucks less out of the box I guess
|
||||
enable = true;
|
||||
# enableFishIntegration = true;
|
||||
# defaultCommand = "fd --type f";
|
||||
# defaultOptions = ["--height 40%"];
|
||||
# fileWidgetOptions = ["--preview 'head {}'"];
|
||||
};
|
||||
|
||||
# TODO: regular cron or something?
|
||||
programs.nix-index = {
|
||||
enable = true;
|
||||
|
||||
enableBashIntegration = config.programs.bash.enable;
|
||||
enableFishIntegration = config.programs.fish.enable;
|
||||
enableZshIntegration = config.programs.zsh.enable;
|
||||
};
|
||||
}
|
File diff suppressed because it is too large
Load diff
52
modules/home-manager/desktop.nix
Normal file
52
modules/home-manager/desktop.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
pkgs,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
kitty
|
||||
wezterm
|
||||
{
|
||||
programs.gitui = {
|
||||
enable = true;
|
||||
theme = ''
|
||||
(
|
||||
selected_tab: Some(Reset),
|
||||
command_fg: Some(Rgb(205, 214, 244)),
|
||||
selection_bg: Some(Rgb(88, 91, 112)),
|
||||
selection_fg: Some(Rgb(205, 214, 244)),
|
||||
cmdbar_bg: Some(Rgb(24, 24, 37)),
|
||||
cmdbar_extra_lines_bg: Some(Rgb(24, 24, 37)),
|
||||
disabled_fg: Some(Rgb(127, 132, 156)),
|
||||
diff_line_add: Some(Rgb(166, 227, 161)),
|
||||
diff_line_delete: Some(Rgb(243, 139, 168)),
|
||||
diff_file_added: Some(Rgb(249, 226, 175)),
|
||||
diff_file_removed: Some(Rgb(235, 160, 172)),
|
||||
diff_file_moved: Some(Rgb(203, 166, 247)),
|
||||
diff_file_modified: Some(Rgb(250, 179, 135)),
|
||||
commit_hash: Some(Rgb(180, 190, 254)),
|
||||
commit_time: Some(Rgb(186, 194, 222)),
|
||||
commit_author: Some(Rgb(116, 199, 236)),
|
||||
danger_fg: Some(Rgb(243, 139, 168)),
|
||||
push_gauge_bg: Some(Rgb(137, 180, 250)),
|
||||
push_gauge_fg: Some(Rgb(30, 30, 46)),
|
||||
tag_fg: Some(Rgb(245, 224, 220)),
|
||||
branch_fg: Some(Rgb(148, 226, 213))
|
||||
)
|
||||
'';
|
||||
# package = pkgs.gitui.overrideAttrs {
|
||||
# version = "5b3e2c9ae3913855f5dbe463c5ae1c04430e7532";
|
||||
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# owner = "extrawurst";
|
||||
# repo = "gitui";
|
||||
# rev = "5b3e2c9ae3913855f5dbe463c5ae1c04430e7532";
|
||||
# hash = "sha256-Uf1hGvau6tdZGBHmmNnTd3p/Wlw5Eb3ASI2xaETWnF0=";
|
||||
# };
|
||||
|
||||
# cargoSha256 = "";
|
||||
# };
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
46
modules/home-manager/development-tools.nix
Normal file
46
modules/home-manager/development-tools.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
# pkgs,
|
||||
# outputs,
|
||||
...
|
||||
}: {
|
||||
programs.gitui = {
|
||||
enable = true;
|
||||
theme = ''
|
||||
(
|
||||
selected_tab: Some(Reset),
|
||||
command_fg: Some(Rgb(205, 214, 244)),
|
||||
selection_bg: Some(Rgb(88, 91, 112)),
|
||||
selection_fg: Some(Rgb(205, 214, 244)),
|
||||
cmdbar_bg: Some(Rgb(24, 24, 37)),
|
||||
cmdbar_extra_lines_bg: Some(Rgb(24, 24, 37)),
|
||||
disabled_fg: Some(Rgb(127, 132, 156)),
|
||||
diff_line_add: Some(Rgb(166, 227, 161)),
|
||||
diff_line_delete: Some(Rgb(243, 139, 168)),
|
||||
diff_file_added: Some(Rgb(249, 226, 175)),
|
||||
diff_file_removed: Some(Rgb(235, 160, 172)),
|
||||
diff_file_moved: Some(Rgb(203, 166, 247)),
|
||||
diff_file_modified: Some(Rgb(250, 179, 135)),
|
||||
commit_hash: Some(Rgb(180, 190, 254)),
|
||||
commit_time: Some(Rgb(186, 194, 222)),
|
||||
commit_author: Some(Rgb(116, 199, 236)),
|
||||
danger_fg: Some(Rgb(243, 139, 168)),
|
||||
push_gauge_bg: Some(Rgb(137, 180, 250)),
|
||||
push_gauge_fg: Some(Rgb(30, 30, 46)),
|
||||
tag_fg: Some(Rgb(245, 224, 220)),
|
||||
branch_fg: Some(Rgb(148, 226, 213))
|
||||
)
|
||||
'';
|
||||
# package = pkgs.gitui.overrideAttrs {
|
||||
# version = "5b3e2c9ae3913855f5dbe463c5ae1c04430e7532";
|
||||
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# owner = "extrawurst";
|
||||
# repo = "gitui";
|
||||
# rev = "5b3e2c9ae3913855f5dbe463c5ae1c04430e7532";
|
||||
# hash = "sha256-Uf1hGvau6tdZGBHmmNnTd3p/Wlw5Eb3ASI2xaETWnF0=";
|
||||
# };
|
||||
|
||||
# cargoSha256 = "";
|
||||
# };
|
||||
};
|
||||
}
|
10
modules/home-manager/eww.nix
Normal file
10
modules/home-manager/eww.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
programs.eww = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home.file.".config/eww/eww.yuck" = {
|
||||
enable = true;
|
||||
text = builtins.readFile ./eww/eww.yuck;
|
||||
};
|
||||
}
|
|
@ -38,8 +38,8 @@ $rosewater: #f5e0dc;
|
|||
font-size: 12.0pt;
|
||||
}
|
||||
|
||||
.leftsidestuff slider {
|
||||
color: $sapphire;
|
||||
.sidestuff slider {
|
||||
color: #ffd5cd;
|
||||
}
|
||||
|
||||
.metric {}
|
||||
|
@ -75,34 +75,10 @@ $rosewater: #f5e0dc;
|
|||
|
||||
.vol .muted,
|
||||
.mic .live {
|
||||
color: $red;
|
||||
color: #f38ba8;
|
||||
}
|
||||
|
||||
.vol .live,
|
||||
.mic .muted {
|
||||
color: $sapphire;
|
||||
}
|
||||
|
||||
.workspace {
|
||||
/* height: 100%; */
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.workspace.occupied {
|
||||
color: $text;
|
||||
}
|
||||
|
||||
.workspace.occupied.active,
|
||||
.workspace.active {
|
||||
color: $base;
|
||||
background-color: $subtext1;
|
||||
}
|
||||
|
||||
.workspace.occupied.focused.active,
|
||||
.workspace.occupied.focused,
|
||||
.workspace.focused {
|
||||
color: $base;
|
||||
background-color: $sapphire;
|
||||
color: #74c7ec;
|
||||
}
|
|
@ -1,9 +1,8 @@
|
|||
(defwidget bar []
|
||||
(centerbox :orientation "h"
|
||||
(leftsidestuff)
|
||||
(sidestuff)
|
||||
(box)
|
||||
(rightsidestuff)
|
||||
))
|
||||
(music)))
|
||||
|
||||
(defwindow bar0
|
||||
:monitor 0
|
||||
|
@ -14,7 +13,7 @@
|
|||
:x "0%"
|
||||
:y "0%"
|
||||
:width "100%"
|
||||
:height "32px"
|
||||
:height "31px"
|
||||
:anchor "bottom center")
|
||||
(bar))
|
||||
|
||||
|
@ -27,35 +26,27 @@
|
|||
:x "0%"
|
||||
:y "0%"
|
||||
:width "100%"
|
||||
:height "32px"
|
||||
:height "31px"
|
||||
:anchor "bottom center")
|
||||
(bar))
|
||||
|
||||
(defwidget rightsidestuff []
|
||||
(box :class "rightsidestuff" :orientation "h" :space-evenly false :halign "end" :valign "center" :spacing 10
|
||||
(music)
|
||||
(systray)
|
||||
))
|
||||
|
||||
(defwidget leftsidestuff []
|
||||
(box :class "leftsidestuff" :orientation "h" :space-evenly false :halign "start" :valign "center" :spacing 10
|
||||
(defwidget sidestuff []
|
||||
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "start" :spacing 20
|
||||
time
|
||||
; TODO: idle inhibitor?
|
||||
; TODO: get these to align properly? icons seem lower than they should be?
|
||||
; TODO: get these to align properly?
|
||||
(box :class "mic" (
|
||||
box :class {micMuted == "false" ? "live" : "muted"} {micMuted == "false" ? " " : " "}
|
||||
) {"${micVolume}%"}
|
||||
) {micVolume + "%"}
|
||||
)
|
||||
(box :class "vol" (
|
||||
box :class {muted == "false" ? "live" : "muted"} {muted == "false" ? " " : " "}
|
||||
) {"${volume}%"}
|
||||
) {volume + "%"}
|
||||
)
|
||||
{" ${round(EWW_CPU["avg"], 0)}%"}
|
||||
{" ${round(EWW_RAM["used_mem_perc"], 0)}%"}
|
||||
; TODO: have these "widgets" be omitted entirely instead of just empty strings
|
||||
{(showBrightness == "true") ? (" ${brightness}%") : ""}
|
||||
{(showBattery == "true") ? (" ${EWW_BATTERY["BAT1"]["capacity"]}% (${batteryTime})") : ""}
|
||||
(box :orientation "h" :space-evenly false :halign "start" :valign "center" (workspaces))
|
||||
{" " + round(EWW_CPU["avg"], 0) + "%"}
|
||||
{" " + round(EWW_RAM["used_mem_perc"], 0) + "%"}
|
||||
{isDesktop == "true" ? "" : " " + brightness + "%"}
|
||||
{isDesktop == "true" ? "" : " " + EWW_BATTERY["BAT1"]["capacity"] + "%"}
|
||||
))
|
||||
|
||||
(defwidget music []
|
||||
|
@ -80,26 +71,14 @@
|
|||
(deflisten micMuted :initial "false"
|
||||
"pamixer --default-source --get-mute; pactl subscribe | grep source --line-buffered | while read i; do pamixer --default-source --get-mute; done")
|
||||
|
||||
; "upower -d | rg '\\s*(time to empty|time to full):\\s*(\\d.*)\$' -r '\$2'; upower --monitor-detail | rg '\\s*(time to empty|time to full):\\s*(\\d.*)\$' -r '\$2'")
|
||||
|
||||
; (deflisten batteryTime :initial "unknown"
|
||||
; "upower -d | rg '\s*time to empty:\s*(\d.*)\$' -r '\$1'; upower --monitor-detail | rg '\\s*time to empty:\\s*(\\d.*)\$' -r '\$1'")
|
||||
|
||||
(defpoll time :interval "1s"
|
||||
"date '+%a %b %d %H:%M:%S'")
|
||||
|
||||
(defpoll showBrightness :interval "24h"
|
||||
; if we have at least one file in /sys/class/backlight, we should try and show brightness
|
||||
"if [ \"$(find /sys/class/backlight -mindepth 1 -maxdepth 1 | head -n 1 | wc -l)\" == \"1\" ]; then echo true; else echo false; fi")
|
||||
|
||||
(defpoll showBattery :interval "24h"
|
||||
; if we have at least one battery in /sys/class/power_supply, we should try and show battery levels
|
||||
"if find /sys/class/power_supply -mindepth 1 -maxdepth 1 2>&1 | rg '\/sys\/class\/power_supply\/BAT' 2>&1 > /dev/null; then echo true; else echo false; fi")
|
||||
(defpoll isDesktop :interval "24h"
|
||||
"if [ -d \"$HOME/.config/lytedev-env/host-desktop\" ]; then echo true; else echo false; fi")
|
||||
|
||||
(defpoll brightness :interval "10s"
|
||||
"echo $(((100 * $(brightnessctl get)) / $(brightnessctl max)))")
|
||||
|
||||
(deflisten batteryTime :initial "unknown" "scripts/battery-time.bash")
|
||||
|
||||
(deflisten workspace "scripts/hypr-workspaces.bash")
|
||||
(defwidget workspaces [] (literal :content workspace))
|
||||
(defpoll monitor :interval "60s"
|
||||
"echo $EWW_BAR_MON")
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
{ upower -d; upower --monitor-detail; } \
|
||||
| rg '\s*time to.*:\s*(\d.*)\s*$' -r '$1'
|
|
@ -1,70 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# TODO: we're mixing bash arrays and not-arrays - get it together
|
||||
|
||||
#define icons for workspaces 1-9
|
||||
ic=(1 2 3 4 5 6 7 8 9)
|
||||
|
||||
occ() { export o"$1"="occupied"; }
|
||||
unocc() { unset -v o"$1"; }
|
||||
|
||||
active() { export a"$1"="active"; }
|
||||
unactive() { unset -v a"$1"; }
|
||||
|
||||
focus() { export f"$1"="focused"; }
|
||||
unfocus() { unset -v f"$1"; }
|
||||
|
||||
workspaces() {
|
||||
for num in 1 2 3 4 5 6 7 8 9; do
|
||||
unfocus $num
|
||||
unactive $num
|
||||
unocc $num
|
||||
done
|
||||
|
||||
# TODO: avoid recomputing these each time and actually listen to the events?
|
||||
mons_json=$(hyprctl monitors -j)
|
||||
for num in $(hyprctl workspaces -j | jq -r '.[] | select(.windows > 0) | .id'); do
|
||||
occ "$num"
|
||||
done
|
||||
|
||||
for num in $(echo "$mons_json" | jq -r '.[].activeWorkspace.id'); do
|
||||
active "$num"
|
||||
done
|
||||
|
||||
for num in $(echo "$mons_json" | jq -r '.[] | select(.focused) | .activeWorkspace.id'); do
|
||||
focus "$num"
|
||||
done
|
||||
|
||||
# TODO: would be nice to have monitors' workspaces show up in left-to-right
|
||||
# order as laid out in physical/pixel space
|
||||
# this would make glancing at the workspace indicator more intuitive
|
||||
# TODO: might be nice to exclude certain windows as counting towards "occupation" such as xwaylandvideobridge or w/e
|
||||
# NOTE: maybe I can group workspaces by their monitor with some mechanism for "unassigned" workspace to show up by a "primary" monitor
|
||||
|
||||
# render eww widget
|
||||
echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" \
|
||||
(box :class \"workspaces\" :orientation \"h\" :spacing 0 :space-evenly \"true\" \
|
||||
(button :onclick \"hyprctl dispatch workspace 1\" :onrightclick \"hyprctl dispatch workspace 1\" :class \"workspace $a1 $o1 $f1\" \"${ic[0]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 2\" :onrightclick \"hyprctl dispatch workspace 2\" :class \"workspace $a2 $o2 $f2\" \"${ic[1]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 3\" :onrightclick \"hyprctl dispatch workspace 3\" :class \"workspace $a3 $o3 $f3\" \"${ic[2]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 4\" :onrightclick \"hyprctl dispatch workspace 4\" :class \"workspace $a4 $o4 $f4\" \"${ic[3]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 5\" :onrightclick \"hyprctl dispatch workspace 5\" :class \"workspace $a5 $o5 $f5\" \"${ic[4]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 6\" :onrightclick \"hyprctl dispatch workspace 6\" :class \"workspace $a6 $o6 $f6\" \"${ic[5]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 7\" :onrightclick \"hyprctl dispatch workspace 7\" :class \"workspace $a7 $o7 $f7\" \"${ic[6]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 8\" :onrightclick \"hyprctl dispatch workspace 8\" :class \"workspace $a8 $o8 $f8\" \"${ic[7]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 9\" :onrightclick \"hyprctl dispatch workspace 9\" :class \"workspace $a9 $o9 $f9\" \"${ic[8]}\") \
|
||||
) \
|
||||
)"
|
||||
}
|
||||
|
||||
# initial render
|
||||
workspaces
|
||||
|
||||
# listen to events and re-render
|
||||
while true; do
|
||||
# TODO: not sure why this socat | read invocation seems to stop?
|
||||
socat - "UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do
|
||||
workspaces "$line"
|
||||
done
|
||||
done
|
||||
echo '(box "DONE")'
|
6
modules/home-manager/ewwbar.nix
Normal file
6
modules/home-manager/ewwbar.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{...}: {
|
||||
programs.eww = {
|
||||
enable = true;
|
||||
configDir = ./eww;
|
||||
};
|
||||
}
|
22
modules/home-manager/firefox-no-tabs.nix
Normal file
22
modules/home-manager/firefox-no-tabs.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{...}: {
|
||||
programs.firefox = {
|
||||
profiles = {
|
||||
daniel = {
|
||||
userChrome = ''
|
||||
#TabsToolbar {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar>.toolbar-items {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
|
||||
visibility: collapse !important;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
40
modules/home-manager/firefox.nix
Normal file
40
modules/home-manager/firefox.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{pkgs, ...}: {
|
||||
programs.firefox = {
|
||||
# TODO: this should be able to work on macos, no?
|
||||
# TODO: enable dark theme by default
|
||||
enable = true;
|
||||
|
||||
# TODO: uses nixpkgs.pass so pass otp doesn't work
|
||||
package = pkgs.firefox.override {nativeMessagingHosts = [pkgs.passff-host];};
|
||||
|
||||
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
# ublock-origin
|
||||
# ]; # TODO: would be nice to have _all_ my firefox stuff managed here instead of Firefox Sync maybe?
|
||||
|
||||
profiles = {
|
||||
daniel = {
|
||||
id = 0;
|
||||
settings = {
|
||||
"general.smoothScroll" = true;
|
||||
"browser.zoom.siteSpecific" = false;
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
|
||||
// user_pref("full-screen-api.ignore-widgets", true);
|
||||
user_pref("media.ffmpeg.vaapi.enabled", true);
|
||||
user_pref("media.rdd-vpx.enabled", true);
|
||||
'';
|
||||
|
||||
userChrome = ''
|
||||
#webrtcIndicator {
|
||||
display: none;
|
||||
}
|
||||
'';
|
||||
|
||||
# userContent = ''
|
||||
# '';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
84
modules/home-manager/fish.nix
Normal file
84
modules/home-manager/fish.nix
Normal file
|
@ -0,0 +1,84 @@
|
|||
{pkgs, ...}: {
|
||||
home = {
|
||||
packages = [
|
||||
pkgs.gawk # used in prompt
|
||||
];
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
# I load long scripts from files for a better editing experience
|
||||
shellInit = builtins.readFile ./fish/shellInit.fish;
|
||||
interactiveShellInit = builtins.readFile ./fish/interactiveShellInit.fish;
|
||||
loginShellInit = "";
|
||||
functions = {
|
||||
# TODO: I think these should be loaded from fish files too for better editor experience?
|
||||
d = ''
|
||||
# --wraps=cd --description "Quickly jump to NICE_HOME (or given relative or absolute path) and list files."
|
||||
if count $argv > /dev/null
|
||||
cd $argv
|
||||
else
|
||||
cd $NICE_HOME
|
||||
end
|
||||
la
|
||||
'';
|
||||
|
||||
c = ''
|
||||
if count $argv > /dev/null
|
||||
cd $NICE_HOME && d $argv
|
||||
else
|
||||
d $NICE_HOME
|
||||
end
|
||||
'';
|
||||
|
||||
ltl = ''
|
||||
set d $argv[1] .
|
||||
set -l l ""
|
||||
for f in $d[1]/*
|
||||
if test -z $l; set l $f; continue; end
|
||||
if command test $f -nt $l; and test ! -d $f
|
||||
set l $f
|
||||
end
|
||||
end
|
||||
echo $l
|
||||
'';
|
||||
|
||||
has_command = "command --quiet --search $argv[1]";
|
||||
};
|
||||
shellAbbrs = {};
|
||||
shellAliases = {
|
||||
l = "br";
|
||||
ls = "eza --group-directories-first --classify";
|
||||
la = "eza -la --group-directories-first --classify";
|
||||
lA = "eza -la --all --group-directories-first --classify";
|
||||
tree = "eza --tree --level=3";
|
||||
lt = "eza -l --sort=modified";
|
||||
lat = "eza -la --sort=modified";
|
||||
lc = "lt --sort=accessed";
|
||||
lT = "lt --reverse";
|
||||
lC = "lc --reverse";
|
||||
lD = "la --only-dirs";
|
||||
"cd.." = "d ..";
|
||||
"cdc" = "d $XDG_CONFIG_HOME";
|
||||
"cdn" = "d $NOTES_PATH";
|
||||
"cdl" = "d $XDG_DOWNLOAD_DIR";
|
||||
"cdg" = "d $XDG_GAMES_DIR";
|
||||
".." = "d ..";
|
||||
"..." = "d ../..";
|
||||
"...." = "d ../../..";
|
||||
"....." = "d ../../../..";
|
||||
"......" = "d ../../../../..";
|
||||
"......." = "d ../../../../../..";
|
||||
"........" = "d ../../../../../../..";
|
||||
"........." = "d ../../../../../../../..";
|
||||
p = "ping";
|
||||
dc = "docker compose";
|
||||
pc = "podman-compose";
|
||||
k = "kubectl";
|
||||
kg = "kubectl get";
|
||||
v = "$EDITOR";
|
||||
sv = "sudo $EDITOR";
|
||||
kssh = "kitty +kitten ssh";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -21,17 +21,12 @@ function preprocess_pwd
|
|||
| gawk '{n=split($0,p,"/");for(i=1;i<=n;i++){if(i==n){printf "/%s",p[i]}else{printf "/%.3s",p[i]}}}'
|
||||
end
|
||||
|
||||
function _maybe_elevated_access_prefix
|
||||
function _maybe_sudo_prefix
|
||||
if set -q SUDO_USER
|
||||
set_color -b yellow black
|
||||
printf " SUDO "
|
||||
set_color -b normal normal
|
||||
printf " "
|
||||
else if test $USER = root
|
||||
set_color -b red black
|
||||
printf " ROOT "
|
||||
set_color -b normal normal
|
||||
printf " "
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -61,9 +56,6 @@ end
|
|||
function _last_cmd_duration
|
||||
set_color -b normal green
|
||||
set -q CMD_DURATION && printf " %dms" $CMD_DURATION
|
||||
if test $CMD_DURATION -gt 5000
|
||||
printf "\e]777;notify;%s;%s\e\\" "WezTerm: Command Finished" (history --max 1)
|
||||
end
|
||||
end
|
||||
|
||||
function _maybe_jobs_summary
|
||||
|
@ -119,7 +111,7 @@ function fish_prompt
|
|||
set last_cmd_status $status
|
||||
_prompt_marker
|
||||
_prompt_prefix
|
||||
_maybe_elevated_access_prefix
|
||||
_maybe_sudo_prefix
|
||||
_user_and_host $last_cmd_status
|
||||
_cur_work_dir
|
||||
_maybe_git_summary
|
||||
|
@ -147,10 +139,10 @@ bind --mode insert --sets-mode default jk repaint
|
|||
bind --mode insert --sets-mode default jK repaint
|
||||
bind --mode insert --sets-mode default Jk repaint
|
||||
bind --mode insert --sets-mode default JK repaint
|
||||
# bind --mode insert --sets-mode default jj repaint
|
||||
# bind --mode insert --sets-mode default jJ repaint
|
||||
# bind --mode insert --sets-mode default Jj repaint
|
||||
# bind --mode insert --sets-mode default JJ repaint
|
||||
bind --mode insert --sets-mode default jj repaint
|
||||
bind --mode insert --sets-mode default jJ repaint
|
||||
bind --mode insert --sets-mode default Jj repaint
|
||||
bind --mode insert --sets-mode default JJ repaint
|
||||
|
||||
if has_command skim
|
||||
bind -M insert \cg skim-cd-widget
|
||||
|
|
|
@ -33,7 +33,7 @@ set --export --universal EXA_COLORS '*=0'
|
|||
|
||||
set --export --universal ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000"
|
||||
|
||||
set --export --universal BROWSER (which firefox)
|
||||
set --export --universal BROWSER firefox
|
||||
|
||||
set --export --universal SOPS_AGE_KEY_FILE "$XDG_CONFIG_HOME/sops/age/keys.txt"
|
||||
|
||||
|
@ -42,8 +42,6 @@ if has_command skim
|
|||
set --export --universal SKIM_CTRL_T_COMMAND "fd --hidden"
|
||||
end
|
||||
|
||||
set --export --universal NEWT_COLORS "root=black,black:border=black,blue"
|
||||
|
||||
# colors
|
||||
set -U fish_color_normal normal # default color
|
||||
set -U fish_color_command white # base command being run (>ls< -la)
|
||||
|
@ -83,6 +81,3 @@ end
|
|||
for dir in ~/.cargo/bin ~/.nimble/bin ~/.local/bin /opt/homebrew/bin
|
||||
test -d $dir && fish_add_path $dir
|
||||
end
|
||||
|
||||
# don't let other users read my files by default
|
||||
umask 077
|
||||
|
|
12
modules/home-manager/flanfam.nix
Normal file
12
modules/home-manager/flanfam.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{...}: {
|
||||
home-manager = {
|
||||
users.flanfam = {
|
||||
imports = [./common.nix];
|
||||
home = {
|
||||
username = "flanfam";
|
||||
homeDirectory = "/home/flanfam";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
12
modules/home-manager/flanfamkiosk.nix
Normal file
12
modules/home-manager/flanfamkiosk.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{...}: {
|
||||
home-manager = {
|
||||
users.flanfamkiosk = {
|
||||
imports = [./common.nix];
|
||||
home = {
|
||||
username = "flanfamkiosk";
|
||||
homeDirectory = "/home/flanfamkiosk";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
109
modules/home-manager/git.nix
Normal file
109
modules/home-manager/git.nix
Normal file
|
@ -0,0 +1,109 @@
|
|||
{lib, ...}: let
|
||||
email = lib.mkDefault "daniel@lyte.dev";
|
||||
in {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
userName = lib.mkDefault "Daniel Flanagan";
|
||||
userEmail = email;
|
||||
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {};
|
||||
};
|
||||
|
||||
lfs = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# signing = {
|
||||
# signByDefault = false;
|
||||
# key = ~/.ssh/personal-ed25519;
|
||||
# };
|
||||
|
||||
aliases = {
|
||||
a = "add -A";
|
||||
ac = "commit -a";
|
||||
acm = "commit -a -m";
|
||||
c = "commit";
|
||||
cm = "commit -m";
|
||||
co = "checkout";
|
||||
|
||||
b = "rev-parse --symbolic-full-name HEAD";
|
||||
cnv = "commit --no-verify";
|
||||
cns = "commit --no-gpg-sign";
|
||||
cnvs = "commit --no-verify --no-gpg-sign";
|
||||
cnsv = "commit --no-verify --no-gpg-sign";
|
||||
|
||||
d = "diff";
|
||||
ds = "diff --staged";
|
||||
dt = "difftool";
|
||||
|
||||
f = "fetch";
|
||||
fa = "fetch --all";
|
||||
|
||||
l = "log --graph --abbrev-commit --decorate --oneline --all";
|
||||
plainlog = " log --pretty=format:'%h %ad%x09%an%x09%s' --date=short --decorate";
|
||||
ls = "ls-files";
|
||||
mm = "merge master";
|
||||
p = "push";
|
||||
pf = "push --force-with-lease";
|
||||
pl = "pull";
|
||||
rim = "rebase -i master";
|
||||
s = "status";
|
||||
};
|
||||
|
||||
# TODO: https://blog.scottlowe.org/2023/12/15/conditional-git-configuration/
|
||||
extraConfig = {
|
||||
commit = {
|
||||
verbose = true;
|
||||
# gpgSign = true;
|
||||
};
|
||||
|
||||
tag = {
|
||||
# gpgSign = true;
|
||||
sort = "version:refname";
|
||||
};
|
||||
|
||||
# include.path = local.gitconfig
|
||||
|
||||
gpg.format = "ssh";
|
||||
log.date = "local";
|
||||
|
||||
init.defaultBranch = "main";
|
||||
|
||||
merge.conflictstyle = "zdiff3";
|
||||
|
||||
push.autoSetupRemote = true;
|
||||
|
||||
branch.autoSetupMerge = true;
|
||||
|
||||
sendemail = {
|
||||
smtpserver = "smtp.mailgun.org";
|
||||
smtpuser = email;
|
||||
smtrpencryption = "tls";
|
||||
smtpserverport = 587;
|
||||
};
|
||||
|
||||
url = {
|
||||
# TODO: how to have per-machine not-in-git configuration?
|
||||
"git@git.hq.bill.com:" = {
|
||||
insteadOf = "https://git.hq.bill.com";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.fish.functions = {
|
||||
g = {
|
||||
wraps = "git";
|
||||
body = ''
|
||||
if test (count $argv) -gt 0
|
||||
git $argv
|
||||
else
|
||||
git status
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
7
modules/home-manager/gnome.nix
Normal file
7
modules/home-manager/gnome.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{...}: {
|
||||
dconf.settings = {
|
||||
"org/gnome/mutter" = {
|
||||
experimental-features = ["scale-monitor-framebuffer"];
|
||||
};
|
||||
};
|
||||
}
|
525
modules/home-manager/helix.nix
Normal file
525
modules/home-manager/helix.nix
Normal file
|
@ -0,0 +1,525 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
colors,
|
||||
...
|
||||
}: let
|
||||
inherit (pkgs) system;
|
||||
in {
|
||||
# helix rust debugger stuff
|
||||
# https://github.com/helix-editor/helix/wiki/Debugger-Configurations
|
||||
home.file."${config.xdg.configHome}/lldb_vscode_rustc_primer.py" = {
|
||||
text = ''
|
||||
import subprocess
|
||||
import pathlib
|
||||
import lldb
|
||||
|
||||
# Determine the sysroot for the active Rust interpreter
|
||||
rustlib_etc = pathlib.Path(subprocess.getoutput('rustc --print sysroot')) / 'lib' / 'rustlib' / 'etc'
|
||||
if not rustlib_etc.exists():
|
||||
raise RuntimeError('Unable to determine rustc sysroot')
|
||||
|
||||
# Load lldb_lookup.py and execute lldb_commands with the correct path
|
||||
lldb.debugger.HandleCommand(f"""command script import "{rustlib_etc / 'lldb_lookup.py'}" """)
|
||||
lldb.debugger.HandleCommand(f"""command source -s 0 "{rustlib_etc / 'lldb_commands'}" """)
|
||||
'';
|
||||
};
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
package = inputs.helix.packages.${system}.helix;
|
||||
languages = {
|
||||
language-server = {
|
||||
lexical = {
|
||||
command = "lexical";
|
||||
args = ["start"];
|
||||
};
|
||||
|
||||
# next-ls = {
|
||||
# command = "next-ls";
|
||||
# args = ["--stdout"];
|
||||
# };
|
||||
|
||||
# deno = {
|
||||
# command = "deno";
|
||||
# args = ["lsp"];
|
||||
# config = {
|
||||
# enable = true;
|
||||
# lint = true;
|
||||
# unstable = true;
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
language = [
|
||||
# {
|
||||
# name = "heex";
|
||||
# scope = "source.heex";
|
||||
# injection-regex = "heex";
|
||||
# language-servers = ["lexical"]; # "lexical" "next-ls" ?
|
||||
# auto-format = true;
|
||||
# file-types = ["heex"];
|
||||
# roots = ["mix.exs" "mix.lock"];
|
||||
# indent = {
|
||||
# tab-width = 2;
|
||||
# unit = " ";
|
||||
# };
|
||||
# }
|
||||
# {
|
||||
# name = "elixir";
|
||||
# language-servers = ["lexical"]; # "lexical" "next-ls" ?
|
||||
# auto-format = true;
|
||||
# }
|
||||
{
|
||||
name = "rust";
|
||||
|
||||
debugger = {
|
||||
name = "lldb-vscode";
|
||||
transport = "stdio";
|
||||
command = "lldb-vscode";
|
||||
templates = [
|
||||
{
|
||||
name = "binary";
|
||||
request = "launch";
|
||||
completion = [
|
||||
{
|
||||
name = "binary";
|
||||
completion = "filename";
|
||||
}
|
||||
];
|
||||
args = {
|
||||
program = "{0}";
|
||||
initCommands = ["command script import ${config.xdg.configHome}/lldb_vscode_rustc_primer.py"];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "html";
|
||||
file-types = ["html"];
|
||||
scope = "source.html";
|
||||
auto-format = false;
|
||||
}
|
||||
{
|
||||
name = "nix";
|
||||
file-types = ["nix"];
|
||||
scope = "source.nix";
|
||||
auto-format = true;
|
||||
formatter = {
|
||||
command = "alejandra";
|
||||
args = ["-"];
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "fish";
|
||||
file-types = ["fish"];
|
||||
scope = "source.fish";
|
||||
auto-format = true;
|
||||
indent = {
|
||||
tab-width = 2;
|
||||
unit = "\t";
|
||||
};
|
||||
}
|
||||
|
||||
# {
|
||||
# name = "javascript";
|
||||
# language-id = "javascript";
|
||||
# grammar = "javascript";
|
||||
# scope = "source.js";
|
||||
# injection-regex = "^(js|javascript)$";
|
||||
# file-types = ["js" "mjs"];
|
||||
# shebangs = ["deno"];
|
||||
# language-servers = ["deno"];
|
||||
# roots = ["deno.jsonc" "deno.json"];
|
||||
# formatter = {
|
||||
# command = "deno";
|
||||
# args = ["fmt"];
|
||||
# };
|
||||
# auto-format = true;
|
||||
# comment-token = "//";
|
||||
# indent = {
|
||||
# tab-width = 2;
|
||||
# unit = "\t";
|
||||
# };
|
||||
# }
|
||||
|
||||
# {
|
||||
# name = "typescript";
|
||||
# language-id = "typescript";
|
||||
# grammar = "typescript";
|
||||
# scope = "source.ts";
|
||||
# injection-regex = "^(ts|typescript)$";
|
||||
# file-types = ["ts"];
|
||||
# shebangs = ["deno"];
|
||||
# language-servers = ["deno"];
|
||||
# roots = ["deno.jsonc" "deno.json"];
|
||||
# formatter = {
|
||||
# command = "deno";
|
||||
# args = ["fmt"];
|
||||
# };
|
||||
# auto-format = true;
|
||||
# comment-token = "//";
|
||||
# indent = {
|
||||
# tab-width = 2;
|
||||
# unit = "\t";
|
||||
# };
|
||||
# }
|
||||
|
||||
# {
|
||||
# name = "jsonc";
|
||||
# language-id = "json";
|
||||
# grammar = "jsonc";
|
||||
# scope = "source.jsonc";
|
||||
# injection-regex = "^(jsonc)$";
|
||||
# roots = ["deno.jsonc" "deno.json"];
|
||||
# file-types = ["jsonc"];
|
||||
# language-servers = ["deno"];
|
||||
# indent = {
|
||||
# tab-width = 2;
|
||||
# unit = " ";
|
||||
# };
|
||||
# auto-format = true;
|
||||
# }
|
||||
];
|
||||
};
|
||||
|
||||
settings = {
|
||||
theme = "custom";
|
||||
|
||||
editor = {
|
||||
soft-wrap.enable = true;
|
||||
auto-pairs = false;
|
||||
# auto-save = false;
|
||||
# completion-trigger-len = 1;
|
||||
# color-modes = false;
|
||||
bufferline = "multiple";
|
||||
# scrolloff = 8;
|
||||
rulers = [81 121];
|
||||
cursorline = true;
|
||||
|
||||
cursor-shape = {
|
||||
normal = "block";
|
||||
insert = "bar";
|
||||
select = "underline";
|
||||
};
|
||||
|
||||
file-picker.hidden = false;
|
||||
indent-guides = {
|
||||
render = true;
|
||||
character = "▏";
|
||||
};
|
||||
|
||||
lsp = {
|
||||
display-messages = true;
|
||||
# display-inlay-hints = true;
|
||||
};
|
||||
statusline = {
|
||||
separator = " ";
|
||||
mode = {
|
||||
"normal" = "N";
|
||||
"insert" = "I";
|
||||
"select" = "S";
|
||||
};
|
||||
left = [
|
||||
"file-name"
|
||||
"mode"
|
||||
# "selections"
|
||||
# "primary-selection-length"
|
||||
# "position"
|
||||
# "position-percentage"
|
||||
"spinner"
|
||||
"diagnostics"
|
||||
"workspace-diagnostics"
|
||||
];
|
||||
};
|
||||
# center = ["file-name"];
|
||||
# right = ["version-control" "total-line-numbers" "file-encoding"];
|
||||
# };
|
||||
};
|
||||
keys = {
|
||||
insert = {
|
||||
j = {
|
||||
k = "normal_mode";
|
||||
j = "normal_mode";
|
||||
K = "normal_mode";
|
||||
J = "normal_mode";
|
||||
};
|
||||
};
|
||||
|
||||
normal = {
|
||||
"C-k" = "jump_view_up";
|
||||
"C-j" = "jump_view_down";
|
||||
"C-h" = "jump_view_left";
|
||||
"C-l" = "jump_view_right";
|
||||
"C-q" = ":quit-all!";
|
||||
# "L" = "repeat_last_motion";
|
||||
space = {
|
||||
q = ":reflow 80";
|
||||
Q = ":reflow 120";
|
||||
C = ":bc!";
|
||||
h = ":toggle lsp.display-inlay-hints";
|
||||
# O = ["select_textobject_inner WORD", ":pipe-to xargs xdg-open"];
|
||||
};
|
||||
};
|
||||
|
||||
select = {
|
||||
space = {
|
||||
q = ":reflow 80";
|
||||
Q = ":reflow 120";
|
||||
};
|
||||
# "L" = "repeat_last_motion";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
themes = with colors.withHashPrefix; {
|
||||
custom = {
|
||||
"type" = orange;
|
||||
|
||||
"constructor" = blue;
|
||||
|
||||
"constant" = orange;
|
||||
"constant.builtin" = orange;
|
||||
"constant.character" = yellow;
|
||||
"constant.character.escape" = orange;
|
||||
|
||||
"string" = green;
|
||||
"string.regexp" = orange;
|
||||
"string.special" = blue;
|
||||
|
||||
"comment" = {
|
||||
fg = fgdim;
|
||||
modifiers = ["italic"];
|
||||
};
|
||||
|
||||
"variable" = text;
|
||||
"variable.parameter" = {
|
||||
fg = red;
|
||||
modifiers = ["italic"];
|
||||
};
|
||||
"variable.builtin" = red;
|
||||
"variable.other.member" = text;
|
||||
|
||||
"label" = blue;
|
||||
|
||||
"punctuation" = fgdim;
|
||||
"punctuation.special" = blue;
|
||||
|
||||
"keyword" = purple;
|
||||
"keyword.storage.modifier.ref" = yellow;
|
||||
"keyword.control.conditional" = {
|
||||
fg = purple;
|
||||
modifiers = ["italic"];
|
||||
};
|
||||
|
||||
"operator" = blue;
|
||||
|
||||
"function" = blue;
|
||||
"function.macro" = purple;
|
||||
|
||||
"tag" = purple;
|
||||
"attribute" = blue;
|
||||
|
||||
"namespace" = {
|
||||
fg = blue;
|
||||
modifiers = ["italic"];
|
||||
};
|
||||
|
||||
"special" = blue;
|
||||
|
||||
"markup.heading.marker" = {
|
||||
fg = orange;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
"markup.heading.1" = blue;
|
||||
"markup.heading.2" = yellow;
|
||||
"markup.heading.3" = green;
|
||||
"markup.heading.4" = orange;
|
||||
"markup.heading.5" = red;
|
||||
"markup.heading.6" = fg3;
|
||||
"markup.list" = purple;
|
||||
"markup.bold" = {modifiers = ["bold"];};
|
||||
"markup.italic" = {modifiers = ["italic"];};
|
||||
"markup.strikethrough" = {modifiers = ["crossed_out"];};
|
||||
"markup.link.url" = {
|
||||
fg = red;
|
||||
modifiers = ["underlined"];
|
||||
};
|
||||
"markup.link.text" = blue;
|
||||
"markup.raw" = red;
|
||||
|
||||
"diff.plus" = green;
|
||||
"diff.minus" = red;
|
||||
"diff.delta" = blue;
|
||||
|
||||
"ui.linenr" = {fg = fgdim;};
|
||||
"ui.linenr.selected" = {fg = fg2;};
|
||||
|
||||
"ui.statusline" = {
|
||||
fg = fgdim;
|
||||
bg = bg;
|
||||
};
|
||||
"ui.statusline.inactive" = {
|
||||
fg = fg3;
|
||||
bg = bg2;
|
||||
};
|
||||
"ui.statusline.normal" = {
|
||||
fg = bg;
|
||||
bg = purple;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
"ui.statusline.insert" = {
|
||||
fg = bg;
|
||||
bg = green;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
"ui.statusline.select" = {
|
||||
fg = bg;
|
||||
bg = red;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
|
||||
"ui.popup" = {
|
||||
fg = text;
|
||||
bg = bg2;
|
||||
};
|
||||
"ui.window" = {fg = fgdim;};
|
||||
"ui.help" = {
|
||||
fg = fg2;
|
||||
bg = bg2;
|
||||
};
|
||||
|
||||
"ui.bufferline" = {
|
||||
fg = fgdim;
|
||||
bg = bg2;
|
||||
};
|
||||
"ui.bufferline.background" = {bg = bg2;};
|
||||
|
||||
"ui.text" = text;
|
||||
"ui.text.focus" = {
|
||||
fg = text;
|
||||
bg = bg3;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
"ui.text.inactive" = {fg = fg2;};
|
||||
|
||||
"ui.virtual" = fg2;
|
||||
"ui.virtual.ruler" = {bg = bg3;};
|
||||
"ui.virtual.indent-guide" = bg3;
|
||||
"ui.virtual.inlay-hint" = {
|
||||
fg = bg3;
|
||||
bg = bg;
|
||||
};
|
||||
|
||||
"ui.selection" = {bg = bg5;};
|
||||
|
||||
"ui.cursor" = {
|
||||
fg = bg;
|
||||
bg = text;
|
||||
};
|
||||
"ui.cursor.primary" = {
|
||||
fg = bg;
|
||||
bg = red;
|
||||
};
|
||||
"ui.cursor.match" = {
|
||||
fg = orange;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
|
||||
"ui.cursor.primary.normal" = {
|
||||
fg = bg;
|
||||
bg = text;
|
||||
};
|
||||
"ui.cursor.primary.insert" = {
|
||||
fg = bg;
|
||||
bg = text;
|
||||
};
|
||||
"ui.cursor.primary.select" = {
|
||||
fg = bg;
|
||||
bg = text;
|
||||
};
|
||||
|
||||
"ui.cursor.normal" = {
|
||||
fg = bg;
|
||||
bg = fg;
|
||||
};
|
||||
"ui.cursor.insert" = {
|
||||
fg = bg;
|
||||
bg = fg;
|
||||
};
|
||||
"ui.cursor.select" = {
|
||||
fg = bg;
|
||||
bg = fg;
|
||||
};
|
||||
|
||||
"ui.cursorline.primary" = {bg = bg3;};
|
||||
|
||||
"ui.highlight" = {
|
||||
bg = bg3;
|
||||
fg = bg;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
|
||||
"ui.menu" = {
|
||||
fg = fg3;
|
||||
bg = bg2;
|
||||
};
|
||||
"ui.menu.selected" = {
|
||||
fg = text;
|
||||
bg = bg3;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
|
||||
"diagnostic.error" = {
|
||||
underline = {
|
||||
color = red;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.warning" = {
|
||||
underline = {
|
||||
color = orange;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.info" = {
|
||||
underline = {
|
||||
color = blue;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.hint" = {
|
||||
underline = {
|
||||
color = blue;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
|
||||
error = red;
|
||||
warning = orange;
|
||||
info = blue;
|
||||
hint = yellow;
|
||||
"ui.background" = {
|
||||
bg = bg;
|
||||
fg = fgdim;
|
||||
};
|
||||
|
||||
# "ui.cursorline.primary" = { bg = "default" }
|
||||
# "ui.cursorline.secondary" = { bg = "default" }
|
||||
"ui.cursorcolumn.primary" = {bg = bg3;};
|
||||
"ui.cursorcolumn.secondary" = {bg = bg3;};
|
||||
|
||||
"ui.bufferline.active" = {
|
||||
fg = primary;
|
||||
bg = bg3;
|
||||
underline = {
|
||||
color = primary;
|
||||
style = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
14
modules/home-manager/htop.nix
Normal file
14
modules/home-manager/htop.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
programs.htop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
hide_kernel_threads = 1;
|
||||
hide_userland_threads = 1;
|
||||
show_program_path = 0;
|
||||
header_margin = 0;
|
||||
show_cpu_frequency = 1;
|
||||
highlight_base_name = 1;
|
||||
tree_view = 0;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,17 +1,17 @@
|
|||
{
|
||||
pkgs,
|
||||
style,
|
||||
outputs,
|
||||
colors,
|
||||
config,
|
||||
lib,
|
||||
# font,
|
||||
...
|
||||
}: let
|
||||
inherit (style) colors;
|
||||
in {
|
||||
# TODO: Hyprland seems to sometimes use a ton of CPU?
|
||||
|
||||
home.packages = with pkgs; [
|
||||
swayosd
|
||||
}: {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
ewwbar
|
||||
mako
|
||||
swaylock
|
||||
# TODO: figure out how to import this for this module _and_ for the sway module?
|
||||
# linux-desktop
|
||||
];
|
||||
|
||||
home.file."${config.xdg.configHome}/hypr/hyprpaper.conf" = {
|
||||
|
@ -38,33 +38,52 @@ in {
|
|||
exec-once = [
|
||||
"hyprpaper"
|
||||
"mako"
|
||||
"swayosd-server"
|
||||
"eww daemon"
|
||||
"[workspace 1 silent] firefox"
|
||||
"[workspace 1 silent] wezterm"
|
||||
"xwaylandvideobridge"
|
||||
"systemctl --user import-environment QT_QPA_PLATFORMTHEME"
|
||||
"hypridle"
|
||||
"eww daemon && eww open bar$EWW_BAR_MON"
|
||||
"firefox"
|
||||
"kitty --single-instance"
|
||||
# "wezterm"
|
||||
(lib.concatStringsSep " " [
|
||||
"swayidle -w"
|
||||
"timeout 300 'notify-send \"Idling in 300 seconds\"' resume 'notify-send \"Idling cancelled.\"'"
|
||||
"timeout 480 'notify-send -u critical \"Idling in 120 seconds\"'"
|
||||
"timeout 510 'notify-send -u critical \"Idling in 90 seconds\"'"
|
||||
"timeout 540 'notify-send -u critical \"Idling in 60 seconds!\"'"
|
||||
"timeout 570 'notify-send -u critical \"Idling in 30 seconds!\"'"
|
||||
"timeout 590 'notify-send -u critical \"Idling in 10 seconds!\"'"
|
||||
"timeout 591 'notify-send -u critical \"Idling in 9 seconds!\"'"
|
||||
"timeout 592 'notify-send -u critical \"Idling in 8 seconds!\"'"
|
||||
"timeout 593 'notify-send -u critical \"Idling in 7 seconds!\"'"
|
||||
"timeout 594 'notify-send -u critical \"Idling in 6 seconds!\"'"
|
||||
"timeout 595 'notify-send -u critical \"Idling in 5 seconds!\"'"
|
||||
"timeout 596 'notify-send -u critical \"Idling in 4 seconds!\"'"
|
||||
"timeout 597 'notify-send -u critical \"Idling in 3 seconds!\"'"
|
||||
"timeout 598 'notify-send -u critical \"Idling in 2 seconds!\"'"
|
||||
"timeout 599 'notify-send -u critical \"Idling in 1 second!\"'"
|
||||
"timeout 600 'swaylock --daemonize'"
|
||||
"timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on'"
|
||||
"after-resume 'maybe-good-morning'"
|
||||
"before-sleep 'swaylock --daemonize'"
|
||||
])
|
||||
''swayidle -w timeout 600 'notify-send "Locking in 30 seconds..."' timeout 630 'swaylock -f' timeout 660 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on && maybe-good-morning' before-sleep 'swaylock -f'"''
|
||||
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
];
|
||||
|
||||
env = [
|
||||
"XCURSOR_SIZE,24"
|
||||
"EWW_BAR_MON,0"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
kb_options = "ctrl:nocaps";
|
||||
|
||||
/*
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_rules =
|
||||
*/
|
||||
# kb_variant =
|
||||
# kb_model =
|
||||
# kb_rules =
|
||||
|
||||
follow_mouse = 2;
|
||||
|
||||
repeat_delay = 180;
|
||||
repeat_rate = 120;
|
||||
repeat_delay = 200;
|
||||
repeat_rate = 60;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = "yes";
|
||||
|
@ -83,10 +102,6 @@ in {
|
|||
allow_workspace_cycles = true;
|
||||
};
|
||||
|
||||
cursor = {
|
||||
no_warps = true;
|
||||
};
|
||||
|
||||
general = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
"col.active_border" = "0xff${colors.primary} 0xff${colors.green} 45deg";
|
||||
|
@ -95,6 +110,7 @@ in {
|
|||
gaps_in = 3;
|
||||
gaps_out = 6;
|
||||
border_size = 2;
|
||||
no_cursor_warps = true;
|
||||
resize_on_border = true;
|
||||
no_focus_fallback = true;
|
||||
|
||||
|
@ -102,112 +118,108 @@ in {
|
|||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 5;
|
||||
rounding = 3;
|
||||
# blur = "no";
|
||||
# blur_size = 3
|
||||
# blur_passes = 1
|
||||
# blur_new_optimizations = on
|
||||
|
||||
/*
|
||||
blur = "no";
|
||||
blur_size = 3
|
||||
blur_passes = 1
|
||||
blur_new_optimizations = on
|
||||
*/
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
color = "rgba(1a1a1aee)";
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
};
|
||||
drop_shadow = "yes";
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
"col.shadow" = "rgba(1a1a1aee)";
|
||||
|
||||
dim_inactive = false;
|
||||
};
|
||||
|
||||
"$mod" = "SUPER";
|
||||
"$mainMod" = "SUPER";
|
||||
bind = [
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
/*
|
||||
"$mod, return, exec, wezterm"
|
||||
"$mod SHIFT, return, exec, wezterm"
|
||||
*/
|
||||
"$mod, return, exec, wezterm"
|
||||
"$mod SHIFT, return, exec, kitty"
|
||||
"$mod, U, exec, firefox"
|
||||
"$mod, space, exec, tofi-run | xargs hyprctl dispatch exec --"
|
||||
"$mod, C, killactive,"
|
||||
"$mod SHIFT, E, exit,"
|
||||
"$mod, E, exec, dolphin"
|
||||
"$mod, F, togglefloating,"
|
||||
"$mod SHIFT, F, fullscreen,"
|
||||
"$mod, R, exec, anyrun"
|
||||
"$mod, S, pseudo, # dwindle"
|
||||
"$mod, P, togglesplit, # dwindle"
|
||||
|
||||
# Move focus with mod + arrow keys
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, down, movefocus, d"
|
||||
"$mod, h, movefocus, l"
|
||||
"$mod, l, movefocus, r"
|
||||
"$mod, k, movefocus, u"
|
||||
"$mod, j, movefocus, d"
|
||||
"$mod SHIFT, H, movewindow, l"
|
||||
"$mod SHIFT, L, movewindow, r"
|
||||
"$mod SHIFT, K, movewindow, u"
|
||||
"$mod SHIFT, J, movewindow, d"
|
||||
|
||||
"$mod SHIFT, V, exec, swayosd-client --input-volume mute-toggle"
|
||||
", XF86AudioMicMute, exec, swayosd-client --input-volume mute-toggle"
|
||||
", XF86AudioMute, exec, swayosd-client --output-volume mute-toggle"
|
||||
", XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise"
|
||||
", XF86AudioLowerVolume, exec, swayosd-client --output-volume lower"
|
||||
|
||||
", XF86MonBrightnessUp, exec, swayosd-client --brightness raise"
|
||||
", XF86MonBrightnessDown, exec, swayosd-client --brightness lower"
|
||||
# "$mainMod, return, exec, wezterm"
|
||||
# "$mainMod SHIFT, return, exec, wezterm"
|
||||
"$mainMod, return, exec, kitty --single-instance"
|
||||
"$mainMod SHIFT, return, exec, kitty"
|
||||
"$mainMod, U, exec, firefox"
|
||||
"$mainMod, space, exec, wofi --show drun"
|
||||
"$mainMod, C, killactive,"
|
||||
"$mainMod, M, exit,"
|
||||
"$mainMod, E, exec, dolphin"
|
||||
"$mainMod, F, togglefloating,"
|
||||
"$mainMod SHIFT, F, fullscreen,"
|
||||
"$mainMod, R, exec, anyrun"
|
||||
"$mainMod, S, pseudo, # dwindle"
|
||||
"$mainMod, P, togglesplit, # dwindle"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mainMod, left, movefocus, l"
|
||||
"$mainMod, right, movefocus, r"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
"$mainMod, h, movefocus, l"
|
||||
"$mainMod, l, movefocus, r"
|
||||
"$mainMod, k, movefocus, u"
|
||||
"$mainMod, j, movefocus, d"
|
||||
"$mainMod SHIFT, H, swapwindow, l"
|
||||
"$mainMod SHIFT, L, swapwindow, r"
|
||||
"$mainMod SHIFT, K, swapwindow, u"
|
||||
"$mainMod SHIFT, J, swapwindow, d"
|
||||
"$mainMod SHIFT, V, exec, pamixer --default-source --toggle-mute"
|
||||
"$mainMod, F1, exec, pamixer --default-source --toggle-mute"
|
||||
", XF86AudioMicMute, exec, pamixer --default-source --toggle-mute"
|
||||
", XF86AudioMute, exec, pamixer --toggle-mute"
|
||||
", XF86AudioRaiseVolume, exec, pamixer --increase 5"
|
||||
", XF86AudioLowerVolume, exec, pamixer --decrease 5"
|
||||
"CTRL, XF86AudioRaiseVolume, exec, pamixer --increase 1"
|
||||
"CTRL, XF86AudioLowerVolume, exec, pamixer --decrease 1"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
|
||||
"$mod, tab, workspace, previous"
|
||||
"$mainMod, tab, workspace, previous"
|
||||
"ALT, tab, workspace, previous"
|
||||
|
||||
# Switch workspaces with mod + [0-9]
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mod + SHIFT + [0-9]
|
||||
"$mod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mod SHIFT, 7, movetoworkspace, 7"
|
||||
"$mod SHIFT, 8, movetoworkspace, 8"
|
||||
"$mod SHIFT, 9, movetoworkspace, 9"
|
||||
"$mod SHIFT, 0, movetoworkspace, 10"
|
||||
"$mod SHIFT, S, exec, clipshot"
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mainMod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mainMod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mainMod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mainMod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mainMod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mainMod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mainMod SHIFT, 7, movetoworkspace, 7"
|
||||
"$mainMod SHIFT, 8, movetoworkspace, 8"
|
||||
"$mainMod SHIFT, 9, movetoworkspace, 9"
|
||||
"$mainMod SHIFT, 0, movetoworkspace, 10"
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 10%-"
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set +10%"
|
||||
"SHIFT, XF86MonBrightnessDown, exec, brightnessctl set 1%"
|
||||
"SHIFT, XF86MonBrightnessUp, exec, brightnessctl set 100%"
|
||||
"CTRL, XF86MonBrightnessDown, exec, brightnessctl set 1%-"
|
||||
"CTRL, XF86MonBrightnessUp, exec, brightnessctl set +1%"
|
||||
"$mainMod SHIFT, S, exec, clipshot"
|
||||
|
||||
# Scroll through existing workspaces with mod + scroll
|
||||
"$mod, mouse_down, workspace, e+1"
|
||||
"$mod, mouse_up, workspace, e-1"
|
||||
"CTRL SHIFT $mod, L, exec, hyprlock"
|
||||
"$mod CTRL, space, exec, makoctl dismiss"
|
||||
"$mod SHIFT CTRL, space, exec, makoctl restore"
|
||||
"$mod SHIFT, space, exec, makoctl invoke default"
|
||||
"$mod, E, exec, thunar"
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
"CTRL SHIFT $mainMod, L, exec, swaylock"
|
||||
"$mainMod CTRL, space, exec, makoctl dismiss"
|
||||
"$mainMod SHIFT CTRL, space, exec, makoctl restore"
|
||||
"$mainMod SHIFT, space, exec, makoctl invoke"
|
||||
"$mainMod, E, exec, thunar"
|
||||
];
|
||||
|
||||
# Move/resize windows with mod + LMB/RMB and dragging
|
||||
bindm = ["$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow"];
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = ["$mainMod, mouse:272, movewindow" "$mainMod, mouse:273, resizewindow"];
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
|
@ -227,15 +239,15 @@ in {
|
|||
|
||||
dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
# master switch for pseudotiling. Enabling is bound to mod + P in the keybinds section below
|
||||
# master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
pseudotile = yes
|
||||
preserve_split = 1
|
||||
# no_gaps_when_only = true
|
||||
no_gaps_when_only = true
|
||||
}
|
||||
|
||||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
# new_is_master = true
|
||||
new_is_master = true
|
||||
}
|
||||
|
||||
gestures {
|
||||
|
@ -243,178 +255,14 @@ in {
|
|||
workspace_swipe = on
|
||||
}
|
||||
|
||||
## Example per-device config
|
||||
## See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
||||
## device:epic-mouse-v1 {
|
||||
## sensitivity = -0.5
|
||||
## }
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
||||
# device:epic-mouse-v1 {
|
||||
# sensitivity = -0.5
|
||||
# }
|
||||
|
||||
## See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
windowrulev2 = idleinhibit,class:^.*([Ss]lippi).*$
|
||||
windowrulev2 = float,class:^.*$
|
||||
windowrulev2 = tile,class:^.*([Kk]itty|[Ff]irefox|[Ww]ezterm|[Dd]iscord|[Ss]potify|[Ss]lack).*$
|
||||
windowrulev2 = opacity 1.0 0.95,class:^.*$
|
||||
windowrulev2 = center 1,floating:1
|
||||
|
||||
windowrulev2 = opacity 0.0 override, class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = noanim, class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = noinitialfocus, class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = maxsize 1 1, class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = noblur, class:^(xwaylandvideobridge)$
|
||||
windowrulev2 = nofocus, class:^(xwaylandvideobridge)$
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
# windowrulev2 = float,class:^.*(kitty|firefox|org.wezfurlong.wezterm).*$
|
||||
'';
|
||||
};
|
||||
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# docs: https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock
|
||||
|
||||
general = {
|
||||
grace = 0;
|
||||
no_face_out = true;
|
||||
};
|
||||
|
||||
input-field = [
|
||||
{
|
||||
monitor = "";
|
||||
fade_on_empty = false;
|
||||
placeholder_text = "Locked";
|
||||
rounding = 5;
|
||||
font_size = 20;
|
||||
font_color = "rgba(255, 255, 255, 1.0)";
|
||||
inner_color = "rgba(31, 31, 47, 0.95)";
|
||||
outer_color = "0xff74c7ec 0xff74c7ec 45deg";
|
||||
outline_thickness = 3;
|
||||
position = "0, -200";
|
||||
|
||||
dots_size = 0.1;
|
||||
size = "300 75";
|
||||
font_family = "IosevkaLyteTerm";
|
||||
|
||||
shadow_passes = 3;
|
||||
shadow_size = 8;
|
||||
shadow_color = "rgba(0, 0, 0, 1.0)";
|
||||
shadow_boost = 0.8;
|
||||
}
|
||||
];
|
||||
|
||||
background = [
|
||||
{
|
||||
path = "~/.wallpaper";
|
||||
blur_passes = 2;
|
||||
}
|
||||
];
|
||||
|
||||
label = [
|
||||
{
|
||||
monitor = "";
|
||||
font_size = 64;
|
||||
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
text_align = "center";
|
||||
|
||||
# rotate = 10;
|
||||
position = "0, 200";
|
||||
font_family = "IosevkaLyteTerm";
|
||||
text = ''Locked for <span foreground="##74c7ec">$USER</span>'';
|
||||
|
||||
shadow_passes = 1;
|
||||
shadow_size = 8;
|
||||
shadow_color = "rgba(0, 0, 0, 1.0)";
|
||||
shadow_boost = 0.5;
|
||||
}
|
||||
|
||||
{
|
||||
monitor = "";
|
||||
font_size = 20;
|
||||
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
text_align = "center";
|
||||
color = "rgba(255, 255, 255, 0.5)";
|
||||
|
||||
position = "0 120";
|
||||
font_family = "IosevkaLyteTerm";
|
||||
text = "cmd[update:1000] date '+%a %b %d %H:%M:%S'";
|
||||
|
||||
shadow_passes = 3;
|
||||
shadow_size = 1;
|
||||
shadow_color = "rgba(0, 0, 0, 1.0)";
|
||||
shadow_boost = 1.0;
|
||||
}
|
||||
|
||||
{
|
||||
monitor = "";
|
||||
font_size = 200;
|
||||
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
text_align = "center";
|
||||
color = "rgba(220, 240, 255, 0.8)";
|
||||
position = "0 500";
|
||||
font_family = "NerdFontSymbolsOnly";
|
||||
text = "";
|
||||
|
||||
shadow_passes = 3;
|
||||
shadow_size = 1;
|
||||
shadow_color = "rgba(0, 0, 0, 1.0)";
|
||||
shadow_boost = 1.0;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.hypridle = let
|
||||
secondsPerMinute = 60;
|
||||
lockSeconds = 10 * secondsPerMinute;
|
||||
in {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = lockSeconds - 300;
|
||||
on-timeout = ''notify-send "Auto-locking in 5 minutes"'';
|
||||
on-resume = ''notify-send "Auto-locking cancelled"'';
|
||||
}
|
||||
{
|
||||
timeout = lockSeconds - 180;
|
||||
on-timeout = ''notify-send "Auto-locking in 3 minutes"'';
|
||||
}
|
||||
{
|
||||
timeout = lockSeconds - 120;
|
||||
on-timeout = ''notify-send "Auto-locking in 2 minutes"'';
|
||||
}
|
||||
{
|
||||
timeout = lockSeconds - 60;
|
||||
on-timeout = ''notify-send "Auto-locking in 1 minute"'';
|
||||
}
|
||||
{
|
||||
timeout = lockSeconds - 30;
|
||||
on-timeout = ''notify-send "Auto-locking in 30 seconds"'';
|
||||
}
|
||||
{
|
||||
timeout = lockSeconds - 10;
|
||||
on-timeout = ''notify-send -u critical "Auto-locking in 10 seconds"'';
|
||||
}
|
||||
{
|
||||
timeout = lockSeconds;
|
||||
on-timeout = ''loginctl lock-session'';
|
||||
}
|
||||
{
|
||||
timeout = lockSeconds + 5;
|
||||
on-timeout = ''hyprctl dispatch dpms off'';
|
||||
on-resume = ''hyprctl dispatch dpms on'';
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
35
modules/home-manager/iex.nix
Normal file
35
modules/home-manager/iex.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
home.file.".iex.exs" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
Application.put_env(:elixir, :ansi_enabled, true)
|
||||
|
||||
# PROTIP: to break, `#iex:break`
|
||||
|
||||
IEx.configure(
|
||||
colors: [enabled: true],
|
||||
inspect: [
|
||||
pretty: true,
|
||||
printable_limit: :infinity,
|
||||
limit: :infinity,
|
||||
charlists: :as_lists
|
||||
],
|
||||
default_prompt: [
|
||||
# ANSI CHA, move cursor to column 1
|
||||
# "\e[G",
|
||||
:magenta,
|
||||
# IEx prompt variable
|
||||
"%prefix",
|
||||
"#",
|
||||
# IEx prompt variable
|
||||
"%counter",
|
||||
# plain string
|
||||
">",
|
||||
:reset
|
||||
]
|
||||
|> IO.ANSI.format()
|
||||
|> IO.chardata_to_string()
|
||||
)
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/home-manager/kde-connect.nix
Normal file
6
modules/home-manager/kde-connect.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
}
|
35
modules/home-manager/linux-desktop.nix
Normal file
35
modules/home-manager/linux-desktop.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
pkgs,
|
||||
outputs,
|
||||
# font,
|
||||
...
|
||||
}: {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
linux
|
||||
desktop
|
||||
firefox
|
||||
];
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
# Currently failing: https://github.com/NixOS/nixpkgs/issues/298043
|
||||
# Overlay from https://github.com/NixOS/nixpkgs/issues/298043#issuecomment-2015319496
|
||||
# Fix on master but not yet in unstable https://github.com/NixOS/nixpkgs/pull/297683
|
||||
theme = {
|
||||
name = "Catppuccin-Mocha-Compact-Sapphire-Dark";
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
accents = ["sapphire"];
|
||||
size = "compact";
|
||||
tweaks = ["rimless"];
|
||||
variant = "mocha";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Bibata-Modern-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 40; # TODO: this doesn't seem to work -- at least in Sway
|
||||
# some icons are also missing (hand2?)
|
||||
};
|
||||
}
|
34
modules/home-manager/linux.nix
Normal file
34
modules/home-manager/linux.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{pkgs, ...}: {
|
||||
home = {
|
||||
sessionVariables = {
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
};
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
shellAliases = {
|
||||
# TODO: these aren't working?
|
||||
sctl = "sudo systemctl";
|
||||
bt = "bluetoothctl";
|
||||
pa = "pulsemixer";
|
||||
sctlu = "systemctl --user";
|
||||
};
|
||||
|
||||
functions = {
|
||||
pp = ''
|
||||
if test (count $argv) -gt 0
|
||||
while true; ping -O -i 1 -w 5 -c 10000000 $argv; sleep 1; end
|
||||
else
|
||||
while true; ping -O -i 1 -w 5 -c 10000000 1.1.1.1; sleep 1; end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
(pkgs.buildEnv {
|
||||
name = "my-linux-scripts";
|
||||
paths = [./scripts/linux];
|
||||
})
|
||||
];
|
||||
}
|
15
modules/home-manager/macos.nix
Normal file
15
modules/home-manager/macos.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{outputs, ...}: {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
desktop
|
||||
pass
|
||||
];
|
||||
|
||||
# TODO: pinentry curses?
|
||||
/*
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = "gnome3";
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
*/
|
||||
}
|
30
modules/home-manager/mako.nix
Normal file
30
modules/home-manager/mako.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
colors,
|
||||
font,
|
||||
...
|
||||
}: {
|
||||
services.mako = with colors.withHashPrefix; {
|
||||
enable = true; # TODO: launch mako alongside the wm/de instead so that I can use the plasma notification daemon if I choose to use plasma
|
||||
|
||||
borderSize = 1;
|
||||
maxVisible = 5;
|
||||
defaultTimeout = 15000;
|
||||
font = "Symbols Nerd Font ${toString font.size},${font.name} ${toString font.size}";
|
||||
# TODO: config
|
||||
|
||||
backgroundColor = bg;
|
||||
textColor = text;
|
||||
borderColor = primary;
|
||||
progressColor = primary;
|
||||
anchor = "top-right";
|
||||
|
||||
extraConfig = ''
|
||||
[urgency=high]
|
||||
border-color=${urgent}
|
||||
[urgency=high]
|
||||
background-color=${urgent}
|
||||
border-color=${urgent}
|
||||
text-color=${bg}
|
||||
'';
|
||||
};
|
||||
}
|
13
modules/home-manager/melee.nix
Normal file
13
modules/home-manager/melee.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{inputs, ...}: {
|
||||
imports = [
|
||||
{nixpkgs.overlays = [inputs.ssbm.overlay];}
|
||||
# inputs.ssbm.homeManagerModules.default
|
||||
];
|
||||
|
||||
# ssbm = {
|
||||
# slippi-launcher = {
|
||||
# enable = false;
|
||||
# launchMeleeOnPlay = false;
|
||||
# };
|
||||
# };
|
||||
}
|
5
modules/home-manager/nnn.nix
Normal file
5
modules/home-manager/nnn.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{...}: {
|
||||
programs.nnn = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
6
modules/home-manager/pass.nix
Normal file
6
modules/home-manager/pass.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
|
||||
};
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
usage() {
|
||||
echo "at - exit after the specified datetime"
|
||||
echo "at - waits until after the specified datetime"
|
||||
echo "Usage:"
|
||||
echo " at <DATETIME> && command..."
|
||||
echo
|
||||
|
@ -9,17 +9,13 @@ usage() {
|
|||
echo " at 15:00:00 && echo \"it is 3 o'clock\""
|
||||
}
|
||||
|
||||
[[ -z "$1" ]] && { echo "error: no DATE argument provided" >&2; usage; exit 1; }
|
||||
[[ -z "$1" ]] && { echo "Error: No DATE argument provided." >&2; usage; exit 1; }
|
||||
|
||||
d="$(date -d "${@}" +%s)"
|
||||
_dt=$((d - $(date +%s)))
|
||||
days=$((_dt / 86400))
|
||||
printf 'Started at %s (with duration %sd %s)\n' "$(date)" "$days" "$(date -u --date @$((_dt)) +%H:%M:%S)"
|
||||
|
||||
while [[ "$d" -ge "$(date +%s)" ]]; do
|
||||
_dt=$((d - $(date +%s)))
|
||||
days=$((_dt / 86400))
|
||||
printf "\r%sd %s " "$days" "$(date -u --date @$((_dt)) +%H:%M:%S)";
|
||||
echo -ne "\rTime Remaining: ${days}d $(date -u --date @$((_dt)) +%H:%M:%S) ";
|
||||
sleep 0.1
|
||||
done
|
||||
exit 0
|
|
@ -1,24 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
function usage {
|
||||
echo "countdown - exit after a certain amount of time has passed"
|
||||
echo " Usage:"
|
||||
echo " countdown <SECONDS> && command..."
|
||||
echo
|
||||
echo " Examples:"
|
||||
echo ' countdown 120 && echo "Two minutes has elapsed!"'
|
||||
}
|
||||
|
||||
[[ $# -lt 1 ]] && { printf "error: no SECONDS argument provided\n" >&2; usage; exit 1; }
|
||||
[[ $# -lt 1 ]] && { echo "No argument provided." >&2 ; exit 1; }
|
||||
|
||||
d=$(($(date +%s) + $1));
|
||||
printf 'Started at %s\n' "$(date)"
|
||||
echo "Countdown started at $(date)"
|
||||
|
||||
while [[ "$d" -ge "$(date +%s)" ]]; do
|
||||
_dt=$((d - $(date +%s)))
|
||||
days=$((_dt / 86400))
|
||||
printf "\r%sd %s " "$days" "$(date -u --date @$((_dt)) +%H:%M:%S)";
|
||||
echo -ne "\r${days}d $(date -u --date @$((_dt)) +%H:%M:%S) ";
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
printf "\rCountdown finished %s\n" "$(date)"
|
||||
echo -ne "\rCountdown finished $(date)\n"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env -S nix shell nixpkgs#deno --command deno run --allow-read --allow-run --allow-net
|
||||
#!/usr/bin/env -S deno run --allow-read --allow-run --allow-net
|
||||
|
||||
import * as path from "https://deno.land/std@0.181.0/path/mod.ts";
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
N journal
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
umask 0077
|
||||
SUBDIR="${2:-./}"
|
||||
mkdir -p "$NOTES_PATH/$SUBDIR"
|
||||
cd "$NOTES_PATH/$SUBDIR" || exit 1
|
||||
|
|
|
@ -1,127 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# spark
|
||||
# https://github.com/holman/spark
|
||||
#
|
||||
# Generates sparklines for a set of data.
|
||||
#
|
||||
# Here's a good web-based sparkline generator that was a bit of inspiration
|
||||
# for spark:
|
||||
#
|
||||
# https://datacollective.org/sparkblocks
|
||||
#
|
||||
# spark takes a comma-separated or space-separated list of data and then prints
|
||||
# a sparkline out of it.
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# spark 1 5 22 13 53
|
||||
# # => ▁▁▃▂▇
|
||||
#
|
||||
# spark 0 30 55 80 33 150
|
||||
# # => ▁▂▃▅▂▇
|
||||
#
|
||||
# spark -h
|
||||
# # => Prints the spark help text.
|
||||
|
||||
# Generates sparklines.
|
||||
#
|
||||
# $1 - The data we'd like to graph.
|
||||
_echo()
|
||||
{
|
||||
if [ "X$1" = "X-n" ]; then
|
||||
shift
|
||||
printf "%s" "$*"
|
||||
else
|
||||
printf "%s\n" "$*"
|
||||
fi
|
||||
}
|
||||
|
||||
spark()
|
||||
{
|
||||
local n numbers=
|
||||
|
||||
# find min/max values
|
||||
local min=0xffffffff max=0
|
||||
|
||||
for n in ${@//,/ }
|
||||
do
|
||||
# on Linux (or with bash4) we could use `printf %.0f $n` here to
|
||||
# round the number but that doesn't work on OS X (bash3) nor does
|
||||
# `awk '{printf "%.0f",$1}' <<< $n` work, so just cut it off
|
||||
n=${n%.*}
|
||||
(( n < min )) && min=$n
|
||||
(( n > max )) && max=$n
|
||||
numbers=$numbers${numbers:+ }$n
|
||||
done
|
||||
|
||||
# print ticks
|
||||
local ticks=(▁ ▂ ▃ ▄ ▅ ▆ ▇ █)
|
||||
|
||||
# use a high tick if data is constant
|
||||
(( min == max )) && ticks=(▅ ▆)
|
||||
|
||||
local f=$(( (($max-$min)<<8)/(${#ticks[@]}-1) ))
|
||||
(( f < 1 )) && f=1
|
||||
|
||||
for n in $numbers
|
||||
do
|
||||
_echo -n ${ticks[$(( ((($n-$min)<<8)/$f) ))]}
|
||||
done
|
||||
_echo
|
||||
}
|
||||
|
||||
# If we're being sourced, don't worry about such things
|
||||
if [ "$BASH_SOURCE" == "$0" ]; then
|
||||
# Prints the help text for spark.
|
||||
help()
|
||||
{
|
||||
local spark=$(basename $0)
|
||||
cat <<EOF
|
||||
|
||||
USAGE:
|
||||
$spark [-h|--help] VALUE,...
|
||||
|
||||
EXAMPLES:
|
||||
$spark 1 5 22 13 53
|
||||
▁▁▃▂█
|
||||
$spark 0,30,55,80,33,150
|
||||
▁▂▃▄▂█
|
||||
echo 9 13 5 17 1 | $spark
|
||||
▄▆▂█▁
|
||||
EOF
|
||||
}
|
||||
|
||||
# show help for no arguments if stdin is a terminal
|
||||
if { [ -z "$1" ] && [ -t 0 ] ; } || [ "$1" == '-h' ] || [ "$1" == '--help' ]
|
||||
then
|
||||
help
|
||||
exit 0
|
||||
fi
|
||||
|
||||
spark ${@:-`cat`}
|
||||
fi
|
||||
|
||||
# source: https://github.com/holman/spark/commit/ab88ac6f8f33698f39ece2f109b1117ef39a68eb
|
||||
|
||||
# The MIT License
|
||||
#
|
||||
# Copyright (c) Zach Holman, https://zachholman.com
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
N todo
|
|
@ -1,2 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
N todo
|
18
modules/home-manager/senpai.nix
Normal file
18
modules/home-manager/senpai.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{config, ...}: {
|
||||
programs.senpai = {
|
||||
enable = true;
|
||||
config = {
|
||||
address = "a";
|
||||
nickname = "a";
|
||||
};
|
||||
};
|
||||
|
||||
home.file."${config.xdg.configHome}/senpai/senpai.scfg" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
address irc+insecure://beefcake:6667
|
||||
nickname lytedev
|
||||
password-cmd pass soju
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,22 +1,37 @@
|
|||
{
|
||||
style,
|
||||
colors,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
# font,
|
||||
...
|
||||
}: {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
waybar
|
||||
mako
|
||||
swaylock
|
||||
linux-desktop
|
||||
];
|
||||
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
xdg = {
|
||||
home.file."${config.xdg.configHome}/tofi/config" = {
|
||||
enable = true;
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"x-scheme-handler/http" = "firefox.desktop";
|
||||
"x-scheme-handler/https" = "firefox.desktop";
|
||||
};
|
||||
};
|
||||
text = ''
|
||||
font = ${pkgs.iosevka-lyteterm}/share/fonts/truetype/iosevka-lyteterm-regular.ttf
|
||||
|
||||
text-color = #f8f8f8
|
||||
prompt-color = #f38ba8
|
||||
selection-color = #66d9ef
|
||||
background-color = #1e1e2e
|
||||
border-width = 4
|
||||
border-color = #66d9ef
|
||||
|
||||
fuzzy-match = true
|
||||
'';
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
|
@ -42,17 +57,6 @@
|
|||
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = [
|
||||
"DISPLAY"
|
||||
"WAYLAND_DISPLAY"
|
||||
"SWAYSOCK"
|
||||
"XDG_CURRENT_DESKTOP"
|
||||
"XDG_SESSION_TYPE"
|
||||
"NIXOS_OZONE_WL"
|
||||
"XCURSOR_THEME"
|
||||
"XCURSOR_SIZE"
|
||||
"PATH"
|
||||
];
|
||||
};
|
||||
|
||||
# TODO: stuff is opening on workspace 10 (0?)
|
||||
|
@ -76,6 +80,12 @@
|
|||
*/
|
||||
];
|
||||
|
||||
output = {
|
||||
"*" = {
|
||||
background = "$HOME/.wallpaper fill";
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: popup_during_fullscreen smart
|
||||
focus = {
|
||||
wrapping = "no"; # maybe workspace?
|
||||
|
@ -100,11 +110,6 @@
|
|||
};
|
||||
|
||||
startup = [
|
||||
{command = "kdeconnect-indicator";}
|
||||
{command = "mako";}
|
||||
{
|
||||
command = "swaybg -i $HOME/.wallpaper";
|
||||
}
|
||||
{
|
||||
command = "swayosd-server";
|
||||
}
|
||||
|
@ -134,8 +139,10 @@
|
|||
"timeout 600 'swaymsg \"output * dpms off\"' resume 'swaymsg \"output * dpms on\" & maybe-good-morning &'"
|
||||
];
|
||||
}
|
||||
# {command = "mako";}
|
||||
# {command = "firefox";}
|
||||
# {command = "wezterm";}
|
||||
{command = "wezterm";}
|
||||
];
|
||||
|
||||
modes = {
|
||||
|
@ -158,13 +165,13 @@
|
|||
input = {
|
||||
"type:keyboard" = {
|
||||
xkb_options = "ctrl:nocaps";
|
||||
repeat_delay = "180";
|
||||
repeat_rate = "100";
|
||||
repeat_delay = "200";
|
||||
repeat_rate = "60";
|
||||
};
|
||||
|
||||
"type:pointer" = {
|
||||
accel_profile = "flat";
|
||||
pointer_accel = "0.5";
|
||||
pointer_accel = "0";
|
||||
};
|
||||
|
||||
"type:touchpad" = {
|
||||
|
@ -188,7 +195,6 @@
|
|||
"${mod}+c" = "kill";
|
||||
"${mod}+shift+c" = "kill # TODO: kill -9?";
|
||||
"${mod}+alt+space" = "exec wofi --show drun";
|
||||
"${mod}" = "exec ${menu}";
|
||||
"${mod}+space" = "exec ${menu}";
|
||||
"${mod}+shift+s" = "exec clipshot";
|
||||
"${mod}+e" = "exec thunar";
|
||||
|
@ -266,54 +272,39 @@
|
|||
# TODO: this should also reset the horizontal and vertical gaps?
|
||||
"${mod}+control+equal" = "gaps inner current set 0";
|
||||
|
||||
"${mod}+shift+v" = "exec swayosd-client --input-volume mute-toggle";
|
||||
"${mod}+F1" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
"XF86AudioRaiseVolume" = "exec swayosd-client --output-volume raise";
|
||||
"XF86AudioLowerVolume" = "exec swayosd-client --output-volume lower";
|
||||
"XF86AudioMute" = "exec swayosd-client --output-volume mute-toggle";
|
||||
"XF86AudioMicMute" = "exec swayosd-client --input-volume mute-toggle";
|
||||
"${mod}+shift+v" = "exec swayosd-client --input-volume mute-toggle";
|
||||
# "XF86AudioRaiseVolume" = "exec swayosd-client --output-volume 15";
|
||||
# "XF86AudioLowerVolume" = "exec swayosd-client --output-volume -15";
|
||||
# "XF86AudioRaiseVolume" = "exec swayosd-client --output-volume raise --max-volume 120";
|
||||
# "XF86AudioLowerVolume" = "exec swayosd-client --output-volume lower --max-volume 120";
|
||||
# "XF86AudioRaiseVolume" = "exec swayosd-client --output-volume +10 --device alsa_output.pci-0000_11_00.4.analog-stereo.monitor";
|
||||
# "XF86AudioLowerVolume" = "exec swayosd-client --output-volume -10 --device alsa_output.pci-0000_11_00.4.analog-stereo.monitor";
|
||||
"XF86MonBrightnessUp" = "exec swayosd-client --brightness raise";
|
||||
"XF86MonBrightnessDown" = "exec swayosd-client --brightness lower";
|
||||
# "XF86MonBrightnessUp" = " exec swayosd-client --brightness 10";
|
||||
# "XF86MonBrightnessDown" = "exec swayosd-client --brightness -10";
|
||||
|
||||
# "XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
# "XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||
"control+XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +1%";
|
||||
"control+XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -1%";
|
||||
# "XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
"${mod}+F1" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
# "XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
# "XF86MonBrightnessDown" = "exec brightnessctl set 10%-";
|
||||
# "XF86MonBrightnessUp" = "exec brightnessctl set +10%";
|
||||
# "shift+XF86MonBrightnessDown" = "exec brightnessctl set 1%";
|
||||
# "shift+XF86MonBrightnessUp" = "exec brightnessctl set 100%";
|
||||
# "control+XF86MonBrightnessDown" = "exec brightnessctl set 1%-";
|
||||
# "control+XF86MonBrightnessUp" = "exec brightnessctl set +1%";
|
||||
"XF86AudioPlay" = "exec playerctl play-pause";
|
||||
"XF86AudioNext" = "exec playerctl next";
|
||||
"XF86AudioPrev" = "exec playerctl previous";
|
||||
"--locked ${mod}+shift+v" = "exec swayosd-client --input-volume mute-toggle";
|
||||
"--locked ${mod}+F1" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
"--locked XF86AudioRaiseVolume" = "exec swayosd-client --output-volume raise";
|
||||
"--locked XF86AudioLowerVolume" = "exec swayosd-client --output-volume lower";
|
||||
"--locked XF86AudioMute" = "exec swayosd-client --output-volume mute-toggle";
|
||||
"--locked XF86AudioMicMute" = "exec swayosd-client --input-volume mute-toggle";
|
||||
"--locked XF86MonBrightnessUp" = "exec swayosd-client --brightness raise";
|
||||
"--locked XF86MonBrightnessDown" = "exec swayosd-client --brightness lower";
|
||||
"--locked control+XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +1%";
|
||||
"--locked control+XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -1%";
|
||||
"--locked XF86AudioPlay" = "exec playerctl play-pause";
|
||||
"--locked XF86AudioNext" = "exec playerctl next";
|
||||
"--locked XF86AudioPrev" = "exec playerctl previous";
|
||||
|
||||
/*
|
||||
"XF86MonBrightnessUp" = " exec swayosd-client --brightness 10";
|
||||
"XF86MonBrightnessDown" = "exec swayosd-client --brightness -10";
|
||||
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||
"XF86AudioRaiseVolume" = "exec swayosd-client --output-volume 15";
|
||||
"XF86AudioLowerVolume" = "exec swayosd-client --output-volume -15";
|
||||
"XF86AudioRaiseVolume" = "exec swayosd-client --output-volume raise --max-volume 120";
|
||||
"XF86AudioLowerVolume" = "exec swayosd-client --output-volume lower --max-volume 120";
|
||||
"XF86AudioRaiseVolume" = "exec swayosd-client --output-volume +10 --device alsa_output.pci-0000_11_00.4.analog-stereo.monitor";
|
||||
"XF86AudioLowerVolume" = "exec swayosd-client --output-volume -10 --device alsa_output.pci-0000_11_00.4.analog-stereo.monitor";
|
||||
"XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
"XF86MonBrightnessDown" = "exec brightnessctl set 10%-";
|
||||
"XF86MonBrightnessUp" = "exec brightnessctl set +10%";
|
||||
"shift+XF86MonBrightnessDown" = "exec brightnessctl set 1%";
|
||||
"shift+XF86MonBrightnessUp" = "exec brightnessctl set 100%";
|
||||
"control+XF86MonBrightnessDown" = "exec brightnessctl set 1%-";
|
||||
"control+XF86MonBrightnessUp" = "exec brightnessctl set +1%";
|
||||
"${mod}+shift+v" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
*/
|
||||
# "${mod}+shift+v" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
|
||||
"${mod}+control+shift+l" = "exec swaylock";
|
||||
|
||||
|
@ -321,7 +312,7 @@
|
|||
};
|
||||
assigns = {};
|
||||
bars = [];
|
||||
colors = with style.colors; {
|
||||
colors = with colors; {
|
||||
background = bg;
|
||||
focused = {
|
||||
background = bg;
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
{style, ...}: {
|
||||
{
|
||||
font,
|
||||
# colors,
|
||||
...
|
||||
}: {
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color = "ffffffff";
|
||||
image = "~/.wallpaper";
|
||||
font = style.font.name;
|
||||
font = font.name;
|
||||
show-failed-attempts = true;
|
||||
ignore-empty-password = true;
|
||||
|
||||
|
|
7
modules/home-manager/thinker.nix
Normal file
7
modules/home-manager/thinker.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{outputs, ...}: {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
sway
|
||||
sway-laptop
|
||||
hyprland
|
||||
];
|
||||
}
|
126
modules/home-manager/tmux.nix
Normal file
126
modules/home-manager/tmux.nix
Normal file
|
@ -0,0 +1,126 @@
|
|||
{
|
||||
# colors,
|
||||
# font,
|
||||
...
|
||||
}: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
baseIndex = 1;
|
||||
clock24 = true;
|
||||
extraConfig = ''
|
||||
unbind C-b
|
||||
set -g prefix C-s
|
||||
|
||||
# enable tmux to support helix colors
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -g terminal-overrides ",xterm-256color:RGB"
|
||||
|
||||
set -g update-environment "WAYLAND_DISPLAY DISPLAY"
|
||||
|
||||
bind R source-file "$HOME/.tmux.conf" \; display-message "Reloaded $HOME/.tmux.conf"
|
||||
bind o display-message "Saved pane output to #(tmux-save-buffer '#S')"
|
||||
bind O run "tmux-edit-buffer"
|
||||
|
||||
bind D attach-session -t . -c '#{pane_current_path}' \; display-message "Set session path to #{pane_current_path}"
|
||||
|
||||
bind H set -s status # toggle status bar
|
||||
|
||||
bind v split-window -h -c "#{pane_current_path}"
|
||||
bind b split-window -c "#{pane_current_path}"
|
||||
bind h split-window -c "#{pane_current_path}"
|
||||
|
||||
bind -n C-l select-pane -R
|
||||
bind -n C-k select-pane -U
|
||||
|
||||
bind -n C-j select-pane -D
|
||||
# enabling a ^J hotkey causes breakage when pasting anything that start with a newline, since it triggers the hotkey and some weird interaction with bracketed paste causes the pane to enter a broken state
|
||||
|
||||
bind -n C-h select-pane -L
|
||||
|
||||
bind -n C-M-l split-window -h -c "#{pane_current_path}"
|
||||
bind -n C-M-j split-window -v -c "#{pane_current_path}"
|
||||
|
||||
# tab creation
|
||||
bind -n C-t new-window
|
||||
|
||||
# tab nav is the default p and n binds
|
||||
# window and session switcher is the default w bind
|
||||
|
||||
set -g mouse on
|
||||
set -g escape-time 0
|
||||
|
||||
set -g monitor-activity on
|
||||
set -g visual-bell off
|
||||
set -g bell-action other
|
||||
set -g activity-action none
|
||||
|
||||
set -g mode-keys vi
|
||||
set -g history-limit 1000000
|
||||
|
||||
set -g status on
|
||||
set -g status-position bottom
|
||||
set -g status-style "fg=colour8 bg=default"
|
||||
set -g status-interval 5
|
||||
set -g status-left-length 50
|
||||
set -g window-status-style "fg=colour8 bg=default"
|
||||
set -g window-status-format "#W"
|
||||
set -g window-status-separator " "
|
||||
set -g window-status-activity-style "fg=colour7 bg=default"
|
||||
set -g window-status-bell-style "fg=colour1 bg=default"
|
||||
set -g window-status-current-style "fg=colour4 bg=default"
|
||||
set -g window-status-current-format " #W "
|
||||
set -g status-left "#{client_user}@#h:#S "
|
||||
set -g status-right "#(kubeline && printf ' ')"
|
||||
set -g status-left-length 1000
|
||||
|
||||
set -g message-style "fg=colour7 bg=default"
|
||||
set -g pane-active-border-style fg=blue
|
||||
set -g pane-border-style fg=colour0
|
||||
set -g clock-mode-colour colour8
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
|
||||
set -g window-status-current-format "#W"
|
||||
|
||||
# present a menu of urls to open from the visible pane
|
||||
# TODO: fuzzy search this
|
||||
# bind u capture-pane \;\
|
||||
# save-buffer /tmp/tmux-buffer \;\
|
||||
# split-window -l 10 "urlscan /tmp/tmux-buffer"
|
||||
|
||||
bind -T copy-mode-vi "y" send-keys -X copy-pipe-no-clear 'clip' \; display-message 'Copied to clipboard!'
|
||||
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear 'clip' \; display-message 'Copied to clipboard!'
|
||||
|
||||
bind K kill-pane
|
||||
bind C-S-k kill-window
|
||||
|
||||
# Activate OFF mode
|
||||
bind -n M-o \
|
||||
set prefix None \;\
|
||||
set key-table off \;\
|
||||
set -ag status-right " OFF"
|
||||
|
||||
# Disable OFF mode
|
||||
bind -T off M-O \
|
||||
set -u prefix \;\
|
||||
set -u key-table \;\
|
||||
source-file "$HOME/.config/tmux/tmux.conf"
|
||||
|
||||
# set -g @plugin 'tmux-plugins/tpm'
|
||||
# set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
# set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
|
||||
# set -g @resurrect-capture-pane-contents 'on'
|
||||
# set -g @resurrect-processes 'helix hx vi vim nvim emacs man less more tail top htop btm irssi weechat mutt "git log" iex mix deno watchexec mosh-client ssh senpai broot nnn iex mix'
|
||||
|
||||
# bind A run-shell "#{@resurrect-save-script-path}"
|
||||
# bind L run-shell "#{@resurrect-restore-script-path}"
|
||||
|
||||
# set -g @continuum-restore 'on'
|
||||
# set -g @continuum-save-interval '120'
|
||||
'';
|
||||
};
|
||||
home.shellAliases = {
|
||||
t = "tmux";
|
||||
};
|
||||
}
|
26
modules/home-manager/wallpaper-manager.nix
Normal file
26
modules/home-manager/wallpaper-manager.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
systemd.user.services.variety = {
|
||||
Unit = {
|
||||
Description = "Wallapaper downloader and changer";
|
||||
After = ["graphical-session.target"];
|
||||
};
|
||||
Install.WantedBy = ["graphical-session.target"];
|
||||
Service = {
|
||||
Environment = [
|
||||
"PATH=${lib.makeBinPath (with pkgs; [
|
||||
variety
|
||||
dbus
|
||||
(lib.getBin pkgs.plasma5Packages.qttools)
|
||||
libsForQt5.kdialog
|
||||
])}"
|
||||
];
|
||||
ExecStart = ''
|
||||
${pkgs.variety}/bin/variety
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
style,
|
||||
colors,
|
||||
font,
|
||||
...
|
||||
}: {
|
||||
programs.waybar = {
|
||||
|
@ -10,41 +10,38 @@
|
|||
"layer" = "top";
|
||||
"position" = "bottom";
|
||||
"output" = ["eDP-1" "DP-3"];
|
||||
"height" = 50;
|
||||
"modules-left" = [
|
||||
"idle_inhibitor"
|
||||
"sway/workspaces"
|
||||
"sway/window"
|
||||
];
|
||||
"modules-center" = [];
|
||||
"height" = 32;
|
||||
"modules-left" = ["clock" "sway/window"];
|
||||
"modules-center" = ["sway/workspaces"];
|
||||
"modules-right" = [
|
||||
"privacy"
|
||||
"power-profiles-daemon"
|
||||
"mpris"
|
||||
## "disk"
|
||||
## TODO: will need a custom module for Disk IO
|
||||
|
||||
## "wireplumber" # pulseaudio module is more featureful
|
||||
"idle_inhibitor"
|
||||
"bluetooth"
|
||||
# "wireplumber",
|
||||
"pulseaudio"
|
||||
"network"
|
||||
# "network",
|
||||
"cpu"
|
||||
"memory"
|
||||
"temperature"
|
||||
# "temperature",
|
||||
"backlight"
|
||||
"battery"
|
||||
|
||||
"bluetooth"
|
||||
"tray"
|
||||
"clock"
|
||||
];
|
||||
"bluetooth" = {
|
||||
"format" = "<span></span>";
|
||||
"on-click" = "${pkgs.blueman}/bin/blueman-manager";
|
||||
};
|
||||
"wireplumber" = {
|
||||
"format" = "{volume}% {icon}";
|
||||
"on-click" = "helvum";
|
||||
"format" = "<span</span>";
|
||||
"format-connected" = "<span></span>";
|
||||
"format-connected-battery" = "<span></span>";
|
||||
# "format-device-preference" = [ "device1", "device2" ], # preference list deciding the displayed devic;
|
||||
"tooltip-format" = "{controller_alias}@{controller_address} ({num_connections} connected)";
|
||||
"tooltip-format-connected" = "{controller_alias}@{controller_address} ({num_connections} connected)\n{device_enumerate}";
|
||||
"tooltip-format-enumerate-connected" = "{device_alias}@{device_address}";
|
||||
"tooltip-format-enumerate-connected-battery" = "{device_alias}@{device_address} ( {device_battery_percentage}%)";
|
||||
};
|
||||
# "wireplumber" = ;
|
||||
# "format" = "{volume}% {icon}";
|
||||
# "format-muted" = "";
|
||||
# "on-click" = "helvum;
|
||||
# },
|
||||
"sway/workspaces" = {
|
||||
"disable-scroll" = false;
|
||||
"persistent_workspaces" = {
|
||||
|
@ -62,40 +59,31 @@
|
|||
"tray" = {
|
||||
"icon-size" = 24;
|
||||
"spacing" = 4;
|
||||
"show-passive-items" = true;
|
||||
};
|
||||
"clock" = {
|
||||
"interval" = 1;
|
||||
"format" = "{:%a %b %d\n%H:%M:%S}";
|
||||
"justify" = "center";
|
||||
"format" = "{:%a %b %d %H:%M:%S}";
|
||||
};
|
||||
"cpu" = {
|
||||
"format" = "{usage}%\nCPU";
|
||||
"format" = "{usage} <span></span>";
|
||||
"tooltip" = true;
|
||||
"interval" = 5;
|
||||
"justify" = "center";
|
||||
"interval" = 3;
|
||||
};
|
||||
"memory" = {
|
||||
"format" = "{}%\nRAM";
|
||||
"tooltip" = true;
|
||||
"interval" = 5;
|
||||
"justify" = "center";
|
||||
"format" = "{} ";
|
||||
};
|
||||
"temperature" = {
|
||||
/*
|
||||
"thermal-zone" = 2;
|
||||
"hwmon-path" = "/sys/class/hwmon/hwmon2/temp1_input";
|
||||
"format-critical" = "{temperatureC}°C {icon}";
|
||||
*/
|
||||
# "thermal-zone" = 2;
|
||||
# "hwmon-path" = "/sys/class/hwmon/hwmon2/temp1_input";
|
||||
"critical-threshold" = 80;
|
||||
"format" = "{temperatureC}\n°C";
|
||||
"justify" = "center";
|
||||
# "format-critical" = "{temperatureC}°C {icon}";
|
||||
"format" = "{temperatureC}°C {icon}";
|
||||
"format-icons" = ["" "" ""];
|
||||
};
|
||||
"backlight" = {
|
||||
# "device" = "acpi_video1";
|
||||
"format" = "{percent}%\n{icon}";
|
||||
"format" = "{percent}% {icon}";
|
||||
"format-icons" = ["" ""];
|
||||
"justify" = "center";
|
||||
};
|
||||
"battery" = {
|
||||
"states" = {
|
||||
|
@ -103,55 +91,55 @@
|
|||
"warning" = 30;
|
||||
"critical" = 1;
|
||||
};
|
||||
"tooltip-format" = "{timeTo}\n{power} watts\n{health}% health\n{cycles} cycles";
|
||||
"format" = "{icon}{capacity}%-\n{time}";
|
||||
"format-charging" = "{capacity}%+\n{time}";
|
||||
"format-plugged" = "{capacity}%=\n{time}";
|
||||
"format-alt" = "{capacity}%";
|
||||
"format" = "{capacity}% {time} {icon}";
|
||||
"format-charging" = "{capacity}% {time} ";
|
||||
"format-plugged" = "{capacity}% {time} ";
|
||||
"format-alt" = "{capacity}% {icon}";
|
||||
"format-good" = ""; # An empty format will hide the module
|
||||
"format-time" = "{H}:{m}";
|
||||
"justify" = "center";
|
||||
"format-full" = "";
|
||||
"format-icons" = ["" "" "" "" ""];
|
||||
};
|
||||
"network" = {
|
||||
"format-wifi" = "{bandwidthUpBits} up \n{bandwidthDownBits} down";
|
||||
"format-ethernet" = "{bandwidthUpBits} up \n{bandwidthDownBits} down";
|
||||
"format-linked" = "{bandwidthUpBits} up \n{bandwidthDownBits} down";
|
||||
"format-disconnected" = "No Network {icon}";
|
||||
"format-alt" = "{bandwidthUpBits} up \n{bandwidthDownBits} down";
|
||||
"interval" = 5;
|
||||
"justify" = "right";
|
||||
"format-wifi" = "{essid} ({signalStrength}%) ";
|
||||
"format-ethernet" = "{ifname}: {ipaddr}/{cidr} ";
|
||||
"format-linked" = "{ifname} (No IP) ";
|
||||
"format-disconnected" = "Disconnected ⚠";
|
||||
"format-alt" = "{ifname}: {ipaddr}/{cidr}";
|
||||
};
|
||||
"mpris" = {
|
||||
"format" = "{title}\nby {artist}";
|
||||
"title-len" = 64;
|
||||
"artist-len" = 61;
|
||||
"justify" = "center";
|
||||
"format" = "{title} by {artist}";
|
||||
};
|
||||
"pulseaudio" = {
|
||||
/*
|
||||
"scroll-step" = 1, # %, can be a floa;
|
||||
"format" = "{volume}% {icon} {format_source}";
|
||||
"format-muted" = " {format_source}";
|
||||
*/
|
||||
"format" = "{volume}%\n{format_source}";
|
||||
"format-muted" = "MUTE\n{format_source}";
|
||||
"format-bluetooth" = "{volume}%\n{format_source}";
|
||||
"format-bluetooth-muted" = "MUTE\n{format_source}";
|
||||
"format-source" = "MIC ON";
|
||||
"format-source-muted" = "MIC OFF";
|
||||
# "scroll-step" = 1, # %, can be a floa;
|
||||
"format" = "{volume} {icon} <span>{format_source}</span>";
|
||||
#"format" = "{volume}% {icon} {format_source}";
|
||||
#"format-bluetooth" = "{volume}% {icon} {format_source}";
|
||||
#"format-bluetooth-muted" = " {icon} {format_source}";
|
||||
#"format-muted" = " {format_source}";
|
||||
"format-muted" = " {format_source}";
|
||||
"format-source" = "";
|
||||
"format-source-muted" = "";
|
||||
"format-icons" = {
|
||||
"headphones" = "";
|
||||
"handsfree" = "";
|
||||
"headset" = "";
|
||||
"phone" = "";
|
||||
"portable" = "";
|
||||
"car" = "";
|
||||
"default" = ["" "" ""];
|
||||
};
|
||||
# TODO: toggle mute?
|
||||
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
"justify" = "center";
|
||||
"on-click" = "pavucontrol";
|
||||
};
|
||||
};
|
||||
};
|
||||
style = let
|
||||
border-width = "0px";
|
||||
in
|
||||
with style.colors.withHashPrefix; ''
|
||||
with colors.withHashPrefix; ''
|
||||
* {
|
||||
border-radius: 0;
|
||||
font-family: "${style.font.name}", "Symbols Nerd Font Mono", sans-serif;
|
||||
font-family: "${font.name}", "Symbols Nerd Font Mono", sans-serif;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
|
|
24
modules/home-manager/wezterm.nix
Normal file
24
modules/home-manager/wezterm.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
pkgs,
|
||||
# font,
|
||||
colors,
|
||||
...
|
||||
}: {
|
||||
programs.wezterm = with colors.withHashPrefix; {
|
||||
enable = true;
|
||||
extraConfig = builtins.readFile ./wezterm/config.lua;
|
||||
colorSchemes = {
|
||||
catppuccin-mocha-sapphire = {
|
||||
ansi = map (x: colors.withHashPrefix.${toString x}) (pkgs.lib.lists.range 0 7);
|
||||
brights = map (x: colors.withHashPrefix.${toString (x + 8)}) (pkgs.lib.lists.range 0 7);
|
||||
|
||||
foreground = fg;
|
||||
background = bg;
|
||||
|
||||
cursor_fg = bg;
|
||||
cursor_bg = text;
|
||||
cursor_border = text;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -4,7 +4,6 @@ if wezterm.config_builder then
|
|||
config = wezterm.config_builder()
|
||||
end
|
||||
|
||||
config.adjust_window_size_when_changing_font_size = false
|
||||
config.font = wezterm.font_with_fallback{
|
||||
{ family = "IosevkaLyteTerm", weight = 'Medium', italic = false },
|
||||
{ family = 'Symbols Nerd Font Mono', weight = 'Regular', italic = false },
|
||||
|
@ -18,16 +17,9 @@ config.default_cursor_style = 'BlinkingBar'
|
|||
-- config.disable_default_key_bindings = true
|
||||
config.hide_tab_bar_if_only_one_tab = true
|
||||
config.use_fancy_tab_bar = false
|
||||
config.tab_bar_at_bottom = true
|
||||
config.tab_bar_at_bottom = false
|
||||
config.window_background_opacity = 1.0
|
||||
config.enable_kitty_keyboard = true
|
||||
config.show_new_tab_button_in_tab_bar = true
|
||||
config.notification_handling = "SuppressFromFocusedTab"
|
||||
|
||||
-- config.front_end = "WebGpu"
|
||||
-- config.webgpu_power_preference = 'HighPerformance'
|
||||
config.enable_wayland = true
|
||||
-- config.use_ime = true
|
||||
|
||||
local function tab_title(tab_info)
|
||||
local title = tab_info.tab_title
|
||||
|
@ -43,7 +35,6 @@ wezterm.on('format-tab-title', function(tab, _, _, _, _, max_width)
|
|||
return ' ' .. string.sub(title, 0, max_width - 2) .. ' '
|
||||
end)
|
||||
|
||||
-- see nix module which has home manager create this color scheme file
|
||||
config.color_scheme = 'catppuccin-mocha-sapphire';
|
||||
|
||||
config.inactive_pane_hsb = {
|
||||
|
@ -112,16 +103,6 @@ config.keys = {
|
|||
mods = 'CTRL|SHIFT',
|
||||
action = wezterm.action.ActivateCommandPalette
|
||||
},
|
||||
{
|
||||
key = 'w',
|
||||
mods = 'CTRL|SHIFT',
|
||||
action = wezterm.action.CloseCurrentPane { confirm = true },
|
||||
},
|
||||
{
|
||||
key = 'w',
|
||||
mods = 'CTRL|ALT|SHIFT',
|
||||
action = wezterm.action.CloseCurrentTab { confirm = true },
|
||||
},
|
||||
{
|
||||
key = 'l',
|
||||
mods = 'CTRL|SHIFT|ALT',
|
||||
|
|
513
modules/home-manager/zellij.nix
Normal file
513
modules/home-manager/zellij.nix
Normal file
|
@ -0,0 +1,513 @@
|
|||
{
|
||||
colors,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# zellij does not support modern terminal keyboard input:
|
||||
# https://github.com/zellij-org/zellij/issues/735
|
||||
programs.zellij = {
|
||||
# uses home manager's toKDL generator
|
||||
enable = true;
|
||||
# enableFishIntegration = true;
|
||||
settings = {
|
||||
pane_frames = false;
|
||||
simplified_ui = true;
|
||||
default_mode = "locked";
|
||||
mouse_mode = true;
|
||||
copy_clipboard = "primary";
|
||||
copy_on_select = true;
|
||||
mirror_session = false;
|
||||
|
||||
keybinds = with builtins; let
|
||||
binder = bind: let
|
||||
keys = elemAt bind 0;
|
||||
action = elemAt bind 1;
|
||||
argKeys = map (k: "\"${k}\"") (lib.lists.flatten [keys]);
|
||||
in {
|
||||
name = "bind ${concatStringsSep " " argKeys}";
|
||||
value = action;
|
||||
};
|
||||
layer = binds: (listToAttrs (map binder binds));
|
||||
in {
|
||||
# _props = {clear-defaults = true;};
|
||||
normal = {};
|
||||
locked = layer [
|
||||
[["Ctrl g"] {SwitchToMode = "Normal";}]
|
||||
[["Ctrl L"] {NewPane = "Right";}]
|
||||
[["Ctrl Z"] {NewPane = "Right";}]
|
||||
[["Ctrl J"] {NewPane = "Down";}]
|
||||
[["Ctrl h"] {MoveFocus = "Left";}]
|
||||
[["Ctrl l"] {MoveFocus = "Right";}]
|
||||
[["Ctrl j"] {MoveFocus = "Down";}]
|
||||
[["Ctrl k"] {MoveFocus = "Up";}]
|
||||
];
|
||||
resize = layer [
|
||||
[["Ctrl n"] {SwitchToMode = "Normal";}]
|
||||
[["h" "Left"] {Resize = "Increase Left";}]
|
||||
[["j" "Down"] {Resize = "Increase Down";}]
|
||||
[["k" "Up"] {Resize = "Increase Up";}]
|
||||
[["l" "Right"] {Resize = "Increase Right";}]
|
||||
[["H"] {Resize = "Decrease Left";}]
|
||||
[["J"] {Resize = "Decrease Down";}]
|
||||
[["K"] {Resize = "Decrease Up";}]
|
||||
[["L"] {Resize = "Decrease Right";}]
|
||||
[["=" "+"] {Resize = "Increase";}]
|
||||
[["-"] {Resize = "Decrease";}]
|
||||
];
|
||||
pane = layer [
|
||||
[["Ctrl p"] {SwitchToMode = "Normal";}]
|
||||
[["h" "Left"] {MoveFocus = "Left";}]
|
||||
[["l" "Right"] {MoveFocus = "Right";}]
|
||||
[["j" "Down"] {MoveFocus = "Down";}]
|
||||
[["k" "Up"] {MoveFocus = "Up";}]
|
||||
[["p"] {SwitchFocus = [];}]
|
||||
[
|
||||
["n"]
|
||||
{
|
||||
NewPane = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["d"]
|
||||
{
|
||||
NewPane = "Down";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["r"]
|
||||
{
|
||||
NewPane = "Right";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["x"]
|
||||
{
|
||||
CloseFocus = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["f"]
|
||||
{
|
||||
ToggleFocusFullscreen = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["z"]
|
||||
{
|
||||
TogglePaneFrames = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["w"]
|
||||
{
|
||||
ToggleFloatingPanes = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["e"]
|
||||
{
|
||||
TogglePaneEmbedOrFloating = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["c"]
|
||||
{
|
||||
SwitchToMode = "RenamePane";
|
||||
PaneNameInput = 0;
|
||||
}
|
||||
]
|
||||
];
|
||||
move = layer [
|
||||
[["Ctrl h"] {SwitchToMode = "Normal";}]
|
||||
[["n" "Tab"] {MovePane = [];}]
|
||||
[["p"] {MovePaneBackwards = [];}]
|
||||
[["h" "Left"] {MovePane = "Left";}]
|
||||
[["j" "Down"] {MovePane = "Down";}]
|
||||
[["k" "Up"] {MovePane = "Up";}]
|
||||
[["l" "Right"] {MovePane = "Right";}]
|
||||
];
|
||||
tab = layer [
|
||||
[["Ctrl t"] {SwitchToMode = "Normal";}]
|
||||
[
|
||||
["r"]
|
||||
{
|
||||
SwitchToMode = "RenameTab";
|
||||
TabNameInput = 0;
|
||||
}
|
||||
]
|
||||
[["h" "Left" "Up" "k"] {GoToPreviousTab = [];}]
|
||||
[["l" "Right" "Down" "j"] {GoToNextTab = [];}]
|
||||
[
|
||||
["n"]
|
||||
{
|
||||
NewTab = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["x"]
|
||||
{
|
||||
CloseTab = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["s"]
|
||||
{
|
||||
ToggleActiveSyncTab = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["1"]
|
||||
{
|
||||
GoToTab = 1;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["2"]
|
||||
{
|
||||
GoToTab = 2;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["3"]
|
||||
{
|
||||
GoToTab = 3;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["4"]
|
||||
{
|
||||
GoToTab = 4;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["5"]
|
||||
{
|
||||
GoToTab = 5;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["6"]
|
||||
{
|
||||
GoToTab = 6;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["7"]
|
||||
{
|
||||
GoToTab = 7;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["8"]
|
||||
{
|
||||
GoToTab = 8;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["9"]
|
||||
{
|
||||
GoToTab = 9;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[["Tab"] {ToggleTab = [];}]
|
||||
];
|
||||
scroll = layer [
|
||||
[["Ctrl s"] {SwitchToMode = "Normal";}]
|
||||
[
|
||||
["e"]
|
||||
{
|
||||
EditScrollback = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["s"]
|
||||
{
|
||||
SwitchToMode = "EnterSearch";
|
||||
SearchInput = 0;
|
||||
}
|
||||
]
|
||||
[
|
||||
["Ctrl c"]
|
||||
{
|
||||
ScrollToBottom = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[["j" "Down"] {ScrollDown = [];}]
|
||||
[["k" "Up"] {ScrollUp = [];}]
|
||||
[["Ctrl f" "PageDown" "Right" "l"] {PageScrollDown = [];}]
|
||||
[["Ctrl b" "PageUp" "Left" "h"] {PageScrollUp = [];}]
|
||||
[["d"] {HalfPageScrollDown = [];}]
|
||||
[["u"] {HalfPageScrollUp = [];}]
|
||||
# uncomment this and adjust key if using copy_on_select=false
|
||||
# bind "Alt c" { Copy; }
|
||||
];
|
||||
search = layer [
|
||||
[["Ctrl s"] {SwitchToMode = "Normal";}]
|
||||
[
|
||||
["Ctrl c"]
|
||||
{
|
||||
ScrollToBottom = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[["j" "Down"] {ScrollDown = [];}]
|
||||
[["k" "Up"] {ScrollUp = [];}]
|
||||
[["Ctrl f" "PageDown" "Right" "l"] {PageScrollDown = [];}]
|
||||
[["Ctrl b" "PageUp" "Left" "h"] {PageScrollUp = [];}]
|
||||
[["d"] {HalfPageScrollDown = [];}]
|
||||
[["u"] {HalfPageScrollUp = [];}]
|
||||
[["n"] {Search = "down";}]
|
||||
[["p"] {Search = "up";}]
|
||||
[["c"] {SearchToggleOption = "CaseSensitivity";}]
|
||||
[["w"] {SearchToggleOption = "Wrap";}]
|
||||
[["o"] {SearchToggleOption = "WholeWord";}]
|
||||
];
|
||||
entersearch = layer [
|
||||
[["Ctrl c" "Esc"] {SwitchToMode = "Scroll";}]
|
||||
[["Enter"] {SwitchToMode = "Search";}]
|
||||
];
|
||||
renametab = layer [
|
||||
[["Ctrl c"] {SwitchToMode = "Normal";}]
|
||||
[
|
||||
["Esc"]
|
||||
{
|
||||
UndoRenameTab = [];
|
||||
SwitchToMode = "Tab";
|
||||
}
|
||||
]
|
||||
];
|
||||
renamepane = layer [
|
||||
[["Ctrl c"] {SwitchToMode = "Normal";}]
|
||||
[
|
||||
["Esc"]
|
||||
{
|
||||
UndoRenamePane = [];
|
||||
SwitchToMode = "Pane";
|
||||
}
|
||||
]
|
||||
];
|
||||
session = layer [
|
||||
[["Ctrl o"] {SwitchToMode = "Normal";}]
|
||||
[["Ctrl s"] {SwitchToMode = "Scroll";}]
|
||||
[["d"] {Detach = [];}]
|
||||
];
|
||||
tmux = layer [
|
||||
[["["] {SwitchToMode = "Scroll";}]
|
||||
[
|
||||
["Ctrl b"]
|
||||
{
|
||||
Write = 2;
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["\\\""]
|
||||
{
|
||||
NewPane = "Down";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["%"]
|
||||
{
|
||||
NewPane = "Right";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["z"]
|
||||
{
|
||||
ToggleFocusFullscreen = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["c"]
|
||||
{
|
||||
NewTab = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[[","] {SwitchToMode = "RenameTab";}]
|
||||
[
|
||||
["p"]
|
||||
{
|
||||
GoToPreviousTab = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["n"]
|
||||
{
|
||||
GoToNextTab = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["Left"]
|
||||
{
|
||||
MoveFocus = "Left";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["Right"]
|
||||
{
|
||||
MoveFocus = "Right";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["Down"]
|
||||
{
|
||||
MoveFocus = "Down";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["Up"]
|
||||
{
|
||||
MoveFocus = "Up";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["h"]
|
||||
{
|
||||
MoveFocus = "Left";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["l"]
|
||||
{
|
||||
MoveFocus = "Right";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["j"]
|
||||
{
|
||||
MoveFocus = "Down";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[
|
||||
["k"]
|
||||
{
|
||||
MoveFocus = "Up";
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
[["o"] {FocusNextPane = [];}]
|
||||
[["d"] {Detach = [];}]
|
||||
[["Space"] {NextSwapLayout = [];}]
|
||||
[
|
||||
["x"]
|
||||
{
|
||||
CloseFocus = [];
|
||||
SwitchToMode = "Normal";
|
||||
}
|
||||
]
|
||||
];
|
||||
"shared_except \"locked\"" = layer [
|
||||
[["Ctrl g"] {SwitchToMode = "Locked";}]
|
||||
[["Ctrl q"] {Quit = [];}]
|
||||
[["Alt n"] {NewPane = [];}]
|
||||
[["Alt h" "Alt Left"] {MoveFocusOrTab = "Left";}]
|
||||
[["Alt l" "Alt Right"] {MoveFocusOrTab = "Right";}]
|
||||
[["Alt j" "Alt Down"] {MoveFocus = "Down";}]
|
||||
[["Alt k" "Alt Up"] {MoveFocus = "Up";}]
|
||||
[["Alt ]" "Alt +"] {Resize = "Increase";}]
|
||||
[["Alt -"] {Resize = "Decrease";}]
|
||||
[["Alt ["] {PreviousSwapLayout = [];}]
|
||||
[["Alt ]"] {NextSwapLayout = [];}]
|
||||
];
|
||||
"shared_except \"normal\" \"locked\"" = layer [
|
||||
[["Enter" "Esc"] {SwitchToMode = "Normal";}]
|
||||
];
|
||||
"shared_except \"pane\" \"locked\"" = layer [
|
||||
[["Ctrl p"] {SwitchToMode = "Pane";}]
|
||||
];
|
||||
"shared_except \"resize\" \"locked\"" = layer [
|
||||
[["Ctrl n"] {SwitchToMode = "Resize";}]
|
||||
];
|
||||
"shared_except \"scroll\" \"locked\"" = layer [
|
||||
[["Ctrl s"] {SwitchToMode = "Scroll";}]
|
||||
];
|
||||
"shared_except \"session\" \"locked\"" = layer [
|
||||
[["Ctrl o"] {SwitchToMode = "Session";}]
|
||||
];
|
||||
"shared_except \"tab\" \"locked\"" = layer [
|
||||
[["Ctrl t"] {SwitchToMode = "Tab";}]
|
||||
];
|
||||
"shared_except \"move\" \"locked\"" = layer [
|
||||
[["Ctrl h"] {SwitchToMode = "Move";}]
|
||||
];
|
||||
"shared_except \"tmux\" \"locked\"" = layer [
|
||||
[["Ctrl b"] {SwitchToMode = "Tmux";}]
|
||||
];
|
||||
};
|
||||
|
||||
default_layout = "compact";
|
||||
theme = "match";
|
||||
|
||||
themes = {
|
||||
match = with colors.withHashPrefix; {
|
||||
fg = fg;
|
||||
bg = bg;
|
||||
|
||||
black = bg;
|
||||
white = fg;
|
||||
|
||||
red = red;
|
||||
green = green;
|
||||
yellow = yellow;
|
||||
blue = blue;
|
||||
magenta = purple;
|
||||
cyan = blue;
|
||||
orange = orange;
|
||||
};
|
||||
};
|
||||
# TODO: port config
|
||||
|
||||
plugins = {
|
||||
# tab-bar = {path = "tab-bar";};
|
||||
# compact-bar = {path = "compact-bar";};
|
||||
};
|
||||
|
||||
ui = {
|
||||
pane_frames = {
|
||||
rounded_corners = true;
|
||||
hide_session_name = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.shellAliases = {
|
||||
z = "zellij";
|
||||
};
|
||||
}
|
9
modules/nixos/avahi.nix
Normal file
9
modules/nixos/avahi.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
# enable mDNS and discovery
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
reflector = true;
|
||||
openFirewall = true;
|
||||
nssmdns4 = true;
|
||||
};
|
||||
}
|
316
modules/nixos/common.nix
Normal file
316
modules/nixos/common.nix
Normal file
|
@ -0,0 +1,316 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: let
|
||||
inherit (pkgs) system;
|
||||
in {
|
||||
networking.hostName = lib.mkDefault "nixoslyte";
|
||||
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
]
|
||||
++ (with outputs.nixosModules; [
|
||||
avahi
|
||||
daniel
|
||||
]);
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
services.journald.extraConfig = "SystemMaxUse=1G";
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
# home-manager.useUserPkgs = true; # wut is this?
|
||||
|
||||
environment = {
|
||||
variables = {
|
||||
EDITOR = "hx";
|
||||
VISUAL = "hx";
|
||||
PAGER = "less";
|
||||
MANPAGER = "less";
|
||||
};
|
||||
|
||||
systemPackages = with pkgs; [
|
||||
# age
|
||||
# bat
|
||||
# bc
|
||||
# bind
|
||||
# bottom
|
||||
# btrfs-progs
|
||||
# cue
|
||||
curl
|
||||
# dogdns
|
||||
dua
|
||||
eza
|
||||
fd
|
||||
file
|
||||
fzf
|
||||
gnumake
|
||||
# gron
|
||||
# hexyl
|
||||
iputils
|
||||
# jq
|
||||
killall
|
||||
less
|
||||
mosh
|
||||
# nmap
|
||||
nettools
|
||||
nodePackages.bash-language-server
|
||||
openssl
|
||||
# pciutils
|
||||
# pv
|
||||
# rclone
|
||||
# restic
|
||||
ripgrep
|
||||
rsync
|
||||
# rtx
|
||||
sd
|
||||
shellcheck
|
||||
shfmt
|
||||
# sops
|
||||
smartmontools
|
||||
# sqlite
|
||||
# skim
|
||||
# sysstat
|
||||
unzip
|
||||
# usbutils
|
||||
# watchexec
|
||||
wget
|
||||
# xh
|
||||
zellij
|
||||
# zstd
|
||||
inputs.home-manager.packages.${system}.home-manager
|
||||
inputs.helix.packages.${system}.helix
|
||||
];
|
||||
};
|
||||
|
||||
users.groups.daniel = {};
|
||||
|
||||
users.users = {
|
||||
daniel = {
|
||||
isNormalUser = true;
|
||||
home = "/home/daniel/.home";
|
||||
createHome = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"
|
||||
];
|
||||
group = "daniel";
|
||||
extraGroups = ["users" "wheel" "video" "dialout" "uucp"];
|
||||
packages = [];
|
||||
};
|
||||
|
||||
root = {
|
||||
openssh.authorizedKeys.keys = config.users.users.daniel.openssh.authorizedKeys.keys;
|
||||
};
|
||||
};
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
programs.mosh = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
xserver.xkb = {
|
||||
layout = "us";
|
||||
options = "ctrl:nocaps";
|
||||
};
|
||||
|
||||
openssh = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
PermitRootLogin = "prohibit-password";
|
||||
};
|
||||
|
||||
openFirewall = lib.mkDefault true;
|
||||
|
||||
# listenAddresses = [
|
||||
# { addr = "0.0.0.0"; port = 22; }
|
||||
# ];
|
||||
};
|
||||
|
||||
tailscale = {
|
||||
enable = true;
|
||||
useRoutingFeatures = lib.mkDefault "client";
|
||||
};
|
||||
|
||||
fwupd.enable = true;
|
||||
smartd.enable = true;
|
||||
};
|
||||
|
||||
console = {
|
||||
# font = "Lat2-Terminus16";
|
||||
useXkbConfig = true;
|
||||
earlySetup = true;
|
||||
|
||||
colors = with outputs.colors; [
|
||||
bg
|
||||
red
|
||||
green
|
||||
orange
|
||||
blue
|
||||
purple
|
||||
yellow
|
||||
fg3
|
||||
fgdim
|
||||
red
|
||||
green
|
||||
orange
|
||||
blue
|
||||
purple
|
||||
yellow
|
||||
fg
|
||||
];
|
||||
};
|
||||
|
||||
networking = {
|
||||
useDHCP = lib.mkDefault true;
|
||||
|
||||
firewall = {
|
||||
enable = lib.mkDefault true;
|
||||
allowPing = lib.mkDefault true;
|
||||
allowedTCPPorts = lib.mkDefault [22];
|
||||
allowedUDPPortRanges = [
|
||||
{
|
||||
# mosh
|
||||
from = 60000;
|
||||
to = 60010;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
extraHosts = ''
|
||||
::1 host.docker.internal
|
||||
127.0.0.1 host.docker.internal
|
||||
::1 host.containers.internal
|
||||
127.0.0.1 host.containers.internal
|
||||
'';
|
||||
};
|
||||
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
};
|
||||
|
||||
traceroute.enable = true;
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
package = pkgs.gitFull;
|
||||
|
||||
lfs = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# https://github.com/nix-community/home-manager/issues/3113
|
||||
dconf.enable = true;
|
||||
};
|
||||
|
||||
time = {
|
||||
timeZone = "America/Chicago";
|
||||
};
|
||||
|
||||
users = {
|
||||
defaultUserShell = pkgs.fish;
|
||||
};
|
||||
|
||||
# TODO: should not be in common?
|
||||
# services.udev.extraRules = ''
|
||||
# # https://betaflight.com/docs/wiki/archive/Installing-Betaflight#step-1
|
||||
# # ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", MODE="0664", GROUP="uucp"
|
||||
# # ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="uucp"'
|
||||
# '';
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
# This will additionally add your inputs to the system's legacy channels
|
||||
# Making legacy nix commands consistent as well, awesome!
|
||||
# Not sure why I would need this...
|
||||
# nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
|
||||
# This will add each flake input as a registry
|
||||
# To make nix3 commands consistent with your flake
|
||||
# registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
|
||||
|
||||
settings = {
|
||||
trusted-users = ["root" "daniel"];
|
||||
|
||||
experimental-features = lib.mkDefault ["nix-command" "flakes"];
|
||||
|
||||
substituters = [
|
||||
"https://cache.nixos.org/"
|
||||
"https://helix.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://nix.h.lyte.dev"
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0="
|
||||
];
|
||||
|
||||
auto-optimise-store = false;
|
||||
};
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness"
|
||||
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness"
|
||||
'';
|
||||
|
||||
# # TODO: regular cron or something?
|
||||
# programs.nix-index = {
|
||||
# enable = true;
|
||||
# # enableFishIntegration = true;
|
||||
# };
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
system.stateVersion = lib.mkDefault "23.11";
|
||||
}
|
47
modules/nixos/daniel.nix
Normal file
47
modules/nixos/daniel.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
outputs,
|
||||
...
|
||||
}: let
|
||||
inherit (pkgs) system;
|
||||
in {
|
||||
home-manager = {
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs system;
|
||||
inherit (outputs) colors font;
|
||||
};
|
||||
users.daniel = {
|
||||
accounts.email.accounts = {
|
||||
primary = {
|
||||
primary = true;
|
||||
address = "daniel@lyte.dev";
|
||||
};
|
||||
legacy = {
|
||||
address = "wraithx2@gmail.com";
|
||||
};
|
||||
io = {
|
||||
# TODO: finalize deprecation
|
||||
address = "daniel@lytedev.io";
|
||||
};
|
||||
# TODO: may need to use a sops secret? put in another module?
|
||||
# work = {
|
||||
# address = "REDACTED";
|
||||
# };
|
||||
};
|
||||
|
||||
home = {
|
||||
username = "daniel";
|
||||
homeDirectory = "/home/daniel/.home";
|
||||
};
|
||||
|
||||
imports = with outputs.homeManagerModules; [
|
||||
common
|
||||
gnome
|
||||
senpai
|
||||
iex
|
||||
cargo
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,93 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkOption types mkIf;
|
||||
inherit (lib.strings) optionalString;
|
||||
cfg = config.services.deno-netlify-ddns-client;
|
||||
in {
|
||||
options.services.deno-netlify-ddns-client = {
|
||||
enable = mkEnableOption "Enable the deno-netlify-ddns client.";
|
||||
username = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
passwordFile = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
endpoint = mkOption {
|
||||
type = types.str;
|
||||
default = "https://netlify-ddns.deno.dev";
|
||||
};
|
||||
ipv4 = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
ipv6 = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
requestTimeout = mkOption {
|
||||
type = types.int;
|
||||
description = "The maximum number of seconds before the HTTP request times out.";
|
||||
default = 180;
|
||||
};
|
||||
afterBootTime = mkOption {
|
||||
type = types.str;
|
||||
description = "A systemd.timers timespan. This option corresponds to the OnBootSec field in the timerConfig.";
|
||||
default = "5m";
|
||||
};
|
||||
every = mkOption {
|
||||
type = types.str;
|
||||
description = "A systemd.timers timespan. This option corresponds to the OnUnitActiveSec field in the timerConfig.";
|
||||
default = "5m";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
systemd.timers.deno-netlify-ddns-client = {
|
||||
enable = mkIf cfg.enable true;
|
||||
after = ["network.target"];
|
||||
wantedBy = ["timers.target"];
|
||||
timerConfig = {
|
||||
OnBootSec = cfg.afterBootTime;
|
||||
OnUnitActiveSec = cfg.every;
|
||||
Unit = "deno-netlify-ddns-client.service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.deno-netlify-ddns-client = {
|
||||
enable = mkIf cfg.enable true;
|
||||
after = ["network.target"];
|
||||
script = ''
|
||||
set -eu
|
||||
password="$(cat "${cfg.passwordFile}")"
|
||||
${optionalString cfg.ipv4 ''
|
||||
"${pkgs.curl}/bin/curl" -4 -s \
|
||||
-vvv \
|
||||
-X POST \
|
||||
--max-time ${toString cfg.requestTimeout} \
|
||||
-u "${cfg.username}:''${password}" \
|
||||
-L "${cfg.endpoint}/v1/netlify-ddns/replace-all-relevant-user-dns-records" 2>&1 \
|
||||
| "${pkgs.sd}/bin/sd" --fixed-strings "''${password}" "[REDACTED]" \
|
||||
| "${pkgs.sd}/bin/sd" -f i "Authorization: .*" "Authorization: [REST OF LINE REDACTED]"
|
||||
''}
|
||||
${optionalString cfg.ipv6 ''
|
||||
${pkgs.curl}/bin/curl -6 -s \
|
||||
-vvv \
|
||||
-X POST \
|
||||
--max-time ${toString cfg.requestTimeout} \
|
||||
-u "${cfg.username}:''${password}" \
|
||||
-L "${cfg.endpoint}/v1/netlify-ddns/replace-all-relevant-user-dns-records" 2>&1 \
|
||||
| "${pkgs.sd}/bin/sd" --fixed-strings "''${password}" "[REDACTED]" \
|
||||
| "${pkgs.sd}/bin/sd" -f i "Authorization: .*" "Authorization: [REST OF LINE REDACTED]"
|
||||
''}
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "root";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
19
modules/nixos/desktop-usage.nix
Normal file
19
modules/nixos/desktop-usage.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
imports = [
|
||||
./sway.nix
|
||||
./hyprland.nix
|
||||
./fonts.nix
|
||||
./user-installed-applications.nix
|
||||
./kde-connect.nix
|
||||
./troubleshooting-tools.nix
|
||||
./development-tools.nix
|
||||
];
|
||||
|
||||
hardware = {
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
||||
driSupport = true;
|
||||
};
|
||||
};
|
||||
}
|
32
modules/nixos/development-tools.nix
Normal file
32
modules/nixos/development-tools.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{pkgs, ...}: {
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
# plugins = [
|
||||
# pkgs.vimPlugins.nvim-treesitter.withAllGrammars
|
||||
# ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
taplo # toml language server for editing helix configs per repo
|
||||
oil
|
||||
nushell
|
||||
watchexec
|
||||
android-tools
|
||||
kubectl
|
||||
vscode
|
||||
stern
|
||||
libresprite
|
||||
logseq
|
||||
audacity
|
||||
wol
|
||||
shellcheck
|
||||
shfmt
|
||||
vscode-langservers-extracted
|
||||
nodePackages.bash-language-server
|
||||
nodePackages.yaml-language-server
|
||||
xh
|
||||
jq
|
||||
curl
|
||||
];
|
||||
}
|
3
modules/nixos/ewwbar.nix
Normal file
3
modules/nixos/ewwbar.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
environment.systemPackages = [pkgs.eww];
|
||||
}
|
17
modules/nixos/flanfam.nix
Normal file
17
modules/nixos/flanfam.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{...}: {
|
||||
users.groups.flanfam = {};
|
||||
|
||||
users.users = {
|
||||
flanfam = {
|
||||
isNormalUser = true;
|
||||
home = "/home/flanfam";
|
||||
createHome = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"
|
||||
];
|
||||
group = "flanfam";
|
||||
extraGroups = ["users" "video"];
|
||||
packages = [];
|
||||
};
|
||||
};
|
||||
}
|
17
modules/nixos/flanfamkiosk.nix
Normal file
17
modules/nixos/flanfamkiosk.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{...}: {
|
||||
users.groups.flanfamkiosk = {};
|
||||
|
||||
users.users = {
|
||||
flanfamkiosk = {
|
||||
isNormalUser = true;
|
||||
home = "/home/flanfamkiosk";
|
||||
createHome = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"
|
||||
];
|
||||
group = "flanfamkiosk";
|
||||
extraGroups = ["users" "video"];
|
||||
packages = [];
|
||||
};
|
||||
};
|
||||
}
|
7
modules/nixos/fonts.nix
Normal file
7
modules/nixos/fonts.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{pkgs, ...}: {
|
||||
# fonts.packages if unstable?
|
||||
fonts.packages = with pkgs; [
|
||||
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
|
||||
pkgs.iosevka-lyteterm
|
||||
];
|
||||
}
|
|
@ -5,16 +5,10 @@
|
|||
}: {
|
||||
imports = [./pipewire.nix];
|
||||
|
||||
# mkForce is used liberally to take precedence over KDE Plasma
|
||||
# so I can have both "usable" at once
|
||||
|
||||
services.xserver.enable = lib.mkDefault true;
|
||||
services.xserver.displayManager.gdm = {
|
||||
enable = lib.mkForce true; # take precedence over KDE's SDDM
|
||||
enable = lib.mkDefault true;
|
||||
};
|
||||
services.displayManager.execCmd = lib.mkForce "exec ${pkgs.gnome.gdm}/bin/gdm";
|
||||
services.displayManager.defaultSession = lib.mkForce "gnome";
|
||||
programs.ssh.askPassword = "${pkgs.gnome.seahorse}/libexec/seahorse/ssh-askpass";
|
||||
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
|
@ -28,6 +22,12 @@
|
|||
'';
|
||||
};
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = "gnome3";
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
};
|
||||
|
@ -40,6 +40,7 @@
|
|||
|
||||
environment = {
|
||||
variables = {
|
||||
GTK_THEME = "Catppuccin-Mocha-Compact-Sapphire-Dark";
|
||||
VISUAL = "hx";
|
||||
PAGER = "less";
|
||||
MANPAGER = "less";
|
||||
|
@ -49,35 +50,36 @@
|
|||
gnome.gnome-power-manager
|
||||
brightnessctl
|
||||
feh
|
||||
# gimp
|
||||
grim
|
||||
# inkscape
|
||||
# krita
|
||||
libinput
|
||||
libinput-gestures
|
||||
libnotify
|
||||
# lutris
|
||||
# nil
|
||||
# nixpkgs-fmt
|
||||
noto-fonts
|
||||
pamixer
|
||||
# pavucontrol
|
||||
playerctl
|
||||
# pulseaudio
|
||||
pulsemixer
|
||||
# rclone
|
||||
# restic
|
||||
slurp
|
||||
# steam
|
||||
swaybg
|
||||
swayidle
|
||||
swaylock
|
||||
# vlc
|
||||
# vulkan-tools
|
||||
waybar
|
||||
# weechat
|
||||
# wine
|
||||
wl-clipboard
|
||||
zathura
|
||||
/*
|
||||
gimp
|
||||
inkscape
|
||||
krita
|
||||
pavucontrol
|
||||
pulseaudio
|
||||
rclone
|
||||
restic
|
||||
steam
|
||||
vlc
|
||||
vulkan-tools
|
||||
weechat
|
||||
wine
|
||||
*/
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
8
modules/nixos/hyprland.nix
Normal file
8
modules/nixos/hyprland.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./ewwbar.nix
|
||||
./pipewire.nix
|
||||
];
|
||||
programs.hyprland.enable = true;
|
||||
environment.systemPackages = with pkgs; [hyprpaper];
|
||||
}
|
25
modules/nixos/intel.nix
Normal file
25
modules/nixos/intel.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.config = {
|
||||
packageOverrides = pkgs: {
|
||||
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
|
||||
};
|
||||
};
|
||||
|
||||
hardware = {
|
||||
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
opengl = {
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
20
modules/nixos/kde-connect.nix
Normal file
20
modules/nixos/kde-connect.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
programs.kdeconnect = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
58
modules/nixos/kde-plasma.nix
Normal file
58
modules/nixos/kde-plasma.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [./pipewire.nix];
|
||||
|
||||
# qt.platformTheme = "gnome";
|
||||
|
||||
services.xserver.displayManager.defaultSession = "plasma";
|
||||
services.xserver.enable = lib.mkDefault true;
|
||||
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
# platformTheme = "gnome";
|
||||
# style = "adwaita-dark";
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
services.dbus.enable = true;
|
||||
|
||||
environment = {
|
||||
variables = {
|
||||
GTK_THEME = "Catppuccin-Mocha-Compact-Sapphire-Dark";
|
||||
VISUAL = "hx";
|
||||
PAGER = "less";
|
||||
MANPAGER = "less";
|
||||
};
|
||||
|
||||
systemPackages = with pkgs; [
|
||||
inkscape
|
||||
krita
|
||||
noto-fonts
|
||||
vlc
|
||||
wl-clipboard
|
||||
libsForQt5.kate
|
||||
libsForQt5.kdenlive
|
||||
libsForQt5.merkuro
|
||||
libsForQt5.kcalc
|
||||
libsForQt5.neochat
|
||||
libsForQt5.filelight
|
||||
libsForQt5.krdc
|
||||
libsForQt5.krfb
|
||||
libsForQt5.kclock
|
||||
libsForQt5.kweather
|
||||
libsForQt5.ktorrent
|
||||
libsForQt5.kdevelop
|
||||
libsForQt5.kdialog
|
||||
libsForQt5.kdeplasma-addons
|
||||
];
|
||||
};
|
||||
}
|
8
modules/nixos/lutris.nix
Normal file
8
modules/nixos/lutris.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{pkgs, ...}: {
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
wine
|
||||
lutris
|
||||
];
|
||||
};
|
||||
}
|
16
modules/nixos/melee.nix
Normal file
16
modules/nixos/melee.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{inputs, ...}: {
|
||||
imports = [
|
||||
{nixpkgs.overlays = [inputs.ssbm.overlay];}
|
||||
inputs.ssbm.nixosModules.default
|
||||
];
|
||||
|
||||
ssbm = {
|
||||
cache.enable = true;
|
||||
# overlay.enable = true;
|
||||
|
||||
gcc = {
|
||||
rules.enable = true;
|
||||
oc-kmod.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
16
modules/nixos/pipewire-low-latency.nix
Normal file
16
modules/nixos/pipewire-low-latency.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
services.pipewire.extraConfig = {
|
||||
# "pipewire/pipewire.conf.d/92-low-latency.conf".text = ''
|
||||
# context.properties = {
|
||||
# default.clock.rate = 48000
|
||||
# default.clock.quantum = 128
|
||||
# default.clock.min-quantum = 128
|
||||
# default.clock.max-quantum = 128
|
||||
# }
|
||||
|
||||
# jack.properties = {
|
||||
# node.latency = 128/48000
|
||||
# }
|
||||
# '';
|
||||
};
|
||||
}
|
29
modules/nixos/pipewire.nix
Normal file
29
modules/nixos/pipewire.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{...}: {
|
||||
sound.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
|
||||
wireplumber.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware = {
|
||||
pulseaudio = {
|
||||
enable = false;
|
||||
support32Bit = true;
|
||||
};
|
||||
};
|
||||
|
||||
security = {
|
||||
# I forget why I need these exactly...
|
||||
polkit.enable = true;
|
||||
rtkit.enable = true;
|
||||
};
|
||||
}
|
23
modules/nixos/podman.nix
Normal file
23
modules/nixos/podman.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{pkgs, ...}: {
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
podman-compose
|
||||
];
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
|
||||
# Create a `docker` alias for podman, to use it as a drop-in replacement
|
||||
dockerCompat = true;
|
||||
|
||||
# Required for containers under podman-compose to be able to talk to each other.
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
|
||||
oci-containers = {
|
||||
backend = "podman";
|
||||
};
|
||||
};
|
||||
}
|
39
modules/nixos/postgres.nix
Normal file
39
modules/nixos/postgres.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{pkgs, ...}: {
|
||||
# this is really just for development usage
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = ["daniel"];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "daniel";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
enableTCPIP = true;
|
||||
|
||||
package = pkgs.postgresql_15;
|
||||
|
||||
authentication = pkgs.lib.mkOverride 10 ''
|
||||
#type database DBuser auth-method
|
||||
local all postgres peer map=superuser_map
|
||||
local all daniel peer map=superuser_map
|
||||
local sameuser all peer map=superuser_map
|
||||
|
||||
# lan ipv4
|
||||
host all all 10.0.0.0/24 trust
|
||||
host all all 127.0.0.1/32 trust
|
||||
|
||||
# tailnet ipv4
|
||||
host all all 100.64.0.0/10 trust
|
||||
'';
|
||||
|
||||
identMap = ''
|
||||
# ArbitraryMapName systemUser DBUser
|
||||
superuser_map root postgres
|
||||
superuser_map postgres postgres
|
||||
superuser_map daniel postgres
|
||||
# Let other names login as themselves
|
||||
superuser_map /^(.*)$ \1
|
||||
'';
|
||||
};
|
||||
}
|
13
modules/nixos/printing.nix
Normal file
13
modules/nixos/printing.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{pkgs, ...}: {
|
||||
services.printing.enable = true;
|
||||
services.printing.browsing = true;
|
||||
services.printing.browsedConf = ''
|
||||
BrowseDNSSDSubTypes _cups,_print
|
||||
BrowseLocalProtocols all
|
||||
BrowseRemoteProtocols all
|
||||
CreateIPPPrinterQueues All
|
||||
|
||||
BrowseProtocols all
|
||||
'';
|
||||
services.printing.drivers = [pkgs.gutenprint];
|
||||
}
|
92
modules/nixos/sway.nix
Normal file
92
modules/nixos/sway.nix
Normal file
|
@ -0,0 +1,92 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./pipewire.nix
|
||||
];
|
||||
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
# settings = {
|
||||
# pinentry-program = "/run/current-system/sw/bin/pinentry";
|
||||
# };
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
];
|
||||
};
|
||||
|
||||
# I'm currently leaning Plasma since 6.0 released, so we use that pinentry
|
||||
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-qt;
|
||||
|
||||
services.dbus.enable = true;
|
||||
|
||||
programs.thunar = {
|
||||
enable = true;
|
||||
plugins = with pkgs.xfce; [thunar-archive-plugin thunar-volman];
|
||||
};
|
||||
|
||||
services.gvfs = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
environment = {
|
||||
variables = {
|
||||
GTK_THEME = "Catppuccin-Mocha-Compact-Sapphire-Dark";
|
||||
VISUAL = "hx";
|
||||
PAGER = "less";
|
||||
MANPAGER = "less";
|
||||
};
|
||||
|
||||
systemPackages = with pkgs; [
|
||||
brightnessctl
|
||||
feh
|
||||
# gimp
|
||||
grim
|
||||
# inkscape
|
||||
# krita
|
||||
libinput
|
||||
libinput-gestures
|
||||
libnotify
|
||||
mako
|
||||
# lutris
|
||||
# nil
|
||||
# nixpkgs-fmt
|
||||
noto-fonts
|
||||
pamixer
|
||||
# pavucontrol
|
||||
playerctl
|
||||
pulseaudio
|
||||
pulsemixer
|
||||
# rclone
|
||||
# restic
|
||||
slurp
|
||||
# steam
|
||||
swaybg
|
||||
swayidle
|
||||
swaylock
|
||||
swayosd
|
||||
tofi
|
||||
# vlc
|
||||
# vulkan-tools
|
||||
waybar
|
||||
# weechat
|
||||
# wine
|
||||
wl-clipboard
|
||||
zathura
|
||||
];
|
||||
};
|
||||
}
|
11
modules/nixos/troubleshooting-tools.nix
Normal file
11
modules/nixos/troubleshooting-tools.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
pciutils
|
||||
usbutils
|
||||
htop
|
||||
bottom
|
||||
nmap
|
||||
dogdns
|
||||
dnsutils
|
||||
];
|
||||
}
|
14
modules/nixos/user-installed-applications.nix
Normal file
14
modules/nixos/user-installed-applications.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{pkgs, ...}: {
|
||||
# enable flatpaks
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# enable appimages
|
||||
boot.binfmt.registrations.appimage = {
|
||||
wrapInterpreterInShell = false;
|
||||
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
|
||||
recognitionType = "magic";
|
||||
offset = 0;
|
||||
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
|
||||
magicOrExtension = ''\x7fELF....AI\x02'';
|
||||
};
|
||||
}
|
10
modules/nixos/wifi.nix
Normal file
10
modules/nixos/wifi.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkDefault;
|
||||
in {
|
||||
networking.networkmanager.enable = mkDefault true;
|
||||
systemd.services.NetworkManager-wait-online.enable = mkDefault false;
|
||||
|
||||
# TODO: networking.networkmanager.wifi.backend = "iwd"; ?
|
||||
# TODO: powersave?
|
||||
# TODO: can I pre-configure my usual wifi networks with SSIDs and PSKs loaded from secrets?
|
||||
}
|
2048
nixos/beefcake.nix
2048
nixos/beefcake.nix
File diff suppressed because it is too large
Load diff
|
@ -1,137 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
{
|
||||
system.stateVersion = "24.05";
|
||||
home-manager.users.daniel.home.stateVersion = "24.05";
|
||||
networking.hostName = "bigtower";
|
||||
}
|
||||
];
|
||||
hardware.graphics.extraPackages = [
|
||||
# pkgs.rocmPackages.clr.icd
|
||||
pkgs.amdvlk
|
||||
|
||||
# encoding/decoding acceleration
|
||||
pkgs.libvdpau-va-gl
|
||||
pkgs.vaapiVdpau
|
||||
];
|
||||
|
||||
boot = {
|
||||
# kernelPackages = pkgs.linuxPackages_zen;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
loader.systemd-boot.enable = true;
|
||||
initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci" "usbhid"];
|
||||
kernelModules = ["kvm-amd"];
|
||||
supportedFilesystems = ["ntfs"];
|
||||
};
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
# package = pkgs.bluez;
|
||||
settings = {
|
||||
General = {
|
||||
AutoConnect = true;
|
||||
MultiProfile = "multiple";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
networking = {
|
||||
firewall = let
|
||||
terraria = 7777;
|
||||
stardew-valley = 24642;
|
||||
web-dev-lan = 18888;
|
||||
ports = [
|
||||
terraria
|
||||
stardew-valley
|
||||
web-dev-lan
|
||||
];
|
||||
in {
|
||||
allowedTCPPorts = ports;
|
||||
allowedUDPPorts = ports;
|
||||
};
|
||||
};
|
||||
*/
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
radeontop
|
||||
# godot_4
|
||||
prismlauncher
|
||||
];
|
||||
|
||||
home-manager.users.daniel = {
|
||||
/*
|
||||
slippi-launcher = {
|
||||
enable = true;
|
||||
# isoPath = "${config.home-manager.users.daniel.home.homeDirectory}/../games/roms/dolphin/melee.iso";
|
||||
launchMeleeOnPlay = false;
|
||||
};
|
||||
*/
|
||||
|
||||
# TODO: monitor config module?
|
||||
/*
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
env = [
|
||||
"EWW_BAR_MON,1"
|
||||
];
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
monitor = [
|
||||
# "DP-2,3840x2160@60,-2160x0,1,transform,3"
|
||||
"DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1"
|
||||
## HDR breaks screenshare? "DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1,bitdepth,10"
|
||||
## "desc:LG Display 0x0521,3840x2160@120,0x0,1"
|
||||
## "desc:Dell Inc. DELL U2720Q D3TM623,3840x2160@60,3840x0,1.5,transform,1"
|
||||
"DP-2,3840x2160@60,0x0,1.5,transform,1"
|
||||
];
|
||||
input = {
|
||||
force_no_accel = true;
|
||||
sensitivity = 1; # -1.0 - 1.0, 0 means no modification.
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
config = {
|
||||
output = {
|
||||
"GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307" = {
|
||||
mode = "3840x2160@120Hz";
|
||||
position = "${toString (builtins.ceil (2160 / 1.5))},0";
|
||||
};
|
||||
|
||||
"Dell Inc. DELL U2720Q D3TM623" = {
|
||||
# desktop left vertical monitor
|
||||
mode = "3840x2160@60Hz";
|
||||
transform = "90";
|
||||
scale = "1.5";
|
||||
position = "0,0";
|
||||
};
|
||||
};
|
||||
|
||||
workspaceOutputAssign =
|
||||
(
|
||||
map
|
||||
(ws: {
|
||||
output = "GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307";
|
||||
workspace = toString ws;
|
||||
})
|
||||
(lib.range 1 7)
|
||||
)
|
||||
++ (
|
||||
map
|
||||
(ws: {
|
||||
output = "Dell Inc. DELL U2720Q D3TM623";
|
||||
workspace = toString ws;
|
||||
})
|
||||
(lib.range 8 9)
|
||||
);
|
||||
};
|
||||
};
|
||||
*/
|
||||
};
|
||||
}
|
42
nixos/default.nix
Normal file
42
nixos/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
base = {
|
||||
system = "x86_64-linux";
|
||||
modules = [./base.nix];
|
||||
};
|
||||
beefcake = {
|
||||
system = "x86_64-linux";
|
||||
modules = [./beefcake.nix];
|
||||
};
|
||||
dragon = {
|
||||
system = "x86_64-linux";
|
||||
modules = [./dragon.nix];
|
||||
};
|
||||
foxtrot = {
|
||||
system = "x86_64-linux";
|
||||
modules = [./foxtrot.nix];
|
||||
};
|
||||
musicbox = {
|
||||
system = "x86_64-linux";
|
||||
modules = [./musicbox.nix];
|
||||
};
|
||||
rascal = {
|
||||
system = "x86_64-linux";
|
||||
modules = [./rascal.nix];
|
||||
};
|
||||
router = {
|
||||
system = "x86_64-linux";
|
||||
modules = [./router.nix];
|
||||
};
|
||||
thablet = {
|
||||
system = "x86_64-linux";
|
||||
modules = [./thablet.nix];
|
||||
};
|
||||
thinker = {
|
||||
system = "x86_64-linux";
|
||||
modules = [./thinker.nix];
|
||||
};
|
||||
# htpifour = {
|
||||
# system = "aarch64-linux";
|
||||
# modules = [./htpifour.nix];
|
||||
# };
|
||||
}
|
196
nixos/dragon.nix
196
nixos/dragon.nix
|
@ -1,138 +1,90 @@
|
|||
{
|
||||
pkgs,
|
||||
# config,
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
{
|
||||
system.stateVersion = "24.11";
|
||||
home-manager.users.daniel.home.stateVersion = "24.05";
|
||||
networking.hostName = "dragon";
|
||||
}
|
||||
|
||||
{
|
||||
# sops secrets config
|
||||
sops = {
|
||||
defaultSopsFile = ../secrets/dragon/secrets.yml;
|
||||
age = {
|
||||
sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||
keyFile = "/var/lib/sops-nix/key.txt";
|
||||
generateKey = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
sops.secrets = {
|
||||
ddns-pass = {mode = "0400";};
|
||||
};
|
||||
services.deno-netlify-ddns-client = {
|
||||
passwordFile = config.sops.secrets.ddns-pass.path;
|
||||
};
|
||||
}
|
||||
];
|
||||
hardware.amdgpu = {
|
||||
amdvlk = {
|
||||
enable = true;
|
||||
support32Bit = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
hardware.graphics.extraPackages = [
|
||||
# pkgs.rocmPackages.clr.icd
|
||||
pkgs.amdvlk
|
||||
# support interacting with the windows drive
|
||||
boot.supportedFilesystems = ["ntfs"];
|
||||
|
||||
# encoding/decoding acceleration
|
||||
pkgs.libvdpau-va-gl
|
||||
pkgs.vaapiVdpau
|
||||
imports = with outputs.nixosModules; [
|
||||
outputs.diskoConfigurations.standard
|
||||
inputs.hardware.nixosModules.common-cpu-amd
|
||||
inputs.hardware.nixosModules.common-pc-ssd
|
||||
outputs.nixosModules.pipewire-low-latency
|
||||
|
||||
desktop-usage
|
||||
podman
|
||||
kde-plasma
|
||||
postgres
|
||||
wifi
|
||||
hyprland
|
||||
printing
|
||||
ewwbar
|
||||
melee
|
||||
lutris
|
||||
];
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
loader.systemd-boot.enable = true;
|
||||
initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci" "usbhid"];
|
||||
kernelModules = ["kvm-amd"];
|
||||
supportedFilesystems = ["ntfs"];
|
||||
};
|
||||
|
||||
hardware.bluetooth = {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
# package = pkgs.bluez;
|
||||
settings = {
|
||||
General = {
|
||||
AutoConnect = true;
|
||||
MultiProfile = "multiple";
|
||||
};
|
||||
};
|
||||
};
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
|
||||
# dragon firewall
|
||||
# TODO: maybe should go in the gaming module?
|
||||
networking = {
|
||||
firewall = let
|
||||
terraria = 7777;
|
||||
stardew-valley = 24642;
|
||||
web-dev-lan = 18888;
|
||||
ports = [
|
||||
terraria
|
||||
stardew-valley
|
||||
web-dev-lan
|
||||
];
|
||||
in {
|
||||
allowedTCPPorts = ports;
|
||||
allowedUDPPorts = ports;
|
||||
};
|
||||
remotePlay.openFirewall = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
spotify
|
||||
discord
|
||||
radeontop
|
||||
slack
|
||||
godot_4
|
||||
fractal
|
||||
prismlauncher
|
||||
# variety
|
||||
radeontop
|
||||
sops
|
||||
obs-studio
|
||||
xh
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.daniel = {
|
||||
slippi-launcher = {
|
||||
enable = true;
|
||||
isoPath = "${config.home-manager.users.daniel.home.homeDirectory}/../games/roms/dolphin/melee.iso";
|
||||
launchMeleeOnPlay = false;
|
||||
};
|
||||
imports = with outputs.homeManagerModules; [
|
||||
sway
|
||||
pass
|
||||
firefox-no-tabs
|
||||
# wallpaper-manager
|
||||
melee
|
||||
hyprland
|
||||
];
|
||||
|
||||
# ssbm = {
|
||||
# slippi-launcher = {
|
||||
# isoPath = "${config.home-manager.users.daniel.home.homeDirectory}/../games/roms/dolphin/melee.iso";
|
||||
# };
|
||||
# };
|
||||
|
||||
# TODO: monitor config module?
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
exec-once = [
|
||||
"eww open bar1"
|
||||
env = [
|
||||
"EWW_BAR_MON,1"
|
||||
];
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
monitor = [
|
||||
# "DP-2,3840x2160@60,-2160x0,1,transform,3"
|
||||
"DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1"
|
||||
# TODO: HDR breaks screenshare?
|
||||
/*
|
||||
"DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1,bitdepth,10"
|
||||
"desc:LG Display 0x0521,3840x2160@120,0x0,1"
|
||||
"desc:Dell Inc. DELL U2720Q D3TM623,3840x2160@60,3840x0,1.5,transform,1"
|
||||
*/
|
||||
"DP-1,3840x2160@60,0x0,1.5,transform,1"
|
||||
"DP-3,3840x2160@120,0x0,1,bitdepth,10"
|
||||
# "desc:LG Display 0x0521,3840x2160@120,0x0,1"
|
||||
# "desc:Dell Inc. DELL U2720Q D3TM623,3840x2160@60,3840x0,1.5,transform,1"
|
||||
"DP-2,3840x2160@60,-${toString (builtins.ceil (2160 / 1.5))}x0,1.5,transform,1"
|
||||
];
|
||||
input = {
|
||||
force_no_accel = true;
|
||||
sensitivity = 1; # -1.0 - 1.0, 0 means no modification.
|
||||
};
|
||||
workspace = [
|
||||
"1, monitor:DP-3, default:true"
|
||||
"2, monitor:DP-3, default:false"
|
||||
"3, monitor:DP-3, default:false"
|
||||
"4, monitor:DP-3, default:false"
|
||||
"5, monitor:DP-3, default:false"
|
||||
"6, monitor:DP-3, default:false"
|
||||
"7, monitor:DP-3, default:false"
|
||||
"8, monitor:DP-1, default:true"
|
||||
"9, monitor:DP-1, default:false"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -147,7 +99,7 @@
|
|||
"Dell Inc. DELL U2720Q D3TM623" = {
|
||||
# desktop left vertical monitor
|
||||
mode = "3840x2160@60Hz";
|
||||
transform = "270";
|
||||
transform = "90";
|
||||
scale = "1.5";
|
||||
position = "0,0";
|
||||
};
|
||||
|
@ -173,4 +125,36 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
# TODO: https://nixos.wiki/wiki/Remote_LUKS_Unlocking
|
||||
|
||||
# hardware
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci"];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowPing = true;
|
||||
allowedTCPPorts = [22 7777];
|
||||
allowedUDPPorts = [];
|
||||
};
|
||||
};
|
||||
|
||||
services.udev.packages = [
|
||||
pkgs.platformio
|
||||
pkgs.openocd
|
||||
];
|
||||
programs.adb.enable = true;
|
||||
users.users.daniel.extraGroups = ["adbusers"];
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"x86_64-linux": {
|
||||
"headless": {
|
||||
"stable": {
|
||||
"name": "factorio_headless_x64-2.0.15.tar.xz",
|
||||
"needsAuth": false,
|
||||
"sha256": "cLRBy4B4EaYFhsARBySMHY164EO9HyNnX8kk+6qlONg=",
|
||||
"tarDirectory": "x64",
|
||||
"url": "https://factorio.com/get-download/2.0.15/headless/linux64",
|
||||
"version": "2.0.15"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,272 +1,82 @@
|
|||
{pkgs, ...}:
|
||||
/*
|
||||
## source: https://community.frame.work/t/speakers-sound-quality/1078/82
|
||||
let
|
||||
pipewire-speakers-profile-json = ''{
|
||||
"output": {
|
||||
"blocklist": [],
|
||||
"equalizer": {
|
||||
"balance": 0.0,
|
||||
"bypass": false,
|
||||
"input-gain": 0.0,
|
||||
"left": {
|
||||
"band0": {
|
||||
"frequency": 100.0,
|
||||
"gain": 0.0,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 1.0,
|
||||
"slope": "x4",
|
||||
"solo": false,
|
||||
"type": "Hi-pass"
|
||||
},
|
||||
"band1": {
|
||||
"frequency": 150.0,
|
||||
"gain": 4.02,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 3.0,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band2": {
|
||||
"frequency": 600.0,
|
||||
"gain": -5.07,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.000000000000008,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band3": {
|
||||
"frequency": 1200.0,
|
||||
"gain": -3.49,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.17,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band4": {
|
||||
"frequency": 2000.0,
|
||||
"gain": 1.43,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.0,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band5": {
|
||||
"frequency": 5300.0,
|
||||
"gain": 3.84,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 2.64,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band6": {
|
||||
"frequency": 6000.0,
|
||||
"gain": 4.02,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Hi-shelf"
|
||||
},
|
||||
"band7": {
|
||||
"frequency": 7500.0,
|
||||
"gain": -2.09,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 3.0,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band8": {
|
||||
"frequency": 8000.0,
|
||||
"gain": 2.01,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band9": {
|
||||
"frequency": 900.0,
|
||||
"gain": -4.12,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 5.909999999999967,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
}
|
||||
},
|
||||
"mode": "IIR",
|
||||
"num-bands": 10,
|
||||
"output-gain": -1.5,
|
||||
"pitch-left": 0.0,
|
||||
"pitch-right": 0.0,
|
||||
"right": {
|
||||
"band0": {
|
||||
"frequency": 100.0,
|
||||
"gain": 0.0,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 1.0,
|
||||
"slope": "x4",
|
||||
"solo": false,
|
||||
"type": "Hi-pass"
|
||||
},
|
||||
"band1": {
|
||||
"frequency": 150.0,
|
||||
"gain": 4.02,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 3.0,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band2": {
|
||||
"frequency": 600.0,
|
||||
"gain": -5.07,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.000000000000008,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band3": {
|
||||
"frequency": 1200.0,
|
||||
"gain": -3.49,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.17,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band4": {
|
||||
"frequency": 2000.0,
|
||||
"gain": 1.43,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.0,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band5": {
|
||||
"frequency": 5300.0,
|
||||
"gain": 3.84,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 2.64,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band6": {
|
||||
"frequency": 6000.0,
|
||||
"gain": 4.02,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Hi-shelf"
|
||||
},
|
||||
"band7": {
|
||||
"frequency": 7500.0,
|
||||
"gain": -2.09,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 3.0,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band8": {
|
||||
"frequency": 8000.0,
|
||||
"gain": 2.01,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band9": {
|
||||
"frequency": 900.0,
|
||||
"gain": -4.12,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 5.909999999999967,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
}
|
||||
},
|
||||
"split-channels": false
|
||||
},
|
||||
"loudness": {
|
||||
"bypass": false,
|
||||
"clipping": false,
|
||||
"clipping-range": 6.0,
|
||||
"fft": "4096",
|
||||
"input-gain": 0.0,
|
||||
"output-gain": 0.0,
|
||||
"std": "ISO226-2003",
|
||||
"volume": 6.999999999999991
|
||||
},
|
||||
"plugins_order": [
|
||||
"loudness",
|
||||
"equalizer"
|
||||
]
|
||||
}
|
||||
}'';
|
||||
in
|
||||
*/
|
||||
{
|
||||
imports = [
|
||||
{
|
||||
system.stateVersion = "24.05";
|
||||
home-manager.users.daniel.home.stateVersion = "24.05";
|
||||
# lib,
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
scale = 1.333333;
|
||||
in {
|
||||
networking.hostName = "foxtrot";
|
||||
|
||||
imports = with outputs.nixosModules; [
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
outputs.overlays.modifications
|
||||
];
|
||||
}
|
||||
outputs.diskoConfigurations.standard
|
||||
inputs.hardware.nixosModules.framework-13-7040-amd
|
||||
desktop-usage
|
||||
# gnome
|
||||
printing
|
||||
# kde-plasma
|
||||
podman
|
||||
lutris
|
||||
# postgres
|
||||
wifi
|
||||
hyprland
|
||||
{
|
||||
programs.steam.enable = true;
|
||||
programs.steam.gamescopeSession.enable = true;
|
||||
# programs.steam.package = inputs.nixpkgs-stable.legacyPackages.${pkgs.system}.steam;
|
||||
programs.steam.remotePlay.openFirewall = true;
|
||||
services.udev.packages = with pkgs; [steam];
|
||||
}
|
||||
{
|
||||
# laptop power management
|
||||
services.upower.enable = true;
|
||||
swapDevices = [
|
||||
# TODO: move this to disko?
|
||||
# NOTE(oninstall):
|
||||
/*
|
||||
sudo btrfs subvolume create /swap
|
||||
sudo btrfs filesystem mkswapfile --size 32g --uuid clear /swap/swapfile
|
||||
sudo swapon /swap/swapfile
|
||||
*/
|
||||
# sudo btrfs subvolume create /swap
|
||||
# sudo btrfs filesystem mkswapfile --size 32g --uuid clear /swap/swapfile
|
||||
# sudo swapon /swap/swapfile
|
||||
{device = "/swap/swapfile";}
|
||||
];
|
||||
# findmnt -no UUID -T /swap/swapfile
|
||||
boot.resumeDevice = "/dev/disk/by-uuid/81c3354a-f629-4b6b-a249-7705aeb9f0d5";
|
||||
# systemd.sleep.extraConfig = "HibernateDelaySec=180m";
|
||||
systemd.sleep.extraConfig = "HibernateDelaySec=30m";
|
||||
services.fwupd.enable = true;
|
||||
# source: https://github.com/NixOS/nixos-hardware/tree/master/framework/13-inch/7040-amd#getting-the-fingerprint-sensor-to-work
|
||||
# we need fwupd 1.9.7 to downgrade the fingerprint sensor firmware
|
||||
# services.fwupd.package =
|
||||
# (import (builtins.fetchTarball {
|
||||
# url = "https://github.com/NixOS/nixpkgs/archive/bb2009ca185d97813e75736c2b8d1d8bb81bde05.tar.gz";
|
||||
# sha256 = "sha256:003qcrsq5g5lggfrpq31gcvj82lb065xvr7bpfa8ddsw8x4dnysk";
|
||||
# }) {
|
||||
# inherit (pkgs) system;
|
||||
# })
|
||||
# .fwupd;
|
||||
services.fwupd.extraRemotes = ["lvfs-testing"];
|
||||
services.logind = {
|
||||
lidSwitch = "suspend-then-hibernate";
|
||||
# HandleLidSwitchDocked=ignore
|
||||
extraConfig = ''
|
||||
HandlePowerKey=suspend-then-hibernate
|
||||
IdleActionSec=10m
|
||||
IdleAction=suspend-then-hibernate
|
||||
'';
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
easyeffects
|
||||
steam
|
||||
spotify
|
||||
discord
|
||||
slack
|
||||
godot_4
|
||||
fractal
|
||||
prismlauncher
|
||||
|
@ -275,47 +85,31 @@ in
|
|||
prismlauncher
|
||||
radeontop
|
||||
sops
|
||||
obs-studio
|
||||
xh
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.daniel = {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
sway
|
||||
pass
|
||||
firefox-no-tabs
|
||||
# wallpaper-manager
|
||||
hyprland
|
||||
];
|
||||
home = {
|
||||
stateVersion = "24.05";
|
||||
pointerCursor = {
|
||||
size = 40;
|
||||
};
|
||||
};
|
||||
|
||||
services.easyeffects = {
|
||||
enable = true;
|
||||
preset = "philonmetal";
|
||||
# clone from https://github.com/ceiphr/ee-framework-presets
|
||||
# then `cp *.json ~/.config/easyeffects/output`
|
||||
# TODO: nixify this
|
||||
};
|
||||
|
||||
services.hypridle = let
|
||||
secondsPerMinute = 60;
|
||||
lockSeconds = 10 * secondsPerMinute;
|
||||
in {
|
||||
settings = {
|
||||
listener = [
|
||||
{
|
||||
timeout = lockSeconds + 55;
|
||||
on-timeout = ''systemctl suspend'';
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
exec-once = [
|
||||
"eww open bar0"
|
||||
];
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
monitor = [
|
||||
"eDP-1,2880x1920@120Hz,0x0,1.66667"
|
||||
"eDP-1,2256x1504@60,0x0,${toString scale}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -323,19 +117,6 @@ in
|
|||
wayland.windowManager.sway = {
|
||||
config = {
|
||||
output = {
|
||||
"BOE NE135A1M-NY1 Unknown" = {
|
||||
mode = "2880x1920@120Hz";
|
||||
position = "1092,2160";
|
||||
scale = toString (5 / 3);
|
||||
};
|
||||
|
||||
"Dell Inc. DELL U2720Q CWTM623" = {
|
||||
mode = "3840x2160@60Hz";
|
||||
position = "0,0";
|
||||
scale = toString 1.25;
|
||||
};
|
||||
|
||||
/*
|
||||
"BOE 0x0BCA Unknown" = {
|
||||
mode = "2256x1504@60Hz";
|
||||
position = "0,0";
|
||||
|
@ -349,13 +130,12 @@ in
|
|||
# scale = "1.5";
|
||||
position = "${toString (builtins.floor (2256 / scale))},0";
|
||||
};
|
||||
*/
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hardware.graphics.extraPackages = [
|
||||
hardware.opengl.extraPackages = [
|
||||
# pkgs.rocmPackages.clr.icd
|
||||
pkgs.amdvlk
|
||||
|
||||
|
@ -364,34 +144,13 @@ in
|
|||
pkgs.vaapiVdpau
|
||||
];
|
||||
|
||||
hardware.amdgpu = {
|
||||
amdvlk = {
|
||||
enable = true;
|
||||
support32Bit = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.networkmanager.wifi.powersave = false;
|
||||
hardware.wirelessRegulatoryDatabase = true;
|
||||
|
||||
hardware.framework.amd-7040.preventWakeOnAC = true;
|
||||
|
||||
boot = {
|
||||
# kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# https://github.com/void-linux/void-packages/issues/50417#issuecomment-2131802836 fix framework 13 not shutting down
|
||||
/*
|
||||
kernelPatches = [
|
||||
{
|
||||
name = "framework13shutdownfix";
|
||||
patch = builtins.fetchurl {
|
||||
url = "https://github.com/void-linux/void-packages/files/15445612/0001-Add-hopefully-a-solution-for-shutdown-regression.PATCH";
|
||||
sha256 = "sha256:10zcnzy5hkam2cnxx441b978gzhvnqlcc49k7bpz9dc28xyjik50";
|
||||
};
|
||||
}
|
||||
];
|
||||
*/
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
|
@ -399,12 +158,11 @@ in
|
|||
};
|
||||
|
||||
# NOTE(oninstall):
|
||||
/*
|
||||
sudo filefrag -v /swap/swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}'
|
||||
the above won't work for btrfs, instead you need btrfs inspect-internal map-swapfile -r /swap/swapfile
|
||||
https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
|
||||
many of these come from https://wiki.archlinux.org/title/Framework_Laptop_13#Suspend
|
||||
*/
|
||||
# sudo filefrag -v /swap/swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}'
|
||||
# the above won't work for btrfs, instead you need
|
||||
# btrfs inspect-internal map-swapfile -r /swap/swapfile
|
||||
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
|
||||
# many of these come from https://wiki.archlinux.org/title/Framework_Laptop_13#Suspend
|
||||
kernelParams = [
|
||||
"rtc_cmos.use_acpi_alarm=1"
|
||||
"amdgpu.sg_display=0"
|
||||
|
@ -417,41 +175,24 @@ in
|
|||
];
|
||||
initrd.availableKernelModules = ["xhci_pci" "nvme" "thunderbolt"];
|
||||
kernelModules = ["kvm-amd"];
|
||||
extraModprobeConfig = ''
|
||||
options cfg80211 ieee80211_regdom="US"
|
||||
'';
|
||||
};
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
# TODO: when resuming from hibernation, it would be nice if this would
|
||||
# simply resume the power state at the time of hibernation
|
||||
powerOnBoot = false;
|
||||
|
||||
package = pkgs.bluez.overrideAttrs (finalAttrs: previousAttrs: rec {
|
||||
version = "5.78";
|
||||
src = pkgs.fetchurl {
|
||||
url = "mirror://kernel/linux/bluetooth/bluez-${version}.tar.xz";
|
||||
sha256 = "sha256-gw/tGRXF03W43g9eb0X83qDcxf9f+z0x227Q8A1zxeM=";
|
||||
};
|
||||
patches = [];
|
||||
buildInputs =
|
||||
previousAttrs.buildInputs
|
||||
++ [
|
||||
pkgs.python3Packages.pygments
|
||||
];
|
||||
});
|
||||
};
|
||||
powerManagement.cpuFreqGovernor = "ondemand";
|
||||
/*
|
||||
powerManagement.resumeCommands = ''
|
||||
modprobe -rv mt7921e
|
||||
modprobe -v mt7921e
|
||||
'';
|
||||
*/
|
||||
|
||||
services.power-profiles-daemon = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.fprintd = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
package = pkgs.fprintd.overrideAttrs {
|
||||
# Source: https://github.com/NixOS/nixpkgs/commit/87ca2dc071581aea0e691c730d6844f1beb07c9f
|
||||
mesonCheckFlags = [
|
||||
|
@ -460,41 +201,28 @@ in
|
|||
"fprintd:TestPamFprintd"
|
||||
];
|
||||
};
|
||||
# tod.enable = true;
|
||||
# tod.driver = pkgs.libfprint-2-tod1-goodix;
|
||||
};
|
||||
|
||||
/*
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "ondemand";
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 80;
|
||||
# services.tlp = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
# CPU_SCALING_GOVERNOR_ON_BAT = "ondemand";
|
||||
# CPU_MIN_PERF_ON_BAT = 0;
|
||||
# CPU_MAX_PERF_ON_BAT = 80;
|
||||
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
CPU_MIN_PERF_ON_AC = 0;
|
||||
CPU_MAX_PERF_ON_AC = 100;
|
||||
};
|
||||
};
|
||||
*/
|
||||
# CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
# CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
# CPU_MIN_PERF_ON_AC = 0;
|
||||
# CPU_MAX_PERF_ON_AC = 100;
|
||||
# };
|
||||
# };
|
||||
|
||||
networking.firewall.allowedTCPPorts = let
|
||||
stardewValley = 24642;
|
||||
factorio = 34197;
|
||||
in [
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
8000 # dev stuff
|
||||
factorio
|
||||
stardewValley
|
||||
7777
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = let
|
||||
stardewValley = 24642;
|
||||
factorio = 34197;
|
||||
in [
|
||||
8000 # dev stuff
|
||||
factorio
|
||||
stardewValley
|
||||
7777
|
||||
];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
networking.hostName = "htpc";
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
boot.loader.grub.useOSProber = true;
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = ["8821au" "8812au"];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [
|
||||
# pkgs.rtl8811au
|
||||
config.boot.kernelPackages.rtl8812au
|
||||
config.boot.kernelPackages.rtl8821au
|
||||
];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/86d8ded0-1c6f-4a79-901c-2d59c11b5ca8";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
# package = pkgs.bluez;
|
||||
settings = {
|
||||
General = {
|
||||
AutoConnect = true;
|
||||
MultiProfile = "multiple";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
|
@ -58,19 +58,15 @@
|
|||
hardware.raspberry-pi."4".audio.enable = true;
|
||||
|
||||
nixpkgs.overlays = [
|
||||
/*
|
||||
nixos-22.05
|
||||
(self: super: { libcec = super.libcec.override { inherit (self) libraspberrypi; }; })
|
||||
nixos-22.11
|
||||
(self: super: {libcec = super.libcec.override {withLibraspberrypi = true;};})
|
||||
*/
|
||||
# nixos-22.05
|
||||
# (self: super: { libcec = super.libcec.override { inherit (self) libraspberrypi; }; })
|
||||
# nixos-22.11
|
||||
# (self: super: {libcec = super.libcec.override {withLibraspberrypi = true;};})
|
||||
];
|
||||
|
||||
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
|
||||
/*
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
systemd.services."autovt@tty1".enable = false;
|
||||
*/
|
||||
# systemd.services."getty@tty1".enable = false;
|
||||
# systemd.services."autovt@tty1".enable = false;
|
||||
|
||||
# hardware
|
||||
systemd.targets.sleep.enable = false;
|
||||
|
@ -103,42 +99,40 @@
|
|||
};
|
||||
};
|
||||
|
||||
/*
|
||||
services.udev.extraRules = ''
|
||||
# allow access to raspi cec device for video group (and optionally register it as a systemd device, used below)
|
||||
SUBSYSTEM=="vchiq", GROUP="video", MODE="0660", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/dev/vchiq"
|
||||
'';
|
||||
# services.udev.extraRules = ''
|
||||
# # allow access to raspi cec device for video group (and optionally register it as a systemd device, used below)
|
||||
# SUBSYSTEM=="vchiq", GROUP="video", MODE="0660", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/dev/vchiq"
|
||||
# '';
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
# powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
|
||||
optional: attach a persisted cec-client to `/run/cec.fifo`, to avoid the CEC ~1s startup delay per command
|
||||
scan for devices: `echo 'scan' > /run/cec.fifo ; journalctl -u cec-client.service`
|
||||
set pi as active source: `echo 'as' > /run/cec.fifo`
|
||||
systemd.sockets."cec-client" = {
|
||||
after = ["dev-vchiq.device"];
|
||||
bindsTo = ["dev-vchiq.device"];
|
||||
wantedBy = ["sockets.target"];
|
||||
socketConfig = {
|
||||
ListenFIFO = "/run/cec.fifo";
|
||||
SocketGroup = "video";
|
||||
SocketMode = "0660";
|
||||
};
|
||||
};
|
||||
systemd.services."cec-client" = {
|
||||
after = ["dev-vchiq.device"];
|
||||
bindsTo = ["dev-vchiq.device"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig = {
|
||||
ExecStart = ''${pkgs.libcec}/bin/cec-client -d 1'';
|
||||
ExecStop = ''/bin/sh -c "echo q > /run/cec.fifo"'';
|
||||
StandardInput = "socket";
|
||||
StandardOutput = "journal";
|
||||
Restart = "no";
|
||||
};
|
||||
};
|
||||
*/
|
||||
# optional: attach a persisted cec-client to `/run/cec.fifo`, to avoid the CEC ~1s startup delay per command
|
||||
# scan for devices: `echo 'scan' > /run/cec.fifo ; journalctl -u cec-client.service`
|
||||
# set pi as active source: `echo 'as' > /run/cec.fifo`
|
||||
# systemd.sockets."cec-client" = {
|
||||
# after = ["dev-vchiq.device"];
|
||||
# bindsTo = ["dev-vchiq.device"];
|
||||
# wantedBy = ["sockets.target"];
|
||||
# socketConfig = {
|
||||
# ListenFIFO = "/run/cec.fifo";
|
||||
# SocketGroup = "video";
|
||||
# SocketMode = "0660";
|
||||
# };
|
||||
# };
|
||||
# systemd.services."cec-client" = {
|
||||
# after = ["dev-vchiq.device"];
|
||||
# bindsTo = ["dev-vchiq.device"];
|
||||
# wantedBy = ["multi-user.target"];
|
||||
# serviceConfig = {
|
||||
# ExecStart = ''${pkgs.libcec}/bin/cec-client -d 1'';
|
||||
# ExecStop = ''/bin/sh -c "echo q > /run/cec.fifo"'';
|
||||
# StandardInput = "socket";
|
||||
# StandardOutput = "journal";
|
||||
# Restart = "no";
|
||||
# };
|
||||
# };
|
||||
|
||||
hardware.graphics.driSupport32Bit = lib.mkForce false;
|
||||
hardware.opengl.driSupport32Bit = lib.mkForce false;
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
22
nixos/musicbox.nix
Normal file
22
nixos/musicbox.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
outputs,
|
||||
# lib,
|
||||
# config,
|
||||
# pkgs,
|
||||
...
|
||||
}: {
|
||||
networking.hostName = "musicbox";
|
||||
|
||||
imports = with outputs.nixosModules; [
|
||||
outputs.diskoConfigurations.unencrypted
|
||||
desktop-usage
|
||||
wifi
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
|
@ -1,9 +1,12 @@
|
|||
{
|
||||
inputs,
|
||||
# outputs,
|
||||
config,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.hardware.nixosModules.common-cpu-amd
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
|
@ -15,64 +18,25 @@
|
|||
fsType = "f2fs";
|
||||
};
|
||||
|
||||
fileSystems."/storage" = {
|
||||
device = "/dev/disk/by-uuid/410fa651-4918-447c-9337-97cc12ff6d2a";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
};
|
||||
|
||||
users.groups.beefcake = {};
|
||||
users.users = {
|
||||
beefcake = {
|
||||
isSystemUser = true;
|
||||
createHome = true;
|
||||
home = "/storage/backups/beefcake";
|
||||
group = "beefcake";
|
||||
extraGroups = ["sftponly"];
|
||||
networking = {
|
||||
hostName = "rascal";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
users.users.beefcake = {
|
||||
# used for restic backups
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys =
|
||||
config.users.users.daniel.openssh.authorizedKeys.keys
|
||||
++ [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7HrojwoyHED+A/FzRjYmIL0hzofwBd9IYHH6yV0oPO root@beefcake"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAOEI82VdbyR1RYqSnFtlffHBtHFdXO0v9RmQH7GkfXo restic@beefcake"
|
||||
];
|
||||
};
|
||||
|
||||
daniel = {
|
||||
# used for restic backups
|
||||
isNormalUser = true;
|
||||
extraGroups = ["users" "wheel" "video" "dialout" "uucp"];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"
|
||||
];
|
||||
};
|
||||
|
||||
root = {
|
||||
openssh.authorizedKeys.keys = config.users.users.daniel.openssh.authorizedKeys.keys;
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.extraConfig = ''
|
||||
Match Group sftponly
|
||||
ChrootDirectory /storage/backups/%u
|
||||
ForceCommand internal-sftp
|
||||
AllowTcpForwarding no
|
||||
'';
|
||||
|
||||
networking = {
|
||||
hostName = "rascal";
|
||||
networkmanager.enable = true;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowPing = true;
|
||||
allowedTCPPorts = [22];
|
||||
};
|
||||
};
|
||||
|
||||
services.tailscale.useRoutingFeatures = "server";
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
system.stateVersion = "22.05";
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue