Compare commits

...

6 Commits

23 changed files with 208 additions and 189 deletions

View File

@ -19,32 +19,27 @@
# Modules # Modules
modules = { modules = {
desktop = { desktop = {
browser.enable = true;
gnome = { gnome = {
enable = true; enable = true;
wallpaper = "file://${../../../resources/img/wallpapers/gruvbox/bulwark.png}"; wallpaper = "file://${../../../resources/img/wallpapers/gruvbox/bulwark.png}";
}; };
browser.enable = true;
}; };
devel = { devel = {
notes.enable = true; notes.enable = true;
}; };
gaming = { gaming = {
steam.enable = true;
emulation.enable = true; emulation.enable = true;
misc.enable = true; steam.enable = true;
}; };
programs = { programs = {
chezmoi.apply = true;
kitty.enable = true; kitty.enable = true;
chezmoi = {
enable = true;
apply = true;
};
}; };
services = { services = {
samba-client.enable = true; samba-client.enable = true;
}; };
system = { system = {
nipr.enable = true;
ssh.enable = true; ssh.enable = true;
terminal.enable = true; terminal.enable = true;
}; };

View File

@ -35,11 +35,11 @@
# Modules # Modules
modules = { modules = {
desktop = { desktop = {
browser.enable = true;
gnome = { gnome = {
enable = true; enable = true;
wallpaper = "file://${../../../resources/img/wallpapers/gruvbox/kestrel.png}"; wallpaper = "file://${../../../resources/img/wallpapers/gruvbox/kestrel.png}";
}; };
browser.enable = true;
}; };
devel = { devel = {
engineering.enable = true; engineering.enable = true;
@ -48,16 +48,13 @@
tooling.enable = true; tooling.enable = true;
}; };
gaming = { gaming = {
steam.enable = true;
emulation.enable = true; emulation.enable = true;
misc.enable = true; minecraft.enable = true;
steam.enable = true;
}; };
programs = { programs = {
chezmoi.apply = true;
kitty.enable = true; kitty.enable = true;
chezmoi = {
enable = true;
apply = true;
};
}; };
services = { services = {
peripherals.enable = true; peripherals.enable = true;
@ -66,7 +63,6 @@
}; };
system = { system = {
backup.enable = true; backup.enable = true;
nipr.enable = true;
ssh.enable = true; ssh.enable = true;
terminal.enable = true; terminal.enable = true;
wireguard-client = { wireguard-client = {

View File

@ -22,12 +22,12 @@
# Modules # Modules
modules = { modules = {
desktop = { desktop = {
browser.enable = true;
gnome = { gnome = {
enable = true; enable = true;
# TODO: Add Shivan wallpaper # TODO: Add Shivan wallpaper
wallpaper = "file://${../../../resources/img/wallpapers/gruvbox/bulwark.png}"; wallpaper = "file://${../../../resources/img/wallpapers/gruvbox/bulwark.png}";
}; };
browser.enable = true;
}; };
devel = { devel = {
engineering.enable = true; engineering.enable = true;
@ -37,10 +37,7 @@
}; };
programs = { programs = {
kitty.enable = true; kitty.enable = true;
chezmoi = { chezmoi.apply = true;
enable = true;
apply = true;
};
}; };
services = { services = {
peripherals.enable = true; peripherals.enable = true;
@ -48,7 +45,6 @@
virt-manager.enable = false; virt-manager.enable = false;
}; };
system = { system = {
nipr = true;
ssh.enable = true; ssh.enable = true;
terminal.enable = true; terminal.enable = true;
}; };

View File

@ -10,6 +10,7 @@
./gitea.nix ./gitea.nix
./nextcloud.nix ./nextcloud.nix
./backup.nix ./backup.nix
./jellyfin.nix
]; ];
# Use normal kernel # Use normal kernel
@ -97,13 +98,7 @@
tooling.enable = true; tooling.enable = true;
}; };
programs = { programs = {
chezmoi = { chezmoi.apply = true;
enable = true;
apply = true;
};
};
services = {
jellyfin.enable = true;
}; };
system = { system = {
backup.enable = true; backup.enable = true;

View File

@ -0,0 +1,6 @@
{ config, lib, pkgs, user, ... }:
{
services.jellyfin.enable = true;
services.jellyfin.openFirewall = true;
services.jellyfin.user = "${user}";
}

View File

@ -51,10 +51,7 @@ in
tooling.enable = true; tooling.enable = true;
}; };
programs = { programs = {
chezmoi = { chezmoi.apply = true;
enable = true;
apply = true;
};
}; };
system = { system = {
ssh.enable = true; ssh.enable = true;

View File

@ -1,95 +0,0 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.desktop.browser;
in {
options.modules.desktop.browser.enable = lib.mkEnableOption "browser";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
google-chrome # Web browser developed by Google.
];
programs.chromium = {
enable = true;
extraOpts = {
# Disable all manner of account-related things.
"BrowserSignin" = 0; # disable
"BrowserAddPersonEnabled" = false;
"BrowserGuestModeEnabled" = false;
"UserDisplayName" = "PolicyUser";
"UserFeedbackAllowed" = false;
"BackgroundModeEnabled" = false;
"MetricsReportingEnabled" = false;
"BlockExternalExtensions" = true;
"AutofillAddressEnabled" = false;
"AutofillCreditCardEnabled" = false;
"PasswordManagerEnabled" = false;
"PromptForDownloadLocation" = true;
"SyncDisabled" = true;
"SpellcheckEnabled" = true;
"SpellcheckLanguage" = [ "en-US" ];
"CloudPrintSubmitEnabled" = false;
"EnableMediaRouter" = false;
"ShowCastIconInToolbar" = false;
# Install extensions
"ExtensionInstallForcelist" = [
"ihennfdbghdiflogeancnalflhgmanop" # Gruvbox theme
"fkeaekngjflipcockcnpobkpbbfbhmdn" # Copy as Markdown
"pcmpcfapbekmbjjkdalcgopdkipoggdi" # MarkDownload
"nngceckbapebfimnlniiiahkandclblb" # Bitwarden
"icpgjfneehieebagbmdbhnlpiopdcmna" # New Tab Redirect
"oahiolknhkbpcolgnpljehalnhblolkm" # Shorts Blocker
"hkgfoiooedgoejojocmhlaklaeopbecg" # Picture-in-Picture (by Google)
"dbepggeogbaibhgnhhndojpepiihcmeb" # Vimium
];
# Setup bookmarks
"BookmarkBarEnabled" = true;
"ShowAppsShortcutInBookmarkBar" = false;
"ManagedBookmarks" = [
{ "toplevel_name" = "Bookmarks"; }
{ "name" = "Daily"; "children" = [
{ "url" = "https://lc.tstarr.us"; name = "Chisme Mattermost"; }
{ "url" = "https://rss.tstarr.us"; name = "Miniflux"; }
{ "url" = "https://cloud.tstarr.us"; name = "Nextcloud"; }
{ "url" = "https://git.tstarr.us"; name = "Gitea"; }
{ "url" = "https://media.tstarr.us/web/index.html#!/home.html"; name = "Jellyfin"; }
{ "url" = "https://home.tstarr.us"; name = "Home Assistant"; }
{ "url" = "https://www.youtube.com/feed/subscriptions"; name = "Youtube"; }
{ "url" = "https://gmail.com/"; name = "Mail"; }
{ "url" = "https://github.com/"; name = "GitHub"; }
{ "url" = "https://www.google.com/"; name = "Google"; }
{ "url" = "https://www.icloud.com/"; name = "iCloud"; }
]; }
{ "name" = "Games"; "children" = [
{ "url" = "https://www.protondb.com/"; name = "ProtonDB"; }
{ "url" = "https://vimm.net/"; name = "Vimm's Lair: Preserving the Classics"; }
{ "url" = "https://www.dotabuff.com/"; name = "DOTABUFF"; }
]; }
{ "name" = "Homelab"; "children" = [
{ "url" = "http://localhost:8384"; name = "Syncthing"; }
{ "url" = "https://github.com/starr-dusT/dotfiles"; name = "Dotfiles"; }
{ "url" = "https://rssbridge.tstarr.us"; name = "RSSBridge"; }
]; }
{ "name" = "Nix"; "children" = [
{ "url" = "https://nixos.org/nix/manual/"; name = "nix-manual"; }
{ "url" = "https://nixos.org/nixpkgs/manual/"; name = "nixpkgs-manual"; }
{ "url" = "https://nixos.org/nixos/manual/"; name = "nixos-manual"; }
{ "url" = "https://nixos.org/nixos/options.html"; name = "nixos-options"; }
{ "url" = "https://discourse.nixos.org/"; name = "nixos-discourse"; }
{ "url" = "https://old.reddit.com/r/nixos/"; name = "nixos-reddit"; }
{ "url" = "https://nixos.wiki/"; name = "nixos-wiki"; }
]; }
];
};
};
networking.firewall.allowedTCPPorts = [ 8080 ];
services.static-web-server = {
enable = true;
listen = "[::]:8080";
root = ../../../resources/blank;
};
};
}

View File

@ -0,0 +1,37 @@
# Chrome bookmarks
[
{ "toplevel_name" = "Bookmarks"; }
{ "name" = "Daily"; "children" = [
{ "url" = "https://lc.tstarr.us"; name = "Chisme Mattermost"; }
{ "url" = "https://rss.tstarr.us"; name = "Miniflux"; }
{ "url" = "https://cloud.tstarr.us"; name = "Nextcloud"; }
{ "url" = "https://git.tstarr.us"; name = "Gitea"; }
{ "url" = "https://media.tstarr.us/web/index.html#!/home.html"; name = "Jellyfin"; }
{ "url" = "https://home.tstarr.us"; name = "Home Assistant"; }
{ "url" = "https://www.youtube.com/feed/subscriptions"; name = "Youtube"; }
{ "url" = "https://gmail.com/"; name = "Mail"; }
{ "url" = "https://github.com/"; name = "GitHub"; }
{ "url" = "https://www.google.com/"; name = "Google"; }
{ "url" = "https://www.icloud.com/"; name = "iCloud"; }
]; }
{ "name" = "Games"; "children" = [
{ "url" = "https://www.protondb.com/"; name = "ProtonDB"; }
{ "url" = "https://vimm.net/"; name = "Vimm's Lair: Preserving the Classics"; }
{ "url" = "https://www.dotabuff.com/"; name = "DOTABUFF"; }
]; }
{ "name" = "Homelab"; "children" = [
{ "url" = "http://localhost:8384"; name = "Syncthing"; }
{ "url" = "https://github.com/starr-dusT/dotfiles"; name = "Dotfiles"; }
{ "url" = "https://rssbridge.tstarr.us"; name = "RSSBridge"; }
]; }
{ "name" = "Nix"; "children" = [
{ "url" = "https://nixos.org/nix/manual/"; name = "nix-manual"; }
{ "url" = "https://nixos.org/nixpkgs/manual/"; name = "nixpkgs-manual"; }
{ "url" = "https://nixos.org/nixos/manual/"; name = "nixos-manual"; }
{ "url" = "https://nixos.org/nixos/options.html"; name = "nixos-options"; }
{ "url" = "https://discourse.nixos.org/"; name = "nixos-discourse"; }
{ "url" = "https://old.reddit.com/r/nixos/"; name = "nixos-reddit"; }
{ "url" = "https://nixos.wiki/"; name = "nixos-wiki"; }
]; }
]

View File

@ -0,0 +1,11 @@
# Firefox bookmarks
[
{ name = "Managed Bookmarks"; toolbar = true; bookmarks = [
{ name = "Bookmarks"; bookmarks = [
{ url = "https://webmail.apps.mil/owa"; name = "WebMail";}
{ url = "https://dod.teams.microsoft.us/"; name = "Teams";}
{ url = "https://usaf-my.dps.mil/"; name = "OneDrive";}
]; }
]; }
]

View File

@ -0,0 +1,61 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.desktop.browser;
in {
# Enable option declared in firefox.nix
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
google-chrome # Web browser developed by Google.
];
programs.chromium = {
enable = true;
extraOpts = {
# Disable all manner of account-related things.
"BrowserSignin" = 0; # disable
"BrowserAddPersonEnabled" = false;
"BrowserGuestModeEnabled" = false;
"UserDisplayName" = "PolicyUser";
"UserFeedbackAllowed" = false;
"BackgroundModeEnabled" = false;
"MetricsReportingEnabled" = false;
"BlockExternalExtensions" = true;
"AutofillAddressEnabled" = false;
"AutofillCreditCardEnabled" = false;
"PasswordManagerEnabled" = false;
"PromptForDownloadLocation" = true;
"SyncDisabled" = true;
"SpellcheckEnabled" = true;
"SpellcheckLanguage" = [ "en-US" ];
"CloudPrintSubmitEnabled" = false;
"EnableMediaRouter" = false;
"ShowCastIconInToolbar" = false;
# Install extensions
"ExtensionInstallForcelist" = [
"ihennfdbghdiflogeancnalflhgmanop" # Gruvbox theme
"fkeaekngjflipcockcnpobkpbbfbhmdn" # Copy as Markdown
"pcmpcfapbekmbjjkdalcgopdkipoggdi" # MarkDownload
"nngceckbapebfimnlniiiahkandclblb" # Bitwarden
"icpgjfneehieebagbmdbhnlpiopdcmna" # New Tab Redirect
"oahiolknhkbpcolgnpljehalnhblolkm" # Shorts Blocker
"hkgfoiooedgoejojocmhlaklaeopbecg" # Picture-in-Picture (by Google)
"dbepggeogbaibhgnhhndojpepiihcmeb" # Vimium
];
# Setup bookmarks
"BookmarkBarEnabled" = true;
"ShowAppsShortcutInBookmarkBar" = false;
"ManagedBookmarks" = import ./bookmarks/chrome.nix;
};
};
# Host blank webpage for default new-tab
networking.firewall.allowedTCPPorts = [ 8080 ];
services.static-web-server = {
enable = true;
listen = "[::]:8080";
root = ../../../../resources/blank;
};
};
}

View File

@ -0,0 +1,4 @@
{ ... }:
{
imports = [ ./chrome.nix ./firefox.nix ];
}

View File

@ -0,0 +1,34 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.desktop.browser;
in {
options.modules.desktop.browser.enable = lib.mkEnableOption "browser";
config = lib.mkIf cfg.enable {
# Install applications for CAC
environment.systemPackages = with pkgs; [
opensc
pcsc-tools
pkcs11helper
];
home-manager.users.${user} = {
programs.firefox = {
enable = true;
profiles.default = {
bookmarks = import ./bookmarks/firefox.nix;
isDefault = true;
name = "default";
settings = {
"browser.bookmarks.addedImportButton" = false;
"browser.toolbars.bookmarks.visibility" = "always";
"browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.pinned" = [];
"browser.tabs.drawInTitlebar" = true;
"browser.tabs.inTitlebar" = 1;
};
};
};
};
};
}

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, user, inputs, ... }: { config, lib, pkgs, user, inputs, ... }:
{ {
imports = [ ./keyd.nix ./browser.nix ./gnome.nix ]; imports = [ ./browser ./keyd.nix ./gnome.nix ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
bc # Arbitrary-precision arithmetic language. bc # Arbitrary-precision arithmetic language.

View File

@ -1,4 +1,4 @@
{ ... }: { ... }:
{ {
imports = [ ./steam.nix ./misc.nix ./emulation.nix ]; imports = [ ./emulation.nix ./minecraft.nix ./steam.nix ];
} }

View File

@ -0,0 +1,12 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.gaming.minecraft;
in {
options.modules.gaming.minecraft.enable = lib.mkEnableOption "minecraft";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
prismlauncher # Launcher for Prism, a web application framework.
jdk17 # Java Development Kit (JDK) version 17.
];
};
}

View File

@ -1,15 +0,0 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.gaming.misc;
in {
options.modules.gaming.misc.enable = lib.mkEnableOption "misc";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
sunshine # Utility for streaming Android device display to a computer.
moonlight-qt # Qt-based client for NVIDIA GameStream, allowing streaming of PC games to other devices.
prismlauncher # Launcher for Prism, a web application framework.
jdk17 # Java Development Kit (JDK) version 17.
];
};
}

View File

@ -3,7 +3,10 @@
let cfg = config.modules.programs.chezmoi; let cfg = config.modules.programs.chezmoi;
in { in {
options.modules.programs.chezmoi = with lib; { options.modules.programs.chezmoi = with lib; {
enable = lib.mkEnableOption "chezmoi"; enable = lib.mkOption {
type = with types; bool;
default = true;
};
apply = lib.mkOption { apply = lib.mkOption {
type = with types; bool; type = with types; bool;
default = false; default = false;
@ -12,9 +15,8 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
chezmoi # Manages your dotfiles across multiple machines, ensuring consistency and version control chezmoi
]; ];
# Optionally apply chezmoi dotfiles with home-manager activation # Optionally apply chezmoi dotfiles with home-manager activation
home-manager.users.${user} = lib.mkIf cfg.apply { home-manager.users.${user} = lib.mkIf cfg.apply {
home.activation.chezmoi = home-manager.lib.hm.dag.entryAfter [ "installPackages" ] '' home.activation.chezmoi = home-manager.lib.hm.dag.entryAfter [ "installPackages" ] ''

View File

@ -1,5 +1,15 @@
{ config, pkgs, user, lib, ... }: { config, lib, pkgs, user, ... }:
{
let cfg = config.modules.programs.git;
in {
options.modules.programs.git = with lib; {
enable = lib.mkOption {
type = with types; bool;
default = true;
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git # Version control system for tracking changes in source code during software development. git # Version control system for tracking changes in source code during software development.
git-annex # Manages files with git, without checking the file contents into git. git-annex # Manages files with git, without checking the file contents into git.
@ -11,5 +21,5 @@
owner = "${user}"; owner = "${user}";
group = "users"; group = "users";
}; };
};
} }

View File

@ -1,4 +1,4 @@
{ ... }: { ... }:
{ {
imports = [ ./jellyfin.nix ./peripherals.nix ./samba-client.nix ./virt-manager.nix ]; imports = [ ./peripherals.nix ./samba-client.nix ./virt-manager.nix ];
} }

View File

@ -1,11 +0,0 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.services.jellyfin;
in {
options.modules.services.jellyfin.enable = lib.mkEnableOption "jellyfin";
config = lib.mkIf cfg.enable {
services.jellyfin.enable = true;
services.jellyfin.openFirewall = true;
services.jellyfin.user = "${user}";
};
}

View File

@ -1,4 +1,4 @@
{ ... }: { ... }:
{ {
imports = [ ./backup.nix ./nipr.nix ./ssh.nix ./terminal.nix ./wireguard-client.nix ]; imports = [ ./backup.nix ./ssh.nix ./terminal.nix ./wireguard-client.nix ];
} }

View File

@ -1,15 +0,0 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.system.nipr;
in {
options.modules.system.nipr.enable = lib.mkEnableOption "nipr";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
opensc
pcsc-tools
pkcs11helper
firefox
];
};
}

View File

@ -8,7 +8,6 @@ in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
killall # Command-line utility to terminate processes by name. killall # Command-line utility to terminate processes by name.
pciutils # Utilities for inspecting and manipulating devices connected to the PCI bus. pciutils # Utilities for inspecting and manipulating devices connected to the PCI bus.
chezmoi # Manages your dotfiles across multiple machines, ensuring consistency and version control.
btop # Terminal-based resource monitor, providing an interactive view of system resources. btop # Terminal-based resource monitor, providing an interactive view of system resources.
nix-search-cli # Command-line utility for searching the Nix package repository. nix-search-cli # Command-line utility for searching the Nix package repository.
rbw # Command-line interface to the Bitwarden password manager. rbw # Command-line interface to the Bitwarden password manager.