Run nix fmt

This commit is contained in:
Thomas Avé 2026-03-11 18:13:34 +07:00
parent df9449315d
commit c22aee3927
63 changed files with 3851 additions and 3637 deletions

View File

@ -29,16 +29,25 @@
};
};
outputs = { nixpkgs, home-manager, nur, nixos-06cb-009a-fingerprint-sensor, ... }@inputs:
let
system = "x86_64-linux";
outputs = {
nixpkgs,
home-manager,
nur,
nixos-06cb-009a-fingerprint-sensor,
...
} @ inputs: let
supportedSystems = ["x86_64-linux" "aarch64-linux"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
system = builtins.currentSystem;
pkgs = nixpkgs.legacyPackages.${system};
commonModules = host: user: [
./hosts/${host}/hardware-configuration.nix
{ nixpkgs.overlays = [
{
nixpkgs.overlays = [
nur.overlays.default
(self: super: { utillinux = super.util-linux; })
]; }
(self: super: {utillinux = super.util-linux;})
];
}
{
networking.hostName = host;
time.timeZone = "Asia/Bangkok";
@ -53,13 +62,13 @@
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
"vicinae.cachix.org-1:1kDrfienkGHPYbkpNj1mWTr7Fm1+zcenzgTizIcI3oc="
];
experimental-features = [ "nix-command" "flakes" ];
trusted-users = [ "root" user ];
experimental-features = ["nix-command" "flakes"];
trusted-users = ["root" user];
auto-optimise-store = true;
};
users.users.${user} = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
extraGroups = ["wheel"]; # Enable sudo for the user.
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKAa3tMzSCRuprEACrBsKI0F/o73o6J9L1qR3TaZn/N8 user@Kell"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByLwLAdJbmoDV5sx4hg5NbzKbOh1GmWEhDOUJ1GQBhK user@Riva"
@ -78,36 +87,44 @@
home-manager.nixosModules.home-manager
{
home-manager = {
extraSpecialArgs = { inherit inputs; };
extraSpecialArgs = {inherit inputs;};
useGlobalPkgs = true;
useUserPackages = true;
users.${user} = { imports = [ ./home/${host}.nix ]; };
users.${user} = {imports = [./home/${host}.nix];};
backupFileExtension = "bak";
};
}
./hosts/${host}
];
mkSystem = host: cfg:
let
mkSystem = host: cfg: let
system = cfg.system or "x86_64-linux";
in
nixpkgs.lib.nixosSystem {
modules = (commonModules host cfg.user) ++ (cfg.modules or [ ]) ++ [
{ nixpkgs.hostPlatform = system; }
modules =
(commonModules host cfg.user)
++ (cfg.modules or [])
++ [
{nixpkgs.hostPlatform = system;}
];
specialArgs = inputs;
};
systems = {
Riva = { user = "user"; };
Kell = { user = "user"; };
Aloria = { user = "user"; };
Arendia = { user = "user"; modules = [
Riva = {user = "user";};
Kell = {user = "user";};
Aloria = {user = "user";};
Arendia = {
user = "user";
modules = [
nixos-06cb-009a-fingerprint-sensor.nixosModules."06cb-009a-fingerprint-sensor"
];};
Asturia = { user = "user"; };
];
};
in
{
Asturia = {user = "user";};
};
in {
nixosConfigurations = nixpkgs.lib.mapAttrs mkSystem systems;
formatter = forAllSystems (
system:
nixpkgs.legacyPackages.${system}.alejandra
);
};
}

View File

@ -1,5 +1,9 @@
{ inputs, config, pkgs, ... }:
let
{
inputs,
config,
pkgs,
...
}: let
fzgo_paths = {
files = [
"/home/user/.dotfiles"
@ -9,11 +13,10 @@ let
"/Storage/TrackBox"
];
};
in
{
in {
imports = [
(import ./utils/desktop.nix { inherit inputs config pkgs; })
(import ./utils/fzgo_links.nix { inherit config pkgs fzgo_paths; })
(import ./utils/desktop.nix {inherit inputs config pkgs;})
(import ./utils/fzgo_links.nix {inherit config pkgs fzgo_paths;})
];
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Aloria/id_ed25519";

View File

@ -1,5 +1,9 @@
{ inputs, config, pkgs, ... }:
let
{
inputs,
config,
pkgs,
...
}: let
fzgo_paths = {
files = [
"/home/user/.dotfiles"
@ -9,11 +13,10 @@ let
"/Storage/TrackBox/"
];
};
in
{
in {
imports = [
(import ./utils/desktop.nix { inherit inputs config pkgs; })
(import ./utils/fzgo_links.nix { inherit config pkgs fzgo_paths; })
(import ./utils/desktop.nix {inherit inputs config pkgs;})
(import ./utils/fzgo_links.nix {inherit config pkgs fzgo_paths;})
];
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Arendia/id_ed25519";

View File

@ -1,7 +1,10 @@
{ inputs, config, pkgs, ... }:
let
in
{
{
inputs,
config,
pkgs,
...
}: let
in {
home.username = "ubuntu";
home.homeDirectory = "/home/ubuntu";
nix = {
@ -12,7 +15,7 @@ in
xdg.enable = true;
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
(import ./utils/common.nix {inherit inputs config pkgs;})
./ssh
];
programs.ssh.matchBlocks."*".identityFile = "/home/ubuntu/.secrets/SSH/Arm/id_ed25519";

View File

@ -1,8 +1,11 @@
{ inputs, config, pkgs, ... }:
{
inputs,
config,
pkgs,
...
}: {
imports = [
(import ./utils/desktop.nix { inherit inputs config pkgs; })
(import ./utils/desktop.nix {inherit inputs config pkgs;})
];
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Asturia/id_ed25519";

View File

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

View File

@ -1,5 +1,9 @@
{ inputs, config, pkgs, ... }:
let
{
inputs,
config,
pkgs,
...
}: let
fzgo_paths = {
files = [
"/home/user/.dotfiles"
@ -12,11 +16,10 @@ let
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Shared"
];
};
in
{
in {
imports = [
(import ./utils/desktop.nix { inherit inputs config pkgs; })
(import ./utils/fzgo_links.nix { inherit config pkgs fzgo_paths; })
(import ./utils/desktop.nix {inherit inputs config pkgs;})
(import ./utils/fzgo_links.nix {inherit config pkgs fzgo_paths;})
];
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Kell/id_ed25519";

View File

@ -1,9 +1,13 @@
{ inputs, config, pkgs, ... }:
let
{
inputs,
config,
pkgs,
...
}: let
username = "server";
home_dir = "/home/${username}";
scripts = {
disk_check = import ./utils/disk_check.nix { inherit pkgs; };
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 '');
@ -74,7 +78,7 @@ in {
nix = {
package = pkgs.nix;
settings = {
trusted-users = [ username ];
trusted-users = [username];
use-xdg-base-directories = true;
};
};
@ -82,9 +86,9 @@ in {
xdg.enable = true;
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
(import ./utils/services.nix { inherit pkgs scripts; })
(import ./utils/fzgo_links.nix { inherit config pkgs fzgo_paths; })
(import ./utils/common.nix {inherit inputs config pkgs;})
(import ./utils/services.nix {inherit pkgs scripts;})
(import ./utils/fzgo_links.nix {inherit config pkgs fzgo_paths;})
./ssh
];
programs.ssh.matchBlocks."*".identityFile = "${home_dir}/.secrets/SSH/Mallorea/id_ed25519";

View File

@ -1,7 +1,10 @@
{ inputs, config, pkgs, ... }:
let
in
{
{
inputs,
config,
pkgs,
...
}: let
in {
home.username = "user";
home.homeDirectory = "/home/user";
nix = {
@ -12,7 +15,7 @@ in
xdg.enable = true;
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
(import ./utils/common.nix {inherit inputs config pkgs;})
./ssh
];
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Pi/id_ed25519";

View File

@ -1,5 +1,9 @@
{ inputs, config, pkgs, ... }:
let
{
inputs,
config,
pkgs,
...
}: let
fzgo_paths = {
files = [
"/home/user/.dotfiles"
@ -12,11 +16,10 @@ let
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Shared"
];
};
in
{
in {
imports = [
(import ./utils/fzgo_links.nix { inherit config pkgs fzgo_paths; })
(import ./utils/desktop.nix { inherit inputs config pkgs; })
(import ./utils/fzgo_links.nix {inherit config pkgs fzgo_paths;})
(import ./utils/desktop.nix {inherit inputs config pkgs;})
./ssh
];

View File

@ -1,19 +1,22 @@
{ inputs, config, pkgs, ... }:
{
inputs,
config,
pkgs,
...
}: {
home.username = "user";
home.homeDirectory = "/home/user";
nix = {
package = pkgs.nix;
settings = {
trusted-users = [ "user" ];
trusted-users = ["user"];
use-xdg-base-directories = true;
};
};
xdg.enable = true;
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
(import ./utils/common.nix {inherit inputs config pkgs;})
./alacritty
./ssh
];

View File

@ -1,5 +1,9 @@
{ inputs, config, pkgs, ... }:
let
{
inputs,
config,
pkgs,
...
}: let
scripts = {
disk_check = {
when = "*-*-* *:00:00";
@ -47,8 +51,7 @@ let
'');
};
};
in
{
in {
home.username = "server";
home.homeDirectory = "/home/server";
nix = {
@ -58,8 +61,11 @@ in
xdg.enable = true;
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
(import ./utils/services.nix { inherit pkgs; scripts = scripts; })
(import ./utils/common.nix {inherit inputs config pkgs;})
(import ./utils/services.nix {
inherit pkgs;
scripts = scripts;
})
./ssh
];

View File

@ -1,7 +1,10 @@
{ inputs, pkgs, ... }:
{
inputs,
pkgs,
...
}: {
# add the home manager module
imports = [ inputs.ags.homeManagerModules.default ];
imports = [inputs.ags.homeManagerModules.default];
programs.ags = {
enable = true;

View File

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.alacritty = {
enable = true;
settings = {

View File

@ -1,6 +1,9 @@
{ config, inputs, pkgs, ... }:
{
config,
inputs,
pkgs,
...
}: {
programs.starship = {
enable = true;
enableBashIntegration = true;

View File

@ -1,22 +1,23 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
home.file = {
".mailcap".text =
"text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput";
".mailcap".text = "text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput";
};
home.packages = with pkgs; [ mailcap ];
home.packages = with pkgs; [mailcap];
programs.notmuch = {
enable = true;
extraConfig = {
database = { path = "/home/server/Storage/Thomas/Mail"; };
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"; };
maildir = {synchronize_flags = "true";};
};
};
programs.aerc = {
@ -177,13 +178,11 @@
dirlist-tree = true;
};
viewer = {
pager =
"${pkgs.neovim}/bin/nvim -u ${config.xdg.configHome}/nvim/aerc.lua";
pager = "${pkgs.neovim}/bin/nvim -u ${config.xdg.configHome}/nvim/aerc.lua";
};
compose = { address-book-cmd = ''notmuch address "%s"''; };
compose = {address-book-cmd = ''notmuch address "%s"'';};
multipart-converters = {
"text/html" =
"${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html";
"text/html" = "${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html";
};
filters = {
"text/plain" = "cat";
@ -198,22 +197,17 @@
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";
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";
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>'';
@ -222,10 +216,8 @@
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";
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>'';
@ -233,8 +225,7 @@
};
NotMuch = {
source = "notmuch:///home/server/Storage/Thomas/Mail/";
check-mail-cmd =
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
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";
@ -244,8 +235,7 @@
};
};
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/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

View File

@ -1,11 +1,9 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
lock-false = {
Value = false;
Status = "locked";
};
in
{
in {
programs.firefox = {
enable = true;
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
@ -24,8 +22,7 @@ in
};
ExtensionSettings = {
"{3e4d2037-d300-4e95-859d-3cba866f46d3}" = {
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/private-internet-access-ext/latest.xpi";
install_url = "https://addons.mozilla.org/firefox/downloads/latest/private-internet-access-ext/latest.xpi";
installation_mode = "force_installed";
};
"{c7c120ff-2878-4e59-a5a3-cd4d1655bc13}" = {
@ -61,7 +58,7 @@ in
search = {
force = true;
default = "ddg";
order = [ "ddg" "google" ];
order = ["ddg" "google"];
};
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin

View File

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
programs.foot = {
enable = true;
server.enable = true;
@ -13,7 +12,7 @@
sixel = "yes";
};
scrollback.lines = 100000;
colors = {
colors-dark = {
background = "000010";
foreground = "F8F8F2";
regular0 = "121212";

View File

@ -1,6 +1,5 @@
{ ... }:
{
programs.ghostty= {
{...}: {
programs.ghostty = {
enable = true;
enableZshIntegration = true;
installVimSyntax = true;
@ -39,7 +38,6 @@
font-family = "JetBrains Mono";
window-decoration = false;
# adjust-cell-height = "10%";
};
};
}

View File

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.git = {
enable = true;
lfs.enable = true;

View File

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = [
(pkgs.appimageTools.wrapType2 {
pname = "Helium";
@ -20,7 +19,7 @@
terminal = false;
icon = "chromium";
type = "Application";
categories = [ "Network" "WebBrowser" ];
categories = ["Network" "WebBrowser"];
mimeType = [
"x-scheme-handler/webcal"
"application/pdf"
@ -41,19 +40,19 @@
};
};
xdg.mimeApps.defaultApplications = {
"application/json" = [ "helium.desktop" ];
"application/x-extension-htm" = [ "helium.desktop" ];
"application/x-extension-html" = [ "helium.desktop" ];
"application/x-extension-shtml" = [ "helium.desktop" ];
"application/x-extension-xhtml" = [ "helium.desktop" ];
"application/x-extension-xht" = [ "helium.desktop" ];
"application/xhtml+xml" = [ "helium.desktop" ];
"text/html" = [ "helium.desktop" ];
"text/xml" = [ "helium.desktop" ];
"x-scheme-handler/about" = [ "helium.desktop" ];
"x-scheme-handler/ftp" = [ "helium.desktop" ];
"x-scheme-handler/http" = [ "helium.desktop" ];
"x-scheme-handler/unknown" = [ "helium.desktop" ];
"x-scheme-handler/https" = [ "helium.desktop" ];
"application/json" = ["helium.desktop"];
"application/x-extension-htm" = ["helium.desktop"];
"application/x-extension-html" = ["helium.desktop"];
"application/x-extension-shtml" = ["helium.desktop"];
"application/x-extension-xhtml" = ["helium.desktop"];
"application/x-extension-xht" = ["helium.desktop"];
"application/xhtml+xml" = ["helium.desktop"];
"text/html" = ["helium.desktop"];
"text/xml" = ["helium.desktop"];
"x-scheme-handler/about" = ["helium.desktop"];
"x-scheme-handler/ftp" = ["helium.desktop"];
"x-scheme-handler/http" = ["helium.desktop"];
"x-scheme-handler/unknown" = ["helium.desktop"];
"x-scheme-handler/https" = ["helium.desktop"];
};
}

View File

@ -1,5 +1,4 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
playerctl = "${pkgs.playerctl}/bin/playerctl";
nautilus = "${pkgs.nautilus}/bin/nautilus";
gnome-calendar = "${pkgs.gnome-calendar}/bin/gnome-calendar";
@ -109,7 +108,7 @@ in {
enable = true;
systemd.enable = false;
xwayland.enable = true;
plugins = [ ] ++ hyprland_plugins;
plugins = [] ++ hyprland_plugins;
settings = {
"$mainMod" = pkgs.lib.mkDefault "SUPER_L";
"$altMod" = pkgs.lib.mkDefault "ALT_L";
@ -124,7 +123,7 @@ in {
"TERMINAL,${terminal}"
"WLR_RENDERER_ALLOW_SOFTWARE,1"
];
debug = { disable_logs = false; };
debug = {disable_logs = false;};
# UPDATED: New Window Rule Syntax (0.53.0)
windowrule = [
@ -172,15 +171,15 @@ in {
kb_options = pkgs.lib.mkDefault "compose:rctrl, caps:ctrl_modifier";
numlock_by_default = true;
};
binds = { scroll_event_delay = 1; };
xwayland = { force_zero_scaling = true; };
binds = {scroll_event_delay = 1;};
xwayland = {force_zero_scaling = true;};
misc = {
disable_hyprland_logo = 1;
# Removed 'enable_anr_dialog' (deprecated/removed in recent versions)
};
decoration = {
rounding = 1;
blur = { enabled = false; };
blur = {enabled = false;};
};
animations = {
enabled = "yes";
@ -232,7 +231,8 @@ in {
"$mainMod $altMod, K, resizeactive, 0 -20"
"$mainMod $altMod, J, resizeactive, 0 20"
];
bind = [
bind =
[
"$mainMod, return, exec, ${launch_terminal}/bin/launch_terminal $(hyprctl activewindow -j | ${jq} .pid)"
"$mainMod SHIFT, return, exec, ${terminal}"
"$mainMod, Q, killactive,"
@ -282,16 +282,16 @@ in {
"$mainMod SHIFT, TAB, ${workspace_command_prefix}workspace, m-1"
"$mainMod, Caps_Lock, ${workspace_command_prefix}workspace, m+1"
"$mainMod SHIFT, Caps_Lock, ${workspace_command_prefix}workspace, m-1"
] ++ (
]
++ (
# workspaces
builtins.concatLists (builtins.genList (x:
let
builtins.concatLists (builtins.genList (x: let
ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
in
[
in [
"$mainMod, ${ws}, ${workspace_command_prefix}workspace, ${toString (x + 1)}"
"$mainMod SHIFT, ${ws}, ${workspace_command_prefix}movetoworkspace, ${toString (x + 1)}"
]) 10));
]) 10)
);
};
};
}

View File

@ -1,6 +1,4 @@
{ lib, ... }:
{
{lib, ...}: {
programs.kitty = {
enable = true;
shellIntegration.enableZshIntegration = true;
@ -18,7 +16,7 @@
"ctrl+shift+v" = "paste_from_clipboard";
};
settings = {
kitty_mod= "ctrl+alt";
kitty_mod = "ctrl+alt";
cursor_shape = "block";
cursor_beam_thickness = 1;
scrollback_lines = 100000;

View File

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
home.file."${config.xdg.configHome}/lf" = {
source = ./files;
recursive = true;
@ -42,6 +44,6 @@
}}
'';
};
cmdKeybindings = { q = "quit"; };
cmdKeybindings = {q = "quit";};
};
}

View File

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

View File

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
home.packages = with pkgs; [
# codeium
nixd

View File

@ -1,7 +1,9 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [ papirus-icon-theme ];
config,
pkgs,
...
}: {
home.packages = with pkgs; [papirus-icon-theme];
programs.rofi = {
enable = true;
@ -13,8 +15,8 @@
kb-cancel = "Super_L+XF86Launch5,Escape";
combi-hide-mode-prefix = true;
};
theme =
let inherit (config.lib.formats.rasi) mkLiteral;
theme = let
inherit (config.lib.formats.rasi) mkLiteral;
in {
"*" = {
background = mkLiteral "#0f111a";
@ -114,7 +116,7 @@
padding = mkLiteral "10px 10px 10px 10px";
};
"element-text" = { padding = mkLiteral "20px 0px 0px 10px"; };
"element-text" = {padding = mkLiteral "20px 0px 0px 10px";};
"element selected" = {
background-color = mkLiteral "@selected";

View File

@ -1,6 +1,9 @@
{ inputs, config, pkgs, ... }:
{
inputs,
config,
pkgs,
...
}: {
programs.ssh = {
enable = true;
enableDefaultConfig = false;

View File

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.tmux = {
shell = "${pkgs.zsh}/bin/zsh";
terminal = "screen-256color";

View File

@ -1,9 +1,12 @@
{ inputs, config, pkgs, ... }:
{
inputs,
config,
pkgs,
...
}: {
imports = [
(import ../zsh { inherit inputs config pkgs; })
(import ../bash { inherit inputs config pkgs; })
(import ../zsh {inherit inputs config pkgs;})
(import ../bash {inherit inputs config pkgs;})
../git
../nvim
../email
@ -48,5 +51,4 @@
$pdf_mode = 1;
$pdf_previewer = 'evince %O %S';
'';
}

View File

@ -1,10 +1,14 @@
{ inputs, config, pkgs, ... }:
{
inputs,
config,
pkgs,
...
}: {
imports = [
(import ./common.nix { inherit inputs config pkgs; })
(import ./python.nix { inherit inputs config pkgs; })
(import ../hyprland { inherit inputs pkgs; })
(import ../ags { inherit inputs pkgs; })
(import ./common.nix {inherit inputs config pkgs;})
(import ./python.nix {inherit inputs config pkgs;})
(import ../hyprland {inherit inputs pkgs;})
(import ../ags {inherit inputs pkgs;})
../rofi
../vicinae
../alacritty

View File

@ -1,5 +1,4 @@
{ pkgs }:
{
{pkgs}: {
when = "*-*-* *:00:00";
script = toString (pkgs.writeShellScript "script" ''
REPORT_EMAIL=email@thomasave.be

View File

@ -1,9 +1,12 @@
{ config, pkgs, fzgo_paths }:
let
{
config,
pkgs,
fzgo_paths,
}: let
mkLink = source_path: file_type: {
"${source_path}-${file_type}" = {
source = config.lib.file.mkOutOfStoreSymlink source_path;
target = ".config/fzgo/entries/${file_type}/${pkgs.lib.strings.replaceStrings [ "/" ] [ "|" ] source_path}";
target = ".config/fzgo/entries/${file_type}/${pkgs.lib.strings.replaceStrings ["/"] ["|"] source_path}";
};
};
links = (map (source_path: mkLink source_path "f") fzgo_paths.files) ++ (map (source_path: mkLink source_path "d") fzgo_paths.dirs);

View File

@ -1,5 +1,4 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
pythonldlibpath = pkgs.lib.makeLibraryPath (with pkgs; [
libGL
glib
@ -20,19 +19,22 @@ let
systemd
]);
# Darwin requires a different library path prefix
wrapPrefix = if (!pkgs.stdenv.isDarwin) then "LD_LIBRARY_PATH" else "DYLD_LIBRARY_PATH";
wrapPrefix =
if (!pkgs.stdenv.isDarwin)
then "LD_LIBRARY_PATH"
else "DYLD_LIBRARY_PATH";
# pythonOverlay = (pkgs.python313.withPackages (ps: [
# (ps.torch.override { rocmSupport = true; })
# ]));
patchedpython = (pkgs.symlinkJoin {
patchedpython = pkgs.symlinkJoin {
name = "python";
paths = [ pkgs.python313 ];
buildInputs = [ pkgs.makeWrapper ];
paths = [pkgs.python313];
buildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram "$out/bin/python3.13" --prefix ${wrapPrefix} : "${pythonldlibpath}"
'';
});
};
in {
home.packages = [
patchedpython

View File

@ -1,8 +1,11 @@
{ pkgs, scripts }:
let
notify_script = (pkgs.writers.writePython3Bin "telegram-notify.py"
{
pkgs,
scripts,
}: let
notify_script =
pkgs.writers.writePython3Bin "telegram-notify.py"
{
libraries = [ pkgs.python3Packages.python-telegram-bot ];
libraries = [pkgs.python3Packages.python-telegram-bot];
} ''
import telegram
import asyncio
@ -52,10 +55,10 @@ 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" ];
Install.WantedBy = ["timers.target"];
Timer = {
Persistent = true;
OnCalendar = cfg.when;
@ -66,11 +69,11 @@ let
Unit.Description = name;
Unit.OnFailure = "status_notify@${name}.service";
# Install = { WantedBy = [ "default.target" ]; };
Service = { ExecStart = cfg.script; };
Service = {ExecStart = cfg.script;};
};
in
{
systemd.user.services = pkgs.lib.mapAttrs mkService scripts
in {
systemd.user.services =
pkgs.lib.mapAttrs mkService scripts
// (pkgs.lib.mapAttrs mkService {
"status_notify@" = {
script = "${notify_script}/bin/telegram-notify.py %i";

View File

@ -1,7 +1,8 @@
{ inputs, ... }: # Add inputs here
{inputs, ...}:
# Add inputs here
{
# Import the module definition here
imports = [ inputs.vicinae.homeManagerModules.default ];
imports = [inputs.vicinae.homeManagerModules.default];
services.vicinae = {
enable = true;
@ -9,7 +10,7 @@
enable = true;
autoStart = true;
environment = {
QT_SCALE_FACTOR="1.5";
QT_SCALE_FACTOR = "1.5";
};
};
};

View File

@ -1,5 +1,9 @@
{ inputs, config, pkgs, ... }:
{
inputs,
config,
pkgs,
...
}: {
imports = [inputs.walker.homeManagerModules.walker];
programs.walker = {
enable = true;

View File

@ -1,6 +1,8 @@
{ inputs, pkgs, ... }:
{
inputs,
pkgs,
...
}: {
programs.waybar = {
enable = true;
package = inputs.waybar.packages.${pkgs.stdenv.hostPlatform.system}.waybar;
@ -10,8 +12,8 @@
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-left = ["wlr/taskbar"];
modules-center = ["hyprland/workspaces"];
modules-right = [
"tray"
"wireplumber"
@ -33,7 +35,7 @@
format = "{icon} {volume}%";
format-muted = "";
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
format-icons = [ "" "" "" ];
format-icons = ["" "" ""];
};
"hyprland/workspaces" = {
disable-scroll = true;
@ -41,8 +43,8 @@
warp-on-scroll = false;
format = "{name}";
};
"hyprland/window" = { max-length = 50; };
tray = { spacing = 10; };
"hyprland/window" = {max-length = 50;};
tray = {spacing = 10;};
"clock#clock2" = {
timezone = "Asia/Bangkok";
format = "{:%H:%M:%S}";
@ -78,7 +80,7 @@
};
format = "{icon}";
tooltip-format = "{capacity}% ({time})";
format-icons = [ " " " " " " " " " " ];
format-icons = [" " " " " " " " " "];
format-charging = "{capacity}% ";
format-full = "{capacity}% ";
format-alt = "{capacity}% {time} [{power:.2} W]";

View File

@ -1,6 +1,4 @@
{...}:
{
{...}: {
programs.yazi = {
enable = true;
enableZshIntegration = true;
@ -13,16 +11,56 @@
keymap = {
mgr.normal = [
{ on = [ "j" ]; run = "down"; desc = "Move cursor down"; }
{ on = [ "k" ]; run = "up"; desc = "Move cursor up"; }
{ on = [ "h" ]; run = "back"; desc = "Go back to parent directory"; }
{ on = [ "l" ]; run = "forward"; desc = "Enter directory / open file"; }
{ on = [ "q" ]; run = "quit"; desc = "Quit yazi"; }
{ on = [ " " ]; run = "select"; desc = "Select the current file"; }
{ on = [ "v" ]; run = "visual_mode"; desc = "Enter visual mode"; }
{ on = [ "y" ]; run = "yank"; desc = "Yank selection"; }
{ on = [ "p" ]; run = "paste"; desc = "Paste files"; }
{ on = [ "d" ]; run = "remove --permanently"; desc = "Delete permanently"; }
{
on = ["j"];
run = "down";
desc = "Move cursor down";
}
{
on = ["k"];
run = "up";
desc = "Move cursor up";
}
{
on = ["h"];
run = "back";
desc = "Go back to parent directory";
}
{
on = ["l"];
run = "forward";
desc = "Enter directory / open file";
}
{
on = ["q"];
run = "quit";
desc = "Quit yazi";
}
{
on = [" "];
run = "select";
desc = "Select the current file";
}
{
on = ["v"];
run = "visual_mode";
desc = "Enter visual mode";
}
{
on = ["y"];
run = "yank";
desc = "Yank selection";
}
{
on = ["p"];
run = "paste";
desc = "Paste files";
}
{
on = ["d"];
run = "remove --permanently";
desc = "Delete permanently";
}
];
};
};

View File

@ -1,5 +1,4 @@
{ config, ... }:
{
{config, ...}: {
programs.zellij = {
enable = true;
};

View File

@ -1,6 +1,9 @@
{ config, inputs, pkgs, ... }:
{
config,
inputs,
pkgs,
...
}: {
home.packages = [
pkgs.fzy
pkgs.lf
@ -49,7 +52,7 @@
)}"
}
'';
programs.fzf = { enable = true; };
programs.fzf = {enable = true;};
programs.zsh = {
enable = true;
enableCompletion = true;

View File

@ -1,12 +1,17 @@
{ pkgs, lib, inputs, config, ... }:
let
{
pkgs,
lib,
inputs,
config,
...
}: let
serverIP = "10.0.0.1";
in {
imports = [
(import ../Common/default.nix { inherit inputs pkgs config; })
(import ../Common/desktop.nix { inherit inputs pkgs config; })
(import ../Common/nfs.nix { inherit pkgs serverIP; })
(import ../Common/zfs.nix {inherit inputs pkgs config; })
(import ../Common/default.nix {inherit inputs pkgs config;})
(import ../Common/desktop.nix {inherit inputs pkgs config;})
(import ../Common/nfs.nix {inherit pkgs serverIP;})
(import ../Common/zfs.nix {inherit inputs pkgs config;})
];
hardware.graphics.extraPackages = [
@ -24,26 +29,38 @@ in {
services.thinkfan.settings = {
sensors = [
# Search for 'coretemp' anywhere in /sys/class/hwmon
{ hwmon = "/sys/class/hwmon"; name = "coretemp"; indices = [ 1 ]; }
{
hwmon = "/sys/class/hwmon";
name = "coretemp";
indices = [1];
}
# Search for 'acpitz'
{ hwmon = "/sys/class/hwmon"; name = "acpitz"; indices = [ 1 ]; }
{
hwmon = "/sys/class/hwmon";
name = "acpitz";
indices = [1];
}
# Search for 'nvme'
{ hwmon = "/sys/class/hwmon"; name = "nvme"; indices = [ 1 ]; }
{
hwmon = "/sys/class/hwmon";
name = "nvme";
indices = [1];
}
];
fans = [
{ tpacpi = "/proc/acpi/ibm/fan"; }
{tpacpi = "/proc/acpi/ibm/fan";}
];
levels = [
[ 0 0 45 ]
[ 1 42 55 ]
[ 2 50 60 ]
[ 3 56 68 ]
[ 5 64 78 ]
[ 7 76 95 ]
[0 0 45]
[1 42 55]
[2 50 60]
[3 56 68]
[5 64 78]
[7 76 95]
];
};
@ -66,7 +83,7 @@ in {
};
systemd.services.fprintd = {
wantedBy = [ "multi-user.target" ];
wantedBy = ["multi-user.target"];
serviceConfig.Type = "simple";
};
services.fprintd = {
@ -81,7 +98,7 @@ in {
virtualisation.libvirtd.enable = true;
virtualisation.spiceUSBRedirection.enable = true;
programs.virt-manager.enable = true;
users.users.user.extraGroups = [ "libvirtd" ];
users.users.user.extraGroups = ["libvirtd"];
services.tlp = {
enable = true;
@ -102,49 +119,58 @@ in {
networking.wg-quick.interfaces = {
Tunnel = {
address = [ "10.0.0.5/24" ];
address = ["10.0.0.5/24"];
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
listenPort = 51820;
autostart = false;
postUp = "resolvectl dns Tunnel 10.0.0.1; resolvectl domain Tunnel ~thomasave.be;";
dns = ["10.0.0.1"];
peers = [{
peers = [
{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "0.0.0.0/0" "::/0" ];
allowedIPs = ["0.0.0.0/0" "::/0"];
endpoint = "external.thomasave.be:13231";
persistentKeepalive = 25;
}];
}
];
};
OPNsense = {
address = [ "10.0.0.5/24" ];
address = ["10.0.0.5/24"];
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
listenPort = 51820;
autostart = true;
postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;";
dns = ["10.0.0.1"];
peers = [{
peers = [
{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "10.0.0.1/8" "192.168.1.2/32" ];
allowedIPs = ["10.0.0.1/8" "192.168.1.2/32"];
endpoint = "external.thomasave.be:13231";
persistentKeepalive = 25;
}];
}
];
};
GCP = {
address = [ "10.5.0.5/24" ];
address = ["10.5.0.5/24"];
privateKeyFile = "/home/user/.secrets/Wireguard/GCP.key";
listenPort = 51820;
autostart = false;
postUp = "resolvectl dns GCP 1.1.1.1;resolvectl dns wlan0 1.1.1.1;";
peers = [{
peers = [
{
publicKey = "NEBNE4Czf2MkZF2X5aVhmofENH1uXjDpvXjIMJvfMFA=";
allowedIPs = [ "0.0.0.0/0" ];
allowedIPs = ["0.0.0.0/0"];
endpoint = "35.201.231.151:443";
persistentKeepalive = 25;
}];
}
];
};
};
systemd.services."wg-quick-OPNsense" = {
serviceConfig = { Restart = "on-failure"; RestartSec = "2s"; };
serviceConfig = {
Restart = "on-failure";
RestartSec = "2s";
};
unitConfig.StartLimitIntervalSec = 0;
};
services.usbmuxd.enable = true;

View File

@ -1,40 +1,44 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" "v4l2loopback" ];
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback tp_smapi ];
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel" "v4l2loopback"];
boot.extraModulePackages = with config.boot.kernelPackages; [v4l2loopback tp_smapi];
boot.extraModprobeConfig = ''
options thinkpad_acpi fan_control=1
options v4l2loopback exclusive_caps=1 card_label="Android Virtual Camera"
'';
boot.kernelParams = [ "ipv6.disable=1" ];
boot.kernelParams = ["ipv6.disable=1"];
fileSystems."/" =
{ device = "rpool/root";
fileSystems."/" = {
device = "rpool/root";
fsType = "zfs";
};
fileSystems."/home" =
{ device = "rpool/home";
fileSystems."/home" = {
device = "rpool/home";
fsType = "zfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/5C58-A909";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5C58-A909";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
options = ["fmask=0022" "dmask=0022"];
};
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

View File

@ -1,12 +1,18 @@
{ pkgs, lib, inputs, config, nixos-06cb-009a-fingerprint-sensor, ... }:
let
{
pkgs,
lib,
inputs,
config,
nixos-06cb-009a-fingerprint-sensor,
...
}: let
serverIP = "10.0.0.1";
in {
imports = [
(import ../Common/default.nix { inherit inputs pkgs config; })
(import ../Common/desktop.nix { inherit inputs pkgs config; })
(import ../Common/nfs.nix { inherit pkgs serverIP; })
(import ../Common/zfs.nix {inherit inputs pkgs config; })
(import ../Common/default.nix {inherit inputs pkgs config;})
(import ../Common/desktop.nix {inherit inputs pkgs config;})
(import ../Common/nfs.nix {inherit pkgs serverIP;})
(import ../Common/zfs.nix {inherit inputs pkgs config;})
];
hardware.graphics.extraPackages = [
@ -61,7 +67,7 @@ in {
virtualisation.libvirtd.enable = true;
virtualisation.spiceUSBRedirection.enable = true;
programs.virt-manager.enable = true;
users.users.user.extraGroups = [ "libvirtd" ];
users.users.user.extraGroups = ["libvirtd"];
services.tlp = {
enable = true;
@ -83,36 +89,43 @@ in {
systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false;
networking.wg-quick.interfaces = {
Tunnel = {
address = [ "10.0.0.7/24" "2a02:a03f:83ad:2101::7/128" ];
address = ["10.0.0.7/24" "2a02:a03f:83ad:2101::7/128"];
privateKeyFile = "/home/user/.secrets/Wireguard/Arendia.key";
listenPort = 51820;
autostart = false;
postUp = "resolvectl dns Tunnel 10.0.0.1; resolvectl domain Tunnel ~thomasave.be;";
dns = ["10.0.0.1"];
peers = [{
peers = [
{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "0.0.0.0/0" "::/0" ];
allowedIPs = ["0.0.0.0/0" "::/0"];
endpoint = "ipv4.thomasave.be:13231";
persistentKeepalive = 25;
}];
}
];
};
OPNsense = {
address = [ "10.0.0.7/24" "2a02:a03f:83ad:2101::7/128" ];
address = ["10.0.0.7/24" "2a02:a03f:83ad:2101::7/128"];
privateKeyFile = "/home/user/.secrets/Wireguard/Arendia.key";
listenPort = 51820;
autostart = true;
postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;";
dns = ["10.0.0.1"];
peers = [{
peers = [
{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "10.0.0.1/8" "192.168.1.2/32" ];
allowedIPs = ["10.0.0.1/8" "192.168.1.2/32"];
endpoint = "ipv4.thomasave.be:13231";
persistentKeepalive = 25;
}];
}
];
};
};
systemd.services."wg-quick-OPNsense" = {
serviceConfig = { Restart = "on-failure"; RestartSec = "2s"; };
serviceConfig = {
Restart = "on-failure";
RestartSec = "2s";
};
unitConfig.StartLimitIntervalSec = 0;
};
environment.systemPackages = with pkgs; [

View File

@ -1,14 +1,17 @@
{ config, lib, modulesPath, ... }:
{
config,
lib,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "rpool/root";
@ -23,10 +26,10 @@
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/12CE-A600";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
options = ["fmask=0022" "dmask=0022"];
};
swapDevices = [ ];
swapDevices = [];
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;

View File

@ -11,8 +11,11 @@
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
};
outputs = { nixpkgs, home-manager, ... }@inputs:
let
outputs = {
nixpkgs,
home-manager,
...
} @ inputs: let
system = "aarch64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
@ -21,7 +24,7 @@
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ../../home/Arm.nix ];
modules = [../../home/Arm.nix];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix

View File

@ -1,25 +1,32 @@
{ lib, inputs, config, pkgs, ... }:
let
{
lib,
inputs,
config,
pkgs,
...
}: let
serverIP = "192.168.1.2";
in {
imports = [
(import ../Common/default.nix { inherit inputs pkgs; })
(import ../Common/nvidia.nix { inherit inputs pkgs config; })
(import ../Common/desktop.nix { inherit inputs pkgs config; })
(import ../Common/nfs.nix { inherit pkgs serverIP; })
(import ../Common/default.nix {inherit inputs pkgs;})
(import ../Common/nvidia.nix {inherit inputs pkgs config;})
(import ../Common/desktop.nix {inherit inputs pkgs config;})
(import ../Common/nfs.nix {inherit pkgs serverIP;})
];
networking.wg-quick.interfaces = {
wg0 = {
address = [ "10.0.0.8/24" " 2a02:a03f:83ad:2101::8/128" ];
dns = [ "10.0.0.1" "fdc9:281f:04d7:9ee9::1" ];
address = ["10.0.0.8/24" " 2a02:a03f:83ad:2101::8/128"];
dns = ["10.0.0.1" "fdc9:281f:04d7:9ee9::1"];
privateKeyFile = "/home/user/.secrets/Wireguard/Asturia.key";
listenPort = 51820;
peers = [{
peers = [
{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "10.0.0.1/8" ];
allowedIPs = ["10.0.0.1/8"];
endpoint = "192.168.1.1:13231";
}];
}
];
};
};

View File

@ -1,30 +1,34 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "usbhid" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "usbhid" "sd_mod" "sr_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/721d0462-9488-435e-9690-f13f11557edc";
fileSystems."/" = {
device = "/dev/disk/by-uuid/721d0462-9488-435e-9690-f13f11557edc";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/CE52-0414";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/CE52-0414";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
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

View File

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
environment.sessionVariables.NIXOS_OZONE_WL = "1"; # hint electron apps to use wayland:
nixpkgs.config.allowUnfree = true;
@ -136,7 +135,7 @@
services.resolved = {
enable = pkgs.lib.mkDefault true;
settings.Resolve.FallbackDNS = [ "1.1.1.1" "1.0.0.1" ];
settings.Resolve.FallbackDNS = ["1.1.1.1" "1.0.0.1"];
};
networking.nameservers = pkgs.lib.mkDefault ["1.1.1.1" "1.0.0.1"];
}

View File

@ -1,6 +1,9 @@
{ inputs, pkgs, ... }:
{
services.udev.packages = [ pkgs.yubikey-personalization ];
inputs,
pkgs,
...
}: {
services.udev.packages = [pkgs.yubikey-personalization];
programs.appimage.enable = true;
programs.appimage.binfmt = true;

View File

@ -1,6 +1,8 @@
{pkgs, serverIP, ...}:
let
{
pkgs,
serverIP,
...
}: let
sharePath = "/home/server";
mountPath = "/home/server";
common_options = [
@ -18,25 +20,29 @@ let
"x-systemd.after=network-online.target"
"x-systemd.requires=network-online.target"
];
bind_options = [
bind_options =
[
"bind"
"x-systemd.after=${builtins.replaceStrings ["/"] ["-"] mountPath}.mount"
] ++ common_options;
]
++ common_options;
in {
services.rpcbind.enable = true;
boot.supportedFilesystems = [ "nfs" ];
boot.supportedFilesystems = ["nfs"];
fileSystems.${mountPath} = {
device = "${serverIP}:${sharePath}";
fsType = "nfs";
options = [
options =
[
"x-systemd.after=wg-quick-Tunnel.service"
"x-systemd.after=wg-quick-OPNsense.service"
] ++ common_options;
]
++ common_options;
};
systemd.services."${builtins.replaceStrings ["/"] ["-"] mountPath}-unmount" = {
description = "Unmount NFS share before shutdown";
wantedBy = [ "shutdown.target" ];
wantedBy = ["shutdown.target"];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;

View File

@ -1,6 +1,9 @@
{ pkgs, config, ... }:
{
services.xserver.videoDrivers = [ "nvidia" ];
pkgs,
config,
...
}: {
services.xserver.videoDrivers = ["nvidia"];
environment.systemPackages = with pkgs; [
pciutils
file

View File

@ -1,7 +1,6 @@
{ ... }:
{
boot.initrd.supportedFilesystems = [ "zfs" ];
boot.supportedFilesystems = [ "zfs" ];
{...}: {
boot.initrd.supportedFilesystems = ["zfs"];
boot.supportedFilesystems = ["zfs"];
services.zfs.autoScrub.enable = true;
services.sanoid = {
enable = true;

View File

@ -16,8 +16,11 @@
};
};
outputs = { nixpkgs, home-manager, ... }@inputs:
let
outputs = {
nixpkgs,
home-manager,
...
} @ inputs: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
@ -26,7 +29,7 @@
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ../../home/Docker.nix ];
modules = [../../home/Docker.nix];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix

View File

@ -1,23 +1,28 @@
{ lib, inputs, config, pkgs, ... }:
let
{
lib,
inputs,
config,
pkgs,
...
}: let
serverIP = "192.168.1.2";
in {
imports = [
(import ../Common/default.nix { inherit inputs pkgs; })
(import ../Common/default.nix {inherit inputs pkgs;})
# (import ../Common/nvidia.nix { inherit inputs pkgs config; })
(import ../Common/desktop.nix { inherit inputs pkgs config; })
(import ../Common/nfs.nix { inherit pkgs serverIP; })
(import ../Common/android.nix { inherit pkgs; })
(import ../Common/desktop.nix {inherit inputs pkgs config;})
(import ../Common/nfs.nix {inherit pkgs serverIP;})
(import ../Common/android.nix {inherit pkgs;})
];
# Kernel
boot.kernelPackages = pkgs.linuxPackages_latest;
# AMD CPU
boot.extraModulePackages = [ config.boot.kernelPackages.zenpower ];
boot.kernelModules = [ "zenpower amd_pstate=active" ];
boot.extraModulePackages = [config.boot.kernelPackages.zenpower];
boot.kernelModules = ["zenpower amd_pstate=active"];
boot.kernelParams = ["amd_pstate=active"];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.initrd.kernelModules = ["amdgpu"];
hardware.graphics.extraPackages = with pkgs; [
rocmPackages.clr.icd
@ -46,25 +51,27 @@ in {
virtualisation.libvirtd.enable = true;
virtualisation.spiceUSBRedirection.enable = true;
programs.virt-manager.enable = true;
users.users.user.extraGroups = [ "libvirtd" ];
users.users.user.extraGroups = ["libvirtd"];
networking.wg-quick.interfaces = {
wg0 = {
address = [ "10.0.0.10/24" " 2a02:a03f:83ad:2101::2/128" ];
dns = [ "10.0.0.1" "fdc9:281f:04d7:9ee9::1" ];
address = ["10.0.0.10/24" " 2a02:a03f:83ad:2101::2/128"];
dns = ["10.0.0.1" "fdc9:281f:04d7:9ee9::1"];
privateKeyFile = "/home/user/.secrets/Wireguard/Kell.key";
listenPort = 51820;
peers = [{
peers = [
{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "10.0.0.1/8" ];
allowedIPs = ["10.0.0.1/8"];
endpoint = "192.168.1.1:13231";
}];
}
];
};
};
networking.bridges = {
"br0" = {
interfaces = [ "enp5s0" ];
interfaces = ["enp5s0"];
};
};
networking.interfaces.br0.useDHCP = lib.mkDefault true;
@ -81,7 +88,6 @@ in {
# };
# };
# Programs & Services
programs.gnupg.agent.enable = true;
services.sunshine = {
@ -97,7 +103,7 @@ in {
specialisation = {
vfio.configuration = {
boot.blacklistedKernelModules = [ "k10temp" "nvidia" "nouveau" "radeon" "amdgpu"];
boot.blacklistedKernelModules = ["k10temp" "nvidia" "nouveau" "radeon" "amdgpu"];
boot = {
initrd.kernelModules = [
"kvm-amd"
@ -127,7 +133,7 @@ in {
services.greetd.enable = lib.mkForce false;
};
vfio-nvidia.configuration = {
boot.blacklistedKernelModules = [ "k10temp" "nvidia" "nouveau" ];
boot.blacklistedKernelModules = ["k10temp" "nvidia" "nouveau"];
boot = {
initrd.kernelModules = [
"kvm-amd"
@ -156,7 +162,10 @@ in {
hardware.sane = {
enable = true;
extraBackends = [
(pkgs.epsonscan2.override { withNonFreePlugins = true; withGui = true; } )
(pkgs.epsonscan2.override {
withNonFreePlugins = true;
withGui = true;
})
];
};
}

View File

@ -1,12 +1,15 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/daf843cd-8e63-48ed-831a-e055929e86cb";
@ -16,10 +19,10 @@
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/E1D9-7A48";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
options = ["fmask=0077" "dmask=0077"];
};
swapDevices = [ ];
swapDevices = [];
networking.useDHCP = lib.mkDefault false;

View File

@ -16,8 +16,11 @@
};
};
outputs = { nixpkgs, home-manager, ... }@inputs:
let
outputs = {
nixpkgs,
home-manager,
...
} @ inputs: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
@ -26,7 +29,7 @@
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ../../home/Mallorea.nix ];
modules = [../../home/Mallorea.nix];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix

View File

@ -11,8 +11,11 @@
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
};
outputs = { nixpkgs, home-manager, ... }@inputs:
let
outputs = {
nixpkgs,
home-manager,
...
} @ inputs: let
system = "aarch64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
@ -21,7 +24,7 @@
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ../../home/Pi.nix ];
modules = [../../home/Pi.nix];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix

View File

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

View File

@ -1,16 +1,19 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
config,
lib,
pkgs,
modulesPath,
...
}: {
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";
@ -20,10 +23,10 @@
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/9F3C-9F3B";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
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

View File

@ -11,8 +11,11 @@
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
};
outputs = { nixpkgs, home-manager, ... }@inputs:
let
outputs = {
nixpkgs,
home-manager,
...
} @ inputs: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
@ -21,7 +24,7 @@
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ../../home/Tolnedra.nix ];
modules = [../../home/Tolnedra.nix];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix

View File

@ -11,8 +11,11 @@
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
};
outputs = { nixpkgs, home-manager, ... }@inputs:
let
outputs = {
nixpkgs,
home-manager,
...
} @ inputs: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
@ -21,7 +24,7 @@
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ../../home/Vault.nix ];
modules = [../../home/Vault.nix];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix