diff --git a/configuration/main/configuration.nix b/configuration/main/configuration.nix index 51e7384..b373cb3 100644 --- a/configuration/main/configuration.nix +++ b/configuration/main/configuration.nix @@ -10,5 +10,5 @@ ../modules/sddm.nix ]; - networking.allowedTCPPorts = [9123]; + networking.firewall.allowedTCPPorts = [9123]; } diff --git a/configuration/modules/desktop.nix b/configuration/modules/desktop.nix index 551df8d..df4e302 100644 --- a/configuration/modules/desktop.nix +++ b/configuration/modules/desktop.nix @@ -1,4 +1,8 @@ { + pkgs, + inputs, + ... +}: { hardware.graphics = { enable = true; enable32Bit = true; @@ -7,7 +11,16 @@ xdg = { mime.enable = true; menus.enable = true; - portal.enable = true; + portal = { + enable = true; + extraPortals = [pkgs.xdg-desktop-portal-cosmic]; + config.common.default = "cosmic"; + }; + }; + + programs.niri = { + enable = true; + package = inputs.niri-flake.packages.${pkgs.system}.niri-stable; }; services.xserver = { diff --git a/configuration/modules/sddm.nix b/configuration/modules/sddm.nix index 9273ca8..5cfe298 100644 --- a/configuration/modules/sddm.nix +++ b/configuration/modules/sddm.nix @@ -14,7 +14,7 @@ in { qtvirtualkeyboard ]; enable = true; - wayland.enable = false; + wayland.enable = true; autoNumlock = true; enableHidpi = false; theme = "sddm-astronaut-theme"; diff --git a/configuration/modules/system.nix b/configuration/modules/system.nix index d5a491a..279ed8a 100644 --- a/configuration/modules/system.nix +++ b/configuration/modules/system.nix @@ -1,7 +1,6 @@ { device-name, pkgs, - lib, ... }: { system.stateVersion = "25.11"; @@ -19,7 +18,7 @@ boot = { loader = { - grub.enable = true; + systemd-boot.enable = true; efi.canTouchEfiVariables = true; }; @@ -40,6 +39,9 @@ programs.noisetorch.enable = true; console.keyMap = "cz-lat2"; +services.xserver.xkb = { + layout = "cz"; +}; time.timeZone = "Europe/Prague"; i18n = { @@ -65,9 +67,4 @@ openFirewall = true; }; }; - - environment.systemPackages = [ - (lib.hiPrio pkgs.uutils-coreutils.override {prefix = "";}) - (lib.hiPrio pkgs.uutils-findutils.override {prefix = "";}) - ]; } diff --git a/flake.lock b/flake.lock index f4728cb..fbabf49 100644 --- a/flake.lock +++ b/flake.lock @@ -256,6 +256,64 @@ "type": "github" } }, + "niri-flake": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1773501701, + "narHash": "sha256-+0LBAEm8F5h9Nm+hdS07aoS1W4oTtW6c8lltb66oOYQ=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "39ac039250a4a32bf8691405cac04864fc66a70d", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1756556321, + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.08", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1773130184, + "narHash": "sha256-3bwx4WqCB06yfQIGB+OgIckOkEDyKxiTD5pOo4Xz2rI=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "b07bde3ee82dd73115e6b949e4f3f63695da35ea", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1773282481, @@ -272,6 +330,22 @@ "type": "github" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1773375660, + "narHash": "sha256-SEzUWw2Rf5Ki3bcM26nSKgbeoqi2uYy8IHVBqOKjX3w=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3e20095fe3c6cbb1ddcef89b26969a69a1570776", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "inputs": { "flake-parts": [ @@ -326,6 +400,7 @@ "inputs": { "floatc": "floatc", "home-manager": "home-manager", + "niri-flake": "niri-flake", "nixpkgs": "nixpkgs", "nvf": "nvf", "stylix": "stylix", @@ -498,6 +573,39 @@ "type": "github" } }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1755491097, + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "388d291e82ffbc73be18169d39470f340707edaa", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.7", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1773499041, + "narHash": "sha256-XZ4/tVdLeAYDgKe4JD4C7yYUKydMxwt8c2j6APFWcIc=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "309d8e2a29953f7465dc14c939e2afe4682c0aa9", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } + }, "zen-browser": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index d63aa33..a7bd823 100644 --- a/flake.nix +++ b/flake.nix @@ -51,7 +51,6 @@ inputs.home-manager.nixosModules.default { home-manager = { - enable = true; useUserPackages = true; useGlobalPkgs = true; diff --git a/home/modules/daily_apps.nix b/home/modules/daily_apps.nix index a25eceb..9c270bc 100644 --- a/home/modules/daily_apps.nix +++ b/home/modules/daily_apps.nix @@ -1,4 +1,8 @@ -{pkgs, ...}: { +{ + pkgs, + inputs, + ... +}: { home.packages = with pkgs; [ # Browser inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default @@ -16,6 +20,7 @@ libreoffice trilium-desktop xournalpp + cosmic-files # Images pixieditor diff --git a/home/modules/default.nix b/home/modules/default.nix index 97cea74..e519352 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -1,54 +1,17 @@ -{ - config, - lib, - ... -}: let - cfg = config.myModules; -in { +{lib, ...}: { options.myModules = { games.enable = lib.mkOption { type = lib.types.bool; default = false; description = "Enable games module."; }; - - dailyApps.enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Enable daily applications."; - }; - - niri.enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Enable niri wayland compositor config."; - }; - - nvf.enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Enable nvf (neovim) configuration."; - }; - - shell.enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Enable shell configuration."; - }; - - createProject.enable = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Enable create-project tooling."; - }; }; - imports = [ - (lib.mkIf cfg.dailyApps.enable ./daily_apps.nix) - (lib.mkIf cfg.niri.enable ./niri.nix) - (lib.mkIf cfg.nvf.enable ./nvf.nix) - (lib.mkIf cfg.shell.enable ./shell.nix) - (lib.mkIf cfg.games.enable ./games/minecraft.nix) - (lib.mkIf cfg.createProject.enable ./create-project) + ./daily_apps.nix + ./niri.nix + ./nvf.nix + ./shell + ./create-project/create-project.nix + ./games ]; } diff --git a/home/modules/games/default.nix b/home/modules/games/default.nix new file mode 100644 index 0000000..6c98d49 --- /dev/null +++ b/home/modules/games/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./minecraft.nix + ./heroic.nix + ]; +} diff --git a/home/modules/games/heroic.nix b/home/modules/games/heroic.nix new file mode 100644 index 0000000..1850b17 --- /dev/null +++ b/home/modules/games/heroic.nix @@ -0,0 +1,12 @@ +{ + pkgs, + config, + lib, + ... +}: { + config = lib.mkIf config.myModules.games.enable { + home.packages = with pkgs; [ + heroic + ]; + }; +} diff --git a/home/modules/games/minecraft.nix b/home/modules/games/minecraft.nix index 0404c44..b97f1ed 100644 --- a/home/modules/games/minecraft.nix +++ b/home/modules/games/minecraft.nix @@ -1,12 +1,18 @@ -{pkgs, ...}: { - home.packages = with pkgs; [ - heroic - (pkgs.prismlauncher.override { - jdks = [ - pkgs.temurin-bin-21 - pkgs.temurin-bin-8 - pkgs.temurin-bin-17 - ]; - }) - ]; +{ + pkgs, + config, + lib, + ... +}: { + config = lib.mkIf config.myModules.games.enable { + home.packages = [ + (pkgs.prismlauncher.override { + jdks = [ + pkgs.temurin-bin-21 + pkgs.temurin-bin-8 + pkgs.temurin-bin-17 + ]; + }) + ]; + }; } diff --git a/home/modules/niri.nix b/home/modules/niri.nix index 4a8305c..b450afe 100644 --- a/home/modules/niri.nix +++ b/home/modules/niri.nix @@ -15,6 +15,10 @@ fuzzel.enable = true; swaylock.enable = true; waybar.enable = true; + foot.enable = true; + }; + + services = { mako.enable = true; swayidle.enable = true; polkit-gnome.enable = true; @@ -29,6 +33,13 @@ ]; input = { + keyboard.numlock = true; + warp-mouse-to-focus.enable = true; + + focus-follows-mouse = { + enable = true; + max-scroll-amount = "0%"; + }; keyboard = { xkb = { layout = "cz"; @@ -63,7 +74,7 @@ layout = { gaps = 8; - default-column-width = {proportion = 1;}; + default-column-width = {proportion = 1.0;}; preset-column-widths = [ {proportion = 0.33333;} @@ -91,16 +102,6 @@ } ]; - input = { - keyboard.numlock = true; - warp-mouse-to-focus.enable = true; - - focus-follows-mouse = { - enable = true; - max-scroll-amount = "0%"; - }; - }; - binds = { "Mod+Q".action.close-window = []; "Mod+Return".action.spawn = ["foot"]; diff --git a/home/modules/nvf.nix b/home/modules/nvf.nix index f89d757..1652760 100644 --- a/home/modules/nvf.nix +++ b/home/modules/nvf.nix @@ -11,11 +11,6 @@ cursorline = true; color-modes = true; - indent = { - tab-width = 2; - unit = "\t"; - }; - lsp = { display-inlay-hints = true; display-messages = true; diff --git a/home/modules/shell/default.nix b/home/modules/shell/default.nix new file mode 100644 index 0000000..96696e7 --- /dev/null +++ b/home/modules/shell/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./shell.nix + ]; +} diff --git a/home/modules/shell/shell.nix b/home/modules/shell/shell.nix index 294f13f..dc9367c 100644 --- a/home/modules/shell/shell.nix +++ b/home/modules/shell/shell.nix @@ -1,6 +1,7 @@ { pkgs, device-name, + inputs, ... }: { home.packages = with pkgs; [ @@ -33,7 +34,7 @@ nushell = { enable = true; - extraConfig = builtins.readFile "config.nu"; + extraConfig = builtins.readFile ./config.nu; settings = { show_banner = false;