more progress on custom options config

This commit is contained in:
greyweather committed 2026-08-27 19:28:28 +01:00
1 parent f770b83b5c
commit 765f346eb6
26 files changed
+900 -561

No files matched your search

+56 -10
View File
@@ -1,15 +1,51 @@
{ inputs, self, ... }: {
flake.nixosModules.graphics = { config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
wayland-utils
mesa-demos
vulkan-tools
];
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
options = {
components = {
displayManager = lib.mkOption {
# enum that dynamically populates itself with the contents of the display-managers directory
type = lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
builtins.attrNames (builtins.readDir "${self}/modules/components/display-managers")
));
default = "lightdm";
};
fonts.packages = with pkgs; [
iosevka-comfy.comfy
nerd-fonts.jetbrains-mono
];
windowManagers = lib.mkOption {
type = lib.types.either (lib.types.listOf (
lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers")
))
)) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers")
)));
default = [];
};
shells = lib.mkOption {
type = lib.types.either (lib.types.listOf (
lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
builtins.attrNames (builtins.readDir "${self}/modules/components/shells")
))
)) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
builtins.attrNames (builtins.readDir "${self}/modules/components/shells")
)));
default = [];
};
};
};
config = {
environment.systemPackages = with pkgs; [
wayland-utils
mesa-demos
vulkan-tools
];
fonts.packages = with pkgs; [
iosevka-comfy.comfy
nerd-fonts.jetbrains-mono
];
};
};
flake.homeModules.graphics = { config, pkgs, ... }: {
@@ -19,5 +55,15 @@
gparted
vlc
];
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
gtk = {
enable = true;
};
};
}
+8
View File
@@ -0,0 +1,8 @@
{ inputs, self, ... }: {
flake.nixosModules.global = { pkgs, config, lib, ... }: {
boot.loader.grub = lib.mkIf (config.components.bootLoader == "grub") {
enable = true;
useOSProber = true;
};
};
}
@@ -0,0 +1,8 @@
{ inputs, self, ... }: {
flake.nixosModules.global = { pkgs, config, lib, ... }: {
boot.loader.limine = lib.mkIf (config.components.bootLoader == "limine") {
enable = true;
maxGenerations = 10;
};
};
}
@@ -0,0 +1,11 @@
{ inputs, self, ... }: {
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
config = lib.mkIf (config.components.displayManager == "lightdm") {
services.xserver.enable = true;
services.xserver.displayManager.lightdm = {
enable = true;
greeters.gtk.enable = true;
};
};
};
}
+5 -5
View File
@@ -1,9 +1,9 @@
{ inputs, self, ... }: {
flake.nixosModules.ly = { config, pkgs, ... }: {
services.displayManager.ly = {
enable = true;
};
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
config = lib.mkIf (config.components.displayManager == "ly") {
services.displayManager.ly.enable = true;
security.pam.services.login.fprintAuth = false;
security.pam.services.login.fprintAuth = false;
};
};
}
+31
View File
@@ -0,0 +1,31 @@
{ inputs, self, ... }: {
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
config = lib.mkIf ((config.components.shells == "noctalia")||(builtins.elem "noctalia" config.components.shells)) {
environment.systemPackages = with pkgs; [
inputs.noctalia.packages.${system}.default
];
programs.noctalia.enable = true;
};
};
flake.homeModules.graphics = { lib, pkgs, osConfig, ... }: {
config = lib.mkIf ((osConfig.components.shells == "noctalia")||(builtins.elem "noctalia" osConfig.components.shells)) {
home.activation = {
symlinkNoctaliaState = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript {
target = ".local/state/noctalia/settings.toml";
source = "dotfiles/${osConfig.info.hostName}/noctalia/settings.toml";
});
symlinkNoctaliaStatePlugins = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript {
target = ".local/state/noctalia/plugins";
source = "dotfiles/${osConfig.info.hostName}/noctalia/plugins";
isDir = true;
});
};
xdg.configFile."noctalia/settings.toml".source = "${self}/dotfiles/${osConfig.info.hostName}/noctalia/settings.toml";
xdg.configFile."noctalia/plugins".source = "${self}/dotfiles/${osConfig.info.hostName}/noctalia/plugins";
};
};
}
@@ -0,0 +1,50 @@
{ inputs, self, ... }: {
flake.nixosModules.graphics = { config, pkgs, inputs, lib, ... }: {
config = lib.mkIf ((config.components.windowManagers == "niri")||(builtins.elem "niri" config.components.windowManagers)) {
environment.systemPackages = with pkgs; [
xdg-desktop-portal-gnome
wl-clipboard
libsecret
cage
wev
qalculate-qt
];
features.applications.gui.nautilus.enable = true;
services.upower.enable = true;
services.udisks2.enable = true;
programs.niri = {
enable = true;
useNautilus = true;
# override niri source to use https://github.com/niri-wm/niri/pull/3642
package = (pkgs.niri.overrideAttrs (finalAttrs: prevAttrs:
{
cargoHash = "sha256-HypBB3PL4nVFMNH2+jEK0+dG9dJ920nHi8GwRoeH/v4=";
src = pkgs.fetchFromGitHub {
owner = "niri-wm";
repo = "niri";
rev = "cb41d54703eef73883bb2be58e19bcf3715d777c";
sha256 = "sha256-cLzTeMcCdQJ+kHGcOposjeheFyEG/tGOA1jFAORMHjI=";
};
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
inherit (finalAttrs) pname src version;
hash = finalAttrs.cargoHash;
};
}
));
};
};
};
flake.homeModules.graphics = { lib, osConfig, ... }: {
config = lib.mkIf ((osConfig.components.windowManagers == "niri")||(builtins.elem "niri" osConfig.components.windowManagers)) {
home.activation.symlinkNiriConfig = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript {
target = ".config/niri/config.kdl";
source = "dotfiles/${osConfig.info.hostName}/niri.kdl";
});
};
};
}
@@ -1,52 +0,0 @@
{ inputs, self, ... }: {
flake.nixosModules.niri = { config, pkgs, inputs, lib, ... }: {
imports = with self.nixosModules; [
nautilus
];
environment.systemPackages = with pkgs; [
xdg-desktop-portal-gnome
wl-clipboard
libsecret
cage
wev
qalculate-qt
];
services.upower.enable = true;
services.udisks2.enable = true;
programs.niri = {
enable = true;
useNautilus = true;
# override niri source to use https://github.com/niri-wm/niri/pull/3642
package = (pkgs.niri.overrideAttrs (finalAttrs: prevAttrs:
{
cargoHash = "sha256-HypBB3PL4nVFMNH2+jEK0+dG9dJ920nHi8GwRoeH/v4=";
src = pkgs.fetchFromGitHub {
owner = "niri-wm";
repo = "niri";
rev = "cb41d54703eef73883bb2be58e19bcf3715d777c";
sha256 = "sha256-cLzTeMcCdQJ+kHGcOposjeheFyEG/tGOA1jFAORMHjI=";
};
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
inherit (finalAttrs) pname src version;
hash = finalAttrs.cargoHash;
};
}
));
};
};
flake.homeModules.niri = { lib, osConfig, ... }:
{
home.activation.symlinkNiriConfig = lib.hm.dag.entryAfter ["writeBoundary"] ''
#!/bin/bash
if [ -f /home/grey/.config/niri/config.kdl ]; then
rm /home/grey/.config/niri/config.kdl
fi
ln -s ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/niri.kdl /home/grey/.config/niri/config.kdl
'';
};
}
@@ -1,39 +0,0 @@
{ inputs, self, ... }: {
flake.nixosModules.noctalia = { pkgs, ... }: {
environment.systemPackages = with pkgs; [
inputs.noctalia.packages.${system}.default
];
programs.noctalia.enable = true;
};
flake.homeModules.noctalia = { lib, pkgs, osConfig, ... }: {
home.activation = {
symlinkNoctaliaState = lib.hm.dag.entryAfter ["writeBoundary"] ''
#!/bin/bash
if [ -f /home/grey/.local/state/noctalia/settings.toml ]; then
rm /home/grey/.local/state/noctalia/settings.toml
fi
ln -s ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/noctalia/settings.toml /home/grey/.local/state/noctalia/settings.toml
if [ -d /home/grey/.local/state/noctalia/plugins ]; then
rm -rf /home/grey/.local/state/noctalia/plugins
fi
ln -s ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/noctalia/plugins /home/grey/.local/state/noctalia/plugins
'';
copyNoctaliaConfig = lib.hm.dag.entryAfter ["writeBoundary"] ''
#!/bin/bash
if [ -f /home/grey/.config/noctalia/settings.toml ]; then
rm /home/grey/.config/noctalia/settings.toml
fi
cp ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/noctalia/settings.toml /home/grey/.config/noctalia/settings.toml
if [ -d /home/grey/.config/noctalia/plugins ]; then
rm -rf /home/grey/.config/noctalia/plugins
fi
cp -r ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/noctalia/plugins /home/grey/.config/noctalia/plugins
'';
};
};
}
+21 -18
View File
@@ -1,25 +1,28 @@
{ inputs, self, ... }: {
flake.homeModules.equibop = { pkgs, lib, osConfig, ... }: {
programs.equibop.enable = true;
flake.nixosModules.graphics = { pkgs, lib, config, ... }: {
options.features.applications.gui.equibop.enable = lib.mkEnableOption "equibop";
};
home.activation = {
linkEquibopConfig = lib.hm.dag.entryAfter ["writeBoundary"] ''
#!/bin/bash
if [ -f /home/grey/.config/equibop/settings.json ]; then
rm /home/grey/.config/equibop/settings.json
fi
ln -s ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/equibop/settings.json /home/grey/.config/equibop/settings.json
flake.homeModules.graphics = { pkgs, lib, osConfig, ... }: {
config = lib.mkIf (osConfig.features.applications.gui.equibop.enable) {
programs.equibop.enable = true;
if [ -f /home/grey/.config/equibop/settings/settings.json ]; then
rm /home/grey/.config/equibop/settings/settings.json
fi
ln -s ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/equibop/equicord-settings.json /home/grey/.config/equibop/settings/settings.json
home.activation = {
linkEquibopConfigSettings = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript {
target = ".config/equibop/settings.json";
source = "dotfiles/${osConfig.info.hostName}/equibop/settings.json";
});
if [ -f /home/grey/.config/equibop/settings/quickCss.css ]; then
rm /home/grey/.config/equibop/settings/quickCss.css
fi
ln -s ${osConfig.info.rootPath}/dotfiles/${osConfig.networking.hostName}/equibop/quickCss.css /home/grey/.config/equibop/settings/quickCss.css
'';
linkEquibopConfigEquicordSettings = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript {
target = ".config/equibop/settings/settings.json";
source = "dotfiles/${osConfig.info.hostName}/equibop/equicord-settings.json";
});
linkEquibopConfigQuickCss = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript {
target = ".config/equibop/settings/quickCss.css";
source = "dotfiles/${osConfig.info.hostName}/equibop/quickCss.css";
});
};
};
};
}
+202 -193
View File
@@ -1,207 +1,216 @@
{ inputs, self, ... }: {
flake.homeModules.floorp = { pkgs, ... }:
let
firefox-addons = with pkgs; inputs.firefox-addons.packages.${system};
in {
programs.floorp = {
enable = true;
nativeMessagingHosts = [
pkgs.firefoxpwa
];
policies = {
AIControls.Default = {
Value = "blocked";
Locked = true;
};
AutofillAddressEnabled = false;
AutofillCreditCardEnabled = false;
DisableAppUpdate = true;
DisableFeedbackCommands = true;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
NoDefaultBookmarks = true;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
};
profiles.default = {
extensions = {
packages = with firefox-addons; [
adnauseam
bitwarden
indie-wiki-buddy
pwas-for-firefox
gnome-shell-integration
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
options.features.applications.gui.floorp.enable = lib.mkEnableOption "floorp";
};
flake.homeModules.graphics = { pkgs, lib, osConfig, ... }: {
config = lib.mkIf (osConfig.features.applications.gui.floorp.enable) (
let
firefox-addons = with pkgs; inputs.firefox-addons.packages.${system};
in {
stylix.targets.floorp.profileNames = lib.mkIf (osConfig.features.nixos.stylix.enable) [ "default" ];
programs.floorp = {
enable = true;
nativeMessagingHosts = [
pkgs.firefoxpwa
];
policies = {
AIControls.Default = {
Value = "blocked";
Locked = true;
};
AutofillAddressEnabled = false;
AutofillCreditCardEnabled = false;
DisableAppUpdate = true;
DisableFeedbackCommands = true;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
NoDefaultBookmarks = true;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
};
profiles.default = {
extensions = {
packages = with firefox-addons; [
adnauseam
bitwarden
indie-wiki-buddy
pwas-for-firefox
gnome-shell-integration
];
settings = {
${firefox-addons.adnauseam.addonId} = {
force = true;
settings = {
"firstInstall" = false;
"hidingAds" = true;
"clickingAds" = true;
"blockingMalware" = true;
"disableClickingForDNT" = true;
"clickProbability" = 0.75;
selectedFilterLists = [
"user-filters"
"adnauseam-filters"
"eff-dnt-whitelist"
"ublock-filters"
"ublock-badware"
"ublock-privacy"
"ublock-quick-fixes"
"ublock-unbreak"
"easylist"
"easyprivacy"
"urlhaus-1"
"fanboy-cookiemonster"
"ublock-cookies-easylist"
"adguard-cookies"
"ublock-cookies-adguard"
"fanboy-ai-suggestions"
"easylist-chat"
"easylist-newsletters"
"easylist-notifications"
"easylist-annoyances"
"adguard-mobile-app-banners"
"adguard-other-annoyances"
"adguard-popup-overlays"
"adguard-widgets"
"ublock-annoyances"
];
};
};
};
};
settings = {
"signon.rememberSignons" = false;
"signon.autofillForms" = false;
"floorp.panelSidebar.enabled" = false;
"floorp.workspaces.enabled" = false;
"browser.toolbars.bookmarks.visibility" = "newtab";
"floorp.browser.welcome.page.shown" = true;
"browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.feeds.adsfeed" = false;
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
"browser.newtabpage.activity-stream.feeds.weatherfeed" = false;
"browser.newtabpage.activity-stream.newtabWallpapers.user.enabled" = true;
"browser.newtabpage.activity-stream.widgets.enabled" = false;
"browser.newtabpage.activity-stream.discoverystream.enabled" = false;
"browser.newtabpage.activity-stream.newtabWallpapers.wallpaper" = "suspension-bridge";
"floorp.design.configs" = {
globalConfigs = {
userInterface = "proton";
uiCustomization = {
qrCode.disableButton = true;
disableFloorpStart = true;
};
};
};
"ui.key.menuAccessKeyFocuses" = false;
"floorp.keyboardshortcut.enabled" = true;
"floorp.keyboardshortcut.config" = {
enabled = true;
shortcuts = {
gecko-close-tab = {
modifiers = {
alt = true;
ctrl = false;
meta = false;
shift = false;
${firefox-addons.adnauseam.addonId} = {
force = true;
settings = {
"firstInstall" = false;
"hidingAds" = true;
"clickingAds" = true;
"blockingMalware" = true;
"disableClickingForDNT" = true;
"clickProbability" = 0.75;
selectedFilterLists = [
"user-filters"
"adnauseam-filters"
"eff-dnt-whitelist"
"ublock-filters"
"ublock-badware"
"ublock-privacy"
"ublock-quick-fixes"
"ublock-unbreak"
"easylist"
"easyprivacy"
"urlhaus-1"
"fanboy-cookiemonster"
"ublock-cookies-easylist"
"adguard-cookies"
"ublock-cookies-adguard"
"fanboy-ai-suggestions"
"easylist-chat"
"easylist-newsletters"
"easylist-notifications"
"easylist-annoyances"
"adguard-mobile-app-banners"
"adguard-other-annoyances"
"adguard-popup-overlays"
"adguard-widgets"
"ublock-annoyances"
];
};
};
key = "Q";
action = "gecko-close-tab";
};
gecko-open-new-tab = {
modifiers = {
alt = true;
ctrl = false;
meta = false;
shift = false;
};
key = "Enter";
action = "gecko-open-new-tab";
};
};
};
};
search = {
force = true;
default = "ddg-noai";
engines = {
ddg-noai = {
name = "DuckDuckGo No-AI";
urls = [
{
template = "https://noai.duckduckgo.com/?q={searchTerms}";
}
];
icon = "https://duckduckgo.com/favicon.ico";
definedAliases = ["@noai"];
settings = {
"signon.rememberSignons" = false;
"signon.autofillForms" = false;
"floorp.panelSidebar.enabled" = false;
"floorp.workspaces.enabled" = false;
"browser.toolbars.bookmarks.visibility" = "newtab";
"floorp.browser.welcome.page.shown" = true;
"browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.feeds.adsfeed" = false;
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
"browser.newtabpage.activity-stream.feeds.weatherfeed" = false;
"browser.newtabpage.activity-stream.newtabWallpapers.user.enabled" = true;
"browser.newtabpage.activity-stream.widgets.enabled" = false;
"browser.newtabpage.activity-stream.discoverystream.enabled" = false;
"browser.newtabpage.activity-stream.newtabWallpapers.wallpaper" = "suspension-bridge";
"floorp.design.configs" = {
globalConfigs = {
userInterface = "proton";
uiCustomization = {
qrCode.disableButton = true;
disableFloorpStart = true;
};
};
};
"ui.key.menuAccessKeyFocuses" = false;
"floorp.keyboardshortcut.enabled" = true;
"floorp.keyboardshortcut.config" = {
enabled = true;
shortcuts = {
gecko-close-tab = {
modifiers = {
alt = true;
ctrl = false;
meta = false;
shift = false;
};
key = "Q";
action = "gecko-close-tab";
};
gecko-open-new-tab = {
modifiers = {
alt = true;
ctrl = false;
meta = false;
shift = false;
};
key = "Enter";
action = "gecko-open-new-tab";
};
};
};
};
nixpkgs = {
name = "nixpkgs packages";
urls = [
{
template = "https://search.nixos.org/packages?query={searchTerms}";
}
];
icon = "https://wiki.nixos.org/favicon.ico";
definedAliases = ["@np"];
};
nixos-options = {
name = "NixOS options";
urls = [
{
template = "https://search.nixos.org/options?query={searchTerms}";
}
];
icon = "https://wiki.nixos.org/favicon.ico";
definedAliases = ["@no"];
};
nixos-wiki = {
name = "NixOS Wiki";
urls = [
{
template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";
}
];
icon = "https://wiki.nixos.org/favicon.ico";
definedAliases = ["@nw"];
};
noogle = {
name = "Noogle";
urls = [
{
template = "https://noogle.dev/q/?term={searchTerms}";
}
];
icon = "https://noogle.dev/favicon.ico";
definedAliases = ["@ng"];
};
arch-wiki = {
name = "ArchWiki";
urls = [
{
template = "https://wiki.archlinux.org/index.php?search={searchTerms}";
}
];
icon = "https://wiki.archlinux.org/favicon.ico";
definedAliases = ["@aw"];
search = {
force = true;
default = "ddg-noai";
engines = {
ddg-noai = {
name = "DuckDuckGo No-AI";
urls = [
{
template = "https://noai.duckduckgo.com/?q={searchTerms}";
}
];
icon = "https://duckduckgo.com/favicon.ico";
definedAliases = ["@noai"];
};
nixpkgs = {
name = "nixpkgs packages";
urls = [
{
template = "https://search.nixos.org/packages?query={searchTerms}";
}
];
icon = "https://wiki.nixos.org/favicon.ico";
definedAliases = ["@np"];
};
nixos-options = {
name = "NixOS options";
urls = [
{
template = "https://search.nixos.org/options?query={searchTerms}";
}
];
icon = "https://wiki.nixos.org/favicon.ico";
definedAliases = ["@no"];
};
nixos-wiki = {
name = "NixOS Wiki";
urls = [
{
template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";
}
];
icon = "https://wiki.nixos.org/favicon.ico";
definedAliases = ["@nw"];
};
noogle = {
name = "Noogle";
urls = [
{
template = "https://noogle.dev/q/?term={searchTerms}";
}
];
icon = "https://noogle.dev/favicon.ico";
definedAliases = ["@ng"];
};
arch-wiki = {
name = "ArchWiki";
urls = [
{
template = "https://wiki.archlinux.org/index.php?search={searchTerms}";
}
];
icon = "https://wiki.archlinux.org/favicon.ico";
definedAliases = ["@aw"];
};
};
};
};
};
};
};
}
);
};
}
@@ -0,0 +1,78 @@
{ inputs, self, ... }: {
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
options.features.applications.gui = {
fluxer.enable = lib.mkEnableOption "fluxer";
fluxer-canary.enable = lib.mkEnableOption "fluxer-canary";
};
config = {
environment.systemPackages = (if config.features.applications.gui.fluxer.enable then [
(pkgs.callPackage ({ appimageTools, fetchurl, lib, pkgs, ... }:
let
pname = "fluxer";
version = "0.0.8";
src = fetchurl {
url = "https://api.fluxer.app/dl/desktop/stable/linux/x64/latest/appimage";
sha256 = "sha256-GdoBK+Z/d2quEIY8INM4IQy5tzzIBBM+3CgJXQn0qAw=";
};
appimageContents = appimageTools.extract { inherit pname version src; };
in
appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/${pname}.png $out/share/icons/hicolor/512x512/apps/${pname}.png
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname} %U'
'';
meta = with lib; {
description = "Open-source, self-hosted alternative to Discord";
homepage = "https://fluxer.app/";
license = licenses.agpl3Only;
maintainers = [ ];
platforms = [ "x86_64-linux" ];
};
}) {})
] else []) ++ (if config.features.applications.gui.fluxer-canary.enable then [
(pkgs.callPackage ({ appimageTools, fetchurl, lib, pkgs, ... }:
let
pname = "fluxer-canary";
version = "2026.827.132039";
src = fetchurl {
url = "https://api.canary.fluxer.app/dl/desktop/canary/linux/x64/latest/appimage";
sha256 = "sha256-eRR9JZa4LPuUtjdDO+JvzaOLxQeDgVziLrFr5iIgr1Q=";
};
appimageContents = appimageTools.extract { inherit pname version src; };
in
appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${appimageContents}/${pname}.png $out/share/icons/hicolor/512x512/apps/${pname}.png
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun %U' 'Exec=${pname} %U'
'';
meta = with lib; {
description = "Open-source, self-hosted alternative to Discord";
homepage = "https://fluxer.app/";
license = licenses.agpl3Only;
maintainers = [ ];
platforms = [ "x86_64-linux" ];
};
}) {})
] else []);
};
};
}
+11 -5
View File
@@ -1,10 +1,16 @@
{ inputs, self, ... }: {
flake.homeModules.kitty = { pkgs, ... }: {
programs.kitty = {
enable = true;
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
options.features.applications.gui.kitty.enable = lib.mkEnableOption "kitty";
};
shellIntegration.enableBashIntegration = true;
enableGitIntegration = true;
flake.homeModules.graphics = { pkgs, osConfig, lib, ... }: {
config = lib.mkIf (osConfig.features.applications.gui.kitty.enable) {
programs.kitty = {
enable = true;
shellIntegration.enableBashIntegration = true;
enableGitIntegration = true;
};
};
};
}
+30 -9
View File
@@ -1,14 +1,35 @@
{ inputs, self, ... }: {
flake.nixosModules.nautilus = { pkgs, config, ... }: {
environment.systemPackages = with pkgs; [
nautilus
code-nautilus
adwaita-icon-theme
];
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
options.features.applications.gui.nautilus.enable = lib.mkEnableOption "nautilus";
programs.nautilus-open-any-terminal = {
enable = true;
terminal = "kitty";
config = lib.mkIf (config.features.applications.gui.nautilus.enable) {
environment.systemPackages = with pkgs; [
nautilus
adwaita-icon-theme
] ++ (
if (config.features.applications.gui.vscode.enable)
then [ pkgs.code-nautilus ]
else []
);
programs.nautilus-open-any-terminal = lib.mkIf (config.features.applications.gui.kitty.enable) {
enable = true;
terminal = "kitty";
};
};
};
flake.homeModules.graphics = { pkgs, osConfig, lib, ... }: {
config = lib.mkIf (osConfig.features.applications.gui.nautilus.enable) {
gtk.gtk3.bookmarks = [
"file://${osConfig.info.rootPath} NixOS"
"file:///home/grey/Downloads Downloads"
"file:///home/grey/Documents Documents"
"file:///home/grey/Pictures Pictures"
"file:///home/grey/Music Music"
"file:///home/grey/Videos Videos"
"file:/// Root"
];
};
};
}
@@ -0,0 +1,20 @@
{ inputs, self, ... }: {
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
options.features.applications.gui.remmina.enable = lib.mkEnableOption "remmina";
};
flake.homeModules.graphics = { pkgs, osConfig, lib, ... }: {
config = lib.mkIf (osConfig.features.applications.gui.remmina.enable) {
home.packages = with pkgs; [
remmina
freerdp
];
home.activation.linkRemminaPresets = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript {
target = ".local/share/remmina";
source = "dotfiles/${osConfig.info.hostName}/remmina";
isDir = true;
});
};
};
}
+17 -14
View File
@@ -1,20 +1,23 @@
{ inputs, self, ... }: {
flake.homeModules.vscode = { osConfig, pkgs, lib, ... }: {
home.packages = [ pkgs.vscode ];
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
options.features.applications.gui.vscode.enable = lib.mkEnableOption "vscode";
};
home.activation = {
linkVsCodeConfig = lib.hm.dag.entryAfter ["writeBoundary"] ''
#!/bin/bash
if [ -f /home/grey/.config/Code/User/settings.json ]; then
rm /home/grey/.config/Code/User/settings.json
fi
ln -s ${osConfig.info.rootPath}/dotfiles/global/vscode/settings.json /home/grey/.config/Code/User/settings.json
flake.homeModules.graphics = { osConfig, pkgs, lib, ... }: {
config = lib.mkIf (osConfig.features.applications.gui.vscode.enable) {
home.packages = [ pkgs.vscode ];
if [ -f /home/grey/.config/Code/User/keybindings.json ]; then
rm /home/grey/.config/Code/User/keybindings.json
fi
ln -s ${osConfig.info.rootPath}/dotfiles/global/vscode/keybindings.json /home/grey/.config/Code/User/keybindings.json
'';
home.activation = {
linkVsCodeConfigSettings = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript {
target = ".config/Code/User/settings.json";
source = "dotfiles/global/vscode/settings.json";
});
linkVsCodeConfigKeybindings = lib.hm.dag.entryAfter ["writeBoundary"] (osConfig.helpers.mkSymlinkActivationScript {
target = ".config/Code/User/keybindings.json";
source = "dotfiles/global/vscode/keybindings.json";
});
};
};
};
}
+6 -1
View File
@@ -1,4 +1,8 @@
{ inputs, self, ... }: {
imports = [
inputs.home-manager.flakeModules.home-manager
];
flake.nixosModules.global = { pkgs, lib, config, ... }: {
imports = [
inputs.home-manager.nixosModules.default
@@ -9,7 +13,8 @@
config.home-manager = lib.mkIf (config.features.nixos.home-manager.enable) {
useGlobalPkgs = true;
useUserPackages = true;
users.grey = self.homeModules.${config.networking.hostName};
backupFileExtension = "bak";
users.grey = self.homeModules.${config.info.hostName};
};
};
}
+1 -1
View File
@@ -8,7 +8,7 @@
config = lib.mkIf (config.features.nixos.stylix.enable) {
stylix.enable = true;
stylix.image = builtins.path { path = "${self.outPath}/modules/hosts/${config.networking.hostName}/wallpaper.jpg"; };
stylix.image = builtins.path { path = "${self}/modules/hosts/${config.info.hostName}/wallpaper.jpg"; };
stylix.polarity = "dark";
};
};
@@ -1,8 +1,4 @@
{ inputs, self, ...}: {
imports = [
inputs.home-manager.flakeModules.home-manager
];
config.systems = [
"x86_64-linux"
];
-136
View File
@@ -1,136 +0,0 @@
{ inputs, self, ... }: {
flake.nixosModules.global = { pkgs, config, lib, ... }: {
options = {
info.rootPath = lib.mkOption {
type = lib.types.str;
default = "/home/grey/nixos";
};
};
config = {
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.gc = {
automatic = true;
persistent = true;
dates = "Sun 05:00";
};
boot.loader.efi.canTouchEfiVariables = true;
networking.networkmanager.enable = true;
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_GB.UTF-8";
LC_IDENTIFICATION = "en_GB.UTF-8";
LC_MEASUREMENT = "en_GB.UTF-8";
LC_MONETARY = "en_GB.UTF-8";
LC_NAME = "en_GB.UTF-8";
LC_NUMERIC = "en_GB.UTF-8";
LC_PAPER = "en_GB.UTF-8";
LC_TELEPHONE = "en_GB.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
services.xserver.xkb = {
layout = "gb";
variant = "";
};
console.keyMap = "uk";
users.users."grey" = {
isNormalUser = true;
description = "grey";
extraGroups = [ "networkmanager" "wheel" ];
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
git
fzf
jq
busybox
ethtool
hyperfine
];
programs.nano = {
enable = true;
nanorc = ''
set nowrap
set tabstospaces
set tabsize 2
'';
};
hardware.bluetooth = {
enable = true;
powerOnBoot = false;
};
programs.gnupg.agent = {
enable = true;
};
};
};
flake.homeModules.global = { config, pkgs, ... }: {
nix.gc = {
automatic = true;
persistent = true;
dates = "Sun 05:00";
};
home.packages = with pkgs; [
speedtest-go
];
programs.git = {
enable = true;
lfs.enable = true;
settings = {
user.name = "Grey Jones";
user.email = "grey@greyweather.dev";
};
signing = {
format = "openpgp";
key = "CC7388DF8E1890729921BCFF7C67C51C2FF524D9";
signByDefault = true;
};
};
programs.gpg = {
enable = true;
};
programs.ssh = {
enable = true;
enableDefaultConfig = false;
settings = {
"git.greyweather.dev" = {
HostName = "git.greyweather.dev";
Port = "222";
User = "git";
IdentityFile = "~/.ssh/id_gitea";
};
"github.com" = {
HostName = "github.com";
Port = 22;
User = "git";
IdentityFile = "~/.ssh/id_github";
};
};
};
home.shell.enableBashIntegration = true;
};
}
+85
View File
@@ -0,0 +1,85 @@
{ inputs, self, ... }: {
flake.nixosModules.global = { pkgs, config, lib, ... }: {
system.stateVersion = config.info.stateVersion;
nix = {
settings.experimental-features = [
"nix-command"
"flakes"
];
gc = {
automatic = true;
persistent = true;
dates = "Sun 05:00";
};
};
boot.loader.efi.canTouchEfiVariables = true;
networking = {
networkmanager.enable = true;
hostName = config.info.hostName;
};
time.timeZone = "Europe/London";
i18n = {
defaultLocale = "en_GB.UTF-8";
extraLocaleSettings = with config.i18n; {
LC_ADDRESS = defaultLocale;
LC_IDENTIFICATION = defaultLocale;
LC_MEASUREMENT = defaultLocale;
LC_MONETARY = defaultLocale;
LC_NAME = defaultLocale;
LC_NUMERIC = defaultLocale;
LC_PAPER = defaultLocale;
LC_TELEPHONE = defaultLocale;
LC_TIME = defaultLocale;
};
};
services.xserver.xkb = {
layout = "gb";
variant = "";
};
console.keyMap = "uk";
users.users."grey" = {
isNormalUser = true;
description = "grey";
extraGroups = [ "networkmanager" "wheel" ];
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
git
fzf
jq
busybox
ethtool
hyperfine
] ++ config.features.applications.extraPackages;
programs = {
nano = {
enable = true;
nanorc = ''
set nowrap
set tabstospaces
set tabsize 2
'';
};
gnupg.agent = {
enable = true;
};
};
hardware.bluetooth = {
enable = true;
powerOnBoot = false;
};
};
}
+15
View File
@@ -0,0 +1,15 @@
{ inputs, self, ... }: {
flake.nixosModules.global = { pkgs, config, lib, ... }: {
options.helpers = {
mkSymlinkActivationScript = lib.mkOption {
type = lib.types.functionTo lib.types.str;
default = {target, source, isDir ? false}: ''
if [ ${if isDir then "-d" else "-f"} /home/grey/${target} ]; then
rm${if isDir then " -rf" else ""} /home/grey/${target}
fi
ln -s ${config.info.rootPath}/${source} /home/grey/${target}
'';
};
};
};
}
+61
View File
@@ -0,0 +1,61 @@
{ inputs, self, ... }: {
flake.homeModules.global = { osConfig, config, pkgs, ... }: {
nix.gc = {
automatic = true;
persistent = true;
dates = "Sun 05:00";
};
home = {
stateVersion = osConfig.info.stateVersion;
packages = with pkgs; [
speedtest-go
] ++ osConfig.features.applications.extraUserPackages;
shell.enableBashIntegration = true;
};
programs = {
git = {
enable = true;
lfs.enable = true;
settings = {
user.name = "Grey Jones";
user.email = "grey@greyweather.dev";
};
signing = {
format = "openpgp";
key = "CC7388DF8E1890729921BCFF7C67C51C2FF524D9";
signByDefault = true;
};
};
gpg = {
enable = true;
};
ssh = {
enable = true;
enableDefaultConfig = false;
settings = {
"git.greyweather.dev" = {
HostName = "git.greyweather.dev";
Port = "222";
User = "git";
IdentityFile = "~/.ssh/id_gitea";
};
"github.com" = {
HostName = "github.com";
Port = 22;
User = "git";
IdentityFile = "~/.ssh/id_github";
};
};
};
};
};
}
+41
View File
@@ -0,0 +1,41 @@
{ inputs, self, ... }: {
flake.nixosModules.global = { pkgs, config, lib, ... }: {
options = {
info = {
rootPath = lib.mkOption {
type = lib.types.str;
default = "/home/grey/nixos";
};
hostName = lib.mkOption {
type = lib.types.str;
default = "";
};
stateVersion = lib.mkOption {
type = lib.types.str;
default = "";
};
};
components.bootLoader = lib.mkOption {
type = lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
builtins.attrNames (builtins.readDir "${self}/modules/components/boot-loaders")
));
default = "grub";
};
features.applications = {
extraPackages = lib.mkOption {
type = lib.types.listOf (lib.types.package);
default = [];
};
extraUserPackages = lib.mkOption {
type = lib.types.listOf (lib.types.package);
default = [];
};
};
};
};
}
+33 -74
View File
@@ -8,15 +8,17 @@
};
flake.nixosModules.kitagawa = { config, pkgs, ... }: {
system.stateVersion = "26.05";
info = {
hostName = "kitagawa";
stateVersion = "26.05";
};
networking.hostName = "kitagawa";
imports = with self.nixosModules; [
ly
niri
noctalia
];
components = {
bootLoader = "limine";
displayManager = "ly";
windowManagers = "niri";
shells = "noctalia";
};
features = {
nixos = {
@@ -39,7 +41,30 @@
enable = true;
spicetify.enable = true;
};
kitty.enable = true;
vscode.enable = true;
floorp.enable = true;
equibop.enable = true;
remmina.enable = true;
};
extraPackages = with pkgs; [
github-desktop
moonlight-qt
];
extraUserPackages = with pkgs; [
obsidian
thunderbird
jetbrains.clion
jetbrains.idea
proton-vpn
ente-auth
signal-desktop
xarchiver
kdePackages.filelight
loupe
];
};
};
@@ -64,11 +89,6 @@
openFirewall = true;
};
environment.systemPackages = with pkgs; [
github-desktop
moonlight-qt
];
hardware.steam-hardware.enable = true;
boot = {
@@ -80,26 +100,13 @@
"rd.udev.log_level=3"
"rd.systemd.show_status=auto"
];
loader.limine = {
enable = true;
maxGenerations = 10;
};
};
};
flake.homeModules.kitagawa = { config, pkgs, inputs, lib, ... }: {
home.stateVersion = "26.05";
imports = with self.homeModules; [
global
graphics
niri
noctalia
vscode
kitty
floorp
equibop
];
/*
@@ -109,42 +116,6 @@
];
*/
home.packages = with pkgs; [
obsidian
thunderbird
jetbrains.clion
jetbrains.idea
proton-vpn
ente-auth
signal-desktop
xarchiver
kdePackages.filelight
remmina
freerdp
loupe
];
stylix.targets.floorp.profileNames = [ "default" ];
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
gtk = {
enable = true;
gtk3.bookmarks = [
"file:///home/grey/nixos NixOS"
"file:///home/grey/Downloads Downloads"
"file:///home/grey/Documents Documents"
"file:///home/grey/Pictures Pictures"
"file:///home/grey/Music Music"
"file:///home/grey/Videos Videos"
"file:/// Root"
];
};
services.udiskie = {
enable = true;
settings = {
@@ -192,17 +163,5 @@
};
};
};
/*
home.activation = {
linkRemminaPresets = lib.hm.dag.entryAfter ["writeBoundary"] ''
#!/bin/bash
if [ -d /home/grey/.local/share/remmina ]; then
rm -rf /home/grey/.local/share/remmina
fi
ln -s /home/grey/nixos/assets/dotfiles/remmina-presets /home/grey/.local/share/remmina
'';
};
*/
};
}