mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 09:27:44 -04:00
NixOS restructuring, move common imports to lib
This commit is contained in:
parent
f95cc09e13
commit
d72f1264b2
35 changed files with 33 additions and 92 deletions
3
modules/hosts/common/linux/apps/hexchat.nix
Normal file
3
modules/hosts/common/linux/apps/hexchat.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{ ... }: {
|
||||
programs.hexchat.enable = true;
|
||||
}
|
||||
3
modules/hosts/common/linux/apps/pidgin.nix
Normal file
3
modules/hosts/common/linux/apps/pidgin.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{ ... }: {
|
||||
programs.pidgin.enable = true;
|
||||
}
|
||||
30
modules/hosts/common/linux/apps/tilix.nix
Normal file
30
modules/hosts/common/linux/apps/tilix.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, pkgs, ... }: with lib.hm.gvariant; {
|
||||
|
||||
dconf.settings = {
|
||||
"com/gexperts/Tilix/profiles/2b7c4080-0ddd-46c5-8f23-563fd3ba789d" = {
|
||||
background-color = "#272822";
|
||||
background-transparency-percent = 10;
|
||||
badge-color-set = false;
|
||||
bold-color-set = false;
|
||||
cursor-colors-set = false;
|
||||
font = "Hack Nerd Font Mono 12";
|
||||
foreground-color = "#F8F8F2";
|
||||
highlight-colors-set = false;
|
||||
palette = [ "#272822" "#F92672" "#A6E22E" "#F4BF75" "#66D9EF" "#AE81FF" "#A1EFE4" "#F8F8F2" "#75715E" "#F92672" "#A6E22E" "#F4BF75" "#66D9EF" "#AE81FF" "#A1EFE4" "#F9F8F5" ];
|
||||
use-system-font = false;
|
||||
use-theme-colors = false;
|
||||
visible-name = "Default";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".config/tilix/schemes/Beanbag-Mathias.json".source = ../../files/tilix/Beanbag-Mathias.json;
|
||||
".config/tilix/schemes/Catppuccin-Frappe.json".source = (pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "tilix";
|
||||
rev = "3fd05e03419321f2f2a6aad6da733b28be1765ef";
|
||||
hash = "sha256-SI7QxQ+WBHzeuXbTye+s8pi4tDVZOV4Aa33mRYO276k=";
|
||||
} + "/src/Catppuccin-Frappe.json");
|
||||
};
|
||||
}
|
||||
17
modules/hosts/common/linux/apps/waybar.nix
Normal file
17
modules/hosts/common/linux/apps/waybar.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, ... }: {
|
||||
home.file = {
|
||||
".config/waybar/config".source = ../../files/waybar/config;
|
||||
".config/waybar/frappe.css".source = (pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "waybar";
|
||||
rev = "f74ab1eecf2dcaf22569b396eed53b2b2fbe8aff";
|
||||
hash = "sha256-WLJMA2X20E5PCPg0ZPtSop0bfmu+pLImP9t8A8V4QK8=";
|
||||
} + "/themes/frappe.css");
|
||||
".config/waybar/style.css".source = ../../files/waybar/style.css;
|
||||
};
|
||||
|
||||
programs = {
|
||||
# Using file in ../../files/waybar/ to configure waybar
|
||||
waybar.enable = true;
|
||||
};
|
||||
}
|
||||
46
modules/hosts/common/linux/apps/xfce4-terminal.nix
Normal file
46
modules/hosts/common/linux/apps/xfce4-terminal.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ ... }: {
|
||||
home.file = {
|
||||
".config/xfce4/terminal/accels.scm".source = ../../files/xfce4/terminal/accels.scm;
|
||||
};
|
||||
|
||||
xfconf.settings = {
|
||||
xfce4-terminal = {
|
||||
"background-mode" = "TERMINAL_BACKGROUND_TRANSPARENT";
|
||||
"background-darkness" = "0.90000000000000000";
|
||||
"color-foreground" = "#e3e3ea";
|
||||
"color-background" = "#08052b";
|
||||
"color-cursor" = "#ff7f7f";
|
||||
"color-cursor-use-default" = false;
|
||||
"color-palette" = "#000000;#e52222;#a6e32d;#fc951e;#c48dff;#fa2573;#67d9f0;#f2f2f2;#555555;#ff5555;#55ff55;#ffff55;#5555ff;#ff55ff;#55ffff;#ffffff";
|
||||
"font-name" = "Hack Nerd Font Mono 12";
|
||||
"misc-always-show-tabs" = false;
|
||||
"misc-bell" = false;
|
||||
"misc-bell-urgent" = true;
|
||||
"misc-borders-default" = true;
|
||||
"misc-cursor-blinks" = false;
|
||||
"misc-cursor-shape" = "TERMINAL_CURSOR_SHAPE_BLOCK";
|
||||
"misc-default-geometry" = "120x24";
|
||||
"misc-inherit-geometry" = false;
|
||||
"misc-menubar-default" = true;
|
||||
"misc-mouse-autohide" = false;
|
||||
"misc-mouse-wheel-zoom" = true;
|
||||
"misc-toolbar-default" = false;
|
||||
"misc-confirm-close" = true;
|
||||
"misc-cycle-tabs" = true;
|
||||
"misc-tab-close-buttons" = true;
|
||||
"misc-tab-close-middle-click" = true;
|
||||
"misc-tab-position" = "GTK_POS_TOP";
|
||||
"misc-highlight-urls" = true;
|
||||
"misc-middle-click-opens-uri" = false;
|
||||
"misc-copy-on-select" = false;
|
||||
"misc-show-relaunch-dialog" = true;
|
||||
"misc-rewrap-on-resize" = true;
|
||||
"misc-slim-tabs" = true;
|
||||
"misc-new-tab-adjacent" = false;
|
||||
"misc-search-dialog-opacity" = "100";
|
||||
"misc-show-unsafe-paste-dialog" = true;
|
||||
"scrolling-unlimited" = true;
|
||||
"title-initial" = "xfce4-terminal";
|
||||
};
|
||||
};
|
||||
}
|
||||
20
modules/hosts/common/linux/flatpaks.nix
Normal file
20
modules/hosts/common/linux/flatpaks.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
{ ... }: {
|
||||
services = {
|
||||
flatpak = {
|
||||
enable = true;
|
||||
packages = [
|
||||
"im.riot.Riot"
|
||||
"com.cassidyjames.butler"
|
||||
"com.logseq.Logseq"
|
||||
"com.vivaldi.Vivaldi"
|
||||
"org.signal.Signal"
|
||||
"org.telegram.desktop"
|
||||
];
|
||||
update.auto = {
|
||||
enable = true;
|
||||
onCalendar = "daily";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/hosts/common/linux/home.nix
Normal file
17
modules/hosts/common/linux/home.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
fastfetch
|
||||
];
|
||||
|
||||
programs = {
|
||||
# Linux-specific aliases
|
||||
zsh.shellAliases = {
|
||||
nixboot = "sudo nixos-rebuild boot --flake ~/repos/dots && echo 'Time to reboot!'";
|
||||
nixdiff = "cd ~/repos/dots && nixos-rebuild build --flake . && nvd diff /run/current-system result";
|
||||
nixup = "sudo nixos-rebuild switch --flake ~/repos/dots";
|
||||
uwgconnect = "nmcli dev wifi connect SecureWest password";
|
||||
uwgforget = "nmcli connection delete SecureWest";
|
||||
ykey = "sudo systemctl restart pcscd && sudo pkill -9 gpg-agent && source ~/.zshrc; ssh-add -L";
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/hosts/common/linux/internationalisation.nix
Normal file
17
modules/hosts/common/linux/internationalisation.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ ... }: {
|
||||
# Select internationalisation properties.
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
};
|
||||
}
|
||||
26
modules/hosts/common/linux/lets-encrypt.nix
Normal file
26
modules/hosts/common/linux/lets-encrypt.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ config, username, ... }: {
|
||||
|
||||
##########################################################################
|
||||
# #
|
||||
# This module sets up Let's Encrypt certs via a DNS challenge to Gandi #
|
||||
# #
|
||||
##########################################################################
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults = {
|
||||
email = "lets-encrypt@technicalissues.us";
|
||||
credentialFiles = { "GANDIV5_API_KEY_FILE" = "${config.sops.secrets.gandi_api.path}"; };
|
||||
#credentialFiles = { "GANDIV5_PERSONAL_ACCESS_TOKEN_FILE" = gandi_dns_pat; };
|
||||
dnsProvider = "gandiv5";
|
||||
dnsResolver = "ns1.gandi.net";
|
||||
# uncomment below for testing
|
||||
#server = "https://acme-staging-v02.api.letsencrypt.org/directory";
|
||||
};
|
||||
};
|
||||
|
||||
sops = {
|
||||
age.keyFile = "${config.users.users.${username}.home}/.config/sops/age/keys.txt";
|
||||
secrets.gandi_api.sopsFile = ../secrets.yaml;
|
||||
};
|
||||
}
|
||||
28
modules/hosts/common/linux/restic.nix
Normal file
28
modules/hosts/common/linux/restic.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ config, pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
restic
|
||||
];
|
||||
|
||||
sops.secrets = {
|
||||
restic_env.sopsFile = ../secrets.yaml;
|
||||
restic_repo.sopsFile = ../secrets.yaml;
|
||||
restic_password.sopsFile = ../secrets.yaml;
|
||||
};
|
||||
|
||||
services.restic.backups = {
|
||||
daily = {
|
||||
initialize = true;
|
||||
|
||||
environmentFile = config.sops.secrets.restic_env.path;
|
||||
repositoryFile = config.sops.secrets.restic_repo.path;
|
||||
passwordFile = config.sops.secrets.restic_password.path;
|
||||
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 5"
|
||||
"--keep-monthly 6"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue