This commit is contained in:
parent
a633ccc36f
commit
a7ec834c6a
15 changed files with 1571 additions and 1417 deletions
|
@ -6,10 +6,12 @@ in {
|
||||||
swapSize,
|
swapSize,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# this is my standard partitioning scheme for my machines which probably want hibernation capabilities
|
/*
|
||||||
# a UEFI-compatible boot partition
|
this is my standard partitioning scheme for my machines which probably want hibernation capabilities
|
||||||
# it includes an LUKS-encrypted btrfs volume
|
a UEFI-compatible boot partition
|
||||||
# a swap partition big enough to dump all the machine's RAM into
|
it includes an LUKS-encrypted btrfs volume
|
||||||
|
a swap partition big enough to dump all the machine's RAM into
|
||||||
|
*/
|
||||||
|
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
|
@ -195,9 +197,11 @@ in {
|
||||||
beefcake = let
|
beefcake = let
|
||||||
zpools = {
|
zpools = {
|
||||||
zroot = {
|
zroot = {
|
||||||
# TODO: at the time of writing, disko does not support draid6
|
/*
|
||||||
# so I'm building/managing the array manually for the time being
|
TODO: at the time of writing, disko does not support draid6
|
||||||
# the root pool is just a single disk right now
|
so I'm building/managing the array manually for the time being
|
||||||
|
the root pool is just a single disk right now
|
||||||
|
*/
|
||||||
name = "zroot";
|
name = "zroot";
|
||||||
config = {
|
config = {
|
||||||
type = "zpool";
|
type = "zpool";
|
||||||
|
@ -242,9 +246,11 @@ in {
|
||||||
keylocation = "file:///tmp/secret.key";
|
keylocation = "file:///tmp/secret.key";
|
||||||
};
|
};
|
||||||
# use this to read the key during boot
|
# use this to read the key during boot
|
||||||
# postCreateHook = ''
|
/*
|
||||||
# zfs set keylocation="prompt" "zroot/$name";
|
postCreateHook = ''
|
||||||
# '';
|
zfs set keylocation="prompt" "zroot/$name";
|
||||||
|
'';
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
"encrypted/test" = {
|
"encrypted/test" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
|
@ -254,9 +260,11 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
zstorage = {
|
zstorage = {
|
||||||
# PARITY_COUNT=3 NUM_DRIVES=8 HOT_SPARES=2 sudo -E zpool create -f -O mountpoint=none -O compression=on -O xattr=sa -O acltype=posixacl -o ashift=12 -O atime=off -O recordsize=64K zstorage draid{$PARITY_COUNT}:{$NUM_DRIVES}c:{$HOT_SPARES}s /dev/disk/by-id/scsi-35000039548cb637c /dev/disk/by-id/scsi-35000039548cb7c8c /dev/disk/by-id/scsi-35000039548cb85c8 /dev/disk/by-id/scsi-35000039548d9b504 /dev/disk/by-id/scsi-35000039548da2b08 /dev/disk/by-id/scsi-35000039548dad2fc /dev/disk/by-id/scsi-350000399384be921 /dev/disk/by-id/scsi-35000039548db096c
|
/*
|
||||||
# sudo zfs create -o mountpoint=legacy zstorage/nix
|
PARITY_COUNT=3 NUM_DRIVES=8 HOT_SPARES=2 sudo -E zpool create -f -O mountpoint=none -O compression=on -O xattr=sa -O acltype=posixacl -o ashift=12 -O atime=off -O recordsize=64K zstorage draid{$PARITY_COUNT}:{$NUM_DRIVES}c:{$HOT_SPARES}s /dev/disk/by-id/scsi-35000039548cb637c /dev/disk/by-id/scsi-35000039548cb7c8c /dev/disk/by-id/scsi-35000039548cb85c8 /dev/disk/by-id/scsi-35000039548d9b504 /dev/disk/by-id/scsi-35000039548da2b08 /dev/disk/by-id/scsi-35000039548dad2fc /dev/disk/by-id/scsi-350000399384be921 /dev/disk/by-id/scsi-35000039548db096c
|
||||||
# sudo zfs create -o canmount=on -o mountpoint=/storage zstorage/storage
|
sudo zfs create -o mountpoint=legacy zstorage/nix
|
||||||
|
sudo zfs create -o canmount=on -o mountpoint=/storage zstorage/storage
|
||||||
|
*/
|
||||||
name = "zstorage";
|
name = "zstorage";
|
||||||
config = {};
|
config = {};
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,16 +16,18 @@
|
||||||
config = {
|
config = {
|
||||||
theme = "ansi";
|
theme = "ansi";
|
||||||
};
|
};
|
||||||
# themes = {
|
/*
|
||||||
# "Catppuccin-mocha" = builtins.readFile (pkgs.fetchFromGitHub
|
themes = {
|
||||||
# {
|
"Catppuccin-mocha" = builtins.readFile (pkgs.fetchFromGitHub
|
||||||
# owner = "catppuccin";
|
{
|
||||||
# repo = "bat";
|
owner = "catppuccin";
|
||||||
# rev = "477622171ec0529505b0ca3cada68fc9433648c6";
|
repo = "bat";
|
||||||
# sha256 = "6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
|
rev = "477622171ec0529505b0ca3cada68fc9433648c6";
|
||||||
# }
|
sha256 = "6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
|
||||||
# + "/Catppuccin-mocha.tmTheme");
|
}
|
||||||
# };
|
+ "/Catppuccin-mocha.tmTheme");
|
||||||
|
};
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
home.shellAliases = {
|
home.shellAliases = {
|
||||||
|
@ -38,8 +40,10 @@
|
||||||
emacs = {pkgs, ...}: {
|
emacs = {pkgs, ...}: {
|
||||||
programs.emacs = {
|
programs.emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# extraConfig = ''
|
/*
|
||||||
# '';
|
extraConfig = ''
|
||||||
|
'';
|
||||||
|
*/
|
||||||
extraPackages = epkgs: (with epkgs; [
|
extraPackages = epkgs: (with epkgs; [
|
||||||
magit
|
magit
|
||||||
]);
|
]);
|
||||||
|
@ -61,9 +65,11 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# home.sessionVariables = {
|
/*
|
||||||
# RUSTDOCFLAGS = "--default-theme=ayu";
|
home.sessionVariables = {
|
||||||
# };
|
RUSTDOCFLAGS = "--default-theme=ayu";
|
||||||
|
};
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
common = {
|
common = {
|
||||||
|
@ -79,10 +85,13 @@
|
||||||
homeManagerModules.helix
|
homeManagerModules.helix
|
||||||
git
|
git
|
||||||
zellij
|
zellij
|
||||||
# broot
|
|
||||||
# nnn
|
|
||||||
htop
|
htop
|
||||||
# tmux
|
|
||||||
|
/*
|
||||||
|
broot
|
||||||
|
nnn
|
||||||
|
tmux
|
||||||
|
*/
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
@ -158,10 +167,12 @@
|
||||||
programs.fzf = {
|
programs.fzf = {
|
||||||
# using good ol' fzf until skim sucks less out of the box I guess
|
# using good ol' fzf until skim sucks less out of the box I guess
|
||||||
enable = true;
|
enable = true;
|
||||||
# enableFishIntegration = true;
|
/*
|
||||||
# defaultCommand = "fd --type f";
|
enableFishIntegration = true;
|
||||||
# defaultOptions = ["--height 40%"];
|
defaultCommand = "fd --type f";
|
||||||
# fileWidgetOptions = ["--preview 'head {}'"];
|
defaultOptions = ["--height 40%"];
|
||||||
|
fileWidgetOptions = ["--preview 'head {}'"];
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: regular cron or something?
|
# TODO: regular cron or something?
|
||||||
|
@ -184,8 +195,10 @@
|
||||||
|
|
||||||
firefox = {pkgs, ...}: {
|
firefox = {pkgs, ...}: {
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
# TODO: this should be able to work on macos, no?
|
/*
|
||||||
# TODO: enable dark theme by default
|
TODO: this should be able to work on macos, no?
|
||||||
|
TODO: enable color scheme/theme by default
|
||||||
|
*/
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# TODO: uses nixpkgs.pass so pass otp doesn't work
|
# TODO: uses nixpkgs.pass so pass otp doesn't work
|
||||||
|
@ -196,9 +209,11 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
/*
|
||||||
# ublock-origin
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
# ]; # TODO: would be nice to have _all_ my firefox stuff managed here instead of Firefox Sync maybe?
|
ublock-origin
|
||||||
|
]; # TODO: would be nice to have _all_ my firefox stuff managed here instead of Firefox Sync maybe?
|
||||||
|
*/
|
||||||
|
|
||||||
profiles = {
|
profiles = {
|
||||||
daniel = {
|
daniel = {
|
||||||
|
@ -221,8 +236,10 @@
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# userContent = ''
|
/*
|
||||||
# '';
|
userContent = ''
|
||||||
|
'';
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -360,10 +377,12 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# signing = {
|
/*
|
||||||
# signByDefault = false;
|
signing = {
|
||||||
# key = ~/.ssh/personal-ed25519;
|
signByDefault = false;
|
||||||
# };
|
key = ~/.ssh/personal-ed25519;
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
aliases = {
|
aliases = {
|
||||||
a = "add -A";
|
a = "add -A";
|
||||||
|
@ -487,11 +506,13 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# NOTE: Currently, helix crashes when editing markdown in certain scenarios,
|
/*
|
||||||
# presumably due to an old markdown treesitter grammar
|
NOTE: Currently, helix crashes when editing markdown in certain scenarios,
|
||||||
# https://github.com/helix-editor/helix/issues/9011
|
presumably due to an old markdown treesitter grammar
|
||||||
# https://github.com/helix-editor/helix/issues/8821
|
https://github.com/helix-editor/helix/issues/9011
|
||||||
# https://github.com/tree-sitter-grammars/tree-sitter-markdown/issues/114
|
https://github.com/helix-editor/helix/issues/8821
|
||||||
|
https://github.com/tree-sitter-grammars/tree-sitter-markdown/issues/114
|
||||||
|
*/
|
||||||
|
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -503,41 +524,45 @@
|
||||||
args = ["start"];
|
args = ["start"];
|
||||||
};
|
};
|
||||||
|
|
||||||
# next-ls = {
|
/*
|
||||||
# command = "next-ls";
|
next-ls = {
|
||||||
# args = ["--stdout"];
|
command = "next-ls";
|
||||||
# };
|
args = ["--stdout"];
|
||||||
|
};
|
||||||
|
|
||||||
# deno = {
|
deno = {
|
||||||
# command = "deno";
|
command = "deno";
|
||||||
# args = ["lsp"];
|
args = ["lsp"];
|
||||||
# config = {
|
config = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# lint = true;
|
lint = true;
|
||||||
# unstable = true;
|
unstable = true;
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
language = [
|
language = [
|
||||||
# {
|
/*
|
||||||
# name = "heex";
|
{
|
||||||
# scope = "source.heex";
|
name = "heex";
|
||||||
# injection-regex = "heex";
|
scope = "source.heex";
|
||||||
# language-servers = ["lexical"]; # "lexical" "next-ls" ?
|
injection-regex = "heex";
|
||||||
# auto-format = true;
|
language-servers = ["lexical"]; # "lexical" "next-ls" ?
|
||||||
# file-types = ["heex"];
|
auto-format = true;
|
||||||
# roots = ["mix.exs" "mix.lock"];
|
file-types = ["heex"];
|
||||||
# indent = {
|
roots = ["mix.exs" "mix.lock"];
|
||||||
# tab-width = 2;
|
indent = {
|
||||||
# unit = " ";
|
tab-width = 2;
|
||||||
# };
|
unit = " ";
|
||||||
# }
|
};
|
||||||
# {
|
}
|
||||||
# name = "elixir";
|
{
|
||||||
# language-servers = ["lexical"]; # "lexical" "next-ls" ?
|
name = "elixir";
|
||||||
# auto-format = true;
|
language-servers = ["lexical"]; # "lexical" "next-ls" ?
|
||||||
# }
|
auto-format = true;
|
||||||
|
}
|
||||||
|
*/
|
||||||
{
|
{
|
||||||
name = "rust";
|
name = "rust";
|
||||||
|
|
||||||
|
@ -596,65 +621,67 @@
|
||||||
auto-format = true;
|
auto-format = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
# {
|
/*
|
||||||
# name = "javascript";
|
{
|
||||||
# language-id = "javascript";
|
name = "javascript";
|
||||||
# grammar = "javascript";
|
language-id = "javascript";
|
||||||
# scope = "source.js";
|
grammar = "javascript";
|
||||||
# injection-regex = "^(js|javascript)$";
|
scope = "source.js";
|
||||||
# file-types = ["js" "mjs"];
|
injection-regex = "^(js|javascript)$";
|
||||||
# shebangs = ["deno"];
|
file-types = ["js" "mjs"];
|
||||||
# language-servers = ["deno"];
|
shebangs = ["deno"];
|
||||||
# roots = ["deno.jsonc" "deno.json"];
|
language-servers = ["deno"];
|
||||||
# formatter = {
|
roots = ["deno.jsonc" "deno.json"];
|
||||||
# command = "deno";
|
formatter = {
|
||||||
# args = ["fmt"];
|
command = "deno";
|
||||||
# };
|
args = ["fmt"];
|
||||||
# auto-format = true;
|
};
|
||||||
# comment-token = "//";
|
auto-format = true;
|
||||||
# indent = {
|
comment-token = "//";
|
||||||
# tab-width = 2;
|
indent = {
|
||||||
# unit = "\t";
|
tab-width = 2;
|
||||||
# };
|
unit = "\t";
|
||||||
# }
|
};
|
||||||
|
}
|
||||||
|
|
||||||
# {
|
{
|
||||||
# name = "typescript";
|
name = "typescript";
|
||||||
# language-id = "typescript";
|
language-id = "typescript";
|
||||||
# grammar = "typescript";
|
grammar = "typescript";
|
||||||
# scope = "source.ts";
|
scope = "source.ts";
|
||||||
# injection-regex = "^(ts|typescript)$";
|
injection-regex = "^(ts|typescript)$";
|
||||||
# file-types = ["ts"];
|
file-types = ["ts"];
|
||||||
# shebangs = ["deno"];
|
shebangs = ["deno"];
|
||||||
# language-servers = ["deno"];
|
language-servers = ["deno"];
|
||||||
# roots = ["deno.jsonc" "deno.json"];
|
roots = ["deno.jsonc" "deno.json"];
|
||||||
# formatter = {
|
formatter = {
|
||||||
# command = "deno";
|
command = "deno";
|
||||||
# args = ["fmt"];
|
args = ["fmt"];
|
||||||
# };
|
};
|
||||||
# auto-format = true;
|
auto-format = true;
|
||||||
# comment-token = "//";
|
comment-token = "//";
|
||||||
# indent = {
|
indent = {
|
||||||
# tab-width = 2;
|
tab-width = 2;
|
||||||
# unit = "\t";
|
unit = "\t";
|
||||||
# };
|
};
|
||||||
# }
|
}
|
||||||
|
|
||||||
# {
|
{
|
||||||
# name = "jsonc";
|
name = "jsonc";
|
||||||
# language-id = "json";
|
language-id = "json";
|
||||||
# grammar = "jsonc";
|
grammar = "jsonc";
|
||||||
# scope = "source.jsonc";
|
scope = "source.jsonc";
|
||||||
# injection-regex = "^(jsonc)$";
|
injection-regex = "^(jsonc)$";
|
||||||
# roots = ["deno.jsonc" "deno.json"];
|
roots = ["deno.jsonc" "deno.json"];
|
||||||
# file-types = ["jsonc"];
|
file-types = ["jsonc"];
|
||||||
# language-servers = ["deno"];
|
language-servers = ["deno"];
|
||||||
# indent = {
|
indent = {
|
||||||
# tab-width = 2;
|
tab-width = 2;
|
||||||
# unit = " ";
|
unit = " ";
|
||||||
# };
|
};
|
||||||
# auto-format = true;
|
auto-format = true;
|
||||||
# }
|
}
|
||||||
|
*/
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -664,14 +691,17 @@
|
||||||
editor = {
|
editor = {
|
||||||
soft-wrap.enable = true;
|
soft-wrap.enable = true;
|
||||||
auto-pairs = false;
|
auto-pairs = false;
|
||||||
# auto-save = false;
|
|
||||||
# completion-trigger-len = 1;
|
|
||||||
# color-modes = false;
|
|
||||||
bufferline = "multiple";
|
bufferline = "multiple";
|
||||||
# scrolloff = 8;
|
|
||||||
rulers = [81 121];
|
rulers = [81 121];
|
||||||
cursorline = true;
|
cursorline = true;
|
||||||
|
|
||||||
|
/*
|
||||||
|
auto-save = false;
|
||||||
|
completion-trigger-len = 1;
|
||||||
|
color-modes = false;
|
||||||
|
scrolloff = 8;
|
||||||
|
*/
|
||||||
|
|
||||||
inline-diagnostics = {
|
inline-diagnostics = {
|
||||||
cursor-line = "hint";
|
cursor-line = "hint";
|
||||||
other-lines = "error";
|
other-lines = "error";
|
||||||
|
@ -703,18 +733,21 @@
|
||||||
left = [
|
left = [
|
||||||
"file-name"
|
"file-name"
|
||||||
"mode"
|
"mode"
|
||||||
# "selections"
|
/*
|
||||||
# "primary-selection-length"
|
"selections"
|
||||||
# "position"
|
"primary-selection-length"
|
||||||
# "position-percentage"
|
"position"
|
||||||
|
"position-percentage"
|
||||||
|
*/
|
||||||
"spinner"
|
"spinner"
|
||||||
"diagnostics"
|
"diagnostics"
|
||||||
"workspace-diagnostics"
|
"workspace-diagnostics"
|
||||||
];
|
];
|
||||||
|
/*
|
||||||
|
center = ["file-name"];
|
||||||
|
right = ["version-control" "total-line-numbers" "file-encoding"];
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
# center = ["file-name"];
|
|
||||||
# right = ["version-control" "total-line-numbers" "file-encoding"];
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
keys = {
|
keys = {
|
||||||
insert = {
|
insert = {
|
||||||
|
@ -984,8 +1017,10 @@
|
||||||
fg = fgdim;
|
fg = fgdim;
|
||||||
};
|
};
|
||||||
|
|
||||||
# "ui.cursorline.primary" = { bg = "default" }
|
/*
|
||||||
# "ui.cursorline.secondary" = { bg = "default" }
|
"ui.cursorline.primary" = { bg = "default" }
|
||||||
|
"ui.cursorline.secondary" = { bg = "default" }
|
||||||
|
*/
|
||||||
"ui.cursorcolumn.primary" = {bg = bg3;};
|
"ui.cursorcolumn.primary" = {bg = bg3;};
|
||||||
"ui.cursorcolumn.secondary" = {bg = bg3;};
|
"ui.cursorcolumn.secondary" = {bg = bg3;};
|
||||||
|
|
||||||
|
@ -1006,15 +1041,17 @@
|
||||||
programs.htop = {
|
programs.htop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
# hide_kernel_threads = 1;
|
/*
|
||||||
# hide_userland_threads = 1;
|
hide_kernel_threads = 1;
|
||||||
# show_program_path = 0;
|
hide_userland_threads = 1;
|
||||||
# header_margin = 0;
|
show_program_path = 0;
|
||||||
# show_cpu_frequency = 1;
|
header_margin = 0;
|
||||||
# highlight_base_name = 1;
|
show_cpu_frequency = 1;
|
||||||
# tree_view = 0;
|
highlight_base_name = 1;
|
||||||
# htop_version = "3.2.2";
|
tree_view = 0;
|
||||||
# config_reader_min_version = 3;
|
htop_version = "3.2.2";
|
||||||
|
config_reader_min_version = 3;
|
||||||
|
*/
|
||||||
fields = "0 48 17 18 38 39 40 2 46 47 49 1";
|
fields = "0 48 17 18 38 39 40 2 46 47 49 1";
|
||||||
hide_kernel_threads = 1;
|
hide_kernel_threads = 1;
|
||||||
hide_userland_threads = 1;
|
hide_userland_threads = 1;
|
||||||
|
@ -1057,22 +1094,26 @@
|
||||||
tree_sort_direction = 1;
|
tree_sort_direction = 1;
|
||||||
tree_view_always_by_pid = 0;
|
tree_view_always_by_pid = 0;
|
||||||
all_branches_collapsed = 0;
|
all_branches_collapsed = 0;
|
||||||
# screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
|
|
||||||
# .sort_key=PERCENT_MEM
|
/*
|
||||||
# .tree_sort_key=PID
|
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
|
||||||
# .tree_view=0
|
.sort_key=PERCENT_MEM
|
||||||
# .tree_view_always_by_pid=0
|
.tree_sort_key=PID
|
||||||
# .sort_direction=-1
|
.tree_view=0
|
||||||
# .tree_sort_direction=1
|
.tree_view_always_by_pid=0
|
||||||
# .all_branches_collapsed=0
|
.sort_direction=-1
|
||||||
# screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE Command
|
.tree_sort_direction=1
|
||||||
# .sort_key=IO_RATE
|
.all_branches_collapsed=0
|
||||||
# .tree_sort_key=PID
|
|
||||||
# .tree_view=0
|
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE Command
|
||||||
# .tree_view_always_by_pid=0
|
.sort_key=IO_RATE
|
||||||
# .sort_direction=-1
|
.tree_sort_key=PID
|
||||||
# .tree_sort_direction=1
|
.tree_view=0
|
||||||
# .all_branches_collapsed=0
|
.tree_view_always_by_pid=0
|
||||||
|
.sort_direction=-1
|
||||||
|
.tree_sort_direction=1
|
||||||
|
.all_branches_collapsed=0
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1247,11 +1288,14 @@
|
||||||
./sway.nix
|
./sway.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
# sway-laptop = {};
|
|
||||||
# swaylock = {};
|
/*
|
||||||
# tmux = {};
|
sway-laptop = {};
|
||||||
# wallpaper-manager = {};
|
swaylock = {};
|
||||||
# waybar = {};
|
tmux = {};
|
||||||
|
wallpaper-manager = {};
|
||||||
|
waybar = {};
|
||||||
|
*/
|
||||||
|
|
||||||
wezterm = {
|
wezterm = {
|
||||||
pkgs,
|
pkgs,
|
||||||
|
@ -1315,15 +1359,17 @@
|
||||||
|
|
||||||
compose_cursor = orange;
|
compose_cursor = orange;
|
||||||
|
|
||||||
# copy_mode_active_highlight_bg = { Color = '#000000' },
|
/*
|
||||||
# copy_mode_active_highlight_fg = { AnsiColor = 'Black' },
|
copy_mode_active_highlight_bg = { Color = '#000000' },
|
||||||
# copy_mode_inactive_highlight_bg = { Color = '#52ad70' },
|
copy_mode_active_highlight_fg = { AnsiColor = 'Black' },
|
||||||
# copy_mode_inactive_highlight_fg = { AnsiColor = 'White' },
|
copy_mode_inactive_highlight_bg = { Color = '#52ad70' },
|
||||||
|
copy_mode_inactive_highlight_fg = { AnsiColor = 'White' },
|
||||||
|
|
||||||
# quick_select_label_bg = { Color = 'peru' },
|
quick_select_label_bg = { Color = 'peru' },
|
||||||
# quick_select_label_fg = { Color = '#ffffff' },
|
quick_select_label_fg = { Color = '#ffffff' },
|
||||||
# quick_select_match_bg = { AnsiColor = 'Navy' },
|
quick_select_match_bg = { AnsiColor = 'Navy' },
|
||||||
# quick_select_match_fg = { Color = '#ffffff' },
|
quick_select_match_fg = { Color = '#ffffff' },
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1822,8 +1868,10 @@
|
||||||
# TODO: port config
|
# TODO: port config
|
||||||
|
|
||||||
plugins = {
|
plugins = {
|
||||||
# tab-bar = {path = "tab-bar";};
|
/*
|
||||||
# compact-bar = {path = "compact-bar";};
|
tab-bar = {path = "tab-bar";};
|
||||||
|
compact-bar = {path = "compact-bar";};
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
ui = {
|
ui = {
|
||||||
|
|
|
@ -88,9 +88,12 @@
|
||||||
input = {
|
input = {
|
||||||
kb_layout = "us";
|
kb_layout = "us";
|
||||||
kb_options = "ctrl:nocaps";
|
kb_options = "ctrl:nocaps";
|
||||||
# kb_variant =
|
|
||||||
# kb_model =
|
/*
|
||||||
# kb_rules =
|
kb_variant =
|
||||||
|
kb_model =
|
||||||
|
kb_rules =
|
||||||
|
*/
|
||||||
|
|
||||||
follow_mouse = 2;
|
follow_mouse = 2;
|
||||||
|
|
||||||
|
@ -131,10 +134,13 @@
|
||||||
|
|
||||||
decoration = {
|
decoration = {
|
||||||
rounding = 3;
|
rounding = 3;
|
||||||
# blur = "no";
|
|
||||||
# blur_size = 3
|
/*
|
||||||
# blur_passes = 1
|
blur = "no";
|
||||||
# blur_new_optimizations = on
|
blur_size = 3
|
||||||
|
blur_passes = 1
|
||||||
|
blur_new_optimizations = on
|
||||||
|
*/
|
||||||
|
|
||||||
drop_shadow = "yes";
|
drop_shadow = "yes";
|
||||||
shadow_range = 4;
|
shadow_range = 4;
|
||||||
|
@ -147,8 +153,10 @@
|
||||||
"$mod" = "SUPER";
|
"$mod" = "SUPER";
|
||||||
bind = [
|
bind = [
|
||||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||||
# "$mod, return, exec, wezterm"
|
/*
|
||||||
# "$mod SHIFT, return, exec, wezterm"
|
"$mod, return, exec, wezterm"
|
||||||
|
"$mod SHIFT, return, exec, wezterm"
|
||||||
|
*/
|
||||||
"$mod, return, exec, wezterm"
|
"$mod, return, exec, wezterm"
|
||||||
"$mod SHIFT, return, exec, kitty"
|
"$mod SHIFT, return, exec, kitty"
|
||||||
"$mod, U, exec, firefox"
|
"$mod, U, exec, firefox"
|
||||||
|
@ -264,13 +272,13 @@
|
||||||
workspace_swipe = on
|
workspace_swipe = on
|
||||||
}
|
}
|
||||||
|
|
||||||
# Example per-device config
|
## Example per-device config
|
||||||
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
## See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
||||||
# device:epic-mouse-v1 {
|
## device:epic-mouse-v1 {
|
||||||
# sensitivity = -0.5
|
## sensitivity = -0.5
|
||||||
# }
|
## }
|
||||||
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
## See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||||
windowrulev2 = idleinhibit,class:^.*([Ss]lippi).*$
|
windowrulev2 = idleinhibit,class:^.*([Ss]lippi).*$
|
||||||
windowrulev2 = float,class:^.*([Kk]itty|[Ff]irefox|[Ww]ezterm|[Dd]iscord|[Ss]potify|[Ss]lack).*$
|
windowrulev2 = float,class:^.*([Kk]itty|[Ff]irefox|[Ww]ezterm|[Dd]iscord|[Ss]potify|[Ss]lack).*$
|
||||||
windowrulev2 = opacity 1.0 0.9,floating:1
|
windowrulev2 = opacity 1.0 0.9,floating:1
|
||||||
|
|
|
@ -291,34 +291,36 @@
|
||||||
"XF86AudioMute" = "exec swayosd-client --output-volume mute-toggle";
|
"XF86AudioMute" = "exec swayosd-client --output-volume mute-toggle";
|
||||||
"XF86AudioMicMute" = "exec swayosd-client --input-volume mute-toggle";
|
"XF86AudioMicMute" = "exec swayosd-client --input-volume mute-toggle";
|
||||||
"${mod}+shift+v" = "exec swayosd-client --input-volume mute-toggle";
|
"${mod}+shift+v" = "exec swayosd-client --input-volume mute-toggle";
|
||||||
# "XF86AudioRaiseVolume" = "exec swayosd-client --output-volume 15";
|
|
||||||
# "XF86AudioLowerVolume" = "exec swayosd-client --output-volume -15";
|
|
||||||
# "XF86AudioRaiseVolume" = "exec swayosd-client --output-volume raise --max-volume 120";
|
|
||||||
# "XF86AudioLowerVolume" = "exec swayosd-client --output-volume lower --max-volume 120";
|
|
||||||
# "XF86AudioRaiseVolume" = "exec swayosd-client --output-volume +10 --device alsa_output.pci-0000_11_00.4.analog-stereo.monitor";
|
|
||||||
# "XF86AudioLowerVolume" = "exec swayosd-client --output-volume -10 --device alsa_output.pci-0000_11_00.4.analog-stereo.monitor";
|
|
||||||
"XF86MonBrightnessUp" = "exec swayosd-client --brightness raise";
|
"XF86MonBrightnessUp" = "exec swayosd-client --brightness raise";
|
||||||
"XF86MonBrightnessDown" = "exec swayosd-client --brightness lower";
|
"XF86MonBrightnessDown" = "exec swayosd-client --brightness lower";
|
||||||
# "XF86MonBrightnessUp" = " exec swayosd-client --brightness 10";
|
|
||||||
# "XF86MonBrightnessDown" = "exec swayosd-client --brightness -10";
|
|
||||||
|
|
||||||
# "XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
|
||||||
# "XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
|
||||||
"control+XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +1%";
|
"control+XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +1%";
|
||||||
"control+XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -1%";
|
"control+XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -1%";
|
||||||
# "XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
|
||||||
"${mod}+F1" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
"${mod}+F1" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||||
# "XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
|
||||||
# "XF86MonBrightnessDown" = "exec brightnessctl set 10%-";
|
|
||||||
# "XF86MonBrightnessUp" = "exec brightnessctl set +10%";
|
|
||||||
# "shift+XF86MonBrightnessDown" = "exec brightnessctl set 1%";
|
|
||||||
# "shift+XF86MonBrightnessUp" = "exec brightnessctl set 100%";
|
|
||||||
# "control+XF86MonBrightnessDown" = "exec brightnessctl set 1%-";
|
|
||||||
# "control+XF86MonBrightnessUp" = "exec brightnessctl set +1%";
|
|
||||||
"XF86AudioPlay" = "exec playerctl play-pause";
|
"XF86AudioPlay" = "exec playerctl play-pause";
|
||||||
"XF86AudioNext" = "exec playerctl next";
|
"XF86AudioNext" = "exec playerctl next";
|
||||||
"XF86AudioPrev" = "exec playerctl previous";
|
"XF86AudioPrev" = "exec playerctl previous";
|
||||||
# "${mod}+shift+v" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
|
||||||
|
/*
|
||||||
|
"XF86MonBrightnessUp" = " exec swayosd-client --brightness 10";
|
||||||
|
"XF86MonBrightnessDown" = "exec swayosd-client --brightness -10";
|
||||||
|
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||||
|
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||||
|
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||||
|
"XF86AudioRaiseVolume" = "exec swayosd-client --output-volume 15";
|
||||||
|
"XF86AudioLowerVolume" = "exec swayosd-client --output-volume -15";
|
||||||
|
"XF86AudioRaiseVolume" = "exec swayosd-client --output-volume raise --max-volume 120";
|
||||||
|
"XF86AudioLowerVolume" = "exec swayosd-client --output-volume lower --max-volume 120";
|
||||||
|
"XF86AudioRaiseVolume" = "exec swayosd-client --output-volume +10 --device alsa_output.pci-0000_11_00.4.analog-stereo.monitor";
|
||||||
|
"XF86AudioLowerVolume" = "exec swayosd-client --output-volume -10 --device alsa_output.pci-0000_11_00.4.analog-stereo.monitor";
|
||||||
|
"XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||||
|
"XF86MonBrightnessDown" = "exec brightnessctl set 10%-";
|
||||||
|
"XF86MonBrightnessUp" = "exec brightnessctl set +10%";
|
||||||
|
"shift+XF86MonBrightnessDown" = "exec brightnessctl set 1%";
|
||||||
|
"shift+XF86MonBrightnessUp" = "exec brightnessctl set 100%";
|
||||||
|
"control+XF86MonBrightnessDown" = "exec brightnessctl set 1%-";
|
||||||
|
"control+XF86MonBrightnessUp" = "exec brightnessctl set +1%";
|
||||||
|
"${mod}+shift+v" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||||
|
*/
|
||||||
|
|
||||||
"${mod}+control+shift+l" = "exec swaylock";
|
"${mod}+control+shift+l" = "exec swaylock";
|
||||||
|
|
||||||
|
|
|
@ -13,12 +13,12 @@
|
||||||
"mpris"
|
"mpris"
|
||||||
"idle_inhibitor"
|
"idle_inhibitor"
|
||||||
"bluetooth"
|
"bluetooth"
|
||||||
# "wireplumber",
|
"wireplumber"
|
||||||
"pulseaudio"
|
"pulseaudio"
|
||||||
# "network",
|
"network"
|
||||||
"cpu"
|
"cpu"
|
||||||
"memory"
|
"memory"
|
||||||
# "temperature",
|
"temperature"
|
||||||
"backlight"
|
"backlight"
|
||||||
"battery"
|
"battery"
|
||||||
"tray"
|
"tray"
|
||||||
|
@ -27,17 +27,17 @@
|
||||||
"format" = "<span</span>";
|
"format" = "<span</span>";
|
||||||
"format-connected" = "<span></span>";
|
"format-connected" = "<span></span>";
|
||||||
"format-connected-battery" = "<span></span>";
|
"format-connected-battery" = "<span></span>";
|
||||||
# "format-device-preference" = [ "device1", "device2" ], # preference list deciding the displayed devic;
|
# "format-device-preference" = [ "device1", "device2" ]; # preference list deciding the displayed device
|
||||||
"tooltip-format" = "{controller_alias}@{controller_address} ({num_connections} connected)";
|
"tooltip-format" = "{controller_alias}@{controller_address} ({num_connections} connected)";
|
||||||
"tooltip-format-connected" = "{controller_alias}@{controller_address} ({num_connections} connected)\n{device_enumerate}";
|
"tooltip-format-connected" = "{controller_alias}@{controller_address} ({num_connections} connected)\n{device_enumerate}";
|
||||||
"tooltip-format-enumerate-connected" = "{device_alias}@{device_address}";
|
"tooltip-format-enumerate-connected" = "{device_alias}@{device_address}";
|
||||||
"tooltip-format-enumerate-connected-battery" = "{device_alias}@{device_address} ( {device_battery_percentage}%)";
|
"tooltip-format-enumerate-connected-battery" = "{device_alias}@{device_address} ( {device_battery_percentage}%)";
|
||||||
};
|
};
|
||||||
# "wireplumber" = ;
|
"wireplumber" = {
|
||||||
# "format" = "{volume}% {icon}";
|
"format" = "{volume}% {icon}";
|
||||||
# "format-muted" = "";
|
"format-muted" = "";
|
||||||
# "on-click" = "helvum;
|
"on-click" = "helvum";
|
||||||
# },
|
};
|
||||||
"sway/workspaces" = {
|
"sway/workspaces" = {
|
||||||
"disable-scroll" = false;
|
"disable-scroll" = false;
|
||||||
"persistent_workspaces" = {
|
"persistent_workspaces" = {
|
||||||
|
@ -69,10 +69,12 @@
|
||||||
"format" = "{} ";
|
"format" = "{} ";
|
||||||
};
|
};
|
||||||
"temperature" = {
|
"temperature" = {
|
||||||
# "thermal-zone" = 2;
|
/*
|
||||||
# "hwmon-path" = "/sys/class/hwmon/hwmon2/temp1_input";
|
"thermal-zone" = 2;
|
||||||
|
"hwmon-path" = "/sys/class/hwmon/hwmon2/temp1_input";
|
||||||
|
"format-critical" = "{temperatureC}°C {icon}";
|
||||||
|
*/
|
||||||
"critical-threshold" = 80;
|
"critical-threshold" = 80;
|
||||||
# "format-critical" = "{temperatureC}°C {icon}";
|
|
||||||
"format" = "{temperatureC}°C {icon}";
|
"format" = "{temperatureC}°C {icon}";
|
||||||
"format-icons" = ["" "" ""];
|
"format-icons" = ["" "" ""];
|
||||||
};
|
};
|
||||||
|
@ -106,12 +108,14 @@
|
||||||
"format" = "{title} by {artist}";
|
"format" = "{title} by {artist}";
|
||||||
};
|
};
|
||||||
"pulseaudio" = {
|
"pulseaudio" = {
|
||||||
# "scroll-step" = 1, # %, can be a floa;
|
/*
|
||||||
|
"scroll-step" = 1, # %, can be a floa;
|
||||||
|
"format" = "{volume}% {icon} {format_source}";
|
||||||
|
"format-bluetooth" = "{volume}% {icon} {format_source}";
|
||||||
|
"format-bluetooth-muted" = " {icon} {format_source}";
|
||||||
|
"format-muted" = " {format_source}";
|
||||||
|
*/
|
||||||
"format" = "{volume} {icon} <span>{format_source}</span>";
|
"format" = "{volume} {icon} <span>{format_source}</span>";
|
||||||
#"format" = "{volume}% {icon} {format_source}";
|
|
||||||
#"format-bluetooth" = "{volume}% {icon} {format_source}";
|
|
||||||
#"format-bluetooth-muted" = " {icon} {format_source}";
|
|
||||||
#"format-muted" = " {format_source}";
|
|
||||||
"format-muted" = " {format_source}";
|
"format-muted" = " {format_source}";
|
||||||
"format-source" = "";
|
"format-source" = "";
|
||||||
"format-source-muted" = "";
|
"format-source-muted" = "";
|
||||||
|
|
1192
nixos/beefcake.nix
1192
nixos/beefcake.nix
File diff suppressed because it is too large
Load diff
|
@ -40,21 +40,23 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# networking = {
|
/*
|
||||||
# firewall = let
|
networking = {
|
||||||
# terraria = 7777;
|
firewall = let
|
||||||
# stardew-valley = 24642;
|
terraria = 7777;
|
||||||
# web-dev-lan = 18888;
|
stardew-valley = 24642;
|
||||||
# ports = [
|
web-dev-lan = 18888;
|
||||||
# terraria
|
ports = [
|
||||||
# stardew-valley
|
terraria
|
||||||
# web-dev-lan
|
stardew-valley
|
||||||
# ];
|
web-dev-lan
|
||||||
# in {
|
];
|
||||||
# allowedTCPPorts = ports;
|
in {
|
||||||
# allowedUDPPorts = ports;
|
allowedTCPPorts = ports;
|
||||||
# };
|
allowedUDPPorts = ports;
|
||||||
# };
|
};
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
radeontop
|
radeontop
|
||||||
|
@ -63,69 +65,73 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.daniel = {
|
home-manager.users.daniel = {
|
||||||
# slippi-launcher = {
|
/*
|
||||||
# enable = true;
|
slippi-launcher = {
|
||||||
# # isoPath = "${config.home-manager.users.daniel.home.homeDirectory}/../games/roms/dolphin/melee.iso";
|
enable = true;
|
||||||
# launchMeleeOnPlay = false;
|
# isoPath = "${config.home-manager.users.daniel.home.homeDirectory}/../games/roms/dolphin/melee.iso";
|
||||||
# };
|
launchMeleeOnPlay = false;
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
# TODO: monitor config module?
|
# TODO: monitor config module?
|
||||||
# wayland.windowManager.hyprland = {
|
/*
|
||||||
# settings = {
|
wayland.windowManager.hyprland = {
|
||||||
# env = [
|
settings = {
|
||||||
# "EWW_BAR_MON,1"
|
env = [
|
||||||
# ];
|
"EWW_BAR_MON,1"
|
||||||
# # See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
];
|
||||||
# monitor = [
|
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||||
# # "DP-2,3840x2160@60,-2160x0,1,transform,3"
|
monitor = [
|
||||||
# "DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1"
|
# "DP-2,3840x2160@60,-2160x0,1,transform,3"
|
||||||
# # HDR breaks screenshare? "DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1,bitdepth,10"
|
"DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1"
|
||||||
# # "desc:LG Display 0x0521,3840x2160@120,0x0,1"
|
# HDR breaks screenshare? "DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1,bitdepth,10"
|
||||||
# # "desc:Dell Inc. DELL U2720Q D3TM623,3840x2160@60,3840x0,1.5,transform,1"
|
# "desc:LG Display 0x0521,3840x2160@120,0x0,1"
|
||||||
# "DP-2,3840x2160@60,0x0,1.5,transform,1"
|
# "desc:Dell Inc. DELL U2720Q D3TM623,3840x2160@60,3840x0,1.5,transform,1"
|
||||||
# ];
|
"DP-2,3840x2160@60,0x0,1.5,transform,1"
|
||||||
# input = {
|
];
|
||||||
# force_no_accel = true;
|
input = {
|
||||||
# sensitivity = 1; # -1.0 - 1.0, 0 means no modification.
|
force_no_accel = true;
|
||||||
# };
|
sensitivity = 1; # -1.0 - 1.0, 0 means no modification.
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
# config = {
|
config = {
|
||||||
# output = {
|
output = {
|
||||||
# "GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307" = {
|
"GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307" = {
|
||||||
# mode = "3840x2160@120Hz";
|
mode = "3840x2160@120Hz";
|
||||||
# position = "${toString (builtins.ceil (2160 / 1.5))},0";
|
position = "${toString (builtins.ceil (2160 / 1.5))},0";
|
||||||
# };
|
};
|
||||||
|
|
||||||
# "Dell Inc. DELL U2720Q D3TM623" = {
|
"Dell Inc. DELL U2720Q D3TM623" = {
|
||||||
# # desktop left vertical monitor
|
# desktop left vertical monitor
|
||||||
# mode = "3840x2160@60Hz";
|
mode = "3840x2160@60Hz";
|
||||||
# transform = "90";
|
transform = "90";
|
||||||
# scale = "1.5";
|
scale = "1.5";
|
||||||
# position = "0,0";
|
position = "0,0";
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
|
|
||||||
# workspaceOutputAssign =
|
workspaceOutputAssign =
|
||||||
# (
|
(
|
||||||
# map
|
map
|
||||||
# (ws: {
|
(ws: {
|
||||||
# output = "GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307";
|
output = "GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307";
|
||||||
# workspace = toString ws;
|
workspace = toString ws;
|
||||||
# })
|
})
|
||||||
# (lib.range 1 7)
|
(lib.range 1 7)
|
||||||
# )
|
)
|
||||||
# ++ (
|
++ (
|
||||||
# map
|
map
|
||||||
# (ws: {
|
(ws: {
|
||||||
# output = "Dell Inc. DELL U2720Q D3TM623";
|
output = "Dell Inc. DELL U2720Q D3TM623";
|
||||||
# workspace = toString ws;
|
workspace = toString ws;
|
||||||
# })
|
})
|
||||||
# (lib.range 8 9)
|
(lib.range 8 9)
|
||||||
# );
|
);
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
111
nixos/dragon.nix
111
nixos/dragon.nix
|
@ -73,62 +73,65 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: monitor config module?
|
# TODO: monitor config module?
|
||||||
# wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
# settings = {
|
settings = {
|
||||||
# env = [
|
env = [
|
||||||
# "EWW_BAR_MON,1"
|
"EWW_BAR_MON,1"
|
||||||
# ];
|
];
|
||||||
# # See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||||
# monitor = [
|
monitor = [
|
||||||
# # "DP-2,3840x2160@60,-2160x0,1,transform,3"
|
# "DP-2,3840x2160@60,-2160x0,1,transform,3"
|
||||||
# "DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1"
|
"DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1"
|
||||||
# # HDR breaks screenshare? "DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1,bitdepth,10"
|
# TODO: HDR breaks screenshare?
|
||||||
# # "desc:LG Display 0x0521,3840x2160@120,0x0,1"
|
/*
|
||||||
# # "desc:Dell Inc. DELL U2720Q D3TM623,3840x2160@60,3840x0,1.5,transform,1"
|
"DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1,bitdepth,10"
|
||||||
# "DP-2,3840x2160@60,0x0,1.5,transform,1"
|
"desc:LG Display 0x0521,3840x2160@120,0x0,1"
|
||||||
# ];
|
"desc:Dell Inc. DELL U2720Q D3TM623,3840x2160@60,3840x0,1.5,transform,1"
|
||||||
# input = {
|
*/
|
||||||
# force_no_accel = true;
|
"DP-2,3840x2160@60,0x0,1.5,transform,1"
|
||||||
# sensitivity = 1; # -1.0 - 1.0, 0 means no modification.
|
];
|
||||||
# };
|
input = {
|
||||||
# };
|
force_no_accel = true;
|
||||||
# };
|
sensitivity = 1; # -1.0 - 1.0, 0 means no modification.
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
# config = {
|
config = {
|
||||||
# output = {
|
output = {
|
||||||
# "GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307" = {
|
"GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307" = {
|
||||||
# mode = "3840x2160@120Hz";
|
mode = "3840x2160@120Hz";
|
||||||
# position = "${toString (builtins.ceil (2160 / 1.5))},0";
|
position = "${toString (builtins.ceil (2160 / 1.5))},0";
|
||||||
# };
|
};
|
||||||
|
|
||||||
# "Dell Inc. DELL U2720Q D3TM623" = {
|
"Dell Inc. DELL U2720Q D3TM623" = {
|
||||||
# # desktop left vertical monitor
|
# desktop left vertical monitor
|
||||||
# mode = "3840x2160@60Hz";
|
mode = "3840x2160@60Hz";
|
||||||
# transform = "90";
|
transform = "270";
|
||||||
# scale = "1.5";
|
scale = "1.5";
|
||||||
# position = "0,0";
|
position = "0,0";
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
|
|
||||||
# workspaceOutputAssign =
|
workspaceOutputAssign =
|
||||||
# (
|
(
|
||||||
# map
|
map
|
||||||
# (ws: {
|
(ws: {
|
||||||
# output = "GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307";
|
output = "GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307";
|
||||||
# workspace = toString ws;
|
workspace = toString ws;
|
||||||
# })
|
})
|
||||||
# (lib.range 1 7)
|
(lib.range 1 7)
|
||||||
# )
|
)
|
||||||
# ++ (
|
++ (
|
||||||
# map
|
map
|
||||||
# (ws: {
|
(ws: {
|
||||||
# output = "Dell Inc. DELL U2720Q D3TM623";
|
output = "Dell Inc. DELL U2720Q D3TM623";
|
||||||
# workspace = toString ws;
|
workspace = toString ws;
|
||||||
# })
|
})
|
||||||
# (lib.range 8 9)
|
(lib.range 8 9)
|
||||||
# );
|
);
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,9 +11,11 @@
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
# TODO: move this to disko?
|
# TODO: move this to disko?
|
||||||
# NOTE(oninstall):
|
# NOTE(oninstall):
|
||||||
# sudo btrfs subvolume create /swap
|
/*
|
||||||
# sudo btrfs filesystem mkswapfile --size 32g --uuid clear /swap/swapfile
|
sudo btrfs subvolume create /swap
|
||||||
# sudo swapon /swap/swapfile
|
sudo btrfs filesystem mkswapfile --size 32g --uuid clear /swap/swapfile
|
||||||
|
sudo swapon /swap/swapfile
|
||||||
|
*/
|
||||||
{device = "/swap/swapfile";}
|
{device = "/swap/swapfile";}
|
||||||
];
|
];
|
||||||
# findmnt -no UUID -T /swap/swapfile
|
# findmnt -no UUID -T /swap/swapfile
|
||||||
|
@ -23,15 +25,17 @@
|
||||||
services.fwupd.extraRemotes = ["lvfs-testing"];
|
services.fwupd.extraRemotes = ["lvfs-testing"];
|
||||||
|
|
||||||
# NOTE: I'm letting plasma settings handle this I guess?
|
# NOTE: I'm letting plasma settings handle this I guess?
|
||||||
# services.logind = {
|
/*
|
||||||
# lidSwitch = "suspend-then-hibernate";
|
services.logind = {
|
||||||
# # HandleLidSwitchDocked=ignore
|
lidSwitch = "suspend-then-hibernate";
|
||||||
# extraConfig = ''
|
# HandleLidSwitchDocked=ignore
|
||||||
# HandlePowerKey=suspend-then-hibernate
|
extraConfig = ''
|
||||||
# IdleActionSec=10m
|
HandlePowerKey=suspend-then-hibernate
|
||||||
# IdleAction=suspend-then-hibernate
|
IdleActionSec=10m
|
||||||
# '';
|
IdleAction=suspend-then-hibernate
|
||||||
# };
|
'';
|
||||||
|
};
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -56,37 +60,41 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# wayland.windowManager.hyprland = {
|
/*
|
||||||
# settings = {
|
wayland.windowManager.hyprland = {
|
||||||
# env = [
|
settings = {
|
||||||
# "EWW_BAR_MON,0"
|
env = [
|
||||||
# ];
|
"EWW_BAR_MON,0"
|
||||||
# # See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
];
|
||||||
# monitor = [
|
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||||
# "eDP-1,2256x1504@60,0x0,${toString scale}"
|
monitor = [
|
||||||
# ];
|
"eDP-1,2256x1504@60,0x0,${toString scale}"
|
||||||
# };
|
];
|
||||||
# };
|
};
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
# wayland.windowManager.sway = {
|
/*
|
||||||
# config = {
|
wayland.windowManager.sway = {
|
||||||
# output = {
|
config = {
|
||||||
# "BOE 0x0BCA Unknown" = {
|
output = {
|
||||||
# mode = "2256x1504@60Hz";
|
"BOE 0x0BCA Unknown" = {
|
||||||
# position = "0,0";
|
mode = "2256x1504@60Hz";
|
||||||
# scale = toString scale;
|
position = "0,0";
|
||||||
# };
|
scale = toString scale;
|
||||||
|
};
|
||||||
|
|
||||||
# "Dell Inc. DELL U2720Q D3TM623" = {
|
"Dell Inc. DELL U2720Q D3TM623" = {
|
||||||
# # desktop left vertical monitor
|
# desktop left vertical monitor
|
||||||
# mode = "1920x1080@60Hz";
|
mode = "1920x1080@60Hz";
|
||||||
# # transform = "90";
|
# transform = "90";
|
||||||
# # scale = "1.5";
|
# scale = "1.5";
|
||||||
# position = "${toString (builtins.floor (2256 / scale))},0";
|
position = "${toString (builtins.floor (2256 / scale))},0";
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.graphics.extraPackages = [
|
hardware.graphics.extraPackages = [
|
||||||
|
@ -107,15 +115,17 @@
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
# https://github.com/void-linux/void-packages/issues/50417#issuecomment-2131802836 fix framework 13 not shutting down
|
# https://github.com/void-linux/void-packages/issues/50417#issuecomment-2131802836 fix framework 13 not shutting down
|
||||||
# kernelPatches = [
|
/*
|
||||||
# {
|
kernelPatches = [
|
||||||
# name = "framework13shutdownfix";
|
{
|
||||||
# patch = builtins.fetchurl {
|
name = "framework13shutdownfix";
|
||||||
# url = "https://github.com/void-linux/void-packages/files/15445612/0001-Add-hopefully-a-solution-for-shutdown-regression.PATCH";
|
patch = builtins.fetchurl {
|
||||||
# sha256 = "sha256:10zcnzy5hkam2cnxx441b978gzhvnqlcc49k7bpz9dc28xyjik50";
|
url = "https://github.com/void-linux/void-packages/files/15445612/0001-Add-hopefully-a-solution-for-shutdown-regression.PATCH";
|
||||||
# };
|
sha256 = "sha256:10zcnzy5hkam2cnxx441b978gzhvnqlcc49k7bpz9dc28xyjik50";
|
||||||
# }
|
};
|
||||||
# ];
|
}
|
||||||
|
];
|
||||||
|
*/
|
||||||
|
|
||||||
loader = {
|
loader = {
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
|
@ -123,11 +133,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# NOTE(oninstall):
|
# NOTE(oninstall):
|
||||||
# sudo filefrag -v /swap/swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}'
|
/*
|
||||||
# the above won't work for btrfs, instead you need
|
sudo filefrag -v /swap/swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}'
|
||||||
# btrfs inspect-internal map-swapfile -r /swap/swapfile
|
the above won't work for btrfs, instead you need btrfs inspect-internal map-swapfile -r /swap/swapfile
|
||||||
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
|
https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
|
||||||
# many of these come from https://wiki.archlinux.org/title/Framework_Laptop_13#Suspend
|
many of these come from https://wiki.archlinux.org/title/Framework_Laptop_13#Suspend
|
||||||
|
*/
|
||||||
kernelParams = [
|
kernelParams = [
|
||||||
"rtc_cmos.use_acpi_alarm=1"
|
"rtc_cmos.use_acpi_alarm=1"
|
||||||
"amdgpu.sg_display=0"
|
"amdgpu.sg_display=0"
|
||||||
|
@ -151,10 +162,12 @@
|
||||||
powerOnBoot = false;
|
powerOnBoot = false;
|
||||||
};
|
};
|
||||||
powerManagement.cpuFreqGovernor = "ondemand";
|
powerManagement.cpuFreqGovernor = "ondemand";
|
||||||
# powerManagement.resumeCommands = ''
|
/*
|
||||||
# modprobe -rv mt7921e
|
powerManagement.resumeCommands = ''
|
||||||
# modprobe -v mt7921e
|
modprobe -rv mt7921e
|
||||||
# '';
|
modprobe -v mt7921e
|
||||||
|
'';
|
||||||
|
*/
|
||||||
|
|
||||||
services.power-profiles-daemon = {
|
services.power-profiles-daemon = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -170,24 +183,24 @@
|
||||||
"fprintd:TestPamFprintd"
|
"fprintd:TestPamFprintd"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
# tod.enable = true;
|
|
||||||
# tod.driver = pkgs.libfprint-2-tod1-goodix;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# services.tlp = {
|
/*
|
||||||
# enable = true;
|
services.tlp = {
|
||||||
# settings = {
|
enable = true;
|
||||||
# CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
settings = {
|
||||||
# CPU_SCALING_GOVERNOR_ON_BAT = "ondemand";
|
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||||
# CPU_MIN_PERF_ON_BAT = 0;
|
CPU_SCALING_GOVERNOR_ON_BAT = "ondemand";
|
||||||
# CPU_MAX_PERF_ON_BAT = 80;
|
CPU_MIN_PERF_ON_BAT = 0;
|
||||||
|
CPU_MAX_PERF_ON_BAT = 80;
|
||||||
|
|
||||||
# CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||||
# CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||||
# CPU_MIN_PERF_ON_AC = 0;
|
CPU_MIN_PERF_ON_AC = 0;
|
||||||
# CPU_MAX_PERF_ON_AC = 100;
|
CPU_MAX_PERF_ON_AC = 100;
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = let
|
networking.firewall.allowedTCPPorts = let
|
||||||
stardewValley = 24642;
|
stardewValley = 24642;
|
||||||
|
|
|
@ -58,15 +58,19 @@
|
||||||
hardware.raspberry-pi."4".audio.enable = true;
|
hardware.raspberry-pi."4".audio.enable = true;
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
# nixos-22.05
|
/*
|
||||||
# (self: super: { libcec = super.libcec.override { inherit (self) libraspberrypi; }; })
|
nixos-22.05
|
||||||
# nixos-22.11
|
(self: super: { libcec = super.libcec.override { inherit (self) libraspberrypi; }; })
|
||||||
# (self: super: {libcec = super.libcec.override {withLibraspberrypi = true;};})
|
nixos-22.11
|
||||||
|
(self: super: {libcec = super.libcec.override {withLibraspberrypi = true;};})
|
||||||
|
*/
|
||||||
];
|
];
|
||||||
|
|
||||||
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
|
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
|
||||||
# systemd.services."getty@tty1".enable = false;
|
/*
|
||||||
# systemd.services."autovt@tty1".enable = false;
|
systemd.services."getty@tty1".enable = false;
|
||||||
|
systemd.services."autovt@tty1".enable = false;
|
||||||
|
*/
|
||||||
|
|
||||||
# hardware
|
# hardware
|
||||||
systemd.targets.sleep.enable = false;
|
systemd.targets.sleep.enable = false;
|
||||||
|
@ -99,38 +103,40 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# services.udev.extraRules = ''
|
/*
|
||||||
# # allow access to raspi cec device for video group (and optionally register it as a systemd device, used below)
|
services.udev.extraRules = ''
|
||||||
# SUBSYSTEM=="vchiq", GROUP="video", MODE="0660", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/dev/vchiq"
|
# allow access to raspi cec device for video group (and optionally register it as a systemd device, used below)
|
||||||
# '';
|
SUBSYSTEM=="vchiq", GROUP="video", MODE="0660", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/dev/vchiq"
|
||||||
|
'';
|
||||||
|
|
||||||
# powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
|
|
||||||
# optional: attach a persisted cec-client to `/run/cec.fifo`, to avoid the CEC ~1s startup delay per command
|
optional: attach a persisted cec-client to `/run/cec.fifo`, to avoid the CEC ~1s startup delay per command
|
||||||
# scan for devices: `echo 'scan' > /run/cec.fifo ; journalctl -u cec-client.service`
|
scan for devices: `echo 'scan' > /run/cec.fifo ; journalctl -u cec-client.service`
|
||||||
# set pi as active source: `echo 'as' > /run/cec.fifo`
|
set pi as active source: `echo 'as' > /run/cec.fifo`
|
||||||
# systemd.sockets."cec-client" = {
|
systemd.sockets."cec-client" = {
|
||||||
# after = ["dev-vchiq.device"];
|
after = ["dev-vchiq.device"];
|
||||||
# bindsTo = ["dev-vchiq.device"];
|
bindsTo = ["dev-vchiq.device"];
|
||||||
# wantedBy = ["sockets.target"];
|
wantedBy = ["sockets.target"];
|
||||||
# socketConfig = {
|
socketConfig = {
|
||||||
# ListenFIFO = "/run/cec.fifo";
|
ListenFIFO = "/run/cec.fifo";
|
||||||
# SocketGroup = "video";
|
SocketGroup = "video";
|
||||||
# SocketMode = "0660";
|
SocketMode = "0660";
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
# systemd.services."cec-client" = {
|
systemd.services."cec-client" = {
|
||||||
# after = ["dev-vchiq.device"];
|
after = ["dev-vchiq.device"];
|
||||||
# bindsTo = ["dev-vchiq.device"];
|
bindsTo = ["dev-vchiq.device"];
|
||||||
# wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
# serviceConfig = {
|
serviceConfig = {
|
||||||
# ExecStart = ''${pkgs.libcec}/bin/cec-client -d 1'';
|
ExecStart = ''${pkgs.libcec}/bin/cec-client -d 1'';
|
||||||
# ExecStop = ''/bin/sh -c "echo q > /run/cec.fifo"'';
|
ExecStop = ''/bin/sh -c "echo q > /run/cec.fifo"'';
|
||||||
# StandardInput = "socket";
|
StandardInput = "socket";
|
||||||
# StandardOutput = "journal";
|
StandardOutput = "journal";
|
||||||
# Restart = "no";
|
Restart = "no";
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
hardware.graphics.driSupport32Bit = lib.mkForce false;
|
hardware.graphics.driSupport32Bit = lib.mkForce false;
|
||||||
|
|
||||||
|
|
548
nixos/router.nix
548
nixos/router.nix
|
@ -5,13 +5,15 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
# NOTE: My goal is to be able to apply most of the common tweaks to the router
|
/*
|
||||||
# either live on the system for ad-hoc changes (such as forwarding a port for a
|
NOTE: My goal is to be able to apply most of the common tweaks to the router
|
||||||
# multiplayer game) or to tweak these values just below without reaching deeper
|
either live on the system for ad-hoc changes (such as forwarding a port for a
|
||||||
# into the modules' implementation of these configuration values
|
multiplayer game) or to tweak these values just below without reaching deeper
|
||||||
# NOTE: I could turn this into a cool NixOS module?
|
into the modules' implementation of these configuration values
|
||||||
# TODO: review https://francis.begyn.be/blog/nixos-home-router
|
NOTE: I could turn this into a cool NixOS module?
|
||||||
# TODO: more recent: https://github.com/ghostbuster91/blogposts/blob/a2374f0039f8cdf4faddeaaa0347661ffc2ec7cf/router2023-part2/main.md
|
TODO: review https://francis.begyn.be/blog/nixos-home-router
|
||||||
|
TODO: more recent: https://github.com/ghostbuster91/blogposts/blob/a2374f0039f8cdf4faddeaaa0347661ffc2ec7cf/router2023-part2/main.md
|
||||||
|
*/
|
||||||
hostname = "router";
|
hostname = "router";
|
||||||
domain = "h.lyte.dev";
|
domain = "h.lyte.dev";
|
||||||
ip = "192.168.0.1";
|
ip = "192.168.0.1";
|
||||||
|
@ -246,56 +248,58 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
# NOTE: see flake.nix 'nnf.nixosModules.default'
|
# NOTE: see flake.nix 'nnf.nixosModules.default'
|
||||||
# nftables.firewall = let
|
/*
|
||||||
# me = config.networking.nftables.firewall.localZoneName;
|
nftables.firewall = let
|
||||||
# in {
|
me = config.networking.nftables.firewall.localZoneName;
|
||||||
# enable = true;
|
in {
|
||||||
# snippets.nnf-common.enable = true;
|
enable = true;
|
||||||
|
snippets.nnf-common.enable = true;
|
||||||
|
|
||||||
# zones = {
|
zones = {
|
||||||
# ${interfaces.wan.name} = {
|
${interfaces.wan.name} = {
|
||||||
# interfaces = [interfaces.wan.name interfaces.lan.name];
|
interfaces = [interfaces.wan.name interfaces.lan.name];
|
||||||
# };
|
};
|
||||||
# ${interfaces.lan.name} = {
|
${interfaces.lan.name} = {
|
||||||
# parent = interfaces.wan.name;
|
parent = interfaces.wan.name;
|
||||||
# ipv4Addresses = [cidr];
|
ipv4Addresses = [cidr];
|
||||||
# };
|
};
|
||||||
# # banned = {
|
# banned = {
|
||||||
# # ingressExpression = [
|
# ingressExpression = [
|
||||||
# # "ip saddr @banlist"
|
# "ip saddr @banlist"
|
||||||
# # "ip6 saddr @banlist6"
|
# "ip6 saddr @banlist6"
|
||||||
# # ];
|
# ];
|
||||||
# # egressExpression = [
|
# egressExpression = [
|
||||||
# # "ip daddr @banlist"
|
# "ip daddr @banlist"
|
||||||
# # "ip6 daddr @banlist6"
|
# "ip6 daddr @banlist6"
|
||||||
# # ];
|
# ];
|
||||||
# # };
|
|
||||||
# };
|
# };
|
||||||
|
};
|
||||||
|
|
||||||
# rules = {
|
rules = {
|
||||||
# dhcp = {
|
dhcp = {
|
||||||
# from = "all";
|
from = "all";
|
||||||
# to = [hosts.beefcake.ip];
|
to = [hosts.beefcake.ip];
|
||||||
# allowedTCPPorts = [67];
|
allowedTCPPorts = [67];
|
||||||
# allowedUDPPorts = [67];
|
allowedUDPPorts = [67];
|
||||||
# };
|
};
|
||||||
# http = {
|
http = {
|
||||||
# from = "all";
|
from = "all";
|
||||||
# to = [me];
|
to = [me];
|
||||||
# allowedTCPPorts = [80 443];
|
allowedTCPPorts = [80 443];
|
||||||
# };
|
};
|
||||||
# router-ssh = {
|
router-ssh = {
|
||||||
# from = "all";
|
from = "all";
|
||||||
# to = [me];
|
to = [me];
|
||||||
# allowedTCPPorts = [2201];
|
allowedTCPPorts = [2201];
|
||||||
# };
|
};
|
||||||
# server-ssh = {
|
server-ssh = {
|
||||||
# from = "all";
|
from = "all";
|
||||||
# to = [hosts.beefcake.ip];
|
to = [hosts.beefcake.ip];
|
||||||
# allowedTCPPorts = [22];
|
allowedTCPPorts = [22];
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.network = {
|
systemd.network = {
|
||||||
|
@ -347,25 +351,31 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# WAN configuration requires DHCP to get addresses
|
/*
|
||||||
# we also disable some options to be certain we retain as much networking
|
WAN configuration requires DHCP to get addresses
|
||||||
# control as we reasonably can, such as not letting the ISP determine our
|
we also disable some options to be certain we retain as much networking
|
||||||
# hostname or DNS configuration
|
control as we reasonably can, such as not letting the ISP determine our
|
||||||
# TODO: IPv6 (prefix delegation)
|
hostname or DNS configuration
|
||||||
|
TODO: IPv6 (prefix delegation)
|
||||||
|
*/
|
||||||
"40-${interfaces.wan.name}" = {
|
"40-${interfaces.wan.name}" = {
|
||||||
matchConfig.Name = "${interfaces.wan.name}";
|
matchConfig.Name = "${interfaces.wan.name}";
|
||||||
networkConfig = {
|
networkConfig = {
|
||||||
Description = "WAN network - connection to fiber ISP jack";
|
Description = "WAN network - connection to fiber ISP jack";
|
||||||
DHCP = true;
|
DHCP = true;
|
||||||
# IPv6AcceptRA = true;
|
/*
|
||||||
# IPv6PrivacyExtensions = true;
|
IPv6AcceptRA = true;
|
||||||
# IPForward = true;
|
IPv6PrivacyExtensions = true;
|
||||||
|
IPForward = true;
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
dhcpV6Config = {
|
dhcpV6Config = {
|
||||||
# ForceDHCPv6PDOtherInformation = true;
|
/*
|
||||||
# UseHostname = false;
|
ForceDHCPv6PDOtherInformation = true;
|
||||||
# UseDNS = false;
|
UseHostname = false;
|
||||||
# UseNTP = false;
|
UseDNS = false;
|
||||||
|
UseNTP = false;
|
||||||
|
*/
|
||||||
PrefixDelegationHint = "::/56";
|
PrefixDelegationHint = "::/56";
|
||||||
};
|
};
|
||||||
dhcpV4Config = {
|
dhcpV4Config = {
|
||||||
|
@ -391,17 +401,21 @@ in {
|
||||||
|
|
||||||
services.resolved.enable = false;
|
services.resolved.enable = false;
|
||||||
|
|
||||||
# dnsmasq serves as our DHCP and DNS server
|
/*
|
||||||
# almost all the configuration should be derived from the values at the top of
|
dnsmasq serves as our DHCP and DNS server
|
||||||
# this file
|
almost all the configuration should be derived from the values at the top of
|
||||||
|
this file
|
||||||
|
*/
|
||||||
services.dnsmasq = {
|
services.dnsmasq = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
listen-address = "::,127.0.0.1,${ip}";
|
listen-address = "::,127.0.0.1,${ip}";
|
||||||
port = 53;
|
port = 53;
|
||||||
|
|
||||||
# dhcp-authoritative = true;
|
/*
|
||||||
# dnssec = true;
|
dhcp-authoritative = true;
|
||||||
|
dnssec = true;
|
||||||
|
*/
|
||||||
enable-ra = true;
|
enable-ra = true;
|
||||||
|
|
||||||
server = ["1.1.1.1" "9.9.9.9" "8.8.8.8"];
|
server = ["1.1.1.1" "9.9.9.9" "8.8.8.8"];
|
||||||
|
@ -454,8 +468,10 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# since the home network reserves port 22 for ssh to the big server and to
|
/*
|
||||||
# gitea, the router uses port 2201 for ssh
|
since the home network reserves port 22 for ssh to the big server and to
|
||||||
|
gitea, the router uses port 2201 for ssh
|
||||||
|
*/
|
||||||
services.openssh.listenAddresses = [
|
services.openssh.listenAddresses = [
|
||||||
{
|
{
|
||||||
addr = "0.0.0.0";
|
addr = "0.0.0.0";
|
||||||
|
@ -479,252 +495,254 @@ in {
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
# NOTE: everything from here on is deprecated or old stuff
|
/*
|
||||||
|
NOTE: everything from here on is deprecated or old stuff
|
||||||
|
|
||||||
# TODO: may not be strictly necessary for IPv6?
|
TODO: may not be strictly necessary for IPv6?
|
||||||
# TODO: also may not even be the best implementation?
|
TODO: also may not even be the best implementation?
|
||||||
# services.radvd = {
|
services.radvd = {
|
||||||
# enable = false;
|
enable = false;
|
||||||
## NOTE: this config is just the default arch linux config I think and may
|
## NOTE: this config is just the default arch linux config I think and may
|
||||||
## need tweaking? this is what I had on the arch linux router, though :shrug:
|
## need tweaking? this is what I had on the arch linux router, though :shrug:
|
||||||
# config = ''
|
config = ''
|
||||||
# interface lo
|
interface lo
|
||||||
# {
|
{
|
||||||
# AdvSendAdvert on;
|
AdvSendAdvert on;
|
||||||
# MinRtrAdvInterval 3;
|
MinRtrAdvInterval 3;
|
||||||
# MaxRtrAdvInterval 10;
|
MaxRtrAdvInterval 10;
|
||||||
# AdvDefaultPreference low;
|
AdvDefaultPreference low;
|
||||||
# AdvHomeAgentFlag off;
|
AdvHomeAgentFlag off;
|
||||||
|
|
||||||
# prefix 2001:db8:1:0::/64
|
prefix 2001:db8:1:0::/64
|
||||||
# {
|
{
|
||||||
# AdvOnLink on;
|
AdvOnLink on;
|
||||||
# AdvAutonomous on;
|
AdvAutonomous on;
|
||||||
# AdvRouterAddr off;
|
AdvRouterAddr off;
|
||||||
# };
|
};
|
||||||
|
|
||||||
# prefix 0:0:0:1234::/64
|
prefix 0:0:0:1234::/64
|
||||||
# {
|
{
|
||||||
# AdvOnLink on;
|
AdvOnLink on;
|
||||||
# AdvAutonomous on;
|
AdvAutonomous on;
|
||||||
# AdvRouterAddr off;
|
AdvRouterAddr off;
|
||||||
# Base6to4Interface ppp0;
|
Base6to4Interface ppp0;
|
||||||
# AdvPreferredLifetime 120;
|
AdvPreferredLifetime 120;
|
||||||
# AdvValidLifetime 300;
|
AdvValidLifetime 300;
|
||||||
# };
|
};
|
||||||
|
|
||||||
# route 2001:db0:fff::/48
|
route 2001:db0:fff::/48
|
||||||
# {
|
{
|
||||||
# AdvRoutePreference high;
|
AdvRoutePreference high;
|
||||||
# AdvRouteLifetime 3600;
|
AdvRouteLifetime 3600;
|
||||||
# };
|
};
|
||||||
|
|
||||||
# RDNSS 2001:db8::1 2001:db8::2
|
RDNSS 2001:db8::1 2001:db8::2
|
||||||
# {
|
{
|
||||||
# AdvRDNSSLifetime 30;
|
AdvRDNSSLifetime 30;
|
||||||
# };
|
};
|
||||||
|
|
||||||
# DNSSL branch.example.com example.com
|
DNSSL branch.example.com example.com
|
||||||
# {
|
{
|
||||||
# AdvDNSSLLifetime 30;
|
AdvDNSSLLifetime 30;
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
# '';
|
'';
|
||||||
# };
|
};
|
||||||
|
|
||||||
# TODO: old config, should be deleted ASAP
|
TODO: old config, should be deleted ASAP
|
||||||
# services.dnsmasq = {
|
services.dnsmasq = {
|
||||||
# enable = false;
|
enable = false;
|
||||||
# settings = {
|
settings = {
|
||||||
# # server endpoints
|
# server endpoints
|
||||||
# listen-address = "::1,127.0.0.1,${ip}";
|
listen-address = "::1,127.0.0.1,${ip}";
|
||||||
# port = "53";
|
port = "53";
|
||||||
|
|
||||||
# # DNS cache entries
|
# DNS cache entries
|
||||||
# cache-size = "10000";
|
cache-size = "10000";
|
||||||
|
|
||||||
# # local domain entries
|
# local domain entries
|
||||||
# local = "/lan/";
|
local = "/lan/";
|
||||||
# domain = "lan";
|
domain = "lan";
|
||||||
# expand-hosts = true;
|
expand-hosts = true;
|
||||||
|
|
||||||
# dhcp-authoritative = true;
|
dhcp-authoritative = true;
|
||||||
|
|
||||||
# conf-file = "/usr/share/dnsmasq/trust-anchors.conf";
|
conf-file = "/usr/share/dnsmasq/trust-anchors.conf";
|
||||||
# dnssec = true;
|
dnssec = true;
|
||||||
|
|
||||||
# except-interface = "${wan_if}";
|
except-interface = "${wan_if}";
|
||||||
# interface = "${lan_if}";
|
interface = "${lan_if}";
|
||||||
|
|
||||||
# enable-ra = true;
|
enable-ra = true;
|
||||||
|
|
||||||
# # dhcp-option = "121,${cidr},${ip}";
|
# dhcp-option = "121,${cidr},${ip}";
|
||||||
|
|
||||||
# dhcp-range = [
|
dhcp-range = [
|
||||||
# "lan,${dhcp_lease_space.min},${dhcp_lease_space.max},${netmask},10m"
|
"lan,${dhcp_lease_space.min},${dhcp_lease_space.max},${netmask},10m"
|
||||||
# "tag:${lan_if},::1,constructor:${lan_if},ra-names,12h"
|
"tag:${lan_if},::1,constructor:${lan_if},ra-names,12h"
|
||||||
# ];
|
];
|
||||||
|
|
||||||
# dhcp-host = [
|
dhcp-host = [
|
||||||
# "${hosts.dragon.host},${hosts.dragon.ip},12h"
|
"${hosts.dragon.host},${hosts.dragon.ip},12h"
|
||||||
# "${hosts.beefcake.host},${hosts.beefcake.ip},12h"
|
"${hosts.beefcake.host},${hosts.beefcake.ip},12h"
|
||||||
# ];
|
];
|
||||||
|
|
||||||
# # may need to go in /etc/hosts (networking.extraHosts), too?
|
# may need to go in /etc/hosts (networking.extraHosts), too?
|
||||||
# address = [
|
address = [
|
||||||
# "/video.lyte.dev/192.168.0.9"
|
"/video.lyte.dev/192.168.0.9"
|
||||||
# "/git.lyte.dev/192.168.0.9"
|
"/git.lyte.dev/192.168.0.9"
|
||||||
# "/bw.lyte.dev/192.168.0.9"
|
"/bw.lyte.dev/192.168.0.9"
|
||||||
# "/files.lyte.dev/192.168.0.9"
|
"/files.lyte.dev/192.168.0.9"
|
||||||
# "/vpn.h.lyte.dev/192.168.0.9"
|
"/vpn.h.lyte.dev/192.168.0.9"
|
||||||
# "/.h.lyte.dev/192.168.0.9"
|
"/.h.lyte.dev/192.168.0.9"
|
||||||
# ];
|
];
|
||||||
|
|
||||||
# server = [
|
server = [
|
||||||
# "${ip}"
|
"${ip}"
|
||||||
# "8.8.8.8"
|
"8.8.8.8"
|
||||||
# "8.8.4.4"
|
"8.8.4.4"
|
||||||
# "1.1.1.1"
|
"1.1.1.1"
|
||||||
# "1.0.0.1"
|
"1.0.0.1"
|
||||||
# ];
|
];
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
|
|
||||||
# TODO: old config, should be deleted ASAP
|
TODO: old config, should be deleted ASAP
|
||||||
# nftables = {
|
nftables = {
|
||||||
# enable = false;
|
enable = false;
|
||||||
# flushRuleset = true;
|
flushRuleset = true;
|
||||||
|
|
||||||
# tables = {
|
tables = {
|
||||||
# filter = {
|
filter = {
|
||||||
# family = "inet";
|
family = "inet";
|
||||||
# content = ''
|
content = ''
|
||||||
# chain input {
|
chain input {
|
||||||
# # type filter hook input priority filter; policy accept;
|
# type filter hook input priority filter; policy accept;
|
||||||
# type filter hook input priority 0;
|
type filter hook input priority 0;
|
||||||
|
|
||||||
# # anything from loopback interface
|
# anything from loopback interface
|
||||||
# iifname "lo" accept
|
iifname "lo" accept
|
||||||
|
|
||||||
# # accept traffic we originated
|
# accept traffic we originated
|
||||||
# ct state { established, related } counter accept
|
ct state { established, related } counter accept
|
||||||
# ct state invalid counter drop
|
ct state invalid counter drop
|
||||||
|
|
||||||
# # ICMP
|
# ICMP
|
||||||
# ip6 nexthdr icmpv6 icmpv6 type { echo-request, nd-neighbor-solicit, nd-neighbor-advert, nd-router-solicit, nd-router-advert, mld-listener-query, destination-unreachable, packet-too-big, time-exceeded, parameter-problem } counter accept
|
ip6 nexthdr icmpv6 icmpv6 type { echo-request, nd-neighbor-solicit, nd-neighbor-advert, nd-router-solicit, nd-router-advert, mld-listener-query, destination-unreachable, packet-too-big, time-exceeded, parameter-problem } counter accept
|
||||||
# ip protocol icmp icmp type { echo-request, destination-unreachable, router-advertisement, time-exceeded, parameter-problem } counter accept
|
ip protocol icmp icmp type { echo-request, destination-unreachable, router-advertisement, time-exceeded, parameter-problem } counter accept
|
||||||
# ip protocol icmpv6 counter accept
|
ip protocol icmpv6 counter accept
|
||||||
# ip protocol icmp counter accept
|
ip protocol icmp counter accept
|
||||||
# meta l4proto ipv6-icmp counter accept
|
meta l4proto ipv6-icmp counter accept
|
||||||
# udp dport dhcpv6-client counter accept
|
udp dport dhcpv6-client counter accept
|
||||||
|
|
||||||
# tcp dport { 64022, 22, 53, 67, 25565 } counter accept
|
tcp dport { 64022, 22, 53, 67, 25565 } counter accept
|
||||||
# udp dport { 64020, 22, 53, 67 } counter accept
|
udp dport { 64020, 22, 53, 67 } counter accept
|
||||||
|
|
||||||
## iifname "iot" ip saddr $iot-ip tcp dport { llmnr } counter accept
|
## iifname "iot" ip saddr $iot-ip tcp dport { llmnr } counter accept
|
||||||
## iifname "iot" ip saddr $iot-ip udp dport { mdns, llmnr } counter accept
|
## iifname "iot" ip saddr $iot-ip udp dport { mdns, llmnr } counter accept
|
||||||
# iifname "${lan_if}" tcp dport { llmnr } counter accept
|
iifname "${lan_if}" tcp dport { llmnr } counter accept
|
||||||
# iifname "${lan_if}" udp dport { mdns, llmnr } counter accept
|
iifname "${lan_if}" udp dport { mdns, llmnr } counter accept
|
||||||
|
|
||||||
# counter drop
|
counter drop
|
||||||
# }
|
}
|
||||||
|
|
||||||
# # allow all outgoing
|
# allow all outgoing
|
||||||
# chain output {
|
chain output {
|
||||||
# type filter hook output priority 0;
|
type filter hook output priority 0;
|
||||||
# accept
|
accept
|
||||||
# }
|
}
|
||||||
|
|
||||||
# chain forward {
|
chain forward {
|
||||||
# type filter hook forward priority 0;
|
type filter hook forward priority 0;
|
||||||
# accept
|
accept
|
||||||
# }
|
}
|
||||||
# '';
|
'';
|
||||||
# };
|
};
|
||||||
|
|
||||||
# nat = {
|
nat = {
|
||||||
# family = "ip";
|
family = "ip";
|
||||||
# content = ''
|
content = ''
|
||||||
# set masq_saddr {
|
set masq_saddr {
|
||||||
# type ipv4_addr
|
type ipv4_addr
|
||||||
# flags interval
|
flags interval
|
||||||
# elements = { ${cidr} }
|
elements = { ${cidr} }
|
||||||
# }
|
}
|
||||||
|
|
||||||
# map map_port_ipport {
|
map map_port_ipport {
|
||||||
# type inet_proto . inet_service : ipv4_addr . inet_service
|
type inet_proto . inet_service : ipv4_addr . inet_service
|
||||||
# }
|
}
|
||||||
|
|
||||||
# chain prerouting {
|
chain prerouting {
|
||||||
# iifname ${lan_if} accept
|
iifname ${lan_if} accept
|
||||||
|
|
||||||
# type nat hook prerouting priority dstnat + 1; policy accept;
|
type nat hook prerouting priority dstnat + 1; policy accept;
|
||||||
# fib daddr type local dnat ip addr . port to meta l4proto . th dport map @map_port_ipport
|
fib daddr type local dnat ip addr . port to meta l4proto . th dport map @map_port_ipport
|
||||||
|
|
||||||
# iifname ${wan_if} tcp dport { 22, 80, 443, 25565, 64022 } dnat to ${hosts.beefcake.ip}
|
iifname ${wan_if} tcp dport { 22, 80, 443, 25565, 64022 } dnat to ${hosts.beefcake.ip}
|
||||||
# iifname ${wan_if} udp dport { 64020 } dnat to ${hosts.beefcake.ip}
|
iifname ${wan_if} udp dport { 64020 } dnat to ${hosts.beefcake.ip}
|
||||||
|
|
||||||
## iifname ${wan_if} tcp dport { 25565 } dnat to 192.168.0.244
|
## iifname ${wan_if} tcp dport { 25565 } dnat to 192.168.0.244
|
||||||
## iifname ${wan_if} udp dport { 25565 } dnat to 192.168.0.244
|
## iifname ${wan_if} udp dport { 25565 } dnat to 192.168.0.244
|
||||||
|
|
||||||
## router
|
## router
|
||||||
# iifname ${wan_if} tcp dport { 2201 } dnat to ${ip}
|
iifname ${wan_if} tcp dport { 2201 } dnat to ${ip}
|
||||||
# }
|
}
|
||||||
|
|
||||||
# chain output {
|
chain output {
|
||||||
# type nat hook output priority -99; policy accept;
|
type nat hook output priority -99; policy accept;
|
||||||
# ip daddr != 127.0.0.0/8 oif "lo" dnat ip addr . port to meta l4proto . th dport map @map_port_ipport
|
ip daddr != 127.0.0.0/8 oif "lo" dnat ip addr . port to meta l4proto . th dport map @map_port_ipport
|
||||||
# }
|
}
|
||||||
|
|
||||||
# chain postrouting {
|
chain postrouting {
|
||||||
# type nat hook postrouting priority srcnat + 1; policy accept;
|
type nat hook postrouting priority srcnat + 1; policy accept;
|
||||||
# oifname ${lan_if} masquerade
|
oifname ${lan_if} masquerade
|
||||||
# ip saddr @masq_saddr masquerade
|
ip saddr @masq_saddr masquerade
|
||||||
# }
|
}
|
||||||
# '';
|
'';
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
|
|
||||||
# TODO: also want to try to avoid using dhcpcd for IPv6 since systemd-networkd
|
TODO: also want to try to avoid using dhcpcd for IPv6 since systemd-networkd
|
||||||
# should be sufficient?
|
should be sufficient?
|
||||||
# dhcpcd = {
|
dhcpcd = {
|
||||||
# enable = false;
|
enable = false;
|
||||||
# extraConfig = ''
|
extraConfig = ''
|
||||||
# duid
|
duid
|
||||||
|
|
||||||
## No way.... https://github.com/NetworkConfiguration/dhcpcd/issues/36#issuecomment-954777644
|
## No way.... https://github.com/NetworkConfiguration/dhcpcd/issues/36#issuecomment-954777644
|
||||||
## issues caused by guests with oneplus devices
|
## issues caused by guests with oneplus devices
|
||||||
# noarp
|
noarp
|
||||||
|
|
||||||
# persistent
|
persistent
|
||||||
# vendorclassid
|
vendorclassid
|
||||||
|
|
||||||
# option domain_name_servers, domain_name, domain_search
|
option domain_name_servers, domain_name, domain_search
|
||||||
# option classless_static_routes
|
option classless_static_routes
|
||||||
# option interface_mtu
|
option interface_mtu
|
||||||
# option host_name
|
option host_name
|
||||||
# #option ntp_servers
|
#option ntp_servers
|
||||||
|
|
||||||
# require dhcp_server_identifier
|
require dhcp_server_identifier
|
||||||
# slaac private
|
slaac private
|
||||||
# noipv4ll
|
noipv4ll
|
||||||
# noipv6rs
|
noipv6rs
|
||||||
|
|
||||||
# static domain_name_servers=${ip}
|
static domain_name_servers=${ip}
|
||||||
|
|
||||||
# interface ${wan_if}
|
interface ${wan_if}
|
||||||
# gateway
|
gateway
|
||||||
# ipv6rs
|
ipv6rs
|
||||||
# iaid 1
|
iaid 1
|
||||||
## option rapid_commit
|
## option rapid_commit
|
||||||
## ia_na 1
|
## ia_na 1
|
||||||
# ia_pd 1 ${lan_if}
|
ia_pd 1 ${lan_if}
|
||||||
|
|
||||||
# interface ${lan_if}
|
interface ${lan_if}
|
||||||
# static ip_address=${cidr}
|
static ip_address=${cidr}
|
||||||
# static routers=${ip}
|
static routers=${ip}
|
||||||
# static domain_name_servers=${ip}
|
static domain_name_servers=${ip}
|
||||||
# '';
|
'';
|
||||||
# };
|
};
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,12 @@
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
};
|
};
|
||||||
# sudo filefrag -v /swap/swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}'
|
/*
|
||||||
# the above won't work for btrfs, instead you need
|
sudo filefrag -v /swap/swapfile | awk '$1=="0:" {print substr($4, 1, length($4)-2)}'
|
||||||
# btrfs inspect-internal map-swapfile -r /swap/swapfile
|
the above won't work for btrfs, instead you need
|
||||||
# https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
|
btrfs inspect-internal map-swapfile -r /swap/swapfile
|
||||||
|
https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
|
||||||
|
*/
|
||||||
kernelParams = ["boot.shell_on_fail"];
|
kernelParams = ["boot.shell_on_fail"];
|
||||||
initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci"];
|
initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci"];
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,19 +47,21 @@
|
||||||
src = ./.;
|
src = ./.;
|
||||||
pname = "api.lyte.dev";
|
pname = "api.lyte.dev";
|
||||||
in {
|
in {
|
||||||
# this-package = mixRelease {
|
/*
|
||||||
# inherit pname version src;
|
this-package = mixRelease {
|
||||||
# mixFodDeps = fetchMixDeps {
|
inherit pname version src;
|
||||||
# inherit version src;
|
mixFodDeps = fetchMixDeps {
|
||||||
# pname = "mix-deps-${pname}";
|
inherit version src;
|
||||||
# hash = pkgs.lib.fakeSha256;
|
pname = "mix-deps-${pname}";
|
||||||
# };
|
hash = pkgs.lib.fakeSha256;
|
||||||
# buildInputs = with pkgs; [sqlite];
|
};
|
||||||
# HOME = "$(pwd)";
|
buildInputs = with pkgs; [sqlite];
|
||||||
# MIX_XDG = "$HOME";
|
HOME = "$(pwd)";
|
||||||
# };
|
MIX_XDG = "$HOME";
|
||||||
|
};
|
||||||
|
|
||||||
# default = outputs.packages.${system}.this-package;
|
default = outputs.packages.${system}.this-package;
|
||||||
|
*/
|
||||||
});
|
});
|
||||||
|
|
||||||
devShells = forAllSystems (system: let
|
devShells = forAllSystems (system: let
|
||||||
|
|
|
@ -35,12 +35,14 @@
|
||||||
default = self.outputs.devShells.${pkgs.system}.nix;
|
default = self.outputs.devShells.${pkgs.system}.nix;
|
||||||
});
|
});
|
||||||
|
|
||||||
# packages = genPkgs (pkgs: import ./pkgs {inherit pkgs;});
|
/*
|
||||||
# overlays = import ./overlays self;
|
packages = genPkgs (pkgs: import ./pkgs {inherit pkgs;});
|
||||||
# nixosModules = import ./modules/nixos;
|
overlays = import ./overlays self;
|
||||||
# homeManagerModules = import ./modules/home-manager;
|
nixosModules = import ./modules/nixos;
|
||||||
# nixosConfigurations = import ./nixos;
|
homeManagerModules = import ./modules/home-manager;
|
||||||
# homeConfigurations = import ./home
|
nixosConfigurations = import ./nixos;
|
||||||
# templates = import ./templates;
|
homeConfigurations = import ./home
|
||||||
|
templates = import ./templates;
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,12 +22,14 @@
|
||||||
alejandra.enable = true;
|
alejandra.enable = true;
|
||||||
# NOTE: These do not work well with `nix flake check` due to pure environments
|
# NOTE: These do not work well with `nix flake check` due to pure environments
|
||||||
# https://github.com/cachix/git-hooks.nix/issues/452
|
# https://github.com/cachix/git-hooks.nix/issues/452
|
||||||
# cargo-check.enable = true;
|
/*
|
||||||
# clippy = {
|
cargo-check.enable = true;
|
||||||
# enable = true;
|
clippy = {
|
||||||
# packageOverrides.cargo = pkgs.cargo;
|
enable = true;
|
||||||
# packageOverrides.clippy = pkgs.rustPackages.clippy;
|
packageOverrides.cargo = pkgs.cargo;
|
||||||
# };
|
packageOverrides.clippy = pkgs.rustPackages.clippy;
|
||||||
|
};
|
||||||
|
*/
|
||||||
rustfmt = {
|
rustfmt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
packageOverrides.rustfmt = pkgs.rustfmt;
|
packageOverrides.rustfmt = pkgs.rustfmt;
|
||||||
|
@ -41,13 +43,15 @@
|
||||||
pname = "kodotag";
|
pname = "kodotag";
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
|
|
||||||
# nativeBuildInputs = with pkgs; [
|
/*
|
||||||
# pkg-config
|
nativeBuildInputs = with pkgs; [
|
||||||
# clang
|
pkg-config
|
||||||
# ];
|
clang
|
||||||
|
];
|
||||||
|
|
||||||
# buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
# ];
|
];
|
||||||
|
*/
|
||||||
|
|
||||||
src = ./.;
|
src = ./.;
|
||||||
hash = pkgs.lib.fakeHash;
|
hash = pkgs.lib.fakeHash;
|
||||||
|
|
Loading…
Reference in a new issue