summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2025-12-18 21:04:00 +0100
committeradikro <adikro@disroot.org>2025-12-18 21:04:00 +0100
commite60410393cea222b16743a1a87f29c06b9b3543b (patch)
tree8a574048613f6b13024795bd710b824b40f5db18 /modules
parentea3bf9c87ee72d6da5ea2316b229082c7fc9cdf6 (diff)
rewrite of system modules, hm modules are next
Diffstat (limited to 'modules')
-rw-r--r--modules/audio.nix20
-rw-r--r--modules/boot.nix23
-rw-r--r--modules/greet.nix16
-rw-r--r--modules/hm/default.nix12
-rw-r--r--modules/hm/editors/default.nix8
-rw-r--r--modules/hm/editors/helix.nix7
-rw-r--r--modules/hm/editors/nixvim.nix98
-rw-r--r--modules/hm/editors/nvf.nix42
-rw-r--r--modules/hm/git.nix11
-rw-r--r--modules/hm/programs/default.nix9
-rw-r--r--modules/hm/programs/nixcord.nix204
-rw-r--r--modules/hm/programs/satty.nix4
-rw-r--r--modules/hm/programs/spicetify.nix21
-rw-r--r--modules/hm/programs/yazi.nix7
-rw-r--r--modules/hm/terminal/btop.nix6
-rw-r--r--modules/hm/terminal/default.nix10
-rw-r--r--modules/hm/terminal/fish.nix62
-rw-r--r--modules/hm/terminal/foot.nix25
-rw-r--r--modules/hm/terminal/starship.nix111
-rw-r--r--modules/hm/terminal/utils.nix26
-rw-r--r--modules/hm/wayland/default.nix8
-rw-r--r--modules/hm/wayland/niri/binds.nix108
-rw-r--r--modules/hm/wayland/niri/default.nix7
-rw-r--r--modules/hm/wayland/niri/niri.nix72
-rw-r--r--modules/hm/wayland/waybar.nix151
-rw-r--r--modules/hm/xdg.nix34
-rw-r--r--modules/hyprland.nix7
-rw-r--r--modules/memory.nix16
-rw-r--r--modules/networking.nix25
-rw-r--r--modules/niri.nix9
-rw-r--r--modules/scx.nix12
-rw-r--r--modules/sys/core/audio.nix28
-rw-r--r--modules/sys/core/bootloader.nix36
-rw-r--r--modules/sys/core/default.nix14
-rw-r--r--modules/sys/core/drivers.nix56
-rw-r--r--modules/sys/core/fonts.nix21
-rw-r--r--modules/sys/core/greet.nix27
-rw-r--r--modules/sys/core/home-manager.nix30
-rw-r--r--modules/sys/core/localization.nix39
-rw-r--r--modules/sys/core/networking.nix29
-rw-r--r--modules/sys/core/security.nix27
-rw-r--r--modules/sys/default.nix8
-rw-r--r--modules/sys/features/default.nix8
-rw-r--r--modules/sys/features/nh.nix26
-rw-r--r--modules/sys/features/ollama.nix (renamed from modules/ollama.nix)0
-rw-r--r--modules/sys/features/virtualization.nix41
-rw-r--r--modules/sys/wayland/default.nix6
-rw-r--r--modules/sys/wayland/niri.nix20
-rw-r--r--modules/tor.nix41
-rw-r--r--modules/virtualization.nix23
50 files changed, 1459 insertions, 192 deletions
diff --git a/modules/audio.nix b/modules/audio.nix
deleted file mode 100644
index 05bc8a0..0000000
--- a/modules/audio.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ ... }:
-{
- services = {
- pipewire = {
- enable = true;
- audio.enable = true;
- pulse.enable = true;
- alsa.enable = true;
- alsa.support32Bit = true;
- jack.enable = true;
- wireplumber.enable = true;
- };
- playerctld = {
- enable = true;
- };
- };
-
- hardware.enableAllFirmware = true;
- security.rtkit.enable = true;
-}
diff --git a/modules/boot.nix b/modules/boot.nix
deleted file mode 100644
index 9a90734..0000000
--- a/modules/boot.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ pkgs, ... }:
-{
- boot = {
- loader = {
- efi.canTouchEfiVariables = true;
- systemd-boot = {
- enable = true;
- editor = false;
- configurationLimit = null;
- };
- timeout = 0;
- };
-
- supportedFilesystems = [ "ntfs" ];
- initrd.kernelModules = [ "amdgpu" "kvm-amd" ];
- kernelParams = [
- "video=DP-1:2560x1440@240"
- "quiet"
- ];
- kernelPackages = pkgs.linuxPackages_cachyos-lto-znver4;
- # kernelPackages = pkgs.linuxPackages_latest;
- };
-}
diff --git a/modules/greet.nix b/modules/greet.nix
deleted file mode 100644
index 13877c5..0000000
--- a/modules/greet.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ pkgs, config, ... }:
-
-let
- xsessions = "${config.services.displayManager.sessionData.desktops}/share/xsessions";
- waylandSessions = "${config.services.displayManager.sessionData.desktops}/share/wayland-sessions";
-in {
- services.greetd = {
- enable = true;
- settings = {
- default_session = {
- command = "${pkgs.tuigreet}/bin/tuigreet --sessions ${xsessions}:${waylandSessions} --remember --remember-user-session --asterisks --greeting 'Welcome to NixOS!' --time";
- user = "greeter";
- };
- };
- };
-}
diff --git a/modules/hm/default.nix b/modules/hm/default.nix
new file mode 100644
index 0000000..d388717
--- /dev/null
+++ b/modules/hm/default.nix
@@ -0,0 +1,12 @@
+{ ... }:
+{
+ imports = [
+ ./editors/default.nix
+ ./programs/default.nix
+ ./terminal/default.nix
+ ./wayland/default.nix
+
+ ./git.nix
+ ./xdg.nix
+ ];
+}
diff --git a/modules/hm/editors/default.nix b/modules/hm/editors/default.nix
new file mode 100644
index 0000000..e990897
--- /dev/null
+++ b/modules/hm/editors/default.nix
@@ -0,0 +1,8 @@
+{ ... }:
+{
+ imports = [
+ ./nixvim.nix
+ # ./helix.nix
+ # ./nvf.nix
+ ];
+}
diff --git a/modules/hm/editors/helix.nix b/modules/hm/editors/helix.nix
new file mode 100644
index 0000000..0204f8d
--- /dev/null
+++ b/modules/hm/editors/helix.nix
@@ -0,0 +1,7 @@
+{ pkgs, ... }:
+{
+ programs.helix = {
+ enable = true;
+# package = pkgs.helix;
+ };
+}
diff --git a/modules/hm/editors/nixvim.nix b/modules/hm/editors/nixvim.nix
new file mode 100644
index 0000000..b8a4e5a
--- /dev/null
+++ b/modules/hm/editors/nixvim.nix
@@ -0,0 +1,98 @@
+{ pkgs, inputs, ... }:
+{
+ imports = [ inputs.nixvim.homeModules.nixvim ];
+ programs.nixvim = {
+ enable = true;
+ package = inputs.neovim-nightly-overlay.packages.${pkgs.stdenv.hostPlatform.system}.default;
+
+ viAlias = true;
+ vimAlias = true;
+ defaultEditor = true;
+ waylandSupport = true;
+ colorschemes.gruvbox.enable = true;
+
+ plugins = {
+ lualine.enable = true;
+ oil.enable = true;
+ lazygit.enable = true;
+ persistence.enable = true;
+ nvim-autopairs.enable = true;
+ neoscroll.enable = true;
+ bufferline.enable = true;
+ web-devicons.enable = true;
+
+ treesitter = {
+ enable = true;
+ settings = {
+ indent.enable = true;
+ };
+ };
+
+ telescope = {
+ enable = true;
+ extensions = {
+ fzf-native = {
+ enable = true;
+ };
+ };
+ };
+
+ notify = {
+ enable = true;
+ settings = {
+ backgroundColour = "#1e1e2e";
+ fps = 60;
+ render = "default";
+ timeout = 500;
+ topDown = true;
+ };
+ };
+
+ hardtime = {
+ # enable = true;
+ settings = {
+ # disableMouse = true;
+ # enabled = false;
+ restrictionMode = "hint";
+ hint = true;
+ maxCount = 40;
+ maxTime = 1000;
+ };
+ };
+
+ nix.enable = true;
+ lsp = {
+ enable = true;
+ servers = {
+ nil_ls.enable = true;
+ clangd.enable = true;
+ };
+ };
+ };
+
+ opts = {
+ number = true;
+ relativenumber = true;
+ termguicolors = true;
+ # mouse = "a";
+ ignorecase = true;
+ smartcase = true;
+ expandtab = true;
+ shiftwidth = 2;
+ encoding = "utf-8";
+ fileencoding = "utf-8";
+ undofile = true;
+ swapfile = true;
+ backup = false;
+ autoread = true;
+ cursorline = true;
+ ruler = true;
+ gdefault = true;
+ scrolloff = 5;
+ clipboard = {
+ providers.wl-copy.enable = true;
+ register = "unnamedplus";
+ };
+ };
+ };
+}
diff --git a/modules/hm/editors/nvf.nix b/modules/hm/editors/nvf.nix
new file mode 100644
index 0000000..ab805ca
--- /dev/null
+++ b/modules/hm/editors/nvf.nix
@@ -0,0 +1,42 @@
+{ pkgs, neovim-nightly-overlay, ... }:
+
+{
+ programs.nvf = {
+ enable = true;
+
+ settings.vim = {
+ package = neovim-nightly-overlay.packages.${pkgs.stdenv.hostPlatform.system}.default;
+
+ viAlias = true;
+ vimAlias = true;
+
+ theme = {
+ enable = true;
+ name = "gruvbox";
+ style = "dark";
+ };
+
+ statusline = {
+ lualine = {
+ enable = true;
+ theme = "gruvbox-material";
+ };
+ };
+
+ autopairs.nvim-autopairs.enable = true;
+
+ lsp.enable = true;
+
+ languages = {
+ nix = {
+ enable = true;
+ format = {
+ enable = true;
+ type = "alejandra";
+ };
+ };
+ clang.enable = true;
+ };
+ };
+ };
+}
diff --git a/modules/hm/git.nix b/modules/hm/git.nix
new file mode 100644
index 0000000..dc11881
--- /dev/null
+++ b/modules/hm/git.nix
@@ -0,0 +1,11 @@
+{ ... }:
+{
+ programs.git = {
+ enable = true;
+ settings = {
+ user.name = "adikro";
+ user.email = "adikro@disroot.org";
+ init.defaultBranch = "main";
+ };
+ };
+}
diff --git a/modules/hm/programs/default.nix b/modules/hm/programs/default.nix
new file mode 100644
index 0000000..df6fb8b
--- /dev/null
+++ b/modules/hm/programs/default.nix
@@ -0,0 +1,9 @@
+{ ... }:
+{
+ imports = [
+ ./nixcord.nix
+ ./satty.nix
+ ./spicetify.nix
+ ./yazi.nix
+ ];
+}
diff --git a/modules/hm/programs/nixcord.nix b/modules/hm/programs/nixcord.nix
new file mode 100644
index 0000000..d7978af
--- /dev/null
+++ b/modules/hm/programs/nixcord.nix
@@ -0,0 +1,204 @@
+{ inputs, pkgs, ... }:
+{
+ imports = [ inputs.nixcord.homeModules.nixcord ];
+ programs.nixcord = {
+ enable = true;
+ package = pkgs.discord-krisp;
+ discord = {
+ enable = true;
+ vencord.enable = false;
+ equicord.enable = true;
+ };
+ config = {
+ frameless = true;
+ plugins = {
+ alwaysExpandRoles = {
+ enable = true;
+ hideArrow = true;
+ };
+ alwaysTrust = {
+ enable = true;
+ domain = false;
+ };
+ anammox.enable = true;
+ betterAudioPlayer.enable = true;
+ betterGifAltText.enable = true;
+ betterGifPicker.enable = true;
+ betterInvites.enable = true;
+ betterNotesBox = {
+ enable = true;
+ hide = true;
+ };
+ betterQuickReact = {
+ enable = true;
+ columns = 6.0;
+ rows = 1.0;
+ compactMode = true;
+ };
+ betterRoleContext.enable = true;
+ betterUploadButton.enable = true;
+ biggerStreamPreview.enable = true;
+ callTimer.enable = true;
+ characterCounter = {
+ enable = true;
+ colorEffects = false;
+ };
+ cleanChannelName.enable = true;
+ clearUrLs.enable = true;
+ copyFileContents.enable = true;
+ copyStickerLinks.enable = true;
+ crashHandler.enable = true;
+ customTimestamps.enable = true;
+ disableCallIdle.enable = true;
+ disableDeepLinks.enable = true;
+ # dontFilterMe.enable = true;
+ dontRoundMyTimestamps.enable = true;
+ equicordHelper = {
+ enable = true;
+ noMirroredCamera = true;
+ };
+ # equicordToolbox.enable = true;
+ expressionCloner.enable = true;
+ fakeNitro = {
+ enable = true;
+ enableEmojiBypass = false;
+ enableStickerBypass = false;
+ };
+ favoriteEmojiFirst.enable = true;
+ fixCodeblockGap.enable = true;
+ fixFileExtensions.enable = true;
+ fixImagesQuality.enable = true;
+ fixSpotifyEmbeds.enable = true;
+ fixYoutubeEmbeds.enable = true;
+ forceOwnerCrown.enable = true;
+ friendsSince.enable = true;
+ fullSearchContext.enable = true;
+ fullUserInChatbox.enable = true;
+ gifCollections = {
+ enable = true;
+ preventDuplicates = true;
+ showCopyImageLink = true;
+ };
+ gifRoulette = {
+ enable = true;
+ pingOwnerChance = true;
+ };
+ guildTagSettings.enable = true;
+ homeTyping.enable = true;
+ ignoreTerms.enable = true;
+ iLoveSpam.enable = true;
+ imageFilename.enable = true;
+ imageLink.enable = true;
+ imageZoom = {
+ enable = true;
+ nearestNeighbour = true;
+ saveZoomValues = true;
+ square = true;
+ };
+ imgToGif.enable = true;
+ inRole.enable = true;
+ inviteDefaults.enable = true;
+ # keyboardNavigation = {
+ # enable = true;
+ # hotkey = [ "Alt+Q" ];
+ # };
+ memberCount.enable = true;
+ mentionAvatars = {
+ enable = true;
+ showAtSymbol = true;
+ };
+ messageLinkEmbeds.enable = true;
+ messageLogger = {
+ enable = true;
+ ignoreSelf = true;
+ };
+ # messageLoggerEnhanced.enable = true;
+ moyai.enable = true;
+ musicControls.enable = true;
+ neverPausePreviews.enable = true;
+ newGuildSettings = {
+ enable = true;
+ messages = 1;
+ };
+ newPluginsManager.enable = true;
+ noF1.enable = true;
+ noMaskedUrlPaste.enable = true;
+ noModalAnimation.enable = true;
+ noNitroUpsell.enable = true;
+ # noOnboarding.enable = true;
+ noOnboardingDelay.enable = true;
+ noMosaic.enable = true;
+ noProfileThemes.enable = true;
+ noSystemBadge.enable = true;
+ noTypingAnimation.enable = true;
+ overrideForumDefaults = {
+ enable = true;
+ defaultLayout = 2;
+ };
+ onePingPerDm.enable = true;
+ openInApp.enable = true;
+ pauseInvitesForever.enable = true;
+ permissionFreeWill = {
+ enable = true;
+ lockout = false;
+ };
+ permissionsViewer.enable = true;
+ pinDMs = {
+ enable = true;
+ canCollapseDmSection = true;
+ };
+ pinIcon.enable = true;
+ platformIndicators.enable = true;
+ quoter.enable = true;
+ relationshipNotifier.enable = true;
+ roleColorEverywhere.enable = true;
+ saveFavoriteGiFs.enable = true;
+ sendTimestamps.enable = true;
+ serverInfo.enable = true;
+ showConnections.enable = true;
+ showHiddenChannels = {
+ enable = true;
+ # channelStyle = 2;
+ };
+ showHiddenThings.enable = true;
+ showResourceChannels.enable = true;
+ showTimeoutDuration.enable = true;
+ # soggy = {
+ # enable = true;
+ # imageLink = "https://codeberg.org/adikro/wallpapers/raw/branch/main/kirkinator.gif";
+ # songLink = "https://video.twimg.com/amplify_video/1976076971651268608/vid/avc1/1080x720/KGLQcBQQDvLZUGKI.mp4";
+ # };
+ spotifyCrack = {
+ enable = true;
+ noSpotifyAutoPause = false;
+ };
+ streamerModeOnStream.enable = true;
+ typingIndicator = {
+ enable = true;
+ indicatorMode = 2;
+ };
+ typingTweaks.enable = true;
+ unindent.enable = true;
+ universalMention = {
+ enable = true;
+ globalMention = true;
+ };
+ unlimitedAccounts.enable = true;
+ unlockedAvatarZoom.enable = true;
+ userVoiceShow.enable = true;
+ validReply.enable = true;
+ validUser.enable = true;
+ viewIcons = {
+ enable = true;
+ format = "png";
+ };
+ voiceMessages.enable = true;
+ volumeBooster.enable = true;
+ whoReacted.enable = true;
+ whosWatching.enable = true;
+ youtubeAdblock.enable = true;
+ youtubeDescription.enable = true;
+ };
+ };
+ };
+}
diff --git a/modules/hm/programs/satty.nix b/modules/hm/programs/satty.nix
new file mode 100644
index 0000000..facb35d
--- /dev/null
+++ b/modules/hm/programs/satty.nix
@@ -0,0 +1,4 @@
+{ ... }:
+{
+
+}
diff --git a/modules/hm/programs/spicetify.nix b/modules/hm/programs/spicetify.nix
new file mode 100644
index 0000000..9d66181
--- /dev/null
+++ b/modules/hm/programs/spicetify.nix
@@ -0,0 +1,21 @@
+{ pkgs, inputs, ... }:
+
+let
+ spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
+in {
+ imports = [
+ inputs.spicetify-nix.homeManagerModules.spicetify
+ ];
+
+ programs.spicetify = {
+ enable = true;
+
+ enabledExtensions = with spicePkgs.extensions; [
+ adblockify
+ hidePodcasts
+ ];
+
+ theme = spicePkgs.themes.catppuccin;
+ colorScheme = "mocha";
+ };
+}
diff --git a/modules/hm/programs/yazi.nix b/modules/hm/programs/yazi.nix
new file mode 100644
index 0000000..a8e2911
--- /dev/null
+++ b/modules/hm/programs/yazi.nix
@@ -0,0 +1,7 @@
+{ inputs, ... }:
+{
+# nixpkgs.overlays = [ inputs.yazi.overlays.default ];
+ programs.yazi = {
+ enable = true;
+ };
+}
diff --git a/modules/hm/terminal/btop.nix b/modules/hm/terminal/btop.nix
new file mode 100644
index 0000000..dcd59ed
--- /dev/null
+++ b/modules/hm/terminal/btop.nix
@@ -0,0 +1,6 @@
+{ ... }:
+{
+ programs.btop = {
+ enable = true;
+ };
+}
diff --git a/modules/hm/terminal/default.nix b/modules/hm/terminal/default.nix
new file mode 100644
index 0000000..635f75e
--- /dev/null
+++ b/modules/hm/terminal/default.nix
@@ -0,0 +1,10 @@
+{ ... }:
+{
+ imports = [
+ ./btop.nix
+ ./fish.nix
+ ./foot.nix
+ ./starship.nix
+ ./utils.nix
+ ];
+}
diff --git a/modules/hm/terminal/fish.nix b/modules/hm/terminal/fish.nix
new file mode 100644
index 0000000..ec75de8
--- /dev/null
+++ b/modules/hm/terminal/fish.nix
@@ -0,0 +1,62 @@
+{ pkgs, ... }:
+{
+ programs.fish = {
+ enable = true;
+
+ interactiveShellInit = ''
+ set fish_greeting
+ fastfetch
+ '';
+
+ shellAliases = {
+ nos = "nh os switch";
+ nob = "nh os boot";
+ nfu = "nix flake update";
+ ll = "ls -lah";
+ la = "ls -A";
+ md = "mkdir -p";
+ rmf = "rm -rf";
+ gl = "git log --oneline --graph --decorate";
+ untar = "tar -xzvf";
+ tarc = "tar -czvf";
+ ff = "fastfetch";
+ cat = "bat";
+ ls = "eza";
+ };
+
+ plugins = [
+ {
+ name = "transient-fish";
+ src = pkgs.fishPlugins.transient-fish.src;
+ }
+ {
+ name = "fishbang";
+ src = pkgs.fishPlugins.fishbang.src;
+ }
+ {
+ name = "puffer";
+ src = pkgs.fishPlugins.puffer.src;
+ }
+ {
+ name = "pisces";
+ src = pkgs.fishPlugins.pisces.src;
+ }
+ {
+ name = "fzf-fish";
+ src = pkgs.fishPlugins.fzf-fish.src;
+ }
+ {
+ name = "fish-you-should-use";
+ src = pkgs.fishPlugins.fish-you-should-use.src;
+ }
+ {
+ name = "colored-man-pages";
+ src = pkgs.fishPlugins.colored-man-pages.src;
+ }
+ {
+ name = "fifc";
+ src = pkgs.fishPlugins.fifc.src;
+ }
+ ];
+ };
+}
diff --git a/modules/hm/terminal/foot.nix b/modules/hm/terminal/foot.nix
new file mode 100644
index 0000000..5c3098b
--- /dev/null
+++ b/modules/hm/terminal/foot.nix
@@ -0,0 +1,25 @@
+{pkgs, ...}:
+let
+ footTheme = pkgs.fetchurl {
+ url = "https://codeberg.org/dnkl/foot/raw/branch/master/themes/gruvbox-dark";
+ sha256 = "sha256-ubvnLgDEPGvNrwQdZRNguftg2SF5qcO1iVK0Tb5ZveI=";
+ };
+in
+{
+ programs.foot = {
+ enable = true;
+ settings = {
+ main = {
+ font="JetBrainsMonoNFM-Regular:size=14";
+# font-bold = "${font}:style=Bold:${withSize}";
+# font-italic = "${fontItalic}:style=Italic:${withSize}";
+# font-bold-italic = "${fontItalic}:style=BoldItalic:${withSize}";
+ box-drawings-uses-font-glyphs = true;
+ include = "${footTheme}";
+};
+ scrollback = {
+ lines = 10000;
+ };
+ };
+ };
+ }
diff --git a/modules/hm/terminal/starship.nix b/modules/hm/terminal/starship.nix
new file mode 100644
index 0000000..82ab84e
--- /dev/null
+++ b/modules/hm/terminal/starship.nix
@@ -0,0 +1,111 @@
+{ ... }:
+{
+ programs.starship = {
+ enable = true;
+ settings = {
+ add_newline = true;
+ aws.disabled = true;
+ battery.disabled = true;
+ buf.disabled = true;
+ bun.disabled = true;
+ c.format = "[$symbol ]($style)";
+ cpp = {
+ disabled = false;
+ format = "[$symbol ]($style)";
+ };
+ cmake.disabled = true;
+ cobol.disabled = true;
+ # cmd_duration = {
+ # min_time = 3;
+ # show_notifications = true;
+ # min_time_to_notify = 30;
+ # };
+ conda.disabled = true;
+ container.disabled = true;
+ crystal.disabled = true;
+ daml.disabled = true;
+ dart.disabled = true;
+ deno.disabled = true;
+ directory = {
+ truncate_to_repo = false;
+ read_only = "";
+ };
+ docker_context = {
+ format = "[$symbol ]($style)";
+ symbol = "";
+ };
+ dotnet.disabled = true;
+ elixir.disabled = true;
+ elm.disabled = true;
+ erlang.disabled = true;
+ fennel.disabled = true;
+ fortran.disabled = true;
+ gcloud.disabled = true;
+ git_commit.tag_symbol = "";
+ git_status = {
+ conflicted = "󰦎";
+ ahead = "";
+ behind = "";
+ diverged = "";
+ renamed = "";
+ deleted = "x";
+ };
+ gleam.disabled = true;
+ golang.disabled = true;
+ guix_shell.disabled = true;
+ gradle.disabled = true;
+ haskell.disabled = true;
+ haxe.disabled = true;
+ helm.disabled = true;
+ hostname.format = "[$hostname ]($style) ";
+ java.disabled = true;
+ jobs.symbol = "󰓎";
+ julia.disabled = true;
+ kotlin.disabled = true;
+ lua.disabled = true;
+ meson.disabled = true;
+ mojo.disabled = true;
+ nats.disabled = true;
+ netns.disabled = true;
+ nim.disabled = true;
+ nix_shell.format = "[$symbol$state ]($style)";
+ nodejs.disabled = true;
+ ocaml.disabled = true;
+ odin.disabled = true;
+ opa.disabled = true;
+ openstack.disabled = true;
+ package.disabled = true;
+ perl.disabled = true;
+ php.disabled = true;
+ pixi.disabled = true;
+ pulumi.disabled = true;
+ purescript.disabled = true;
+ python = {
+ symbol = "";
+ format = "[$symbol ]($style)";
+ };
+ quarto.disabled = true;
+ rlang.disabled = true;
+ raku.disabled = true;
+ red.disabled = true;
+ ruby.disabled = true;
+ rust.symbol = "";
+ scala.disabled = true;
+ singularity.disabled = true;
+ solidity.disabled = true;
+ spack.disabled = true;
+ # sudo = {
+ # format = "[sudo ]($style)";
+ # disabled = false;
+ # };
+ swift.disabled = true;
+ terraform.disabled = true;
+ typst.disabled = true;
+ vagrant.disabled = true;
+ vlang.disabled = true;
+ vcsh.disabled = true;
+ xmake.disabled = true;
+ zig.disabled = true;
+ };
+ };
+}
diff --git a/modules/hm/terminal/utils.nix b/modules/hm/terminal/utils.nix
new file mode 100644
index 0000000..c408e4a
--- /dev/null
+++ b/modules/hm/terminal/utils.nix
@@ -0,0 +1,26 @@
+{ pkgs, ... }:
+{
+ programs.zoxide = {
+ enable = true;
+ options = [
+ "--cmd cd"
+ ];
+ };
+ programs.bat = {
+ enable = true;
+ config = {
+ theme = "gruvbox-dark";
+ tabs = "2";
+ };
+ };
+ home.packages = with pkgs; [
+ fzf
+ fd
+ chafa
+ hexyl
+ eza
+ ripgrep
+ procs
+ fastfetch
+ ];
+}
diff --git a/modules/hm/wayland/default.nix b/modules/hm/wayland/default.nix
new file mode 100644
index 0000000..a42476b
--- /dev/null
+++ b/modules/hm/wayland/default.nix
@@ -0,0 +1,8 @@
+{ ... }:
+{
+ imports = [
+ ./niri/default.nix
+
+ ./waybar.nix
+ ];
+}
diff --git a/modules/hm/wayland/niri/binds.nix b/modules/hm/wayland/niri/binds.nix
new file mode 100644
index 0000000..1ff3a38
--- /dev/null
+++ b/modules/hm/wayland/niri/binds.nix
@@ -0,0 +1,108 @@
+{ config, pkgs, ... }:
+{
+ programs.niri.settings.binds = with config.lib.niri.actions;
+ let
+ set-volume = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@";
+ playerctl = spawn "${pkgs.playerctl}/bin/playerctl";
+ in
+ {
+ # Overview / help
+ "Mod+O" = {
+ action = toggle-overview;
+ repeat = false;
+ };
+ "Mod+Slash".action = show-hotkey-overlay;
+
+ # Audio
+ # XF86AudioRaiseVolume.action = set-volume "2%+";
+ # XF86AudioLowerVolume.action = set-volume "2%-";
+ XF86AudioRaiseVolume.action = playerctl "volume" "0.02+";
+ XF86AudioLowerVolume.action = playerctl "volume" "0.02-";
+ XF86AudioMute.action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle";
+ XF86AudioMicMute.action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle";
+
+ # Media keys
+ XF86AudioPlay.action = playerctl "play-pause";
+ XF86AudioPrev.action = playerctl "previous";
+ XF86AudioNext.action = playerctl "next";
+
+ # Column sizing
+ "Mod+Minus".action = set-column-width "-10%";
+ "Mod+Equal".action = set-column-width "+10%";
+
+ # Finer height adjustments when in column with other windows.
+ "Mod+Shift+Minus".action = set-window-height "-10%";
+ "Mod+Shift+Equal".action = set-window-height "+10%";
+
+ # Misc
+ "Mod+Shift+V".action = toggle-window-floating;
+ "Mod+Shift+P".action = power-off-monitors;
+ "Mod+W".action = toggle-column-tabbed-display;
+
+ "Mod+S".action = spawn "sh" "-c"
+ ''
+ filename="/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S).png"
+ grim -g "$(slurp)" - | tee "$filename" | wl-copy
+ '';
+
+ "Mod+Shift+S".action = spawn "sh" "-c"
+ ''
+ filename="/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S).png"
+ grim -g "$(slurp)" "$filename"
+
+ edited="/media/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)-edited.png"
+ satty --filename "$filename" --output-filename "$edited"
+ '';
+
+ "Mod+Shift+D".action = spawn "sh" "-c"
+ ''
+ cliphist list | fuzzel --dmenu | cliphist decode | wl-copy
+ '';
+
+ # --- System / General ---
+ "Mod+Return".action = spawn "foot";
+ "Mod+D".action = spawn "fuzzel";
+ "Mod+C".action = spawn "qalculate-gtk";
+ "Mod+BracketLeft".action = consume-or-expel-window-left;
+ "Mod+BracketRight".action = consume-or-expel-window-right;
+
+ "Mod+R".action = switch-preset-column-width;
+ "Mod+Shift+R".action = reset-window-height;
+ "Mod+F".action = maximize-column;
+ "Mod+Shift+F".action = fullscreen-window;
+
+ "Mod+Comma".action = consume-window-into-column;
+ "Mod+Period".action = expel-window-from-column;
+
+ "Mod+Shift+E".action = quit;
+
+ # --- Window Navigation (Focus) ---
+ "Mod+H".action = focus-column-left;
+ "Mod+L".action = focus-column-right;
+ "Mod+J".action = focus-workspace-down;
+ "Mod+K".action = focus-workspace-up;
+
+ # --- Window Management (Move) ---
+ "Mod+Shift+H".action = move-column-left;
+ "Mod+Shift+L".action = move-column-right;
+ "Mod+Shift+J".action = move-window-down-or-to-workspace-down;
+ "Mod+Shift+K".action = move-window-up-or-to-workspace-up;
+
+ # --- Window State ---
+ "Mod+Shift+Q".action = close-window;
+
+ "Mod+1".action = focus-workspace 1;
+ "Mod+2".action = focus-workspace 2;
+ "Mod+3".action = focus-workspace 3;
+ "Mod+4".action = focus-workspace 4;
+ "Mod+5".action = focus-workspace 5;
+ "Mod+6".action = focus-workspace 6;
+
+ "Mod+Shift+1".action.move-column-to-workspace = [ 1 ];
+ "Mod+Shift+2".action.move-column-to-workspace = [ 2 ];
+ "Mod+Shift+3".action.move-column-to-workspace = [ 3 ];
+ "Mod+Shift+4".action.move-column-to-workspace = [ 4 ];
+ "Mod+Shift+5".action.move-column-to-workspace = [ 5 ];
+ "Mod+Shift+6".action.move-column-to-workspace = [ 6 ];
+ };
+}
diff --git a/modules/hm/wayland/niri/default.nix b/modules/hm/wayland/niri/default.nix
new file mode 100644
index 0000000..61e7799
--- /dev/null
+++ b/modules/hm/wayland/niri/default.nix
@@ -0,0 +1,7 @@
+{ ... }:
+{
+ imports = [
+ ./niri.nix
+ ./binds.nix
+ ];
+}
diff --git a/modules/hm/wayland/niri/niri.nix b/modules/hm/wayland/niri/niri.nix
new file mode 100644
index 0000000..e6c8619
--- /dev/null
+++ b/modules/hm/wayland/niri/niri.nix
@@ -0,0 +1,72 @@
+{ lib, pkgs, ... }:
+{
+ programs.niri.settings = {
+ prefer-no-csd = true;
+ hotkey-overlay.skip-at-startup = true;
+ input = {
+ mouse = {
+ accel-profile = "flat";
+ accel-speed = -0.6;
+ middle-emulation = true;
+ scroll-factor = 1.5;
+ };
+ focus-follows-mouse = {
+ enable = true;
+ max-scroll-amount = "10%";
+ };
+ mod-key = "Alt";
+ keyboard = {
+ xkb.layout = "pl";
+ repeat-delay = 400;
+ repeat-rate = 60;
+ };
+ power-key-handling.enable = false;
+ };
+ outputs = {
+ "DP-1" = {
+ focus-at-startup = true;
+ # backdrop-color = "";
+ variable-refresh-rate = "on-demand";
+ mode = {
+ width = 2560;
+ height = 1440;
+ refresh = 239.998;
+ };
+ };
+ };
+ cursor = {
+ hide-when-typing = true;
+ size = 8;
+ # theme = "";
+ };
+ layout = {
+ border = {
+ width = 2;
+ # active = <decoration>;
+ };
+ focus-ring = {
+ width = 2;
+ # active = <decoration>;
+ };
+ preset-column-widths = [
+ { proportion = 1. / 3.; }
+ { proportion = 1. / 2.; }
+ { proportion = 2. / 3.; }
+ ];
+ preset-window-heights = [
+ { proportion = 1. / 3.; }
+ { proportion = 1. / 2.; }
+ { proportion = 2. / 3.; }
+ ];
+ default-column-width.proportion = 0.5;
+ tab-indicator = {
+ gaps-between-tabs = 3;
+ position = "top";
+ };
+ };
+ spawn-at-startup = [
+ { command = [ "${lib.getExe pkgs.xwayland-satellite}" ]; }
+ { command = [ "awww-daemon" ]; }
+ ];
+ };
+}
diff --git a/modules/hm/wayland/waybar.nix b/modules/hm/wayland/waybar.nix
new file mode 100644
index 0000000..17a2f46
--- /dev/null
+++ b/modules/hm/wayland/waybar.nix
@@ -0,0 +1,151 @@
+{ lib, pkgs, ... }:
+{
+ programs.waybar = {
+ enable = true;
+ # settings = [
+ # {
+ # layer = "top";
+ # position = "top";
+ #
+ # modules-center = [ "niri/workspaces" ];
+ # modules-right = [
+ # "idle_inhibitor"
+ # "pulseaudio"
+ # "disk"
+ # "battery"
+ # "custom/notification"
+ # "tray"
+ # "clock"
+ # ];
+ #
+ # "niri/workspaces" = {
+ # format = "{icon} {value}";
+ # format-icons = {
+ # active = "";
+ # default = "";
+ # };
+ # };
+ #
+ # "niri/window" = {
+ # icon = true;
+ # };
+ #
+ # "pulseaudio" = {
+ # format = "{icon}";
+ # format-bluetooth = "{icon} ";
+ # format-muted = "󰝟";
+ # format-icons = {
+ # headphone = "";
+ # default = [
+ # ""
+ # ""
+ # ];
+ # };
+ # scroll-step = 1;
+ # on-click = "${lib.getExe pkgs.pwvucontrol}";
+ # };
+ #
+ # clock = {
+ # format = "{:%H:%M}  ";
+ # format-alt = "{:%A; %B %d, %Y (%R)}  ";
+ # tooltip-format = "<tt><small>{calendar}</small></tt>";
+ # calendar = {
+ # mode = "year";
+ # mode-mon-col = 3;
+ # weeks-pos = "right";
+ # on-scroll = 1;
+ # on-click-right = "mode";
+ # format = {
+ # months = "<span color='#ffead3'><b>{}</b></span>";
+ # days = "<span color='#ecc6d9'><b>{}</b></span>";
+ # weeks = "<span color='#99ffdd'><b>W{}</b></span>";
+ # weekdays = "<span color='#ffcc66'><b>{}</b></span>";
+ # today = "<span color='#ff6699'><b><u>{}</u></b></span>";
+ # };
+ # };
+ # actions = {
+ # on-click-right = "mode";
+ # on-click-forward = "tz_up";
+ # on-click-backward = "tz_down";
+ # on-scroll-up = "shift_up";
+ # on-scroll-down = "shift_down";
+ # };
+ # };
+ #
+ # battery = {
+ # format = "{icon}";
+ #
+ # format-icons = [
+ # "󰁺"
+ # "󰁻"
+ # "󰁼"
+ # "󰁽"
+ # "󰁾"
+ # "󰁿"
+ # "󰂀"
+ # "󰂁"
+ # "󰂂"
+ # "󰁹"
+ # ];
+ # states = {
+ # battery-10 = 10;
+ # battery-20 = 20;
+ # battery-30 = 30;
+ # battery-40 = 40;
+ # battery-50 = 50;
+ # battery-60 = 60;
+ # battery-70 = 70;
+ # battery-80 = 80;
+ # battery-90 = 90;
+ # battery-100 = 100;
+ # };
+ #
+ # format-plugged = "󰚥";
+ # format-charging-battery-10 = "󰢜";
+ # format-charging-battery-20 = "󰂆";
+ # format-charging-battery-30 = "󰂇";
+ # format-charging-battery-40 = "󰂈";
+ # format-charging-battery-50 = "󰢝";
+ # format-charging-battery-60 = "󰂉";
+ # format-charging-battery-70 = "󰢞";
+ # format-charging-battery-80 = "󰂊";
+ # format-charging-battery-90 = "󰂋";
+ # format-charging-battery-100 = "󰂅";
+ # tooltip-format = "{capacity}% {timeTo}";
+ # };
+ #
+ # "custom/notification" = {
+ # format = "{icon} {} ";
+ # tooltip-format = "Left: Open Notification Center\nRight: Toggle Do not Disturb\nMiddle: Clear Notifications";
+ # format-icons = {
+ # notification = "<span foreground='red'><sup></sup></span>";
+ # none = "";
+ # dnd-notification = "<span foreground='red'><sup></sup></span>";
+ # dnd-none = "";
+ # inhibited-notification = "<span foreground='red'><sup></sup></span>";
+ # inhibited-none = "";
+ # dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
+ # dnd-inhibited-none = "";
+ # };
+ # return-type = "json";
+ # exec-if = "which swaync-client";
+ # exec = "swaync-client -swb";
+ # on-click = "swaync-client -t -sw";
+ # on-click-right = "swaync-client -d -sw";
+ # on-click-middle = "swaync-client -C";
+ # escape = true;
+ # };
+ #
+ # tray = {
+ # icon-size = 21;
+ # spacing = 10;
+ # };
+ # }
+ # ];
+ # style = ''
+ # #workspaces button {
+ # color: @base05;
+ # }
+ # '';
+ };
+}
diff --git a/modules/hm/xdg.nix b/modules/hm/xdg.nix
new file mode 100644
index 0000000..07b78f1
--- /dev/null
+++ b/modules/hm/xdg.nix
@@ -0,0 +1,34 @@
+{ ... }:
+{
+ xdg.userDirs = {
+ enable = true;
+
+ createDirectories = true;
+ download = "$HOME/dl";
+ documents = "$HOME/docs";
+ pictures = "/media/pics";
+ videos = "/media/vids";
+
+ desktop = null;
+ music = null;
+ publicShare = null;
+ templates = null;
+
+ extraConfig = {
+ XDG_PROJECTS_DIR = "$HOME/proj";
+ XDG_GAMES_DIR = "$HOME/games";
+ XDG_MEDIA_DIR = "/media";
+ XDG_SS_DIR = "/media/pics/ss";
+ XDG_CLIPS_DIR = "/media/vids/clips";
+ XDG_ARCHIVE_DIR = "/media/archive";
+ };
+ };
+ home.sessionVariables = {
+ XDG_PROJECTS_DIR = "$HOME/proj";
+ XDG_GAMES_DIR = "$HOME/games";
+ XDG_MEDIA_DIR = "/media";
+ XDG_SS_DIR = "/media/pics/ss";
+ XDG_CLIPS_DIR = "/media/vids/clips";
+ XDG_ARCHIVE_DIR = "/media/archive";
+ };
+}
diff --git a/modules/hyprland.nix b/modules/hyprland.nix
deleted file mode 100644
index 471f696..0000000
--- a/modules/hyprland.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ pkgs, inputs, ... }:
-{
- programs.hyprland = {
- enable = true;
- # package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
- };
-}
diff --git a/modules/memory.nix b/modules/memory.nix
deleted file mode 100644
index 9a7f0cf..0000000
--- a/modules/memory.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ config, pkgs, ... }:
-
-{
- zramSwap = {
- enable = true;
- memoryPercent = 25;
- algorithm = "zstd";
- };
-
- swapDevices = [
- {
- device = "/swap";
- size = 32 * 1024;
- }
- ];
-}
diff --git a/modules/networking.nix b/modules/networking.nix
deleted file mode 100644
index 0b3cf91..0000000
--- a/modules/networking.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ ... }:
-{
- systemd.services."NetworkManager-wait-online".enable = false;
- networking = {
- hostName = "szpont";
-
- networkmanager = {
- enable = true;
- wifi.macAddress = "stable-ssid";
- ethernet.macAddress = "stable-ssid";
- };
-
- firewall = {
- enable = true;
- allowedTCPPorts = [ 9150 ];
- allowedUDPPorts = [ 9150 ];
- };
-
- nameservers = [ ];
- };
- # services.resolved = {
- # enable = true;
- # domains = [ "1.1.1.1" "8.8.8.8" ];
- # };
-}
diff --git a/modules/niri.nix b/modules/niri.nix
deleted file mode 100644
index 7c55687..0000000
--- a/modules/niri.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ inputs, pkgs, ... }:
-{
- imports = [ inputs.niri.nixosModules.niri ];
- nixpkgs.overlays = [ inputs.niri.overlays.niri ];
- programs.niri = {
- enable = true;
- package = pkgs.niri-unstable;
- };
-}
diff --git a/modules/scx.nix b/modules/scx.nix
deleted file mode 100644
index 0f777fe..0000000
--- a/modules/scx.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ ... }:
-{
- services.scx = {
- enable = true;
- scheduler = "scx_lavd";
- extraArgs =[
- ''
- --performance
- ''
- ];
- };
-}
diff --git a/modules/sys/core/audio.nix b/modules/sys/core/audio.nix
new file mode 100644
index 0000000..0769f8d
--- /dev/null
+++ b/modules/sys/core/audio.nix
@@ -0,0 +1,28 @@
+{ config, lib, pkgs, ... }:
+{
+ options.szpont.audio.enable = lib.mkEnableOption "audio support";
+
+ config = lib.mkIf config.szpont.audio.enable {
+ services = {
+ pipewire = {
+ enable = true;
+ audio.enable = true;
+ pulse.enable = true;
+ alsa.enable = true;
+ alsa.support32Bit = true;
+ jack.enable = true;
+ wireplumber.enable = true;
+ };
+
+ playerctld.enable = true;
+ spotifyd.enable = true;
+ };
+
+ security.rtkit.enable = true;
+ hardware.enableAllFirmware = true;
+
+ environment.systemPackages = with pkgs; [
+ alsa-utils
+ ];
+ };
+}
diff --git a/modules/sys/core/bootloader.nix b/modules/sys/core/bootloader.nix
new file mode 100644
index 0000000..dabea20
--- /dev/null
+++ b/modules/sys/core/bootloader.nix
@@ -0,0 +1,36 @@
+{ config, lib, ... }:
+{
+ options.szpont.bootloader = lib.mkOption {
+ type = lib.types.enum [ "systemd-boot" "grub" "none" ];
+ description = "which bootloader to use";
+ };
+
+ config = lib.mkMerge [
+ {
+ boot.loader.efi.canTouchEfiVariables = true;
+ boot.supportedFilesystems = [ "ntfs" ];
+ }
+
+ (lib.mkIf (config.szpont.bootloader == "systemd-boot") {
+ boot = {
+ kernelParams = [ "quiet" ];
+
+ loader = {
+ systemd-boot = {
+ enable = true;
+ editor = false;
+ };
+ timeout = 0;
+ };
+ };
+ })
+
+ (lib.mkIf (config.szpont.bootloader == "grub") {
+ boot.loader.grub = {
+ enable = true;
+ device = "nodev";
+ efiSupport = true;
+ };
+ })
+ ];
+}
diff --git a/modules/sys/core/default.nix b/modules/sys/core/default.nix
new file mode 100644
index 0000000..da8f277
--- /dev/null
+++ b/modules/sys/core/default.nix
@@ -0,0 +1,14 @@
+{ ... }:
+{
+ imports = [
+ ./audio.nix
+ ./bootloader.nix
+ ./drivers.nix
+ ./fonts.nix
+ ./greet.nix
+ ./home-manager.nix
+ ./localization.nix
+ ./networking.nix
+ ./security.nix
+ ];
+}
diff --git a/modules/sys/core/drivers.nix b/modules/sys/core/drivers.nix
new file mode 100644
index 0000000..f12f6ab
--- /dev/null
+++ b/modules/sys/core/drivers.nix
@@ -0,0 +1,56 @@
+{ config, lib, pkgs, ... }:
+{
+ options.szpont.drivers = {
+ enable = lib.mkEnableOption "enables hardware drivers";
+
+ amd.enable = lib.mkEnableOption "AMD specific drivers and microcode";
+
+ stability = lib.mkOption {
+ type = lib.types.enum [ "stable" "unstable" ];
+ default = "stable";
+ };
+ };
+
+ config = lib.mkMerge [
+ {
+ services.smartd.enable = true;
+ hardware = {
+ sensor.iio.enable = true;
+
+ enableRedistributableFirmware = true;
+ graphics = {
+ enable = true;
+ enable32Bit = true;
+ };
+ };
+ }
+
+ (lib.mkIf config.szpont.drivers.amd.enable (lib.mkMerge [
+ {
+ services.xserver.videoDrivers = [ "amdgpu" ];
+ hardware = {
+ cpu.amd.updateMicrocode = true;
+ amdgpu = {
+ initrd.enable = true;
+ overdrive.enable = true;
+ };
+ };
+ }
+
+ (lib.mkIf (config.szpont.drivers.stability == "unstable") {
+ services.lact.enable = true;
+
+ boot.kernelPackages = pkgs.linuxPackages_cachyos-lto-znver4;
+ chaotic.mesa-git = {
+ enable = true;
+ fallbackSpecialisation = false;
+ extraPackages = [ pkgs.mesa_git.opencl ];
+ };
+ })
+
+ (lib.mkIf (config.szpont.drivers.stability == "stable") {
+ boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
+ })
+ ]))
+ ];
+}
diff --git a/modules/sys/core/fonts.nix b/modules/sys/core/fonts.nix
new file mode 100644
index 0000000..af2c78d
--- /dev/null
+++ b/modules/sys/core/fonts.nix
@@ -0,0 +1,21 @@
+{ config, lib, pkgs, ... }:
+{
+ options.szpont.fonts = {
+ enable = lib.mkEnableOption "system-wide fonts and console configuration";
+ };
+
+ config = lib.mkIf config.szpont.fonts.enable {
+ console = {
+ keyMap = "pl";
+ earlySetup = true;
+ font = "ter-v32n";
+ packages = with pkgs; [ terminus_font ];
+ };
+
+ fonts.packages = with pkgs; [
+ nerd-fonts.jetbrains-mono
+ nerd-fonts.fira-mono
+ nerd-fonts.fira-code
+ ];
+ };
+}
diff --git a/modules/sys/core/greet.nix b/modules/sys/core/greet.nix
new file mode 100644
index 0000000..4f4abf9
--- /dev/null
+++ b/modules/sys/core/greet.nix
@@ -0,0 +1,27 @@
+{ config, lib, pkgs, ... }:
+{
+ options.szpont.greet.enable = lib.mkEnableOption "enables greetd daemon with tuigreet";
+
+ config = lib.mkIf config.szpont.greet.enable {
+ services.greetd = {
+ enable = true;
+ settings = {
+ default_session = {
+ user = "greeter";
+ command = ''
+ ${pkgs.tuigreet}/bin/tuigreet \
+ --sessions ${config.services.displayManager.sessionData.desktops}/share/xsessions:${config.services.displayManager.sessionData.desktops}/share/wayland-sessions \
+ --remember \
+ --remember-user-session \
+ --asterisks \
+ --greeting 'Welcome to NixOS!' \
+ --time
+ '';
+ };
+ };
+ };
+ security.pam.services.greetd.enableGnomeKeyring = true;
+
+ environment.systemPackages = with pkgs; [ tuigreet ];
+ };
+}
diff --git a/modules/sys/core/home-manager.nix b/modules/sys/core/home-manager.nix
new file mode 100644
index 0000000..06f909f
--- /dev/null
+++ b/modules/sys/core/home-manager.nix
@@ -0,0 +1,30 @@
+{ config, lib, inputs, ... }:
+{
+ options.szpont.home-manager = {
+ enable = lib.mkEnableOption "Home Manager configuration manager";
+
+ users = lib.mkOption {
+ default = {};
+ description = "Attribute set of users and their home-manager configurations";
+ type = lib.types.attrsOf (lib.types.submodule {
+ options = {
+ path = lib.mkOption {
+ type = lib.types.path;
+ description = "Path to the user's home.nix file";
+ };
+ };
+ });
+ };
+ };
+
+ config = lib.mkIf config.szpont.home-manager.enable {
+ home-manager = {
+ extraSpecialArgs = { inherit inputs; };
+ useGlobalPkgs = true;
+ useUserPackages = true;
+ backupFileExtension = "bak";
+
+ users = lib.mapAttrs (name: user: import user.path) config.szpont.home-manager.users;
+ };
+ };
+}
diff --git a/modules/sys/core/localization.nix b/modules/sys/core/localization.nix
new file mode 100644
index 0000000..232133d
--- /dev/null
+++ b/modules/sys/core/localization.nix
@@ -0,0 +1,39 @@
+{ config, lib, ... }:
+{
+ options.szpont.locale = {
+ enable = lib.mkEnableOption "system localization (timezone and language)";
+
+ timeZone = lib.mkOption {
+ type = lib.types.str;
+ default = "Europe/Warsaw";
+ description = "the system timezone.";
+ };
+
+ format = lib.mkOption {
+ type = lib.types.str;
+ default = "pl_PL.UTF-8";
+ description = "the locale used for numbers, time, and measurements.";
+ };
+ };
+
+ config = lib.mkIf config.szpont.locale.enable {
+ time.timeZone = config.szpont.locale.timeZone;
+
+ i18n = {
+ defaultLocale = "en_US.UTF-8";
+
+ extraLocaleSettings = {
+ LC_TIME = config.szpont.locale.format;
+ LC_NUMERIC = config.szpont.locale.format;
+ LC_MONETARY = config.szpont.locale.format;
+ LC_PAPER = config.szpont.locale.format;
+ LC_MEASUREMENT = config.szpont.locale.format;
+ LC_COLLATE = config.szpont.locale.format;
+ LC_NAME = config.szpont.locale.format;
+ LC_ADDRESS = config.szpont.locale.format;
+ LC_TELEPHONE = config.szpont.locale.format;
+ LC_IDENTIFICATION = config.szpont.locale.format;
+ };
+ };
+ };
+}
diff --git a/modules/sys/core/networking.nix b/modules/sys/core/networking.nix
new file mode 100644
index 0000000..7964e8b
--- /dev/null
+++ b/modules/sys/core/networking.nix
@@ -0,0 +1,29 @@
+{ config, lib, ... }:
+{
+ options.szpont.network = {
+ enable = lib.mkEnableOption "system-wide networking setup";
+
+ hostName = lib.mkOption {
+ type = lib.types.str;
+ default = "nixos";
+ description = "The hostname for this specific machine.";
+ };
+ };
+
+ config = lib.mkIf config.szpont.network.enable {
+ networking = {
+ hostName = config.szpont.network.hostName;
+
+ networkmanager = {
+ enable = true;
+ wifi.macAddress = "stable-ssid";
+ ethernet.macAddress = "stable-ssid";
+ };
+
+ firewall = {
+ enable = true;
+ };
+ };
+ systemd.services."NetworkManager-wait-online".enable = false;
+ };
+}
diff --git a/modules/sys/core/security.nix b/modules/sys/core/security.nix
new file mode 100644
index 0000000..b2b7827
--- /dev/null
+++ b/modules/sys/core/security.nix
@@ -0,0 +1,27 @@
+{ config, lib, pkgs, ... }:
+{
+ options.szpont.security = {
+ enable = lib.mkEnableOption "core security services";
+ };
+
+ config = lib.mkIf config.szpont.security.enable {
+ services.gnome.gnome-keyring.enable = true;
+
+ security = {
+ polkit.enable = true;
+ rtkit.enable = true;
+ };
+
+ systemd.user.services.polkit-gnome-authentication-agent-1 = {
+ description = "gnome-polkit-authentication-agent-1";
+ wantedBy = [ "graphical-session.target" ];
+ serviceConfig = {
+ Type = "simple";
+ ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
+ Restart = "on-failure";
+ RestartSec = 1;
+ TimeoutStopSec = 10;
+ };
+ };
+ };
+}
diff --git a/modules/sys/default.nix b/modules/sys/default.nix
new file mode 100644
index 0000000..72c9ffc
--- /dev/null
+++ b/modules/sys/default.nix
@@ -0,0 +1,8 @@
+{ ... }:
+{
+ imports = [
+ ./core/default.nix
+ ./features/default.nix
+ ./wayland/default.nix
+ ];
+}
diff --git a/modules/sys/features/default.nix b/modules/sys/features/default.nix
new file mode 100644
index 0000000..790dc25
--- /dev/null
+++ b/modules/sys/features/default.nix
@@ -0,0 +1,8 @@
+{ ... }:
+{
+ imports = [
+ ./nh.nix
+ ./ollama.nix
+ ./virtualization.nix
+ ];
+}
diff --git a/modules/sys/features/nh.nix b/modules/sys/features/nh.nix
new file mode 100644
index 0000000..d24d88b
--- /dev/null
+++ b/modules/sys/features/nh.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, ... }:
+{
+ options.szpont.nh = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = true;
+ };
+ };
+
+ config = lib.mkIf config.szpont.nh.enable {
+ nix.settings = {
+ trusted-users = [ "root" "adam" ];
+ experimental-features = [ "nix-command" "flakes" ];
+ };
+
+ programs.nh = {
+ enable = true;
+ flake = "/etc/nixos";
+ };
+
+ environment.systemPackages = with pkgs; [
+ nix-output-monitor
+ nvd
+ ];
+ };
+}
diff --git a/modules/ollama.nix b/modules/sys/features/ollama.nix
index 0989419..0989419 100644
--- a/modules/ollama.nix
+++ b/modules/sys/features/ollama.nix
diff --git a/modules/sys/features/virtualization.nix b/modules/sys/features/virtualization.nix
new file mode 100644
index 0000000..bb3e6cb
--- /dev/null
+++ b/modules/sys/features/virtualization.nix
@@ -0,0 +1,41 @@
+{ config, lib, pkgs, ... }:
+{
+ options.szpont.virtualization = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+
+ kvm = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = true;
+ };
+ };
+ docker = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+ };
+
+ config = lib.mkIf config.szpont.virtualization.enable (lib.mkMerge [
+ (lib.mkIf config.szpont.virtualization.kvm.enable {
+ virtualisation.libvirtd = {
+ enable = true;
+ qemu.package = pkgs.qemu_kvm;
+ qemu.swtpm.enable = true;
+ };
+ programs.virt-manager.enable = true;
+ users.users.adam.extraGroups = [ "libvirtd" ];
+ boot.initrd.kernelModules = [ "kvm-amd" ];
+ })
+
+ (lib.mkIf config.szpont.virtualization.docker.enable {
+ virtualisation.docker.enable = true;
+ environment.systemPackages = [ pkgs.docker-compose ];
+ users.users.adam.extraGroups = [ "docker" ];
+ })
+ ]);
+}
diff --git a/modules/sys/wayland/default.nix b/modules/sys/wayland/default.nix
new file mode 100644
index 0000000..48df857
--- /dev/null
+++ b/modules/sys/wayland/default.nix
@@ -0,0 +1,6 @@
+{ ... }:
+{
+ imports = [
+ ./niri.nix
+ ];
+}
diff --git a/modules/sys/wayland/niri.nix b/modules/sys/wayland/niri.nix
new file mode 100644
index 0000000..2054d9d
--- /dev/null
+++ b/modules/sys/wayland/niri.nix
@@ -0,0 +1,20 @@
+{ inputs, config, lib, pkgs, ... }:
+{
+ imports = [ inputs.niri.nixosModules.niri ];
+
+ options.szpont.niri = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+
+ config = lib.mkIf config.szpont.niri.enable {
+ nixpkgs.overlays = [ inputs.niri.overlays.niri ];
+
+ programs.niri = {
+ enable = true;
+ package = pkgs.niri-unstable;
+ };
+ };
+}
diff --git a/modules/tor.nix b/modules/tor.nix
deleted file mode 100644
index bef081c..0000000
--- a/modules/tor.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{ pkgs, ... }:
-{
- # networking.proxy.default = "https://127.0.0.1:8118";
- services = {
- tor = {
- enable = true;
- # openFirewall = true;
- torsocks.enable = true;
- # torsocks.allowInbound = true;
- client.enable = true;
- # client = {
- # enable = true;
- # dns.enable = true;
- # };
-
- # settings.DNSPort = [{
- # addr = "127.0.0.1";
- # port = 53;
- # }];
-
- # torsocks.enable = true;
- };
- privoxy = {
- enable = true;
- enableTor = true;
- };
- };
-
- environment.systemPackages = with pkgs; [
- tor
- torsocks
- tor-browser
- torctl
- vanguards
- tractor
- onioncircuits
- oniux
- ];
-
- # networking.nameservers = [ "127.0.0.1" ];
-}
diff --git a/modules/virtualization.nix b/modules/virtualization.nix
deleted file mode 100644
index 0071f1a..0000000
--- a/modules/virtualization.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ pkgs, ... }:
-{
- virtualisation = {
- libvirtd = {
- enable = true;
- qemu = {
- package = pkgs.qemu_kvm;
- swtpm.enable = true;
- };
- };
-
- docker = {
- enable = true;
- extraPackages = with pkgs; [ docker-compose ];
- };
- containerd.enable = false;
- };
-
- programs.virt-manager.enable = true;
- networking.firewall.allowedTCPPorts = [ 5984 ];
-
- users.users.adam.extraGroups = [ "libvirtd" "kvm" "docker" ];
-}