Formatting

This commit is contained in:
Thomas Avé 2024-06-13 11:53:29 +02:00
parent d14db5a303
commit 9b4bd8fcc1
17 changed files with 438 additions and 425 deletions

View File

@ -38,16 +38,16 @@
time.timeZone = "Europe/Brussels";
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.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"
"https://nixos-rocm.cachix.org"
];
substituters = [
"https://hyprland.cachix.org"
"https://nix-community.cachix.org"
"https://cuda-maintainers.cachix.org"
"https://nixos-rocm.cachix.org"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
@ -107,5 +107,6 @@
Kell = { user = "user"; };
Aloria = { user = "user"; };
};
in { nixosConfigurations = nixpkgs.lib.mapAttrs mkSystem systems; };
in
{ nixosConfigurations = nixpkgs.lib.mapAttrs mkSystem systems; };
}

View File

@ -21,26 +21,26 @@
# 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"
];
bind = [
", XF86PowerOff, exec, ${pkgs.rofi}/bin/rofi -show power-menu -modi power-menu:${
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"
];
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.waybar.settings.mainBar = {
output = "eDP-1";
height = 28;
margin = "0 0 5 0";
"custom/temperature".exec = "${pkgs.lm_sensors}/bin/sensors | ${pkgs.gnugrep}/bin/grep Package | cut -c17-23";
output = "eDP-1";
height = 28;
margin = "0 0 5 0";
"custom/temperature".exec = "${pkgs.lm_sensors}/bin/sensors | ${pkgs.gnugrep}/bin/grep Package | cut -c17-23";
};
programs.alacritty.settings.font.size = 13;

View File

@ -16,37 +16,37 @@
};
};
programs.waybar.settings.mainBar = {
output = "DP-2";
"custom/temperature".exec = "${pkgs.lm_sensors}/bin/sensors | ${pkgs.gnugrep}/bin/grep Tctl | cut -c16-22";
output = "DP-2";
"custom/temperature".exec = "${pkgs.lm_sensors}/bin/sensors | ${pkgs.gnugrep}/bin/grep Tctl | cut -c16-22";
};
wayland.windowManager.hyprland.settings = {
monitor = [
"DP-3,preferred,0x550,1"
"DP-2,preferred,1920x0,1"
"HDMI-A-1,preferred,5760x550,1"
];
input.kb_options = "compose:rctrl, caps:super, altwin:swap_alt_win";
monitor = [
"DP-3,preferred,0x550,1"
"DP-2,preferred,1920x0,1"
"HDMI-A-1,preferred,5760x550,1"
];
input.kb_options = "compose:rctrl, caps:super, altwin:swap_alt_win";
};
programs.waybar.style = ''
* {
font-size: 18px;
font-weight:400;
}
#tray {
padding: 0 14px;
margin-left:4px;
margin-right:4px;
margin-top:2px;
margin-bottom:2px;
}
#workspaces {
margin: 4px 9px;
}
#wireplumber {
background-color: #023269;
}
#tray {
background-color: #1f2430;
}
* {
font-size: 18px;
font-weight:400;
}
#tray {
padding: 0 14px;
margin-left:4px;
margin-right:4px;
margin-top:2px;
margin-bottom:2px;
}
#workspaces {
margin: 4px 9px;
}
#wireplumber {
background-color: #023269;
}
#tray {
background-color: #1f2430;
}
'';
}

View File

@ -1,7 +1,7 @@
{ inputs, config, pkgs, ... }:
let
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" ''
@ -49,7 +49,8 @@ let
'');
};
};
in {
in
{
home.username = "server";
home.homeDirectory = "/home/server";
nix = {
@ -60,9 +61,9 @@ in {
xdg.enable = true;
imports = [
(import ./utils/common.nix { inherit inputs config pkgs; })
(import ./utils/services.nix { inherit pkgs; scripts=scripts; })
./ssh
(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";

View File

@ -21,33 +21,34 @@ let
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
/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" ''
/Backup/Restic/Magda\ and\ Etienne/run.sh
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/yvBuDgduDd
/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" ''
/Backup/Restic/BackBlaze/run.sh
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/LVruVYTwTn
/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" ''
cd /home/server/Containers/Mails && docker compose up sync-etienne sync-magda
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/eEIPVGyrAx
cd /home/server/Containers/Mails && docker compose up sync-etienne sync-magda
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/eEIPVGyrAx
'');
};
};
in {
in
{
home.username = "server";
home.homeDirectory = "/home/server";
nix = {
@ -57,9 +58,9 @@ in {
xdg.enable = true;
imports = [
(import ./common.nix { inherit inputs config pkgs; })
(import ./utils/services.nix { inherit pkgs; scripts=scripts; })
./ssh
(import ./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";

View File

@ -4,62 +4,63 @@ let
Value = false;
Status = "locked";
};
in {
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;
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";
};
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";
};
"{ea4204c0-3209-4116-afd2-2a208e21a779}" = {
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/enable-bing-chat/latest.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;
"{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;
};
};
};
profiles = {
default = {

View File

@ -20,7 +20,7 @@ let
'';
workspace_command_prefix = "split-";
hyprland_plugins = [inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces];
hyprland_plugins = [ inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces ];
# Disable split-monitor-workspaces
# workspace_command_prefix = "";
@ -61,7 +61,8 @@ let
fi
fi
'';
in {
in
{
services.kdeconnect = {
enable = true;
package = pkgs.kdePackages.kdeconnect-kde;
@ -69,27 +70,27 @@ in {
};
home.packages = [
pkgs.wl-clipboard
pkgs.jq
pkgs.wl-clipboard
pkgs.jq
];
gtk = {
enable = true;
theme = {
package = pkgs.gnome.gnome-themes-extra;
name = "Adwaita-dark";
};
iconTheme = {
name = "Papirus";
package = pkgs.papirus-icon-theme;
};
enable = true;
theme = {
package = pkgs.gnome.gnome-themes-extra;
name = "Adwaita-dark";
};
iconTheme = {
name = "Papirus";
package = pkgs.papirus-icon-theme;
};
};
home.pointerCursor = {
gtk.enable = true;
name = "Adwaita";
size = 28;
package = pkgs.gnome.adwaita-icon-theme;
gtk.enable = true;
name = "Adwaita";
size = 28;
package = pkgs.gnome.adwaita-icon-theme;
};
services.cliphist = { enable = true; };
@ -132,7 +133,7 @@ in {
systemd.enableXdgAutostart = true;
xwayland.enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
plugins = [] ++ hyprland_plugins;
plugins = [ ] ++ hyprland_plugins;
settings = {
"$mainMod" = "SUPER";
exec-once = [
@ -266,13 +267,15 @@ in {
] ++ (
# 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));
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

@ -12,115 +12,116 @@
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";
};
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";
};
"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";
};
"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";
};
"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";
};
"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";
};
"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";
};
"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";
};
"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";
};
"message" = {
children = mkLiteral "[ textbox ]";
border-radius = mkLiteral "5px";
};
"textbox" = {
background-color = mkLiteral "@selected";
text-color = mkLiteral "@foreground";
padding = mkLiteral "20px 6px 20px 80px";
};
"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" = {
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-text, element-icon" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
};
"element-icon" = {
size = mkLiteral "40px";
border = mkLiteral "10px";
};
"element-icon" = {
size = mkLiteral "40px";
border = mkLiteral "10px";
};
"element-text" = { padding = mkLiteral "20px 0px 0px 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";
"element selected" = {
background-color = mkLiteral "@selected";
text-color = mkLiteral "@selected-text";
border = mkLiteral "0px";
border-radius = mkLiteral "3px";
border-color = mkLiteral "@selected";
};
};
};
};
}

View File

@ -13,7 +13,8 @@ let
};
};
in {
in
{
programs.tmux = {
shell = "${pkgs.zsh}/bin/zsh";
terminal = "screen-256color";

View File

@ -12,12 +12,12 @@
../mpv
];
home.packages = with pkgs; [
telegram-desktop
webcord
devenv
iwgtk
element-desktop
evince
loupe
telegram-desktop
webcord
devenv
iwgtk
element-desktop
evince
loupe
];
}

View File

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

View File

@ -1,8 +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
@ -66,10 +67,10 @@ in
{
systemd.user.services = pkgs.lib.mapAttrs mkService scripts
// (pkgs.lib.mapAttrs mkService {
"status_notify@" = {
script = "${notify_script}/bin/telegram-notify.py %i";
};
});
"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,12 +1,12 @@
{ pkgs, inputs, config, ... }:
{
imports = [
(import ../Common/default.nix { inherit inputs pkgs config; })
(import ../Common/nvidia.nix { inherit inputs pkgs config; })
(import ../Common/default.nix { inherit inputs pkgs config; })
(import ../Common/nvidia.nix { inherit inputs pkgs config; })
];
hardware.opengl.extraPackages = [
pkgs.intel-compute-runtime
pkgs.intel-media-driver
pkgs.intel-compute-runtime
pkgs.intel-media-driver
];
# services.ollama = {
@ -23,7 +23,7 @@
postUp = "resolvectl dns wg0 10.0.0.1; resolvectl domain wg0 ~thomasave.be;";
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 = "h.thomasave.be:13231";
persistentKeepalive = 25;
}];

View File

@ -5,7 +5,8 @@
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ];
@ -14,12 +15,14 @@
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/e34f26e4-2f68-4f9c-ab7d-836b4f4b9f74";
{
device = "/dev/disk/by-uuid/e34f26e4-2f68-4f9c-ab7d-836b4f4b9f74";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/90D9-F457";
{
device = "/dev/disk/by-uuid/90D9-F457";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};

View File

@ -1,140 +1,140 @@
{ pkgs, ... }:
{
security.polkit.enable = true;
security.polkit.enable = true;
boot.loader.systemd-boot.memtest86.enable = true;
boot.loader.systemd-boot.netbootxyz.enable = true;
boot.loader.timeout = 1;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.memtest86.enable = true;
boot.loader.systemd-boot.netbootxyz.enable = true;
boot.loader.timeout = 1;
boot.loader.efi.canTouchEfiVariables = true;
services.thermald.enable = true;
services.pcscd.enable = true;
services.fwupd.enable = true;
services.gvfs.enable = true;
services.fstrim.enable = true;
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
services.thermald.enable = true;
services.pcscd.enable = true;
services.fwupd.enable = true;
services.gvfs.enable = true;
services.fstrim.enable = true;
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
programs.zsh.enable = true;
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
programs.zsh.enable = true;
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
iosevka
nerdfonts
roboto
font-awesome
];
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
networking.firewall.enable = false;
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;
};
};
networking.firewall.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
environment.systemPackages = with pkgs; [
wget
curl
git
lm_sensors
wireguard-tools
services.greetd = {
enable = true;
settings = rec {
initial_session = {
command = "Hyprland";
user = "user";
};
default_session = initial_session;
};
};
# Podman
dive
podman-tui
docker-compose
];
services.udev.packages = [ pkgs.yubikey-personalization ];
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
virtualisation.containers.enable = true;
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
environment.systemPackages = with pkgs; [
wget
curl
git
lm_sensors
wireguard-tools
};
# Podman
dive
podman-tui
docker-compose
];
services.udev.packages = [ pkgs.yubikey-personalization ];
# Calendar
# Add the server using gnome-online-accounts:
# nix-shell -p gnome.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;
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" ];
};
# Calendar
# Add the server using gnome-online-accounts:
# nix-shell -p gnome.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;
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.resolved = {
enable = true;
fallbackDns = [ "1.1.1.1" "1.0.0.1" ];
};
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;
};
};
fileSystems."/home/server" = {
device = "10.1:/home/server";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
fileSystems."/home/user/Workspace" = {
device = "10.1:/home/server/Workspace";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
fileSystems."/home/user/Documents" = {
device = "10.1:/home/server/Storage/Thomas/Documents";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
fileSystems."/home/user/Pictures" = {
device = "10.1:/home/server/Storage/Thomas/Pictures";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
fileSystems."/home/user/Videos" = {
device = "10.1:/home/server/Storage/Thomas/Videos";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
fileSystems."/home/server" = {
device = "10.1:/home/server";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
fileSystems."/home/user/Workspace" = {
device = "10.1:/home/server/Workspace";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
fileSystems."/home/user/Documents" = {
device = "10.1:/home/server/Storage/Thomas/Documents";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
fileSystems."/home/user/Pictures" = {
device = "10.1:/home/server/Storage/Thomas/Pictures";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
fileSystems."/home/user/Videos" = {
device = "10.1:/home/server/Storage/Thomas/Videos";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
}

View File

@ -1,44 +1,44 @@
{ pkgs, config, ... }:
{
services.xserver.videoDrivers = ["nvidia"];
environment.systemPackages = with pkgs; [
# Cuda
pciutils
file
gnumake
gcc
cudatoolkit
];
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";
services.xserver.videoDrivers = [ "nvidia" ];
environment.systemPackages = with pkgs; [
# Cuda
pciutils
file
gnumake
gcc
cudatoolkit
];
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";
};
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

@ -2,7 +2,7 @@
{
imports = [
(import ../Common { inherit inputs pkgs; })
(import ../Common { inherit inputs pkgs; })
];
# AMD CPU
@ -15,7 +15,7 @@
services.logind.extraConfig = ''HandlePowerKey=suspend'';
services.ollama = {
enable = true;
enable = true;
};
networking.wg-quick.interfaces = {