Compare commits
67 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5023e6a0b9 | ||
|
|
ad2c3a46b7 | ||
|
|
8470bfe621 | ||
|
|
8ea4397b05 | ||
|
|
dbef055c00 | ||
|
|
5bdf5aeac9 | ||
|
|
dad4b8c04d | ||
|
|
5a5533f97b | ||
|
|
d99c948019 | ||
|
|
bdf77c9149 | ||
|
|
8394616706 | ||
|
|
bfdd418589 | ||
|
|
07b98eec35 | ||
|
|
9ffa2500e7 | ||
|
|
579f208aae | ||
|
|
9e8313a8df | ||
|
|
7df535c64f | ||
|
|
1e7e7b1dab | ||
|
|
ab21c4aba3 | ||
|
|
5ce2618bda | ||
|
|
3f6bdd6502 | ||
|
|
1f6b80656c | ||
|
|
7e360aa4a1 | ||
|
|
94b8527445 | ||
|
|
54f8d30d93 | ||
|
|
9987137808 | ||
|
|
eb767763fa | ||
|
|
dcaa1f89fa | ||
|
|
9c46f2d4de | ||
|
|
0206425f8e | ||
|
|
83316788f1 | ||
|
|
a76299e62f | ||
|
|
5f9cada55b | ||
|
|
f2eae24609 | ||
|
|
afd8f090ec | ||
|
|
87e01e4b80 | ||
|
|
c565a01115 | ||
|
|
98185f4e4e | ||
|
|
121097e13e | ||
|
|
f0020b9cbd | ||
|
|
0a88aa6f58 | ||
|
|
4a5c21b1af | ||
|
|
f9238bb576 | ||
|
|
0498518826 | ||
|
|
b2ec325396 | ||
|
|
f48b904b3b | ||
|
|
d5ef5bb775 | ||
|
|
486b16a110 | ||
|
|
259b4f078a | ||
|
|
4e16492a0d | ||
|
|
0031fbad63 | ||
|
|
882ed7fad7 | ||
|
|
44be4f3ffd | ||
|
|
1720bebb9e | ||
|
|
4d72ab88d7 | ||
|
|
909e835e4f | ||
|
|
6f60f3b116 | ||
|
|
1f76671a71 | ||
|
|
c6efec9bb7 | ||
|
|
717f75ef94 | ||
|
|
10a9f560e7 | ||
|
|
fcb71caa6c | ||
|
|
cb903ac830 | ||
|
|
7d85656190 | ||
|
|
d1811ec7ec | ||
|
|
3cf0f456b7 | ||
|
|
c8027e8f82 |
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.editorconfig
|
||||||
|
.gemini
|
||||||
|
result
|
||||||
@@ -1,38 +1,9 @@
|
|||||||
{ config, pkgs, inputs, isDesktop, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
home.username = "alex";
|
home.username = "alex";
|
||||||
home.homeDirectory = "/home/alex";
|
home.homeDirectory = "/home/alex";
|
||||||
|
|
||||||
# link the configuration file in current directory to the specified location in home directory
|
|
||||||
# home.file.".config/i3/wallpaper.jpg".source = ./wallpaper.jpg;
|
|
||||||
|
|
||||||
# link all files in `./scripts` to `~/.config/i3/scripts`
|
|
||||||
# home.file.".config/i3/scripts" = {
|
|
||||||
# source = ./scripts;
|
|
||||||
# recursive = true; # link recursively
|
|
||||||
# executable = true; # make all files executable
|
|
||||||
# };
|
|
||||||
|
|
||||||
# encode the file content in nix configuration file directly
|
|
||||||
# home.file.".xxx".text = ''
|
|
||||||
# xxx
|
|
||||||
# '';
|
|
||||||
|
|
||||||
dconf.settings = if isDesktop then {
|
|
||||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
|
||||||
custom-keybindings = [ "/org/gnome/settings-daemon/plugins/media-keys/custom0/" ];
|
|
||||||
};
|
|
||||||
"org/gnome/settings-daemon/plugins/media-keys/custom0" = {
|
|
||||||
binding = "<Primary><Alt>t";
|
|
||||||
command = "wezterm";
|
|
||||||
name = "open-terminal";
|
|
||||||
};
|
|
||||||
"org/gnome/desktop/interface" = {
|
|
||||||
color-scheme = "prefer-dark";
|
|
||||||
};
|
|
||||||
} else {};
|
|
||||||
|
|
||||||
home.shellAliases = {
|
home.shellAliases = {
|
||||||
e = "ls -lh";
|
e = "ls -lh";
|
||||||
tree = "eza --tree";
|
tree = "eza --tree";
|
||||||
@@ -49,7 +20,6 @@
|
|||||||
home.file.".config/nvim/init.lua".source = ./nvim/init.lua;
|
home.file.".config/nvim/init.lua".source = ./nvim/init.lua;
|
||||||
home.file.".config/tmux/tmux.conf".source = ./tmux/tmux.conf;
|
home.file.".config/tmux/tmux.conf".source = ./tmux/tmux.conf;
|
||||||
home.file.".config/tmux/tmux.conf.local".source = ./tmux/tmux.conf.local;
|
home.file.".config/tmux/tmux.conf.local".source = ./tmux/tmux.conf.local;
|
||||||
home.file.".wezterm.lua".source = ./wezterm.lua;
|
|
||||||
home.file.".config/jrnl/jrnl.yaml".source = ./jrnl/jrnl.yaml;
|
home.file.".config/jrnl/jrnl.yaml".source = ./jrnl/jrnl.yaml;
|
||||||
home.file.".config/fish/functions" = {
|
home.file.".config/fish/functions" = {
|
||||||
source = ./fish/functions;
|
source = ./fish/functions;
|
||||||
@@ -65,25 +35,19 @@
|
|||||||
nnn # terminal file manager
|
nnn # terminal file manager
|
||||||
|
|
||||||
# archives
|
# archives
|
||||||
zip
|
|
||||||
xz
|
xz
|
||||||
unzip
|
|
||||||
# p7zip
|
# p7zip
|
||||||
|
|
||||||
# utils
|
# utils
|
||||||
ripgrep # recursively searches directories for a regex pattern
|
|
||||||
bat
|
|
||||||
jq # A lightweight and flexible command-line JSON processor
|
jq # A lightweight and flexible command-line JSON processor
|
||||||
# yq-go # yaml processor https://github.com/mikefarah/yq
|
# yq-go # yaml processor https://github.com/mikefarah/yq
|
||||||
eza # A modern replacement for ‘ls’
|
eza # A modern replacement for ‘ls’
|
||||||
fzf # A command-line fuzzy finder
|
fzf # A command-line fuzzy finder
|
||||||
fd
|
|
||||||
xclip
|
xclip
|
||||||
trash-cli
|
trash-cli
|
||||||
|
|
||||||
# networking tools
|
# networking tools
|
||||||
dig
|
dig
|
||||||
mtr # A network diagnostic tool
|
|
||||||
# iperf3
|
# iperf3
|
||||||
# dnsutils # `dig` + `nslookup`
|
# dnsutils # `dig` + `nslookup`
|
||||||
# ldns # replacement of `dig`, it provide the command `drill`
|
# ldns # replacement of `dig`, it provide the command `drill`
|
||||||
@@ -129,18 +93,24 @@
|
|||||||
pciutils # lspci
|
pciutils # lspci
|
||||||
usbutils # lsusb
|
usbutils # lsusb
|
||||||
zoxide
|
zoxide
|
||||||
] ++ (if isDesktop then [
|
];
|
||||||
anki-bin
|
|
||||||
wezterm
|
programs.command-not-found.enable = true;
|
||||||
chromium
|
|
||||||
] else []);
|
|
||||||
|
|
||||||
# basic configuration of git, please change to your own
|
# basic configuration of git, please change to your own
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "Alexander Wainwright";
|
settings = {
|
||||||
userEmail = "alexander.l.wainwright@boeing.com";
|
user = {
|
||||||
extraConfig = {
|
name = "Alexander Wainwright";
|
||||||
|
email = "alexander.l.wainwright@boeing.com";
|
||||||
|
};
|
||||||
|
init = {
|
||||||
|
defaultBranch = "main";
|
||||||
|
};
|
||||||
|
push = {
|
||||||
|
autoSetupRemote = true;
|
||||||
|
};
|
||||||
pull.ff = "only";
|
pull.ff = "only";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
50
alex/desktop.nix
Normal file
50
alex/desktop.nix
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./sway.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.file.".wezterm.lua".source = ./wezterm.lua;
|
||||||
|
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||||
|
custom-keybindings = [ "/org/gnome/settings-daemon/plugins/media-keys/custom0/" ];
|
||||||
|
};
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys/custom0" = {
|
||||||
|
binding = "<Primary><Alt>t";
|
||||||
|
command = "wezterm";
|
||||||
|
name = "open-terminal";
|
||||||
|
};
|
||||||
|
"org/gnome/desktop/interface" = {
|
||||||
|
color-scheme = "prefer-dark";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
anki-bin
|
||||||
|
wezterm
|
||||||
|
chromium
|
||||||
|
loupe
|
||||||
|
papers
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.ghostty = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font-family = "JetBrainsMono Nerd Font";
|
||||||
|
font-size = 10;
|
||||||
|
theme = "Catppuccin Mocha";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
defaultApplications = {
|
||||||
|
"image/jpeg" = [ "loupe" ];
|
||||||
|
"image/png" = [ "org.gnome.Loupe.desktop" ];
|
||||||
|
"image/gif" = [ "org.gnome.Loupe.desktop" ];
|
||||||
|
"image/webp" = [ "org.gnome.Loupe.desktop" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -864,35 +864,36 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
{ -- Highlight, edit, and navigate code
|
{ -- Highlight, edit, and navigate code
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
branch = 'main',
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
opts = {
|
-- opts = {
|
||||||
ensure_installed = { "python", "bash", "c", "diff", "html", "lua", "luadoc", "markdown", "vim", "vimdoc" },
|
-- ensure_installed = { "python", "bash", "c", "diff", "html", "lua", "luadoc", "markdown", "vim", "vimdoc" },
|
||||||
-- Autoinstall languages that are not installed
|
-- -- Autoinstall languages that are not installed
|
||||||
auto_install = true,
|
-- auto_install = true,
|
||||||
highlight = {
|
-- highlight = {
|
||||||
enable = true,
|
-- enable = true,
|
||||||
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
|
-- -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
|
||||||
-- If you are experiencing weird indenting issues, add the language to
|
-- -- If you are experiencing weird indenting issues, add the language to
|
||||||
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
|
-- -- the list of additional_vim_regex_highlighting and disabled languages for indent.
|
||||||
additional_vim_regex_highlighting = { "ruby", "python" },
|
-- additional_vim_regex_highlighting = { "ruby", "python" },
|
||||||
},
|
-- },
|
||||||
indent = { enable = false, disable = { "ruby", "python" } },
|
-- indent = { enable = false, disable = { "ruby", "python" } },
|
||||||
},
|
-- },
|
||||||
config = function(_, opts)
|
-- config = function(_, opts)
|
||||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
-- -- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||||
|
--
|
||||||
-- Prefer git instead of curl in order to improve connectivity in some environments
|
-- -- Prefer git instead of curl in order to improve connectivity in some environments
|
||||||
require("nvim-treesitter.install").prefer_git = true
|
-- require("nvim-treesitter.install").prefer_git = true
|
||||||
---@diagnostic disable-next-line: missing-fields
|
-- ---@diagnostic disable-next-line: missing-fields
|
||||||
require("nvim-treesitter.configs").setup(opts)
|
-- require("nvim-treesitter.configs").setup(opts)
|
||||||
|
--
|
||||||
-- There are additional nvim-treesitter modules that you can use to interact
|
-- -- There are additional nvim-treesitter modules that you can use to interact
|
||||||
-- with nvim-treesitter. You should go explore a few and see what interests you:
|
-- -- with nvim-treesitter. You should go explore a few and see what interests you:
|
||||||
--
|
-- --
|
||||||
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
|
-- -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
|
||||||
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
|
-- -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
|
||||||
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
-- -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
||||||
end,
|
-- end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
41
alex/personal.nix
Normal file
41
alex/personal.nix
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
|
system = pkgs.stdenv.hostPlatform.system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
foliate
|
||||||
|
inputs.locutus.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||||
|
jrnl
|
||||||
|
mullvad-browser
|
||||||
|
tor-browser
|
||||||
|
exiftool
|
||||||
|
digikam
|
||||||
|
shotwell
|
||||||
|
nextcloud-client
|
||||||
|
bitwarden-desktop
|
||||||
|
signal-desktop
|
||||||
|
spotify
|
||||||
|
gemini-cli
|
||||||
|
|
||||||
|
foliate
|
||||||
|
|
||||||
|
(symlinkJoin {
|
||||||
|
name = "darktable";
|
||||||
|
paths = [ unstable.darktable ];
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
# Remove the symlink to the original binary
|
||||||
|
rm $out/bin/darktable
|
||||||
|
|
||||||
|
# Create a wrapper that points to the cached original
|
||||||
|
makeWrapper ${unstable.darktable}/bin/darktable $out/bin/darktable \
|
||||||
|
--set GDK_BACKEND wayland
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
496
alex/sway.nix
Normal file
496
alex/sway.nix
Normal file
@@ -0,0 +1,496 @@
|
|||||||
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
# Catppuccin Mocha Palette
|
||||||
|
base = "#1e1e2e";
|
||||||
|
mantle = "#181825";
|
||||||
|
surface0 = "#313244";
|
||||||
|
surface1 = "#45475a";
|
||||||
|
text = "#cdd6f4";
|
||||||
|
lavender = "#b4befe";
|
||||||
|
blue = "#89b4fa";
|
||||||
|
sapphire = "#74c7ec";
|
||||||
|
red = "#f38ba8";
|
||||||
|
peach = "#fab387";
|
||||||
|
yellow = "#f9e2af";
|
||||||
|
green = "#a6e3a1";
|
||||||
|
mauve = "#cba6f7";
|
||||||
|
overlay0 = "#6c7086";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
swaybg
|
||||||
|
swayidle
|
||||||
|
swaylock-effects
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
wl-clipboard
|
||||||
|
mako
|
||||||
|
libnotify
|
||||||
|
nerd-fonts.jetbrains-mono
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.swaylock = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.swaylock-effects;
|
||||||
|
settings = {
|
||||||
|
clock = true;
|
||||||
|
color = base;
|
||||||
|
effect-pixelate = 50;
|
||||||
|
effect-greyscale = true;
|
||||||
|
screenshots = true;
|
||||||
|
font = "JetBrainsMono Nerd Font";
|
||||||
|
font-size = 24;
|
||||||
|
indicator-idle-visible = true;
|
||||||
|
indicator-radius = 200;
|
||||||
|
indicator-thickness = 17;
|
||||||
|
line-color = base;
|
||||||
|
ring-color = overlay0;
|
||||||
|
inside-color = base;
|
||||||
|
key-hl-color = lavender;
|
||||||
|
separator-color = base;
|
||||||
|
text-color = text;
|
||||||
|
text-caps-lock-color = text;
|
||||||
|
line-ver-color = base;
|
||||||
|
ring-ver-color = lavender;
|
||||||
|
inside-ver-color = base;
|
||||||
|
text-ver-color = text;
|
||||||
|
ring-wrong-color = red;
|
||||||
|
text-wrong-color = red;
|
||||||
|
inside-wrong-color = base;
|
||||||
|
inside-clear-color = base;
|
||||||
|
text-clear-color = text;
|
||||||
|
ring-clear-color = yellow;
|
||||||
|
line-clear-color = base;
|
||||||
|
line-wrong-color = base;
|
||||||
|
bs-hl-color = red;
|
||||||
|
grace = 2;
|
||||||
|
grace-no-mouse = true;
|
||||||
|
grace-no-touch = true;
|
||||||
|
datestr = "%a, %B %e";
|
||||||
|
timestr = "%H:%M";
|
||||||
|
fade-in = 0.3;
|
||||||
|
ignore-empty-password = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
wayland.windowManager.sway = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.swayfx;
|
||||||
|
checkConfig = false;
|
||||||
|
|
||||||
|
config = {
|
||||||
|
modifier = "Mod4";
|
||||||
|
terminal = "wezterm";
|
||||||
|
menu = "fuzzel";
|
||||||
|
fonts = {
|
||||||
|
names = [ "JetBrainsMono Nerd Font" ];
|
||||||
|
style = "Regular";
|
||||||
|
size = 11.0;
|
||||||
|
};
|
||||||
|
|
||||||
|
input = {
|
||||||
|
"*" = {
|
||||||
|
xkb_layout = "us";
|
||||||
|
xkb_variant = "dvorak";
|
||||||
|
};
|
||||||
|
"type:touchpad" = {
|
||||||
|
dwt = "enabled";
|
||||||
|
tap = "enabled";
|
||||||
|
natural_scroll = "enabled";
|
||||||
|
middle_emulation = "enabled";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gaps = {
|
||||||
|
inner = 10;
|
||||||
|
outer = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
colors = {
|
||||||
|
focused = {
|
||||||
|
border = lavender;
|
||||||
|
background = base;
|
||||||
|
text = text;
|
||||||
|
indicator = lavender;
|
||||||
|
childBorder = lavender;
|
||||||
|
};
|
||||||
|
focusedInactive = {
|
||||||
|
border = overlay0;
|
||||||
|
background = base;
|
||||||
|
text = text;
|
||||||
|
indicator = overlay0;
|
||||||
|
childBorder = overlay0;
|
||||||
|
};
|
||||||
|
unfocused = {
|
||||||
|
border = overlay0;
|
||||||
|
background = base;
|
||||||
|
text = overlay0;
|
||||||
|
indicator = overlay0;
|
||||||
|
childBorder = overlay0;
|
||||||
|
};
|
||||||
|
urgent = {
|
||||||
|
border = red;
|
||||||
|
background = base;
|
||||||
|
text = red;
|
||||||
|
indicator = red;
|
||||||
|
childBorder = red;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
output = {
|
||||||
|
"*" = {
|
||||||
|
bg = "/home/alex/Pictures/wallpaper.jpg fill";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
bars = [];
|
||||||
|
|
||||||
|
startup = [
|
||||||
|
{ command = "waybar"; }
|
||||||
|
{ command = "mako"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
keybindings = let
|
||||||
|
modifier = "Mod4";
|
||||||
|
in lib.mkOptionDefault {
|
||||||
|
"${modifier}+Return" = "exec wezterm";
|
||||||
|
"${modifier}+d" = "exec fuzzel";
|
||||||
|
"${modifier}+space" = "floating toggle";
|
||||||
|
"${modifier}+t" = "sticky toggle";
|
||||||
|
"${modifier}+Shift+q" = "kill";
|
||||||
|
"${modifier}+Shift+c" = "reload";
|
||||||
|
"${modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'";
|
||||||
|
|
||||||
|
"${modifier}+Shift+l" = "exec swaylock -f";
|
||||||
|
|
||||||
|
"${modifier}+Shift+s" = "exec grim -g \"$(slurp)\" - | wl-copy";
|
||||||
|
|
||||||
|
# Workspaces
|
||||||
|
"--whole-window ${modifier}+button4" = "workspace prev";
|
||||||
|
"--whole-window ${modifier}+button5" = "workspace next";
|
||||||
|
|
||||||
|
"XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
||||||
|
"XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
||||||
|
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||||
|
"XF86MonBrightnessUp" = "exec light -A 5";
|
||||||
|
"XF86MonBrightnessDown" = "exec light -U 5";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
workspace number 1
|
||||||
|
default_border pixel 2
|
||||||
|
default_floating_border pixel 2
|
||||||
|
|
||||||
|
corner_radius 10
|
||||||
|
shadows enable
|
||||||
|
shadow_blur_radius 20
|
||||||
|
shadow_color #00000077
|
||||||
|
|
||||||
|
blur enable
|
||||||
|
blur_passes 3
|
||||||
|
blur_radius 5
|
||||||
|
layer_effects "waybar" blur enable; shadows enable; corner_radius 10;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.mako = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font = "JetBrainsMono Nerd Font 11";
|
||||||
|
background-color = "${base}dd";
|
||||||
|
border-color = lavender;
|
||||||
|
border-radius = 10;
|
||||||
|
border-size = 2;
|
||||||
|
text-color = text;
|
||||||
|
default-timeout = 5000;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.swayidle =
|
||||||
|
let
|
||||||
|
lock = "${pkgs.swaylock-effects}/bin/swaylock --daemonize";
|
||||||
|
# modify "display" function based on your window manager
|
||||||
|
# Sway
|
||||||
|
display = status: "${pkgs.sway}/bin/swaymsg 'output * power ${status}'";
|
||||||
|
# Niri
|
||||||
|
# display = status: "${pkgs.niri}/bin/niri msg action power-${status}-monitors";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
timeouts = [
|
||||||
|
{
|
||||||
|
timeout = 295; # in seconds
|
||||||
|
command = "${pkgs.libnotify}/bin/notify-send 'Locking in 5 seconds' -t 5000";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 300;
|
||||||
|
command = lock;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 330;
|
||||||
|
command = display "off";
|
||||||
|
resumeCommand = display "on";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 600;
|
||||||
|
command = "${pkgs.systemd}/bin/systemctl suspend";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
events = [
|
||||||
|
{
|
||||||
|
event = "before-sleep";
|
||||||
|
# adding duplicated entries for the same event may not work
|
||||||
|
command = (display "off") + "; " + lock;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
event = "after-resume";
|
||||||
|
command = display "on";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
event = "lock";
|
||||||
|
command = (display "off") + "; " + lock;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
event = "unlock";
|
||||||
|
command = display "on";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fuzzel = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
terminal = "${pkgs.wezterm}/bin/wezterm";
|
||||||
|
layer = "overlay";
|
||||||
|
width = 100;
|
||||||
|
line-height = 40;
|
||||||
|
font = "JetBrainsMono Nerd Font:size=12";
|
||||||
|
};
|
||||||
|
colors = {
|
||||||
|
background = "${lib.strings.removePrefix "#" base}ff";
|
||||||
|
text = "${lib.strings.removePrefix "#" text}ff";
|
||||||
|
match = "${lib.strings.removePrefix "#" lavender}ff";
|
||||||
|
selection = "${lib.strings.removePrefix "#" surface1}ff";
|
||||||
|
selection-text = "${lib.strings.removePrefix "#" text}ff";
|
||||||
|
selection-match = "${lib.strings.removePrefix "#" lavender}ff";
|
||||||
|
border = "${lib.strings.removePrefix "#" lavender}ff";
|
||||||
|
};
|
||||||
|
border = {
|
||||||
|
width = 2;
|
||||||
|
radius = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
mainBar = {
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
height = 30;
|
||||||
|
margin-top = 5;
|
||||||
|
margin-left = 10;
|
||||||
|
margin-right = 10;
|
||||||
|
spacing = 4;
|
||||||
|
|
||||||
|
modules-left = [ "sway/workspaces" "sway/mode" ];
|
||||||
|
modules-center = [ "clock" ];
|
||||||
|
modules-right = [ "pulseaudio" "network" "cpu" "memory" "battery" "tray" ];
|
||||||
|
|
||||||
|
"sway/workspaces" = {
|
||||||
|
disable-scroll = true;
|
||||||
|
all-outputs = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
"clock" = {
|
||||||
|
format = "{:%a %d %b %H:%M:%S}";
|
||||||
|
tooltip-format = "<big>{:%Y %B}</big>\n<tt>{calendar}</tt>";
|
||||||
|
interval = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
"cpu" = {
|
||||||
|
format = "{usage}% ";
|
||||||
|
};
|
||||||
|
|
||||||
|
"memory" = {
|
||||||
|
format = "{}% ";
|
||||||
|
tooltip-format = "RAM: {used}GiB / {total}GiB ({percentage}%)\nSwap: {swapUsed}GiB / {swapTotal}GiB ({swapPercentage}%)";
|
||||||
|
};
|
||||||
|
|
||||||
|
"battery" = {
|
||||||
|
states = {
|
||||||
|
warning = 30;
|
||||||
|
critical = 15;
|
||||||
|
};
|
||||||
|
format = "{capacity}% {icon}";
|
||||||
|
format-charging = "{capacity}% ";
|
||||||
|
format-plugged = "{capacity}% ";
|
||||||
|
format-icons = ["" "" "" "" ""];
|
||||||
|
};
|
||||||
|
|
||||||
|
"network" = {
|
||||||
|
format-wifi = "{essid} ({signalStrength}%) ";
|
||||||
|
format-ethernet = "{ipaddr}/{cidr} ";
|
||||||
|
tooltip-format = "{ifname} via {gwaddr} ";
|
||||||
|
format-linked = "{ifname} (No IP) ";
|
||||||
|
format-disconnected = "Disconnected ⚠";
|
||||||
|
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||||
|
};
|
||||||
|
|
||||||
|
"pulseaudio" = {
|
||||||
|
format = "{volume}% {icon} {format_source}";
|
||||||
|
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||||
|
format-bluetooth-muted = " {icon} {format_source}";
|
||||||
|
format-muted = " {format_source}";
|
||||||
|
format-source = "{volume}% ";
|
||||||
|
format-source-muted = "";
|
||||||
|
format-icons = {
|
||||||
|
headphone = "";
|
||||||
|
hands-free = "";
|
||||||
|
headset = "";
|
||||||
|
phone = "";
|
||||||
|
portable = "";
|
||||||
|
car = "";
|
||||||
|
default = ["" "" ""];
|
||||||
|
};
|
||||||
|
on-click = "pavucontrol";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: "JetBrainsMono Nerd Font";
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: transparent;
|
||||||
|
color: ${text};
|
||||||
|
transition-property: background-color;
|
||||||
|
transition-duration: .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar > box {
|
||||||
|
background-color: ${base};
|
||||||
|
border-radius: 15px;
|
||||||
|
opacity: 1.0;
|
||||||
|
padding: 0 3px 0 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
box-shadow: inset 0 -3px transparent;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background: inherit;
|
||||||
|
box-shadow: inset 0 -3px ${text};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 5px;
|
||||||
|
background-color: transparent;
|
||||||
|
color: ${text};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
background-color: ${surface1};
|
||||||
|
box-shadow: inset 0 -3px ${lavender};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: ${red};
|
||||||
|
}
|
||||||
|
|
||||||
|
#mode {
|
||||||
|
background-color: ${surface0};
|
||||||
|
border-bottom: 3px solid ${text};
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#disk,
|
||||||
|
#temperature,
|
||||||
|
#backlight,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#custom-media,
|
||||||
|
#tray,
|
||||||
|
#mode,
|
||||||
|
#idle_inhibitor,
|
||||||
|
#mpd {
|
||||||
|
padding: 0 10px;
|
||||||
|
color: ${text};
|
||||||
|
background-color: ${surface0};
|
||||||
|
border-radius: 10px;
|
||||||
|
margin: 5px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
background-color: ${mauve};
|
||||||
|
color: ${base};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
background-color: ${green};
|
||||||
|
color: ${base};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.charging, #battery.plugged {
|
||||||
|
color: ${base};
|
||||||
|
background-color: ${green};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical:not(.charging) {
|
||||||
|
background-color: ${red};
|
||||||
|
color: ${text};
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu {
|
||||||
|
background-color: ${peach};
|
||||||
|
color: ${base};
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
background-color: ${yellow};
|
||||||
|
color: ${base};
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
background-color: ${sapphire};
|
||||||
|
color: ${base};
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
background-color: ${blue};
|
||||||
|
color: ${base};
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.muted {
|
||||||
|
background-color: ${overlay0};
|
||||||
|
color: ${text};
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
background-color: ${surface0};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -381,6 +381,10 @@ tmux_conf_urlscan_options="--compact --dedupe"
|
|||||||
# start with mouse mode enabled
|
# start with mouse mode enabled
|
||||||
set -g mouse on
|
set -g mouse on
|
||||||
|
|
||||||
|
# allow passthrough for fancy stuff like images
|
||||||
|
set -g allow-passthrough on
|
||||||
|
set -g allow-rename off
|
||||||
|
|
||||||
# force Vi mode
|
# force Vi mode
|
||||||
# really you should export VISUAL or EDITOR environment variable, see manual
|
# really you should export VISUAL or EDITOR environment variable, see manual
|
||||||
#set -g status-keys vi
|
#set -g status-keys vi
|
||||||
|
|||||||
4
displaylink-prefetch.sh
Executable file
4
displaylink-prefetch.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# nix-prefetch-url --name displaylink-610.zip https://www.synaptics.com/sites/default/files/exe_files/2024-10/DisplayLink%20USB%20Graphics%20Software%20for%20Ubuntu6.1-EXE.zip
|
||||||
|
nix-prefetch-url --name displaylink-620.zip https://www.synaptics.com/sites/default/files/exe_files/2025-09/DisplayLink%20USB%20Graphics%20Software%20for%20Ubuntu6.2-EXE.zip
|
||||||
33
flake.lock
generated
33
flake.lock
generated
@@ -25,11 +25,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765605144,
|
"lastModified": 1767514898,
|
||||||
"narHash": "sha256-RM2xs+1HdHxesjOelxoA3eSvXShC8pmBvtyTke4Ango=",
|
"narHash": "sha256-ONYqnKrPzfKEEPChoJ9qPcfvBqW9ZgieDKD7UezWPg4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "90b62096f099b73043a747348c11dbfcfbdea949",
|
"rev": "7a06e8a2f844e128d3b210a000a62716b6040b7f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -74,13 +74,29 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765311797,
|
"lastModified": 1767379071,
|
||||||
"narHash": "sha256-mSD5Ob7a+T2RNjvPvOA1dkJHGVrNVl8ZOrAwBjKBDQo=",
|
"narHash": "sha256-EgE0pxsrW9jp9YFMkHL9JMXxcqi/OoumPJYwf+Okucw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "09eb77e94fa25202af8f3e81ddc7353d9970ac1b",
|
"rev": "fb7944c166a3b630f177938e478f0378e64ce108",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1767325753,
|
||||||
|
"narHash": "sha256-yA/CuWyqm+AQo2ivGy6PlYrjZBQm7jfbe461+4HF2fo=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "64049ca74d63e971b627b5f3178d95642e61cedd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -94,7 +110,8 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"locutus": "locutus",
|
"locutus": "locutus",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
|||||||
94
flake.nix
94
flake.nix
@@ -4,6 +4,7 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
# NixOS official package source
|
# NixOS official package source
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||||
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-25.11";
|
url = "github:nix-community/home-manager/release-25.11";
|
||||||
# The `follows` keyword in inputs is used for inheritance.
|
# The `follows` keyword in inputs is used for inheritance.
|
||||||
@@ -15,116 +16,67 @@
|
|||||||
locutus.url = "git+https://git.figtree.dev/alex/locutus";
|
locutus.url = "git+https://git.figtree.dev/alex/locutus";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, ... }@inputs: {
|
outputs = { self, nixpkgs, home-manager, ... }@inputs:
|
||||||
|
let
|
||||||
|
# Shared Home Manager configuration function
|
||||||
|
mkHomeManagerConfig = { extraModules ? [] }: {
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.backupFileExtension = "backup";
|
||||||
|
home-manager.users.alex = {
|
||||||
|
imports = [ ./alex/core.nix ] ++ extraModules;
|
||||||
|
};
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
|
};
|
||||||
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
case = nixpkgs.lib.nixosSystem {
|
case = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
|
|
||||||
./hosts/case/configuration.nix
|
./hosts/case/configuration.nix
|
||||||
|
|
||||||
# enable home manager
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
(mkHomeManagerConfig { extraModules = [ ./alex/desktop.nix ./alex/personal.nix ]; })
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
|
|
||||||
home-manager.users.alex = import ./alex/home.nix;
|
|
||||||
|
|
||||||
# Optionally, use home-manager.extraSpecialArgs to pass arguments to
|
|
||||||
# home.nix
|
|
||||||
home-manager.extraSpecialArgs = { inherit inputs; isDesktop=true; };
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
count = nixpkgs.lib.nixosSystem {
|
count = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
|
|
||||||
./hosts/count/configuration.nix
|
./hosts/count/configuration.nix
|
||||||
|
|
||||||
# enable home manager
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
(mkHomeManagerConfig { extraModules = [ ./alex/desktop.nix ./alex/personal.nix ]; })
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
|
|
||||||
home-manager.users.alex = import ./alex/home.nix;
|
|
||||||
|
|
||||||
# Optionally, use home-manager.extraSpecialArgs to pass arguments to
|
|
||||||
# home.nix
|
|
||||||
home-manager.extraSpecialArgs = { inherit inputs; isDesktop=true; };
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
armitage = nixpkgs.lib.nixosSystem {
|
armitage = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
|
|
||||||
./hosts/armitage/configuration.nix
|
./hosts/armitage/configuration.nix
|
||||||
|
|
||||||
# enable home manager
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
(mkHomeManagerConfig { extraModules = [ ./alex/desktop.nix ]; })
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
|
|
||||||
home-manager.users.alex = import ./alex/home.nix;
|
|
||||||
|
|
||||||
# Optionally, use home-manager.extraSpecialArgs to pass arguments to
|
|
||||||
# home.nix
|
|
||||||
home-manager.extraSpecialArgs = { inherit inputs; isDesktop=true; };
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
alt = nixpkgs.lib.nixosSystem {
|
alt = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
|
|
||||||
./hosts/alt/configuration.nix
|
./hosts/alt/configuration.nix
|
||||||
|
|
||||||
# enable home manager
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
(mkHomeManagerConfig {})
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
|
|
||||||
home-manager.users.alex = import ./alex/home.nix;
|
|
||||||
|
|
||||||
# Optionally, use home-manager.extraSpecialArgs to pass arguments to
|
|
||||||
# home.nix
|
|
||||||
home-manager.extraSpecialArgs = { inherit inputs; isDesktop=false; };
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nightcity = nixpkgs.lib.nixosSystem {
|
nightcity = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
|
|
||||||
./hosts/nightcity/configuration.nix
|
./hosts/nightcity/configuration.nix
|
||||||
|
|
||||||
# enable home manager
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
(mkHomeManagerConfig {})
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
|
|
||||||
home-manager.users.alex = import ./alex/home.nix;
|
|
||||||
|
|
||||||
# Optionally, use home-manager.extraSpecialArgs to pass arguments to
|
|
||||||
# home.nix
|
|
||||||
home-manager.extraSpecialArgs = { inherit inputs; isDesktop=false; };
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
# other hosts...
|
# other hosts...
|
||||||
|
|||||||
@@ -15,24 +15,27 @@ let
|
|||||||
"ha.figtree.dev" = "http://192.168.1.50:8123";
|
"ha.figtree.dev" = "http://192.168.1.50:8123";
|
||||||
# "budget.figtree.dev" = "http://192.168.80.1:5006";
|
# "budget.figtree.dev" = "http://192.168.80.1:5006";
|
||||||
|
|
||||||
# .box domains now automatically get "tls internal"
|
# .lan domains now automatically get "tls internal"
|
||||||
"home.box" = "http://192.168.1.63:3000";
|
"home.lan" = "http://192.168.1.63:3000";
|
||||||
"budget.box" = "http://192.168.80.1:5006";
|
"budget.lan" = "http://192.168.80.1:5006";
|
||||||
"torrent.box" = "http://192.168.1.65:8080";
|
"torrent.lan" = "http://192.168.1.65:8080";
|
||||||
"books.box" = "http://192.168.80.4:8010";
|
"books.lan" = "http://192.168.80.4:8010";
|
||||||
|
"recipes.lan" = "http://192.168.80.4:8222";
|
||||||
|
"jelly.lan" = "http://192.168.80.4:8096";
|
||||||
|
"plex.lan" = "http://192.168.1.63:32400";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Normalize sites:
|
# Normalize sites:
|
||||||
# 1. Turn strings into { backend = "..."; }.
|
# 1. Turn strings into { backend = "..."; }.
|
||||||
# 2. Automatically prepend `tls internal` for any domain ending in .box.
|
# 2. Automatically prepend `tls internal` for any domain ending in .lan.
|
||||||
normalizedSites = lib.mapAttrs (domain: siteConfig:
|
normalizedSites = lib.mapAttrs (domain: siteConfig:
|
||||||
let
|
let
|
||||||
# Ensure siteConfig is an attrset.
|
# Ensure siteConfig is an attrset.
|
||||||
baseConfig = if lib.isString siteConfig then { backend = siteConfig; } else siteConfig;
|
baseConfig = if lib.isString siteConfig then { backend = siteConfig; } else siteConfig;
|
||||||
# Check if it's a .box domain.
|
# Check if it's a .lan domain.
|
||||||
isBoxDomain = lib.hasSuffix ".box" domain;
|
isLanDomain = lib.hasSuffix ".lan" domain;
|
||||||
in
|
in
|
||||||
if isBoxDomain then
|
if isLanDomain then
|
||||||
baseConfig // {
|
baseConfig // {
|
||||||
extraBefore = ''
|
extraBefore = ''
|
||||||
tls internal
|
tls internal
|
||||||
|
|||||||
@@ -11,7 +11,9 @@
|
|||||||
../modules/base.nix
|
../modules/base.nix
|
||||||
../modules/kafka-mounts.nix
|
../modules/kafka-mounts.nix
|
||||||
../modules/server.nix
|
../modules/server.nix
|
||||||
|
../modules/syncthing.nix
|
||||||
./caddy.nix
|
./caddy.nix
|
||||||
|
./jellyfin.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings = { sandbox = false; };
|
nix.settings = { sandbox = false; };
|
||||||
@@ -20,6 +22,8 @@
|
|||||||
privileged = true;
|
privileged = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.syncthing.guiAddress = "0.0.0.0:8384";
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
80 443 # caddy
|
80 443 # caddy
|
||||||
8000
|
8000
|
||||||
@@ -27,6 +31,7 @@
|
|||||||
8010 # audio bookshelf
|
8010 # audio bookshelf
|
||||||
8080 # file browser
|
8080 # file browser
|
||||||
8234 # shiori (non-standard)
|
8234 # shiori (non-standard)
|
||||||
|
8384 # syncthing
|
||||||
9117
|
9117
|
||||||
8191 # flaresolverr
|
8191 # flaresolverr
|
||||||
];
|
];
|
||||||
|
|||||||
18
hosts/alt/jellyfin.nix
Normal file
18
hosts/alt/jellyfin.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.jellyfin = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.jellyfin.extraGroups = [ "users" "render" "video" ];
|
||||||
|
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
intel-media-driver # Modern driver (iHD) - Best for QuickSync
|
||||||
|
intel-vaapi-driver # Legacy driver (i965) - Fallback
|
||||||
|
libvdpau-va-gl
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,7 +3,6 @@
|
|||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ config, pkgs, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
|
|||||||
@@ -10,8 +10,10 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../modules/base.nix
|
../modules/base.nix
|
||||||
../modules/desktop.nix
|
../modules/desktop.nix
|
||||||
../modules/home.nix
|
../modules/personal.nix
|
||||||
../modules/laptop.nix
|
../modules/laptop.nix
|
||||||
|
../modules/sway.nix
|
||||||
|
../modules/syncthing.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
|
|||||||
@@ -11,7 +11,9 @@
|
|||||||
../modules/base.nix
|
../modules/base.nix
|
||||||
../modules/desktop.nix
|
../modules/desktop.nix
|
||||||
../modules/brother-printer.nix
|
../modules/brother-printer.nix
|
||||||
../modules/home.nix
|
../modules/personal.nix
|
||||||
|
../modules/sway.nix
|
||||||
|
../modules/syncthing.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
|
|||||||
@@ -11,6 +11,10 @@
|
|||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# this is to avoid some problem that happens apparently only when fish is
|
||||||
|
# enabled, where generating man cahes takes a very long time. note that it may
|
||||||
|
# break fish man completion and apropos.
|
||||||
|
documentation.man.generateCaches = false;
|
||||||
|
|
||||||
# enable zram. not totally sure if this does it in physical ram or just swap
|
# enable zram. not totally sure if this does it in physical ram or just swap
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
@@ -80,6 +84,7 @@
|
|||||||
# domain = true; # Announce the locally used domain name (usually .local)
|
# domain = true; # Announce the locally used domain name (usually .local)
|
||||||
# userServices = true; # Publish services advertised by users
|
# userServices = true; # Publish services advertised by users
|
||||||
};
|
};
|
||||||
|
openFirewall = true;
|
||||||
# If you're using systemd-resolved alongside Avahi, ensure mDNS is also enabled there:
|
# If you're using systemd-resolved alongside Avahi, ensure mDNS is also enabled there:
|
||||||
# services.resolved.enable = true;
|
# services.resolved.enable = true;
|
||||||
# services.resolved.extraConfig = "MulticastDNS=yes";
|
# services.resolved.extraConfig = "MulticastDNS=yes";
|
||||||
|
|||||||
11
hosts/modules/certs/alt-caddy.crt
Normal file
11
hosts/modules/certs/alt-caddy.crt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIBpDCCAUqgAwIBAgIRAO4kQX8a7Nof29aVPoDM0p4wCgYIKoZIzj0EAwIwMDEu
|
||||||
|
MCwGA1UEAxMlQ2FkZHkgTG9jYWwgQXV0aG9yaXR5IC0gMjAyNSBFQ0MgUm9vdDAe
|
||||||
|
Fw0yNTA5MDQxMzAzNTFaFw0zNTA3MTQxMzAzNTFaMDAxLjAsBgNVBAMTJUNhZGR5
|
||||||
|
IExvY2FsIEF1dGhvcml0eSAtIDIwMjUgRUNDIFJvb3QwWTATBgcqhkjOPQIBBggq
|
||||||
|
hkjOPQMBBwNCAASWhBhJwcavZ/tI6bVqRGPfj0J5vZOZo8xcO4QYFdXkc/2rzWOt
|
||||||
|
kJic/Z/rEi64rXDc2mGQszT2dmk+wasnxIA/o0UwQzAOBgNVHQ8BAf8EBAMCAQYw
|
||||||
|
EgYDVR0TAQH/BAgwBgEB/wIBATAdBgNVHQ4EFgQUTGymcFS/WrGNAK+4frV1qEcZ
|
||||||
|
djcwCgYIKoZIzj0EAwIDSAAwRQIhANu5ZzCZJhLmkMGJt7fvmWW0Vi4cl/cjhhv4
|
||||||
|
f2f8rNECAiBwLaVmz34G4vXKcGH9Hi9PXM3HrMkVQgOo3pCyWxrIug==
|
||||||
|
-----END CERTIFICATE-----
|
||||||
@@ -1,18 +1,27 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
{
|
{
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "dvorak";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Trust the Caddy Local Authority
|
||||||
|
security.pki.certificateFiles = [
|
||||||
|
./certs/alt-caddy.crt
|
||||||
|
];
|
||||||
|
|
||||||
# Enable the GNOME Desktop Environment.
|
# Enable the GNOME Desktop Environment.
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
services.displayManager.gdm = {
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
enable = true;
|
||||||
|
wayland = true;
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.xkb = {
|
|
||||||
layout = "us";
|
|
||||||
variant = "dvorak";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.desktopManager.gnome.enable = true;
|
||||||
|
|
||||||
# enable japanese input
|
# enable japanese input
|
||||||
i18n.inputMethod = {
|
i18n.inputMethod = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -28,7 +37,6 @@
|
|||||||
enableDefaultPackages = true;
|
enableDefaultPackages = true;
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
bitwarden-desktop
|
|
||||||
khmeros
|
khmeros
|
||||||
libreoffice-fresh
|
libreoffice-fresh
|
||||||
nerd-fonts.lilex
|
nerd-fonts.lilex
|
||||||
@@ -41,6 +49,12 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
libreoffice-fresh
|
||||||
|
meld
|
||||||
|
showtime
|
||||||
|
];
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
@@ -67,5 +81,10 @@
|
|||||||
# services.xserver.libinput.enable = true;
|
# services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
# Install firefox.
|
# Install firefox.
|
||||||
programs.firefox.enable = true;
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
languagePacks = [
|
||||||
|
"en-GB"
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
{
|
|
||||||
# Mullvad vpn
|
|
||||||
services.mullvad-vpn = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
foliate
|
|
||||||
inputs.locutus.packages.${pkgs.system}.default
|
|
||||||
jrnl
|
|
||||||
mullvad-browser
|
|
||||||
mullvad-vpn
|
|
||||||
tor-browser
|
|
||||||
exiftool
|
|
||||||
darktable
|
|
||||||
digikam
|
|
||||||
shotwell
|
|
||||||
nextcloud-client
|
|
||||||
bitwarden-desktop
|
|
||||||
signal-desktop
|
|
||||||
spotify
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
services.thermald.enable = true;
|
services.thermald.enable = true;
|
||||||
|
|
||||||
services.power-profiles-daemon.enable = false;
|
services.power-profiles-daemon.enable = false;
|
||||||
|
services.logind.settings.Login.HandleLidSwitchExternalPower = "ignore";
|
||||||
|
|
||||||
services.tlp = {
|
services.tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
9
hosts/modules/personal.nix
Normal file
9
hosts/modules/personal.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ config, pkgs, inputs, ... }:
|
||||||
|
{
|
||||||
|
# Mullvad vpn
|
||||||
|
services.mullvad-vpn = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.mullvad-vpn;
|
||||||
|
};
|
||||||
|
hardware.ledger.enable = true;
|
||||||
|
}
|
||||||
27
hosts/modules/sway.nix
Normal file
27
hosts/modules/sway.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Enable the Sway binary and hardware wrappers
|
||||||
|
programs.sway = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.swayfx;
|
||||||
|
wrapperFeatures.gtk = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Ensure xdg-desktop-portal is working (needed for file pickers/open with)
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
wlr.enable = true;
|
||||||
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Hardware and security services that must be system-wide
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
security.polkit.enable = true;
|
||||||
|
programs.light.enable = true; # Allow brightness control
|
||||||
|
|
||||||
|
# Move system-wide packages here
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
pavucontrol
|
||||||
|
light
|
||||||
|
];
|
||||||
|
}
|
||||||
11
hosts/modules/syncthing.nix
Normal file
11
hosts/modules/syncthing.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ config, pkgs, inputs, ... }:
|
||||||
|
{
|
||||||
|
# sync thing
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
openDefaultPorts = true;
|
||||||
|
user = "alex";
|
||||||
|
configDir = "/home/alex/.config/syncthing";
|
||||||
|
dataDir = "/home/alex";
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user