This commit is contained in:
Thomas Avé 2024-09-13 10:46:49 +02:00
parent d435903a2d
commit 87c2f5f834
33 changed files with 1920 additions and 1920 deletions

210
flake.nix
View File

@ -1,108 +1,108 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
type = "git";
url = "https://github.com/hyprwm/Hyprland";
submodules = true;
};
split-monitor-workspaces = {
type = "git";
url = "https://github.com/Duckonaut/split-monitor-workspaces";
inputs.hyprland.follows = "hyprland";
ref = "fix/hyprutils";
};
nur.url = "github:nix-community/NUR";
ags.url = "github:Aylur/ags";
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
};
outputs = { nixpkgs, home-manager, nur, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
commonModules = host: user: [
./hosts/${host}/hardware-configuration.nix
{ nixpkgs.overlays = [ nur.overlay ]; }
{
nixpkgs.config.allowUnfree = true;
networking.hostName = host;
boot.loader.systemd-boot.enable = true;
time.timeZone = "Europe/Brussels";
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
nix.settings = {
substituters = [
"https://hyprland.cachix.org"
"https://nix-community.cachix.org"
"https://cuda-maintainers.cachix.org"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
];
experimental-features = [ "nix-command" "flakes" ];
trusted-users = [ "root" user ];
auto-optimise-store = true;
};
nix.gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 2d";
};
users.users.${user} = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKAa3tMzSCRuprEACrBsKI0F/o73o6J9L1qR3TaZn/N8 user@Kell"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByLwLAdJbmoDV5sx4hg5NbzKbOh1GmWEhDOUJ1GQBhK user@Riva"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBxMq4kubz4wWr4S8xU3GRkPcn6XRS3y7IP+qylN5QAp user@Aloria"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHtzTFdvLEvXpv69qAWLTipl4hgsKgRrRrWJRecsFthG user@Arch"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOxtJRtlAphl8euicVUR/6C7o+tyhpYmcbMBLHnldEIX server@mallorea"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILazQU/Y9I5PkMZoG/Lzc6mDR7s+aRHzqJoFUhYSse4P PocoF1"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFoUYcVMsDw6tmjfdOuQkwaXx8fohKJs/6/5HoLzTP6x Tablet"
];
shell = pkgs.zsh;
};
system.stateVersion = "23.11";
environment.sessionVariables.NIXOS_OZONE_WL = "1"; # hint electron apps to use wayland:
}
home-manager.nixosModules.home-manager
{
home-manager = {
extraSpecialArgs = {
inherit inputs;
}; # allows access to flake inputs in hm modules
useGlobalPkgs = true;
useUserPackages = true;
users.${user} = { imports = [ ./home/${host}.nix ]; };
};
}
./hosts/${host}
];
mkSystem = host: cfg:
nixpkgs.lib.nixosSystem {
system = cfg.system or "x86_64-linux";
modules = (commonModules host cfg.user) ++ (cfg.modules or [ ]);
specialArgs = inputs;
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
systems = {
Riva = { user = "user"; };
Kell = { user = "user"; };
Aloria = { user = "user"; };
};
in
{ nixosConfigurations = nixpkgs.lib.mapAttrs mkSystem systems; };
hyprland = {
type = "git";
url = "https://github.com/hyprwm/Hyprland";
submodules = true;
};
split-monitor-workspaces = {
type = "git";
url = "https://github.com/Duckonaut/split-monitor-workspaces";
inputs.hyprland.follows = "hyprland";
ref = "fix/hyprutils";
};
nur.url = "github:nix-community/NUR";
ags.url = "github:Aylur/ags";
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
};
outputs = { nixpkgs, home-manager, nur, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
commonModules = host: user: [
./hosts/${host}/hardware-configuration.nix
{ nixpkgs.overlays = [ nur.overlay ]; }
{
nixpkgs.config.allowUnfree = true;
networking.hostName = host;
boot.loader.systemd-boot.enable = true;
time.timeZone = "Europe/Brussels";
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
nix.settings = {
substituters = [
"https://hyprland.cachix.org"
"https://nix-community.cachix.org"
"https://cuda-maintainers.cachix.org"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
];
experimental-features = [ "nix-command" "flakes" ];
trusted-users = [ "root" user ];
auto-optimise-store = true;
};
nix.gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 2d";
};
users.users.${user} = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKAa3tMzSCRuprEACrBsKI0F/o73o6J9L1qR3TaZn/N8 user@Kell"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByLwLAdJbmoDV5sx4hg5NbzKbOh1GmWEhDOUJ1GQBhK user@Riva"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBxMq4kubz4wWr4S8xU3GRkPcn6XRS3y7IP+qylN5QAp user@Aloria"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHtzTFdvLEvXpv69qAWLTipl4hgsKgRrRrWJRecsFthG user@Arch"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOxtJRtlAphl8euicVUR/6C7o+tyhpYmcbMBLHnldEIX server@mallorea"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILazQU/Y9I5PkMZoG/Lzc6mDR7s+aRHzqJoFUhYSse4P PocoF1"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFoUYcVMsDw6tmjfdOuQkwaXx8fohKJs/6/5HoLzTP6x Tablet"
];
shell = pkgs.zsh;
};
system.stateVersion = "23.11";
environment.sessionVariables.NIXOS_OZONE_WL = "1"; # hint electron apps to use wayland:
}
home-manager.nixosModules.home-manager
{
home-manager = {
extraSpecialArgs = {
inherit inputs;
}; # allows access to flake inputs in hm modules
useGlobalPkgs = true;
useUserPackages = true;
users.${user} = { imports = [ ./home/${host}.nix ]; };
};
}
./hosts/${host}
];
mkSystem = host: cfg:
nixpkgs.lib.nixosSystem {
system = cfg.system or "x86_64-linux";
modules = (commonModules host cfg.user) ++ (cfg.modules or [ ]);
specialArgs = inputs;
};
systems = {
Riva = { user = "user"; };
Kell = { user = "user"; };
Aloria = { user = "user"; };
};
in
{ nixosConfigurations = nixpkgs.lib.mapAttrs mkSystem systems; };
}

View File

@ -1,64 +1,64 @@
{ inputs, config, pkgs, ... }:
{
imports = [
(import ./utils/desktop.nix { inherit inputs config pkgs; })
];
imports = [
(import ./utils/desktop.nix { inherit inputs config pkgs; })
];
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Aloria/id_ed25519";
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Aloria/id_ed25519";
home.packages = with pkgs; [
texliveFull
nmap
arp-scan
chromium
stress
jellyfin-media-player
gocryptfs
cmake
virt-manager
wol
dig
file
zip
yubioath-flutter
obsidian
];
home.packages = with pkgs; [
texliveFull
nmap
arp-scan
chromium
stress
jellyfin-media-player
gocryptfs
cmake
virt-manager
wol
dig
file
zip
yubioath-flutter
obsidian
];
services.hyprpaper = {
settings = {
wallpaper = [
"HDMI-A-1,${./hyprland/files/wallpaper.png}"
"HDMI-A-2,${./hyprland/files/wallpaper.png}"
"eDP-1,${./hyprland/files/wallpaper.png}"
"eDP-2,${./hyprland/files/wallpaper.png}"
];
services.hyprpaper = {
settings = {
wallpaper = [
"HDMI-A-1,${./hyprland/files/wallpaper.png}"
"HDMI-A-2,${./hyprland/files/wallpaper.png}"
"eDP-1,${./hyprland/files/wallpaper.png}"
"eDP-2,${./hyprland/files/wallpaper.png}"
];
};
};
};
# wayland.windowManager.hyprland.settings.env = ["WLR_DRM_DEVICES,/dev/dri/by-path/pci-0000:01:00.0-card"]; # Nvidia
# wayland.windowManager.hyprland.settings.env = ["WLR_DRM_DEVICES,/dev/dri/by-path/pci-0000:00:02.0-card"]; # Intel
wayland.windowManager.hyprland.settings = {
exec-once = [
"${pkgs.swaylock-fancy}/bin/swaylock-fancy"
];
monitor = [
"eDP-1,1920x1080@144,0x0,1"
"eDP-2,1920x1080@144,0x0,1"
# "HDMI-A-2,1920x1080@60,0x-1080,1"
# "HDMI-A-1,1920x1080@60,0x-1080,1"
];
bind = [
", XF86PowerOff, exec, ${pkgs.rofi}/bin/rofi -show power-menu -modi power-menu:${
./hyprland/files/rofi-power-menu.sh
# wayland.windowManager.hyprland.settings.env = ["WLR_DRM_DEVICES,/dev/dri/by-path/pci-0000:01:00.0-card"]; # Nvidia
# wayland.windowManager.hyprland.settings.env = ["WLR_DRM_DEVICES,/dev/dri/by-path/pci-0000:00:02.0-card"]; # Intel
wayland.windowManager.hyprland.settings = {
exec-once = [
"${pkgs.swaylock-fancy}/bin/swaylock-fancy"
];
monitor = [
"eDP-1,1920x1080@144,0x0,1"
"eDP-2,1920x1080@144,0x0,1"
# "HDMI-A-2,1920x1080@60,0x-1080,1"
# "HDMI-A-1,1920x1080@60,0x-1080,1"
];
bind = [
", XF86PowerOff, exec, ${pkgs.rofi}/bin/rofi -show power-menu -modi power-menu:${
./hyprland/files/rofi-power-menu.sh
}"
];
general.gaps_out = 1;
};
];
general.gaps_out = 1;
};
programs.alacritty.settings.font.size = 13;
programs.zsh.initExtra = pkgs.lib.mkForce ''
programs.alacritty.settings.font.size = 13;
programs.zsh.initExtra = pkgs.lib.mkForce ''
LOCAL_SEARCH_DIRS=(~/.dotfiles/ ~/Workspace)
REMOTE_SEARCH_DIRS=()
'';
'';
}

View File

@ -1,9 +1,9 @@
{ inputs, config, pkgs, ... }:
{
home.username = "user";
home.homeDirectory = "/home/user";
home.username = "user";
home.homeDirectory = "/home/user";
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
];
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
];
}

View File

@ -1,29 +1,29 @@
{ inputs, config, pkgs, ... }:
let
scripts = {
disk_check = import ./utils/disk_check.nix { inherit pkgs; };
vdirsyncer = {
when = "*:0/15";
script = toString (pkgs.writeShellScript "script" ''
${pkgs.vdirsyncer}/bin/vdirsyncer sync imec/pair
'');
};
mbsync = {
when = "*-*-* 00:00:00";
script = toString (pkgs.writeShellScript "script" ''
BASEDIR=/home/server/Containers/mbsync
# python3 $BASEDIR/config/oauth2/mutt_oauth2.py $BASEDIR/data/oauth2/credentials.json
docker exec --user "1000:1000" mbsync-container /home/user/.config/mbsync/run.sh -a
${pkgs.notmuch}/bin/notmuch new
'');
};
sync_vault = {
when = "*-*-* 02:00:00";
script = toString (pkgs.writeShellScript "script" ''
source $HOME/.secrets/Backup/env.sh
for _ in {1..2}; do
OUTPUT=$(echo "$ZFS_PASSPHRASE" | ssh 10.4.0.1 zfs load-key Vault/Thomas/Encrypted 2>&1);
if [ "$OUTPUT" == "Key load error: Key already loaded for 'Vault/Thomas/Encrypted'." ]; then
scripts = {
disk_check = import ./utils/disk_check.nix { inherit pkgs; };
vdirsyncer = {
when = "*:0/15";
script = toString (pkgs.writeShellScript "script" ''
${pkgs.vdirsyncer}/bin/vdirsyncer sync imec/pair
'');
};
mbsync = {
when = "*-*-* 00:00:00";
script = toString (pkgs.writeShellScript "script" ''
BASEDIR=/home/server/Containers/mbsync
# python3 $BASEDIR/config/oauth2/mutt_oauth2.py $BASEDIR/data/oauth2/credentials.json
docker exec --user "1000:1000" mbsync-container /home/user/.config/mbsync/run.sh -a
${pkgs.notmuch}/bin/notmuch new
'');
};
sync_vault = {
when = "*-*-* 02:00:00";
script = toString (pkgs.writeShellScript "script" ''
source $HOME/.secrets/Backup/env.sh
for _ in {1..2}; do
OUTPUT=$(echo "$ZFS_PASSPHRASE" | ssh 10.4.0.1 zfs load-key Vault/Thomas/Encrypted 2>&1);
if [ "$OUTPUT" == "Key load error: Key already loaded for 'Vault/Thomas/Encrypted'." ]; then
echo "Key successfully loaded, starting syncoid"
syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Thomas/Workspace 10.4.0.1:Vault/Thomas/Encrypted/Storage/Workspace
syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Thomas 10.4.0.1:Vault/Thomas/Encrypted/Storage/T
@ -33,48 +33,48 @@ let
ssh 10.4.0.1 zfs unload-key Vault/Thomas/Encrypted
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/s39pIIrB0R
exit 0
fi
done
fi
done
echo "Found output instead: $OUTPUT"
echo "Failed to load key: $OUTPUT" | sendmail
exit 1
'');
echo "Found output instead: $OUTPUT"
echo "Failed to load key: $OUTPUT" | sendmail
exit 1
'');
};
backup = {
when = "*-*-* 04:00:00";
script = toString (pkgs.writeShellScript "script" ''
${./scripts/files/backup.sh}
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/R6iJcWqGp0
'');
};
};
backup = {
when = "*-*-* 04:00:00";
script = toString (pkgs.writeShellScript "script" ''
${./scripts/files/backup.sh}
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/R6iJcWqGp0
'');
};
};
in
{
home.username = "server";
home.homeDirectory = "/home/server";
nix = {
package = pkgs.nix;
settings.use-xdg-base-directories = true;
};
{
home.username = "server";
home.homeDirectory = "/home/server";
nix = {
package = pkgs.nix;
settings.use-xdg-base-directories = true;
};
xdg.enable = true;
xdg.enable = true;
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
(import ./utils/services.nix { inherit pkgs; scripts = scripts; })
./ssh
];
programs.ssh.matchBlocks."*".identityFile = "/home/server/.secrets/SSH/Mallorea/id_ed25519";
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
(import ./utils/services.nix { inherit pkgs; scripts = scripts; })
./ssh
];
programs.ssh.matchBlocks."*".identityFile = "/home/server/.secrets/SSH/Mallorea/id_ed25519";
home.sessionVariables = {
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
LANG = "en_US.UTF-8";
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
};
home.sessionVariables = {
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
LANG = "en_US.UTF-8";
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
};
programs.zsh.initExtra = pkgs.lib.mkForce ''
programs.zsh.initExtra = pkgs.lib.mkForce ''
LOCAL_SEARCH_DIRS=(~/.dotfiles/ ~/Containers ~/Workspace ~/Storage/Thomas ~/Storage/Shared)
REMOTE_SEARCH_DIRS=()
'';
'';
}

View File

@ -1,16 +1,16 @@
{ inputs, config, pkgs, ... }:
{
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
./ssh
];
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
./ssh
];
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Riva/id_ed25519";
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Riva/id_ed25519";
home.packages = with pkgs; [
wl-clipboard
jq
evince
];
home.packages = with pkgs; [
wl-clipboard
jq
evince
];
}

View File

@ -1,78 +1,78 @@
{ inputs, config, pkgs, ... }:
let
scripts = {
disk_check = {
when = "*-*-* *:00:00";
script = toString (pkgs.writeShellScript "script" ''
scripts = {
disk_check = {
when = "*-*-* *:00:00";
script = toString (pkgs.writeShellScript "script" ''
REPORT_EMAIL=email@thomasave.be
ZPOOL_STATUS=$(zpool status -x)
if [ "$ZPOOL_STATUS" = "all pools are healthy" ] || [ "$ZPOOL_STATUS" = "no pools available" ]
then
printf 0 > /var/db/zpool.status
printf 0 > /var/db/zpool.status
else
if [ "$(cat /var/db/zpool.status)" -eq 0 ]
then
zpool status | mail -s "ZPOOL NOT HEALTHY" $REPORT_EMAIL
printf 1 > /var/db/zpool.status
fi
if [ "$(cat /var/db/zpool.status)" -eq 0 ]
then
zpool status | mail -s "ZPOOL NOT HEALTHY" $REPORT_EMAIL
printf 1 > /var/db/zpool.status
fi
'');
};
restic_etienne = {
when = "*-*-* 01:00:00";
script = toString (pkgs.writeShellScript "script" ''
fi
'');
};
restic_etienne = {
when = "*-*-* 01:00:00";
script = toString (pkgs.writeShellScript "script" ''
/Backup/Restic/Etienne/run.sh
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/zGPrOi0NsJ
'');
};
restic_magda_and_etienne = {
when = "*-*-* 03:00:00";
script = toString (pkgs.writeShellScript "script" ''
'');
};
restic_magda_and_etienne = {
when = "*-*-* 03:00:00";
script = toString (pkgs.writeShellScript "script" ''
/Backup/Restic/Magda\ and\ Etienne/run.sh
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/yvBuDgduDd
'');
};
restic_backblaze = {
when = "*-*-* 02:00:00";
script = toString (pkgs.writeShellScript "script" ''
'');
};
restic_backblaze = {
when = "*-*-* 02:00:00";
script = toString (pkgs.writeShellScript "script" ''
/Backup/Restic/BackBlaze/run.sh
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/LVruVYTwTn
'');
};
mail_sync = {
when = "*-*-* 04:00:00";
script = toString (pkgs.writeShellScript "script" ''
'');
};
mail_sync = {
when = "*-*-* 04:00:00";
script = toString (pkgs.writeShellScript "script" ''
cd /home/server/Containers/Mails && docker compose up sync-etienne sync-magda
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/eEIPVGyrAx
'');
'');
};
};
};
in
{
home.username = "server";
home.homeDirectory = "/home/server";
nix = {
package = pkgs.nix;
settings.use-xdg-base-directories = true;
};
{
home.username = "server";
home.homeDirectory = "/home/server";
nix = {
package = pkgs.nix;
settings.use-xdg-base-directories = true;
};
xdg.enable = true;
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
(import ./utils/services.nix { inherit pkgs; scripts = scripts; })
./ssh
];
xdg.enable = true;
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
(import ./utils/services.nix { inherit pkgs; scripts = scripts; })
./ssh
];
programs.ssh.matchBlocks."*".identityFile = "/home/server/.secrets/SSH/Vault/id_ed25519";
programs.ssh.matchBlocks."*".identityFile = "/home/server/.secrets/SSH/Vault/id_ed25519";
home.sessionVariables = {
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
LANG = "en_US.UTF-8";
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
};
home.sessionVariables = {
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
LANG = "en_US.UTF-8";
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
};
programs.zsh.initExtra = pkgs.lib.mkForce ''
programs.zsh.initExtra = pkgs.lib.mkForce ''
LOCAL_SEARCH_DIRS=(~/.dotfiles/ ~/Storage/Thomas/ ~/Storage/Etienne/ ~/Storage/Magda\ and\ Etienne/ ~/Containers/)
REMOTE_SEARCH_DIRS=()
'';
'';
}

View File

@ -1,127 +1,127 @@
{ pkgs, ... }:
{
programs.alacritty = {
enable = true;
settings = {
scrolling.history = 10000;
window = {
dynamic_padding = true;
dynamic_title = true;
opacity = 0.3;
};
colors = {
bright = {
black = "#555556";
blue = "#00afff";
cyan = "#50cdfe";
green = "#b0e05e";
magenta = "#af87ff";
red = "#f5669c";
white = "#ffffff";
yellow = "#fef26c";
programs.alacritty = {
enable = true;
settings = {
scrolling.history = 10000;
window = {
dynamic_padding = true;
dynamic_title = true;
opacity = 0.3;
};
colors = {
bright = {
black = "#555556";
blue = "#00afff";
cyan = "#50cdfe";
green = "#b0e05e";
magenta = "#af87ff";
red = "#f5669c";
white = "#ffffff";
yellow = "#fef26c";
};
normal = {
black = "#121213";
blue = "#0f7fcf";
cyan = "#42a7cf";
green = "#97e123";
magenta = "#8700ff";
red = "#fa2573";
white = "#bbbbbb";
yellow = "#dfd460";
};
primary = {
background = "#000011";
foreground = "#F8F8F2";
};
};
font = {
size = pkgs.lib.mkDefault 15;
bold = {
family = "Iosevka Extended";
style = "Bold";
};
bold_italic = {
family = "Iosevka Extended";
style = "Bold Italic";
};
italic = {
family = "Iosevka Extended";
style = "Italic";
};
normal = {
family = "Iosevka Extended";
style = "Regular";
};
};
keyboard.bindings = [
{
action = "ToggleFullscreen";
key = "F11";
}
{
action = "ToggleViMode";
key = "Escape";
mode = "Vi";
}
{
action = "ScrollHalfPageUp";
key = "E";
mode = "Vi";
mods = "Control";
}
{
key = "F";
mods = "Control|Shift";
action = "ReceiveChar";
}
{
chars = "\\u001B[72;6u";
key = "H";
mods = "Control|Shift";
}
{
chars = "\\u001B[74;6u";
key = "J";
mods = "Control|Shift";
}
{
chars = "\\u001B[75;6u";
key = "K";
mods = "Control|Shift";
}
{
chars = "\\u001B[76;6u";
key = "L";
mods = "Control|Shift";
}
{
chars = "\\u001B[105;5u";
key = "I";
mods = "Control";
}
{
chars = "\\u001B[46;5u";
key = "Period";
mods = "Control";
}
{
chars = "\\u001B[44;5u";
key = "Comma";
mods = "Control";
}
{
chars = "\\u001B[59;5u";
key = "Semicolon";
mods = "Control";
}
{
chars = "\\u001B[13;2u";
key = "Return";
mods = "Shift";
}
];
};
normal = {
black = "#121213";
blue = "#0f7fcf";
cyan = "#42a7cf";
green = "#97e123";
magenta = "#8700ff";
red = "#fa2573";
white = "#bbbbbb";
yellow = "#dfd460";
};
primary = {
background = "#000011";
foreground = "#F8F8F2";
};
};
font = {
size = pkgs.lib.mkDefault 15;
bold = {
family = "Iosevka Extended";
style = "Bold";
};
bold_italic = {
family = "Iosevka Extended";
style = "Bold Italic";
};
italic = {
family = "Iosevka Extended";
style = "Italic";
};
normal = {
family = "Iosevka Extended";
style = "Regular";
};
};
keyboard.bindings = [
{
action = "ToggleFullscreen";
key = "F11";
}
{
action = "ToggleViMode";
key = "Escape";
mode = "Vi";
}
{
action = "ScrollHalfPageUp";
key = "E";
mode = "Vi";
mods = "Control";
}
{
key = "F";
mods = "Control|Shift";
action = "ReceiveChar";
}
{
chars = "\\u001B[72;6u";
key = "H";
mods = "Control|Shift";
}
{
chars = "\\u001B[74;6u";
key = "J";
mods = "Control|Shift";
}
{
chars = "\\u001B[75;6u";
key = "K";
mods = "Control|Shift";
}
{
chars = "\\u001B[76;6u";
key = "L";
mods = "Control|Shift";
}
{
chars = "\\u001B[105;5u";
key = "I";
mods = "Control";
}
{
chars = "\\u001B[46;5u";
key = "Period";
mods = "Control";
}
{
chars = "\\u001B[44;5u";
key = "Comma";
mods = "Control";
}
{
chars = "\\u001B[59;5u";
key = "Semicolon";
mods = "Control";
}
{
chars = "\\u001B[13;2u";
key = "Return";
mods = "Shift";
}
];
};
};
}

View File

@ -1,252 +1,252 @@
{ config, pkgs, ... }:
{
home.file = {
".mailcap".text =
"text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput";
};
home.packages = with pkgs; [ mailcap ];
home.file = {
".mailcap".text =
"text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput";
};
home.packages = with pkgs; [ mailcap ];
programs.notmuch = {
enable = true;
extraConfig = {
database = { path = "/home/server/Storage/Thomas/Mail"; };
user = {
name = "Thomas Avé";
primary_email = "email@thomasave.be";
other_email = "Thomas.Ave@uantwerpen.be;Thomas.Ave@imec.be;";
};
maildir = { synchronize_flags = "true"; };
programs.notmuch = {
enable = true;
extraConfig = {
database = { path = "/home/server/Storage/Thomas/Mail"; };
user = {
name = "Thomas Avé";
primary_email = "email@thomasave.be";
other_email = "Thomas.Ave@uantwerpen.be;Thomas.Ave@imec.be;";
};
maildir = { synchronize_flags = "true"; };
};
};
};
programs.aerc = {
enable = true;
extraBinds = {
global = {
"<C-p>" = ":menu -adc 'fzy -l 30' :cf -a<Enter>";
"<tab>" = ":next-tab<Enter>";
"?" = ":help keys<Enter>";
"<F5>" = ":check-mail<Enter>";
};
messages = {
"q" = ":q<Enter>";
"<Backspace>" = ":q<Enter>";
"j" = ":next<Enter>";
"k" = ":prev<Enter>";
"<Up>" = ":prev<Enter>";
"g" = ":select 0<Enter>";
"G" = ":select -1<Enter>";
"J" = ":next-folder<Enter>";
"K" = ":prev-folder<Enter>";
"v" = ":mark -t<Enter>";
"V" = ":mark -v<Enter>";
"<Space>" = ":read -t<Enter>";
"T" = ":toggle-threads<Enter>";
"<Enter>" = ":view<Enter>";
"d" = ":prompt 'Really delete this message?' 'delete-message'<Enter>";
"D" = ":delete<Enter>";
"a" = ":archive flat<Enter>";
"A" = ":unmark -a<Enter>:mark -T<Enter>:archive flat<Enter>";
"f" = ":flag -t<Enter>";
"m" = ":compose<Enter>";
"rr" = ":reply -a<Enter>";
"rq" = ":reply -aq<Enter>";
"Rr" = ":reply<Enter>";
"Rq" = ":reply -q<Enter>";
"c" = ":cf<space>";
"$" = ":term<space>";
"!" = ":term<space>";
"|" = ":pipe<space>";
"/" = ":search -a<space>";
"\\" = ":filter -a <space>";
"n" = ":next-result<Enter>";
"N" = ":prev-result<Enter>";
"<Esc>" = ":clear<Enter>";
"s" = ":split<Enter>";
"S" = ":vsplit<Enter>";
"pl" = ":patch list<Enter>";
"pa" = ":patch apply <Tab>";
"pd" = ":patch drop <Tab>";
"pb" = ":patch rebase<Enter>";
"pt" = ":patch term<Enter>";
"ps" = ":patch switch <Tab>";
};
view = {
"/" = ":toggle-key-passthrough<Enter>/";
"q" = ":close<Enter>";
"O" = ":open<Enter>";
"o" = ":open<Enter>";
"S" = ":save<space>";
"|" = ":pipe<space>";
"D" = ":delete<Enter>";
"A" = ":archive flat<Enter>";
"<C-l>" = ":open-link <space>";
"f" = ":flag -t<Enter>";
"rr" = ":reply -a<Enter>";
"rq" = ":reply -aq<Enter>";
"Rr" = ":reply<Enter>";
"Rq" = ":reply -q<Enter>";
"H" = ":toggle-headers<Enter>";
"<C-k>" = ":prev-part<Enter>";
"<C-Up>" = ":prev-part<Enter>";
"<C-j>" = ":next-part<Enter>";
"<C-Down>" = ":next-part<Enter>";
"J" = ":next<Enter>";
"<C-Right>" = ":next<Enter>";
"K" = ":prev<Enter>";
"<C-Left>" = ":prev<Enter>";
};
"view::passthrough" = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<Esc>" = ":toggle-key-passthrough<Enter>";
};
compose = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"$complete" = "<C-o>";
"<C-k>" = ":prev-field<Enter>";
"<C-Up>" = ":prev-field<Enter>";
"<C-j>" = ":next-field<Enter>";
"<C-Down>" = ":next-field<Enter>";
"<A-p>" = ":switch-account -p<Enter>";
"<C-Left>" = ":switch-account -p<Enter>";
"<A-n>" = ":switch-account -n<Enter>";
"<C-Right>" = ":switch-account -n<Enter>";
"<tab>" = ":next-field<Enter>";
"<backtab>" = ":prev-field<Enter>";
"<C-p>" = ":prev-tab<Enter>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
"compose::editor" = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<C-k>" = ":prev-field<Enter>";
"<C-Up>" = ":prev-field<Enter>";
"<C-j>" = ":next-field<Enter>";
"<C-Down>" = ":next-field<Enter>";
"<C-p>" = ":prev-tab<Enter>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
"compose::review" = {
"y" = ":send<Enter>";
"n" = ":abort<Enter>";
"v" = ":preview<Enter>";
"p" = ":postpone<Enter>";
"q" = ":choose -o d discard abort -o p postpone postpone<Enter>";
"e" = ":edit<Enter>";
"a" = ":attach<space>";
"d" = ":detach<space>";
};
terminal = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<C-p>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
};
templates = {
quoted_reply = ''
programs.aerc = {
enable = true;
extraBinds = {
global = {
"<C-p>" = ":menu -adc 'fzy -l 30' :cf -a<Enter>";
"<tab>" = ":next-tab<Enter>";
"?" = ":help keys<Enter>";
"<F5>" = ":check-mail<Enter>";
};
messages = {
"q" = ":q<Enter>";
"<Backspace>" = ":q<Enter>";
"j" = ":next<Enter>";
"k" = ":prev<Enter>";
"<Up>" = ":prev<Enter>";
"g" = ":select 0<Enter>";
"G" = ":select -1<Enter>";
"J" = ":next-folder<Enter>";
"K" = ":prev-folder<Enter>";
"v" = ":mark -t<Enter>";
"V" = ":mark -v<Enter>";
"<Space>" = ":read -t<Enter>";
"T" = ":toggle-threads<Enter>";
"<Enter>" = ":view<Enter>";
"d" = ":prompt 'Really delete this message?' 'delete-message'<Enter>";
"D" = ":delete<Enter>";
"a" = ":archive flat<Enter>";
"A" = ":unmark -a<Enter>:mark -T<Enter>:archive flat<Enter>";
"f" = ":flag -t<Enter>";
"m" = ":compose<Enter>";
"rr" = ":reply -a<Enter>";
"rq" = ":reply -aq<Enter>";
"Rr" = ":reply<Enter>";
"Rq" = ":reply -q<Enter>";
"c" = ":cf<space>";
"$" = ":term<space>";
"!" = ":term<space>";
"|" = ":pipe<space>";
"/" = ":search -a<space>";
"\\" = ":filter -a <space>";
"n" = ":next-result<Enter>";
"N" = ":prev-result<Enter>";
"<Esc>" = ":clear<Enter>";
"s" = ":split<Enter>";
"S" = ":vsplit<Enter>";
"pl" = ":patch list<Enter>";
"pa" = ":patch apply <Tab>";
"pd" = ":patch drop <Tab>";
"pb" = ":patch rebase<Enter>";
"pt" = ":patch term<Enter>";
"ps" = ":patch switch <Tab>";
};
view = {
"/" = ":toggle-key-passthrough<Enter>/";
"q" = ":close<Enter>";
"O" = ":open<Enter>";
"o" = ":open<Enter>";
"S" = ":save<space>";
"|" = ":pipe<space>";
"D" = ":delete<Enter>";
"A" = ":archive flat<Enter>";
"<C-l>" = ":open-link <space>";
"f" = ":flag -t<Enter>";
"rr" = ":reply -a<Enter>";
"rq" = ":reply -aq<Enter>";
"Rr" = ":reply<Enter>";
"Rq" = ":reply -q<Enter>";
"H" = ":toggle-headers<Enter>";
"<C-k>" = ":prev-part<Enter>";
"<C-Up>" = ":prev-part<Enter>";
"<C-j>" = ":next-part<Enter>";
"<C-Down>" = ":next-part<Enter>";
"J" = ":next<Enter>";
"<C-Right>" = ":next<Enter>";
"K" = ":prev<Enter>";
"<C-Left>" = ":prev<Enter>";
};
"view::passthrough" = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<Esc>" = ":toggle-key-passthrough<Enter>";
};
compose = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"$complete" = "<C-o>";
"<C-k>" = ":prev-field<Enter>";
"<C-Up>" = ":prev-field<Enter>";
"<C-j>" = ":next-field<Enter>";
"<C-Down>" = ":next-field<Enter>";
"<A-p>" = ":switch-account -p<Enter>";
"<C-Left>" = ":switch-account -p<Enter>";
"<A-n>" = ":switch-account -n<Enter>";
"<C-Right>" = ":switch-account -n<Enter>";
"<tab>" = ":next-field<Enter>";
"<backtab>" = ":prev-field<Enter>";
"<C-p>" = ":prev-tab<Enter>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
"compose::editor" = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<C-k>" = ":prev-field<Enter>";
"<C-Up>" = ":prev-field<Enter>";
"<C-j>" = ":next-field<Enter>";
"<C-Down>" = ":next-field<Enter>";
"<C-p>" = ":prev-tab<Enter>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
"compose::review" = {
"y" = ":send<Enter>";
"n" = ":abort<Enter>";
"v" = ":preview<Enter>";
"p" = ":postpone<Enter>";
"q" = ":choose -o d discard abort -o p postpone postpone<Enter>";
"e" = ":edit<Enter>";
"a" = ":attach<space>";
"d" = ":detach<space>";
};
terminal = {
"$noinherit" = "true";
"$ex" = "<C-x>";
"<C-p>" = ":prev-tab<Enter>";
"<C-n>" = ":next-tab<Enter>";
"<C-PgUp>" = ":prev-tab<Enter>";
"<C-PgDn>" = ":next-tab<Enter>";
};
};
templates = {
quoted_reply = ''
{{(index .OriginalFrom 0).Name}}, {{dateFormat (.OriginalDate | toLocal) "Jan 02, 2006 at 15:04"}}:
{{ if eq .OriginalMIMEType "text/html" -}}
{{- exec `${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html` .OriginalText | quote -}}
{{- else -}}
{{- .OriginalText | quote -}}
{{- end}}
'';
'';
};
extraConfig = {
general = {
term = "xterm-256color";
unsafe-accounts-conf = true;
};
ui = {
border-char-vertical = "";
border-char-horizontal = "";
styleset-name = "catppuccin-mocha";
timestamp-format = "2006-01-02 15:04";
sidebar-width = 30;
mouse-enabled = true;
dirlist-right = "{{if .Unread}}{{humanReadable .Unread}}{{end}}";
dirlist-tree = true;
};
viewer = {
pager =
"${pkgs.neovim}/bin/nvim -u ${config.xdg.configHome}/nvim/aerc.lua";
};
compose = { address-book-cmd = ''notmuch address "%s"''; };
multipart-converters = {
"text/html" =
"${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html";
};
filters = {
"text/plain" = "cat";
"text/calendar" = "${pkgs.gnome-calendar}/bin/gnome-calendar";
"message/delivery-status" = "cat";
"message/rfc822" = "cat";
"text/html" = "${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html";
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
};
};
extraAccounts = {
Zoho = {
outgoing = "smtps://email%40thomasave.be@smtp.zoho.com";
outgoing-cred-cmd = "cat ~/.secrets/Aerc/Zoho.key";
source =
"maildir:///home/server/Storage/Thomas/Mail/email@thomasave.be/";
check-mail-cmd =
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
check-mail-timeout = "60s";
default = "Inbox";
from = ''"Thomas Avé" <email@thomasave.be>'';
cache-headers = true;
};
UAntwerpen = {
outgoing =
"ssh server@192.168.1.2 /home/server/Containers/mbsync/send.sh";
source =
"maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@uantwerpen.be";
check-mail-cmd =
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
check-mail-timeout = "60s";
default = "Inbox";
from = ''"Thomas Avé" <Thomas.Ave@uantwerpen.be>'';
cache-headers = true;
};
IMEC = {
outgoing = "smtp+insecure://ave57%40imec.be@smtp.thomasave.be:1025";
outgoing-cred-cmd = "cat ~/.secrets/Aerc/IMEC.key";
source =
"maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@imec.be/";
check-mail-cmd =
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
check-mail-timeout = "60s";
default = "Inbox";
from = ''"Thomas Avé" <Thomas.Ave@imec.be>'';
cache-headers = true;
};
NotMuch = {
source = "notmuch:///home/server/Storage/Thomas/Mail/";
check-mail-cmd =
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
check-mail-timeout = "60s";
from = ''"Thomas Avé" <Thomas.Ave@uantwerpen.be>'';
query-map = "${config.xdg.configHome}/aerc/map.conf";
default = "INBOX";
cache-headers = true;
};
};
};
extraConfig = {
general = {
term = "xterm-256color";
unsafe-accounts-conf = true;
};
ui = {
border-char-vertical = "";
border-char-horizontal = "";
styleset-name = "catppuccin-mocha";
timestamp-format = "2006-01-02 15:04";
sidebar-width = 30;
mouse-enabled = true;
dirlist-right = "{{if .Unread}}{{humanReadable .Unread}}{{end}}";
dirlist-tree = true;
};
viewer = {
pager =
"${pkgs.neovim}/bin/nvim -u ${config.xdg.configHome}/nvim/aerc.lua";
};
compose = { address-book-cmd = ''notmuch address "%s"''; };
multipart-converters = {
"text/html" =
"${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html";
};
filters = {
"text/plain" = "cat";
"text/calendar" = "${pkgs.gnome-calendar}/bin/gnome-calendar";
"message/delivery-status" = "cat";
"message/rfc822" = "cat";
"text/html" = "${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html";
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
};
};
extraAccounts = {
Zoho = {
outgoing = "smtps://email%40thomasave.be@smtp.zoho.com";
outgoing-cred-cmd = "cat ~/.secrets/Aerc/Zoho.key";
source =
"maildir:///home/server/Storage/Thomas/Mail/email@thomasave.be/";
check-mail-cmd =
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
check-mail-timeout = "60s";
default = "Inbox";
from = ''"Thomas Avé" <email@thomasave.be>'';
cache-headers = true;
};
UAntwerpen = {
outgoing =
"ssh server@192.168.1.2 /home/server/Containers/mbsync/send.sh";
source =
"maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@uantwerpen.be";
check-mail-cmd =
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
check-mail-timeout = "60s";
default = "Inbox";
from = ''"Thomas Avé" <Thomas.Ave@uantwerpen.be>'';
cache-headers = true;
};
IMEC = {
outgoing = "smtp+insecure://ave57%40imec.be@smtp.thomasave.be:1025";
outgoing-cred-cmd = "cat ~/.secrets/Aerc/IMEC.key";
source =
"maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@imec.be/";
check-mail-cmd =
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
check-mail-timeout = "60s";
default = "Inbox";
from = ''"Thomas Avé" <Thomas.Ave@imec.be>'';
cache-headers = true;
};
NotMuch = {
source = "notmuch:///home/server/Storage/Thomas/Mail/";
check-mail-cmd =
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
check-mail-timeout = "60s";
from = ''"Thomas Avé" <Thomas.Ave@uantwerpen.be>'';
query-map = "${config.xdg.configHome}/aerc/map.conf";
default = "INBOX";
cache-headers = true;
};
};
};
home.file."${config.xdg.configHome}/aerc/map.conf".text =
"Inbox=tag:inbox and not tag:archived and not tag:deleted";
home.file."${config.xdg.configHome}/aerc/stylesets/catppuccin-mocha".text = ''
home.file."${config.xdg.configHome}/aerc/map.conf".text =
"Inbox=tag:inbox and not tag:archived and not tag:deleted";
home.file."${config.xdg.configHome}/aerc/stylesets/catppuccin-mocha".text = ''
*.default=true
*.normal=true
@ -305,5 +305,5 @@
diff_del.fg=#f38ba8
quote_*.fg=#6c7086
quote_1.fg=#9399b2
'';
'';
}

View File

@ -1,109 +1,109 @@
{ pkgs, ... }:
let
lock-false = {
Value = false;
Status = "locked";
};
lock-false = {
Value = false;
Status = "locked";
};
in
{
programs.firefox = {
enable = true;
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab"
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
ExtensionSettings = {
"@contain-google" = {
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/google-container/latest.xpi";
installation_mode = "force_installed";
};
"{ea4204c0-3209-4116-afd2-2a208e21a779}" = {
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/enable-bing-chat/latest.xpi";
installation_mode = "force_installed";
};
"{3e4d2037-d300-4e95-859d-3cba866f46d3}" = {
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/private-internet-access-ext/latest.xpi";
installation_mode = "force_installed";
};
"{c7c120ff-2878-4e59-a5a3-cd4d1655bc13}" = {
install_url = "file://${./files/signed.xpi}";
installation_mode = "force_installed";
};
};
Preferences = {
"browser.disableResetPrompt" = true;
"browser.download.panel.shown" = true;
"browser.shell.checkDefaultBrowser" = false;
"browser.tabs.inTitlebar" = 0;
"browser.shell.defaultBrowserCheckCount" = 1;
"browser.startup.homepage" = "https://start.duckduckgo.com";
"browser.compactmode.show" = true;
"browser.uidensity" = 1;
"extensions.update.enabled" = false;
"extensions.pocket.enabled" = lock-false;
"extensions.autoDisableScopes" = 0;
"browser.contentblocking.category" = {
Value = "strict";
Status = "locked";
};
"browser.uiCustomization.state" = ''
{
programs.firefox = {
enable = true;
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab"
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
ExtensionSettings = {
"@contain-google" = {
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/google-container/latest.xpi";
installation_mode = "force_installed";
};
"{ea4204c0-3209-4116-afd2-2a208e21a779}" = {
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/enable-bing-chat/latest.xpi";
installation_mode = "force_installed";
};
"{3e4d2037-d300-4e95-859d-3cba866f46d3}" = {
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/private-internet-access-ext/latest.xpi";
installation_mode = "force_installed";
};
"{c7c120ff-2878-4e59-a5a3-cd4d1655bc13}" = {
install_url = "file://${./files/signed.xpi}";
installation_mode = "force_installed";
};
};
Preferences = {
"browser.disableResetPrompt" = true;
"browser.download.panel.shown" = true;
"browser.shell.checkDefaultBrowser" = false;
"browser.tabs.inTitlebar" = 0;
"browser.shell.defaultBrowserCheckCount" = 1;
"browser.startup.homepage" = "https://start.duckduckgo.com";
"browser.compactmode.show" = true;
"browser.uidensity" = 1;
"extensions.update.enabled" = false;
"extensions.pocket.enabled" = lock-false;
"extensions.autoDisableScopes" = 0;
"browser.contentblocking.category" = {
Value = "strict";
Status = "locked";
};
"browser.uiCustomization.state" = ''
{"placements":{"widget-overflow-fixed-list":["fxa-toolbar-menu-button","developer-button"],"unified-extensions-area":["sponsorblocker_ajay_app-browser-action","_testpilot-containers-browser-action","_531906d3-e22f-4a6c-a102-8057b88a1a63_-browser-action","beyond20_kakaroto_homelinux_net-browser-action","_d7742d87-e61d-4b78-b8a1-b469842139fa_-browser-action","_contain-facebook-browser-action","jid1-kkzogwgsw3ao4q_jetpack-browser-action","jid1-mnnxcxisbpnsxq_jetpack-browser-action","_74145f27-f039-47ce-a470-a662b129930a_-browser-action","chrome-gnome-shell_gnome_org-browser-action","_ea4204c0-3209-4116-afd2-2a208e21a779_-browser-action","_f209234a-76f0-4735-9920-eb62507a54cd_-browser-action","_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action","display-anchors_robwu_nl-browser-action","firefoxcolor_mozilla_com-browser-action","search_kagi_com-browser-action","_7a7a4a92-a2a0-41d1-9fd7-1e92480d612d_-browser-action"],"nav-bar":["back-button","forward-button","stop-reload-button","urlbar-container","downloads-button","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action","_12cf650b-1822-40aa-bff0-996df6948878_-browser-action","_3e4d2037-d300-4e95-859d-3cba866f46d3_-browser-action","save-as-pdf-ff_pdfcrowd_com-browser-action","user-agent-switcher_ninetailed_ninja-browser-action","_d66c8515-1e0d-408f-82ee-2682f2362726_-browser-action","ublock0_raymondhill_net-browser-action","reset-pbm-toolbar-button","adguardadblocker_adguard_com-browser-action","unified-extensions-button"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["import-button","personal-bookmarks"]},"seen":["developer-button","profiler-button","chrome-gnome-shell_gnome_org-browser-action","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action","_74145f27-f039-47ce-a470-a662b129930a_-browser-action","_contain-facebook-browser-action","_testpilot-containers-browser-action","jid1-kkzogwgsw3ao4q_jetpack-browser-action","jid1-mnnxcxisbpnsxq_jetpack-browser-action","ublock0_raymondhill_net-browser-action","_531906d3-e22f-4a6c-a102-8057b88a1a63_-browser-action","beyond20_kakaroto_homelinux_net-browser-action","_12cf650b-1822-40aa-bff0-996df6948878_-browser-action","_3e4d2037-d300-4e95-859d-3cba866f46d3_-browser-action","save-as-pdf-ff_pdfcrowd_com-browser-action","_d7742d87-e61d-4b78-b8a1-b469842139fa_-browser-action","user-agent-switcher_ninetailed_ninja-browser-action","_d66c8515-1e0d-408f-82ee-2682f2362726_-browser-action","_ea4204c0-3209-4116-afd2-2a208e21a779_-browser-action","adguardadblocker_adguard_com-browser-action","_f209234a-76f0-4735-9920-eb62507a54cd_-browser-action","_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action","sponsorblocker_ajay_app-browser-action","display-anchors_robwu_nl-browser-action","firefoxcolor_mozilla_com-browser-action","search_kagi_com-browser-action","_7a7a4a92-a2a0-41d1-9fd7-1e92480d612d_-browser-action"],"dirtyAreaCache":["nav-bar","PersonalToolbar","toolbar-menubar","TabsToolbar","widget-overflow-fixed-list","unified-extensions-area"],"currentVersion":20,"newElementCount":11}'';
"privacy.trackingprotection.enabled" = true;
"privacy.trackingprotection.enabled" = true;
};
};
};
};
};
profiles = {
default = {
id = 0;
name = "default";
isDefault = true;
search = {
force = true;
default = "DuckDuckGo";
order = [ "DuckDuckGo" "Google" ];
profiles = {
default = {
id = 0;
name = "default";
isDefault = true;
search = {
force = true;
default = "DuckDuckGo";
order = [ "DuckDuckGo" "Google" ];
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
bitwarden
privacy-badger
beyond-20
display-_anchors
facebook-container
multi-account-containers
istilldontcareaboutcookies
return-youtube-dislikes
sponsorblock
unpaywall
vimium
];
};
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
bitwarden
privacy-badger
beyond-20
display-_anchors
facebook-container
multi-account-containers
istilldontcareaboutcookies
return-youtube-dislikes
sponsorblock
unpaywall
vimium
];
};
};
};
xdg.mimeApps.defaultApplications = {
"application/json" = [ "firefox.desktop" ];
"application/x-extension-htm" = [ "firefox.desktop" ];
"application/x-extension-html" = [ "firefox.desktop" ];
"application/x-extension-shtml" = [ "firefox.desktop" ];
"application/x-extension-xhtml" = [ "firefox.desktop" ];
"application/x-extension-xht" = [ "firefox.desktop" ];
"application/xhtml+xml" = [ "firefox.desktop" ];
"text/html" = [ "firefox.desktop" ];
"text/xml" = [ "firefox.desktop" ];
"x-scheme-handler/about" = [ "firefox.desktop" ];
"x-scheme-handler/ftp" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
};
xdg.mimeApps.defaultApplications = {
"application/json" = [ "firefox.desktop" ];
"application/x-extension-htm" = [ "firefox.desktop" ];
"application/x-extension-html" = [ "firefox.desktop" ];
"application/x-extension-shtml" = [ "firefox.desktop" ];
"application/x-extension-xhtml" = [ "firefox.desktop" ];
"application/x-extension-xht" = [ "firefox.desktop" ];
"application/xhtml+xml" = [ "firefox.desktop" ];
"text/html" = [ "firefox.desktop" ];
"text/xml" = [ "firefox.desktop" ];
"x-scheme-handler/about" = [ "firefox.desktop" ];
"x-scheme-handler/ftp" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
};
}

View File

@ -1,28 +1,28 @@
{ inputs, config, pkgs, ... }:
{
programs.git = {
enable = true;
userName = "Thomas Avé";
userEmail = "email@thomasave.be";
aliases = {
s = "status";
a = "add";
programs.git = {
enable = true;
userName = "Thomas Avé";
userEmail = "email@thomasave.be";
aliases = {
s = "status";
a = "add";
};
ignores = [
"*.direnv/"
];
extraConfig = {
credentials.helper = "store";
pull.rebase = false;
push.autoSetupRemove = true;
init.defaultBranch = "master";
diff.noprefix = true;
color.ui = "auto";
core = {
excludesfile = "~/.gitignore";
editor = "${pkgs.neovim}/bin/nvim";
};
};
};
ignores = [
"*.direnv/"
];
extraConfig = {
credentials.helper = "store";
pull.rebase = false;
push.autoSetupRemove = true;
init.defaultBranch = "master";
diff.noprefix = true;
color.ui = "auto";
core = {
excludesfile = "~/.gitignore";
editor = "${pkgs.neovim}/bin/nvim";
};
};
};
}

View File

@ -1,242 +1,242 @@
{ inputs, pkgs, ... }:
let
playerctl = "${pkgs.playerctl}/bin/playerctl";
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
ags = "${pkgs.ags}/bin/ags";
nautilus = "${pkgs.nautilus}/bin/nautilus";
gnome-calendar = "${pkgs.gnome-calendar}/bin/gnome-calendar";
wpctl = "${pkgs.wireplumber}/bin/wpctl";
alacritty = "${pkgs.alacritty}/bin/alacritty";
swaylock = "${pkgs.swaylock-fancy}/bin/swaylock-fancy";
rofi = "${pkgs.rofi}/bin/rofi";
jq = "${pkgs.jq}/bin/jq";
rofi-ykman = pkgs.writeShellScriptBin "rofi-ykman" ''
playerctl = "${pkgs.playerctl}/bin/playerctl";
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
ags = "${pkgs.ags}/bin/ags";
nautilus = "${pkgs.nautilus}/bin/nautilus";
gnome-calendar = "${pkgs.gnome-calendar}/bin/gnome-calendar";
wpctl = "${pkgs.wireplumber}/bin/wpctl";
alacritty = "${pkgs.alacritty}/bin/alacritty";
swaylock = "${pkgs.swaylock-fancy}/bin/swaylock-fancy";
rofi = "${pkgs.rofi}/bin/rofi";
jq = "${pkgs.jq}/bin/jq";
rofi-ykman = pkgs.writeShellScriptBin "rofi-ykman" ''
accounts=$(${pkgs.yubikey-manager}/bin/ykman oath accounts list)
prompt="YubiKey OATH"
account=$(echo "''${accounts/, TOTP/\n}" | awk '{ print $0 "\0icon\x1fyubioath"; }' | ${rofi} -dmenu -i -p "$prompt" ''${shortcuts[@]})
code=$(${pkgs.yubikey-manager}/bin/ykman oath accounts code "$account")
IFS=', ' read -r -a code <<< "$code"
echo -n "''${code[-1]}" | ${pkgs.wl-clipboard}/bin/wl-copy;
'';
'';
workspace_command_prefix = "split-";
hyprland_plugins = [ inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces ];
workspace_command_prefix = "split-";
hyprland_plugins = [ inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces ];
# Disable split-monitor-workspaces
# workspace_command_prefix = "";
# hyprland_plugins = [];
# Disable split-monitor-workspaces
# workspace_command_prefix = "";
# hyprland_plugins = [];
launch_alacritty = pkgs.writeShellScriptBin "launch_alacritty" ''
launch_alacritty = pkgs.writeShellScriptBin "launch_alacritty" ''
function find_leaf_pid(){
local PID=$1
local CHILD_PID=$(pgrep -P "$PID")
if [ "$CHILD_PID" != "" ]; then
local RET=$(find_leaf_pid "$CHILD_PID")
if [ "$RET" != "" ]; then
PID=$RET
fi
fi
local NAME=$(ps -p "$PID" -o comm=)
if [ "$NAME" == "zsh" ]; then
echo "$PID"
elif [ "$NAME" == "ssh" ]; then
echo "$PID"
fi
local PID=$1
local CHILD_PID=$(pgrep -P "$PID")
if [ "$CHILD_PID" != "" ]; then
local RET=$(find_leaf_pid "$CHILD_PID")
if [ "$RET" != "" ]; then
PID=$RET
fi
fi
local NAME=$(ps -p "$PID" -o comm=)
if [ "$NAME" == "zsh" ]; then
echo "$PID"
elif [ "$NAME" == "ssh" ]; then
echo "$PID"
fi
}
LEAF_PID=$(find_leaf_pid "$1")
if [ "$(ps -p "$LEAF_PID" -o comm=)" == "ssh" ]; then
SSH_COMMAND=$(ps -p "$LEAF_PID" -o args --no-headers)
if [[ "$SSH_COMMAND" == *"waypipe"* ]]; then
CLIENT=$(echo "$SSH_COMMAND" | awk '{ print $5 }')
PREVIOUS_SESSION_ID=$(grep -z "SSH_SESSION_ID" "/proc/$LEAF_PID/environ" | xargs -0 -n 1 | grep -oP "[0-9]*")
SSH_SESSION_ID=$RANDOM
${alacritty} -e zsh -c "SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t \"$CLIENT\" env SSH_SESSION_ID=\"$SSH_SESSION_ID\" PREVIOUS_SESSION_ID=\"$PREVIOUS_SESSION_ID\" \"zsh --login\""
else
${alacritty} -e zsh -c "ssh -t \"$(echo "$SSH_COMMAND" | awk '{ print $2 }')\""
fi
SSH_COMMAND=$(ps -p "$LEAF_PID" -o args --no-headers)
if [[ "$SSH_COMMAND" == *"waypipe"* ]]; then
CLIENT=$(echo "$SSH_COMMAND" | awk '{ print $5 }')
PREVIOUS_SESSION_ID=$(grep -z "SSH_SESSION_ID" "/proc/$LEAF_PID/environ" | xargs -0 -n 1 | grep -oP "[0-9]*")
SSH_SESSION_ID=$RANDOM
${alacritty} -e zsh -c "SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t \"$CLIENT\" env SSH_SESSION_ID=\"$SSH_SESSION_ID\" PREVIOUS_SESSION_ID=\"$PREVIOUS_SESSION_ID\" \"zsh --login\""
else
${alacritty} -e zsh -c "ssh -t \"$(echo "$SSH_COMMAND" | awk '{ print $2 }')\""
fi
else # Not an ssh session
if [ "$(ps -p "$1" -o comm=)" == "alacritty" ]; then
CWD=$(readlink -e /proc/"$LEAF_PID"/cwd)
if [ "$CWD" != "" ]; then
${alacritty} --working-directory "$CWD"
else
${alacritty}
fi
else
${alacritty}
fi
if [ "$(ps -p "$1" -o comm=)" == "alacritty" ]; then
CWD=$(readlink -e /proc/"$LEAF_PID"/cwd)
if [ "$CWD" != "" ]; then
${alacritty} --working-directory "$CWD"
else
${alacritty}
fi
'';
else
${alacritty}
fi
fi
'';
in {
home.packages = [
pkgs.wl-clipboard
pkgs.jq
];
services.hyprpaper = {
enable = true;
settings = {
ipc = "off";
splash = false;
preload = [ "${./files/wallpaper.png}" ];
wallpaper = [
# Fill in by host-specific config!
# "Display,${./files/wallpaper.png}"
];
home.packages = [
pkgs.wl-clipboard
pkgs.jq
];
services.hyprpaper = {
enable = true;
settings = {
ipc = "off";
splash = false;
preload = [ "${./files/wallpaper.png}" ];
wallpaper = [
# Fill in by host-specific config!
# "Display,${./files/wallpaper.png}"
];
};
};
};
wayland.windowManager.hyprland = {
enable = true;
systemd.variables = [ "--all" ];
systemd.enable = true;
systemd.enableXdgAutostart = true;
xwayland.enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
plugins = [ ] ++ hyprland_plugins;
settings = {
"$mainMod" = "SUPER";
exec-once = [
"hyprpaper"
"ags"
"${wl-paste} --type text --watch cliphist store"
"${wl-paste} --type image --watch cliphist store"
"${pkgs.mate.mate-polkit}/bin/polkit-mate"
];
env = [
"WLR_NO_HARDWARE_CURSORS,1"
"TERMINAL,${alacritty}"
"WLR_RENDERER_ALLOW_SOFTWARE,1"
];
debug = { disable_logs = false; };
windowrulev2 = [
"float, title:^(rofi)(.*)$"
"center, title:^(rofi)(.*)$"
"noborder, title:^(rofi)(.*)$"
"stayfocused, title:^()$,class:^(steam)$"
"minsize 1 1, title:^()$,class:^(steam)$"
"stayfocused, title:^()$,class:^(steam)$"
];
layerrule = [ "noanim,ags_bar_0" "noanim,selection" ];
general = {
gaps_in = 1;
gaps_out = pkgs.lib.mkDefault 5;
border_size = 2;
"col.active_border" = "rgba(002f5fee)";
"col.inactive_border" = "rgba(ffffff00)";
layout = "dwindle";
};
input = {
kb_layout = "us";
follow_mouse = 1;
kb_options = pkgs.lib.mkDefault "compose:rctrl";
numlock_by_default = true;
};
binds = { scroll_event_delay = 1; };
xwayland = { force_zero_scaling = true; };
misc = { disable_hyprland_logo = 1; };
decoration = {
rounding = 1;
blur = { enabled = false; };
};
animations = {
enabled = "yes";
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [
"windows, 1, 2, myBezier"
"windowsOut, 1, 2, default, popin 80%"
"border, 1, 2, default"
"borderangle, 1, 2, default"
"fade, 1, 2, default"
"workspaces, 1, 1, default"
];
};
dwindle = {
preserve_split = "yes";
no_gaps_when_only = 1;
force_split = 2;
};
gestures = {
workspace_swipe = "on";
workspace_swipe_invert = false;
};
bindr = [
"$mainMod, SUPER_L, exec, pkill rofi || ${rofi} -show drun"
"$mainMod, SUPER_R, exec, pkill rofi || ${rofi} -show drun"
];
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
bind = [
"$mainMod, return, exec, ${launch_alacritty}/bin/launch_alacritty $(hyprctl activewindow -j | ${jq} .pid)"
"$mainMod SHIFT, return, exec, ${alacritty}"
"$mainMod, Q, killactive,"
"$mainMod, A, exec, ${nautilus}"
"$mainMod, S, exec, LC_TIME=\"en_GB.UTF-8\" ${gnome-calendar}"
"$mainMod, B, exec, MOZ_ENABLE_WAYLAND=1 firefox"
"$mainMod, M, fullscreen, 1"
"$mainMod, F11, fullscreen"
"$mainMod, F, togglefloating,"
"$mainMod, SPACE, togglesplit, # dwindle"
"CONTROL_L ALT_L, L, exec, ${swaylock}"
''
wayland.windowManager.hyprland = {
enable = true;
systemd.variables = [ "--all" ];
systemd.enable = true;
systemd.enableXdgAutostart = true;
xwayland.enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
plugins = [ ] ++ hyprland_plugins;
settings = {
"$mainMod" = "SUPER";
exec-once = [
"hyprpaper"
"ags"
"${wl-paste} --type text --watch cliphist store"
"${wl-paste} --type image --watch cliphist store"
"${pkgs.mate.mate-polkit}/bin/polkit-mate"
];
env = [
"WLR_NO_HARDWARE_CURSORS,1"
"TERMINAL,${alacritty}"
"WLR_RENDERER_ALLOW_SOFTWARE,1"
];
debug = { disable_logs = false; };
windowrulev2 = [
"float, title:^(rofi)(.*)$"
"center, title:^(rofi)(.*)$"
"noborder, title:^(rofi)(.*)$"
"stayfocused, title:^()$,class:^(steam)$"
"minsize 1 1, title:^()$,class:^(steam)$"
"stayfocused, title:^()$,class:^(steam)$"
];
layerrule = [ "noanim,ags_bar_0" "noanim,selection" ];
general = {
gaps_in = 1;
gaps_out = pkgs.lib.mkDefault 5;
border_size = 2;
"col.active_border" = "rgba(002f5fee)";
"col.inactive_border" = "rgba(ffffff00)";
layout = "dwindle";
};
input = {
kb_layout = "us";
follow_mouse = 1;
kb_options = pkgs.lib.mkDefault "compose:rctrl";
numlock_by_default = true;
};
binds = { scroll_event_delay = 1; };
xwayland = { force_zero_scaling = true; };
misc = { disable_hyprland_logo = 1; };
decoration = {
rounding = 1;
blur = { enabled = false; };
};
animations = {
enabled = "yes";
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [
"windows, 1, 2, myBezier"
"windowsOut, 1, 2, default, popin 80%"
"border, 1, 2, default"
"borderangle, 1, 2, default"
"fade, 1, 2, default"
"workspaces, 1, 1, default"
];
};
dwindle = {
preserve_split = "yes";
no_gaps_when_only = 1;
force_split = 2;
};
gestures = {
workspace_swipe = "on";
workspace_swipe_invert = false;
};
bindr = [
"$mainMod, SUPER_L, exec, pkill rofi || ${rofi} -show drun"
"$mainMod, SUPER_R, exec, pkill rofi || ${rofi} -show drun"
];
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
bind = [
"$mainMod, return, exec, ${launch_alacritty}/bin/launch_alacritty $(hyprctl activewindow -j | ${jq} .pid)"
"$mainMod SHIFT, return, exec, ${alacritty}"
"$mainMod, Q, killactive,"
"$mainMod, A, exec, ${nautilus}"
"$mainMod, S, exec, LC_TIME=\"en_GB.UTF-8\" ${gnome-calendar}"
"$mainMod, B, exec, MOZ_ENABLE_WAYLAND=1 firefox"
"$mainMod, M, fullscreen, 1"
"$mainMod, F11, fullscreen"
"$mainMod, F, togglefloating,"
"$mainMod, SPACE, togglesplit, # dwindle"
"CONTROL_L ALT_L, L, exec, ${swaylock}"
''
$mainMod, C, exec, cliphist list | awk '{print $0, "\0icon\x1fcom.github.davidmhewitt.clipped"; }' | ${rofi} -dmenu -display-columns 2 | cliphist decode | wl-copy''
"$mainMod, Y, exec, ${rofi-ykman}/bin/rofi-ykman"
"$mainMod, N, exec, ${./files/rofi-ssh.sh}"
"$mainMod, Y, exec, ${rofi-ykman}/bin/rofi-ykman"
"$mainMod, N, exec, ${./files/rofi-ssh.sh}"
"$mainMod, Escape, exec, ${rofi} -show power-menu -modi power-menu:${
./files/rofi-power-menu.sh
}"
"$mainMod, Escape, exec, ${rofi} -show power-menu -modi power-menu:${
./files/rofi-power-menu.sh
}"
",XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set +10%"
",XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 10%-"
",XF86AudioRaiseVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%+ --limit 1.0"
",XF86AudioLowerVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%-"
",XF86AudioMicMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
",mouse_right, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%+ --limit 1.0"
",mouse_left, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%-"
",XF86AudioMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioNext, exec, ${playerctl} next"
",XF86AudioPrev, exec, ${playerctl} previous"
"$mainMod,XF86AudioMute, exec, ${playerctl} play-pause"
"$mainMod,XF86AudioRaiseVolume, exec, ${playerctl} next"
"$mainMod,XF86AudioLowerVolume, exec, ${playerctl} previous"
'', Print, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp -d)" - | wl-copy''
",XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set +10%"
",XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 10%-"
",XF86AudioRaiseVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%+ --limit 1.0"
",XF86AudioLowerVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%-"
",XF86AudioMicMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
",mouse_right, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%+ --limit 1.0"
",mouse_left, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%-"
",XF86AudioMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioNext, exec, ${playerctl} next"
",XF86AudioPrev, exec, ${playerctl} previous"
"$mainMod,XF86AudioMute, exec, ${playerctl} play-pause"
"$mainMod,XF86AudioRaiseVolume, exec, ${playerctl} next"
"$mainMod,XF86AudioLowerVolume, exec, ${playerctl} previous"
'', Print, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp -d)" - | wl-copy''
"$mainMod, H, exec, ${./files/vim-hypr-nav.sh} l"
"$mainMod, L, exec, ${./files/vim-hypr-nav.sh} r"
"$mainMod, K, exec, ${./files/vim-hypr-nav.sh} u"
"$mainMod, J, exec, ${./files/vim-hypr-nav.sh} d"
"$mainMod CONTROL_L, H, swapwindow, l"
"$mainMod CONTROL_L, L, swapwindow, r"
"$mainMod CONTROL_L, K, swapwindow, u"
"$mainMod CONTROL_L, J, swapwindow, d"
"$mainMod SHIFT, H, movewindow, l"
"$mainMod SHIFT, L, movewindow, r"
"$mainMod SHIFT, K, movewindow, u"
"$mainMod SHIFT, J, movewindow, d"
"$mainMod ALT, L, resizeactive, 20 0"
"$mainMod ALT, H, resizeactive, -20 0"
"$mainMod ALT, K, resizeactive, 0 -20"
"$mainMod ALT, J, resizeactive, 0 20"
"$mainMod SHIFT, T, ${workspace_command_prefix}movetoworkspace, empty"
"$mainMod, T, ${workspace_command_prefix}workspace, empty"
"$mainMod, TAB, ${workspace_command_prefix}workspace, m+1"
"$mainMod SHIFT, TAB, ${workspace_command_prefix}workspace, m-1"
] ++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList
(x:
let
ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
in
[
"$mainMod, ${ws}, ${workspace_command_prefix}workspace, ${toString (x + 1)}"
"$mainMod SHIFT, ${ws}, ${workspace_command_prefix}movetoworkspace, ${toString (x + 1)}"
]) 10));
"$mainMod, H, exec, ${./files/vim-hypr-nav.sh} l"
"$mainMod, L, exec, ${./files/vim-hypr-nav.sh} r"
"$mainMod, K, exec, ${./files/vim-hypr-nav.sh} u"
"$mainMod, J, exec, ${./files/vim-hypr-nav.sh} d"
"$mainMod CONTROL_L, H, swapwindow, l"
"$mainMod CONTROL_L, L, swapwindow, r"
"$mainMod CONTROL_L, K, swapwindow, u"
"$mainMod CONTROL_L, J, swapwindow, d"
"$mainMod SHIFT, H, movewindow, l"
"$mainMod SHIFT, L, movewindow, r"
"$mainMod SHIFT, K, movewindow, u"
"$mainMod SHIFT, J, movewindow, d"
"$mainMod ALT, L, resizeactive, 20 0"
"$mainMod ALT, H, resizeactive, -20 0"
"$mainMod ALT, K, resizeactive, 0 -20"
"$mainMod ALT, J, resizeactive, 0 20"
"$mainMod SHIFT, T, ${workspace_command_prefix}movetoworkspace, empty"
"$mainMod, T, ${workspace_command_prefix}workspace, empty"
"$mainMod, TAB, ${workspace_command_prefix}workspace, m+1"
"$mainMod SHIFT, TAB, ${workspace_command_prefix}workspace, m-1"
] ++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList
(x:
let
ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
in
[
"$mainMod, ${ws}, ${workspace_command_prefix}workspace, ${toString (x + 1)}"
"$mainMod SHIFT, ${ws}, ${workspace_command_prefix}movetoworkspace, ${toString (x + 1)}"
]) 10));
};
};
};
}

View File

@ -1,42 +1,42 @@
{ config, pkgs, ... }:
{
programs.kitty = {
enable = true;
shellIntegration.enableZshIntegration = true;
font = {
name = "Iosevka Extended";
size = 15;
programs.kitty = {
enable = true;
shellIntegration.enableZshIntegration = true;
font = {
name = "Iosevka Extended";
size = 15;
};
settings = {
cursor_shape = "block";
cursor_beam_thickness = 10;
scrollback_lines = 100000;
};
settings = {
cursor_shape = "block";
cursor_beam_thickness = 10;
scrollback_lines = 100000;
# Theme
background = "#000010";
foreground = "#F8F8F2";
cursor = "#bbbbbb";
selection_background = "#b4d5ff";
color0 = "#121212";
color8 = "#545454";
color1 = "#fa2573";
color9 = "#f5669c";
color2 = "#97e123";
color10 = "#b0e05e";
color3 = "#dfd460";
color11 = "#fef26c";
color4 = "#0f7fcf";
color12 = "#00afff";
color5 = "#8700ff";
color13 = "#af87ff";
color6 = "#42a7cf";
color14 = "#50cdfe";
color7 = "#bbbbbb";
color15 = "#ffffff";
selection_foreground = "#121212";
background_opacity = "0.3";
# Theme
background = "#000010";
foreground = "#F8F8F2";
cursor = "#bbbbbb";
selection_background = "#b4d5ff";
color0 = "#121212";
color8 = "#545454";
color1 = "#fa2573";
color9 = "#f5669c";
color2 = "#97e123";
color10 = "#b0e05e";
color3 = "#dfd460";
color11 = "#fef26c";
color4 = "#0f7fcf";
color12 = "#00afff";
color5 = "#8700ff";
color13 = "#af87ff";
color6 = "#42a7cf";
color14 = "#50cdfe";
color7 = "#bbbbbb";
color15 = "#ffffff";
selection_foreground = "#121212";
background_opacity = "0.3";
};
};
};
}

View File

@ -1,47 +1,47 @@
{ config, pkgs, ... }:
{
home.file."${config.xdg.configHome}/lf" = {
source = ./files;
recursive = true;
};
programs.lf = {
enable = true;
settings = {
icons = true;
autoquit = true;
mouse = true;
number = true;
relativenumber = true;
cursorpreviewfmt = "";
previewer = toString (pkgs.writeShellScript "script" ''
home.file."${config.xdg.configHome}/lf" = {
source = ./files;
recursive = true;
};
programs.lf = {
enable = true;
settings = {
icons = true;
autoquit = true;
mouse = true;
number = true;
relativenumber = true;
cursorpreviewfmt = "";
previewer = toString (pkgs.writeShellScript "script" ''
case "''$1" in
*.tar*) tar tf "''$1";;
*.zip) unzip -l "''$1";;
*.rar) unrar l "''$1";;
*.7z) 7z l "''$1";;
*.pdf) ${pkgs.poppler_utils}/bin/pdftotext "''$1" -;;
*) ${pkgs.highlight}/bin/highlight -O ansi "''$1";;
*.tar*) tar tf "''$1";;
*.zip) unzip -l "''$1";;
*.rar) unrar l "''$1";;
*.7z) 7z l "''$1";;
*.pdf) ${pkgs.poppler_utils}/bin/pdftotext "''$1" -;;
*) ${pkgs.highlight}/bin/highlight -O ansi "''$1";;
esac
'');
};
keybindings = {
"<backspace2>" = "quit";
"<c-e>" = "half-up";
"." = "set hidden!";
"o" = ''$nvim -c "lua require(\"oil\").open(\"$PWD\")"'';
"-" = ''$nvim -c "lua require(\"oil\").open(\"$PWD\")"'';
"<enter>" = "open";
"<c-t>" = ":jump <enter>";
};
commands = {
jump = ''
''${{
'');
};
keybindings = {
"<backspace2>" = "quit";
"<c-e>" = "half-up";
"." = "set hidden!";
"o" = ''$nvim -c "lua require(\"oil\").open(\"$PWD\")"'';
"-" = ''$nvim -c "lua require(\"oil\").open(\"$PWD\")"'';
"<enter>" = "open";
"<c-t>" = ":jump <enter>";
};
commands = {
jump = ''
''${{
res=$(zsh -c "source ${../zsh/files/functions.zsh} && find_global d")
lf -remote "send $id cd \"$res\""
}}
'';
'';
};
cmdKeybindings = { q = "quit"; };
};
cmdKeybindings = { q = "quit"; };
};
}

View File

@ -1,9 +1,9 @@
{ config, pkgs, ... }:
{
home.file."${config.xdg.configHome}/mpv" = {
source = ./files;
recursive = true;
};
programs.mpv = { enable = true; };
home.file."${config.xdg.configHome}/mpv" = {
source = ./files;
recursive = true;
};
programs.mpv = { enable = true; };
}

View File

@ -1,51 +1,51 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
nixd
clang-tools
llvmPackages.libcxxClang
go
nodejs
luarocks
jre
python3
python311Packages.pip
unzip
dotnet-sdk_8
cargo
neovim-unwrapped
tree-sitter
home.packages = with pkgs; [
nixd
clang-tools
llvmPackages.libcxxClang
go
nodejs
luarocks
jre
python3
python311Packages.pip
unzip
dotnet-sdk_8
cargo
neovim-unwrapped
tree-sitter
# LSPs
texlab
ltex-ls
basedpyright
cmake-language-server
vscode-langservers-extracted
yaml-language-server
bash-language-server
nodePackages.vue-language-server
docker-compose-language-service
dockerfile-language-server-nodejs
vim-language-server
lua-language-server
rust-analyzer
gopls
deno
jdt-language-server
emmet-ls
ruff-lsp
csharp-ls
typst-lsp
];
# LSPs
texlab
ltex-ls
basedpyright
cmake-language-server
vscode-langservers-extracted
yaml-language-server
bash-language-server
nodePackages.vue-language-server
docker-compose-language-service
dockerfile-language-server-nodejs
vim-language-server
lua-language-server
rust-analyzer
gopls
deno
jdt-language-server
emmet-ls
ruff-lsp
csharp-ls
typst-lsp
];
home.file."${config.xdg.configHome}/nvim" = {
source = ./files;
recursive = true;
};
home.file."${config.xdg.configHome}/nvim" = {
source = ./files;
recursive = true;
};
home.file.".clang-tidy".text = ''
home.file.".clang-tidy".text = ''
Checks: "*,
-abseil-*,
-altera-*,
@ -77,8 +77,8 @@
WarningsAsErrors: '''
HeaderFilterRegex: '''
FormatStyle: none
'';
home.sessionVariables = {
EDITOR = "nvim";
};
'';
home.sessionVariables = {
EDITOR = "nvim";
};
}

View File

@ -1,127 +1,127 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [ papirus-icon-theme ];
home.packages = with pkgs; [ papirus-icon-theme ];
programs.rofi = {
enable = true;
font = "SF Pro Rounded 13";
extraConfig = {
show-icons = true;
icon-theme = "Papirus";
kb-cancel = "Super_L+XF86Launch5,Escape";
combi-hide-mode-prefix = true;
programs.rofi = {
enable = true;
font = "SF Pro Rounded 13";
extraConfig = {
show-icons = true;
icon-theme = "Papirus";
kb-cancel = "Super_L+XF86Launch5,Escape";
combi-hide-mode-prefix = true;
};
theme =
let inherit (config.lib.formats.rasi) mkLiteral;
in {
"*" = {
background = mkLiteral "#0f111a";
foreground = mkLiteral "#f1f1f1";
selected = mkLiteral "#0033a1";
selected-text = mkLiteral "#ffffff";
};
"window" = {
transparency = "real";
background-color = mkLiteral "@background";
text-color = mkLiteral "@foreground";
width = mkLiteral "800px";
border-radius = mkLiteral "5px";
};
"textbox-prompt-colon" = {
expand = mkLiteral "false";
background-color = mkLiteral "@background";
padding = mkLiteral "4px 0px 0px 6px";
};
"inputbar" = {
children = mkLiteral "[ textbox-prompt-colon, entry ]";
background-color = mkLiteral "@background";
text-color = mkLiteral "@foreground";
expand = mkLiteral "false";
border = mkLiteral "0px 0px 0px 0px";
border-radius = mkLiteral "0px";
border-color = mkLiteral "@selected";
margin = mkLiteral "0px 0px 0px 0px";
padding = mkLiteral "0px 0px 4px 0px";
position = mkLiteral "center";
};
"entry" = {
background-color = mkLiteral "@background";
text-color = mkLiteral "@foreground";
placeholder-color = mkLiteral "@foreground";
expand = mkLiteral "true";
horizontal-align = mkLiteral "0";
blink = mkLiteral "true";
padding = mkLiteral "4px 0px 0px 4px";
font = "SF Pro Rounded 25";
};
"case-indicator" = {
background-color = mkLiteral "@background";
text-color = mkLiteral "@foreground";
spacing = mkLiteral "0";
};
"listview" = {
background-color = mkLiteral "@background";
columns = mkLiteral "1";
spacing = mkLiteral "5px";
cycle = mkLiteral "true";
dynamic = mkLiteral "true";
layout = mkLiteral "vertical";
fixed-height = "true";
lines = mkLiteral "5";
};
"mainbox" = {
background-color = mkLiteral "@background";
children = mkLiteral "[ inputbar, message, listview ]";
spacing = mkLiteral "20px";
padding = mkLiteral "20px 15px 15px 15px";
};
"message" = {
children = mkLiteral "[ textbox ]";
border-radius = mkLiteral "5px";
};
"textbox" = {
background-color = mkLiteral "@selected";
text-color = mkLiteral "@foreground";
padding = mkLiteral "20px 6px 20px 80px";
};
"element" = {
background-color = mkLiteral "@background";
text-color = mkLiteral "@foreground";
orientation = mkLiteral "horizontal";
border-radius = mkLiteral "4px";
padding = mkLiteral "2px 2px 2px 2px";
};
"element-text, element-icon" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
};
"element-icon" = {
size = mkLiteral "40px";
border = mkLiteral "10px";
};
"element-text" = { padding = mkLiteral "20px 0px 0px 10px"; };
"element selected" = {
background-color = mkLiteral "@selected";
text-color = mkLiteral "@selected-text";
border = mkLiteral "0px";
border-radius = mkLiteral "3px";
border-color = mkLiteral "@selected";
};
};
};
theme =
let inherit (config.lib.formats.rasi) mkLiteral;
in {
"*" = {
background = mkLiteral "#0f111a";
foreground = mkLiteral "#f1f1f1";
selected = mkLiteral "#0033a1";
selected-text = mkLiteral "#ffffff";
};
"window" = {
transparency = "real";
background-color = mkLiteral "@background";
text-color = mkLiteral "@foreground";
width = mkLiteral "800px";
border-radius = mkLiteral "5px";
};
"textbox-prompt-colon" = {
expand = mkLiteral "false";
background-color = mkLiteral "@background";
padding = mkLiteral "4px 0px 0px 6px";
};
"inputbar" = {
children = mkLiteral "[ textbox-prompt-colon, entry ]";
background-color = mkLiteral "@background";
text-color = mkLiteral "@foreground";
expand = mkLiteral "false";
border = mkLiteral "0px 0px 0px 0px";
border-radius = mkLiteral "0px";
border-color = mkLiteral "@selected";
margin = mkLiteral "0px 0px 0px 0px";
padding = mkLiteral "0px 0px 4px 0px";
position = mkLiteral "center";
};
"entry" = {
background-color = mkLiteral "@background";
text-color = mkLiteral "@foreground";
placeholder-color = mkLiteral "@foreground";
expand = mkLiteral "true";
horizontal-align = mkLiteral "0";
blink = mkLiteral "true";
padding = mkLiteral "4px 0px 0px 4px";
font = "SF Pro Rounded 25";
};
"case-indicator" = {
background-color = mkLiteral "@background";
text-color = mkLiteral "@foreground";
spacing = mkLiteral "0";
};
"listview" = {
background-color = mkLiteral "@background";
columns = mkLiteral "1";
spacing = mkLiteral "5px";
cycle = mkLiteral "true";
dynamic = mkLiteral "true";
layout = mkLiteral "vertical";
fixed-height = "true";
lines = mkLiteral "5";
};
"mainbox" = {
background-color = mkLiteral "@background";
children = mkLiteral "[ inputbar, message, listview ]";
spacing = mkLiteral "20px";
padding = mkLiteral "20px 15px 15px 15px";
};
"message" = {
children = mkLiteral "[ textbox ]";
border-radius = mkLiteral "5px";
};
"textbox" = {
background-color = mkLiteral "@selected";
text-color = mkLiteral "@foreground";
padding = mkLiteral "20px 6px 20px 80px";
};
"element" = {
background-color = mkLiteral "@background";
text-color = mkLiteral "@foreground";
orientation = mkLiteral "horizontal";
border-radius = mkLiteral "4px";
padding = mkLiteral "2px 2px 2px 2px";
};
"element-text, element-icon" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
};
"element-icon" = {
size = mkLiteral "40px";
border = mkLiteral "10px";
};
"element-text" = { padding = mkLiteral "20px 0px 0px 10px"; };
"element selected" = {
background-color = mkLiteral "@selected";
text-color = mkLiteral "@selected-text";
border = mkLiteral "0px";
border-radius = mkLiteral "3px";
border-color = mkLiteral "@selected";
};
};
};
}

View File

@ -1,83 +1,83 @@
{ inputs, config, pkgs, ... }:
{
programs.ssh = {
enable = true;
includes = [ "gpulab_hosts_config" ];
matchBlocks = {
"*" = {
host = "*";
};
mallorea = {
host = "mallorea";
hostname = "server.thomasave.be";
port = 22;
user = "server";
forwardAgent = true;
};
Mallorea = {
host = "Mallorea";
hostname = "server.thomasave.be";
port = 22;
user = "server";
forwardAgent = true;
};
Kell = {
host = "Kell";
hostname = "kell.thomasave.be";
port = 22;
user = "user";
forwardAgent = true;
};
kell = {
host = "kell";
hostname = "kell.thomasave.be";
port = 22;
user = "user";
forwardAgent = true;
};
Riva = {
host = "Riva";
hostname = "riva.thomasave.be";
port = 22;
user = "user";
forwardAgent = true;
};
riva = {
host = "riva";
hostname = "riva.thomasave.be";
port = 22;
user = "user";
forwardAgent = true;
};
Arch = {
host = "Arch";
hostname = "arch.thomasave.be";
port = 22;
user = "user";
forwardAgent = true;
};
arch = {
host = "arch";
hostname = "arch.thomasave.be";
port = 22;
user = "user";
forwardAgent = true;
};
Vault = {
host = "Vault";
hostname = "etienne.thomasave.be";
port = 22;
user = "server";
forwardAgent = true;
};
vault = {
host = "vault";
hostname = "etienne.thomasave.be";
port = 22;
user = "server";
forwardAgent = true;
};
programs.ssh = {
enable = true;
includes = [ "gpulab_hosts_config" ];
matchBlocks = {
"*" = {
host = "*";
};
mallorea = {
host = "mallorea";
hostname = "server.thomasave.be";
port = 22;
user = "server";
forwardAgent = true;
};
Mallorea = {
host = "Mallorea";
hostname = "server.thomasave.be";
port = 22;
user = "server";
forwardAgent = true;
};
Kell = {
host = "Kell";
hostname = "kell.thomasave.be";
port = 22;
user = "user";
forwardAgent = true;
};
kell = {
host = "kell";
hostname = "kell.thomasave.be";
port = 22;
user = "user";
forwardAgent = true;
};
Riva = {
host = "Riva";
hostname = "riva.thomasave.be";
port = 22;
user = "user";
forwardAgent = true;
};
riva = {
host = "riva";
hostname = "riva.thomasave.be";
port = 22;
user = "user";
forwardAgent = true;
};
Arch = {
host = "Arch";
hostname = "arch.thomasave.be";
port = 22;
user = "user";
forwardAgent = true;
};
arch = {
host = "arch";
hostname = "arch.thomasave.be";
port = 22;
user = "user";
forwardAgent = true;
};
Vault = {
host = "Vault";
hostname = "etienne.thomasave.be";
port = 22;
user = "server";
forwardAgent = true;
};
vault = {
host = "vault";
hostname = "etienne.thomasave.be";
port = 22;
user = "server";
forwardAgent = true;
};
};
};
};
}

View File

@ -1,47 +1,47 @@
{ inputs, config, pkgs, ... }:
let
tmux-themepack = pkgs.tmuxPlugins.mkTmuxPlugin {
pluginName = "tmux-themepack";
rtpFilePath = "themepack.tmux";
version = "unstable-2019-12-22";
src = pkgs.fetchFromGitHub {
owner = "jimeh";
repo = "tmux-themepack";
rev = "7c59902f64dcd7ea356e891274b21144d1ea5948";
sha256 = "sha256-c5EGBrKcrqHWTKpCEhxYfxPeERFrbTuDfcQhsUAbic4=";
tmux-themepack = pkgs.tmuxPlugins.mkTmuxPlugin {
pluginName = "tmux-themepack";
rtpFilePath = "themepack.tmux";
version = "unstable-2019-12-22";
src = pkgs.fetchFromGitHub {
owner = "jimeh";
repo = "tmux-themepack";
rev = "7c59902f64dcd7ea356e891274b21144d1ea5948";
sha256 = "sha256-c5EGBrKcrqHWTKpCEhxYfxPeERFrbTuDfcQhsUAbic4=";
};
};
};
in
{
programs.tmux = {
shell = "${pkgs.zsh}/bin/zsh";
terminal = "screen-256color";
enable = true;
clock24 = true;
shortcut = "a";
escapeTime = 0;
newSession = true;
mouse = true;
keyMode = "vi";
plugins = [
pkgs.tmuxPlugins.vim-tmux-navigator
pkgs.tmuxPlugins.better-mouse-mode
pkgs.tmuxPlugins.yank
{
plugin = tmux-themepack;
extraConfig = ''
{
programs.tmux = {
shell = "${pkgs.zsh}/bin/zsh";
terminal = "screen-256color";
enable = true;
clock24 = true;
shortcut = "a";
escapeTime = 0;
newSession = true;
mouse = true;
keyMode = "vi";
plugins = [
pkgs.tmuxPlugins.vim-tmux-navigator
pkgs.tmuxPlugins.better-mouse-mode
pkgs.tmuxPlugins.yank
{
plugin = tmux-themepack;
extraConfig = ''
set -g @themepack "powerline/double/blue"
set-window-option -g status-left " #S "
set-window-option -g status-right " #{prefix_highlight} \"#(hostname)\" %H:%M %d-%b-%y "
set-window-option -g window-status-format " #I: #W "
set-window-option -g window-status-current-format " #I: #W "
'';
'';
}
];
extraConfig = ''
}
];
extraConfig = ''
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
@ -53,6 +53,6 @@ in
unbind %
set-option -g xterm-keys on
'';
};
'';
};
}

View File

@ -1,43 +1,43 @@
{ inputs, config, pkgs, ... }:
{
imports = [
(import ../zsh { inherit inputs config pkgs; })
../git
../nvim
../email
../lf
../tmux
../yazi
];
imports = [
(import ../zsh { inherit inputs config pkgs; })
../git
../nvim
../email
../lf
../tmux
../yazi
];
home.stateVersion = "24.11";
targets.genericLinux.enable = true;
nixpkgs.config.allowUnfree = true;
programs.home-manager.enable = true;
home.packages = with pkgs; [ htop waypipe ];
home.stateVersion = "24.11";
targets.genericLinux.enable = true;
nixpkgs.config.allowUnfree = true;
programs.home-manager.enable = true;
home.packages = with pkgs; [ htop waypipe ];
home.sessionVariables = {
XDG_CONFIG_HOME = "${config.xdg.configHome}";
XDG_CACHE_HOME = "${config.xdg.cacheHome}";
XDG_DATA_HOME = "${config.xdg.dataHome}";
XDG_STATE_HOME = "${config.xdg.stateHome}";
home.sessionVariables = {
XDG_CONFIG_HOME = "${config.xdg.configHome}";
XDG_CACHE_HOME = "${config.xdg.cacheHome}";
XDG_DATA_HOME = "${config.xdg.dataHome}";
XDG_STATE_HOME = "${config.xdg.stateHome}";
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
DOCKER_CONFIG = "${config.xdg.configHome}/docker";
LESSHISTFILE = "${config.xdg.cacheHome}/less/history";
PARALLEL_HOME = "${config.xdg.configHome}/parallel";
PYTHONSTARTUP = "${config.xdg.configHome}/python/pythonrc";
SQLITE_HISTORY = "${config.xdg.cacheHome}/sqlite_history";
WINEPREFIX = "${config.xdg.dataHome}/wine";
XDG_CURRENT_DESKTOP = "GNOME";
OPENCV_LOG_LEVEL = "ERROR";
COLORTERM = "truecolor";
};
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
DOCKER_CONFIG = "${config.xdg.configHome}/docker";
LESSHISTFILE = "${config.xdg.cacheHome}/less/history";
PARALLEL_HOME = "${config.xdg.configHome}/parallel";
PYTHONSTARTUP = "${config.xdg.configHome}/python/pythonrc";
SQLITE_HISTORY = "${config.xdg.cacheHome}/sqlite_history";
WINEPREFIX = "${config.xdg.dataHome}/wine";
XDG_CURRENT_DESKTOP = "GNOME";
OPENCV_LOG_LEVEL = "ERROR";
COLORTERM = "truecolor";
};
home.file.".latexmkrc".text = ''
home.file.".latexmkrc".text = ''
$pdf_mode = 1;
$pdf_previewer = 'evince %O %S';
'';
'';
}

View File

@ -1,18 +1,18 @@
{ pkgs }:
{
when = "*-*-* *:00:00";
script = toString (pkgs.writeShellScript "script" ''
when = "*-*-* *:00:00";
script = toString (pkgs.writeShellScript "script" ''
REPORT_EMAIL=email@thomasave.be
ZPOOL_STATUS=$(zpool status -x)
if [ "$ZPOOL_STATUS" = "all pools are healthy" ] || [ "$ZPOOL_STATUS" = "no pools available" ]
then
printf 0 > /var/db/zpool.status
printf 0 > /var/db/zpool.status
else
if [ "$(cat /var/db/zpool.status)" -eq 0 ]
then
zpool status | mail -s "ZPOOL NOT HEALTHY" $REPORT_EMAIL
printf 1 > /var/db/zpool.status
fi
if [ "$(cat /var/db/zpool.status)" -eq 0 ]
then
zpool status | mail -s "ZPOOL NOT HEALTHY" $REPORT_EMAIL
printf 1 > /var/db/zpool.status
fi
'');
fi
'');
}

View File

@ -1,9 +1,9 @@
{ pkgs, scripts }:
let
notify_script = (pkgs.writers.writePython3Bin "telegram-notify.py"
{
libraries = [ pkgs.python3Packages.python-telegram-bot ];
} ''
notify_script = (pkgs.writers.writePython3Bin "telegram-notify.py"
{
libraries = [ pkgs.python3Packages.python-telegram-bot ];
} ''
import telegram
import asyncio
import sys
@ -52,31 +52,31 @@ let
loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.wait([loop.create_task(run())]))
loop.close()
'');
'');
mkTimer = name: cfg: {
Install.WantedBy = [ "timers.target" ];
Timer = {
Persistent = true;
OnCalendar = cfg.when;
Unit = "${name}.service";
mkTimer = name: cfg: {
Install.WantedBy = [ "timers.target" ];
Timer = {
Persistent = true;
OnCalendar = cfg.when;
Unit = "${name}.service";
};
};
mkService = name: cfg: {
Unit.Description = name;
Unit.OnFailure = "status_notify@${name}.service";
# Install = { WantedBy = [ "default.target" ]; };
Service = { ExecStart = cfg.script; };
};
};
mkService = name: cfg: {
Unit.Description = name;
Unit.OnFailure = "status_notify@${name}.service";
# Install = { WantedBy = [ "default.target" ]; };
Service = { ExecStart = cfg.script; };
};
in
{
systemd.user.services = pkgs.lib.mapAttrs mkService scripts
// (pkgs.lib.mapAttrs mkService {
"status_notify@" = {
script = "${notify_script}/bin/telegram-notify.py %i";
};
});
systemd.user.timers = pkgs.lib.mapAttrs mkTimer scripts;
# Don't forget to enable these timers! Or reboot, after which it should also be activated automatically
# systemctl --user enable --now <script>.timer
{
systemd.user.services = pkgs.lib.mapAttrs mkService scripts
// (pkgs.lib.mapAttrs mkService {
"status_notify@" = {
script = "${notify_script}/bin/telegram-notify.py %i";
};
});
systemd.user.timers = pkgs.lib.mapAttrs mkTimer scripts;
# Don't forget to enable these timers! Or reboot, after which it should also be activated automatically
# systemctl --user enable --now <script>.timer
}

View File

@ -1,91 +1,91 @@
{ inputs, pkgs, ... }:
{
programs.waybar = {
enable = true;
package = inputs.waybar.packages.${pkgs.system}.waybar;
settings = {
mainBar = {
layer = "top";
height = pkgs.lib.mkDefault 35;
spacing = 4;
# output = "DP-2"; # Fill in with host-specific config!
modules-left = [ "wlr/taskbar" ];
modules-center = [ "hyprland/workspaces" ];
modules-right = [
"tray"
"wireplumber"
"battery"
"cpu#cpu2"
"cpu"
"memory"
"custom/temperature"
"clock"
"clock#clock2"
];
"wlr/taskbar" = {
on-click = "activate";
on-click-right = "close";
format = "{icon} {title:.20}";
all-outputs = true;
programs.waybar = {
enable = true;
package = inputs.waybar.packages.${pkgs.system}.waybar;
settings = {
mainBar = {
layer = "top";
height = pkgs.lib.mkDefault 35;
spacing = 4;
# output = "DP-2"; # Fill in with host-specific config!
modules-left = [ "wlr/taskbar" ];
modules-center = [ "hyprland/workspaces" ];
modules-right = [
"tray"
"wireplumber"
"battery"
"cpu#cpu2"
"cpu"
"memory"
"custom/temperature"
"clock"
"clock#clock2"
];
"wlr/taskbar" = {
on-click = "activate";
on-click-right = "close";
format = "{icon} {title:.20}";
all-outputs = true;
};
"wireplumber" = {
format = "{icon} {volume}%";
format-muted = "";
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
format-icons = [ "" "" "" ];
};
"hyprland/workspaces" = {
disable-scroll = true;
all-outputs = true;
warp-on-scroll = false;
format = "{name}";
};
"hyprland/window" = { max-length = 50; };
tray = { spacing = 10; };
"clock#clock2" = {
timezone = "Europe/Brussels";
format = "{:%H:%M:%S}";
interval = 1;
};
clock = {
timezone = "Europe/Brussels";
format = "{:%Y-%m-%d}";
interval = 3600;
};
cpu = {
format = "{max_frequency}GHz";
tooltip = false;
interval = 5;
};
"cpu#cpu2" = {
format = "CPU {usage}%";
tooltip = false;
interval = 5;
};
memory = {
interval = 5;
format = "{used:0.2f}G";
};
"custom/temperature" = {
interval = 5;
exec = pkgs.lib.mkDefault "echo TODO";
};
battery = {
states = {
warning = 30;
critical = 15;
};
format = "{icon}";
tooltip-format = "{capacity}% ({time})";
format-icons = [ " " " " " " " " " " ];
format-charging = "{capacity}% ";
format-full = "{capacity}% ";
format-alt = "{capacity}% {time} [{power:.2} W]";
};
};
};
"wireplumber" = {
format = "{icon} {volume}%";
format-muted = "";
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
format-icons = [ "" "" "" ];
};
"hyprland/workspaces" = {
disable-scroll = true;
all-outputs = true;
warp-on-scroll = false;
format = "{name}";
};
"hyprland/window" = { max-length = 50; };
tray = { spacing = 10; };
"clock#clock2" = {
timezone = "Europe/Brussels";
format = "{:%H:%M:%S}";
interval = 1;
};
clock = {
timezone = "Europe/Brussels";
format = "{:%Y-%m-%d}";
interval = 3600;
};
cpu = {
format = "{max_frequency}GHz";
tooltip = false;
interval = 5;
};
"cpu#cpu2" = {
format = "CPU {usage}%";
tooltip = false;
interval = 5;
};
memory = {
interval = 5;
format = "{used:0.2f}G";
};
"custom/temperature" = {
interval = 5;
exec = pkgs.lib.mkDefault "echo TODO";
};
battery = {
states = {
warning = 30;
critical = 15;
};
format = "{icon}";
tooltip-format = "{capacity}% ({time})";
format-icons = [ " " " " " " " " " " ];
format-charging = "{capacity}% ";
format-full = "{capacity}% ";
format-alt = "{capacity}% {time} [{power:.2} W]";
};
};
};
style = ''
style = ''
* {
/* `otf-font-awesome` is required to be installed for icons */
font-size: 14px;
@ -227,6 +227,6 @@
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
'';
};
'';
};
}

View File

@ -1,44 +1,44 @@
{ config, inputs, pkgs, ... }:
{
home.packages = [
pkgs.fzy
pkgs.lf
pkgs.curl
pkgs.fd
pkgs.zsh-powerlevel10k
pkgs.zsh-autocomplete
pkgs.zsh-vi-mode
pkgs.ripgrep
pkgs.rsync
pkgs.moreutils
inputs.fzgo.packages.${pkgs.system}.default
];
home.sessionVariables = {
BROWSER = "firefox";
PDF_VIEWER = "evince";
GPULAB_CERT = "${config.xdg.configHome}/../.secrets/GPULab/certificate.pem";
GPULAB_DEV = "False";
GCC_COLORS =
"error = '01;31:warning = '01;35:note = '01;36:caret = '01;32:locus = '01:quote = '01'";
ARCHFLAGS = "-arch x86_64";
TERM = "screen-256color";
PYTHONDONTWRITEBYTECODE = "1";
GOPATH = "${config.xdg.dataHome}/go";
DIRENV_LOG_FORMAT = "";
OPENER = "${pkgs.handlr-regex}/bin/handlr open";
};
programs.direnv = {
enable = true;
nix-direnv.enable = true;
config = {
global = {
hiden_env_diff = true;
warn_timeout = 0;
home.packages = [
pkgs.fzy
pkgs.lf
pkgs.curl
pkgs.fd
pkgs.zsh-powerlevel10k
pkgs.zsh-autocomplete
pkgs.zsh-vi-mode
pkgs.ripgrep
pkgs.rsync
pkgs.moreutils
inputs.fzgo.packages.${pkgs.system}.default
];
home.sessionVariables = {
BROWSER = "firefox";
PDF_VIEWER = "evince";
GPULAB_CERT = "${config.xdg.configHome}/../.secrets/GPULab/certificate.pem";
GPULAB_DEV = "False";
GCC_COLORS =
"error = '01;31:warning = '01;35:note = '01;36:caret = '01;32:locus = '01:quote = '01'";
ARCHFLAGS = "-arch x86_64";
TERM = "screen-256color";
PYTHONDONTWRITEBYTECODE = "1";
GOPATH = "${config.xdg.dataHome}/go";
DIRENV_LOG_FORMAT = "";
OPENER = "${pkgs.handlr-regex}/bin/handlr open";
};
programs.direnv = {
enable = true;
nix-direnv.enable = true;
config = {
global = {
hiden_env_diff = true;
warn_timeout = 0;
};
};
};
};
home.file."${config.xdg.configHome}/direnv/direnvrc".text = ''
home.file."${config.xdg.configHome}/direnv/direnvrc".text = ''
: "''${XDG_CACHE_HOME:="''${HOME}/.cache"}"
declare -A direnv_layout_dirs
direnv_layout_dir() {
@ -49,26 +49,26 @@
echo "''${XDG_CACHE_HOME}/direnv/layouts/''${hash}''${path}"
)}"
}
'';
programs.command-not-found.enable = true;
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
programs.fzf = { enable = true; };
programs.zsh = {
enable = true;
enableCompletion = true;
syntaxHighlighting.enable = false;
autosuggestion.enable = true;
'';
programs.command-not-found.enable = true;
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
programs.fzf = { enable = true; };
programs.zsh = {
enable = true;
enableCompletion = true;
syntaxHighlighting.enable = false;
autosuggestion.enable = true;
initExtra = ''
initExtra = ''
LOCAL_SEARCH_DIRS=(~/.dotfiles/)
REMOTE_SEARCH_DIRS=(~/Workspace/ /home/server/Storage/Shared/ /home/server/Storage/Thomas/)
export LD_LIBRARY_PATH=${pkgs.sqlite.out}/lib:$LD_LIBRARY_PATH
'';
'';
initExtraFirst = ''
initExtraFirst = ''
ZVM_VI_INSERT_ESCAPE_BINDKEY=jj
source ${./files/waypipe.zsh}
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
@ -90,42 +90,42 @@
NIXPKGS_ALLOW_UNFREE=1 nix run --impure "nixpkgs#$1" -- "''${@:2}"
}
function o() {
${pkgs.handlr-regex}/bin/handlr open $@ < /dev/null &> /dev/null & disown
${pkgs.handlr-regex}/bin/handlr open $@ < /dev/null &> /dev/null & disown
}
'';
'';
shellAliases = {
mallorea = "run_waypipe mallorea";
vault = "run_waypipe vault";
riva = "run_waypipe riva";
kell = "run_waypipe kell";
aloria = "run_waypipe aloria";
arch = "run_waypipe arch";
shellAliases = {
mallorea = "run_waypipe mallorea";
vault = "run_waypipe vault";
riva = "run_waypipe riva";
kell = "run_waypipe kell";
aloria = "run_waypipe aloria";
arch = "run_waypipe arch";
ll = "ls -lhat";
ls = "ls --color=auto";
lf = ''cd "$(${pkgs.lf}/bin/lf -print-last-dir)"'';
ll = "ls -lhat";
ls = "ls --color=auto";
lf = ''cd "$(${pkgs.lf}/bin/lf -print-last-dir)"'';
compress = "tar --use-compress-program = lbzip2 -cvf";
wget = ''wget --hsts-file = "$XDG_DATA_HOME/wget-hsts"'';
python = "python3";
vim = "nvim";
v = ''
compress = "tar --use-compress-program = lbzip2 -cvf";
wget = ''wget --hsts-file = "$XDG_DATA_HOME/wget-hsts"'';
python = "python3";
vim = "nvim";
v = ''
nvim -c ':lua require("oil").open()' && cd "$(cat /tmp/oil_dir 2> /dev/null || pwd)"'';
cpr =
"rsync --archive -hh --partial --info = stats1,progress2 --modify-window = 1";
mvr =
"rsync --archive -hh --partial --info = stats1,progress2 --modify-window = 1 --remove-source-files";
rg =
"rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
ag =
"rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
push = ''git add -A && git commit -m "`date`" && git push'';
reset = "tput reset";
cpr =
"rsync --archive -hh --partial --info = stats1,progress2 --modify-window = 1";
mvr =
"rsync --archive -hh --partial --info = stats1,progress2 --modify-window = 1 --remove-source-files";
rg =
"rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
ag =
"rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
push = ''git add -A && git commit -m "`date`" && git push'';
reset = "tput reset";
};
history.size = 10000000;
history.save = 10000000;
history.path = "${config.xdg.dataHome}/zsh/history";
autocd = true;
};
history.size = 10000000;
history.save = 10000000;
history.path = "${config.xdg.dataHome}/zsh/history";
autocd = true;
};
}

View File

@ -1,61 +1,61 @@
{ pkgs, inputs, config, ... }:
{
imports = [
(import ../Common/default.nix { inherit inputs pkgs config; })
(import ../Common/nvidia.nix { inherit inputs pkgs config; })
(import ../Common/desktop.nix { inherit inputs pkgs config; })
];
hardware.graphics.extraPackages = [
pkgs.intel-compute-runtime
pkgs.intel-media-driver
];
imports = [
(import ../Common/default.nix { inherit inputs pkgs config; })
(import ../Common/nvidia.nix { inherit inputs pkgs config; })
(import ../Common/desktop.nix { inherit inputs pkgs config; })
];
hardware.graphics.extraPackages = [
pkgs.intel-compute-runtime
pkgs.intel-media-driver
];
zramSwap.enable = true;
services.logind.extraConfig = ''HandlePowerKey=ignore'';
# services.ollama = {
# enable = true;
# };
zramSwap.enable = true;
services.logind.extraConfig = ''HandlePowerKey=ignore'';
# services.ollama = {
# enable = true;
# };
networking.wg-quick.interfaces = {
Tunnel = {
address = [ "10.0.0.5/24" "2a02:a03f:83ad:2101::5/128" ];
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
listenPort = 51820;
autostart = true;
postUp = "resolvectl dns Tunnel 10.0.0.1; resolvectl domain Tunnel ~thomasave.be;";
dns = ["10.0.0.1"];
peers = [{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "0.0.0.0/0" "::/0" ];
endpoint = "h.thomasave.be:13231";
persistentKeepalive = 25;
}];
networking.wg-quick.interfaces = {
Tunnel = {
address = [ "10.0.0.5/24" "2a02:a03f:83ad:2101::5/128" ];
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
listenPort = 51820;
autostart = true;
postUp = "resolvectl dns Tunnel 10.0.0.1; resolvectl domain Tunnel ~thomasave.be;";
dns = ["10.0.0.1"];
peers = [{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "0.0.0.0/0" "::/0" ];
endpoint = "h.thomasave.be:13231";
persistentKeepalive = 25;
}];
};
OPNsense = {
address = [ "10.0.0.5/24" "2a02:a03f:83ad:2101::5/128" ];
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
listenPort = 51820;
autostart = false;
postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;";
dns = ["10.0.0.1"];
peers = [{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "10.0.0.1/8" "192.168.1.2/32" ];
endpoint = "h.thomasave.be:13231";
persistentKeepalive = 25;
}];
};
};
OPNsense = {
address = [ "10.0.0.5/24" "2a02:a03f:83ad:2101::5/128" ];
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
listenPort = 51820;
autostart = false;
postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;";
dns = ["10.0.0.1"];
peers = [{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "10.0.0.1/8" "192.168.1.2/32" ];
endpoint = "h.thomasave.be:13231";
persistentKeepalive = 25;
}];
};
};
# fileSystems."/home/server".device = pkgs.lib.mkForce "10.0.0.1:/home/server";
# fileSystems."/home/server".device = pkgs.lib.mkForce "10.0.0.1:/home/server";
services.upower.enable = true;
networking.wireless.iwd.enable = true;
networking.wireless.iwd.settings = {
IPv6 = {
Enabled = true;
services.upower.enable = true;
networking.wireless.iwd.enable = true;
networking.wireless.iwd.settings = {
IPv6 = {
Enabled = true;
};
Settings = {
AutoConnect = true;
};
};
Settings = {
AutoConnect = true;
};
};
}

View File

@ -4,38 +4,38 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/e34f26e4-2f68-4f9c-ab7d-836b4f4b9f74";
fsType = "ext4";
};
fileSystems."/" =
{
device = "/dev/disk/by-uuid/e34f26e4-2f68-4f9c-ab7d-836b4f4b9f74";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/90D9-F457";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/90D9-F457";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -1,55 +1,55 @@
{ pkgs, ... }:
{
security.polkit.enable = true;
security.rtkit.enable = true;
programs.zsh.enable = true;
networking.firewall.enable = false;
security.polkit.enable = true;
security.rtkit.enable = true;
programs.zsh.enable = true;
networking.firewall.enable = false;
boot.loader.systemd-boot.memtest86.enable = true;
boot.loader.systemd-boot.netbootxyz.enable = true;
boot.loader.timeout = 1;
boot.loader.efi.canTouchEfiVariables = true;
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.systemd-boot.memtest86.enable = true;
boot.loader.systemd-boot.netbootxyz.enable = true;
boot.loader.timeout = 1;
boot.loader.efi.canTouchEfiVariables = true;
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
boot.kernelPackages = pkgs.linuxPackages_latest;
services.thermald.enable = true;
services.pcscd.enable = true;
services.fwupd.enable = true;
services.gvfs.enable = true;
services.fstrim.enable = true;
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
services.thermald.enable = true;
services.pcscd.enable = true;
services.fwupd.enable = true;
services.gvfs.enable = true;
services.fstrim.enable = true;
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
};
environment.systemPackages = with pkgs; [
wget
curl
git
lm_sensors
wireguard-tools
environment.systemPackages = with pkgs; [
wget
curl
git
lm_sensors
wireguard-tools
# Podman
dive
podman-tui
docker-compose
];
# Podman
dive
podman-tui
docker-compose
];
virtualisation.containers.enable = true;
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
virtualisation.containers.enable = true;
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
};
};
services.resolved = {
enable = true;
fallbackDns = [ "1.1.1.1" "1.0.0.1" ];
};
networking.nameservers = ["1.1.1.1" "1.0.0.1"];
services.resolved = {
enable = true;
fallbackDns = [ "1.1.1.1" "1.0.0.1" ];
};
networking.nameservers = ["1.1.1.1" "1.0.0.1"];
}

View File

@ -1,69 +1,69 @@
{ pkgs, ... }:
{
services.udev.packages = [ pkgs.yubikey-personalization ];
services.udev.packages = [ pkgs.yubikey-personalization ];
hardware.graphics = {
enable = true;
};
services.power-profiles-daemon.enable = true;
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
iosevka
nerdfonts
roboto
font-awesome
];
services.greetd = {
enable = true;
settings = rec {
initial_session = {
command = "Hyprland";
user = "user";
};
default_session = initial_session;
hardware.graphics = {
enable = true;
};
};
services.power-profiles-daemon.enable = true;
i18n.extraLocaleSettings = {
LC_TIME = "en_GB.UTF-8";
};
environment.variables = {
LC_TIME = "en_GB.UTF-8";
};
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
iosevka
nerdfonts
roboto
font-awesome
];
# Calendar
# Add the server using gnome-online-accounts:
# nix-shell -p gnome-control-center --run "gnome-control-center"
# Just add the main webdav server and gnome-calendar will automatically pick up all available calendars.
programs.dconf.enable = true;
services.gnome.evolution-data-server.enable = true;
services.gnome.gnome-online-accounts.enable = true;
services.gnome.gnome-keyring.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
services.blueman.enable = true;
systemd.user.services.mpris-proxy = {
description = "Mpris proxy";
after = [ "network.target" "sound.target" ];
wantedBy = [ "default.target" ];
serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
};
hardware.bluetooth.settings = {
General = {
Experimental = true;
services.greetd = {
enable = true;
settings = rec {
initial_session = {
command = "Hyprland";
user = "user";
};
default_session = initial_session;
};
};
i18n.extraLocaleSettings = {
LC_TIME = "en_GB.UTF-8";
};
environment.variables = {
LC_TIME = "en_GB.UTF-8";
};
# Calendar
# Add the server using gnome-online-accounts:
# nix-shell -p gnome-control-center --run "gnome-control-center"
# Just add the main webdav server and gnome-calendar will automatically pick up all available calendars.
programs.dconf.enable = true;
services.gnome.evolution-data-server.enable = true;
services.gnome.gnome-online-accounts.enable = true;
services.gnome.gnome-keyring.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
services.blueman.enable = true;
systemd.user.services.mpris-proxy = {
description = "Mpris proxy";
after = [ "network.target" "sound.target" ];
wantedBy = [ "default.target" ];
serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
};
hardware.bluetooth.settings = {
General = {
Experimental = true;
};
};
};
}

View File

@ -1,47 +1,47 @@
{ pkgs, config, ... }:
{
services.xserver.videoDrivers = [ "nvidia" ];
environment.systemPackages = with pkgs; [
pciutils
file
gnumake
gcc
cudatoolkit
podman
nvidia-container-toolkit
];
nixpkgs.config.cudaSupport = true;
hardware.nvidia-container-toolkit.enable = true;
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.stable;
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = true;
open = false;
nvidiaSettings = true;
prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
offload = {
enable = true;
enableOffloadCmd = true;
};
services.xserver.videoDrivers = [ "nvidia" ];
environment.systemPackages = with pkgs; [
pciutils
file
gnumake
gcc
cudatoolkit
podman
nvidia-container-toolkit
];
nixpkgs.config.cudaSupport = true;
hardware.nvidia-container-toolkit.enable = true;
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.stable;
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = true;
open = false;
nvidiaSettings = true;
prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
offload = {
enable = true;
enableOffloadCmd = true;
};
};
};
systemd.services.nvidia-control-devices = {
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${pkgs.linuxPackages.nvidia_x11.bin}/bin/nvidia-smi";
};
};
systemd.services.nvidia-control-devices = {
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${pkgs.linuxPackages.nvidia_x11.bin}/bin/nvidia-smi";
};
specialisation = {
docked.configuration = {
system.nixos.tags = [ "docked" ];
hardware.nvidia = {
powerManagement.finegrained = pkgs.lib.mkForce false;
prime.offload.enable = pkgs.lib.mkForce false;
prime.offload.enableOffloadCmd = pkgs.lib.mkForce false;
prime.sync.enable = pkgs.lib.mkForce true;
};
specialisation = {
docked.configuration = {
system.nixos.tags = [ "docked" ];
hardware.nvidia = {
powerManagement.finegrained = pkgs.lib.mkForce false;
prime.offload.enable = pkgs.lib.mkForce false;
prime.offload.enableOffloadCmd = pkgs.lib.mkForce false;
prime.sync.enable = pkgs.lib.mkForce true;
};
};
};
};
}

View File

@ -4,36 +4,36 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/daf843cd-8e63-48ed-831a-e055929e86cb";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/daf843cd-8e63-48ed-831a-e055929e86cb";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/E1D9-7A48";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/E1D9-7A48";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -1,33 +1,33 @@
{
description = "Home Manager configuration of server";
description = "Home Manager configuration of server";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
};
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
};
outputs = { nixpkgs, home-manager, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
homeConfigurations."server" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
outputs = { nixpkgs, home-manager, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
homeConfigurations."server" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ../../home/Mallorea.nix ];
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ../../home/Mallorea.nix ];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = {
inherit inputs;
}; # allows access to flake inputs in hm modules
};
};
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = {
inherit inputs;
}; # allows access to flake inputs in hm modules
};
};
}

View File

@ -1,25 +1,25 @@
{ inputs, config, pkgs, ... }:
{
imports = [
(import ../Common/default.nix { inherit inputs config pkgs; })
(import ../Common/nfs.nix { inherit inputs pkgs config; })
];
imports = [
(import ../Common/default.nix { inherit inputs config pkgs; })
(import ../Common/nfs.nix { inherit inputs pkgs config; })
];
services.ollama = {
enable = true;
};
zramSwap.enable = true;
networking.wg-quick.interfaces = {
wg0 = {
address = [ "10.0.0.12/24" ];
privateKeyFile = "/home/user/.secrets/Wireguard/Riva.key";
listenPort = 51820;
peers = [{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "10.0.0.1/8" ];
endpoint = "192.168.1.1:13231";
}];
services.ollama = {
enable = true;
};
zramSwap.enable = true;
networking.wg-quick.interfaces = {
wg0 = {
address = [ "10.0.0.12/24" ];
privateKeyFile = "/home/user/.secrets/Wireguard/Riva.key";
listenPort = 51820;
peers = [{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "10.0.0.1/8" ];
endpoint = "192.168.1.1:13231";
}];
};
};
};
}

View File

@ -4,33 +4,33 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.initrd.availableKernelModules =
[ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules =
[ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/563963bd-8e27-4c9c-a1d6-d204ea7c43ff";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/563963bd-8e27-4c9c-a1d6-d204ea7c43ff";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/9F3C-9F3B";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/9F3C-9F3B";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

@ -1,33 +1,33 @@
{
description = "Home Manager configuration of vault";
description = "Home Manager configuration of vault";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
};
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
};
outputs = { nixpkgs, home-manager, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
homeConfigurations."server" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
outputs = { nixpkgs, home-manager, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
homeConfigurations."server" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ../../home/Vault.nix ];
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ../../home/Vault.nix ];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = {
inherit inputs;
}; # allows access to flake inputs in hm modules
};
};
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = {
inherit inputs;
}; # allows access to flake inputs in hm modules
};
};
}