Compare commits
23 commits
Author | SHA1 | Date | |
---|---|---|---|
89d00cd421 | |||
adb94f7406 | |||
d3cdff1a5f | |||
6d7cb628be | |||
3a07251792 | |||
528b39128f | |||
e041ebad40 | |||
40597245c8 | |||
bfe440b114 | |||
d0c918bf76 | |||
ceb7eb4c7c | |||
ab00802694 | |||
520c6df6a1 | |||
eff5a28f9c | |||
2ece2e6735 | |||
d8d1922608 | |||
4dfacb5c28 | |||
c310efd76d | |||
1a7c308953 | |||
58276d768f | |||
3315f38e73 | |||
95e0c57702 | |||
383f6ff0ce |
547 changed files with 40270 additions and 5329 deletions
11
.github/dependabot.yml
vendored
Normal file
11
.github/dependabot.yml
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
24
.github/workflows/update-riscv.yaml.disabled
vendored
Normal file
24
.github/workflows/update-riscv.yaml.disabled
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
name: update-riscv
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
pr:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Create update pull request
|
||||
run: |
|
||||
curl -X 'POST' \
|
||||
'https://git.chir.rs/api/v1/repos/darkkirb/nixos-config/pulls' \
|
||||
-H 'Authorization: Bearer ${{secrets.GITHUB_TOKEN}}' \
|
||||
-H 'accept: application/json' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"base": "main-riscv",
|
||||
"body": "Keeping main-riscv up to date",
|
||||
"head": "main",
|
||||
"title": "Update RISC-V config"
|
||||
}'
|
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,2 +1,5 @@
|
|||
result
|
||||
.direnv/
|
||||
*.qcow2
|
||||
*.fd
|
||||
.direnv
|
||||
/efi/secret
|
||||
|
|
111
.sops.yaml
111
.sops.yaml
|
@ -1,72 +1,75 @@
|
|||
keys:
|
||||
- &base age1tltjgexkp5fz3rum4j0k66ty5q4u8ptvkgkepumd20zal24g2qfs5xgw76
|
||||
- &darkkirb age15g6tzvcmcp3ae4hwnn4pwewat6eq9unlhtjrlaka6rf94ej9dd5qqpgt7u
|
||||
- ¬522 age1emv3kzvwgl36hgllrv7rlekqy3y3c6eztadl3lv09ks3z9vv6vdqw06yqa
|
||||
- &pc-installer age1eh2vd6cdy23qazwg0hzq95pn9e6p8yaqu4g6zyan8gzal4x5ed5qful8kg
|
||||
- &rainbow-resort age19vzypddhexvvsf8xylstxc9znnkd8rxmamhjlt7elvz4j3zaf5tqqura6f
|
||||
- &lotte age1tltjgexkp5fz3rum4j0k66ty5q4u8ptvkgkepumd20zal24g2qfs5xgw76
|
||||
- &nixos-8gb-fsn1-1 age1273ps5thcy70ckdt0270s2nysqgu48t38pq3wq975v3y7mf4eavsw38wsl
|
||||
- &thinkrac age1p400545a482fma40yfgytu40p6wr5a75v4f8yeudvgf7eh5erufqxhgynr
|
||||
- &nas age1c7y687sxh428wk34s8ws6kemu62mggafpt40rmanevgkuj5xa59q6f7tlc
|
||||
- &instance-20221213-1915 age1elra3uklw8rmwkevqms2l4tsd06d5utqda9d2w4qvqpz898uzuesugxkhc
|
||||
- &vf2 age1emv3kzvwgl36hgllrv7rlekqy3y3c6eztadl3lv09ks3z9vv6vdqw06yqa
|
||||
- &rainbow-resort age19vzypddhexvvsf8xylstxc9znnkd8rxmamhjlt7elvz4j3zaf5tqqura6f
|
||||
- &devterm age1sqvl2cwvzeztuelpwppaestqufzeap8uf0vgy7t5mzr9rwc3dpxqhx8ly9
|
||||
creation_rules:
|
||||
- path_regex: machine/not522/secrets\.yaml$
|
||||
- path_regex: secrets/shared\.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *base
|
||||
- *not522
|
||||
- path_regex: services/tailscale\.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *base
|
||||
- *not522
|
||||
- *rainbow-resort
|
||||
- *nixos-8gb-fsn1-1
|
||||
- *thinkrac
|
||||
- path_regex: services/restic\.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *base
|
||||
- *not522
|
||||
- *nas
|
||||
- *instance-20221213-1915
|
||||
- *vf2
|
||||
- *rainbow-resort
|
||||
- *thinkrac
|
||||
- path_regex: users/root/system\.yaml$
|
||||
- *lotte
|
||||
- *devterm
|
||||
- path_regex: secrets/nixos-8gb-fsn1-1\.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *base
|
||||
- *not522
|
||||
- *pc-installer
|
||||
- *nixos-8gb-fsn1-1
|
||||
- *lotte
|
||||
- path_regex: secrets/thinkrac\.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *thinkrac
|
||||
- *lotte
|
||||
- path_regex: secrets/nixos\.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *lotte
|
||||
- path_regex: secrets/nas\.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *nas
|
||||
- *lotte
|
||||
- path_regex: secrets/desktop\.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *thinkrac
|
||||
- *rainbow-resort
|
||||
- *thinkrac
|
||||
- path_regex: users/darkkirb/system\.yaml$
|
||||
- *lotte
|
||||
- *devterm
|
||||
- path_regex: secrets/instance-20221213-1915\.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *instance-20221213-1915
|
||||
- *lotte
|
||||
- path_regex: secrets/vf2\.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *vf2
|
||||
- *lotte
|
||||
- path_regex: secrets/rainbow-resort\.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *base
|
||||
- *not522
|
||||
- *pc-installer
|
||||
- *rainbow-resort
|
||||
- *thinkrac
|
||||
- path_regex: users/darkkirb/home-manager/keys.yaml$
|
||||
- *lotte
|
||||
- path_regex: secrets/devterm\.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *base
|
||||
- *darkkirb
|
||||
- path_regex: programs/ssh/shared-keys.yaml$
|
||||
- *devterm
|
||||
- *lotte
|
||||
- path_regex: secrets/kubernetes\.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *base
|
||||
- *darkkirb
|
||||
- *not522
|
||||
- *pc-installer
|
||||
- *nixos-8gb-fsn1-1
|
||||
- *nas
|
||||
- *instance-20221213-1915
|
||||
- *rainbow-resort
|
||||
- *thinkrac
|
||||
- path_regex: programs/desktop/pim/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *base
|
||||
- *darkkirb
|
||||
- path_regex: config/kde/krdp.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *base
|
||||
- *darkkirb
|
||||
- path_regex: services/desktop/gpg/privkey.yaml
|
||||
key_groups:
|
||||
- age:
|
||||
- *base
|
||||
- *darkkirb
|
||||
- *lotte
|
||||
|
|
18
.vscode/settings.json
vendored
Normal file
18
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"python.formatting.provider": "yapf",
|
||||
"conventionalCommits.scopes": ["thinkrac", "aarch64"],
|
||||
"files.associations": {
|
||||
"*.hujson": "jsonc"
|
||||
},
|
||||
"json.schemas": [
|
||||
{
|
||||
"fileMatch": ["*.hujson"],
|
||||
"schema": {
|
||||
"allowTrailingCommas": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"files.watcherExclude": {
|
||||
"**/target": true
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
# Lotte’s New Nix configuration
|
||||
|
||||
Very WIP rewrite
|
50
config/bittorrent-blocker.nix
Normal file
50
config/bittorrent-blocker.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
_: {
|
||||
networking.firewall.extraCommands = ''
|
||||
# Taken from https://gist.github.com/rampageX/5cbe95be43ca3165f4d963629e3bb946
|
||||
# Block Torrent algo string using Boyer-Moore (bm)
|
||||
iptables -I FORWARD 1 -m string --algo bm --string "BitTorrent" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo bm --string "BitTorrent protocol" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo bm --string "peer_id=" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo bm --string ".torrent" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo bm --string "announce.php?passkey=" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo bm --string "torrent" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo bm --string "announce" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo bm --string "info_hash" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo bm --string "/default.ida?" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo bm --string ".exe?/c+dir" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo bm --string ".exe?/c_tftp" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo bm --string "BitTorrent" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo bm --string "BitTorrent protocol" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo bm --string "peer_id=" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo bm --string ".torrent" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo bm --string "announce.php?passkey=" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo bm --string "torrent" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo bm --string "announce" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo bm --string "info_hash" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo bm --string "/default.ida?" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo bm --string ".exe?/c+dir" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo bm --string ".exe?/c_tftp" -j DROP
|
||||
# Block Torrent keys
|
||||
iptables -I FORWARD 1 -m string --algo kmp --string "peer_id" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo kmp --string "BitTorrent" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo kmp --string "BitTorrent protocol" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo kmp --string "bittorrent-announce" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo kmp --string "announce.php?passkey=" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo kmp --string "peer_id" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo kmp --string "BitTorrent" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo kmp --string "BitTorrent protocol" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo kmp --string "bittorrent-announce" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo kmp --string "announce.php?passkey=" -j DROP
|
||||
# Block Distributed Hash Table (DHT) keywords
|
||||
iptables -I FORWARD 1 -m string --algo kmp --string "find_node" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo kmp --string "info_hash" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo kmp --string "get_peers" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo kmp --string "announce" -j DROP
|
||||
iptables -I FORWARD 1 -m string --algo kmp --string "announce_peers" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo kmp --string "find_node" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo kmp --string "info_hash" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo kmp --string "get_peers" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo kmp --string "announce" -j DROP
|
||||
ip6tables -I FORWARD 1 -m string --algo kmp --string "announce_peers" -j DROP
|
||||
'';
|
||||
}
|
|
@ -1,18 +1,91 @@
|
|||
{ pkgs, nixos-config, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
"${nixos-config}/modules"
|
||||
"${nixos-config}/services/tailscale.nix"
|
||||
"${nixos-config}/services/openssh.nix"
|
||||
"${nixos-config}/services/restic.nix"
|
||||
"${nixos-config}/users"
|
||||
"${nixos-config}/programs"
|
||||
./systemd-boot.nix
|
||||
./i18n.nix
|
||||
./overlays
|
||||
./users/darkkirb.nix
|
||||
./users/root.nix
|
||||
./nix.nix
|
||||
./sops.nix
|
||||
./home.nix
|
||||
./services/restic.nix
|
||||
./specialization.nix
|
||||
./services/promtail.nix
|
||||
./env.nix
|
||||
./tailscale.nix
|
||||
./services/otel.nix
|
||||
];
|
||||
services.openssh.enable = true;
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
git
|
||||
]
|
||||
++ (
|
||||
if system != "riscv64-linux"
|
||||
then [kitty.terminfo]
|
||||
else []
|
||||
);
|
||||
networking.firewall.allowedTCPPorts = [22];
|
||||
networking.firewall.allowedUDPPortRanges = [
|
||||
{
|
||||
from = 60000;
|
||||
to = 61000;
|
||||
}
|
||||
];
|
||||
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
environment.pathsToLink = ["/share/zsh"];
|
||||
|
||||
console.keyMap = "neo";
|
||||
|
||||
security.sudo.extraConfig = ''
|
||||
Defaults env_keep += "TMUX"
|
||||
'';
|
||||
|
||||
programs.zsh.enable = true;
|
||||
users.mutableUsers = false;
|
||||
|
||||
sops.secrets."root/aws/credentials" = {
|
||||
sopsFile = ../secrets/shared.yaml;
|
||||
owner = "root";
|
||||
key = "aws/credentials";
|
||||
path = "/root/.aws/credentials";
|
||||
};
|
||||
sops.secrets."root/ssh/builder_id_ed25519" = {
|
||||
sopsFile = ../secrets/shared.yaml;
|
||||
owner = "root";
|
||||
key = "ssh/builder_id_ed25519";
|
||||
path = "/root/.ssh/builder_id_ed25519";
|
||||
};
|
||||
sops.secrets."darkkirb/ssh/builder_id_ed25519" = {
|
||||
sopsFile = ../secrets/shared.yaml;
|
||||
owner = "darkkirb";
|
||||
key = "ssh/builder_id_ed25519";
|
||||
path = "/home/darkkirb/.ssh/builder_id_ed25519";
|
||||
};
|
||||
|
||||
programs.ssh.knownHosts = {
|
||||
"nas.int.chir.rs".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhao1I1Kd1gK5bERUdjMxP9yHDrSHYZsTN2TcSk0K/U";
|
||||
"backup.int.chir.rs".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhao1I1Kd1gK5bERUdjMxP9yHDrSHYZsTN2TcSk0K/U";
|
||||
};
|
||||
boot.kernel.sysctl = {
|
||||
"fs.inotify.max_user_watches" = 524288;
|
||||
};
|
||||
services.prometheus.exporters.node = {
|
||||
port = 31941;
|
||||
enabledCollectors = [
|
||||
"buddyinfo"
|
||||
"cgroups"
|
||||
"systemd"
|
||||
"ethtool"
|
||||
];
|
||||
enable = true;
|
||||
};
|
||||
i18n.defaultLocale = "nl_NL.UTF-8";
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"olm-3.2.16"
|
||||
];
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
security.sudo.enable = false;
|
||||
}
|
||||
|
|
25
config/desktop-secrets.nix
Normal file
25
config/desktop-secrets.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
_: let
|
||||
mkSopsSecret = {
|
||||
name,
|
||||
path,
|
||||
}: {
|
||||
name = "desktop/${name}";
|
||||
value = {
|
||||
sopsFile = ../secrets/desktop.yaml;
|
||||
owner = "darkkirb";
|
||||
key = name;
|
||||
path = "/home/darkkirb/${path}";
|
||||
};
|
||||
};
|
||||
in {
|
||||
sops.secrets = builtins.listToAttrs (map mkSopsSecret [
|
||||
{
|
||||
name = "aws/credentials";
|
||||
path = ".aws/credentials";
|
||||
}
|
||||
{
|
||||
name = ".config/gh/hosts.yml";
|
||||
path = ".config/gh/hosts.yml";
|
||||
}
|
||||
]);
|
||||
}
|
209
config/desktop.nix
Normal file
209
config/desktop.nix
Normal file
|
@ -0,0 +1,209 @@
|
|||
{
|
||||
system,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
} @ args: let
|
||||
lockscreen-all = pkgs.writeScript "lockscreen-all" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
|
||||
if ${pkgs.coreutils}/bin/[ -z "$(${pkgs.usbutils}/bin/lsusb | grep Yubico)" ]; then
|
||||
${pkgs.systemd}/bin/loginctl list-sessions | ${pkgs.gnugrep}/bin/grep '^\ ' | ${pkgs.gawk}/bin/awk '{print $1}' | ${pkgs.findutils}/bin/xargs -i ${pkgs.systemd}/bin/loginctl lock-session {}
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
imports =
|
||||
[
|
||||
./services/pipewire.nix
|
||||
./desktop-secrets.nix
|
||||
./services/cups.nix
|
||||
./services/docker.nix
|
||||
./services/cifs.nix
|
||||
./kde.nix
|
||||
#./sway.nix
|
||||
]
|
||||
/*
|
||||
++ (
|
||||
if system == "x86_64-linux"
|
||||
then [./programs/virtualbox.nix]
|
||||
else []
|
||||
)
|
||||
*/
|
||||
;
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
emoji = ["Noto Color Emoji"];
|
||||
monospace = ["Fira Code" "Font Awesome 5 Free"];
|
||||
sansSerif = ["Noto Sans" "Font Awesome 5 Free"];
|
||||
serif = ["Noto Serif" "Font Awesome 5 Free"];
|
||||
};
|
||||
};
|
||||
packages = with pkgs; [
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
font-awesome
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
noto-fonts-extra
|
||||
(nerdfonts.override {fonts = ["FiraCode" "DroidSansMono" "Noto"];})
|
||||
nasin-nanpa
|
||||
fairfax-hd
|
||||
(pkgs.stdenvNoCC.mkDerivation rec {
|
||||
pname = "zbalermorna";
|
||||
version = "920b28d798ae1c06885c674bbf02b08ffed12b2f";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jackhumbert";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "00sl3f1x4frh166mq85lwl9v1f5r3ckkfg8id5fibafymick5vyp";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/fonts
|
||||
cp -r $src/fonts/*.otf $out/share/fonts
|
||||
'';
|
||||
})
|
||||
];
|
||||
};
|
||||
fonts.fontconfig.localConf = ''
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
<match target="scan">
|
||||
<test name="family">
|
||||
<string>Fairfax HD</string>
|
||||
</test>
|
||||
<edit name="spacing">
|
||||
<int>100</int>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
||||
'';
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
services.pcscd.enable = true;
|
||||
|
||||
security.pam = {
|
||||
services.login.u2fAuth = true;
|
||||
services.swaylock.u2fAuth = true;
|
||||
u2f = {
|
||||
enable = true;
|
||||
control = "required";
|
||||
};
|
||||
};
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", RUN+="${lockscreen-all}"
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="e621", ATTRS{idProduct}=="0000", TAG+="uaccess"
|
||||
ACTION=="add", SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="e621", ATTRS{idProduct}=="0000", TAG+="uaccess"
|
||||
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", TAG+="uaccess"
|
||||
ACTION=="add", SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0306", TAG+="uaccess"
|
||||
ACTION=="add", SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0330", TAG+="uaccess"
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS={idProduct}=="6010", OWNER="user", MODE="0777", GROUP="dialout"
|
||||
'';
|
||||
programs.steam.enable = system == "x86_64-linux";
|
||||
nixpkgs.overlays = [
|
||||
(curr: prev: {
|
||||
steam = prev.steam.override {
|
||||
extraPkgs = pkgs:
|
||||
with pkgs; [
|
||||
mono
|
||||
fuse
|
||||
];
|
||||
};
|
||||
})
|
||||
];
|
||||
services.flatpak.enable = true;
|
||||
programs.java.enable = true;
|
||||
hardware.opengl.driSupport32Bit = lib.mkForce (system == "x86_64-linux");
|
||||
home-manager.users.darkkirb = import ./home-manager/darkkirb.nix {
|
||||
desktop = true;
|
||||
inherit args;
|
||||
};
|
||||
|
||||
# For syncthing
|
||||
networking.firewall.allowedTCPPorts = [22000];
|
||||
networking.firewall.allowedUDPPorts = [22000];
|
||||
networking.firewall.allowedTCPPortRanges = [
|
||||
{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
networking.firewall.allowedUDPPortRanges = [
|
||||
{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pinentry-qt
|
||||
dotool
|
||||
wl-clipboard
|
||||
#plasma5Packages.thirdParty.lightly
|
||||
];
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
# gtk portal needed to make gtk apps happy
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
config.common.default = "*";
|
||||
};
|
||||
programs.dconf.enable = true;
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
libinput.enable = true;
|
||||
layout = "de";
|
||||
xkbVariant = "neo";
|
||||
displayManager.lightdm.enable = false;
|
||||
extraLayouts.zlr = {
|
||||
description = "lojban layout";
|
||||
languages = ["jbo"];
|
||||
symbolsFile = ../extra/keyboard/symbols;
|
||||
};
|
||||
};
|
||||
i18n.inputMethod = {
|
||||
enabled = "ibus";
|
||||
ibus.engines = with pkgs.ibus-engines; [anthy];
|
||||
};
|
||||
security.polkit.enable = true;
|
||||
services.dbus.enable = true;
|
||||
services.dbus.packages = with pkgs; [dconf];
|
||||
# Futureproofing: on non-x86 machines, emulate x86
|
||||
boot.binfmt.emulatedSystems =
|
||||
if system != "x86_64-linux"
|
||||
then [
|
||||
"x86_64-linux"
|
||||
"i686-linux"
|
||||
]
|
||||
else [];
|
||||
|
||||
virtualisation = {
|
||||
waydroid.enable = true;
|
||||
lxd.enable = true;
|
||||
};
|
||||
|
||||
programs.gamemode.enable = true;
|
||||
nixpkgs.config.permittedInsecurePackages = ["electron-26.3.0"];
|
||||
|
||||
boot = {
|
||||
plymouth.enable = true;
|
||||
consoleLogLevel = 0;
|
||||
initrd.verbose = false;
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"loglevel=3"
|
||||
"rd.systemd.show_status=false"
|
||||
"rd.udev.log_level=3"
|
||||
"udev.log_priority=3"
|
||||
];
|
||||
loader.timeout = 0;
|
||||
};
|
||||
}
|
114
config/devterm.nix
Normal file
114
config/devterm.nix
Normal file
|
@ -0,0 +1,114 @@
|
|||
{
|
||||
nixos-hardware,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-devterm;
|
||||
boot.kernelParams = ["fbcon=rotate:1"];
|
||||
networking.hostName = "devterm";
|
||||
imports = [
|
||||
./desktop.nix
|
||||
];
|
||||
boot.loader = {
|
||||
grub.enable = lib.mkDefault false;
|
||||
generic-extlinux-compatible.enable = lib.mkDefault true;
|
||||
};
|
||||
boot.initrd = {
|
||||
includeDefaultModules = false;
|
||||
availableKernelModules = [
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"vc4"
|
||||
"pcie_brcmstb" # required for the pcie bus to work
|
||||
"reset-raspberrypi" # required for vl805 firmware to load
|
||||
"mmc_block"
|
||||
"usbhid"
|
||||
"hid_generic"
|
||||
"panel_cwd686"
|
||||
"ocp8178_bl"
|
||||
"ti_adc081c"
|
||||
];
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
libraspberrypi
|
||||
raspberrypi-eeprom
|
||||
];
|
||||
system.stateVersion = "24.05";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/mmcblk0p2";
|
||||
fsType = "btrfs";
|
||||
options = ["compress=zstd"];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/mmcblk0p1";
|
||||
fsType = "vfat";
|
||||
};
|
||||
security.pam = {
|
||||
services.login.u2fAuth = lib.mkForce false;
|
||||
services.swaylock.u2fAuth = lib.mkForce false;
|
||||
u2f.enable = lib.mkForce false;
|
||||
services.sddm.u2fAuth = lib.mkForce false;
|
||||
};
|
||||
networking.networkmanager.enable = true;
|
||||
users.users.darkkirb.extraGroups = ["networkmanager"];
|
||||
hardware.deviceTree.filter = "*rpi*.dtb";
|
||||
hardware.deviceTree.overlays = [
|
||||
{
|
||||
name = "dwc2";
|
||||
dtsFile = ./devterm/dwc2-overlay.dts;
|
||||
}
|
||||
{
|
||||
name = "cma";
|
||||
dtsFile = ./devterm/cma-overlay.dts;
|
||||
}
|
||||
{
|
||||
name = "vc4-kms-v3d-pi4";
|
||||
dtsFile = ./devterm/vc4-kms-v3d-pi4-overlay.dts;
|
||||
}
|
||||
{
|
||||
name = "devterm-pmu";
|
||||
dtsFile = ./devterm/devterm-pmu-overlay.dts;
|
||||
}
|
||||
{
|
||||
name = "devterm-panel";
|
||||
dtsFile = ./devterm/devterm-panel-overlay.dts;
|
||||
}
|
||||
{
|
||||
name = "devterm-misc";
|
||||
dtsFile = ./devterm/devterm-misc-overlay.dts;
|
||||
}
|
||||
{
|
||||
name = "audremap";
|
||||
dtsFile = ./devterm/audremap-overlay.dts;
|
||||
}
|
||||
{
|
||||
name = "spi";
|
||||
dtsFile = ./devterm/spi0-overlay.dts;
|
||||
}
|
||||
{
|
||||
name = "devterm-overlay";
|
||||
dtsFile = ./devterm/devterm-overlay.dts;
|
||||
}
|
||||
];
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
services.xserver.xkbVariant = lib.mkForce "us";
|
||||
console.keyMap = lib.mkForce "us";
|
||||
home-manager.users.darkkirb.wayland.windowManager.sway.config.input."*" = lib.mkForce {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
boot.initrd.systemd.tpm2.enable = lib.mkForce false;
|
||||
systemd.tpm2.enable = lib.mkForce false;
|
||||
services.displayManager = {
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "darkkirb";
|
||||
};
|
||||
sddm = {
|
||||
autoLogin.relogin = true;
|
||||
};
|
||||
};
|
||||
}
|
23
config/devterm/audremap-overlay.dts
Normal file
23
config/devterm/audremap-overlay.dts
Normal file
|
@ -0,0 +1,23 @@
|
|||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2711";
|
||||
|
||||
fragment@0 {
|
||||
target = <&audio_pins>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&audio_pins>;
|
||||
__overlay__ {
|
||||
brcm,pins = < 12 13 >;
|
||||
brcm,function = < 4 >; /* alt0 alt0 */
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
14
config/devterm/cma-overlay.dts
Normal file
14
config/devterm/cma-overlay.dts
Normal file
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2711";
|
||||
|
||||
fragment@0 {
|
||||
target = <&cma>;
|
||||
__overlay__ {
|
||||
size = <(384 * 1024 * 1024)>;
|
||||
};
|
||||
};
|
||||
};
|
80
config/devterm/devterm-misc-overlay.dts
Normal file
80
config/devterm/devterm-misc-overlay.dts
Normal file
|
@ -0,0 +1,80 @@
|
|||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/{
|
||||
compatible = "brcm,bcm2711";
|
||||
|
||||
fragment@0 {
|
||||
target = <&i2c1>;
|
||||
__overlay__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins>;
|
||||
status = "okay";
|
||||
|
||||
adc101c: adc@54 {
|
||||
reg = <0x54>;
|
||||
compatible = "ti,adc101c";
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&spi4>;
|
||||
__overlay__ {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi4_pins &spi4_cs_pins>;
|
||||
cs-gpios = <&gpio 4 1>;
|
||||
status = "okay";
|
||||
|
||||
spidev4_0: spidev@0 {
|
||||
compatible = "spidev";
|
||||
reg = <0>; /* CE0 */
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
spi-max-frequency = <125000000>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target = <&uart1>;
|
||||
__overlay__ {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart1_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target = <&gpio>;
|
||||
__overlay__ {
|
||||
|
||||
i2c1_pins: i2c1 {
|
||||
brcm,pins = <44 45>;
|
||||
brcm,function = <6>;
|
||||
};
|
||||
|
||||
spi4_pins: spi4_pins {
|
||||
brcm,pins = <6 7>;
|
||||
brcm,function = <7>;
|
||||
};
|
||||
|
||||
spi4_cs_pins: spi0_cs_pins {
|
||||
brcm,pins = <4>;
|
||||
brcm,function = <1>;
|
||||
};
|
||||
|
||||
uart1_pins: uart1_pins {
|
||||
brcm,pins = <14 15>;
|
||||
brcm,function = <2>;
|
||||
brcm,pull = <0 2>;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
};
|
130
config/devterm/devterm-overlay.dts
Normal file
130
config/devterm/devterm-overlay.dts
Normal file
|
@ -0,0 +1,130 @@
|
|||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2711";
|
||||
fragment@0 {
|
||||
target = <&dma40>;
|
||||
__overlay__ {
|
||||
dma-channel-mask = <0x3000>;
|
||||
};
|
||||
};
|
||||
fragment@1 {
|
||||
target = <&hdmi0>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@2 {
|
||||
target = <&uart0_pins>;
|
||||
__overlay__ {
|
||||
brcm,pull = <0x02 0x00 0x00 0x02>;
|
||||
brcm,pins = <0x1e 0x1f 0x20 0x21>;
|
||||
};
|
||||
};
|
||||
fragment@3 {
|
||||
target = <&dvp>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@4 {
|
||||
target = <&pixelvalve4>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@5 {
|
||||
target = <&ddc1>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@6 {
|
||||
target = <&txp>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@7 {
|
||||
target = <&hvs>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@8 {
|
||||
target = <&pixelvalve3>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@9 {
|
||||
target = <&spi4>;
|
||||
__overlay__ {
|
||||
pinctrl-0 = <0xf0 0xf1>;
|
||||
};
|
||||
};
|
||||
fragment@10 {
|
||||
target = <&pixelvalve2>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@11 {
|
||||
target = <&uart1>;
|
||||
__overlay__ {
|
||||
pinctrl-0 = <0xf2>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
fragment@12 {
|
||||
target = <&pixelvalve1>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@13 {
|
||||
target = <&hdmi1>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@14 {
|
||||
target = <&spi4>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@15 {
|
||||
target = <&ddc0>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@16 {
|
||||
target = <&aon_intr>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@17 {
|
||||
target = <&pixelvalve0>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
fragment@18 {
|
||||
target = <&audio>;
|
||||
__overlay__ {
|
||||
brcm,disable-headphones = <0x00>;
|
||||
status = "okay";
|
||||
bcrm,disable-hdmi;
|
||||
};
|
||||
};
|
||||
fragment@19 {
|
||||
target-path = "/chosen";
|
||||
__overlay__ {
|
||||
bootargs = "coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 8250.nr_uarts=0 smsc95xx.macaddr=E4:5F:01:E4:FE:2D vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 8250.nr_uarts=1";
|
||||
};
|
||||
};
|
||||
};
|
47
config/devterm/devterm-panel-overlay.dts
Normal file
47
config/devterm/devterm-panel-overlay.dts
Normal file
|
@ -0,0 +1,47 @@
|
|||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2711";
|
||||
|
||||
fragment@0 {
|
||||
target=<&dsi1>;
|
||||
__overlay__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
port {
|
||||
dsi_out_port: endpoint {
|
||||
remote-endpoint = <&panel_dsi_port>;
|
||||
};
|
||||
};
|
||||
|
||||
panel_cwd686: panel@0 {
|
||||
compatible = "cw,cwd686";
|
||||
reg = <0>;
|
||||
reset-gpio = <&gpio 8 1>;
|
||||
backlight = <&ocp8178_backlight>;
|
||||
rotation = <0x5a>;
|
||||
|
||||
port {
|
||||
panel_dsi_port: endpoint {
|
||||
remote-endpoint = <&dsi_out_port>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target-path = "/";
|
||||
__overlay__ {
|
||||
ocp8178_backlight: backlight@0 {
|
||||
compatible = "ocp8178-backlight";
|
||||
backlight-control-gpios = <&gpio 9 0>;
|
||||
default-brightness = <5>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
104
config/devterm/devterm-pmu-overlay.dts
Normal file
104
config/devterm/devterm-pmu-overlay.dts
Normal file
|
@ -0,0 +1,104 @@
|
|||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2711";
|
||||
|
||||
fragment@0 {
|
||||
target = <&i2c0if>;
|
||||
__overlay__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-0 = <&i2c0_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
|
||||
axp22x: pmic@34 {
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "x-powers,axp223";
|
||||
reg = <0x34>; /* i2c address */
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <2 8>; /* IRQ_TYPE_EDGE_FALLING */
|
||||
irq-gpios = <&gpio 2 0>;
|
||||
|
||||
regulators {
|
||||
|
||||
x-powers,dcdc-freq = <3000>;
|
||||
|
||||
reg_aldo1: aldo1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "audio-vdd";
|
||||
};
|
||||
|
||||
reg_aldo2: aldo2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "display-vcc";
|
||||
};
|
||||
|
||||
reg_dldo2: dldo2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "dldo2";
|
||||
};
|
||||
|
||||
reg_dldo3: dldo3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "dldo3";
|
||||
};
|
||||
|
||||
reg_dldo4: dldo4 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "dldo4";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
battery_power_supply: battery-power-supply {
|
||||
compatible = "x-powers,axp221-battery-power-supply";
|
||||
monitored-battery = <&battery>;
|
||||
};
|
||||
|
||||
ac_power_supply: ac_power_supply {
|
||||
compatible = "x-powers,axp221-ac-power-supply";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&i2c0if>;
|
||||
__overlay__ {
|
||||
compatible = "brcm,bcm2708-i2c";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target-path = "/aliases";
|
||||
__overlay__ {
|
||||
i2c0 = "/soc/i2c@7e205000";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target-path = "/";
|
||||
__overlay__ {
|
||||
battery: battery@0 {
|
||||
compatible = "simple-battery";
|
||||
constant-charge-current-max-microamp = <2100000>;
|
||||
voltage-min-design-microvolt = <3300000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
22
config/devterm/dwc2-overlay.dts
Normal file
22
config/devterm/dwc2-overlay.dts
Normal file
|
@ -0,0 +1,22 @@
|
|||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2711";
|
||||
|
||||
fragment@0 {
|
||||
target = <&usb>;
|
||||
#address-cells = <0x01>;
|
||||
#size-cells = <0x01>;
|
||||
|
||||
__overlay__ {
|
||||
compatible = "brcm,bcm2835-usb";
|
||||
dr_mode = "host";
|
||||
g-np-tx-fifo-size = <0x20>;
|
||||
g-rx-fifo-size = <0x22e>;
|
||||
g-tx-fifo-size = <0x200 0x200 0x200 0x200 0x200 0x100 0x100>;
|
||||
status = "okay";
|
||||
phandle = <0x01>;
|
||||
};
|
||||
};
|
||||
};
|
11
config/devterm/spi0-overlay.dts
Normal file
11
config/devterm/spi0-overlay.dts
Normal file
|
@ -0,0 +1,11 @@
|
|||
/dts-v1/;
|
||||
/plugin/;
|
||||
/ {
|
||||
compatible = "bcrm,bcm2711";
|
||||
fragment@0 {
|
||||
target = <&spi>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
35
config/devterm/vc4-kms-v3d-pi4-overlay.dts
Normal file
35
config/devterm/vc4-kms-v3d-pi4-overlay.dts
Normal file
|
@ -0,0 +1,35 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2711";
|
||||
|
||||
fragment@1 {
|
||||
target = <&fb>;
|
||||
__overlay__ {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target = <&firmwarekms>;
|
||||
__overlay__ {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target = <&v3d>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@4 {
|
||||
target = <&vc4>;
|
||||
__overlay__ {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
|
@ -1,20 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
#documentation.nixos.includeAllModules = true;
|
||||
#documentation.nixos.options.warningsAreErrors = false;
|
||||
/*
|
||||
home-manager.users.darkkirb =
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
systemConfig,
|
||||
...
|
||||
}:
|
||||
{
|
||||
manual = lib.mkIf (config.home.version.release == systemConfig.system.nixos.release) {
|
||||
html.enable = true;
|
||||
json.enable = true;
|
||||
};
|
||||
};
|
||||
*/
|
||||
}
|
16
config/env.nix
Normal file
16
config/env.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
environment.extraInit = let
|
||||
systemdBin = lib.getBin config.systemd.package;
|
||||
in ''
|
||||
set -a
|
||||
. /dev/fd/0 <<EOF
|
||||
$(${systemdBin}/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)
|
||||
EOF
|
||||
set +a
|
||||
'';
|
||||
}
|
22
config/games/default.nix
Normal file
22
config/games/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
args: {
|
||||
pkgs,
|
||||
nixpkgs,
|
||||
nix-gaming,
|
||||
system,
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
home.packages =
|
||||
[
|
||||
pkgs.prismlauncher
|
||||
pkgs.mgba-dev
|
||||
]
|
||||
++ (
|
||||
if system == "x86_64-linux"
|
||||
then [
|
||||
pkgs.xivlauncher
|
||||
(pkgs.wineWowPackages.stagingFull.override {waylandSupport = true;})
|
||||
]
|
||||
else []
|
||||
);
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{
|
||||
nixos-config,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
time.timeZone = "Etc/GMT-1";
|
||||
isGraphical = true;
|
||||
imports = [
|
||||
./kde
|
||||
./documentation.nix
|
||||
./graphical/fonts.nix
|
||||
"${nixos-config}/services/security-key"
|
||||
];
|
||||
home-manager.users.darkkirb.imports =
|
||||
if config.isSway then
|
||||
[
|
||||
./sway
|
||||
./graphical/gtk-fixes
|
||||
]
|
||||
else
|
||||
[ ./graphical/gtk-fixes ];
|
||||
xdg.portal = {
|
||||
xdgOpenUsePortal = true;
|
||||
wlr.enable = config.isSway;
|
||||
extraPortals =
|
||||
with pkgs;
|
||||
(lib.mkMerge [
|
||||
[
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-kde
|
||||
]
|
||||
(lib.mkIf config.isSway [
|
||||
xdg-desktop-portal-wlr
|
||||
])
|
||||
]);
|
||||
config.common.default = if config.isSway then "wlr" else "kde";
|
||||
};
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
monospace = [
|
||||
"Fira Code"
|
||||
"Font Awesome 5 Free"
|
||||
];
|
||||
sansSerif = [
|
||||
"Noto Sans"
|
||||
"Font Awesome 5 Free"
|
||||
];
|
||||
serif = [
|
||||
"Noto Serif"
|
||||
"Font Awesome 5 Free"
|
||||
];
|
||||
};
|
||||
};
|
||||
packages = with pkgs; [
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
font-awesome
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
noto-fonts-extra
|
||||
(nerdfonts.override {
|
||||
fonts = [
|
||||
"FiraCode"
|
||||
"DroidSansMono"
|
||||
"Noto"
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
gtk.enable = true;
|
||||
imports = [
|
||||
./gtk3.nix
|
||||
];
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
gtk.gtk3 = {
|
||||
extraConfig = {
|
||||
gtk-decoration-layout = "menu:close";
|
||||
};
|
||||
extraCss = ''
|
||||
.window-frame, .window-frame:backdrop {
|
||||
box-shadow: 0 0 0 black;
|
||||
border-style: none;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.titlebar {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.window-frame.csd.popup {
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.13);
|
||||
}
|
||||
|
||||
.header-bar {
|
||||
background-image: none;
|
||||
background-color: #ededed;
|
||||
box-shadow: none;
|
||||
}
|
||||
GtkLabel.title {
|
||||
opacity: 0;
|
||||
}
|
||||
'';
|
||||
};
|
||||
home.sessionVariables = {
|
||||
GTK_USE_PORTAL = 1;
|
||||
GDK_DEBUG = "portals"; # sigh…
|
||||
};
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
# Unlike other modules in this directory, this one is not enabled by default
|
||||
# The default graphical configuration would enable this, the verbose configuration would not.
|
||||
{ ... }:
|
||||
{
|
||||
boot = {
|
||||
plymouth.enable = true;
|
||||
consoleLogLevel = 0;
|
||||
initrd.verbose = false;
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"loglevel=3"
|
||||
"rd.systemd.show_status=false"
|
||||
"rd.udev.log_level=3"
|
||||
"udev.log_priority=3"
|
||||
];
|
||||
loader.timeout = 0;
|
||||
};
|
||||
}
|
4
config/grub.nix
Normal file
4
config/grub.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
_: {
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.version = 2;
|
||||
}
|
1671
config/home-manager/.p10k.zsh
Normal file
1671
config/home-manager/.p10k.zsh
Normal file
File diff suppressed because it is too large
Load diff
122
config/home-manager/base.nix
Normal file
122
config/home-manager/base.nix
Normal file
|
@ -0,0 +1,122 @@
|
|||
desktop: {
|
||||
pkgs,
|
||||
system,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
(import ../programs/zsh.nix desktop)
|
||||
../programs/tmux.nix
|
||||
(import ../programs/vim desktop)
|
||||
]
|
||||
++ (
|
||||
if desktop
|
||||
then [
|
||||
../programs/mail.nix
|
||||
../programs/taskwarrior.nix
|
||||
]
|
||||
else []
|
||||
);
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
};
|
||||
initExtraBeforeCompInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
|
||||
initExtra =
|
||||
if system != "riscv64-linux"
|
||||
then ''
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
test -n "$KITTY_INSTALLATION_DIR" || export KITTY_INSTALLATION_DIR=${pkgs.kitty}/lib/kitty
|
||||
export KITTY_SHELL_INTEGRATION=enabled
|
||||
autoload -Uz -- "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration
|
||||
kitty-integration
|
||||
unfunction kitty-integration
|
||||
''
|
||||
else "";
|
||||
|
||||
plugins = [
|
||||
];
|
||||
};
|
||||
autojump.enable = true;
|
||||
jq.enable = true;
|
||||
ledger.enable = true;
|
||||
};
|
||||
home.file.".p10k.zsh".source = ./.p10k.zsh;
|
||||
|
||||
home = {
|
||||
shellAliases =
|
||||
{
|
||||
cat = "bat";
|
||||
less = "bat";
|
||||
}
|
||||
// (
|
||||
if system != "riscv64-linux"
|
||||
then {
|
||||
icat = "${pkgs.kitty}/bin/kitty +kitten icat";
|
||||
d = "${pkgs.kitty}/bin/kitty +kitten diff";
|
||||
hg = "${pkgs.kitty}/bin/kitty +kitten hyperlinked_grep";
|
||||
#ssh = "${pkgs.kitty}/bin/kitty +kitten ssh";
|
||||
cargo = "${pkgs.cargo-mommy}/bin/cargo-mommy";
|
||||
}
|
||||
else {}
|
||||
);
|
||||
packages = with pkgs;
|
||||
[
|
||||
mosh
|
||||
ripgrep
|
||||
gh
|
||||
htop
|
||||
sops
|
||||
progress
|
||||
hexyl
|
||||
mc
|
||||
rclone
|
||||
libarchive
|
||||
p7zip
|
||||
unrar
|
||||
]
|
||||
++ (
|
||||
if desktop
|
||||
then [
|
||||
yt-dlp
|
||||
oxipng
|
||||
jpegoptim
|
||||
#picard
|
||||
easytag
|
||||
alejandra
|
||||
yubico-piv-tool
|
||||
]
|
||||
else []
|
||||
);
|
||||
sessionVariables =
|
||||
if desktop
|
||||
then {
|
||||
QT_PLUGIN_PATH = lib.mkForce "\${QT_PLUGIN_PATH}:${config.i18n.inputMethod.package}/${pkgs.qt6.qtbase.qtPluginPrefix}:${pkgs.kdePackages.kimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}";
|
||||
}
|
||||
else {};
|
||||
};
|
||||
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
tmux.enableShellIntegration = true;
|
||||
};
|
||||
home.stateVersion = "22.05";
|
||||
manual.manpages.enable = false; # broken
|
||||
|
||||
_module.args.withNSFW = false;
|
||||
}
|
34
config/home-manager/darkkirb.nix
Normal file
34
config/home-manager/darkkirb.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
desktop,
|
||||
args,
|
||||
}: {pkgs, ...}: {
|
||||
imports =
|
||||
[
|
||||
(import ./base.nix desktop)
|
||||
../programs/ssh.nix
|
||||
(import ../programs/git.nix desktop)
|
||||
../programs/direnv.nix
|
||||
]
|
||||
++ (
|
||||
if desktop
|
||||
then [
|
||||
#../programs/sway.nix
|
||||
../programs/firefox.nix
|
||||
../programs/waybar.nix
|
||||
../programs/ims.nix
|
||||
../programs/syncthing.nix
|
||||
../programs/plover.nix
|
||||
(import ../games/default.nix args)
|
||||
../programs/yubikey.nix
|
||||
../programs/keybase.nix
|
||||
../programs/keepass.nix
|
||||
../programs/vscode
|
||||
../programs/misc.nix
|
||||
../programs/zk.nix
|
||||
../programs/fcitx.nix
|
||||
../programs/gpg.nix
|
||||
../programs/zoom.nix
|
||||
]
|
||||
else []
|
||||
);
|
||||
}
|
5
config/home-manager/miifox.nix
Normal file
5
config/home-manager/miifox.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
(import ./base.nix false)
|
||||
];
|
||||
}
|
6
config/home-manager/root.nix
Normal file
6
config/home-manager/root.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
(import ./base.nix false)
|
||||
../programs/builders.nix
|
||||
];
|
||||
}
|
5
config/home.nix
Normal file
5
config/home.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.root = import ./home-manager/root.nix;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
console.keyMap = "neo";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
i18n.supportedLocales = [
|
||||
"C.UTF-8/UTF-8"
|
||||
"en_US.UTF-8/UTF-8"
|
||||
"de_DE.UTF-8/UTF-8"
|
||||
];
|
||||
}
|
6
config/installer.nix
Normal file
6
config/installer.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{nixpkgs, ...}: {
|
||||
imports = [
|
||||
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix"
|
||||
];
|
||||
networking.hostId = "8425e349";
|
||||
}
|
154
config/instance-20221213-1915.nix
Normal file
154
config/instance-20221213-1915.nix
Normal file
|
@ -0,0 +1,154 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}@args:
|
||||
{
|
||||
networking.hostName = "instance-20221213-1915";
|
||||
networking.hostId = "746d4523";
|
||||
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
./systemd-boot.nix
|
||||
./server.nix
|
||||
./wireguard/public-server.nix
|
||||
./services/named-submissive.nix
|
||||
./services/shitalloverme.nix
|
||||
./users/remote-build.nix
|
||||
./services/atticd.nix
|
||||
#./services/minecraft.nix
|
||||
./services/postgres.nix
|
||||
./services/uptime-kuma.nix
|
||||
./services/reverse-proxy.nix
|
||||
./wireguard
|
||||
./zfs.nix
|
||||
#./services/kubernetes.nix
|
||||
./services/gitea.nix
|
||||
./services/chir-rs.nix
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"virtio_pci"
|
||||
"usbhid"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "tank/local/root";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/6557-C4A0";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "tank/local/nix";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/persist" = {
|
||||
device = "tank/safe/persist";
|
||||
fsType = "zfs";
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "tank/safe/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
# https://grahamc.com/blog/erase-your-darlings
|
||||
boot.initrd.postDeviceCommands = lib.mkAfter ''
|
||||
zfs rollback -r tank/local/root@blank
|
||||
'';
|
||||
|
||||
services.openssh = {
|
||||
hostKeys = [
|
||||
{
|
||||
path = "/persist/ssh/ssh_host_ed25519_key";
|
||||
type = "ed25519";
|
||||
}
|
||||
{
|
||||
path = "/persist/ssh/ssh_host_rsa_key";
|
||||
type = "rsa";
|
||||
bits = 4096;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"L /var/lib/acme - - - - /persist/var/lib/acme"
|
||||
"L /var/lib/tailscale/tailscaled.state - - - - /persist/var/lib/tailscale/tailscaled.state"
|
||||
"d /build - - - - -"
|
||||
"L /var/lib/ipfs - - - - /persist/var/lib/ipfs"
|
||||
"L /var/lib/uptime-kuma - - - - /persist/var/lib/uptime-kuma"
|
||||
];
|
||||
|
||||
services.postgresql.dataDir = "/persist/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}";
|
||||
|
||||
networking.wireguard.interfaces."wg0".ips = [ "fd0d:a262:1fa6:e621:746d:4523:5c04:1453/64" ];
|
||||
home-manager.users.darkkirb = import ./home-manager/darkkirb.nix {
|
||||
desktop = false;
|
||||
inherit args;
|
||||
};
|
||||
nix.settings.cores = 4;
|
||||
nix.settings.max-jobs = 4;
|
||||
nix.settings.system-features = [
|
||||
"nixos-test"
|
||||
"big-parallel"
|
||||
"benchmark"
|
||||
"gccarch-armv8-a"
|
||||
"gccarch-armv8.1-a"
|
||||
"gccarch-armv8.2-a"
|
||||
"ca-derivations"
|
||||
];
|
||||
nix.daemonCPUSchedPolicy = "idle";
|
||||
nix.daemonIOSchedClass = "idle";
|
||||
boot.binfmt.emulatedSystems = [
|
||||
"riscv32-linux"
|
||||
"riscv64-linux"
|
||||
];
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
|
||||
sops.secrets."root/.ssh/id_ed25519" = {
|
||||
owner = "root";
|
||||
path = "/root/.ssh/id_ed25519";
|
||||
};
|
||||
sops.secrets."services/ssh/host-key" = {
|
||||
owner = "root";
|
||||
path = "/etc/secrets/initrd/ssh_host_ed25519_key";
|
||||
};
|
||||
sops.age.sshKeyPaths = lib.mkForce [ "/persist/ssh/ssh_host_ed25519_key" ];
|
||||
services.bind.forwarders = lib.mkForce [ ];
|
||||
boot.loader.systemd-boot.configurationLimit = lib.mkForce 1;
|
||||
services.tailscale.useRoutingFeatures = "server";
|
||||
services.postgresql.settings = {
|
||||
max_connections = 200;
|
||||
shared_buffers = "6GB";
|
||||
effective_cache_size = "18GB";
|
||||
maintenance_work_mem = "1536MB";
|
||||
checkpoint_completion_target = 0.9;
|
||||
wal_buffers = "16MB";
|
||||
default_statistics_target = 100;
|
||||
random_page_cost = 1.1;
|
||||
effective_io_concurrency = 200;
|
||||
work_mem = "15728kB";
|
||||
min_wal_size = "1GB";
|
||||
max_wal_size = "4GB";
|
||||
max_worker_processes = 4;
|
||||
max_parallel_workers_per_gather = 2;
|
||||
max_parallel_workers = 4;
|
||||
max_parallel_maintenance_workers = 2;
|
||||
};
|
||||
|
||||
services.restic.backups.sysbackup.paths = [ "/persist" ];
|
||||
}
|
14
config/kde.nix
Normal file
14
config/kde.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
security.pam.services.sddm.u2fAuth = true;
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
wayland.compositor = "kwin";
|
||||
};
|
||||
services.xserver = {
|
||||
desktopManager.plasma6.enable = true;
|
||||
#desktopManager.plasma5.enable = true;
|
||||
displayManager.defaultSession = "plasma";
|
||||
#displayManager.defaultSession = "plasmawayland";
|
||||
};
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
services.xserver.enable = !config.isSway;
|
||||
services.displayManager.sddm = {
|
||||
enable = !config.isSway;
|
||||
wayland.enable = true;
|
||||
wayland.compositor = "kwin";
|
||||
};
|
||||
services.desktopManager.plasma6.enable = !config.isSway;
|
||||
|
||||
imports = [
|
||||
./i18n.nix
|
||||
];
|
||||
|
||||
home-manager.users.darkkirb.imports =
|
||||
if !config.isSway then
|
||||
[
|
||||
./home-manager.nix
|
||||
]
|
||||
else
|
||||
[ ];
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ plasma-manager, ... }:
|
||||
{
|
||||
programs.plasma.enable = true;
|
||||
programs.plasma.configFile.baloofilerc."Basic Settings"."Indexing-Enabled" = false;
|
||||
programs.plasma.configFile.kwalletrc."org.freedesktop.secrets".apiEnabled = false;
|
||||
imports = [
|
||||
plasma-manager.homeManagerModules.plasma-manager
|
||||
./theming.nix
|
||||
./krdp.nix
|
||||
./konsole.nix
|
||||
];
|
||||
programs.plasma.kwin.virtualDesktops = {
|
||||
rows = 3;
|
||||
number = 9;
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.libinput.enable = true;
|
||||
services.xserver.xkb = {
|
||||
layout = "de";
|
||||
variant = "neo";
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.konsole = {
|
||||
enable = true;
|
||||
defaultProfile = "Stylix";
|
||||
profiles.Stylix.colorScheme = "Stylix";
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.plasma.configFile.krdpserverrc.General = {
|
||||
Autostart = true;
|
||||
Certificate = config.sops.secrets.".local/share/krdpserver/krdp.crt".path;
|
||||
CertificateKey = config.sops.secrets.".local/share/krdpserver/krdp.key".path;
|
||||
Users = "darkkirb";
|
||||
};
|
||||
sops.secrets.".local/share/krdpserver/krdp.key".sopsFile = ./krdp.yaml;
|
||||
sops.secrets.".local/share/krdpserver/krdp.crt".sopsFile = ./krdp.yaml;
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
.local:
|
||||
share:
|
||||
krdpserver:
|
||||
krdp.key: ENC[AES256_GCM,data:U5QhG2Ac5Dym8E0BToa+MNWUm6AHrqoxAu7RZjIWH5NjeK+Mt6fwuim1vTt55GZL7dkXehUc58NIUc7RgAIdY49+1akdOCzKWCtkGXW2jBS5p6bQt//9UlYS+P7olS9Mc6UWZ+2cSJw6Kz0rcLppuX3gjDcn6s3mOq7/RwYFdoFgjO24CLAVe6UUhRRIhgRCUe/fYzXR1KfuNPGe5SVtgfASKOdI06V9yeYo5gWqVaYa53rm6TALNgxzUCqynKxylO8o9qShlJJ4jexzy611rBAyOt4200BQV+cbmEUC+3RSLZpMDwYXo++mg0BMWvtk0uKGD6fhHV9zOajUeWLoSpKDj9z6EQv9mxrRMjJVRd9xXYzn8NQymIJi4jFN+C5RIV540rCs9nOx/eyVG0rpv4eBsZ5Q6jAWNp2vLHIMqw1+4K/AMSaF2o+b/c6p/DHLFcuOlRsTMdAO8FqHJ5d9g7fRe48ePpFagMXa7JwEAeVOOdbEGZpWl9D3DLKskCQos/rfGEKsFjOCA2MJ229RwZ0FVA3zbOSYXFxnqB7AiSGlasSY2CZ27U9X4KnSzgYXC9KAUR5I5S1cbr87as7zmh5lhWA9wsQuMnRRvn3iunPMEv6mYQZ7Rh0Z1Q4MrsEQ+F4Y6+4LjqGXOY3TdwpInu0vawZEI1S+bnLtzLQuCXLPc5t07zuqU7I/zJ0uRwMnPC7lRLOX55NHZHtEiafbRVw7vNltsH2QyWOafEPPLhp/ZvhH33C2kgZ56b6yJbhBVRDBYdb1ViLYv5JLhcn59G+y7wiCHThd0wllMs6g9rCCcAgSqdQzFhLoLxje2roDKHd0xeaTivgHxjaVEKLmfXCVqwzjoeAKALcv8baBxBBQn9//EKRnfw7D478DfWUIIp6ox7Pmc2kYvl3GQZ/Zj5NvN45hK4wGtV7k7JGYxig4YmePt8dGkMkcM14elOlW8fy5N+jmPA/NOOUHOU53p6Dg0dsiNaqtITSYYWfIHDGhVfS3zP6+p/MXPL2/cYBXXB4sceocvdzbEPwjbh3pcKanX9hwk7EFOZ0GH6843EPmg+7+N6kv9DAta1o+ZeEcLID/ItOw4K84xInRYYaXReZGJtVuiee/YV5YtALu51j7trrI/dyfLhveuVGgTb1VKw6dvULcg24Dtt1OZCW7U/xT8gJ5HtPS6jFyB+a7iK27qukRuuNt6j8NNzmpZtId9Iu+yb7HNEL0tvYhh3fzFcZFB8ncDuYk16b4EqhVfqjPUrkcUGrBSocmY4xC6p4qig4ZOrA1BsYJXrO3ytlBrnCA0DNx/UVoe5lrAp5z4kDuAKLW01BSJk48cpuBcKDAIBaLNbirHLw8WsX61lnhTh5o4hmzASJ9KiBIe9u5+zbyZFfXrm3xkCMY/vez9vrS+BVwFD3GNndbPEchyUbAGjkaP0m9kjqAPfijFHtGtGl3z9I5/VIsfLF1FDBUV9joWoZ4qNRNQjHP/vMZK194KlUPTTEwkKf4W655XsFTMfpu+Au14Em1jnKKw4jJ7Omz9DuOi8Aut/mX6iVWUgQChcI8cjY9UAzcxJbgUCCPOxdGS2l4ExhxPMdzL43IurkILWV8cQYwMMXImRlV2RYtwOhQayeeaRVInLmGi8Ro5YXwFLfjBM1gEV7KmCq9T+SN9gJfPELabB6iSypAImfiO3dWBKn5ftL6qVolaM+PocBQpQ3B50rBkMdVseKTi39Gz4Rhl04w+GSSsggB60JcTG1VftePML3m//bpn/QvtZP2w3rrKuuWKSHzFTXazMZAgJBE+LZ55r7Az43N2E4LMW8tyI36wVWCrxXffNYK4TCh4uzBXxFHjsE3DNa/DZacRMIauTwRJOqp5lkdBG3ukgIt9GsJQZ7UHlr44nD0hGg4Oon3deCVBDexUoiD1ooZ4LRKEvXTeznB7UMA9G2OIAMThdCVyQBzYRPo2yO4fFH6nIZ0atbq1FGX2X5Ub9hcshXxcb6+N1btFIcKwELMmMWrLLbXaDXmh3ycIlS8HqrYe37DzkTEXQ30ChOgjJrRFubvbXvB2aQE9BY5ap2rPf0FOzGAsKFYq0BF8d4UCySPZLrSXGURDT+ZUMUiY/DBmWl28oPihP8J6tsqSaI78hRF6FOAJnIsw7r9EcK7hGHbbL8qBCHmSRyoFyOhhwVKqNq8yi14dwlhAjKTRMCejKL6GqLwIgM4Ow/woMNmZep+OZfefUEx6F+sTW1JETmixL1OW1u+UXdnax+rqdg+PKGjFoFpg4UD,iv:YWvImaFa5GXiraaF7UVt3fAsuYIK+RpHkSQ2mPAsHz4=,tag:JvHARPOlmrKgG5Z85QokDg==,type:str]
|
||||
krdp.crt: ENC[AES256_GCM,data:/cIW8pLa1Xp3feHoGQ8ujAqcx8IQnV/+9pSxmuuYNgs0Pn9BjHhNvkXPh1z8h0LiTHQ/jks23C0TS8tyNNXYZI/w1ihGhkqlFWGkr1yC1yM0SXnDfAp/gBAAdKzIJN2rGWpK/FD+s8GH1ys1g0+V2sPrzOis0h7jwL0EWG1un6hGn9q9YLoYbJbxLlv2W2+AGM4QqUv6/p07QhUyUSwaXWDrPZ2Sr1PZfRX30Zj4McM3TS9keyobOWS99kphBjX/c4TD+zMfMeSZRptcUiLQH03R9OPRSmr+xe72xNjMBKdkElc1wANc1H3g/upgTFZDwEpadd+YCvUFPVr1vxaIFfIz2jsWar4g802nY/jJfH+iWziNzkBI3jWpfSsIupWRHMB690mqp7UvUpSTwx4gcUB7L52MAUXEYMfYxws+kVHr3P2YsjkJ3PDESE/42/UuxA5Ccy0LxynCQWqa9/dnc84jQeYfKL5nuFozHqeRbfvPkvkc1U2I+18oEnCmTV3AR1XrV9iH0DLrVJ81eKd1UuZz468x+7B6NtWCOU4D4mABQWTAW6XbxA69qIZNv7/g4tBxc85iuZ6dxNV2TY6QA3+foYaD1Y5LD5Cslgs6r6RTIHrQ2Pmj4fQvA2pSk46rXUFCsyTq2heEiXFvlqY8YTLM3MsEV+KUQg4Cd1koUM5JlOAF+fHaNkOAQjc01QdZM79yJSrJByb6tvsLfjioYYl/EsJkUmc4cBeWkS1C0ap/mcaUSZy7QCC4FGUI62cFa1ClbqK9IIVXy3BL1oeD6OYxul7TX+2GB/tSgxGXZkQFdIRoQGo0Rkl7Jjlp+b8vfx+E9byA4gfoIi9T00EDlffNT446l2/3EbTNiW7HGYPD0hFyBDz7T5sOLS4Pv/hEDt5Yn9Fgyh+k434PuVcLxCtqJ+XMVU5U2hKukkk9MvezlbeH+w6dVRp3IkSWVE5SaIHZZmdOQGKINXOd7ez274qgMcFfWXpfw8MsbZU6VfK8orpmhCj5agSfiuZSLQRhonsaBbh/xzfXcThy51E4eqIZTMl2DrzKnN1+R061C0n2yhNG4ftZqsyqfEtMSkq5sUGhjl8H+aWFl+go2wsZhRcpFQa6dcZFmJvHblWnWPvfAesYoaVr7ZtGKLgA2Pt1Q9RE/5PdSfKZbziFIEGNpx4v5yt4hRwC0n+lCL6fm0vJ124gdufizxWoY7BKsi56cwYaeRrYARJ8OUl901DQNIbHNvfjrnUUqIQsn4CYT3bp78AxSRZLTWbS9yrm4K6pVUiJBI8KdvHhLaEYfGhP0+apaw/OT1x2McmH/gIBuxjanDs7OWWJ/D8OUdM9Dv6WNV6kitS8NMLmQaOhEMxt/plOGrGzzk5VgiDxmc/J8O5AFDc0XQLYy0rTR9h7Gj6oDnlIZahtL0qxSvO7QdG0fxho+zqT+N7JW92iZs6OhdkUIeUelBDtMXsstbhmx1/DBQrKhUJjhOVjoJE724Xhuu0mIOTznvaiwK7wbSLz5kOykvUIXoeaV74CQAn16Kv/JhHz4v6+7ZWXSp5BGe7RXXPpGtyb+W23dMOPxaRkQnHTh2nTET1Sr1FnyL0Ei5Je9uZ6NjubxlTRRgYPhRsOkr5/TmCnN0RtMaZxpvhB3s+d8HfvXE13zn0AVYTO,iv:AjoxETlmSVqKF2lEc73mKrtSV5HbKOQPLIUWUAdiwuo=,tag:m95ON0puJ+bXGF+vrWYd8g==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1tltjgexkp5fz3rum4j0k66ty5q4u8ptvkgkepumd20zal24g2qfs5xgw76
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA3WUQyb0dmRElyemJ2RDlE
|
||||
ZzR1WE1VR2hNNUs3YlFObWdESmNYTDI1b0NzCk5SNXBCaUlRcFh4QXk1WmVseHdF
|
||||
YUV4M0tUWlVLSUxKdGMzVXRkdERGWWcKLS0tIGxBYlJXUjIvSXZxRG9mMk14YTlu
|
||||
RVp3VWxEQUtZdktoemVmN2FMYWZIUmMKV7/6sHEvevafH/yf3sEqpsgFwJefCoE+
|
||||
dl9mzJ/RDjcIQMllJskdcqYRSMPwBLG2+doxIpJ1rZkGqa2t0unarw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age15g6tzvcmcp3ae4hwnn4pwewat6eq9unlhtjrlaka6rf94ej9dd5qqpgt7u
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBJUFo1SEhKbm5PUjFNVjBl
|
||||
RlNpakxRTkVSY1RSSzhBeTBUSjE5RzhVQmpBCmx0aGcyY0lORmFCWFlIWGlPZ2ZT
|
||||
RmQycEZTWWFVZXRVZk9JcU1JZ1ViTlEKLS0tIGxOR09MSmVKVm44Q0NtbFFqUklN
|
||||
aE52LzRtc25GUG9ibGsxcXJWaTZlQWMKafTEZA7jS2D/lIR05ham1axBmKh+v+6F
|
||||
EZnTVwFpyFzw/Kpbc6PHQ6D+/7gq75tZOrbllH7bUNeWphUyC+N8Vw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-11-17T10:00:38Z"
|
||||
mac: ENC[AES256_GCM,data:4HH7jjZBZY621EA4beI/hIuuXvqztJT1x3dTGSNshZzntIKealr74blBdwy+Fb/mPeJH/WuA4XVXcjupZhKN76nM5/BbW1w4fOmP3Hjpo0LHsc6I7J/BgoMv3SItXQdRGgQGE9XivbS5zieb/+NFl0eTvT6jIlUQUznTOOmGDyU=,iv:RTKUVAAieUPKXCeT0/5PxMPNOPxPAkP9ZqPHzamVRa0=,tag:wwMpIIlus/R1RQdOa7MLmg==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.1
|
|
@ -1,42 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.plasma = {
|
||||
workspace = {
|
||||
lookAndFeel = "org.kde.breezedark.desktop";
|
||||
};
|
||||
hotkeys.commands."launch-konsole" = {
|
||||
name = "Launch Konsole";
|
||||
key = "Meta+Alt+K";
|
||||
command = "konsole";
|
||||
};
|
||||
panels = [
|
||||
# Windows-like panel at the bottom
|
||||
{
|
||||
location = "bottom";
|
||||
screen = "all";
|
||||
widgets = [
|
||||
"org.kde.plasma.kickoff"
|
||||
"org.kde.plasma.icontasks"
|
||||
"org.kde.plasma.marginsseparator"
|
||||
"org.kde.plasma.systemtray"
|
||||
"org.kde.plasma.pager"
|
||||
"org.kde.plasma.digitalclock"
|
||||
];
|
||||
}
|
||||
# Global menu at the top
|
||||
{
|
||||
location = "top";
|
||||
height = 26;
|
||||
widgets = [ "org.kde.plasma.appmenu" ];
|
||||
screen = "all";
|
||||
}
|
||||
];
|
||||
configFile.kwinrc."NightColor" = {
|
||||
Active = true;
|
||||
LatitudeFixed = 51;
|
||||
LongitudeFixed = 13;
|
||||
Mode = "Location";
|
||||
NightTemperature = 4200;
|
||||
};
|
||||
};
|
||||
}
|
211
config/nas.nix
Normal file
211
config/nas.nix
Normal file
|
@ -0,0 +1,211 @@
|
|||
{
|
||||
config,
|
||||
modulesPath,
|
||||
lib,
|
||||
nixos-hardware,
|
||||
nixpkgs,
|
||||
pkgs,
|
||||
...
|
||||
} @ args: {
|
||||
networking.hostName = "nas";
|
||||
networking.hostId = "70af00ed";
|
||||
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
./systemd-boot.nix
|
||||
./services/tpm2.nix
|
||||
./server.nix
|
||||
./services/hydra.nix
|
||||
nixos-hardware.nixosModules.common-cpu-amd
|
||||
nixos-hardware.nixosModules.common-pc-ssd
|
||||
./services/syncthing.nix
|
||||
../modules/tc-cake.nix
|
||||
./services/cups.nix
|
||||
./services/iscsi.nix
|
||||
./services/docker.nix
|
||||
./users/remote-build.nix
|
||||
./services/nfs.nix
|
||||
./services/tempo.nix
|
||||
./services/loki.nix
|
||||
./services/prometheus.nix
|
||||
./services/yiff-stash.nix
|
||||
./services/reverse-proxy.nix
|
||||
./services/jellyfin.nix
|
||||
./services/mautrix-discord.nix
|
||||
./services/mautrix-telegram.nix
|
||||
./services/mautrix-whatsapp.nix
|
||||
./services/mautrix-signal.nix
|
||||
./services/synapse.nix
|
||||
./services/heisenbridge.nix
|
||||
#./services/kubernetes.nix
|
||||
./services/forgejo-runner.nix
|
||||
./services/renovate.nix
|
||||
./services/mautrix-slack.nix
|
||||
];
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" "bcache"];
|
||||
boot.initrd.kernelModules = ["igb"];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [
|
||||
config.boot.kernelPackages.zenpower
|
||||
];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/bcache0";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=root" "compress=zstd"];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/bcache0";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=home" "compress=zstd"];
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/bcache0";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=nix" "compress=zstd" "noatime"];
|
||||
};
|
||||
|
||||
services.snapper.configs.main = {
|
||||
SUBVOLUME = "/";
|
||||
TIMELINE_LIMIT_HOURLY = 5;
|
||||
TIMELINE_LIMIT_DAILY = 7;
|
||||
TIMELINE_LIMIT_WEEKLY = 4;
|
||||
TIMELINE_LIMIT_MONTHLY = 12;
|
||||
TIMELINE_LIMIT_YEARLY = 0;
|
||||
};
|
||||
services.beesd.filesystems.root = {
|
||||
spec = "/";
|
||||
hashTableSizeMB = 2048;
|
||||
verbosity = "crit";
|
||||
extraOptions = ["--loadavg-target" "5.0"];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/nvme0n1p1";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
environment.etc."sysconfig/lm_sensors".text = ''
|
||||
# Generated by sensors-detect on Sun Apr 24 08:31:51 2022
|
||||
# This file is sourced by /etc/init.d/lm_sensors and defines the modules to
|
||||
# be loaded/unloaded.
|
||||
#
|
||||
# The format of this file is a shell script that simply defines variables:
|
||||
# HWMON_MODULES for hardware monitoring driver modules, and optionally
|
||||
# BUS_MODULES for any required bus driver module (for example for I2C or SPI).
|
||||
|
||||
HWMON_MODULES="it87"
|
||||
'';
|
||||
nix.settings.cores = 12;
|
||||
nix.settings.system-features = [
|
||||
"kvm"
|
||||
"nixos-test"
|
||||
"big-parallel"
|
||||
"benchmark"
|
||||
"gccarch-znver1"
|
||||
"gccarch-skylake"
|
||||
"ca-derivations"
|
||||
];
|
||||
boot.binfmt.emulatedSystems = [
|
||||
"armv7l-linux"
|
||||
"powerpc-linux"
|
||||
"powerpc64-linux"
|
||||
"powerpc64le-linux"
|
||||
"wasm32-wasi"
|
||||
"riscv32-linux"
|
||||
"riscv64-linux"
|
||||
];
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
nix.settings.substituters = lib.mkForce [
|
||||
"https://attic.chir.rs/chir-rs/"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
nix.daemonCPUSchedPolicy = "idle";
|
||||
nix.daemonIOSchedClass = "idle";
|
||||
|
||||
system.stateVersion = "22.05";
|
||||
home-manager.users.darkkirb = import ./home-manager/darkkirb.nix {
|
||||
desktop = false;
|
||||
inherit args;
|
||||
};
|
||||
|
||||
networking.tc_cake = {
|
||||
enp2s0f0u4 = {
|
||||
disableOffload = true;
|
||||
shapeEgress = {
|
||||
bandwidth = "4mbit";
|
||||
extraArgs = "docsis nat ack-filter";
|
||||
};
|
||||
shapeIngress = {
|
||||
bandwidth = "33mbit";
|
||||
ifb = "ifb4enp2s0f0u4";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.postgresql.settings = {
|
||||
max_connections = 200;
|
||||
shared_buffers = "4GB";
|
||||
effective_cache_size = "12GB";
|
||||
maintenance_work_mem = "1GB";
|
||||
checkpoint_completion_target = 0.9;
|
||||
wal_buffers = "16MB";
|
||||
default_statistics_target = 100;
|
||||
random_page_cost = 1.1;
|
||||
effective_io_concurrency = 200;
|
||||
work_mem = "5242kB";
|
||||
min_wal_size = "1GB";
|
||||
max_wal_size = "4GB";
|
||||
max_worker_processes = 12;
|
||||
max_parallel_workers_per_gather = 4;
|
||||
max_parallel_workers = 12;
|
||||
max_parallel_maintenance_workers = 4;
|
||||
};
|
||||
services.tailscale.useRoutingFeatures = "both";
|
||||
hardware.sane.brscan4.enable = true;
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/dev/sda2";
|
||||
}
|
||||
{
|
||||
device = "/dev/sdb2";
|
||||
}
|
||||
{
|
||||
device = "/dev/sdc2";
|
||||
}
|
||||
];
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
services.restic.backups.sysbackup = {
|
||||
paths = ["/media"];
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 4"
|
||||
"--keep-monthly 12"
|
||||
"--keep-yearly 10"
|
||||
];
|
||||
};
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
#enableNvidia = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [docker runc];
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
networking.networkmanager.enable = true;
|
||||
users.users.darkkirb.extraGroups = [ "networkmanager" ];
|
||||
environment.persistence."/persistent".directories = [
|
||||
"/var/lib/NetworkManager"
|
||||
"/etc/NetworkManager"
|
||||
];
|
||||
}
|
208
config/nix.nix
Normal file
208
config/nix.nix
Normal file
|
@ -0,0 +1,208 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
system,
|
||||
attic,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./workarounds
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
settings = {
|
||||
sandbox = true;
|
||||
trusted-users = ["@wheel" "remote-build"];
|
||||
require-sigs = true;
|
||||
substituters = [
|
||||
"https://attic.chir.rs/chir-rs/"
|
||||
"https://hydra.int.chir.rs"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nixcache:8KKuGz95Pk4UJ5W/Ni+pN+v+LDTkMMFV4yrGmAYgkDg="
|
||||
"hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs="
|
||||
"chir-rs:rzK1Czm3RqBbZLnXYrLM6JyOhfr6Z/8lhACIPO/LNFQ="
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes ca-derivations
|
||||
'';
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
buildMachines = with lib;
|
||||
mkMerge [
|
||||
(mkIf (config.networking.hostName != "instance-20221213-1915") [
|
||||
{
|
||||
hostName = "build-aarch64";
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
"riscv32-linux"
|
||||
"riscv64-linux"
|
||||
];
|
||||
maxJobs = 4;
|
||||
speedFactor = 1;
|
||||
supportedFeatures = ["nixos-test" "benchmark" "ca-derivations" "gccarch-armv8-a" "gccarch-armv8.1-a" "gccarch-armv8.2-a" "big-parallel"];
|
||||
}
|
||||
])
|
||||
(mkIf (config.networking.hostName != "nas") [
|
||||
{
|
||||
hostName = "build-nas";
|
||||
systems = [
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
"armv7l-linux"
|
||||
"powerpc-linux"
|
||||
"powerpc64-linux"
|
||||
"powerpc64le-linux"
|
||||
"wasm32-wasi"
|
||||
"riscv32-linux"
|
||||
"riscv64-linux"
|
||||
];
|
||||
maxJobs = 12;
|
||||
speedFactor = 1;
|
||||
supportedFeatures = [
|
||||
"kvm"
|
||||
"nixos-test"
|
||||
"big-parallel"
|
||||
"benchmark"
|
||||
"gccarch-znver1"
|
||||
"gccarch-skylake"
|
||||
"ca-derivations"
|
||||
];
|
||||
}
|
||||
])
|
||||
(mkIf (config.networking.hostName != "rainbow-resort") [
|
||||
{
|
||||
hostName = "build-rainbow-resort";
|
||||
systems = [
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
"armv7l-linux"
|
||||
"powerpc-linux"
|
||||
"powerpc64-linux"
|
||||
"powerpc64le-linux"
|
||||
"wasm32-wasi"
|
||||
"riscv32-linux"
|
||||
"riscv64-linux"
|
||||
];
|
||||
maxJobs = 16;
|
||||
speedFactor = 1;
|
||||
supportedFeatures = [
|
||||
"kvm"
|
||||
"nixos-test"
|
||||
"big-parallel"
|
||||
"benchmark"
|
||||
"gccarch-skylake-avx512"
|
||||
"gccarch-znver3"
|
||||
"gccarch-znver2"
|
||||
"gccarch-znver1"
|
||||
"gccarch-skylake"
|
||||
"ca-derivations"
|
||||
];
|
||||
}
|
||||
])
|
||||
(mkIf (config.networking.hostName != "vf2") [
|
||||
{
|
||||
hostName = "build-riscv";
|
||||
systems = [
|
||||
"riscv32-linux"
|
||||
"riscv64-linux"
|
||||
];
|
||||
maxJobs = 4;
|
||||
speedFactor = 2;
|
||||
supportedFeatures = [
|
||||
"nixos-test"
|
||||
"big-parallel"
|
||||
"benchmark"
|
||||
"ca-derivations"
|
||||
# There are many more combinations but i simply do not care lol
|
||||
"gccarch-rv64gc_zba_zbb"
|
||||
"gccarch-rv64gc_zba"
|
||||
"gccarch-rv64gc_zbb"
|
||||
"gccarch-rv64gc"
|
||||
"gccarch-rv32gc_zba_zbb"
|
||||
"gccarch-rv32gc_zba"
|
||||
"gccarch-rv32gc_zbb"
|
||||
"gccarch-rv32gc"
|
||||
"native-riscv"
|
||||
];
|
||||
}
|
||||
])
|
||||
];
|
||||
distributedBuilds = true;
|
||||
};
|
||||
systemd.services.nix-daemon.environment.TMPDIR = "/build";
|
||||
systemd.services.nixos-upgrade = {
|
||||
description = "NixOS Upgrade";
|
||||
|
||||
restartIfChanged = false;
|
||||
unitConfig.X-StopOnRemoval = false;
|
||||
|
||||
serviceConfig.Type = "oneshot";
|
||||
|
||||
path = with pkgs; [
|
||||
coreutils
|
||||
gnutar
|
||||
xz.bin
|
||||
gzip
|
||||
gitMinimal
|
||||
config.nix.package.out
|
||||
config.programs.ssh.package
|
||||
jq
|
||||
curl
|
||||
];
|
||||
|
||||
script = lib.mkDefault ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
set -ex
|
||||
builds=$(${pkgs.curl}/bin/curl -H 'accept: application/json' https://hydra.int.chir.rs/jobset/flakes/${
|
||||
if config.networking.hostName != "vf2"
|
||||
then "nixos-config"
|
||||
else "nixos-config-riscv"
|
||||
}/evals | ${pkgs.jq}/bin/jq -r '.evals[0].builds[]')
|
||||
for build in $builds; do
|
||||
doc=$(${pkgs.curl}/bin/curl -H 'accept: application/json' https://hydra.int.chir.rs/build/$build)
|
||||
jobname=$(echo $doc | ${pkgs.jq}/bin/jq -r '.job')
|
||||
if [ "$jobname" = "${config.networking.hostName}.${system}" ]; then
|
||||
drvname=$(echo $doc | ${pkgs.jq}/bin/jq -r '.drvpath')
|
||||
output=$(${pkgs.nix}/bin/nix-store -r $drvname)
|
||||
|
||||
${pkgs.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set $output
|
||||
|
||||
${
|
||||
if config.networking.hostName != "nixos-8gb-fsn1-1"
|
||||
then ''
|
||||
$output/bin/switch-to-configuration boot
|
||||
booted="$(${pkgs.coreutils}/bin/readlink /run/booted-system/{initrd,kernel,kernel-modules})"
|
||||
built="$(${pkgs.coreutils}/bin/readlink $output/{initrd,kernel,kernel-modules})"
|
||||
if [ "$booted" = "$built" ]; then
|
||||
$output/bin/switch-to-configuration switch
|
||||
else
|
||||
${pkgs.systemd}/bin/shutdown -r +1
|
||||
fi
|
||||
exit
|
||||
''
|
||||
else "$output/bin/switch-to-configuration switch"
|
||||
}
|
||||
fi
|
||||
done
|
||||
'';
|
||||
after = ["network-online.target"];
|
||||
wants = ["network-online.target"];
|
||||
};
|
||||
systemd.timers.nixos-upgrade = {
|
||||
enable = true;
|
||||
description = "Automatically update nixos";
|
||||
requires = ["nixos-upgrade.service"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
timerConfig = {
|
||||
OnUnitActiveSec = "30min";
|
||||
RandomizedDelaySec = "1h";
|
||||
};
|
||||
};
|
||||
}
|
215
config/nixos-8gb-fsn1-1.nix
Normal file
215
config/nixos-8gb-fsn1-1.nix
Normal file
|
@ -0,0 +1,215 @@
|
|||
{
|
||||
lib,
|
||||
modulesPath,
|
||||
pkgs,
|
||||
config,
|
||||
system,
|
||||
...
|
||||
} @ args: {
|
||||
networking.hostName = "nixos-8gb-fsn1-1";
|
||||
networking.hostId = "73561e1f";
|
||||
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
./grub.nix
|
||||
./server.nix
|
||||
./services/named.nix
|
||||
./services/grafana.nix
|
||||
./users/miifox.nix
|
||||
./services/postgres.nix
|
||||
./services/dovecot.nix
|
||||
./services/postfix.nix
|
||||
./services/reverse-proxy.nix
|
||||
./services/matrix-media-repo.nix
|
||||
./bittorrent-blocker.nix
|
||||
./services/akkoma
|
||||
./services/peertube
|
||||
./services/rspamd.nix
|
||||
./wireguard/public-server.nix
|
||||
./services/shitalloverme.nix
|
||||
./services/initrd-ssh.nix
|
||||
./wireguard
|
||||
./zfs.nix
|
||||
#./services/kubernetes.nix
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "virtio_pci" "virtio_scsi" "xhci_pci" "sd_mod" "sr_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
boot.supportedFilesystems = ["zfs"];
|
||||
boot.loader.grub.devices = ["/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_16151622"];
|
||||
boot.loader.timeout = 5;
|
||||
boot.initrd.luks.devices = {
|
||||
disk0 = {
|
||||
device = "/dev/disk/by-partuuid/29ccd4c9-5ef5-a146-8e42-9244f712baca";
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "tank/nixos";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "tank/nixos/nix";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/etc" = {
|
||||
device = "tank/nixos/etc";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/var" = {
|
||||
device = "tank/nixos/var";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib" = {
|
||||
device = "tank/nixos/var/lib";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/minio" = {
|
||||
device = "tank/nixos/var/lib/minio";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/minio/disk0" = {
|
||||
device = "tank/nixos/var/lib/minio/disk0";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/minio/disk1" = {
|
||||
device = "tank/nixos/var/lib/minio/disk1";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/minio/disk2" = {
|
||||
device = "tank/nixos/var/lib/minio/disk2";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/minio/disk3" = {
|
||||
device = "tank/nixos/var/lib/minio/disk3";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/var/log" = {
|
||||
device = "tank/nixos/var/log";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/var/spool" = {
|
||||
device = "tank/nixos/var/spool";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "tank/userdata/home";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/root" = {
|
||||
device = "tank/userdata/home/root";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/home/darkkirb" = {
|
||||
device = "tank/userdata/home/darkkirb";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/home/miifox" = {
|
||||
device = "tank/userdata/home/miifox";
|
||||
fsType = "zfs";
|
||||
options = ["zfsutil"];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/8E14-4366";
|
||||
fsType = "vfat";
|
||||
options = ["X-mount.mkdir"];
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
system.stateVersion = "21.11";
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks."ens3".extraConfig = ''
|
||||
[Match]
|
||||
Name = ens3
|
||||
[Network]
|
||||
Address = 2a01:4f8:1c17:d953:b4e1:08ff:e658:6f49/64
|
||||
Gateway = fe80::1
|
||||
'';
|
||||
};
|
||||
|
||||
networking.wireguard.interfaces."wg0".ips = ["fd0d:a262:1fa6:e621:b4e1:08ff:e658:6f49/64"];
|
||||
home-manager.users.darkkirb = import ./home-manager/darkkirb.nix {
|
||||
desktop = false;
|
||||
inherit args;
|
||||
};
|
||||
nix.settings.cores = 2;
|
||||
nix.settings.max-jobs = 2;
|
||||
nix.daemonCPUSchedPolicy = "idle";
|
||||
nix.daemonIOSchedClass = "idle";
|
||||
|
||||
nix.settings.system-features = [
|
||||
"kvm"
|
||||
"nixos-test"
|
||||
"big-parallel"
|
||||
"benchmark"
|
||||
"gccarch-skylake"
|
||||
"ca-derivations"
|
||||
];
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
services.postgresql.settings = {
|
||||
max_connections = 200;
|
||||
shared_buffers = "1GB";
|
||||
effective_cache_size = "3GB";
|
||||
maintenance_work_mem = "256MB";
|
||||
checkpoint_completion_target = 0.9;
|
||||
wal_buffers = "16MB";
|
||||
default_statistics_target = 100;
|
||||
random_page_cost = 1.1;
|
||||
effective_io_concurrency = 200;
|
||||
work_mem = "52422kB";
|
||||
min_wal_size = "1GB";
|
||||
max_wal_size = "4GB";
|
||||
max_worker_processes = 2;
|
||||
max_parallel_workers_per_gather = 1;
|
||||
max_parallel_workers = 2;
|
||||
max_parallel_maintenance_workers = 1;
|
||||
};
|
||||
|
||||
services.resolved.enable = false;
|
||||
services.bind.forwarders = lib.mkForce [];
|
||||
services.tailscale.useRoutingFeatures = "server";
|
||||
services.caddy.virtualHosts."darkkirb.de" = {
|
||||
useACMEHost = "darkkirb.de";
|
||||
logFormat = pkgs.lib.mkForce "";
|
||||
extraConfig = ''
|
||||
redir https://lotte.chir.rs
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{
|
||||
inTester,
|
||||
system,
|
||||
self,
|
||||
rust-overlay,
|
||||
nix-vscode-extensions,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports =
|
||||
if !inTester then
|
||||
(
|
||||
[
|
||||
./inputs-overlay.nix
|
||||
]
|
||||
++ (
|
||||
if system == "riscv64-linux" then
|
||||
[
|
||||
./riscv.nix
|
||||
./riscv-cross-packages.nix
|
||||
]
|
||||
else
|
||||
[ ]
|
||||
)
|
||||
)
|
||||
else
|
||||
[ ];
|
||||
}
|
||||
// (
|
||||
if !inTester then
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
self.overlays.default
|
||||
(import rust-overlay)
|
||||
nix-vscode-extensions.overlays.default
|
||||
];
|
||||
}
|
||||
else
|
||||
{ }
|
||||
)
|
|
@ -1,22 +0,0 @@
|
|||
{ pureInputs, lib, ... }:
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(_: _: {
|
||||
inputs = pureInputs;
|
||||
})
|
||||
];
|
||||
environment.etc."nix/inputs/nixpkgs-overlays/inputs.nix".text =
|
||||
let
|
||||
inputsToLoadString = lib.mapAttrsToList (
|
||||
name: value:
|
||||
''${name} = ${if value._type or "" == "flake" then "loadFlake \"${value}\"" else "${value}"};''
|
||||
) pureInputs;
|
||||
in
|
||||
''
|
||||
_: _: let loadFlake = builtins.getFlake or (import ${pureInputs.flake-compat}); in {
|
||||
inputs = {
|
||||
${lib.concatStringsSep "\n" inputsToLoadString}
|
||||
};
|
||||
}
|
||||
'';
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
# Cross compiled packages for when shit breaks
|
||||
{
|
||||
nixpkgs,
|
||||
lix,
|
||||
...
|
||||
}:
|
||||
let
|
||||
pkgs_x86_64 = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
crossSystem.system = "riscv64-linux";
|
||||
overlays = [ lix.overlays.default ];
|
||||
};
|
||||
pkgs_x86_64_2 = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
crossSystem.system = "riscv64-linux";
|
||||
};
|
||||
in
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
inherit (pkgs_x86_64) lix pandoc;
|
||||
inherit (pkgs_x86_64_2) nixos-option;
|
||||
})
|
||||
];
|
||||
environment.etc."nix/inputs/nixpkgs-overlays/riscv-cross-packages.nix".text = ''
|
||||
self: _: let pkgs_x86_64 = import <nixpkgs> {
|
||||
system = "x86_64-linux";
|
||||
crossSystem.system = "riscv64-linux";
|
||||
overlays = [self.inputs.lix.overlays.default];
|
||||
}
|
||||
pkgs_x86_64_2 = import <nixpkgs> {
|
||||
system = "x86_64-linux";
|
||||
crossSystem.system = "riscv64-linux";
|
||||
overlays = [];
|
||||
}; in {
|
||||
inherit (pkgs_x86_64) lix pandoc;
|
||||
inherit (pkgs_x86_64_2) nixos-option;
|
||||
}
|
||||
'';
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ riscv-overlay, ... }:
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
riscv-overlay.overlays.default
|
||||
];
|
||||
environment.etc."nix/inputs/nixpkgs-overlays/riscv-overlay.nix".text = "import ${riscv-overlay}/overlay.nix";
|
||||
}
|
|
@ -1,54 +1,42 @@
|
|||
{
|
||||
config,
|
||||
systemConfig,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
identityFile =
|
||||
if config.home.username == "root" then
|
||||
systemConfig.sops.secrets.".ssh/builder_id_ed25519".path
|
||||
else
|
||||
config.sops.secrets.".ssh/builder_id_ed25519".path;
|
||||
in
|
||||
{
|
||||
{config, ...}: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
"build-nas" = {
|
||||
hostname = "nas.int.chir.rs";
|
||||
identitiesOnly = true;
|
||||
inherit identityFile;
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/builder_id_ed25519";
|
||||
port = 22;
|
||||
user = "remote-build";
|
||||
};
|
||||
"build-rainbow-resort" = {
|
||||
hostname = "rainbow-resort.int.chir.rs";
|
||||
identitiesOnly = true;
|
||||
inherit identityFile;
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/builder_id_ed25519";
|
||||
port = 22;
|
||||
user = "remote-build";
|
||||
};
|
||||
"build-aarch64" = {
|
||||
hostname = "instance-20221213-1915.int.chir.rs";
|
||||
identitiesOnly = true;
|
||||
inherit identityFile;
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/builder_id_ed25519";
|
||||
port = 22;
|
||||
user = "remote-build";
|
||||
};
|
||||
"backup" = {
|
||||
hostname = "backup.int.chir.rs";
|
||||
identitiesOnly = true;
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/builder_id_ed25519";
|
||||
port = 22;
|
||||
user = "backup";
|
||||
};
|
||||
"build-riscv" = {
|
||||
hostname = "not522.tailbab65.ts.net";
|
||||
identitiesOnly = true;
|
||||
inherit identityFile;
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/builder_id_ed25519";
|
||||
port = 22;
|
||||
user = "remote-build";
|
||||
};
|
||||
};
|
||||
};
|
||||
sops.secrets = lib.mkIf (config.home.username != "root") {
|
||||
".ssh/builder_id_ed25519" = {
|
||||
mode = "600";
|
||||
sopsFile = ./shared-keys.yaml;
|
||||
};
|
||||
};
|
||||
}
|
4
config/programs/calendar.nix
Normal file
4
config/programs/calendar.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{...}: {
|
||||
accounts.calendar.accounts.lotte = {
|
||||
};
|
||||
}
|
6
config/programs/direnv.nix
Normal file
6
config/programs/direnv.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
6
config/programs/fcitx.nix
Normal file
6
config/programs/fcitx.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
i18n.inputMethod = {
|
||||
enabled = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [fcitx5-chinese-addons fcitx5-table-extra fcitx5-table-other fcitx5-gtk fcitx5-mozc];
|
||||
};
|
||||
}
|
36
config/programs/firefox.nix
Normal file
36
config/programs/firefox.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
pkgs,
|
||||
firefox,
|
||||
...
|
||||
}: {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
unhardened = {
|
||||
id = 1;
|
||||
};
|
||||
default = {
|
||||
userChrome = ''
|
||||
/* Hide tab bar in FF Quantum */
|
||||
@-moz-document url("chrome://browser/content/browser.xul") {
|
||||
#TabsToolbar {
|
||||
visibility: collapse !important;
|
||||
margin-bottom: 21px !important;
|
||||
}
|
||||
|
||||
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
|
||||
visibility: collapse !important;
|
||||
}
|
||||
}
|
||||
'';
|
||||
settings = {
|
||||
"font.default.x-western" = "sans-serif";
|
||||
"font.name-list.monospace.x-western" = "monospace, nasin-nanpa";
|
||||
"font.name-list.sans-serif.x-western" = "sans-serif, nasin-nanpa";
|
||||
"font.name-list.serif.x-western" = "sans-serif, nasin-nanpa";
|
||||
};
|
||||
id = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,8 +1,10 @@
|
|||
{ pkgs, systemConfig, ... }:
|
||||
{
|
||||
desktop: {pkgs, ...}: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = if systemConfig.isGraphical then pkgs.gitAndTools.gitFull else pkgs.git;
|
||||
package =
|
||||
if desktop
|
||||
then pkgs.gitAndTools.gitFull
|
||||
else pkgs.git;
|
||||
lfs.enable = true;
|
||||
userEmail = "lotte@chir.rs";
|
||||
userName = "Charlotte 🦝 Delenk";
|
||||
|
@ -11,8 +13,6 @@
|
|||
merge.conflictstyle = "diff3";
|
||||
push.autoSetupRemote = true;
|
||||
rerere.enabled = true;
|
||||
user.signingkey = "B4E3D4801C49EC5E";
|
||||
commit.gpgsign = true;
|
||||
};
|
||||
delta.enable = true;
|
||||
};
|
50
config/programs/gpg.nix
Normal file
50
config/programs/gpg.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{pkgs, ...}: {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
publicKeys = [
|
||||
{
|
||||
source = ../../keys/lotte_chir.rs.pgp;
|
||||
trust = 5;
|
||||
}
|
||||
{
|
||||
source = ../../keys/miifox_miifox.net.pgp;
|
||||
trust = 3;
|
||||
}
|
||||
{
|
||||
source = ../../keys/mdelenk_hs-mittweida.de.pgp;
|
||||
trust = 5;
|
||||
}
|
||||
];
|
||||
scdaemonSettings = {
|
||||
disable-ccid = true;
|
||||
pcsc-driver = "${pkgs.pcsclite.out}/lib/libpcsclite.so.1";
|
||||
reader-port = "Yubico YubiKey";
|
||||
};
|
||||
settings = {
|
||||
# https://github.com/drduh/config/blob/master/gpg.conf
|
||||
personal-cipher-preferences = "AES256 AES192 AES";
|
||||
personal-digest-preferences = "SHA512 SHA384 SHA256";
|
||||
personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
|
||||
default-preference-list = "SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
|
||||
cert-digest-algo = "SHA512";
|
||||
s2k-digest-algo = "SHA512";
|
||||
s2k-cipher-algo = "AES256";
|
||||
charset = "utf-8";
|
||||
fixed-list-mode = true;
|
||||
no-comments = true;
|
||||
no-emit-version = true;
|
||||
no-greeting = true;
|
||||
keyid-format = "0xlong";
|
||||
list-options = "show-uid-validity";
|
||||
verify-options = "show-uid-validity";
|
||||
with-fingerprint = true;
|
||||
with-key-origin = true;
|
||||
require-cross-certification = true;
|
||||
no-symkey-cache = true;
|
||||
use-agent = true;
|
||||
throw-keyids = true;
|
||||
keyserver = ["hkps://keys.openpgp.org" "hkps://keyserver.ubuntu.com:443" "hkps://hkps.pool.sks-keyservers.net" "hkps://pgp.ocf.berkeley.edu"];
|
||||
auto-key-locate = ["local" "dane" "cert" "wkd"];
|
||||
};
|
||||
};
|
||||
}
|
20
config/programs/ims.nix
Normal file
20
config/programs/ims.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
system,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
nheko
|
||||
twinkle
|
||||
tokodon
|
||||
telegram-desktop
|
||||
]
|
||||
++ (
|
||||
if system == "x86_64-linux"
|
||||
then [
|
||||
pkgs.discord
|
||||
]
|
||||
else []
|
||||
);
|
||||
}
|
4
config/programs/kdeconnect.nix
Normal file
4
config/programs/kdeconnect.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{...}: {
|
||||
services.kdeconnect.enable = true;
|
||||
services.kdeconnect.indicator = true;
|
||||
}
|
18
config/programs/keepass.nix
Normal file
18
config/programs/keepass.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = [pkgs.keepassxc];
|
||||
systemd.user.services.keepassxc = {
|
||||
Unit = {
|
||||
Description = "keepassxc";
|
||||
After = ["graphical-session-pre.target"];
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Install.WantedBy = ["graphical-session.target"];
|
||||
Service = {
|
||||
ExecStart = "${pkgs.keepassxc}/bin/keepassxc";
|
||||
};
|
||||
};
|
||||
}
|
9
config/programs/keybase.nix
Normal file
9
config/programs/keybase.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{nixpkgs, ...}: let
|
||||
x86_64-linux-pkgs = import nixpkgs {system = "x86_64-linux";};
|
||||
in {
|
||||
services.keybase.enable = true;
|
||||
services.kbfs.enable = true;
|
||||
home.packages = [
|
||||
x86_64-linux-pkgs.keybase-gui
|
||||
];
|
||||
}
|
3
config/programs/kicad.nix
Normal file
3
config/programs/kicad.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [kicad-unstable-small];
|
||||
}
|
15
config/programs/kitty.nix
Normal file
15
config/programs/kitty.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
_: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font.name = "FiraCode Nerd Font Mono";
|
||||
settings = {
|
||||
disable_ligatures = "cursor";
|
||||
shell_integration = "disabled";
|
||||
font_size = 8;
|
||||
};
|
||||
extraConfig = ''
|
||||
symbol_map U+F1900-U+F19FF Fairfax HD
|
||||
narrow_symbols U+F1900-U+F19FF 2
|
||||
'';
|
||||
};
|
||||
}
|
9
config/programs/mail.nix
Normal file
9
config/programs/mail.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{pkgs, ...}: {
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.main = {
|
||||
withExternalGnupg = true;
|
||||
isDefault = true;
|
||||
};
|
||||
};
|
||||
}
|
17
config/programs/mako.nix
Normal file
17
config/programs/mako.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{pkgs, ...}: {
|
||||
programs.mako = {
|
||||
enable = true;
|
||||
defaultTimeout = 30000;
|
||||
};
|
||||
systemd.user.services.mako = {
|
||||
Unit = {
|
||||
Description = "mako";
|
||||
After = ["graphical-session-pre.target"];
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Install.WantedBy = ["graphical-session.target"];
|
||||
Service = {
|
||||
ExecStart = "mako";
|
||||
};
|
||||
};
|
||||
}
|
32
config/programs/misc.nix
Normal file
32
config/programs/misc.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
pkgs,
|
||||
nixpkgs,
|
||||
...
|
||||
}: let
|
||||
x86_64-linux-pkgs = import nixpkgs {system = "x86_64-linux";};
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
#anki
|
||||
mdcat
|
||||
gimp
|
||||
krita
|
||||
ffmpeg-full
|
||||
audacious
|
||||
];
|
||||
xdg.configFile."gdb/gdbinit".text = "set auto-load safe-path /nix/store";
|
||||
services.xsettingsd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"Gtk/EnableAnimations" = 1;
|
||||
"Gtk/DecorationLayout" = "icon:minimize,maximize,close";
|
||||
"Gtk/PrimaryButtonWarpsSlider" = 0;
|
||||
"Gtk/ToolbarStyle" = 3;
|
||||
"Gtk/MenuImages" = 1;
|
||||
"Gtk/ButtonImages" = 1;
|
||||
"Gtk/CursorThemeSize" = 24;
|
||||
"Gtk/CursorThemeName" = "breeze_cursors";
|
||||
"Gtk/FontName" = "Noto Sans, 10";
|
||||
"Net/IconThemeName" = "breeze-dark";
|
||||
};
|
||||
};
|
||||
}
|
35
config/programs/plover.nix
Normal file
35
config/programs/plover.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
system,
|
||||
emily-modifiers,
|
||||
emily-symbols,
|
||||
...
|
||||
}: let
|
||||
plover-env =
|
||||
(pkgs.plover.pythonModule.withPackages (_:
|
||||
with pkgs; [
|
||||
plover
|
||||
plover-plugins-manager
|
||||
plover-plugin-emoji
|
||||
plover-plugin-tapey-tape
|
||||
plover-plugin-yaml-dictionary
|
||||
plover-plugin-rkb1-hid
|
||||
plover-plugin-python-dictionary
|
||||
plover-plugin-stenotype-extended
|
||||
plover-plugin-dotool-output
|
||||
plover-plugin-lapwing-aio
|
||||
]))
|
||||
.overrideDerivation (super: {
|
||||
nativeBuildInputs = super.nativeBuildInputs or [] ++ [pkgs.qt5.wrapQtAppsHook];
|
||||
postBuild =
|
||||
super.postBuild
|
||||
+ ''
|
||||
wrapQtApp $out/bin/plover
|
||||
'';
|
||||
});
|
||||
in {
|
||||
home.packages = [
|
||||
plover-env
|
||||
];
|
||||
}
|
|
@ -1,10 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
font = "Noto Sans";
|
||||
extraConfig = {
|
||||
display-drun = " Apps ";
|
||||
display-run = " Run ";
|
||||
};
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
};
|
||||
}
|
10
config/programs/ssh.nix
Normal file
10
config/programs/ssh.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
_: {
|
||||
imports = [
|
||||
./builders.nix
|
||||
];
|
||||
programs.ssh = {
|
||||
controlMaster = "auto";
|
||||
controlPersist = "10m";
|
||||
enable = true;
|
||||
};
|
||||
}
|
|
@ -1,15 +1,29 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
sway = config.wayland.windowManager.sway.package;
|
||||
}: let
|
||||
c = "$";
|
||||
switch_window = pkgs.writeScript "switchWindow" ''
|
||||
set -euo pipefail
|
||||
tree=$(${pkgs.sway}/bin/swaymsg -t get_tree)
|
||||
readarray -t win_ids <<< "$(${pkgs.jq}/bin/jq -r '.. | objects | select(has("app_id")) | .id' <<< "$tree")"
|
||||
readarray -t win_names <<< "$(${pkgs.jq}/bin/jq -r '.. | objects | select(has("app_id")) | .name' <<< "$tree")"
|
||||
readarray -t win_types <<< "$(${pkgs.jq}/bin/jq -r '.. | objects | select(has("app_id")) | .app_id // .window_properties.class' <<< "$tree")"
|
||||
switch () {
|
||||
local k
|
||||
read -r k
|
||||
swaymsg "[con_id=${c}{win_ids[$k]}] focus"
|
||||
}
|
||||
for k in $(seq 0 $((${c}{#win_ids[@]} - 1))); do
|
||||
echo -e "<span weight=\"bold\">${c}{win_types[$k]}</span> - ${c}{win_names[$k]}"
|
||||
done | rofi -dmenu -markup-rows -i -p window -format i | switch
|
||||
'';
|
||||
screenshot_then_switch = pkgs.writeScript "screenshotThenSwitch" ''
|
||||
${pkgs.sway-contrib.grimshot}/bin/grimshot "$@"
|
||||
${sway}/bin/swaymsg mode default
|
||||
${pkgs.sway}/bin/swaymsg mode default
|
||||
'';
|
||||
mkKeybind = combo: number: [
|
||||
{
|
||||
|
@ -21,59 +35,21 @@ let
|
|||
value = "move container to workspace number ${toString number}";
|
||||
}
|
||||
];
|
||||
keys = [
|
||||
"0"
|
||||
"1"
|
||||
"2"
|
||||
"3"
|
||||
"4"
|
||||
"5"
|
||||
"6"
|
||||
"7"
|
||||
"8"
|
||||
"9"
|
||||
"f1"
|
||||
"f2"
|
||||
"f3"
|
||||
"f4"
|
||||
"f5"
|
||||
"f6"
|
||||
"f7"
|
||||
"f8"
|
||||
"f9"
|
||||
"f10"
|
||||
"f11"
|
||||
"f12"
|
||||
];
|
||||
combos = lib.concatMap (k: map (s: "${k}${s}") keys) [
|
||||
""
|
||||
"ctrl+"
|
||||
"alt+"
|
||||
"ctrl+alt+"
|
||||
];
|
||||
keybinds = lib.flatten (
|
||||
lib.zipListsWith mkKeybind combos (lib.lists.range 0 ((lib.lists.length combos) - 1))
|
||||
);
|
||||
|
||||
in
|
||||
{
|
||||
programs.fish.loginShellInit = ''
|
||||
if not set -q DISPLAY
|
||||
and test (tty) = /dev/tty1
|
||||
exec ${sway}/bin/sway
|
||||
end
|
||||
'';
|
||||
|
||||
keys = ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "f1" "f2" "f3" "f4" "f5" "f6" "f7" "f8" "f9" "f10" "f11" "f12"];
|
||||
combos = lib.concatMap (k: map (s: "${k}${s}") keys) ["" "ctrl+" "alt+" "ctrl+alt+"];
|
||||
keybinds = lib.flatten (lib.zipListsWith mkKeybind combos (lib.lists.range 0 ((lib.lists.length combos) - 1)));
|
||||
in {
|
||||
imports = [
|
||||
./cliphist.nix
|
||||
./wl-clipboard.nix
|
||||
./mako.nix
|
||||
./swayidle.nix
|
||||
./rofi.nix
|
||||
./fcitx.nix
|
||||
./kitty.nix
|
||||
./mpd.nix
|
||||
./waybar.nix
|
||||
./theming.nix
|
||||
];
|
||||
wayland.windowManager.sway = {
|
||||
systemd.enable = true;
|
||||
enable = true;
|
||||
config = {
|
||||
modifier = "Mod4";
|
||||
|
@ -84,7 +60,7 @@ in
|
|||
};
|
||||
};
|
||||
output = {
|
||||
"DP-2" = {
|
||||
"DP-1" = {
|
||||
mode = "2560x1440@74.971Hz";
|
||||
position = "0 0";
|
||||
subpixel = "rgb";
|
||||
|
@ -99,12 +75,11 @@ in
|
|||
transform = "90";
|
||||
};
|
||||
};
|
||||
keybindings =
|
||||
let
|
||||
keybindings = let
|
||||
inherit (config.wayland.windowManager.sway.config) modifier;
|
||||
in
|
||||
lib.mkOptionDefault (
|
||||
{
|
||||
lib.mkOptionDefault ({
|
||||
"${modifier}+Return" = "exec ${pkgs.kitty}/bin/kitty";
|
||||
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -show drun";
|
||||
"Print" = "mode screenshot";
|
||||
"XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
|
@ -117,9 +92,9 @@ in
|
|||
"XF86AudioNext" = "exec ${pkgs.mpc-cli}/bin/mpc next";
|
||||
"XF86AudioPrev" = "exec ${pkgs.mpc-cli}/bin/mpc prev";
|
||||
"XF86AudioStop" = "exec ${pkgs.mpc-cli}/bin/mpc stop";
|
||||
"Mod1+Tab" = "exec ${switch_window}";
|
||||
}
|
||||
// (lib.listToAttrs keybinds)
|
||||
);
|
||||
// (lib.listToAttrs keybinds));
|
||||
bars = [
|
||||
{
|
||||
command = "${pkgs.waybar}/bin/waybar";
|
||||
|
@ -157,14 +132,19 @@ in
|
|||
export GDK_DPI_SCALE=1
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export QT_QPA_PLATFORMTHEME=qt5ct
|
||||
export GTK_IM_MODULE=fcitx
|
||||
export QT_IM_MODULE=fcitx
|
||||
export XMODIFIERS=@im=fcitx
|
||||
export GLFW_IM_MODULE=ibus
|
||||
export SDL_IM_MODULE=fcitx
|
||||
''
|
||||
+ (
|
||||
if system == "x86_64-linux" then
|
||||
''
|
||||
if system == "x86_64-linux"
|
||||
then ''
|
||||
export VK_ICD_FILENAMES=/run/opengl-driver/share/vulkan/icd.d/intel_icd.x86_64.json:/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json:/run/opengl-driver-32/share/vulkan/icd.d/radeon_icd.i686.json:/run/opengl-driver-32/share/vulkan/icd.d/intel_icd.i686.json
|
||||
''
|
||||
else
|
||||
""
|
||||
else ""
|
||||
);
|
||||
extraConfig = ''
|
||||
default_border none
|
||||
|
@ -173,20 +153,5 @@ in
|
|||
exec_always ${pkgs.xorg.xrandr}/bin/xrandr --output DP-1 --primary
|
||||
'';
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "qtct";
|
||||
};
|
||||
systemd.user.services.transparency = {
|
||||
Unit = {
|
||||
Description = "transparency";
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
Service = {
|
||||
ExecStart = "${pkgs.python3.withPackages (ps: with ps; [ i3ipc ])}/bin/python ${./transparency.py}";
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".XCompose".source = ../../extra/.XCompose;
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
{pkgs, ...}: let
|
||||
lock-script = pkgs.writeScript "suspend" ''
|
||||
${pkgs.swaylock}/bin/swaylock -f -c 000000
|
||||
${pkgs.mpc-cli}/bin/mpc pause
|
||||
|
@ -17,8 +16,7 @@ let
|
|||
${pkgs.procps}/bin/pkill swaylock
|
||||
${pkgs.mpc-cli}/bin/mpc play
|
||||
'';
|
||||
in
|
||||
{
|
||||
in {
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
6
config/programs/syncthing.nix
Normal file
6
config/programs/syncthing.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
tray.enable = true;
|
||||
};
|
||||
}
|
10
config/programs/taskwarrior.nix
Normal file
10
config/programs/taskwarrior.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
_: {
|
||||
programs.taskwarrior = {
|
||||
enable = true;
|
||||
colorTheme = "dark-violets-256";
|
||||
config = {
|
||||
weekstart = "monday"; # no americans, the week does not start with week-end
|
||||
};
|
||||
dataLocation = "~/Data/tasks/";
|
||||
};
|
||||
}
|
606
config/programs/theming.nix
Normal file
606
config/programs/theming.nix
Normal file
|
@ -0,0 +1,606 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
colorpickle,
|
||||
withNSFW,
|
||||
lib,
|
||||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
}: let
|
||||
theme = import ../../extra/theme.nix;
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
|
||||
prepBGs = [
|
||||
["${pkgs.lotte-art}/2021-01-27-ceeza-lottedonut.jxl" "-crop" "2048x1152+0+106"]
|
||||
["${pkgs.lotte-art}/2021-09-15-cloverhare-lotteplush.jxl" "-crop" "1774x997+0+173"]
|
||||
["${pkgs.lotte-art}/2022-11-15-wolfsifi-maff-me-leashed.jxl" "-crop" "1699x956+0+88"]
|
||||
];
|
||||
|
||||
prepBGsNSFW = [
|
||||
["${pkgs.lotte-art}/2021-11-27-theroguez-lottegassyvore1.jxl" "-crop" "1233x694+0+65"]
|
||||
["${pkgs.lotte-art}/2021-12-12-baltnwolf-christmas-diaper.jxl" "-crop" "2599x1462+0+294"]
|
||||
["${pkgs.lotte-art}/2021-12-12-baltnwolf-christmas-diaper-messy.jxl" "-crop" "2599x1462+0+294"]
|
||||
["${pkgs.lotte-art}/2022-04-20-cloverhare-mxbatty-maffsie-train-plush.jxl" "-crop" "3377x1900+0+211"]
|
||||
["${pkgs.lotte-art}/2022-04-20-cloverhare-mxbatty-me-train-maffsie-plush.jxl" "-crop" "3377x1900+0+211"]
|
||||
["${pkgs.lotte-art}/2022-12-27-rexyi-scatych.jxl" "-crop" "2000x1120+0+0"]
|
||||
["${pkgs.lotte-art}/2023-03-09-rexyi-voredisposal-ych.jxl" "-crop" "2000x1120+0+0"]
|
||||
["${pkgs.lotte-art}/2023-04-16-baltnwolf-lottediaperplushies.jxl" "-gravity" "center" "-background" "white" "-extent" "5333x3000"]
|
||||
["${pkgs.lotte-art}/2023-04-16-baltnwolf-lottediaperplushies-messy.jxl" "-gravity" "center" "-background" "white" "-extent" "5333x3000"]
|
||||
["${pkgs.lotte-art}/2023-08-09-coldquarantine-lotte-eating-trash.jxl" "-crop" "6000x3375+0+312"]
|
||||
["${pkgs.lotte-art}/2023-08-20-coldquarantine-lotte-eating-trash-clean.jxl" "-crop" "6000x3375+0+312"]
|
||||
["${pkgs.lotte-art}/2023-08-10-coldquarantine-lotte-eating-trash-diapers.jxl" "-crop" "6000x3375+0+312"]
|
||||
];
|
||||
|
||||
fixupImage = instructions:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "bg.jxl";
|
||||
src = pkgs.emptyDirectory;
|
||||
nativeBuildInputs = [pkgs.imagemagick];
|
||||
buildPhase = ''
|
||||
convert ${toString instructions} $out
|
||||
'';
|
||||
installPhase = "true";
|
||||
};
|
||||
|
||||
validBGs = ["${pkgs.lotte-art}/2020-07-24-urbankitsune-bna-ych.jxl" "${pkgs.lotte-art}/2022-05-02-anonfurryartist-giftart.jxl" "${pkgs.lotte-art}/2022-06-21-sammythetanuki-lotteplushpride.jxl"] ++ (map fixupImage prepBGs);
|
||||
validBGsNSFW = ["${pkgs.lotte-art}/2021-10-29-butterskunk-lotte-scat-buffet.jxl" "${pkgs.lotte-art}/2022-08-12-deathtoaster-funpit-scat.jxl" "${pkgs.lotte-art}/2022-08-15-deathtoaster-funpit-mud.jxl"] ++ (map fixupImage prepBGsNSFW) ++ validBGs;
|
||||
|
||||
mod = a: b: a - (a / b * b);
|
||||
choose = l: rand: let len = builtins.length l; in builtins.elemAt l (mod rand len);
|
||||
hexToIntList = {
|
||||
"0" = 0;
|
||||
"1" = 1;
|
||||
"2" = 2;
|
||||
"3" = 3;
|
||||
"4" = 4;
|
||||
"5" = 5;
|
||||
"6" = 6;
|
||||
"7" = 7;
|
||||
"8" = 8;
|
||||
"9" = 9;
|
||||
"a" = 10;
|
||||
"b" = 11;
|
||||
"c" = 12;
|
||||
"d" = 13;
|
||||
"e" = 14;
|
||||
"f" = 15;
|
||||
"A" = 10;
|
||||
"B" = 11;
|
||||
"C" = 12;
|
||||
"D" = 13;
|
||||
"E" = 14;
|
||||
"F" = 15;
|
||||
};
|
||||
hexToInt = s: lib.foldl (state: new: state * 16 + hexToIntList.${new}) 0 (lib.strings.stringToCharacters s);
|
||||
|
||||
seed = hexToInt (self.shortRev or nixpkgs.shortRev);
|
||||
bg =
|
||||
choose (
|
||||
if withNSFW
|
||||
then validBGsNSFW
|
||||
else validBGs
|
||||
)
|
||||
seed;
|
||||
|
||||
color = n:
|
||||
config.environment.graphical.colors.main."${builtins.toString n}";
|
||||
colorD = n:
|
||||
config.environment.graphical.colors.disabled."${builtins.toString n}";
|
||||
colorI = n:
|
||||
config.environment.graphical.colors.inactive."${builtins.toString n}";
|
||||
|
||||
color' = n: mkLiteral (color n);
|
||||
bgPng = pkgs.stdenv.mkDerivation {
|
||||
name = "bg.png";
|
||||
src = pkgs.emptyDirectory;
|
||||
nativeBuildInputs = [pkgs.imagemagick];
|
||||
buildPhase = ''
|
||||
convert ${bg} $out
|
||||
'';
|
||||
installPhase = "true";
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
colorpickle.nixosModules.default
|
||||
];
|
||||
environment.graphical.colorschemes.main = {
|
||||
image = bgPng;
|
||||
params = ["--lighten" "0.3"];
|
||||
};
|
||||
environment.graphical.colorschemes.disabled = {
|
||||
image = bgPng;
|
||||
params = ["--lighten" "0.1" "--saturate" "-0.5"];
|
||||
};
|
||||
environment.graphical.colorschemes.inactive = {
|
||||
image = bgPng;
|
||||
params = [];
|
||||
};
|
||||
wayland.windowManager.sway.config.output."*".bg = "${bgPng} fill";
|
||||
/*
|
||||
dconf.settings."org/gnome/desktop/interface" = {
|
||||
icon-theme = "breeze-dark";
|
||||
cursor-theme = "Vanilla-DMZ";
|
||||
};
|
||||
*/
|
||||
gtk = {
|
||||
#enable = true;
|
||||
gtk2.extraConfig = ''
|
||||
gtk-cursor-theme-name = "Vanilla-DMZ"
|
||||
gtk-cursor-theme-size = 0
|
||||
'';
|
||||
gtk3.extraConfig = {
|
||||
gtk-cursor-theme-name = "Vanilla-DMZ";
|
||||
gtk-cursor-theme-size = 0;
|
||||
};
|
||||
font = {
|
||||
package = pkgs.noto-fonts;
|
||||
name = "Noto Sans";
|
||||
size = 10;
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.libsForQt5.breeze-icons;
|
||||
name = "breeze-dark";
|
||||
};
|
||||
theme = {
|
||||
name = "Catppuccin-Mocha-Compact-Pink-Dark";
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
accents = ["pink"];
|
||||
size = "compact";
|
||||
tweaks = ["rimless" "black"];
|
||||
variant = "mocha";
|
||||
};
|
||||
};
|
||||
};
|
||||
qt = {
|
||||
#enable = true;
|
||||
style = {
|
||||
name = "lightly";
|
||||
package = pkgs.plasma5Packages.lightly;
|
||||
};
|
||||
platformTheme = "qtct";
|
||||
};
|
||||
xdg.configFile."qt5ct/colors/Catppuccin-Custom.conf".text = ''
|
||||
[ColorScheme]
|
||||
active_colors=${color 15}, ${color 0}, #ffa6adc8, #ff9399b2, ${color 1}, #ff6c7086, ${color 15}, ${color 15}, ${color 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${color 8}, ${color 15}, ${color 13}, ${color 5}, ${color 0}, ${color 15}, ${colorI 0}, ${color 5}, #807f849c
|
||||
disabled_colors=${colorD 15}, ${colorD 0}, #ffa6adc8, #ff9399b2, ${colorD 1}, #ff6c7086, ${colorD 15}, ${colorD 15}, ${colorD 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${colorD 8}, ${colorD 15}, ${colorD 13}, ${colorD 5}, ${colorD 0}, ${colorD 15}, ${colorI 0}, ${colorD 5}, #807f849c
|
||||
inactive_colors=${colorI 15}, ${colorI 0}, #ffa6adc8, #ff9399b2, ${colorI 1}, #ff6c7086, ${colorI 15}, ${colorI 15}, ${colorI 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${colorI 8}, ${colorI 15}, ${colorI 13}, ${colorI 5}, ${colorI 0}, ${colorI 15}, ${colorI 0}, ${colorI 5}, #807f849c
|
||||
'';
|
||||
xdg.configFile."qt6ct/colors/Catppuccin-Custom.conf".text = ''
|
||||
[ColorScheme]
|
||||
active_colors=${color 15}, ${color 0}, #ffa6adc8, #ff9399b2, ${color 1}, #ff6c7086, ${color 15}, ${color 15}, ${color 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${color 8}, ${color 15}, ${color 13}, ${color 5}, ${color 0}, ${color 15}, ${colorI 0}, ${color 5}, #807f849c
|
||||
disabled_colors=${colorD 15}, ${colorD 0}, #ffa6adc8, #ff9399b2, ${colorD 1}, #ff6c7086, ${colorD 15}, ${colorD 15}, ${colorD 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${colorD 8}, ${colorD 15}, ${colorD 13}, ${colorD 5}, ${colorD 0}, ${colorD 15}, ${colorI 0}, ${colorD 5}, #807f849c
|
||||
inactive_colors=${colorI 15}, ${colorI 0}, #ffa6adc8, #ff9399b2, ${colorI 1}, #ff6c7086, ${colorI 15}, ${colorI 15}, ${colorI 15}, #ff1e1e2e, ${colorD 0}, #ff7f849c, ${colorI 8}, ${colorI 15}, ${colorI 13}, ${colorI 5}, ${colorI 0}, ${colorI 15}, ${colorI 0}, ${colorI 5}, #807f849c
|
||||
'';
|
||||
nixpkgs.overlays = [
|
||||
(super: self: {
|
||||
python3 = super.python.override {
|
||||
packageOverrides = self: super: {
|
||||
python3Packages = self.python3.pkgs;
|
||||
catppuccin = super.catppuccin.overrideAttrs (super: {
|
||||
patches =
|
||||
super.patches
|
||||
or []
|
||||
++ [
|
||||
(pkgs.writeText "color.patch" ''
|
||||
diff --git a/catppuccin/colour.py b/catppuccin/colour.py
|
||||
index 193eea7..7620cf0 100644
|
||||
--- a/catppuccin/colour.py
|
||||
+++ b/catppuccin/colour.py
|
||||
@@ -43,6 +43,9 @@ class Colour:
|
||||
@classmethod
|
||||
def from_hex(cls, hex_string: str) -> Colour:
|
||||
"""Create a colour from hex string."""
|
||||
+ if hex_string.startswith("#"):
|
||||
+ hex_string = hex_string[1:]
|
||||
+
|
||||
if len(hex_string) not in (6, 8):
|
||||
raise ValueError("Hex string must be 6 or 8 characters long.")
|
||||
diff --git a/catppuccin/flavour.py b/catppuccin/flavour.py
|
||||
index aa7df98..4bf849a 100644
|
||||
--- a/catppuccin/flavour.py
|
||||
+++ b/catppuccin/flavour.py
|
||||
@@ -138,30 +138,30 @@ class Flavour: # pylint: disable=too-many-instance-attributes
|
||||
def mocha() -> "Flavour":
|
||||
"""Mocha flavoured Catppuccin."""
|
||||
return Flavour(
|
||||
- rosewater=Colour(245, 224, 220),
|
||||
- flamingo=Colour(242, 205, 205),
|
||||
- pink=Colour(245, 194, 231),
|
||||
- mauve=Colour(203, 166, 247),
|
||||
- red=Colour(243, 139, 168),
|
||||
- maroon=Colour(235, 160, 172),
|
||||
- peach=Colour(250, 179, 135),
|
||||
- yellow=Colour(249, 226, 175),
|
||||
- green=Colour(166, 227, 161),
|
||||
- teal=Colour(148, 226, 213),
|
||||
- sky=Colour(137, 220, 235),
|
||||
- sapphire=Colour(116, 199, 236),
|
||||
- blue=Colour(137, 180, 250),
|
||||
- lavender=Colour(180, 190, 254),
|
||||
- text=Colour(205, 214, 244),
|
||||
+ rosewater=Colour.from_hex("${color 1}"),
|
||||
+ flamingo=Colour.from_hex("${color 2}"),
|
||||
+ pink=Colour.from_hex("${color 3}"),
|
||||
+ mauve=Colour.from_hex("${color 4}"),
|
||||
+ red=Colour.from_hex("${color 5}"),
|
||||
+ maroon=Colour.from_hex("${color 6}"),
|
||||
+ peach=Colour.from_hex("${color 7}"),
|
||||
+ yellow=Colour.from_hex("${color 8}"),
|
||||
+ green=Colour.from_hex("${color 9}"),
|
||||
+ teal=Colour.from_hex("${color 10}"),
|
||||
+ sky=Colour.from_hex("${color 11}"),
|
||||
+ sapphire=Colour.from_hex("${color 12}"),
|
||||
+ blue=Colour.from_hex("${color 13}"),
|
||||
+ lavender=Colour.from_hex("${color 14}"),
|
||||
+ text=Colour.from_hex("${color 15}"),
|
||||
subtext1=Colour(186, 194, 222),
|
||||
subtext0=Colour(166, 173, 200),
|
||||
overlay2=Colour(147, 153, 178),
|
||||
overlay1=Colour(127, 132, 156),
|
||||
overlay0=Colour(108, 112, 134),
|
||||
- surface2=Colour(88, 91, 112),
|
||||
- surface1=Colour(69, 71, 90),
|
||||
- surface0=Colour(49, 50, 68),
|
||||
- base=Colour(30, 30, 46),
|
||||
- mantle=Colour(24, 24, 37),
|
||||
- crust=Colour(17, 17, 27),
|
||||
+ surface2=Colour.from_hex("${color 2}"),
|
||||
+ surface1=Colour.from_hex("${color 1}"),
|
||||
+ surface0=Colour.from_hex("${color 0}"),
|
||||
+ base=Colour.from_hex("${color 0}"),
|
||||
+ mantle=Colour.from_hex("${color 0}"),
|
||||
+ crust=Colour.from_hex("${color 0}"),
|
||||
)
|
||||
'')
|
||||
];
|
||||
});
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
/*
|
||||
home.file = {
|
||||
".icons/default/index.theme".text = ''
|
||||
[Icon Theme]
|
||||
Name=Default
|
||||
Comment=Default Cursor Theme
|
||||
Inherits=Vanilla-DMZ
|
||||
'';
|
||||
};
|
||||
*/
|
||||
programs.kitty.settings = with theme; {
|
||||
background = color 0;
|
||||
foreground = color 15;
|
||||
cursor = color 15;
|
||||
selection_background = "#4f414c";
|
||||
color0 = color 0;
|
||||
color1 = color 9;
|
||||
color2 = color 10;
|
||||
color3 = color 11;
|
||||
color4 = color 12;
|
||||
color5 = color 13;
|
||||
color6 = color 14;
|
||||
color7 = color 15;
|
||||
color8 = color 8;
|
||||
color9 = color 9;
|
||||
color10 = color 10;
|
||||
color11 = color 11;
|
||||
color12 = color 12;
|
||||
color13 = color 13;
|
||||
color14 = color 14;
|
||||
color15 = color 15;
|
||||
};
|
||||
# Taken from https://github.com/jakehamilton/dotfiles/blob/master/waybar/style.css
|
||||
programs.waybar.style = with theme; ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-size: 14px;
|
||||
min-height: 24px;
|
||||
font-family: "NotoSansDisplay Nerd Font", "Noto Sans Mono CJK JP";
|
||||
color: ${color 0};
|
||||
}
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
color: ${color 15};
|
||||
opacity: 0.9;
|
||||
}
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
#window {
|
||||
margin-top: 8px;
|
||||
padding: 0px 16px 0px 16px;
|
||||
border-radius: 24px;
|
||||
transition: none;
|
||||
background: transparent;
|
||||
}
|
||||
#workspaces {
|
||||
margin-top: 8px;
|
||||
margin-left: 12px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 24px;
|
||||
background-color: ${color 0};
|
||||
color: ${color 15};
|
||||
transition: none;
|
||||
}
|
||||
#workspaces button {
|
||||
transition: none;
|
||||
background: transparent;
|
||||
font-size: 16px;
|
||||
color: ${color 15};
|
||||
}
|
||||
#workspaces button.focused {
|
||||
background: ${color 13};
|
||||
color: ${color 0};
|
||||
}
|
||||
#workspaces button:hover {
|
||||
background: ${color 10};
|
||||
color: ${color 0};
|
||||
}
|
||||
#mpd {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 24px;
|
||||
background: ${color 2};
|
||||
transition: none;
|
||||
}
|
||||
#mpd.disconnected,
|
||||
#mpd.stopped {
|
||||
background: ${color 4};
|
||||
}
|
||||
#network {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 24px;
|
||||
transition: none;
|
||||
background: ${color 13};
|
||||
}
|
||||
#pulseaudio {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 24px;
|
||||
transition: none;
|
||||
background: ${color 11};
|
||||
}
|
||||
#temperature, #battery {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 24px;
|
||||
transition: none;
|
||||
background: ${color 2};
|
||||
}
|
||||
#cpu, #backlight, #battery.warning {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 24px;
|
||||
transition: none;
|
||||
background: ${color 14};
|
||||
}
|
||||
#memory, #battery.critical {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 24px;
|
||||
transition: none;
|
||||
background: ${color 12};
|
||||
}
|
||||
#clock {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
margin-right: 12px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 26px;
|
||||
transition: none;
|
||||
background: ${color 0};
|
||||
color: ${color 15};
|
||||
}
|
||||
'';
|
||||
|
||||
wayland.windowManager.sway.extraConfig = with theme; ''
|
||||
# target title bg text indicator border
|
||||
client.focused ${color 5} ${color 0} ${color 15} ${color 12} ${color 5}
|
||||
client.focused_inactive ${color 13} ${color 0} ${color 15} ${color 12} ${color 13}
|
||||
client.unfocused ${color 13} ${color 0} ${color 15} ${color 12} ${color 13}
|
||||
client.urgent ${color 14} ${color 0} ${color 14} ${color 8} ${color 14}
|
||||
client.placeholder ${color 8} ${color 0} ${color 15} ${color 8} ${color 8}
|
||||
client.background ${color 0}
|
||||
seat seat0 xcursor_theme breeze-dark 24
|
||||
'';
|
||||
home.packages = with pkgs; [
|
||||
libsForQt5.breeze-icons
|
||||
libsForQt5.qt5ct
|
||||
vanilla-dmz
|
||||
pkgs.plasma5Packages.lightly
|
||||
];
|
||||
|
||||
programs.rofi.theme = with theme; let
|
||||
element = {
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "inherit";
|
||||
};
|
||||
in {
|
||||
"*" = {
|
||||
bg-col = color' 0;
|
||||
bg-col-light = color' 0;
|
||||
border-col = color' 0;
|
||||
selected-col = color' 0;
|
||||
blue = color' 1;
|
||||
fg-col = color' 15;
|
||||
fg-col2 = color' 12;
|
||||
grey = color' 8;
|
||||
width = 600;
|
||||
};
|
||||
element-text = element;
|
||||
window = {
|
||||
height = mkLiteral "360px";
|
||||
border = mkLiteral "3px";
|
||||
border-color = mkLiteral "@border-col";
|
||||
background-color = mkLiteral "@bg-col";
|
||||
};
|
||||
mainbox = {
|
||||
background-color = mkLiteral "@bg-col";
|
||||
};
|
||||
inputbar = {
|
||||
children = map mkLiteral ["prompt" "entry"];
|
||||
background-color = mkLiteral "@bg-col";
|
||||
border-radius = mkLiteral "5px";
|
||||
padding = mkLiteral "2px";
|
||||
};
|
||||
prompt = {
|
||||
background-color = mkLiteral "@blue";
|
||||
padding = mkLiteral "6px";
|
||||
text-color = mkLiteral "@bg-col";
|
||||
border-radius = mkLiteral "3px";
|
||||
margin = mkLiteral "20px 0px 0px 20px";
|
||||
};
|
||||
|
||||
textbox-prompt-colon = {
|
||||
expand = mkLiteral "false";
|
||||
str = ":";
|
||||
};
|
||||
|
||||
entry = {
|
||||
padding = mkLiteral "6px";
|
||||
margin = mkLiteral "20px 0px 0px 10px";
|
||||
text-color = mkLiteral "@fg-col";
|
||||
background-color = mkLiteral "@bg-col";
|
||||
};
|
||||
|
||||
listview = {
|
||||
border = mkLiteral "0px 0px 0px";
|
||||
padding = mkLiteral "6px 0px 0px";
|
||||
margin = mkLiteral "10px 0px 0px 20px";
|
||||
columns = 2;
|
||||
lines = 5;
|
||||
background-color = mkLiteral "@bg-col";
|
||||
};
|
||||
|
||||
element = {
|
||||
padding = mkLiteral "5px";
|
||||
background-color = mkLiteral "@bg-col";
|
||||
text-color = mkLiteral "@fg-col";
|
||||
};
|
||||
|
||||
element-icon =
|
||||
element
|
||||
// {
|
||||
size = mkLiteral "25px";
|
||||
};
|
||||
|
||||
"element selected" = {
|
||||
background-color = mkLiteral "@selected-col";
|
||||
text-color = mkLiteral "@fg-col2";
|
||||
};
|
||||
|
||||
mode-switcher =
|
||||
element
|
||||
// {
|
||||
spacing = 0;
|
||||
};
|
||||
|
||||
button = {
|
||||
padding = mkLiteral "10px";
|
||||
background-color = mkLiteral "@bg-col-light";
|
||||
text-color = mkLiteral "@grey";
|
||||
vertical-align = mkLiteral "0.5";
|
||||
horizontal-align = mkLiteral "0.5";
|
||||
};
|
||||
|
||||
"button selected" = {
|
||||
background-color = mkLiteral "@bg-col";
|
||||
text-color = mkLiteral "@blue";
|
||||
};
|
||||
|
||||
message = {
|
||||
background-color = mkLiteral "@bg-col-light";
|
||||
margin = mkLiteral "2px";
|
||||
padding = mkLiteral "2px";
|
||||
border-radius = mkLiteral "5px";
|
||||
};
|
||||
|
||||
textbox = {
|
||||
padding = mkLiteral "6px";
|
||||
margin = mkLiteral "20px 0px 0px 20px";
|
||||
text-color = mkLiteral "@blue";
|
||||
background-color = mkLiteral "@bg-col-light";
|
||||
};
|
||||
};
|
||||
programs.neomutt.extraConfig = ''
|
||||
color normal default default # Text is "Text"
|
||||
color index color2 default ~N # New Messages are Green
|
||||
color index color1 default ~F # Flagged messages are Red
|
||||
color index color13 default ~T # Tagged Messages are Red
|
||||
color index color1 default ~D # Messages to delete are Red
|
||||
color attachment color5 default # Attachments are Pink
|
||||
color signature color8 default # Signatures are Surface 2
|
||||
color search color4 default # Highlighted results are Blue
|
||||
color indicator default color8 # currently highlighted message Surface 2=Background Text=Foreground
|
||||
color error color1 default # error messages are Red
|
||||
color status color15 default # status line "Subtext 0"
|
||||
color tree color15 default # thread tree arrows Subtext 0
|
||||
color tilde color15 default # blank line padding Subtext 0
|
||||
color hdrdefault color13 default # default headers Pink
|
||||
color header color13 default "^From:"
|
||||
color header color13 default "^Subject:"
|
||||
color quoted color15 default # Subtext 0
|
||||
color quoted1 color7 default # Subtext 1
|
||||
color quoted2 color8 default # Surface 2
|
||||
color quoted3 color0 default # Surface 1
|
||||
color quoted4 color0 default
|
||||
color quoted5 color0 default
|
||||
color body color2 default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ # email addresses Green
|
||||
color body color2 default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+ # URLs Green
|
||||
color body color4 default (^|[[:space:]])\\*[^[:space:]]+\\*([[:space:]]|$) # *bold* text Blue
|
||||
color body color4 default (^|[[:space:]])_[^[:space:]]+_([[:space:]]|$) # _underlined_ text Blue
|
||||
color body color4 default (^|[[:space:]])/[^[:space:]]+/([[:space:]]|$) # /italic/ text Blue
|
||||
color sidebar_flagged color1 default # Mailboxes with flagged mails are Red
|
||||
color sidebar_new color10 default # Mailboxes with new mail are Green
|
||||
'';
|
||||
home.file.".local/share/mc/skins/catppuccin.ini".source = ../../extra/mc-catppuccin.ini;
|
||||
systemd.user.services.transparency = {
|
||||
Unit = {
|
||||
Description = "transparency";
|
||||
After = ["graphical-session-pre.target"];
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Install.WantedBy = ["graphical-session.target"];
|
||||
Service = {
|
||||
ExecStart = "${pkgs.python3.withPackages (ps: with ps; [i3ipc])}/bin/python ${./transparency.py}";
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh.initExtra =
|
||||
if withNSFW
|
||||
then ''
|
||||
export CARGO_MOMMYS_MOODS=chill/ominous/thirsty/yikes
|
||||
export CARGO_MOMMYS_LITTLE=racc/plush
|
||||
export CARGO_MOMMYS_PARTS=shit/pee
|
||||
export CARGO_MOMMYS_FUCKING="pet/toy/toilet/shitslut/septic tank"
|
||||
''
|
||||
else ''
|
||||
export CARGO_MOMMYS_MOODS=chill/ominous
|
||||
export CARGO_MOMMYS_LITTLE=racc/plush
|
||||
'';
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
baseIndex = 1;
|
||||
|
@ -34,12 +33,4 @@
|
|||
set -g default-terminal "screen-256color"
|
||||
'';
|
||||
};
|
||||
programs.fish.shellInit = ''
|
||||
if status is-interactive
|
||||
and not set -q TMUX
|
||||
and set -q SSH_TTY
|
||||
tmux attach || tmux
|
||||
end
|
||||
'';
|
||||
programs.fzf.tmux.enableShellIntegration = true;
|
||||
}
|
0
config/sway/transparency.py → config/programs/transparency.py
Normal file → Executable file
0
config/sway/transparency.py → config/programs/transparency.py
Normal file → Executable file
0
config/programs/vim/config/after/ftplugin/toml.vim
Normal file
0
config/programs/vim/config/after/ftplugin/toml.vim
Normal file
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue