This commit is contained in:
Chris Kruining 2025-07-30 21:38:15 +02:00
parent 9aa634bd71
commit 3528e22c67
Signed by: chris
SSH key fingerprint: SHA256:nG82MUfuVdRVyCKKWqhY+pCrbz9nbX6uzUns4RKa1Pg
54 changed files with 380 additions and 1243 deletions

View file

@ -1,4 +0,0 @@
# Description
My desktop, reasoning for the name being the following chain of thought:
**Mandos -> brother of manwe -> manwe used to be main pc, now mandos is**

View file

@ -1,33 +0,0 @@
{ config, pkgs, ... }:
{
fileSystems = {
"/home/chris/media" = {
device = "ulmo:/";
fsType = "nfs";
};
};
environment.systemPackages = [ pkgs.ventoy-full-qt ];
permittedInsecurePackages = [ "ventoy-qt5-1.1.05"];
boot.supportedFilesystems = [ "nfs" ];
modules = {
boot = {
silentBoot = true;
animatedBoot = true;
};
system.audio.enable = true;
root = {
user = {
full_name = "__ROOT__";
email = "__ROOT__@${config.networking.hostName}";
};
shell = {
default = "zsh";
};
};
};
}

View file

@ -1,35 +0,0 @@
{ config, lib, pkgs, modulesPath, ... }:
let
inherit (lib.modules) mkDefault;
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
fileSystems = {
"/" ={
device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/C842-316A";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; }
];
boot = {
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-amd" ];
kernelParams = [];
extraModulePackages = [ ];
};
nixpkgs.hostPlatform = mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,65 +0,0 @@
{ ... }:
{
user = {
full_name = "Chris Kruining";
email = "chris@kruining.eu";
is_trusted = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
develop = {
rust.enable = true;
js.enable = true;
dotnet.enable = true;
};
desktop = {
plasma = {
enable = true;
autoLogin = true;
};
applications = {
communication.enable = true;
email.enable = true;
office.enable = true;
steam.enable = true;
recording.enable = true;
studio.enable = true;
};
terminal = {
default = "ghostty";
alacritty.enable = true;
ghostty.enable = true;
};
editors = {
default = "zed";
vscodium.enable = true;
zed.enable = true;
nvim.enable = true;
nano.enable = true;
kate.enable = true;
};
browsers = {
default = "chromium";
chrome.enable = true;
ladybird.enable = true;
};
games = {
minecraft.enable = true;
};
};
shell = {
default = "zsh";
};
}

View file

@ -1,37 +0,0 @@
{ config, pkgs, ... }:
{
fileSystems = {
"/home/chris/games" = {
device = "/dev/disk/by-label/games";
fsType = "ext4";
};
"/home/chris/data" = {
device = "/dev/disk/by-label/Data";
fsType = "ntfs-3g";
options = [ "rw" "uid=chris" ];
};
};
modules = {
boot = {
silentBoot = true;
animatedBoot = true;
};
desktop.gaming.enable = true;
system.audio.enable = true;
root = {
user = {
full_name = "__ROOT__";
email = "__ROOT__@${config.networking.hostName}";
};
shell = {
default = "zsh";
};
};
};
}

View file

@ -1,35 +0,0 @@
{ config, lib, pkgs, modulesPath, ... }:
let
inherit (lib.modules) mkDefault;
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
fileSystems = {
"/" ={
device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/C842-316A";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; }
];
boot = {
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-intel" ];
kernelParams = [];
extraModulePackages = [ ];
};
nixpkgs.hostPlatform = mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,65 +0,0 @@
{ ... }:
{
user = {
full_name = "Chris Kruining";
email = "chris@kruining.eu";
is_trusted = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
develop = {
rust.enable = true;
js.enable = true;
dotnet.enable = true;
};
desktop = {
plasma = {
enable = true;
autoLogin = true;
};
applications = {
communication.enable = true;
email.enable = true;
office.enable = true;
steam.enable = true;
recording.enable = true;
studio.enable = true;
};
terminal = {
default = "ghostty";
alacritty.enable = true;
ghostty.enable = true;
};
editors = {
default = "zed";
vscodium.enable = true;
zed.enable = true;
nvim.enable = true;
nano.enable = true;
kate.enable = true;
};
browsers = {
default = "chromium";
chrome.enable = true;
ladybird.enable = true;
};
games = {
minecraft.enable = true;
};
};
shell = {
default = "zsh";
};
}

View file

@ -1,20 +0,0 @@
{ config, ... }:
{
modules = {
system.audio.enable = true;
system.bluetooth.enable = true;
authentication.himmelblau.enable = true;
root = {
user = {
full_name = "__ROOT__";
email = "__ROOT__@${config.networking.hostName}";
};
shell = {
default = "zsh";
};
};
};
}

View file

@ -1,32 +0,0 @@
{ config, lib, pkgs, modulesPath, ... }:
let
inherit (lib.modules) mkDefault;
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/e60745c9-b3ea-4aeb-9c5c-b67ef1730826";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/42B3-C767";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [];
boot = {
initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-intel" ];
kernelParams = [];
extraModulePackages = [ ];
};
services.logrotate.checkConfig = false;
nixpkgs.hostPlatform = mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,57 +0,0 @@
{ ... }:
{
user = {
full_name = "Chris Kruining";
email = "chris@kruining.eu";
is_trusted = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
develop = {
rust.enable = true;
js.enable = true;
dotnet.enable = true;
};
desktop = {
plasma = {
enable = true;
autoLogin = true;
};
applications = {
communication.enable = true;
email.enable = true;
office.enable = true;
};
terminal = {
default = "ghostty";
ghostty.enable = true;
};
editors = {
default = "zed";
vscodium.enable = true;
zed.enable = true;
nvim.enable = true;
nano.enable = true;
};
browsers = {
default = "chromium";
firefox.enable = true;
chrome.enable = true;
};
};
shell = {
default = "zsh";
};
}

View file

@ -1,22 +0,0 @@
{ lib, config, ... }:let
inherit (lib) mkForce;
in
{
modules = {
system.audio.enable = true;
desktop.gaming.enable = true;
root = {
user = {
full_name = "__ROOT__";
email = "__ROOT__@${config.networking.hostName}";
};
shell = {
default = "zsh";
toolset.git.enable = mkForce false;
};
};
};
}

View file

@ -1,32 +0,0 @@
{ config, lib, modulesPath, ... }:
let
inherit (lib.modules) mkDefault;
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/aa438c4c-d193-436b-91ca-c386c0688265";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/89B8-0702";
fsType = "vfat";
};
swapDevices = [
{ device = "/dev/disk/by-uuid/beddca5c-1ecc-4a46-9fc5-fd918eed8f2a"; }
];
boot = {
initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-amd" ];
kernelParams = [];
extraModulePackages = [ ];
};
nixpkgs.hostPlatform = mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,33 +0,0 @@
{ lib, ... }: let
inherit (lib) mkForce;
in
{
user = {
full_name = "Chris Kruining";
email = "chris@kruining.eu";
is_trusted = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
desktop = {
terminal = {
default = "ghostty";
ghostty.enable = true;
};
editors = {
default = "nano";
nano.enable = true;
};
};
shell = {
default = "zsh";
toolset.git.enable = mkForce false;
};
}

View file

@ -1,4 +0,0 @@
# Description
My current server, reasoning for the name being the following chain of thought:
**Ulmo -> the king of the sea -> the sea provides -> services are provided -> server runs services**

View file

@ -1,34 +0,0 @@
{ config, ... }:
{
config = {
fileSystems."/var/media" = {
device = "/dev/disk/by-label/data";
fsType = "ext4";
};
modules = {
networking = {
ssh.enable = true;
nfs.enable = true;
};
services = {
auth.authelia.enable = true;
auth.zitadel.enable = true;
media.enable = true;
nextcloud.enable = true;
};
root = {
user = {
full_name = "__ROOT__";
email = "__ROOT__@${config.networking.hostName}";
};
shell = {
default = "zsh";
};
};
};
};
}

View file

@ -1,31 +0,0 @@
{ config, lib, modulesPath, ... }:
let
inherit (lib.modules) mkDefault;
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/dd518f17-61c9-4831-b1bd-e1cc2af292aa";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0A56-EBFE";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
boot = {
initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-intel" ];
kernelParams = [];
extraModulePackages = [ ];
};
nixpkgs.hostPlatform = mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,27 +0,0 @@
{
options,
config,
lib,
pkgs,
user,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.modules.${user}.desktop.browsers;
in {
options.modules.${user}.desktop.browsers = let
inherit (lib.options) mkOption;
inherit (lib.types) nullOr str;
in {
default = mkOption {
type = nullOr str;
default = null;
description = "Default system browser";
example = "firefox";
};
};
config = mkIf (cfg.default != null) {
home-manager.users.${user}.home.sessionVariables.BROWSER = cfg.default;
};
}

View file

@ -1,233 +0,0 @@
{ inputs, options, config, lib, pkgs, user, ... }:
let
inherit (builtins) toJSON;
inherit (lib.attrsets) attrValues mapAttrsToList;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.strings) concatStrings;
cfg = config.modules.${user}.desktop.browsers.firefox;
usr = config.users.users.${user};
in {
options.modules.${user}.desktop.browsers.firefox = let
inherit (lib.options) mkEnableOption;
inherit (lib.types) attrsOf oneOf bool int lines str;
inherit (lib.my) mkOpt mkOpt';
in {
enable = mkEnableOption "Gecko-based libre browser";
privacy.enable = mkEnableOption "Privacy Focused Firefox fork";
profileName = mkOpt str usr.name;
settings = mkOpt' (attrsOf (oneOf [bool int str])) {} ''
Firefox preferences set in <filename>user.js</filename>
'';
extraConfig = mkOpt' lines "" ''
Extra lines to add to <filename>user.js</filename>
'';
userChrome = mkOpt' lines "" "CSS Styles for Firefox's interface";
userContent = mkOpt' lines "" "Global CSS Styles for websites";
};
config = mkMerge [
(mkIf (config.modules.${user}.desktop.type == "wayland") {
environment.variables.MOZ_ENABLE_WAYLAND = "1";
})
(mkIf cfg.enable {
modules.${user}.desktop.browsers.firefox.settings = {
# TAB cycle URL's, not buttons..
"browser.toolbars.keyboard_navigation" = false;
# Disable annoying translation pop-up!
"browser.translations.automaticallyPopup" = false;
# Enables dark-themed flash before page-load:
"ui.systemUsesDarkTheme" = "1";
# Developer tools -> uses dark theme
"devtools.theme" = "dark";
# FIXME: IM-Wheel -> Manual scroll speed ctrl bcs == buggy...
"mousewheel.min_line_scroll_amount" = 35;
# Enables ETP = decent security -> firefox containers = redundent
"browser.contentblocking.category" = "strict";
"privacy.donottrackheader.enabled" = true;
"privacy.donottrackheader.value" = 1;
"privacy.purge_trackers.enabled" = true;
# Syncs Firefox toolbar settings across machines
# WARNING: May not work across OS'es
"services.sync.prefs.sync.browser.uiCustomization.state" = true;
# Enables userContent.css and userChrome.css for our theme modules
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
# Stop creating ~/Downloads!
"browser.download.dir" = "${usr.home}/downloads";
# Disables built-in password manager -> use external PM!
"signon.rememberSignons" = false;
# Firefox, DO NOT CHECK if you are the default browser..
"browser.shell.checkDefaultBrowser" = false;
# Disables "New Tab Page" feature
"browser.newtabpage.enabled" = false;
# Disables Activity Stream
"browser.newtabpage.activity-stream.enabled" = false;
"browser.newtabpage.activity-stream.telemetry" = false;
# Disables new tab tile ads & preload
"browser.newtabpage.enhanced" = false;
"browser.newtabpage.introShown" = true;
"browser.newtab.preload" = false;
"browser.newtabpage.directory.ping" = "";
"browser.newtabpage.directory.source" = "data:text/plain,{}";
# Reduces search engine noise in the urlbar's completion window
# PS: Shortcuts and suggestions still work
"browser.urlbar.suggest.searches" = false;
"browser.urlbar.shortcuts.bookmarks" = false;
"browser.urlbar.shortcuts.history" = false;
"browser.urlbar.shortcuts.tabs" = false;
"browser.urlbar.showSearchSuggestionsFirst" = false;
"browser.urlbar.speculativeConnect.enabled" = false;
# Prevents search terms from being sent to ISP
"browser.urlbar.dnsResolveSingleWordsAfterSearch" = 0;
# Disables sponsored search results
"browser.urlbar.suggest.quicksuggest.nonsponsored" = false;
"browser.urlbar.suggest.quicksuggest.sponsored" = false;
# Shows whole URL in address bar
"browser.urlbar.trimURLs" = false;
# Disables non-useful funcionality of certain features
"browser.disableResetPrompt" = true;
"browser.onboarding.enabled" = false;
"browser.aboutConfig.showWarning" = false;
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
"extensions.pocket.enabled" = false;
"extensions.shield-recipe-client.enabled" = false;
"reader.parse-on-load.enabled" = false;
# Allow seperate search-engine usage in private mode!
"browser.search.separatePrivateDefault.ui.enabled" = true;
# Security-oriented defaults:
"security.family_safety.mode" = 0;
# https://blog.mozilla.org/security/2016/10/18/phasing-out-sha-1-on-the-public-web/
"security.pki.sha1_enforcement_level" = 1;
# https://github.com/tlswg/tls13-spec/issues/1001
"security.tls.enable_0rtt_data" = false;
# Uses Mozilla geolocation service instead of Google if given permission
"geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%";
"geo.provider.use_gpsd" = false;
# https://support.mozilla.org/en-US/kb/extension-recommendations
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr" = false;
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" =
false;
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" =
false;
"extensions.htmlaboutaddons.recommendations.enabled" = false;
"extensions.htmlaboutaddons.discover.enabled" = false;
"extensions.getAddons.showPane" = false; # Uses Google Analytics
"browser.discovery.enabled" = false;
# Reduces File IO / SSD abuse, 15 seconds -> 30 minutes
"browser.sessionstore.interval" = "1800000";
# Disables battery API
"dom.battery.enabled" = false;
# Disable cross-site ad-view tracking
"dom.private-attribution.submission.enabled" = false;
# Disables "beacon" asynchronous HTTP transfers (used for analytics)
"beacon.enabled" = false;
# Disables pinging URIs specified in HTML <a> ping= attributes
"browser.send_pings" = false;
# Disables gamepad API to prevent USB device enumeration
"dom.gamepad.enabled" = false;
# Prevents guessing domain names on invalid entry in URL-bar
"browser.fixup.alternate.enabled" = false;
# Disables telemetry settings
"toolkit.telemetry.unified" = false;
"toolkit.telemetry.enabled" = false;
"toolkit.telemetry.server" = "data:,";
"toolkit.telemetry.archive.enabled" = false;
"toolkit.telemetry.coverage.opt-out" = true;
"toolkit.coverage.opt-out" = true;
"toolkit.coverage.endpoint.base" = "";
"experiments.supported" = false;
"experiments.enabled" = false;
"experiments.manifest.uri" = "";
"browser.ping-centre.telemetry" = false;
# https://mozilla.github.io/normandy/
"app.normandy.enabled" = false;
"app.normandy.api_url" = "";
"app.shield.optoutstudies.enabled" = false;
# Disables health reports (basically more telemetry)
"datareporting.healthreport.uploadEnabled" = false;
"datareporting.healthreport.service.enabled" = false;
"datareporting.policy.dataSubmissionEnabled" = false;
# Disables crash reports
"breakpad.reportURL" = "";
"browser.tabs.crashReporting.sendReport" = false;
# Prevents the submission of backlogged reports
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
# Disable automatic Form autofill
"browser.formfill.enable" = false;
"extensions.formautofill.addresses.enabled" = false;
"extensions.formautofill.available" = "off";
"extensions.formautofill.creditCards.available" = false;
"extensions.formautofill.creditCards.enabled" = false;
"extensions.formautofill.heuristics.enabled" = false;
};
# Use a stable profile name so we can target it in themes
home-manager.users.${user}.home = {
packages = let
inherit (pkgs) makeDesktopItem;
inherit (inputs.firefox.packages.${pkgs.system}) firefox-nightly-bin;
in [
firefox-nightly-bin
(makeDesktopItem {
name = "firefox-nightly-private";
desktopName = "Firefox Nightly (Private)";
genericName = "Launch a private Firefox Nightly instance";
icon = "firefox-nightly";
exec = "${lib.getExe firefox-nightly-bin} --private-window";
categories = ["Network" "WebBrowser"];
})
];
file = let
cfgPath = ".mozilla/firefox";
in {
firefox-profiles = {
target = "${cfgPath}/profiles.ini";
text = ''
[Profile0]
Name=default
IsRelative=1
Path=${cfg.profileName}.default
Default=1
[General]
StartWithLastProfile=1
Version=2
'';
};
user-js = mkIf (cfg.settings != {} || cfg.extraConfig != "") {
target = "${cfgPath}/${cfg.profileName}.default/user.js";
text = ''
${concatStrings (mapAttrsToList (name: value: ''
user_pref("${name}", ${toJSON value});
'')
cfg.settings)}
${cfg.extraConfig}
'';
};
user-chrome = mkIf (cfg.userChrome != "") {
target = "${cfgPath}/${cfg.profileName}.default/chrome/userChrome.css";
text = cfg.userChrome;
};
user-content = mkIf (cfg.userContent != "") {
target = "${cfgPath}/${cfg.profileName}.default/chrome/userContent.css";
text = cfg.userContent;
};
};
};
})
(mkIf cfg.privacy.enable {
home-manager.users.${user}.home.packages = attrValues {
inherit (pkgs) librewolf;
};
})
];
}

View file

@ -1,10 +0,0 @@
{ lib, user, ... }:
let
inherit (lib.types) either str;
inherit (lib.my) mkOpt;
in
{
options.modules.${user}.desktop = {
type = mkOpt (either str null) "wayland";
};
}

View file

@ -1,50 +0,0 @@
{
config,
lib,
pkgs,
user,
...
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf mkMerge;
in {
options.modules.${user}.desktop.terminal.alacritty = let
inherit (lib.options) mkEnableOption;
in { enable = mkEnableOption "OpenGL terminal emulator"; };
config = mkIf config.modules.${user}.desktop.terminal.alacritty.enable {
modules.${user}.shell.toolset.tmux.enable = true;
home-manager.users.${user}.programs.alacritty = {
enable = true;
settings = mkMerge [
{
env = {
TERM = "xterm-256color";
WINIT_X11_SCALE_FACTOR = "1.0";
};
window.dynamic_title = true;
scrolling = {
history = 5000;
multiplier = 3;
};
selection = {
semantic_escape_chars = '',`|:"' ()[]{}<>'';
save_to_clipboard = false;
};
general.live_config_reload = true;
terminal.shell = {
program = "${getExe pkgs.zsh}";
args = ["-l" "-c" "tmux new || tmux"];
};
}
];
};
};
}

View file

@ -1,24 +0,0 @@
{ config, options, lib, pkgs, user, ... }:
let
inherit (lib.modules) mkDefault mkIf mkMerge;
cfg = config.modules.${user}.desktop.terminal;
in {
options.modules.${user}.desktop.terminal = let
inherit (lib.options) mkOption;
inherit (lib.types) str;
in {
default = mkOption {
type = str;
default = "alacrity";
description = "Default terminal";
example = "alacrity";
};
};
config = mkMerge [
{
home-manager.users.${user}.home.sessionVariables.TERMINAL = cfg.default;
}
];
}

View file

@ -1,35 +0,0 @@
{
config,
options,
lib,
pkgs,
user,
...
}: let
inherit (builtins) toString;
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf mkMerge;
in {
options.modules.${user}.desktop.terminal.ghostty = let
inherit (lib.options) mkEnableOption;
in { enable = mkEnableOption "ghostty"; };
config = mkIf config.modules.${user}.desktop.terminal.ghostty.enable {
environment.systemPackages = [
pkgs.ghostty
];
modules.${user}.shell.toolset.tmux.enable = true;
home-manager.users.${user}.programs.ghostty = {
enable = true;
settings = {
background-blur-radius = 20;
theme = "dark:stylix,light:stylix";
window-theme = (config.modules.${user}.themes.polarity or "dark");
background-opacity = 0.8;
minimum-contrast = 1.1;
};
};
};
}

View file

@ -1,16 +0,0 @@
{ config, lib, user, ... }:
let
inherit (lib.modules) mkIf;
in
{
options.modules.${user}.develop = let
inherit (lib.options) mkEnableOption;
in
{
xdg.enable = mkEnableOption "XDG-related conf" // { default = true; };
};
config = mkIf config.modules.${user}.develop.xdg.enable {
};
}

View file

@ -1,18 +0,0 @@
{ inputs, config, options, lib, pkgs, user, ... }:
let
inherit (lib.attrsets) attrValues;
inherit (lib.modules) mkIf mkMerge;
in
{
options.modules.${user}.develop.dotnet = let
inherit (lib.options) mkEnableOption;
in {
enable = mkEnableOption ".NET developmnt";
};
config = mkIf config.modules.${user}.develop.dotnet.enable {
home-manager.users.${user}.home.packages = attrValues {
inherit (pkgs) dotnet-sdk_8;
};
};
}

View file

@ -1,28 +0,0 @@
{ inputs, config, options, lib, pkgs, user, ... }:
let
inherit (lib.attrsets) attrValues;
inherit (lib.modules) mkIf mkMerge;
in
{
options.modules.${user}.develop.js = let
inherit (lib.options) mkEnableOption;
in {
enable = mkEnableOption "JS developmnt";
};
config = mkMerge [
(mkIf config.modules.${user}.develop.js.enable {
home-manager.users.${user}.home.packages = with pkgs; [
bun
nodejs
nodePackages_latest.typescript-language-server
];
})
(mkIf config.modules.${user}.develop.xdg.enable {
# home = {
# };
})
];
}

View file

@ -1,36 +0,0 @@
{ inputs, config, options, lib, pkgs, user, ... }:
let
inherit (lib.attrsets) attrValues;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.meta) getExe;
in
{
options.modules.${user}.develop.rust = let
inherit (lib.options) mkEnableOption;
in {
enable = mkEnableOption "Rust developmnt";
};
config = mkMerge [
# (mkIf config.modules.${user}.develop.rust.enable {
# # nixpkgs.overlays = [inputs.rust.overlays.default];
#
# home-manager.users.${user}.home.packages = attrValues {
# # rust-package = pkgs.rust-bin.stable.latest.default;
# # inherit (pkgs) rust-analyzer rust-script;
# };
#
# environment.shellAliases = {
# rs = "rustc";
# ca = "cargo";
# };
# })
#
# (mkIf config.module.${user}s.develop.xdg.enable {
# home-manager.users.${user}.home = {
# sessionVariables.CARGO_HOME = "$XDG_DATA_HOME/cargo";
# sessionPath = ["$CARGO_HOME/bin"];
# };
# })
];
}

View file

@ -1,4 +0,0 @@
{ ... }:
{
options.modules.services = {};
}

View file

@ -1,11 +0,0 @@
{ config, lib, ... }:
let
inherit (lib.modules) mkIf;
cfg = config.modules.shell;
in
{
options.modules.shell = {};
config = mkIf cfg.enable {};
}

View file

@ -1,15 +0,0 @@
{ config, lib, ... }: let
inherit (lib.options) mkEnableOption;
inherit (lib.modules) mkIf;
cfg = config.modules.shell.zsh;
in
{
options.modules.shell.zsh = {
enable = mkEnableOption "enable ZSH";
};
config = mkIf cfg.enable {
programs.zsh.enable = true;
};
}

View file

@ -1,36 +0,0 @@
{ config, lib, pkgs, ... }:
let
inherit (lib.attrsets) attrValues;
inherit (lib.modules) mkIf;
cfg = config.modules.system.audio;
in
{
options.modules.system.audio = let
inherit (lib.options) mkEnableOption;
in
{
enable = mkEnableOption "modern audio support";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
# easyeffects
sof-firmware
];
security.rtkit.enable = true;
services.pulseaudio.enable = false;
services.pipewire = {
enable = true;
wireplumber.enable = true;
pulse.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
};
};
}

View file

@ -1,30 +0,0 @@
{ config, lib, ... }:
let
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.modules.system.bluetooth;
in
{
options.modules.system.bluetooth = {
enable = mkEnableOption "enable bluetooth";
};
config = mkIf cfg.enable {
hardware = {
bluetooth = {
enable = true;
powerOnBoot = true;
};
};
services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
};
};
};
}

View file

@ -0,0 +1,35 @@
{ osConfig, ... }:
{
home.stateVersion = osConfig.system.stateVersion;
programs.git = {
userName = "Chris Kruining";
userEmail = "chris@kruining.eu";
};
sneeuwvlok = {
defaults = {
shell = "zsh";
terminal = "ghostty";
browser = "zen";
editor = "zed";
};
shell = {
corePkgs.enable = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
application = {
bitwarden.enable = true;
teamspeak.enable = true;
steam.enable = true;
zen.enable = true;
};
};
}

View file

@ -8,8 +8,14 @@
};
sneeuwvlok = {
defaults = {
shell = "zsh";
terminal = "ghostty";
browser = "zen";
editor = "zed";
};
shell = {
default = "zsh";
corePkgs.enable = true;
};
@ -18,5 +24,34 @@
theme = "everforest";
polarity = "dark";
};
development = {
rust.enable = true;
javascript.enable = true;
dotnet.enable = true;
};
application = {
bitwarden.enable = true;
discord.enable = true;
ladybird.enable = true;
obs.enable = true;
onlyoffice.enable = true;
signal.enable = true;
steam.enable = true;
studio.enable = true;
teamspeak.enable = true;
thunderbird.enable = true;
zen.enable = true;
};
shell.zsh.enable = true;
terminal.ghostty.enable = true;
editor = {
zed.enable = true;
nvim.enable = true;
nano.enable = true;
};
};
}

View file

@ -0,0 +1,48 @@
{ osConfig, ... }:
{
home.stateVersion = osConfig.system.stateVersion;
programs.git = {
userName = "Chris Kruining";
userEmail = "chris@kruining.eu";
};
sneeuwvlok = {
defaults = {
shell = "zsh";
terminal = "ghostty";
browser = "zen";
editor = "zed";
};
shell = {
corePkgs.enable = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
development = {
javascript.enable = true;
dotnet.enable = true;
};
application = {
bitwarden.enable = true;
onlyoffice.enable = true;
signal.enable = true;
zen.enable = true;
};
shell.zsh.enable = true;
terminal.ghostty.enable = true;
editor = {
zed.enable = true;
nano.enable = true;
};
};
}

View file

@ -0,0 +1,35 @@
{ osConfig, ... }:
{
home.stateVersion = osConfig.system.stateVersion;
programs.git = {
userName = "Chris Kruining";
userEmail = "chris@kruining.eu";
};
sneeuwvlok = {
defaults = {
shell = "zsh";
terminal = "ghostty";
browser = "zen";
editor = "zed";
};
shell = {
corePkgs.enable = true;
};
themes = {
enable = true;
theme = "everforest";
polarity = "dark";
};
application = {
bitwarden.enable = true;
teamspeak.enable = true;
steam.enable = true;
zen.enable = true;
};
};
}

View file

@ -1,18 +1,17 @@
{ config, lib, pkgs, user, ... }:
{ inputs, config, lib, pkgs, namespace, ... }:
let
inherit (lib.options) mkEnableOption;
inherit (lib.modules) mkIf;
inherit (builtins) fetchurl;
inherit (lib) mkIf mkEnableOption;
cfg = config.modules.${user}.desktop.browsers.chrome;
in {
options.modules.${user}.desktop.browsers.chrome = {
enable = mkEnableOption "Enable Chrome";
cfg = config.${namespace}.application.chrome;
in
{
options.${namespace}.application.chrome = {
enable = mkEnableOption "enable chrome";
};
config = mkIf cfg.enable {
home-manager.users.${user}.home.packages = [
pkgs.chromium
home.packages = with pkgs; [
chromium
# (pkgs.ungoogled-chromium.override {
# commandLineArgs = [
# "--enable-features=AcceleratedVideoEncoder"
@ -26,7 +25,7 @@ in {
programs.chromium = {
enable = true;
enablePlasmaBrowserIntegration = true;
# enablePlasmaBrowserIntegration = true;
extensions = let
# create_extension_for = browserVersion: { id, sha256, version }: {
# inherit id;
@ -64,19 +63,19 @@ in {
# version = "";
# })
];
defaultSearchProviderEnabled = true;
defaultSearchProviderSearchURL = "https://duckduckgo.com?q={searchTerms}";
extraOpts = {
"ExtensionManifestV2Availability" = 2;
"BrowserSignin" = 0;
"SyncDisabled" = true;
"PasswordManagerEnabled" = false;
"SpellcheckEnabled" = true;
"SpellcheckLanguage" = [
"nl-NL"
"en-GB"
];
};
# defaultSearchProviderEnabled = true;
# defaultSearchProviderSearchURL = "https://duckduckgo.com?q={searchTerms}";
# extraOpts = {
# "ExtensionManifestV2Availability" = 2;
# "BrowserSignin" = 0;
# "SyncDisabled" = true;
# "PasswordManagerEnabled" = false;
# "SpellcheckEnabled" = true;
# "SpellcheckLanguage" = [
# "nl-NL"
# "en-GB"
# ];
# };
};
};
}

View file

@ -1,26 +0,0 @@
{ inputs, config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkOption;
inherit (lib.types) subModule;
cfg = config.${namespace}.application;
in
{
options.${namespace}.application = {
defaults = mkOption {
type = subModule {
browser = mkOption {
type = enum [ "ladybird" "zen" ];
default = "zen";
example = "ladybird";
};
};
};
};
config = {
home.sessionVariables = {
BROWSER = cfg.defaults.browser;
};
};
}

View file

@ -1,4 +1,4 @@
{ inputs, config, lib, pkgs, namespace, ... }:
{ config, lib, pkgs, namespace, osConfig ? {}, ... }:
let
inherit (lib) mkIf mkEnableOption;
@ -16,16 +16,16 @@ in
obs-studio-plugins.obs-backgroundremoval
obs-studio-plugins.obs-pipewire-audio-capture
];
boot = {
extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
'';
};
# boot = {
# extraModulePackages = with config.boot.kernelPackages; [
# v4l2loopback
# ];
# extraModprobeConfig = ''
# options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
# '';
# };
security.polkit.enable = true;
};

View file

@ -11,6 +11,6 @@ in
config = mkIf cfg.enable {
home.packages = with pkgs; [ onlyoffice-bin ];
fonts.packages = with pkgs; [ corefonts ];
# fonts.packages = with pkgs; [ corefonts ];
};
}

View file

@ -33,23 +33,23 @@ in
};
# https://github.com/FeralInteractive/gamemode
gamemode = {
enable = true;
enableRenice = true;
settings = {};
};
# gamemode = {
# enable = true;
# enableRenice = true;
# settings = {};
# };
gamescope = {
enable = true;
capSysNice = true;
env = {
DXVK_HDR = "1";
ENABLE_GAMESCOPE_WSI = "1";
WINE_FULLSCREEN_FSR = "1";
WLR_RENDERER = "vulkan";
};
args = ["--hdr-enabled"];
};
# gamescope = {
# enable = true;
# capSysNice = true;
# env = {
# DXVK_HDR = "1";
# ENABLE_GAMESCOPE_WSI = "1";
# WINE_FULLSCREEN_FSR = "1";
# WLR_RENDERER = "vulkan";
# };
# args = ["--hdr-enabled"];
# };
};
};
}

47
modules/home/default.nix Normal file
View file

@ -0,0 +1,47 @@
{ pkgs, config, lib, namespace, ... }:
let
inherit (lib) mkOption;
inherit (lib.types) enum;
cfg = config.${namespace}.defaults;
in {
options.${namespace}.defaults = {
editor = mkOption {
type = enum [ "nano" "nvim" "zed" ];
default = "nano";
description = "Default editor for text manipulation";
example = "nvim";
};
shell = mkOption {
type = enum [ "fish" "zsh" "bash" ];
default = "zsh";
description = "Default shell";
example = "zsh";
};
terminal = mkOption {
type = enum [ "ghostty" "alacritty" ];
default = "ghostty";
description = "Default terminal";
example = "ghostty";
};
browser = mkOption {
type = enum [ "chrome" "ladybird" "zen" ];
default = "zen";
description = "Default terminal";
example = "zen";
};
};
config = {
home.sessionVariables = {
EDITOR = cfg.editor;
TERMINAL = cfg.terminal;
BROWSER = cfg.browser;
};
shell = pkgs.${cfg.shell};
};
}

View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.development.dotnet;
in
{
options.${namespace}.development.dotnet = {
enable = mkEnableOption "Enable dotnet development tools";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [ dotnet-sdk_8 ];
};
}

View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.development.javascript;
in
{
options.${namespace}.development.javascript = {
enable = mkEnableOption "Enable javascript development tools";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [ bun nodejs nodePackages_latest.typescript-language-server ];
};
}

View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.development.rust;
in
{
options.${namespace}.development.rust = {
enable = mkEnableOption "Enable rust development tools";
};
config = mkIf cfg.enable {
};
}

View file

@ -1,24 +0,0 @@
{ config, options, lib, pkgs, namespace, ... }:
let
inherit (lib) attrValues mkIf mkMerge mkOption;
inherit (lib.types) nullOr enum;
cfg = config.${namespace}.editors;
in {
options.${namespace}.editors = {
default = mkOption {
type = nullOr (enum [ "nano" "nvim" "zed" "kate" "vscodium" ]);
default = "nano";
description = "Default editor for text manipulation";
example = "nvim";
};
};
config = mkMerge [
(mkIf (cfg.default != null) {
home.sessionVariables = {
EDITOR = cfg.default;
};
})
];
}

View file

@ -5,12 +5,16 @@ let
cfg = config.${namespace}.editor.nvim;
in
{
imports = [
inputs.nvf.nixosModules.default
];
options.${namespace}.editor.nvim = {
enable = mkEnableOption "enable nvim via nvf on user level";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
home.packages = with pkgs; [
imagemagick
editorconfig-core-c
sqlite

View file

@ -7,20 +7,10 @@ let
in
{
options.${namespace}.shell = {
default = mkOption {
type = nullOr (enum ["fish" "zsh" "bash"]);
default = null;
description = "Default system shell";
};
corePkgs.enable = mkEnableOption "core shell packages";
};
config = mkMerge [
# (if (cfg.default != null) then {
# shell = pkgs."${cfg.default}";
# } else {})
(mkIf (cfg.corePkgs.enable) {
${namespace}.shell.toolset = mkDefault {
bat.enable = true;
@ -52,4 +42,4 @@ in
};
})
];
}
}

View file

@ -0,0 +1,43 @@
{ config, lib, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.terminal.alacritty;
in
{
options.${namespace}.terminal.alacritty = {
enable = mkEnableOption "enable alacritty";
};
config = mkIf cfg.enable {
programs.alacritty = {
enable = true;
settings = {
env = {
TERM = "xterm-256color";
WINIT_X11_SCALE_FACTOR = "1.0";
};
window.dynamic_title = true;
scrolling = {
history = 5000;
multiplier = 3;
};
selection = {
semantic_escape_chars = '',`|:"' ()[]{}<>'';
save_to_clipboard = false;
};
general.live_config_reload = true;
# terminal.shell = {
# program = "${getExe pkgs.zsh}";
# args = ["-l" "-c" "tmux new || tmux"];
# };
};
};
};
}

View file

@ -0,0 +1,24 @@
{ config, lib, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.terminal.ghostty;
in
{
options.${namespace}.terminal.ghostty = {
enable = mkEnableOption "enable ghostty";
};
config = mkIf cfg.enable {
rograms.ghostty = {
enable = true;
settings = {
background-blur-radius = 20;
theme = "dark:stylix,light:stylix";
window-theme = (config.${namespace}.themes.polarity or "dark");
background-opacity = 0.8;
minimum-contrast = 1.1;
};
};
};
}

View file

@ -27,7 +27,7 @@ in
({
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = false;
grub.enable = true;
@ -38,8 +38,8 @@ in
footer = true;
};
};
supportedFilesystems = [ "nfs" ]
supportedFilesystems = [ "nfs" ];
};
})

View file

@ -1,13 +1,13 @@
{ config, lib, pkgs, ... }:
{ pkgs, config, lib, namespace, ... }:
let
inherit (lib.options) mkEnableOption;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.modules.services.security;
cfg = config.${namespace}.services.security.vaultwarden;
in
{
options.modules.services.security = {
enable = mkEnableOption "Security service(s): Vaultwarden";
options.${namespace}.services.security.vaultwarden = {
enable = mkEnableOption "enable vaultwarden";
};
config = mkIf cfg.enable {

View file

@ -1,6 +1,4 @@
{ ... }:
let
in
{
imports = [
./disks.nix
@ -22,4 +20,4 @@ in
};
system.stateVersion = "23.11";
}
}

View file

@ -1,6 +1,4 @@
{ ... }:
let
in
{
imports = [
./disks.nix
@ -23,4 +21,4 @@ in
};
system.stateVersion = "23.11";
}
}

View file

@ -1,6 +1,4 @@
{ ... }:
let
in
{
imports = [
./disks.nix
@ -23,4 +21,4 @@ in
};
system.stateVersion = "23.11";
}
}