forked from aylac.top/nixcfg
this repo has no description

lots of nice little things

Changed files
+298 -140
homes
hosts
morgana
nanpi
modules
home
desktop
gnome
profiles
programs
firefox
nixos
desktop
gnome
profiles
backups
programs
lanzaboote
systemd-boot
services
snippets
tailnet
+3 -3
flake.lock
···
"secrets": {
"flake": false,
"locked": {
-
"lastModified": 1755232543,
-
"narHash": "sha256-yPznFCGxCUmrwoImFqJJTujHvxPkv7c6ghZ7Bb0bRHo=",
+
"lastModified": 1755237741,
+
"narHash": "sha256-C+CxCeKEIyqqa3LyAU6Eg0JSYiT+EH+DVMUJMBU5ymE=",
"owner": "ayla6",
"repo": "secrets",
-
"rev": "51f893aea0469b4a55a20580382426c967803415",
+
"rev": "bd19c1b8652e12d12580655fad000c44d7cad698",
"type": "github"
},
"original": {
+9 -6
homes/ayla/default.nix
···
home = {
packages = with pkgs; [
rclone
+
rclone-browser
];
username = "ayla";
+
stateVersion = "25.05";
};
programs.home-manager.enable = true;
···
programs = {
chromium.enable = true;
fastfetch.enable = true;
-
firefox.enable = true;
+
firefox = {
+
enable = true;
+
mode = "sidebar";
+
};
git.enable = true;
micro.enable = true;
mpv.enable = true;
···
defaultApps = {
enable = true;
forceMimeAssociations = true;
+
archiveViewer.package = pkgs.file-roller;
audioPlayer.package = config.programs.mpv.finalPackage;
videoPlayer.package = config.programs.mpv.finalPackage;
editor.package = pkgs.gnome-text-editor;
···
fonts.enable = false;
};
};
+
+
systemd.user.startServices = true; # Needed for auto-mounting agenix secrets.
}
(lib.mkIf pkgs.stdenv.isLinux {
···
prismlauncher
mindustry
];
-
-
stateVersion = "25.05";
-
username = "ayla";
};
-
-
systemd.user.startServices = true; # Needed for auto-mounting agenix secrets.
})
];
}
+1
hosts/morgana/secrets.nix
···
tailscaleAuthKey.file = "${self.inputs.secrets}/tailscale/auth.age";
syncthingCert.file = "${self.inputs.secrets}/ayla/syncthing/morgana/cert.age";
syncthingKey.file = "${self.inputs.secrets}/ayla/syncthing/morgana/key.age";
+
rclone.file = "${self.inputs.secrets}/rclone.age";
};
}
+9
hosts/nanpi/services.nix
···
};
};
+
# it's failing to build because it can't download some stuff
+
# immich = {
+
# enable = true;
+
# host = "0.0.0.0";
+
# mediaLocation = "${dataDirectory}/immich";
+
# openFirewall = true;
+
# inherit (config.mySnippets.tailnet.networkMap.immich) port;
+
# };
+
jellyfin = {
enable = true;
openFirewall = true;
+1
modules/home/desktop/gnome/default.nix
···
or (lib.getExe config.programs.firefox.finalPackage);
fileManager = config.myHome.profiles.defaultApps.fileManager.exec or (lib.getExe pkgs.nautilus);
editor = config.myHome.profiles.defaultApps.editor.exec or (lib.getExe pkgs.gnome-text-editor);
+
archiveViewer = config.myHome.profiles.defaultApps.archiveViewer.exec or (lib.getExe pkgs.file-roller);
};
in {
"org/gnome/desktop/datetime".automatic-timezone = true;
+29 -6
modules/home/profiles/defaultApps/default.nix
···
enable = lib.mkEnableOption "enforce default applications";
forceMimeAssociations = lib.mkEnableOption "force mime associations for defaultApps";
+
archiveViewer = {
+
package = lib.mkOption {
+
type = lib.types.package;
+
default = pkgs.nemo;
+
description = "The default archive viewer package.";
+
};
+
+
exec = lib.mkOption {
+
type = lib.types.str;
+
default = lib.getExe cfg.archiveViewer.package;
+
description = "The executable path for the default archive viewer.";
+
};
+
};
+
audioPlayer = {
package = lib.mkOption {
type = lib.types.package;
···
};
xdg = {
-
configFile."xfce4/helpers.rc".text = ''
-
FileManager=${builtins.baseNameOf cfg.fileManager.exec}
-
TerminalEmulator=${builtins.baseNameOf cfg.terminal.exec}
-
WebBrowser=${builtins.baseNameOf cfg.webBrowser.exec}
-
'';
+
configFile = {
+
"xfce4/helpers.rc".text = ''
+
FileManager=${builtins.baseNameOf cfg.fileManager.exec}
+
TerminalEmulator=${builtins.baseNameOf cfg.terminal.exec}
+
WebBrowser=${builtins.baseNameOf cfg.webBrowser.exec}
+
'';
+
"mimeapps.list" = lib.mkIf cfg.forceMimeAssociations {
+
force = true;
+
};
+
};
mimeApps = lib.mkIf cfg.forceMimeAssociations {
enable = true;
···
imageTypes = mkDefaults mimeTypes.imageFiles "defaultImageViewer.desktop";
videoTypes = mkDefaults mimeTypes.videoFiles "defaultVideoPlayer.desktop";
+
+
archiveTypes = mkDefaults mimeTypes.archiveFiles "defaultArchiveViewer.desktop";
in
audioTypes
// browserTypes
···
// editorTypes
// folderTypes
// imageTypes
-
// videoTypes;
+
// videoTypes
+
// archiveTypes;
};
desktopEntries = let
···
defaultPdfViewer = mkDefaultEntry "PDF Viewer" cfg.pdfViewer.exec;
defaultVideoPlayer = mkDefaultEntry "Video Player" cfg.videoPlayer.exec;
defaultWebBrowser = mkDefaultEntry "Web Browser" cfg.webBrowser.exec;
+
defaultArchiveViewer = mkDefaultEntry "Archive Viewer" cfg.archiveViewer.exec;
};
};
};
+22
modules/home/profiles/defaultApps/mimeTypes.nix
···
"video/x-theora+ogg"
"x-content/video-dvd"
];
+
+
archiveFiles = [
+
"application/gzip"
+
"application/vnd.rar"
+
"application/x-7z-compressed"
+
"application/x-bzip"
+
"application/x-bzip2"
+
"application/x-compress"
+
"application/x-cpio"
+
"application/x-deb"
+
"application/x-gtar"
+
"application/x-gzip"
+
"application/x-lha"
+
"application/x-lzh"
+
"application/x-lzma"
+
"application/x-rar"
+
"application/x-rpm"
+
"application/x-tar"
+
"application/x-xz"
+
"application/x-zip-compressed"
+
"application/zip"
+
];
}
+121 -86
modules/home/programs/firefox/default.nix
···
}: let
engines = import ./engines.nix;
in {
-
options.myHome.programs.firefox.enable = lib.mkEnableOption "firefox web browser";
+
options.myHome.programs.firefox = {
+
enable = lib.mkEnableOption "firefox web browser";
+
mode = lib.mkOption {
+
type = lib.types.enum ["onebar" "sidebar" "default"];
+
default = "onebar";
+
description = "Firefox UI mode";
+
};
+
};
-
config = lib.mkIf config.myHome.programs.firefox.enable {
-
programs.firefox = {
-
enable = true;
-
languagePacks = [
-
"en-GB"
-
"en"
-
"en-US"
-
];
+
config.programs.firefox = lib.mkMerge [
+
(lib.mkIf
+
config.myHome.programs.firefox.enable
+
{
+
enable = true;
+
languagePacks = [
+
"en-GB"
+
"en"
+
"en-US"
+
];
-
profiles = {
-
default = {
-
id = 0;
-
isDefault = true;
+
profiles = {
+
default = {
+
id = 0;
+
isDefault = true;
-
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
-
consent-o-matic
-
ublock-origin
-
aria2-integration
-
adaptive-tab-bar-colour
-
keepassxc-browser
-
libredirect
-
stylus
-
violentmonkey
-
ublacklist
-
steam-database
-
snowflake
-
sponsorblock
-
search-by-image
-
ff2mpv
-
];
+
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
+
consent-o-matic
+
ublock-origin
+
aria2-integration
+
adaptive-tab-bar-colour
+
keepassxc-browser
+
libredirect
+
stylus
+
violentmonkey
+
ublacklist
+
steam-database
+
snowflake
+
sponsorblock
+
search-by-image
+
ff2mpv
+
];
-
search = {
-
inherit engines;
-
default = "Unduck";
-
force = true;
+
search = {
+
inherit engines;
+
default = "Unduck";
+
force = true;
-
order = [
-
"Unduck"
-
"Home Manager Options"
-
"NixOS Wiki"
-
"nixpkgs"
-
"Wikipedia"
-
"Wiktionary"
-
];
+
order = [
+
"Unduck"
+
"Home Manager Options"
+
"NixOS Wiki"
+
"nixpkgs"
+
"Wikipedia"
+
"Wiktionary"
+
];
+
};
+
+
settings =
+
(import ./betterfox/fastfox.nix)
+
// (import ./betterfox/peskyfox.nix)
+
// (import ./betterfox/securefox.nix)
+
// (import ./betterfox/smoothfox.nix)
+
// {
+
"browser.tabs.groups.enabled" = true;
+
"browser.tabs.groups.smart.enabled" = true;
+
"browser.toolbars.bookmarks.visibility" = "newtab";
+
"svg.context-properties.content.enabled" = true;
+
"browser.uidensity" = 1;
+
"general.autoScroll" = true;
+
"ui.key.menuAccessKeyFocuses" = false;
+
"browser.search.separatePrivateDefault" = false;
+
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
+
"browser.ml.chat.sidebar" = false;
+
};
+
+
userContent = ''
+
@font-face {
+
font-family: "Segoe UI";
+
src: url("${pkgs.roboto-flex}/share/fonts/truetype/RobotoFlex[GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght].ttf");
+
}
+
@font-face {
+
font-family: "system-ui";
+
src: url("${pkgs.roboto-flex}/share/fonts/truetype/RobotoFlex[GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght].ttf");
+
}
+
@font-face {
+
font-family: "-apple-system";
+
src: url("${pkgs.roboto-flex}/share/fonts/truetype/RobotoFlex[GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght].ttf");
+
}
+
@font-face {
+
font-family: "BlinkMacSystemFont";
+
src: url("${pkgs.roboto-flex}/share/fonts/truetype/RobotoFlex[GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght].ttf");
+
}
+
'';
};
+
};
+
})
-
settings =
-
(import ./betterfox/fastfox.nix)
-
// (import ./betterfox/peskyfox.nix)
-
// (import ./betterfox/securefox.nix)
-
// (import ./betterfox/smoothfox.nix)
-
// {
-
"browser.tabs.groups.enabled" = true;
-
"browser.tabs.groups.smart.enabled" = true;
-
"browser.toolbars.bookmarks.visibility" = "newtab";
-
"svg.context-properties.content.enabled" = true;
-
"browser.uidensity" = 1;
-
"general.autoScroll" = true;
-
"ui.key.menuAccessKeyFocuses" = false;
-
"browser.search.separatePrivateDefault" = false;
-
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
-
-
# OneBar settings
-
"onebar.collapse-URLbar" = true;
-
"onebar.conditional-navigation-buttons" = false;
-
"onebar.hide-all-URLbar-icons" = true;
-
};
+
(lib.mkIf
+
(config.myHome.programs.firefox.mode == "onebar")
+
{
+
profiles.default = {
+
settings = {
+
"onebar.collapse-URLbar" = true;
+
"onebar.conditional-navigation-buttons" = false;
+
"onebar.hide-all-URLbar-icons" = true;
+
};
userChrome = builtins.readFile self.inputs.firefox-onebar;
+
};
+
})
-
userContent = ''
-
@font-face {
-
font-family: "Segoe UI";
-
src: url("${pkgs.roboto-flex}/share/fonts/truetype/RobotoFlex[GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght].ttf");
-
}
-
@font-face {
-
font-family: "system-ui";
-
src: url("${pkgs.roboto-flex}/share/fonts/truetype/RobotoFlex[GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght].ttf");
-
}
-
@font-face {
-
font-family: "-apple-system";
-
src: url("${pkgs.roboto-flex}/share/fonts/truetype/RobotoFlex[GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght].ttf");
-
}
-
@font-face {
-
font-family: "BlinkMacSystemFont";
-
src: url("${pkgs.roboto-flex}/share/fonts/truetype/RobotoFlex[GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght].ttf");
-
}
-
'';
+
(lib.mkIf
+
(config.myHome.programs.firefox.mode == "sidebar")
+
{
+
profiles.default = {
+
settings = {
+
"sidebar.revamp" = true;
+
"sidebar.verticalTabs" = true;
+
};
};
-
test = {
-
id = 1;
-
isDefault = false;
+
})
+
+
(lib.mkIf
+
(config.myHome.programs.firefox.mode != "sidebar")
+
{
+
profiles.default = {
+
settings = {
+
"sidebar.revamp" = false;
+
"sidebar.verticalTabs" = false;
+
};
};
-
};
-
};
-
};
+
})
+
];
}
+4 -2
modules/nixos/desktop/gnome/default.nix
···
];
services = {
-
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};
···
];
};
-
myNixOS.desktop.enable = true;
+
myNixOS = {
+
desktop.enable = true;
+
services.gdm.enable = true;
+
};
#qt = {
# enable = true;
+38 -36
modules/nixos/profiles/backups/default.nix
···
pkgs,
...
}: let
-
backupDestination = "rclone:gdrive:/backups/${config.networking.hostName}";
-
mkRepo = service: "${backupDestination}/${service}";
+
backupDestinationA = "rclone:gdrive:/backups/${config.networking.hostName}";
+
mkRepoA = service: "${backupDestinationA}/${service}";
+
#backupDestinationB = "rclone:gdrive:/backups/${config.networking.hostName}";
+
#mkRepoB = service: "${backupDestinationB}/${service}";
stop = service: "${pkgs.systemd}/bin/systemctl stop ${service}";
start = service: "${pkgs.systemd}/bin/systemctl start ${service}";
in {
···
backupCleanupCommand = start "audiobookshelf";
backupPrepareCommand = stop "audiobookshelf";
paths = [config.services.audiobookshelf.dataDir];
-
repository = mkRepo "audiobookshelf";
+
repository = mkRepoA "audiobookshelf";
}
);
···
backupCleanupCommand = start "bazarr";
backupPrepareCommand = stop "bazarr";
paths = [config.services.bazarr.dataDir];
-
repository = mkRepo "bazarr";
+
repository = mkRepoA "bazarr";
}
);
···
backupCleanupCommand = start "couchdb";
backupPrepareCommand = stop "couchdb";
paths = [config.services.couchdb.databaseDir];
-
repository = mkRepo "couchdb";
+
repository = mkRepoA "couchdb";
}
);
···
config.mySnippets.restic
// {
paths = [config.services.forgejo.stateDir];
-
repository = mkRepo "forgejo";
+
repository = mkRepoA "forgejo";
}
);
-
immich = lib.mkIf config.services.immich.enable (
-
config.mySnippets.restic
-
// {
-
backupCleanupCommand = start "immich-server";
-
backupPrepareCommand = stop "immich-server";
-
-
paths = [
-
"${config.services.immich.mediaLocation}/library"
-
"${config.services.immich.mediaLocation}/profile"
-
"${config.services.immich.mediaLocation}/upload"
-
"${config.services.immich.mediaLocation}/backups"
-
];
-
-
repository = mkRepo "immich";
-
}
-
);
+
# immich = lib.mkIf config.services.immich.enable (
+
# config.mySnippets.restic
+
# // {
+
# backupCleanupCommand = start "immich-server";
+
# backupPrepareCommand = stop "immich-server";
+
#
+
# paths = [
+
# "${config.services.immich.mediaLocation}/library"
+
# "${config.services.immich.mediaLocation}/profile"
+
# "${config.services.immich.mediaLocation}/upload"
+
# "${config.services.immich.mediaLocation}/backups"
+
# ];
+
#
+
# repository = mkRepoB "immich";
+
# }
+
# );
jellyfin = lib.mkIf config.services.jellyfin.enable (
config.mySnippets.restic
···
backupCleanupCommand = start "jellyfin";
backupPrepareCommand = stop "jellyfin";
paths = [config.services.jellyfin.dataDir];
-
repository = mkRepo "jellyfin";
+
repository = mkRepoA "jellyfin";
}
);
···
backupCleanupCommand = start "lidarr";
backupPrepareCommand = stop "lidarr";
paths = [config.services.lidarr.dataDir];
-
repository = mkRepo "lidarr";
+
repository = mkRepoA "lidarr";
}
);
···
backupCleanupCommand = start "ombi";
backupPrepareCommand = stop "ombi";
paths = [config.services.ombi.dataDir];
-
repository = mkRepo "ombi";
+
repository = mkRepoA "ombi";
}
);
···
backupCleanupCommand = start "pds";
backupPrepareCommand = stop "pds";
paths = [config.services.pds.settings.PDS_DATA_DIRECTORY];
-
repository = mkRepo "pds";
+
repository = mkRepoA "pds";
}
);
···
backupPrepareCommand = stop "plex";
exclude = ["${config.services.plex.dataDir}/Plex Media Server/Plug-in Support/Databases"];
paths = [config.services.plex.dataDir];
-
repository = mkRepo "plex";
+
repository = mkRepoA "plex";
}
);
···
config.mySnippets.restic
// {
paths = [config.services.postgresql.dataDir];
-
repository = mkRepo "postgresql";
+
repository = mkRepoA "postgresql";
}
);
···
backupCleanupCommand = start "prowlarr";
backupPrepareCommand = stop "prowlarr";
paths = [config.services.prowlarr.dataDir];
-
repository = mkRepo "prowlarr";
+
repository = mkRepoA "prowlarr";
}
);
···
backupCleanupCommand = start "qbittorrent";
backupPrepareCommand = stop "qbittorrent";
paths = [config.myNixOS.services.qbittorrent.dataDir];
-
repository = mkRepo "qbittorrent";
+
repository = mkRepoA "qbittorrent";
}
);
···
backupCleanupCommand = start "radarr";
backupPrepareCommand = stop "radarr";
paths = [config.services.radarr.dataDir];
-
repository = mkRepo "radarr";
+
repository = mkRepoA "radarr";
}
);
···
backupCleanupCommand = start "readarr";
backupPrepareCommand = stop "readarr";
paths = [config.services.readarr.dataDir];
-
repository = mkRepo "readarr";
+
repository = mkRepoA "readarr";
}
);
···
backupCleanupCommand = start "sonarr";
backupPrepareCommand = stop "sonarr";
paths = [config.services.sonarr.dataDir];
-
repository = mkRepo "sonarr";
+
repository = mkRepoA "sonarr";
}
);
···
backupCleanupCommand = start "tautulli";
backupPrepareCommand = stop "tautulli";
paths = [config.services.tautulli.dataDir];
-
repository = mkRepo "tautulli";
+
repository = mkRepoA "tautulli";
}
);
···
backupCleanupCommand = start "uptime-kuma";
backupPrepareCommand = stop "uptime-kuma";
paths = ["/var/lib/uptime-kuma"];
-
repository = mkRepo "uptime-kuma";
+
repository = mkRepoA "uptime-kuma";
}
);
···
backupCleanupCommand = start "vaultwarden";
backupPrepareCommand = stop "vaultwarden";
paths = ["/var/lib/vaultwarden"];
-
repository = mkRepo "vaultwarden";
+
repository = mkRepoA "vaultwarden";
}
);
};
+4 -1
modules/nixos/programs/lanzaboote/default.nix
···
sortKey = "lanza";
};
-
loader.systemd-boot.enable = lib.mkForce false;
+
loader = {
+
systemd-boot.enable = lib.mkForce false;
+
timeout = lib.mkDefault 5;
+
};
};
environment.systemPackages = [pkgs.sbctl];
+2
modules/nixos/programs/systemd-boot/default.nix
···
enable = lib.mkDefault true;
configurationLimit = lib.mkDefault 10;
};
+
+
timeout = lib.mkDefault 5;
};
};
};
+1
modules/nixos/services/default.nix
···
./syncthing
./caddy
./qbittorrent
+
./gdm
];
}
+48
modules/nixos/services/gdm/default.nix
···
+
{
+
config,
+
lib,
+
...
+
}: {
+
options.myNixOS.services.gdm = {
+
enable = lib.mkEnableOption "use the gnome display manager";
+
+
autoLogin = lib.mkOption {
+
description = "User to autologin.";
+
default = null;
+
type = lib.types.nullOr lib.types.str;
+
};
+
};
+
+
config = lib.mkIf config.myNixOS.services.gdm.enable {
+
programs.dconf.profiles.gdm.databases = [
+
{
+
settings = {
+
"org/gnome/desktop/peripherals/keyboard" = {
+
numlock-state = true;
+
remember-numlock-state = true;
+
};
+
+
"org/gnome/desktop/peripherals/touchpad" = {
+
tap-to-click = true;
+
};
+
};
+
}
+
];
+
+
security.pam.services.gdm = {
+
enableGnomeKeyring = true;
+
gnupg.enable = true;
+
};
+
+
services = {
+
displayManager = {
+
autoLogin = lib.mkIf (config.myNixOS.services.gdm.autoLogin != null) {
+
enable = true;
+
user = config.myNixOS.services.gdm.autoLogin;
+
};
+
+
gdm.enable = true;
+
};
+
};
+
};
+
}
+6
modules/snippets/tailnet/default.nix
···
port = 8096;
vHost = "jellyfin.${config.mySnippets.tailnet.name}";
};
+
+
immich = {
+
hostName = "nanpi";
+
port = 2283;
+
vHost = "immich.${config.mySnippets.tailnet.name}";
+
};
};
};
};