From 26734253088b87a4939156cac98687f8daf24731 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 17:35:58 +0300 Subject: [PATCH 001/103] doc: Try add doc --- docs/default.nix | 6 ++++++ docs/docs.nix | 38 ++++++++++++++++++++++++++++++++++++++ docs/options-doc.nix | 28 ++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 docs/default.nix create mode 100644 docs/docs.nix create mode 100644 docs/options-doc.nix diff --git a/docs/default.nix b/docs/default.nix new file mode 100644 index 0000000..57fdb5e --- /dev/null +++ b/docs/default.nix @@ -0,0 +1,6 @@ +{ + perSystem = { self', pkgs, ... }: { + packages.mydocs = pkgs.callPackage ./docs.nix { self = self'; }; + }; +} + diff --git a/docs/docs.nix b/docs/docs.nix new file mode 100644 index 0000000..2864187 --- /dev/null +++ b/docs/docs.nix @@ -0,0 +1,38 @@ +/* { pkgs +, ... +}: + +let + inherit (pkgs) stdenv mkdocs python310Packages; + options-doc = pkgs.callPackage ./options-doc.nix {}; +in stdenv.mkDerivation { + src = ./.; + name = "docs"; + + buildInput = [ options-doc ]; + + nativeBuildInputs = [ + mkdocs + python310Packages.mkdocs-material + python310Packages.pygments + ]; + + buildPhase = '' + ln -s ${options-doc} "./docs/nixos-options.md" + mkdocs build + ''; + + installPhase = '' + mv site $out + ''; + } */ + +{ writeShellScriptBin, pkgs, self, ... }: + +let + options-doc = pkgs.callPackage ./options-doc.nix { inherit self; }; +in writeShellScriptBin "gen-options-doc" '' + echo "Generating NixOS module options documentation" + cat ${options-doc} > OPTIONS.md +'' + diff --git a/docs/options-doc.nix b/docs/options-doc.nix new file mode 100644 index 0000000..61d59d8 --- /dev/null +++ b/docs/options-doc.nix @@ -0,0 +1,28 @@ +{ lib +, self +, pkgs +, runCommand +, nixosOptionsDoc +}: + +let + eval = lib.evalModules { + specialArgs = { inherit self pkgs; }; + + modules = [ + (lib.nixosSystem { + inherit (pkgs) system; + modules = [ + ../modules/default.nix + ]; + }) + ]; + }; + + optionsDoc = nixosOptionsDoc { + inherit (eval) options; + }; +in runCommand "options-doc.md" {} '' + cat ${optionsDoc.optionsCommonMark} >> $out + '' + From 3eb473400741493315b96bf26b8820ed35f8802e Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 17:37:26 +0300 Subject: [PATCH 002/103] flake: Add ghostty input --- flake.nix | 9 +++++++++ modules/nix/default.nix | 2 ++ 2 files changed, 11 insertions(+) diff --git a/flake.nix b/flake.nix index 47c7358..2cf4329 100644 --- a/flake.nix +++ b/flake.nix @@ -90,6 +90,15 @@ url = "github:SomeoneSerge/pkgs"; }; + ghostty = { + url = "git+ssh://git@github.com/ghostty-org/ghostty"; + + inputs = { + nixpkgs-stable.follows = "nixpkgs"; + nixpkgs-unstable.follows = "nixpkgs"; + }; + }; + # Security sops-nix = { url = "github:Mic92/sops-nix"; diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 3c0298b..8af0c13 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -48,11 +48,13 @@ in { substituters = [ "https://hyprland.cachix.org" "https://nyx.chaotic.cx" + "https://ghostty.cachix.org" ]; trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" + "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" ]; }; From 87663cf84bef5a1d6b91c4ed9dd23270a8454537 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 17:38:01 +0300 Subject: [PATCH 003/103] flake: Add proxmox-nixos input --- flake.nix | 4 ++++ modules/nix/default.nix | 2 ++ 2 files changed, 6 insertions(+) diff --git a/flake.nix b/flake.nix index 2cf4329..57ac082 100644 --- a/flake.nix +++ b/flake.nix @@ -99,6 +99,10 @@ }; }; + proxmox-nixos = { + url = "github:SaumonNet/proxmox-nixos"; + }; + # Security sops-nix = { url = "github:Mic92/sops-nix"; diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 8af0c13..c5c0f45 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -49,12 +49,14 @@ in { "https://hyprland.cachix.org" "https://nyx.chaotic.cx" "https://ghostty.cachix.org" + "https://cache.saumon.network/proxmox-nixos" ]; trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns=" + "proxmox-nixos:nveXDuVVhFDRFx8Dn19f1WDEaNRJjPrF2CPD2D+m1ys=" ]; }; From 2515dea96bb109a65733eeadf8e38f2759a707dc Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 17:38:16 +0300 Subject: [PATCH 004/103] modules: Change fluffychat version --- modules/nix/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nix/default.nix b/modules/nix/default.nix index c5c0f45..4554c57 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -31,7 +31,7 @@ in { "electron-27.3.11" "electron-25.9.0" "electron-19.1.9" - "fluffychat-linux-1.20.0" + "fluffychat-linux-1.22.1" "olm-3.2.16" ]; }; From 7dc24af50aaccb65ba6e1bc685af8dbaab23acfe Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 17:38:24 +0300 Subject: [PATCH 005/103] modules: Change to lix --- modules/nix/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 4554c57..729e60a 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -38,7 +38,7 @@ in { # Nix package manager settings nix = { - package = pkgs.nixVersions.latest; + package = pkgs.lix; registry.s.flake = inputs.self; settings = { From 4b80fee34df1f377fed2c80aac3e6720a788825c Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 17:38:40 +0300 Subject: [PATCH 006/103] modules: Remove not general attrs --- modules/nix/default.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 729e60a..347e1f7 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -43,7 +43,6 @@ in { settings = { experimental-features = [ "nix-command" "flakes" ]; - auto-optimise-store = true; substituters = [ "https://hyprland.cachix.org" @@ -59,11 +58,6 @@ in { "proxmox-nixos:nveXDuVVhFDRFx8Dn19f1WDEaNRJjPrF2CPD2D+m1ys=" ]; }; - - gc = { - automatic = true; - options = "--delete-older-than 14d"; - }; }; }; } From 36d581ee71c71e9a3e3727663f5e7a6c29372f5c Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:06:00 +0300 Subject: [PATCH 007/103] modules: Add cursos is linux feature in stylix --- modules/stylix/default.nix | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/modules/stylix/default.nix b/modules/stylix/default.nix index b8819cd..4cc1644 100644 --- a/modules/stylix/default.nix +++ b/modules/stylix/default.nix @@ -10,17 +10,20 @@ with lib; let cfg = config.module.stylix; + inherit (pkgs.stdenv) isLinux; theme = "${pkgs.base16-schemes}/share/themes/nord.yaml"; wallpaper = "${self}/assets/grey_gradient.png"; cursorSize = if hostname == "nbox" then 24 else 14; in { options = { - module.stylix.enable = mkEnableOption "Enables stylix"; + module.stylix = { + enable = mkEnableOption "Enables stylix"; + }; }; config = mkIf cfg.enable { - stylix = { + stylix = ({ enable = true; image = wallpaper; autoEnable = true; @@ -35,12 +38,6 @@ in { desktop = 1.0; }; - cursor = { - name = "Vimix-cursors"; - package = pkgs.vimix-cursors; - size = cursorSize; - }; - fonts = { sizes = { applications = 11; @@ -50,7 +47,7 @@ in { }; serif = { - package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" "Iosevka" ]; }; + package = pkgs.nerd-fonts.iosevka; name = "Iosevka Nerd Font Mono"; }; @@ -63,7 +60,13 @@ in { emoji = config.stylix.fonts.serif; }; - }; + } // optionalAttrs isLinux { + cursor = { + name = "Vimix-cursors"; + package = pkgs.vimix-cursors; + size = cursorSize; + }; + }); }; } From 5a5dec0af3fa201d1a1fc230ac90d3dc3f56cb9e Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:06:13 +0300 Subject: [PATCH 008/103] modules: Fix path --- modules/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/default.nix b/modules/default.nix index 03c0f55..d354952 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,11 +1,11 @@ -{ lib -, commonModules +{ self +, lib , ... }: { imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${commonModules}/${module}") (builtins.attrNames (builtins.readDir commonModules)) + map (module: "${self}/modules/${module}") (builtins.attrNames (builtins.readDir "${self}/modules")) ); } From 53d76a00eea1d39f4a20c3fb5e7ea46fc8482c47 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:06:26 +0300 Subject: [PATCH 009/103] modules: Add defaults module --- modules/defaults/default.nix | 113 +++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 modules/defaults/default.nix diff --git a/modules/defaults/default.nix b/modules/defaults/default.nix new file mode 100644 index 0000000..6593942 --- /dev/null +++ b/modules/defaults/default.nix @@ -0,0 +1,113 @@ +{ lib +, config +, pkgs +, ... +}: + +with lib; + +let + cfg = config.module.defaults; +in { + options.module.defaults = { + # Defaults + terminal = mkOption { + type = types.enum [ + "foot" + "alacritty" + ]; + + default = "foot"; + }; + + appLauncher = mkOption { + type = types.enum [ + "wofi" + "rofi" + "fuzzel" + ]; + + default = "wofi"; + }; + + browser = mkOption { + type = types.enum [ + "librewolf" + "firefox" + ]; + + default = "librewolf"; + }; + + # Defaults cmds + terminalCmd = mkOption { + type = types.str; + default = "${pkgs.${cfg.terminal}}/bin/${cfg.terminal}"; + }; + + browserCmd = mkOption { + type = types.str; + default = "${pkgs.${cfg.browser}}/bin/${cfg.browser}"; + }; + + appLauncherCmd = mkOption { + type = types.str; + default = "${pkgs.${cfg.appLauncher}}/bin/${cfg.appLauncher} --show drun"; + }; + + audioControlCmd = mkOption { + type = types.str; + default = "${pkgs.pulseaudio}/bin/pactl"; + }; + + brightnessControlCmd = mkOption { + type = types.str; + default = "${pkgs.brightnessctl}/bin/brightnessctl"; + }; + + clipHistCmd = mkOption { + type = types.str; + default = "${pkgs.cliphist}/bin/cliphist list | ${cfg.appLauncherCmd} -d | ${pkgs.cliphist}/bin/cliphist decode | ${pkgs.wl-clipboard}/bin/wl-copy"; + }; + + notificationsAppCmd = mkOption { + type = types.str; + default = "${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"; + }; + + ssh = { + pubKeys = mkOption { + type = types.listOf types.str; + default = []; + }; + }; + + network = { + iface = mkOption { + type = types.str; + default = ""; + }; + + ip = mkOption { + type = types.str; + default = ""; + }; + + gw = mkOption { + type = types.str; + default = ""; + }; + + mask = mkOption { + type = types.str; + default = ""; + }; + + cidr = mkOption { + type = types.str; + default = ""; + }; + }; + }; +} + From 374927434e9e1cdd5cf3563da0b183a45c0b44d0 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:06:36 +0300 Subject: [PATCH 010/103] templates: Add name --- templates/module/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/module/default.nix b/templates/module/default.nix index 5aca62d..fc5b35e 100644 --- a/templates/module/default.nix +++ b/templates/module/default.nix @@ -6,9 +6,9 @@ with lib; let - cfg = config.module; + cfg = config.module.""; in { - options.module = { + options.module."" = { enable = mkEnableOption "Enable module"; }; From 85d6c0b6c1a65888c27e2edd30a0592453980b2f Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:07:42 +0300 Subject: [PATCH 011/103] home/modules: Inherit values in emacs module --- home/modules/emacs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/modules/emacs/default.nix b/home/modules/emacs/default.nix index cd56e98..88c09d0 100644 --- a/home/modules/emacs/default.nix +++ b/home/modules/emacs/default.nix @@ -20,8 +20,8 @@ in { }; services.emacs = { - enable = true; - package = pkgs.emacs30-pgtk; + inherit (config.programs.emacs) package enable; + client.enable = true; socketActivation.enable = true; }; From d4ade2ec4534cf325eed0d35d4faa44041841a6b Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:07:52 +0300 Subject: [PATCH 012/103] home/modules: Fix paths in fish module --- home/modules/fish/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home/modules/fish/default.nix b/home/modules/fish/default.nix index 1e03cd2..6862002 100644 --- a/home/modules/fish/default.nix +++ b/home/modules/fish/default.nix @@ -1,8 +1,8 @@ -{ lib +{ self +, lib , config , username , pkgs -, homeModules , ... }: @@ -16,7 +16,7 @@ in { }; imports = [ - "${homeModules}/fish/starship" + "${self}/home/modules/fish/starship" ]; config = mkIf cfg.enable { From 0109f76f86f620cc57492e9f687186282b944dfe Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:08:08 +0300 Subject: [PATCH 013/103] home/modules: Add suspend for pcbox in hypridle --- home/modules/hypridle/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home/modules/hypridle/default.nix b/home/modules/hypridle/default.nix index 1073359..fd5ed88 100644 --- a/home/modules/hypridle/default.nix +++ b/home/modules/hypridle/default.nix @@ -75,6 +75,12 @@ in { on-timeout = suspendCmd; on-resume = ""; } + ] ++ lib.optionals (hostname == "pcbox") [ + { + timeout = 7200; + on-timeout = suspendCmd; + on-resume = ""; + } ]; }; }; From 0252e1e6cd035dc934055e4058d4bfb9c9a5c298 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:08:58 +0300 Subject: [PATCH 014/103] home/modules: Add defaults for hyprland --- home/modules/hyprland/binds/default.nix | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/home/modules/hyprland/binds/default.nix b/home/modules/hyprland/binds/default.nix index a37a738..b89d0eb 100644 --- a/home/modules/hyprland/binds/default.nix +++ b/home/modules/hyprland/binds/default.nix @@ -10,12 +10,15 @@ with lib; let cfg = config.module.hyprland.binds; - audioControl = "${pkgs.pulseaudio}/bin/pactl"; - brightnessControl = "${pkgs.brightnessctl}/bin/brightnessctl"; + terminal = config.module.defaults.terminalCmd; + appLauncher = config.module.defaults.appLauncherCmd; + audioControl = config.module.defaults.audioControlCmd; + brightnessControl = config.module.defaults.brightnessControlCmd; + clipHist = config.module.defaults.clipHistCmd; + notificationsApp = config.module.defaults.notificationsAppCmd; + screenshotArea = "${pkgs.grimblast}/bin/grimblast --notify --freeze copy area"; screenshotScreen = "${pkgs.grimblast}/bin/grimblast --notify --freeze copy output"; - appLauncher = "${pkgs.wofi}/bin/wofi --show drun"; - cliphist = "${pkgs.cliphist}/bin/cliphist list | ${appLauncher} -d | ${pkgs.cliphist}/bin/cliphist decode | ${pkgs.wl-clipboard}/bin/wl-copy"; in { options = { module.hyprland.binds.enable = mkEnableOption "Enables binds in Hyprland"; @@ -36,11 +39,9 @@ in { "[workspace 4 silent] ${pkgs.obsidian}/bin/obsidian" - "[workspace 5 silent] ${pkgs.foot}/bin/foot" - "[workspace 5 silent] ${pkgs.foot}/bin/foot" - "[workspace 5 silent] ${pkgs.foot}/bin/foot" - - # "$[workspace 5 silent] {pkgs.vscode}/bin/code" + "[workspace 5 silent] ${terminal}" + "[workspace 5 silent] ${terminal}" + "[workspace 5 silent] ${terminal}" "[workspace 6 silent] ${pkgs.firefox}/bin/firefox -P work" @@ -106,11 +107,10 @@ in { ", xf86audiomute, exec, ${audioControl} set-sink-mute @DEFAULT_SINK@ toggle" # Terminal - # "SUPER, Return, exec, ${pkgs.alacritty}/bin/alacritty" - "SUPER, Return, exec, ${pkgs.foot}/bin/foot" + "SUPER, Return, exec, ${terminal}" # Notifications - "SUPER, N, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw" + "SUPER, N, exec, ${notificationsApp}" # Picker "SUPER, P, exec, ${screenshotArea}" @@ -120,10 +120,10 @@ in { "SHIFT, Print, exec, ${screenshotScreen}" # Launchers - "CTRL, Space, exec, ${appLauncher}" + "SUPER, d, exec, ${appLauncher}" # Cliphist - "SUPER, C, exec, ${cliphist}" + "SUPER, C, exec, ${clipHist}" # File manager "SUPER, E, exec, ${pkgs.nemo}/bin/nemo" From d4e92d67e47ecae3537348570be73bd366154535 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:09:15 +0300 Subject: [PATCH 015/103] home/modules: Remove nemo. Add thunar --- home/modules/hyprland/binds/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/modules/hyprland/binds/default.nix b/home/modules/hyprland/binds/default.nix index b89d0eb..c9f91f9 100644 --- a/home/modules/hyprland/binds/default.nix +++ b/home/modules/hyprland/binds/default.nix @@ -126,7 +126,7 @@ in { "SUPER, C, exec, ${clipHist}" # File manager - "SUPER, E, exec, ${pkgs.nemo}/bin/nemo" + "SUPER, E, exec, ${pkgs.xfce.thunar}/bin/thunar" # Fullscreen "SUPER, Z, fullscreen" From 1874b18f4aca1cc5000f468e85c538ad8bb95b23 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:09:27 +0300 Subject: [PATCH 016/103] home/modules: Some deletes for hypr --- home/modules/hyprland/binds/default.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/home/modules/hyprland/binds/default.nix b/home/modules/hyprland/binds/default.nix index c9f91f9..f81176a 100644 --- a/home/modules/hyprland/binds/default.nix +++ b/home/modules/hyprland/binds/default.nix @@ -167,9 +167,6 @@ in { "size 900 500, class:^(xdg-desktop-portal-gtk)$" "dimaround, class:^(xdg-desktop-portal-gtk)$" - # Firefox - # "workspace 1, class:^(firefox)$" - # Telegram "workspace 2, class:^(org.telegram.desktop)$" "float,size 900 500,title:^(Choose Files)" @@ -177,9 +174,6 @@ in { # Obsidian "workspace 4, class:^(obsidian)$" - # VSCode - # "workspace 5, class:^(code-url-handler)$" - # Vesktop "workspace 8, class:^(vesktop)$" From 90ef5e51f37d11afb2f9c5b3efce1bef77c55b12 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:09:40 +0300 Subject: [PATCH 017/103] home/modules: Fix paths in hyprland --- home/modules/hyprland/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home/modules/hyprland/default.nix b/home/modules/hyprland/default.nix index 3680785..8cbe09f 100644 --- a/home/modules/hyprland/default.nix +++ b/home/modules/hyprland/default.nix @@ -1,8 +1,8 @@ { inputs +, self , config , lib , pkgs -, homeModules , ... }: @@ -12,8 +12,8 @@ let cfg = config.module.hyprland; in { imports = [ - "${homeModules}/hyprland/binds" - "${homeModules}/hyprland/monitors" + "${self}/home/modules/hyprland/binds" + "${self}/home/modules/hyprland/monitors" ]; options = { From 22b9326e5e3de39f01ab121904cbe8ecc45db55f Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:09:47 +0300 Subject: [PATCH 018/103] home/modules: Fix paths in neofetch --- home/modules/neofetch/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home/modules/neofetch/default.nix b/home/modules/neofetch/default.nix index 3fa03e1..d3cfc8e 100644 --- a/home/modules/neofetch/default.nix +++ b/home/modules/neofetch/default.nix @@ -1,7 +1,7 @@ -{ pkgs +{ self +, pkgs , lib , config -, homeModules , ... }: @@ -16,7 +16,7 @@ in { config = mkIf cfg.enable { home.packages = [ pkgs.neofetch ]; - xdg.configFile."neofetch/config.conf".source = "${homeModules}/neofetch/neofetch.conf"; + xdg.configFile."neofetch/config.conf".source = "${self}/home/modules/neofetch/neofetch.conf"; }; } From 0dd369c8874c985b6b8d853d74ee386981059070 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:10:06 +0300 Subject: [PATCH 019/103] home/modules: Change neogit to lazygit in neovim --- .../neovim/config/lua/config/keymaps.lua | 5 +-- .../modules/neovim/config/lua/plugins/git.lua | 41 ++++++------------- 2 files changed, 14 insertions(+), 32 deletions(-) diff --git a/home/modules/neovim/config/lua/config/keymaps.lua b/home/modules/neovim/config/lua/config/keymaps.lua index 8d471f4..56de2c3 100644 --- a/home/modules/neovim/config/lua/config/keymaps.lua +++ b/home/modules/neovim/config/lua/config/keymaps.lua @@ -29,7 +29,6 @@ map("n", "", ":wincmd h", { silent = true, desc = "Focus Right" }) map("n", "", ":wincmd l", { silent = true, desc = "Focus Left" }) map("n", "", ":wincmd j", { silent = true, desc = "Focus Bottom" }) map("n", "", ":wincmd k", { silent = true, desc = "Focus Top" }) -map("n", "gn", ":Neogit", { silent = true }) -- BarBar -- Move to previous/next @@ -74,8 +73,8 @@ map('n', 'bw', 'BufferOrderByWindowNumber', opts) -- :BarbarEnable - enables barbar (enabled by default) -- :BarbarDisable - very bad command, should never be used --- NeoGit -map("n", "gn", ":Neogit", { silent = true }) +-- Git +map("n", "gn", ":LazyGit", { silent = true }) -- Nvim Tree map("n", "", ":NvimTreeToggle", { silent = true }) diff --git a/home/modules/neovim/config/lua/plugins/git.lua b/home/modules/neovim/config/lua/plugins/git.lua index b10bfb5..d961346 100644 --- a/home/modules/neovim/config/lua/plugins/git.lua +++ b/home/modules/neovim/config/lua/plugins/git.lua @@ -1,33 +1,16 @@ return { - { - "NeogitOrg/neogit", - dependencies = { - { - "ruifm/gitlinker.nvim", - config = function() - require("gitlinker").setup() - end, - }, - "sindrets/diffview.nvim", - }, - event = { "User InGitRepo" }, - config = function() - require("neogit").setup({ - graph_style = "unicode", - sort_branches = "-committerdate", - kind = "replace", - popup = { - ["?"] = "HelpPopup", - ["D"] = "DiffPopup", - ["P"] = "PushPopup", - ["Z"] = "StashPopup", - ["b"] = "BranchPopup", - ["c"] = "CommitPopup", - ["l"] = "LogPopup", - ["p"] = "PullPopup", - }, - }) - end, + "kdheepak/lazygit.nvim", + lazy = true, + cmd = { + "LazyGit", + "LazyGitConfig", + "LazyGitCurrentFile", + "LazyGitFilter", + "LazyGitFilterCurrentFile", + }, + + dependencies = { + "nvim-lua/plenary.nvim", }, } From 233cd4b016c610a3229395f86ea24e8ad4f4f590 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:10:14 +0300 Subject: [PATCH 020/103] home/modules: Fix paths in neovim --- home/modules/neovim/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home/modules/neovim/default.nix b/home/modules/neovim/default.nix index 3ff65f2..3e14f6a 100644 --- a/home/modules/neovim/default.nix +++ b/home/modules/neovim/default.nix @@ -1,7 +1,7 @@ -{ lib +{ self +, lib , config , pkgs -, homeModules , ... }: @@ -16,7 +16,7 @@ in { config = mkIf cfg.enable { xdg.configFile."nvim" = { - source = "${homeModules}/neovim/config"; + source = "${self}/home/modules/neovim/config"; recursive = true; }; From 9c9077367d76c5fab203eb6153846554c06d6133 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:11:31 +0300 Subject: [PATCH 021/103] home/modules: Add defaults in sway --- home/modules/sway/keybinds/default.nix | 37 +++++++++++++------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/home/modules/sway/keybinds/default.nix b/home/modules/sway/keybinds/default.nix index 1b33e40..1fe1d1d 100644 --- a/home/modules/sway/keybinds/default.nix +++ b/home/modules/sway/keybinds/default.nix @@ -23,14 +23,15 @@ let workspace11 = "workspace number 11"; workspace12 = "workspace number 12"; - terminal = "${pkgs.foot}/bin/foot"; - screenshotArea = "${pkgs.slurp}/bin/slurp | ${pkgs.grim}/bin/grim -g - - | ${pkgs.wl-clipboard}/bin/wl-copy "; + terminal = config.module.defaults.terminalCmd; + appLauncher = config.module.defaults.appLauncherCmd; + audioControl = config.module.defaults.audioControlCmd; + brightnessControl = config.module.defaults.brightnessControlCmd; + clipHist = config.module.defaults.clipHistCmd; + notificationsApp = config.module.defaults.notificationsAppCmd; + + screenshotArea = "${pkgs.slurp}/bin/slurp | ${pkgs.grim}/bin/grim -g - - | ${pkgs.wl-clipboard}/bin/wl-copy"; screenshotScreen = "${pkgs.grim}/bin/grim -o $(swaymsg -t get_outputs | ${pkgs.jq}/bin/jq -r '.[] | select(.focused) | .name') - | ${pkgs.wl-clipboard}/bin/wl-copy"; - appLauncher = "${pkgs.wofi}/bin/wofi --show drun"; - audioControl = "${pkgs.pulseaudio}/bin/pactl"; - brightnessControl = "${pkgs.brightnessctl}/bin/brightnessctl"; - clipHist = "${pkgs.cliphist}/bin/cliphist list | ${appLauncher} -d | ${pkgs.cliphist}/bin/cliphist decode | ${pkgs.wl-clipboard}/bin/wl-copy"; - notificationsApp = "${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"; powerMenu = pkgs.writeShellScriptBin "powerMenu.sh" '' #!/usr/bin/env bash @@ -71,7 +72,7 @@ in { keybindings = { # Terminal - "--to-code ${super}+Return" = "exec ${terminal}"; + "${super}+Return" = "exec ${terminal}"; # Kill active window "--to-code ${super}+q" = "kill"; @@ -106,22 +107,22 @@ in { "--to-code ${super}+Shift+Right" = "move right"; # Application launcher - "--to-code Ctrl+Space" = "exec ${appLauncher}"; - "--to-code ${super}+c" = "exec ${clipHist}"; + "${super}+d" = "exec ${appLauncher}"; + "${super}+c" = "exec ${clipHist}"; # Multimedia keys - "--to-code xf86audioraisevolume" = "exec ${audioControl} set-sink-volume @DEFAULT_SINK@ +5%"; - "--to-code xf86audiolowervolume" = "exec ${audioControl} set-sink-volume @DEFAULT_SINK@ -5%"; - "--to-code xf86audiomute" = "exec ${audioControl} set-sink-mute @DEFAULT_SINK@ toggle"; - "--to-code XF86MonBrightnessDown" = "exec ${brightnessControl} set 5%-"; - "--to-code XF86MonBrightnessUp" = "exec ${brightnessControl} set +5%"; + "xf86audioraisevolume" = "exec ${audioControl} set-sink-volume @DEFAULT_SINK@ +5%"; + "xf86audiolowervolume" = "exec ${audioControl} set-sink-volume @DEFAULT_SINK@ -5%"; + "xf86audiomute" = "exec ${audioControl} set-sink-mute @DEFAULT_SINK@ toggle"; + "XF86MonBrightnessDown" = "exec ${brightnessControl} set 5%-"; + "XF86MonBrightnessUp" = "exec ${brightnessControl} set +5%"; # Notifications - "--to-code ${super}+n" = "exec ${notificationsApp}"; + "${super}+n" = "exec ${notificationsApp}"; # Screenshot - "--to-code Print" = "exec ${screenshotArea}"; - "--to-code Shift+Print" = "exec ${screenshotScreen}"; + "Print" = "exec ${screenshotArea}"; + "Shift+Print" = "exec ${screenshotScreen}"; # Reload the configuration file "--to-code ${super}+Shift+r" = "reload"; From db57a3dceb3fd25fb04fbb2b13ee0a797b8f40a4 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:12:23 +0300 Subject: [PATCH 022/103] home/modules: Add bindkeysToCode for sway --- home/modules/sway/keybinds/default.nix | 103 +++++++++++++------------ 1 file changed, 52 insertions(+), 51 deletions(-) diff --git a/home/modules/sway/keybinds/default.nix b/home/modules/sway/keybinds/default.nix index 1fe1d1d..1bf3139 100644 --- a/home/modules/sway/keybinds/default.nix +++ b/home/modules/sway/keybinds/default.nix @@ -63,6 +63,7 @@ in { wayland.windowManager.sway.config = { inherit terminal; modifier = super; + bindkeysToCode = true; assigns = { "2" = [ { app_id = "org.telegram.desktop"; } ]; @@ -75,36 +76,36 @@ in { "${super}+Return" = "exec ${terminal}"; # Kill active window - "--to-code ${super}+q" = "kill"; + "${super}+q" = "kill"; # PowerMenu "--to-code ${super}+p" = "exec ${powerMenu}/bin/powerMenu.sh"; # Change focus # Vim like - "--to-code ${super}+h" = "focus left"; - "--to-code ${super}+j" = "focus down"; - "--to-code ${super}+k" = "focus up"; - "--to-code ${super}+l" = "focus right"; + "${super}+h" = "focus left"; + "${super}+j" = "focus down"; + "${super}+k" = "focus up"; + "${super}+l" = "focus right"; # With arrows - "--to-code ${super}+Left" = "focus left"; - "--to-code ${super}+Down" = "focus down"; - "--to-code ${super}+Up" = "focus up"; - "--to-code ${super}+Right" = "focus right"; + "${super}+Left" = "focus left"; + "${super}+Down" = "focus down"; + "${super}+Up" = "focus up"; + "${super}+Right" = "focus right"; # Move focused window # Vim like - "--to-code ${super}+Shift+h" = "move left"; - "--to-code ${super}+Shift+j" = "move down"; - "--to-code ${super}+Shift+k" = "move up"; - "--to-code ${super}+Shift+l" = "move right"; + "${super}+Shift+h" = "move left"; + "${super}+Shift+j" = "move down"; + "${super}+Shift+k" = "move up"; + "${super}+Shift+l" = "move right"; # With arrows - "--to-code ${super}+Shift+Left" = "move left"; - "--to-code ${super}+Shift+Down" = "move down"; - "--to-code ${super}+Shift+Up" = "move up"; - "--to-code ${super}+Shift+Right" = "move right"; + "${super}+Shift+Left" = "move left"; + "${super}+Shift+Down" = "move down"; + "${super}+Shift+Up" = "move up"; + "${super}+Shift+Right" = "move right"; # Application launcher "${super}+d" = "exec ${appLauncher}"; @@ -125,56 +126,56 @@ in { "Shift+Print" = "exec ${screenshotScreen}"; # Reload the configuration file - "--to-code ${super}+Shift+r" = "reload"; + "${super}+Shift+r" = "reload"; # Fullscreen mode - "--to-code ${super}+f" = "fullscreen"; + "${super}+f" = "fullscreen"; # Float mode - "--to-code ${super}+Space" = "floating toggle"; + "${super}+Space" = "floating toggle"; # Resize mode - "--to-code ${super}+r" = "mode resize"; + "${super}+r" = "mode resize"; # Layouts - "--to-code ${super}+v" = "splitv"; - "--to-code ${super}+b" = "splith"; - "--to-code ${super}+s" = "layout toggle split"; - "--to-code ${super}+t" = "layout tabbed"; + "${super}+v" = "splitv"; + "${super}+b" = "splith"; + "${super}+t" = "layout toggle split tabbed"; + "${super}+a" = "focus parent"; # Switch to workspace using number row - "--to-code ${super}+1" = "${workspace1}"; - "--to-code ${super}+2" = "${workspace2}"; - "--to-code ${super}+3" = "${workspace3}"; - "--to-code ${super}+4" = "${workspace4}"; - "--to-code ${super}+5" = "${workspace5}"; - "--to-code ${super}+6" = "${workspace6}"; - "--to-code ${super}+7" = "${workspace7}"; - "--to-code ${super}+8" = "${workspace8}"; - "--to-code ${super}+9" = "${workspace9}"; - "--to-code ${super}+0" = "${workspace10}"; - "--to-code ${super}+minus" = "${workspace11}"; - "--to-code ${super}+equal" = "${workspace12}"; + "${super}+1" = "${workspace1}"; + "${super}+2" = "${workspace2}"; + "${super}+3" = "${workspace3}"; + "${super}+4" = "${workspace4}"; + "${super}+5" = "${workspace5}"; + "${super}+6" = "${workspace6}"; + "${super}+7" = "${workspace7}"; + "${super}+8" = "${workspace8}"; + "${super}+9" = "${workspace9}"; + "${super}+0" = "${workspace10}"; + "${super}+minus" = "${workspace11}"; + "${super}+equal" = "${workspace12}"; # Switch to scratchpad - "--to-code ${super}+z" = "scratchpad show"; + "${super}+z" = "scratchpad show"; # Move window to workspace using number row - "--to-code ${super}+Shift+1" = "move container to ${workspace1}"; - "--to-code ${super}+Shift+2" = "move container to ${workspace2}"; - "--to-code ${super}+Shift+3" = "move container to ${workspace3}"; - "--to-code ${super}+Shift+4" = "move container to ${workspace4}"; - "--to-code ${super}+Shift+5" = "move container to ${workspace5}"; - "--to-code ${super}+Shift+6" = "move container to ${workspace6}"; - "--to-code ${super}+Shift+7" = "move container to ${workspace7}"; - "--to-code ${super}+Shift+8" = "move container to ${workspace8}"; - "--to-code ${super}+Shift+9" = "move container to ${workspace9}"; - "--to-code ${super}+Shift+0" = "move container to ${workspace10}"; - "--to-code ${super}+Shift+minus" = "move container to ${workspace11}"; - "--to-code ${super}+Shift+equal" = "move container to ${workspace12}"; + "${super}+Shift+1" = "move container to ${workspace1}"; + "${super}+Shift+2" = "move container to ${workspace2}"; + "${super}+Shift+3" = "move container to ${workspace3}"; + "${super}+Shift+4" = "move container to ${workspace4}"; + "${super}+Shift+5" = "move container to ${workspace5}"; + "${super}+Shift+6" = "move container to ${workspace6}"; + "${super}+Shift+7" = "move container to ${workspace7}"; + "${super}+Shift+8" = "move container to ${workspace8}"; + "${super}+Shift+9" = "move container to ${workspace9}"; + "${super}+Shift+0" = "move container to ${workspace10}"; + "${super}+Shift+minus" = "move container to ${workspace11}"; + "${super}+Shift+equal" = "move container to ${workspace12}"; # Move window to scratchpad - "--to-code ${super}+Shift+z" = "move scratchpad"; + "${super}+Shift+z" = "move scratchpad"; }; modes = { From 82aa7ed5a5a54d5b93b9ac1801a81a2dcc7c5005 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:12:35 +0300 Subject: [PATCH 023/103] home/modules: Add powerMenu script for sway --- home/modules/sway/keybinds/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/modules/sway/keybinds/default.nix b/home/modules/sway/keybinds/default.nix index 1bf3139..acbb706 100644 --- a/home/modules/sway/keybinds/default.nix +++ b/home/modules/sway/keybinds/default.nix @@ -79,7 +79,7 @@ in { "${super}+q" = "kill"; # PowerMenu - "--to-code ${super}+p" = "exec ${powerMenu}/bin/powerMenu.sh"; + "${super}+p" = "exec ${powerMenu}/bin/powerMenu.sh"; # Change focus # Vim like From e5ca9c8d7e1a40a5a12a8470ebd13927640bac05 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:12:58 +0300 Subject: [PATCH 024/103] home/modules: Fix paths for sway --- home/modules/sway/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/home/modules/sway/default.nix b/home/modules/sway/default.nix index 9c56418..92cb8fd 100644 --- a/home/modules/sway/default.nix +++ b/home/modules/sway/default.nix @@ -1,7 +1,7 @@ -{ config +{ self +, config , lib , pkgs -, homeModules , ... }: @@ -11,8 +11,8 @@ let cfg = config.module.sway; in { imports = [ - "${homeModules}/sway/keybinds" - "${homeModules}/sway/outputs" + "${self}/home/modules/sway/keybinds" + "${self}/home/modules/sway/outputs" ]; options.module.sway = { From c6fa71745e86cdeb61c34ba0c4edb7b1b1ef3b85 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:13:14 +0300 Subject: [PATCH 025/103] home/modules: Remove swayfx legacy --- home/modules/sway/default.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/home/modules/sway/default.nix b/home/modules/sway/default.nix index 92cb8fd..77a47fd 100644 --- a/home/modules/sway/default.nix +++ b/home/modules/sway/default.nix @@ -40,12 +40,6 @@ in { wayland.windowManager.sway = { enable = true; package = pkgs.sway; - checkConfig = false; - - # Swayfx settings - /* extraConfig = '' - corner_radius 3 - ''; */ config = { focus.mouseWarping = "container"; From 70a9f2787c51e7cd07d4025eace2dddf385bd8e1 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:13:19 +0300 Subject: [PATCH 026/103] home/modules: Remove vesktop --- home/modules/sway/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/home/modules/sway/default.nix b/home/modules/sway/default.nix index 77a47fd..69cbe78 100644 --- a/home/modules/sway/default.nix +++ b/home/modules/sway/default.nix @@ -85,7 +85,6 @@ in { { command = "${pkgs.sway}/bin/swaymsg 'workspace 5; exec ${pkgs.foot}/bin/foot'"; } { command = "${pkgs.sway}/bin/swaymsg 'workspace 5; exec ${pkgs.foot}/bin/foot'"; } { command = "${pkgs.sway}/bin/swaymsg 'workspace 6; exec ${pkgs.librewolf}/bin/librewolf -P work'"; } - { command = "${pkgs.sway}/bin/swaymsg 'workspace 8; exec ${pkgs.vesktop}/bin/vesktop'"; } ]; }; }; From ea7d7719ef35fe72a2e45b1e20f8f495eaded32a Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:13:37 +0300 Subject: [PATCH 027/103] home/modules: Fix paths for swaync --- home/modules/swaync/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/home/modules/swaync/default.nix b/home/modules/swaync/default.nix index e03ced2..1950c90 100644 --- a/home/modules/swaync/default.nix +++ b/home/modules/swaync/default.nix @@ -1,6 +1,6 @@ -{ lib +{ self +, lib , config -, homeModules , ... }: @@ -77,8 +77,7 @@ in { }; # Custom style - # style = builtins.readFile (./. + "/style.css"); - style = builtins.readFile "${homeModules}/swaync/style.css"; + style = builtins.readFile "${self}/home/modules/swaync/style.css"; }; }; } From 033a4bcc1530951d56fba5f0f902430341d94a31 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:13:48 +0300 Subject: [PATCH 028/103] home/modules: Rewrite swaync css --- home/modules/swaync/style.css | 252 +--------------------------------- 1 file changed, 1 insertion(+), 251 deletions(-) diff --git a/home/modules/swaync/style.css b/home/modules/swaync/style.css index c672273..336eb5e 100644 --- a/home/modules/swaync/style.css +++ b/home/modules/swaync/style.css @@ -1,186 +1,27 @@ -@define-color base00 #2e3440; @define-color base01 #3b4252; @define-color base02 #434c5e; @define-color base03 #4c566a; -@define-color base04 #d8dee9; @define-color base05 #e5e9f0; @define-color base06 #eceff4; @define-color base07 #8fbcbb; - -@define-color base08 #bf616a; @define-color base09 #d08770; @define-color base0A #ebcb8b; @define-color base0B #a3be8c; -@define-color base0C #88c0d0; @define-color base0D #81a1c1; @define-color base0E #b48ead; @define-color base0F #5e81ac; - -@define-color background rgba(17, 17, 27, 0.85); -@define-color background-alt rgba(137, 180, 250, 0.05); -@define-color background-focus rgba(255, 255, 255, 0.1); -@define-color border rgba(255, 255, 255, 0.1); -@define-color red rgb( 243, 139, 168); -@define-color orange rgb( 250, 179, 135); -@define-color yellow rgb( 249, 226, 175 ); -@define-color green rgb( 166, 227, 161 ); -@define-color blue rgb( 137, 180, 250 ); -@define-color gray rgb( 108, 112, 134 ); -@define-color black rgb( 49, 50, 68 ); -@define-color white rgb( 205, 214, 244 ); - -* { - all: unset; - font: - 12pt JetBrainsMono Nerd Font; - transition: 200ms; -} - /*** Global ***/ progress, progressbar, trough { - border: 1px solid @base0D; border-radius: 16px; } -trough { - background: @base01; -} - -.notification.low, -.notification.normal { - border: 1px solid @base0D; -} - -.notification.low progress, -.notification.normal progress { - background: @base0F; -} - -.notification.critical { - border: 1px solid @red; -} - -.notification.critical progress { - background: @red; -} - -.summary { - color: @base05; -} - -.body { - color: alpha(@white, 0.7); -} - -.time { - color: alpha(@white, 0.7); -} - .app-icon, .image { -gtk-icon-effect: none; - margin: 0.25rem; } .notification-action { - color: @base05; - background: @base01; - border: 1px solid @base0D; border-radius: 5px; margin: 0.5rem; } -.notification-action:hover { - background: @background-focus; - color: @base05; -} - -.notification-action:active { - background: @base0F; - color: @base05; -} - .close-button { margin: 0.5rem; padding: 0.25rem; border-radius: 5px; - color: @black; - background: @red; -} - -.close-button:hover { - background: lighter(@red); - color: lighter(@black); -} - -.close-button:active { - background: @red; - color: @base00; } /*** Notifications ***/ -.floating-notifications.background .notification-row .notification-background { - background: @base00; - border-radius: 5px; - color: @base05; - margin: 0.25rem; - padding: 0; -} - -.floating-notifications.background - .notification-row - .notification-background - .notification { - padding: 0.5rem; - border-radius: 5px; -} - -.floating-notifications.background - .notification-row - .notification-background - .notification - .notification-content { - margin: 0.5rem; -} - -/*** Notifications Group ***/ -.notification-group { - /* Styling only for Grouped Notifications */ -} - -.notification-group.low { - /* Low Priority Group */ -} - -.notification-group.normal { - /* Low Priority Group */ -} - -.notification-group.critical { - /* Low Priority Group */ -} - -.notification-group .notification-group-buttons, -.notification-group .notification-group-headers { - margin: 0.5rem; - color: @base05; -} - -.notification-group .notification-group-headers { - /* Notification Group Headers */ -} - -.notification-group .notification-group-headers .notification-group-icon { - color: @base05; -} - -.notification-group .notification-group-headers .notification-group-header { - color: @base05; -} - -.notification-group .notification-group-buttons { - /* Notification Group Buttons */ -} - -.notification-group.collapsed .notification-row .notification { - background: @base01; -} - -.notification-group.collapsed .notification-row:not(:last-child) { - /* Top notification in stack */ - /* Set lower stacked notifications opacity to 0 */ -} - .notification-group.collapsed .notification-row:not(:last-child) .notification-action, @@ -190,68 +31,19 @@ trough { opacity: 0; } -.notification-group.collapsed:hover - .notification-row:not(:only-child) - .notification { - background: @background-focus; -} - /*** Control Center ***/ .control-center { - background: @base00; - border: 1px solid @base0D; border-radius: 8px; - color: @base05; - padding: 1rem; + padding: 2rem; } .control-center-list { background: transparent; } -.control-center .notification-row .notification-background { - background: @base01; - border-radius: 8px; - color: @base05; - margin: 0.5rem; -} - -.control-center .notification-row .notification-background .notification { - border-radius: 8px; - padding: 0.5rem; -} - -.control-center - .notification-row - .notification-background - .notification - .notification-content { - margin: 0.5rem; -} - -.control-center - .notification-row - .notification-background - .notification - .notification-content - .time { - margin-right: 0.75rem; -} - -.control-center .notification-row .notification-background:hover { - background: @background-focus; - color: @base05; -} - -.control-center .notification-row .notification-background:active { - background: @base0F; - color: @base05; -} - /*** Widgets ***/ /* Title widget */ .widget-title { - color: @base05; margin: 0.5rem; } @@ -260,20 +52,12 @@ trough { } .widget-title > button { - background: @base01; - border: 1px solid @base0D; border-radius: 8px; - color: @base05; padding: 0.5rem; } -.widget-title > button:hover { - background: @background-focus; -} - /* DND Widget */ .widget-dnd { - color: @base05; margin: 0.5rem; } @@ -282,42 +66,21 @@ trough { } .widget-dnd > switch { - background: @base01; - border: 1px solid @base0D; border-radius: 8px; } -.widget-dnd > switch:hover { - background: @background-focus; -} - -.widget-dnd > switch:checked { - background: @base0F; -} - .widget-dnd > switch slider { - background: @background-focus; border-radius: 8px; padding: 0.25rem; } /* Mpris widget */ -.widget-mpris { - color: @base05; -} - .widget-mpris .widget-mpris-player { - background: @base01; - border: 1px solid @base0D; border-radius: 8px; margin: 0.5rem; padding: 0.5rem; } -.widget-mpris .widget-mpris-player button:hover { - background: @background-focus; -} - .widget-mpris .widget-mpris-player .widget-mpris-album-art { border-radius: 16px; } @@ -336,16 +99,3 @@ trough { padding: 0.25rem; } -.widget-mpris .widget-mpris-player > box > button:hover { - background: @background-focus; - border: 1px solid @base0D; -} - -.widget-mpris > box > button { - /* Change player side buttons */ -} - -.widget-mpris > box > button:disabled { - /* Change player side buttons insensitive */ -} - From b74753c9fba645109935fc8893487ee7ef3261ca Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:14:01 +0300 Subject: [PATCH 029/103] home/modules: Fix paths in vscode --- home/modules/vscode/default.nix | 10 +++++----- home/modules/vscode/keybindings/default.nix | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/home/modules/vscode/default.nix b/home/modules/vscode/default.nix index e4f5c5a..93dc7ec 100644 --- a/home/modules/vscode/default.nix +++ b/home/modules/vscode/default.nix @@ -1,6 +1,6 @@ -{ lib +{ self +, lib , config -, homeModules , ... }: @@ -10,9 +10,9 @@ let cfg = config.module.vscode; in { imports = [ - "${homeModules}/vscode/keybindings" - "${homeModules}/vscode/extentions" - "${homeModules}/vscode/settings" + "${self}/home/modules/vscode/keybindings" + "${self}/home/modules/vscode/extentions" + "${self}/home/modules/vscode/settings" ]; options = { diff --git a/home/modules/vscode/keybindings/default.nix b/home/modules/vscode/keybindings/default.nix index 3dfcc05..a2c3a2b 100644 --- a/home/modules/vscode/keybindings/default.nix +++ b/home/modules/vscode/keybindings/default.nix @@ -1,8 +1,8 @@ -{ homeModules +{ self , ... }: { - home.file.".config/Code/User/keybindings.json".source = "${homeModules}/vscode/keybindings/keybindings.json"; + home.file.".config/Code/User/keybindings.json".source = "${self}/home/modules/vscode/keybindings/keybindings.json"; } From 0e6f7462346e5a544877741021df51919b7b4fa8 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:14:16 +0300 Subject: [PATCH 030/103] home/modules: Fix paths in waybar and add privacy module --- home/modules/waybar/default.nix | 9 +++++++-- home/modules/waybar/style.css | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/home/modules/waybar/default.nix b/home/modules/waybar/default.nix index d370afb..a4eaa26 100644 --- a/home/modules/waybar/default.nix +++ b/home/modules/waybar/default.nix @@ -2,7 +2,6 @@ , pkgs , config , lib -, homeModules , wm , ... }: @@ -48,6 +47,7 @@ in { "${wm}/language" "tray" "pulseaudio" + "privacy" "cpu" "memory" "network" @@ -200,11 +200,16 @@ in { on-click = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor"; interval = 5; }; + + # Privacy + privacy = { + icon-size = 15; + }; } ]; style = mkAfter '' - ${builtins.readFile "${homeModules}/waybar/style.css"} + ${builtins.readFile "${self}/home/modules/waybar/style.css"} ''; }; }; diff --git a/home/modules/waybar/style.css b/home/modules/waybar/style.css index 92740c2..197f60b 100644 --- a/home/modules/waybar/style.css +++ b/home/modules/waybar/style.css @@ -53,6 +53,7 @@ window#waybar { #workspaces button, #custom-nixlogo, #image, +#privacy, #clock { color: @base05; background: @base01; From 7c79fac1b286114c6ff658ffdba49690688fee28 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:14:28 +0300 Subject: [PATCH 031/103] home/modules: Fix paths in zsh --- home/modules/default.nix | 6 +++--- home/modules/zsh/default.nix | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/home/modules/default.nix b/home/modules/default.nix index 0cde260..3f6ac6c 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -1,12 +1,12 @@ -{ homeModules +{ self , lib , ... }: { - # Read all directories from homeModules + # Read all directories imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${homeModules}/${module}") (builtins.attrNames (builtins.readDir homeModules)) + map (module: "${self}/home/modules/${module}") (builtins.attrNames (builtins.readDir "${self}/home/modules")) ); } diff --git a/home/modules/zsh/default.nix b/home/modules/zsh/default.nix index 0f5254d..31805a7 100644 --- a/home/modules/zsh/default.nix +++ b/home/modules/zsh/default.nix @@ -1,8 +1,8 @@ { inputs +, self , lib , username , config -, homeModules , ... }: @@ -16,8 +16,8 @@ in { }; config = mkIf cfg.enable { - home.file.".p10k.zsh".source = "${homeModules}/zsh/p10k.zsh"; - home.file.".helmrc".source = "${homeModules}/zsh/helmrc"; + home.file.".p10k.zsh".source = "${self}/home/modules/zsh/p10k.zsh"; + home.file.".helmrc".source = "${self}/home/modules/zsh/helmrc"; programs.zsh = { enable = true; @@ -50,7 +50,7 @@ in { } ]; - oh-my-zsh = { + /* oh-my-zsh = { enable = true; plugins = [ @@ -65,7 +65,7 @@ in { extraConfig = '' zstyle ':omz:update' mode disabled ''; - }; + }; */ shellAliases = { # System From 31d03496e4c42912028021f89d3b062bf5ea8fc7 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:14:53 +0300 Subject: [PATCH 032/103] home/users/maxmur: Add obs-studio in impermanence --- home/users/maxmur/modules/impermanence/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home/users/maxmur/modules/impermanence/default.nix b/home/users/maxmur/modules/impermanence/default.nix index cda0f40..1ed0ecc 100644 --- a/home/users/maxmur/modules/impermanence/default.nix +++ b/home/users/maxmur/modules/impermanence/default.nix @@ -58,6 +58,7 @@ in { ".config/htop" ".config/nvim" ".config/syncthing" + ".config/obs-studio" ".config/pulse" ".local/share/chat.fluffy.fluffychat" ".local/share/zoxide" From 86ad7b348295f5562a519ad64358b52185b68492 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:15:05 +0300 Subject: [PATCH 033/103] home/users/maxmur: Some edits in packages --- home/users/maxmur/modules/packages/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/home/users/maxmur/modules/packages/default.nix b/home/users/maxmur/modules/packages/default.nix index 0a70ef7..7110e00 100644 --- a/home/users/maxmur/modules/packages/default.nix +++ b/home/users/maxmur/modules/packages/default.nix @@ -35,16 +35,16 @@ in { age sops ] ++ lib.optionals isWorkstation [ - # Chats - discord - # Text Editors obsidian # Fonts - (nerdfonts.override { fonts = [ "JetBrainsMono" "UbuntuMono" "Iosevka" ]; }) + nerd-fonts.jetbrains-mono + nerd-fonts.ubuntu-mono + nerd-fonts.iosevka corefonts ] ++ lib.optionals (isLinux && isWorkstation) [ + inputs.ghostty.packages.x86_64-linux.default # Programming go python3 @@ -88,7 +88,7 @@ in { swww xdg-utils pavucontrol - nemo + xfce.thunar eww networkmanagerapplet brightnessctl From c1263472d806e1610d578eb1ab8584d68d3840e2 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:15:53 +0300 Subject: [PATCH 034/103] home: Fix paths in home constructor --- home/default.nix | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/home/default.nix b/home/default.nix index 95ecd9b..8a3e790 100644 --- a/home/default.nix +++ b/home/default.nix @@ -5,9 +5,7 @@ , hostname , username , platform -, stateVersion -, homeModules -, commonModules +, hmStateVersion , isWorkstation ? false , wm ? "" , swayEnable ? false @@ -20,18 +18,19 @@ let inherit (pkgs.stdenv) isDarwin; inherit (pkgs.stdenv) isLinux; + stateVersion = hmStateVersion; isRoot = username == "root"; homeDirectory = if isDarwin then "/Users/${username}" else if isRoot then "/root" else "/home/${username}"; userConfigurationPath = "${self}/home/users/${username}"; userConfigurationPathExist = builtins.pathExists userConfigurationPath; userModulesPath = "${self}/home/users/${username}/modules"; userModulesPathExist = builtins.pathExists userModulesPath; - sshModulePath = "${homeModules}/ssh"; + sshModulePath = "${self}/home/modules/ssh"; sshModuleExistPath = builtins.pathExists sshModulePath; in { home-manager = { - useGlobalPkgs = true; - useUserPackages = true; + useGlobalPkgs = true; + useUserPackages = true; backupFileExtension = "backup-" + pkgs.lib.readFile "${pkgs.runCommand "timestamp" {} "echo -n `date '+%Y%m%d%H%M%S'` > $out"}"; extraSpecialArgs = { @@ -43,8 +42,6 @@ in { platform stateVersion isLinux - commonModules - homeModules isWorkstation wm swayEnable @@ -52,14 +49,17 @@ in { wmEnable; }; + sharedModules = [ + inputs.sops-nix.homeManagerModules.sops + ]; + users.${username} = { imports = [ inputs.impermanence.nixosModules.home-manager.impermanence - inputs.sops-nix.homeManagerModules.sops - inputs.nur.nixosModules.nur + inputs.nur.modules.homeManager.default - "${commonModules}" - "${homeModules}" + "${self}/modules" + "${self}/home/modules" ] ++ lib.optional sshModuleExistPath sshModulePath ++ lib.optional userConfigurationPathExist userConfigurationPath ++ lib.optional userModulesPathExist userModulesPath; From f4310dde1eab214dd1fa8fe41f6e367709572b4d Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:16:46 +0300 Subject: [PATCH 035/103] hosts: Add hlbox machine --- hosts.nix | 15 +++-- system/machine/hlbox/default.nix | 58 +++++++++++++++++++ system/machine/hlbox/modules/default.nix | 14 +++++ .../hlbox/modules/hardware/default.nix | 14 +++++ .../hlbox/modules/hardware/disks/default.nix | 36 ++++++++++++ .../hardware/extra-hardware/default.nix | 16 +++++ .../hardware/graphics-card/default.nix | 9 +++ .../hlbox/modules/hardware/kernel/default.nix | 34 +++++++++++ .../modules/hardware/network/default.nix | 44 ++++++++++++++ 9 files changed, 236 insertions(+), 4 deletions(-) create mode 100644 system/machine/hlbox/default.nix create mode 100644 system/machine/hlbox/modules/default.nix create mode 100644 system/machine/hlbox/modules/hardware/default.nix create mode 100644 system/machine/hlbox/modules/hardware/disks/default.nix create mode 100644 system/machine/hlbox/modules/hardware/extra-hardware/default.nix create mode 100644 system/machine/hlbox/modules/hardware/graphics-card/default.nix create mode 100644 system/machine/hlbox/modules/hardware/kernel/default.nix create mode 100644 system/machine/hlbox/modules/hardware/network/default.nix diff --git a/hosts.nix b/hosts.nix index 025819f..a6f1ec9 100644 --- a/hosts.nix +++ b/hosts.nix @@ -3,7 +3,7 @@ pcbox = { username = "maxmur"; platform = "x86_64-linux"; - stateVersion = "24.11"; + stateVersion = "25.05"; isWorkstation = true; wm = "sway"; }; @@ -11,7 +11,7 @@ nbox = { username = "maxmur"; platform = "x86_64-linux"; - stateVersion = "24.11"; + stateVersion = "25.05"; isWorkstation = true; wm = "sway"; }; @@ -19,7 +19,14 @@ rasp = { username = "maxmur"; platform = "aarch64-linux"; - stateVersion = "24.11"; + stateVersion = "25.05"; + isWorkstation = false; + }; + + hlbox = { + username = "maxmur"; + platform = "x86_64-linux"; + stateVersion = "25.05"; isWorkstation = false; }; }; @@ -28,7 +35,7 @@ macbox = { username = "maxmur"; platform = "aarch64-darwin"; - stateVersion = 6; + stateVersion = 5; isWorkstation = true; }; }; diff --git a/system/machine/hlbox/default.nix b/system/machine/hlbox/default.nix new file mode 100644 index 0000000..2255246 --- /dev/null +++ b/system/machine/hlbox/default.nix @@ -0,0 +1,58 @@ +{ config +, ... +}: + +{ + module = { + boot.enable = true; + timedate.enable = true; + locales.enable = true; + users.enable = true; + network.enable = true; + variables.enable = true; + stylix.enable = true; + nixos-ng.enable = true; + plymouth.enable = true; + minimal.enable = true; + + programs = { + gnupg.enable = true; + fish.enable = true; + zsh.enable = true; + systemPackages.enable = true; + }; + + security = { + enable = true; + enableBootOptions = true; + }; + + defaults = { + network = { + iface = "enp0s31f6"; + ip = "192.168.1.10"; + gw = "192.168.1.1"; + mask = "255.255.255.0"; + cidr = "24"; + }; + + ssh.pubKeys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIXByEG3SJJOMxKEAl8azfR/fNMuvXfNcCaEFrdIdn91" + ]; + }; + + services = { + proxmox-ve.enable = true; + + ssh = { + enable = true; + listenAddresses = [ + { addr = config.module.defaults.network.ip; port = 45631; } + ]; + }; + }; + }; + + nix.settings.trusted-users = [ "maxmur" "root" ]; +} + diff --git a/system/machine/hlbox/modules/default.nix b/system/machine/hlbox/modules/default.nix new file mode 100644 index 0000000..2d42d74 --- /dev/null +++ b/system/machine/hlbox/modules/default.nix @@ -0,0 +1,14 @@ +{ self +, machineDir +, lib +, ... +}: + +let + modules = "${self}/system/machine/${machineDir}/modules"; +in { + imports = builtins.filter (module: lib.pathIsDirectory module) ( + map (module: "${modules}/${module}") (builtins.attrNames (builtins.readDir modules)) + ); +} + diff --git a/system/machine/hlbox/modules/hardware/default.nix b/system/machine/hlbox/modules/hardware/default.nix new file mode 100644 index 0000000..9d4d1eb --- /dev/null +++ b/system/machine/hlbox/modules/hardware/default.nix @@ -0,0 +1,14 @@ +{ self +, lib +, machineDir +, ... +}: + +let + hardwareModulesPath = "${self}/system/machine/${machineDir}/modules/hardware"; +in { + imports = builtins.filter (module: lib.pathIsDirectory module) ( + map (module: "${hardwareModulesPath}/${module}") (builtins.attrNames (builtins.readDir hardwareModulesPath)) + ); +} + diff --git a/system/machine/hlbox/modules/hardware/disks/default.nix b/system/machine/hlbox/modules/hardware/disks/default.nix new file mode 100644 index 0000000..970f6f7 --- /dev/null +++ b/system/machine/hlbox/modules/hardware/disks/default.nix @@ -0,0 +1,36 @@ +_: + +{ + swapDevices = [ ]; + + boot.zfs.extraPools = [ + "zmirror" + ]; + + fileSystems = { + "/" = { + device = "zpool/root"; + fsType = "zfs"; + options = [ "zfsutil" ]; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/2D7C-60DB"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + "/home" = { + device = "zpool/home"; + fsType = "zfs"; + options = [ "zfsutil" ]; + }; + + "/nix" = { + device = "zpool/nix"; + fsType = "zfs"; + options = [ "zfsutil" ]; + }; + }; +} + diff --git a/system/machine/hlbox/modules/hardware/extra-hardware/default.nix b/system/machine/hlbox/modules/hardware/extra-hardware/default.nix new file mode 100644 index 0000000..98ba039 --- /dev/null +++ b/system/machine/hlbox/modules/hardware/extra-hardware/default.nix @@ -0,0 +1,16 @@ +{ pkgs +, ... +}: + +{ + hardware = { + enableAllFirmware = true; + cpu.intel.updateMicrocode = true; + enableRedistributableFirmware = true; + + firmware = with pkgs; [ + linux-firmware + ]; + }; +} + diff --git a/system/machine/hlbox/modules/hardware/graphics-card/default.nix b/system/machine/hlbox/modules/hardware/graphics-card/default.nix new file mode 100644 index 0000000..7e59ab5 --- /dev/null +++ b/system/machine/hlbox/modules/hardware/graphics-card/default.nix @@ -0,0 +1,9 @@ +_: + +{ + hardware = { + graphics.enable = true; + nvidia.open = true; + }; +} + diff --git a/system/machine/hlbox/modules/hardware/kernel/default.nix b/system/machine/hlbox/modules/hardware/kernel/default.nix new file mode 100644 index 0000000..77122fc --- /dev/null +++ b/system/machine/hlbox/modules/hardware/kernel/default.nix @@ -0,0 +1,34 @@ +{ config +, ... +}: + +let + ipKernelParam = with config.module.defaults.network; [ + "ip=${ip}::${gw}:${mask}::${iface}:none" + ]; +in { + boot = { + kernelModules = [ "kvm-intel" "r8169" ]; + extraModulePackages = [ ]; + kernelParams = [ + "zfs.zfs_arc_max=2147483648" + ] ++ ipKernelParam; + + initrd = { + availableKernelModules = [ "ath10k_pci" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "r8169" ]; + kernelModules = [ ]; + + network = { + enable = true; + + ssh = { + enable = true; + port = 2222; + hostKeys = [ /etc/secrets/initrd/ssh_host_ed25519_key ]; + authorizedKeys = config.module.defaults.ssh.pubKeys; + }; + }; + }; + }; +} + diff --git a/system/machine/hlbox/modules/hardware/network/default.nix b/system/machine/hlbox/modules/hardware/network/default.nix new file mode 100644 index 0000000..51f6906 --- /dev/null +++ b/system/machine/hlbox/modules/hardware/network/default.nix @@ -0,0 +1,44 @@ +{ config +, username +, ... +}: + +{ + users.users.${username}.openssh.authorizedKeys.keys = config.module.defaults.ssh.pubKeys; + + networking = { + hostId = "1ac5a44c"; + }; + + systemd.network = { + netdevs."vmbr0" = { + netdevConfig = { + Name = "vmbr0"; + Kind = "bridge"; + }; + }; + + networks = { + "10-lan" = { + matchConfig.Name = [ config.module.defaults.network.iface ]; + networkConfig = { + Bridge = "vmbr0"; + }; + }; + + "10-lan-bridge" = { + matchConfig.Name = "vmbr0"; + linkConfig.RequiredForOnline = "routable"; + + address = [ + "${config.module.defaults.network.ip}/${config.module.defaults.network.cidr}" + ]; + + routes = [ + { Gateway = config.module.defaults.network.gw; } + ]; + }; + }; + }; +} + From 929c6ad9bab1d8e5a9d3190d4ee8bea8ca14454c Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:17:04 +0300 Subject: [PATCH 036/103] overlays: Rewrite nixpkgs overlays --- overlays/nixpkgs/default.nix | 28 ++++++++++++++++++++------- overlays/nixpkgs/master/default.nix | 23 ---------------------- overlays/nixpkgs/stable/default.nix | 23 ---------------------- overlays/nixpkgs/unstable/default.nix | 23 ---------------------- 4 files changed, 21 insertions(+), 76 deletions(-) delete mode 100644 overlays/nixpkgs/master/default.nix delete mode 100644 overlays/nixpkgs/stable/default.nix delete mode 100644 overlays/nixpkgs/unstable/default.nix diff --git a/overlays/nixpkgs/default.nix b/overlays/nixpkgs/default.nix index 964ea7c..3a1c72e 100644 --- a/overlays/nixpkgs/default.nix +++ b/overlays/nixpkgs/default.nix @@ -1,14 +1,28 @@ -{ self -, lib +{ inputs , ... }: let - overlaysPath = "${self}/overlays/nixpkgs"; + baseSettings = { + config = { + allowBroken = true; + }; + }; + + permittedInsecurePackages = []; + unfreeSettings = baseSettings // { config = baseSettings.config // { inherit permittedInsecurePackages; allowUnfree = true; }; }; in { - # Read all directories from systemModules - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${overlaysPath}/${module}") (builtins.attrNames (builtins.readDir overlaysPath)) - ); + nixpkgs.overlays = [ + (final: _prev: { + stable = import inputs.stable { inherit (final) system; } // baseSettings; + stable-unfree = import inputs.stable { inherit (final) system; } // unfreeSettings; + + unstable = import inputs.unstable { inherit (final) system; } // baseSettings; + unstable-unfree = import inputs.unstable { inherit (final) system; } // unfreeSettings; + + master = import inputs.master { inherit (final) system; } // baseSettings; + master-unfree = import inputs.master { inherit (final) system; } // unfreeSettings; + }) + ]; } diff --git a/overlays/nixpkgs/master/default.nix b/overlays/nixpkgs/master/default.nix deleted file mode 100644 index 6763c64..0000000 --- a/overlays/nixpkgs/master/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ inputs -, ... -}: - -{ - nixpkgs.overlays = [ - # Default master - (final: _prev: { - master = import inputs.master { - inherit (final) system; - }; - }) - - # Unfree master - (final: _prev: { - master-unfree = import inputs.master { - inherit (final) system; - config.allowUnfree = true; - }; - }) - ]; -} - diff --git a/overlays/nixpkgs/stable/default.nix b/overlays/nixpkgs/stable/default.nix deleted file mode 100644 index b98ff2c..0000000 --- a/overlays/nixpkgs/stable/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ inputs -, ... -}: - -{ - nixpkgs.overlays = [ - # Default stable - (final: _prev: { - stable = import inputs.stable { - inherit (final) system; - }; - }) - - # Unfree stable - (final: _prev: { - stable-unfree = import inputs.stable { - inherit (final) system; - config.allowUnfree = true; - }; - }) - ]; -} - diff --git a/overlays/nixpkgs/unstable/default.nix b/overlays/nixpkgs/unstable/default.nix deleted file mode 100644 index 744e9a1..0000000 --- a/overlays/nixpkgs/unstable/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ inputs -, ... -}: - -{ - nixpkgs.overlays = [ - # Default unstable - (final: _prev: { - unstable = import inputs.unstable { - inherit (final) system; - }; - }) - - # Unfree unstable - (final: _prev: { - unstable-unfree = import inputs.unstable { - inherit (final) system; - config.allowUnfree = true; - }; - }) - ]; -} - From 99f5cb7925bed74419977f1e1f2c93cffd7eeb16 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:17:16 +0300 Subject: [PATCH 037/103] system/darwin: Init --- system/darwin/modules/.gitkeep | 0 system/darwin/modules/default.nix | 4 ++++ system/darwin/overlays/.gitkeep | 0 3 files changed, 4 insertions(+) create mode 100644 system/darwin/modules/.gitkeep create mode 100644 system/darwin/modules/default.nix create mode 100644 system/darwin/overlays/.gitkeep diff --git a/system/darwin/modules/.gitkeep b/system/darwin/modules/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/system/darwin/modules/default.nix b/system/darwin/modules/default.nix new file mode 100644 index 0000000..9a6c1d4 --- /dev/null +++ b/system/darwin/modules/default.nix @@ -0,0 +1,4 @@ +_: + +{} + diff --git a/system/darwin/overlays/.gitkeep b/system/darwin/overlays/.gitkeep new file mode 100644 index 0000000..e69de29 From ccd795230e4472f4aec4b31863efc296e56ddc09 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:18:32 +0300 Subject: [PATCH 038/103] system/nixos: Init Remove system/modules -> system/nixos/modules --- system/modules/default.nix | 12 ----- system/nixos/modules/binfmt/default.nix | 19 ++++++++ .../{ => nixos}/modules/bluetooth/default.nix | 0 system/{ => nixos}/modules/boot/default.nix | 0 system/nixos/modules/default.nix | 14 ++++++ .../{ => nixos}/modules/lanzaboot/default.nix | 0 .../{ => nixos}/modules/locales/default.nix | 0 .../{ => nixos}/modules/minimal/default.nix | 0 .../{ => nixos}/modules/network/default.nix | 10 ++++- system/nixos/modules/nix/default.nix | 13 ++++++ .../{ => nixos}/modules/nixos-ng/default.nix | 0 system/{ => nixos}/modules/pihole/default.nix | 0 .../{ => nixos}/modules/plymouth/default.nix | 0 .../modules/programs/dconf/default.nix | 0 .../{ => nixos}/modules/programs/default.nix | 4 +- .../modules/programs/fish/default.nix | 0 .../modules/programs/gnupg/default.nix | 0 .../modules/programs/home-manager/default.nix | 0 .../modules/programs/kdeconnect/default.nix | 0 .../modules/programs/mtr/default.nix | 0 .../modules/programs/nix-helper/default.nix | 0 .../programs/systemPackages/default.nix | 4 +- .../modules/programs/xdg-portal/default.nix | 0 .../modules/programs/zsh/default.nix | 0 .../{ => nixos}/modules/security/default.nix | 0 .../modules/services/adguard-home/default.nix | 0 .../modules/services/bolt/default.nix | 0 .../modules/services/cpu-autofreq/default.nix | 0 .../{ => nixos}/modules/services/default.nix | 4 +- .../modules/services/fwupd/default.nix | 0 .../modules/services/greetd/default.nix | 0 .../services/homepage-dashboard/default.nix | 0 .../modules/services/hyprland/default.nix | 0 .../modules/services/netbird/default.nix | 0 .../modules/services/ollama/default.nix | 0 .../modules/services/polkit/default.nix | 0 .../modules/services/printing/default.nix | 0 .../modules/services/proxmox-ve/default.nix | 21 +++++++++ .../modules/services/qmk/default.nix | 0 .../modules/services/scx}/default.nix | 12 ++--- system/nixos/modules/services/ssh/default.nix | 44 +++++++++++++++++++ .../modules/services/syncthing/default.nix | 0 .../modules/services/tlp/default.nix | 8 ---- .../modules/services/udev/default.nix | 0 .../modules/services/unbound/default.nix | 0 .../modules/services/xserver/default.nix | 0 .../modules/services/yggdrasil/default.nix | 31 +++++++++++++ .../modules/services/zram/default.nix | 0 system/{ => nixos}/modules/sound/default.nix | 0 .../{ => nixos}/modules/timedate/default.nix | 0 system/{ => nixos}/modules/users/default.nix | 1 + .../{ => nixos}/modules/variables/default.nix | 0 .../modules/virtualization/default.nix | 0 system/{ => nixos}/modules/zapret/default.nix | 0 .../overlays/vaapiIntel/default.nix | 0 55 files changed, 166 insertions(+), 31 deletions(-) delete mode 100644 system/modules/default.nix create mode 100644 system/nixos/modules/binfmt/default.nix rename system/{ => nixos}/modules/bluetooth/default.nix (100%) rename system/{ => nixos}/modules/boot/default.nix (100%) create mode 100644 system/nixos/modules/default.nix rename system/{ => nixos}/modules/lanzaboot/default.nix (100%) rename system/{ => nixos}/modules/locales/default.nix (100%) rename system/{ => nixos}/modules/minimal/default.nix (100%) rename system/{ => nixos}/modules/network/default.nix (79%) create mode 100644 system/nixos/modules/nix/default.nix rename system/{ => nixos}/modules/nixos-ng/default.nix (100%) rename system/{ => nixos}/modules/pihole/default.nix (100%) rename system/{ => nixos}/modules/plymouth/default.nix (100%) rename system/{ => nixos}/modules/programs/dconf/default.nix (100%) rename system/{ => nixos}/modules/programs/default.nix (76%) rename system/{ => nixos}/modules/programs/fish/default.nix (100%) rename system/{ => nixos}/modules/programs/gnupg/default.nix (100%) rename system/{ => nixos}/modules/programs/home-manager/default.nix (100%) rename system/{ => nixos}/modules/programs/kdeconnect/default.nix (100%) rename system/{ => nixos}/modules/programs/mtr/default.nix (100%) rename system/{ => nixos}/modules/programs/nix-helper/default.nix (100%) rename system/{ => nixos}/modules/programs/systemPackages/default.nix (92%) rename system/{ => nixos}/modules/programs/xdg-portal/default.nix (100%) rename system/{ => nixos}/modules/programs/zsh/default.nix (100%) rename system/{ => nixos}/modules/security/default.nix (100%) rename system/{ => nixos}/modules/services/adguard-home/default.nix (100%) rename system/{ => nixos}/modules/services/bolt/default.nix (100%) rename system/{ => nixos}/modules/services/cpu-autofreq/default.nix (100%) rename system/{ => nixos}/modules/services/default.nix (74%) rename system/{ => nixos}/modules/services/fwupd/default.nix (100%) rename system/{ => nixos}/modules/services/greetd/default.nix (100%) rename system/{ => nixos}/modules/services/homepage-dashboard/default.nix (100%) rename system/{ => nixos}/modules/services/hyprland/default.nix (100%) rename system/{ => nixos}/modules/services/netbird/default.nix (100%) rename system/{ => nixos}/modules/services/ollama/default.nix (100%) rename system/{ => nixos}/modules/services/polkit/default.nix (100%) rename system/{ => nixos}/modules/services/printing/default.nix (100%) create mode 100644 system/nixos/modules/services/proxmox-ve/default.nix rename system/{ => nixos}/modules/services/qmk/default.nix (100%) rename system/{modules/chaotic => nixos/modules/services/scx}/default.nix (51%) create mode 100644 system/nixos/modules/services/ssh/default.nix rename system/{ => nixos}/modules/services/syncthing/default.nix (100%) rename system/{ => nixos}/modules/services/tlp/default.nix (76%) rename system/{ => nixos}/modules/services/udev/default.nix (100%) rename system/{ => nixos}/modules/services/unbound/default.nix (100%) rename system/{ => nixos}/modules/services/xserver/default.nix (100%) create mode 100644 system/nixos/modules/services/yggdrasil/default.nix rename system/{ => nixos}/modules/services/zram/default.nix (100%) rename system/{ => nixos}/modules/sound/default.nix (100%) rename system/{ => nixos}/modules/timedate/default.nix (100%) rename system/{ => nixos}/modules/users/default.nix (97%) rename system/{ => nixos}/modules/variables/default.nix (100%) rename system/{ => nixos}/modules/virtualization/default.nix (100%) rename system/{ => nixos}/modules/zapret/default.nix (100%) rename system/{ => nixos}/overlays/vaapiIntel/default.nix (100%) diff --git a/system/modules/default.nix b/system/modules/default.nix deleted file mode 100644 index 15d4a0b..0000000 --- a/system/modules/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ systemModules -, lib -, ... -}: - -{ - # Read all directories from systemModules - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${systemModules}/${module}") (builtins.attrNames (builtins.readDir systemModules)) - ); -} - diff --git a/system/nixos/modules/binfmt/default.nix b/system/nixos/modules/binfmt/default.nix new file mode 100644 index 0000000..b87a5c9 --- /dev/null +++ b/system/nixos/modules/binfmt/default.nix @@ -0,0 +1,19 @@ +{ config +, lib +, ... +}: + +with lib; + +let + cfg = config.module.binfmt; +in { + options.module.binfmt = { + enable = mkEnableOption "Enable module binfmt"; + }; + + config = mkIf cfg.enable { + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + }; +} + diff --git a/system/modules/bluetooth/default.nix b/system/nixos/modules/bluetooth/default.nix similarity index 100% rename from system/modules/bluetooth/default.nix rename to system/nixos/modules/bluetooth/default.nix diff --git a/system/modules/boot/default.nix b/system/nixos/modules/boot/default.nix similarity index 100% rename from system/modules/boot/default.nix rename to system/nixos/modules/boot/default.nix diff --git a/system/nixos/modules/default.nix b/system/nixos/modules/default.nix new file mode 100644 index 0000000..0e85eed --- /dev/null +++ b/system/nixos/modules/default.nix @@ -0,0 +1,14 @@ +{ self +, lib +, ... +}: + +let + modules = "${self}/system/nixos/modules"; +in { + # Read all directories from modules + imports = builtins.filter (module: lib.pathIsDirectory module) ( + map (module: "${modules}/${module}") (builtins.attrNames (builtins.readDir modules)) + ); +} + diff --git a/system/modules/lanzaboot/default.nix b/system/nixos/modules/lanzaboot/default.nix similarity index 100% rename from system/modules/lanzaboot/default.nix rename to system/nixos/modules/lanzaboot/default.nix diff --git a/system/modules/locales/default.nix b/system/nixos/modules/locales/default.nix similarity index 100% rename from system/modules/locales/default.nix rename to system/nixos/modules/locales/default.nix diff --git a/system/modules/minimal/default.nix b/system/nixos/modules/minimal/default.nix similarity index 100% rename from system/modules/minimal/default.nix rename to system/nixos/modules/minimal/default.nix diff --git a/system/modules/network/default.nix b/system/nixos/modules/network/default.nix similarity index 79% rename from system/modules/network/default.nix rename to system/nixos/modules/network/default.nix index 1f373b6..d177596 100644 --- a/system/modules/network/default.nix +++ b/system/nixos/modules/network/default.nix @@ -10,14 +10,22 @@ let cfg = config.module.network; in { options = { - module.network.enable = mkEnableOption "Enables network"; + module.network = { + enable = mkEnableOption "Enables network"; + }; }; config = mkIf cfg.enable { systemd.services.NetworkManager-wait-online.enable = false; systemd.services.systemd-networkd-wait-online.enable = mkForce false; + systemd.network.enable = true; + networking = { + firewall = { + enable = true; + }; + networkmanager = { enable = true; wifi.macAddress = "random"; diff --git a/system/nixos/modules/nix/default.nix b/system/nixos/modules/nix/default.nix new file mode 100644 index 0000000..de1257f --- /dev/null +++ b/system/nixos/modules/nix/default.nix @@ -0,0 +1,13 @@ +{ config +, lib +, ... +}: + +{ + nix = { + gc = { + automatic = !config.programs.nh.enable; + options = "--delete-older-than 14d"; + }; + }; +} diff --git a/system/modules/nixos-ng/default.nix b/system/nixos/modules/nixos-ng/default.nix similarity index 100% rename from system/modules/nixos-ng/default.nix rename to system/nixos/modules/nixos-ng/default.nix diff --git a/system/modules/pihole/default.nix b/system/nixos/modules/pihole/default.nix similarity index 100% rename from system/modules/pihole/default.nix rename to system/nixos/modules/pihole/default.nix diff --git a/system/modules/plymouth/default.nix b/system/nixos/modules/plymouth/default.nix similarity index 100% rename from system/modules/plymouth/default.nix rename to system/nixos/modules/plymouth/default.nix diff --git a/system/modules/programs/dconf/default.nix b/system/nixos/modules/programs/dconf/default.nix similarity index 100% rename from system/modules/programs/dconf/default.nix rename to system/nixos/modules/programs/dconf/default.nix diff --git a/system/modules/programs/default.nix b/system/nixos/modules/programs/default.nix similarity index 76% rename from system/modules/programs/default.nix rename to system/nixos/modules/programs/default.nix index 3f147ca..7918f9c 100644 --- a/system/modules/programs/default.nix +++ b/system/nixos/modules/programs/default.nix @@ -1,10 +1,10 @@ -{ systemModules +{ self , lib , ... }: let - hostProgramModulesPath = "${systemModules}/programs"; + hostProgramModulesPath = "${self}/system/nixos/modules/programs"; in { # Import all program modules imports = builtins.filter (module: lib.pathIsDirectory module) ( diff --git a/system/modules/programs/fish/default.nix b/system/nixos/modules/programs/fish/default.nix similarity index 100% rename from system/modules/programs/fish/default.nix rename to system/nixos/modules/programs/fish/default.nix diff --git a/system/modules/programs/gnupg/default.nix b/system/nixos/modules/programs/gnupg/default.nix similarity index 100% rename from system/modules/programs/gnupg/default.nix rename to system/nixos/modules/programs/gnupg/default.nix diff --git a/system/modules/programs/home-manager/default.nix b/system/nixos/modules/programs/home-manager/default.nix similarity index 100% rename from system/modules/programs/home-manager/default.nix rename to system/nixos/modules/programs/home-manager/default.nix diff --git a/system/modules/programs/kdeconnect/default.nix b/system/nixos/modules/programs/kdeconnect/default.nix similarity index 100% rename from system/modules/programs/kdeconnect/default.nix rename to system/nixos/modules/programs/kdeconnect/default.nix diff --git a/system/modules/programs/mtr/default.nix b/system/nixos/modules/programs/mtr/default.nix similarity index 100% rename from system/modules/programs/mtr/default.nix rename to system/nixos/modules/programs/mtr/default.nix diff --git a/system/modules/programs/nix-helper/default.nix b/system/nixos/modules/programs/nix-helper/default.nix similarity index 100% rename from system/modules/programs/nix-helper/default.nix rename to system/nixos/modules/programs/nix-helper/default.nix diff --git a/system/modules/programs/systemPackages/default.nix b/system/nixos/modules/programs/systemPackages/default.nix similarity index 92% rename from system/modules/programs/systemPackages/default.nix rename to system/nixos/modules/programs/systemPackages/default.nix index 9a9385e..e426cab 100644 --- a/system/modules/programs/systemPackages/default.nix +++ b/system/nixos/modules/programs/systemPackages/default.nix @@ -16,7 +16,9 @@ in { config = mkIf cfg.enable { fonts.packages = with pkgs; [ - (nerdfonts.override { fonts = [ "JetBrainsMono" "UbuntuMono" ]; }) + nerd-fonts.jetbrains-mono + nerd-fonts.ubuntu-mono + nerd-fonts.iosevka corefonts ]; diff --git a/system/modules/programs/xdg-portal/default.nix b/system/nixos/modules/programs/xdg-portal/default.nix similarity index 100% rename from system/modules/programs/xdg-portal/default.nix rename to system/nixos/modules/programs/xdg-portal/default.nix diff --git a/system/modules/programs/zsh/default.nix b/system/nixos/modules/programs/zsh/default.nix similarity index 100% rename from system/modules/programs/zsh/default.nix rename to system/nixos/modules/programs/zsh/default.nix diff --git a/system/modules/security/default.nix b/system/nixos/modules/security/default.nix similarity index 100% rename from system/modules/security/default.nix rename to system/nixos/modules/security/default.nix diff --git a/system/modules/services/adguard-home/default.nix b/system/nixos/modules/services/adguard-home/default.nix similarity index 100% rename from system/modules/services/adguard-home/default.nix rename to system/nixos/modules/services/adguard-home/default.nix diff --git a/system/modules/services/bolt/default.nix b/system/nixos/modules/services/bolt/default.nix similarity index 100% rename from system/modules/services/bolt/default.nix rename to system/nixos/modules/services/bolt/default.nix diff --git a/system/modules/services/cpu-autofreq/default.nix b/system/nixos/modules/services/cpu-autofreq/default.nix similarity index 100% rename from system/modules/services/cpu-autofreq/default.nix rename to system/nixos/modules/services/cpu-autofreq/default.nix diff --git a/system/modules/services/default.nix b/system/nixos/modules/services/default.nix similarity index 74% rename from system/modules/services/default.nix rename to system/nixos/modules/services/default.nix index 7d5e1d9..c01cc14 100644 --- a/system/modules/services/default.nix +++ b/system/nixos/modules/services/default.nix @@ -1,10 +1,10 @@ -{ systemModules +{ self , lib , ... }: let - hostServicesModulesPath = "${systemModules}/services"; + hostServicesModulesPath = "${self}/system/nixos/modules/services"; in { imports = builtins.filter (module: lib.pathIsDirectory module) ( map (module: "${hostServicesModulesPath}/${module}") (builtins.attrNames (builtins.readDir hostServicesModulesPath)) diff --git a/system/modules/services/fwupd/default.nix b/system/nixos/modules/services/fwupd/default.nix similarity index 100% rename from system/modules/services/fwupd/default.nix rename to system/nixos/modules/services/fwupd/default.nix diff --git a/system/modules/services/greetd/default.nix b/system/nixos/modules/services/greetd/default.nix similarity index 100% rename from system/modules/services/greetd/default.nix rename to system/nixos/modules/services/greetd/default.nix diff --git a/system/modules/services/homepage-dashboard/default.nix b/system/nixos/modules/services/homepage-dashboard/default.nix similarity index 100% rename from system/modules/services/homepage-dashboard/default.nix rename to system/nixos/modules/services/homepage-dashboard/default.nix diff --git a/system/modules/services/hyprland/default.nix b/system/nixos/modules/services/hyprland/default.nix similarity index 100% rename from system/modules/services/hyprland/default.nix rename to system/nixos/modules/services/hyprland/default.nix diff --git a/system/modules/services/netbird/default.nix b/system/nixos/modules/services/netbird/default.nix similarity index 100% rename from system/modules/services/netbird/default.nix rename to system/nixos/modules/services/netbird/default.nix diff --git a/system/modules/services/ollama/default.nix b/system/nixos/modules/services/ollama/default.nix similarity index 100% rename from system/modules/services/ollama/default.nix rename to system/nixos/modules/services/ollama/default.nix diff --git a/system/modules/services/polkit/default.nix b/system/nixos/modules/services/polkit/default.nix similarity index 100% rename from system/modules/services/polkit/default.nix rename to system/nixos/modules/services/polkit/default.nix diff --git a/system/modules/services/printing/default.nix b/system/nixos/modules/services/printing/default.nix similarity index 100% rename from system/modules/services/printing/default.nix rename to system/nixos/modules/services/printing/default.nix diff --git a/system/nixos/modules/services/proxmox-ve/default.nix b/system/nixos/modules/services/proxmox-ve/default.nix new file mode 100644 index 0000000..e8eb6cb --- /dev/null +++ b/system/nixos/modules/services/proxmox-ve/default.nix @@ -0,0 +1,21 @@ +{ config +, lib +, ... +}: + +with lib; + +let + cfg = config.module.services.proxmox-ve; +in { + options.module.services.proxmox-ve = { + enable = mkEnableOption "Enable module proxmox-ve"; + }; + + config = mkIf cfg.enable { + services.proxmox-ve = { + enable = true; + }; + }; +} + diff --git a/system/modules/services/qmk/default.nix b/system/nixos/modules/services/qmk/default.nix similarity index 100% rename from system/modules/services/qmk/default.nix rename to system/nixos/modules/services/qmk/default.nix diff --git a/system/modules/chaotic/default.nix b/system/nixos/modules/services/scx/default.nix similarity index 51% rename from system/modules/chaotic/default.nix rename to system/nixos/modules/services/scx/default.nix index 27056c2..28bcda8 100644 --- a/system/modules/chaotic/default.nix +++ b/system/nixos/modules/services/scx/default.nix @@ -6,11 +6,11 @@ with lib; let - cfg = config.module.chaotic; + cfg = config.module.services.scx; in { options = { - module.chaotic = { - enable = mkEnableOption "Enables chaotic module"; + module.services.scx = { + enable = mkEnableOption "Enables scx module"; schedulerType = mkOption { type = types.str; @@ -20,8 +20,10 @@ in { }; config = mkIf cfg.enable { - chaotic.scx.enable = true; - chaotic.scx.scheduler = cfg.schedulerType; + services.scx = { + enable = true; + scheduler = cfg.schedulerType; + }; }; } diff --git a/system/nixos/modules/services/ssh/default.nix b/system/nixos/modules/services/ssh/default.nix new file mode 100644 index 0000000..d612170 --- /dev/null +++ b/system/nixos/modules/services/ssh/default.nix @@ -0,0 +1,44 @@ +{ config +, lib +, ... +}: + +with lib; + +let + cfg = config.module.services.ssh; +in { + options.module.services.ssh = { + enable = mkEnableOption "Enable module"; + + listenAddresses = lib.mkOption { + type = lib.types.listOf lib.types.attrs; + default = [ { addr = "0.0.0.0"; port = 2222; } ]; + description = '' + Specifies on which ports and addreses the SSH daemon listens. + ''; + }; + }; + + config = mkIf cfg.enable { + networking.firewall.allowedTCPPorts = [ + 22 + ] ++ (lib.zipAttrs cfg.listenAddresses).port; + + services.endlessh-go = { + enable = true; + port = 22; + }; + + services.openssh = { + inherit (cfg) listenAddresses; + enable = true; + + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = true; + }; + }; + }; +} + diff --git a/system/modules/services/syncthing/default.nix b/system/nixos/modules/services/syncthing/default.nix similarity index 100% rename from system/modules/services/syncthing/default.nix rename to system/nixos/modules/services/syncthing/default.nix diff --git a/system/modules/services/tlp/default.nix b/system/nixos/modules/services/tlp/default.nix similarity index 76% rename from system/modules/services/tlp/default.nix rename to system/nixos/modules/services/tlp/default.nix index ed73aaa..aab6d46 100644 --- a/system/modules/services/tlp/default.nix +++ b/system/nixos/modules/services/tlp/default.nix @@ -17,14 +17,6 @@ in { enable = true; settings = { - /* - CPU_SCALING_GOVERNOR_ON_AC = "performance"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - - CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; - CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; - */ - PLATFORM_PROFILE_ON_AC = "performance"; PLATFORM_PROFILE_ON_BAT = "balanced"; diff --git a/system/modules/services/udev/default.nix b/system/nixos/modules/services/udev/default.nix similarity index 100% rename from system/modules/services/udev/default.nix rename to system/nixos/modules/services/udev/default.nix diff --git a/system/modules/services/unbound/default.nix b/system/nixos/modules/services/unbound/default.nix similarity index 100% rename from system/modules/services/unbound/default.nix rename to system/nixos/modules/services/unbound/default.nix diff --git a/system/modules/services/xserver/default.nix b/system/nixos/modules/services/xserver/default.nix similarity index 100% rename from system/modules/services/xserver/default.nix rename to system/nixos/modules/services/xserver/default.nix diff --git a/system/nixos/modules/services/yggdrasil/default.nix b/system/nixos/modules/services/yggdrasil/default.nix new file mode 100644 index 0000000..6dcf1fe --- /dev/null +++ b/system/nixos/modules/services/yggdrasil/default.nix @@ -0,0 +1,31 @@ +{ config +, lib +, ... +}: + +with lib; + +let + cfg = config.module.services.yggdrasil; +in { + options.module.services.yggdrasil = { + enable = mkEnableOption "Enable module yggdrasil"; + }; + + config = mkIf cfg.enable { + services.yggdrasil = { + enable = true; + persistentKeys = true; + + settings = { + IfName = "ygg0"; + Peers = [ + "tls://188.225.9.167:18227" + "tls://45.147.200.202:443" + "tls://45.95.202.21:443" + ]; + }; + }; + }; +} + diff --git a/system/modules/services/zram/default.nix b/system/nixos/modules/services/zram/default.nix similarity index 100% rename from system/modules/services/zram/default.nix rename to system/nixos/modules/services/zram/default.nix diff --git a/system/modules/sound/default.nix b/system/nixos/modules/sound/default.nix similarity index 100% rename from system/modules/sound/default.nix rename to system/nixos/modules/sound/default.nix diff --git a/system/modules/timedate/default.nix b/system/nixos/modules/timedate/default.nix similarity index 100% rename from system/modules/timedate/default.nix rename to system/nixos/modules/timedate/default.nix diff --git a/system/modules/users/default.nix b/system/nixos/modules/users/default.nix similarity index 97% rename from system/modules/users/default.nix rename to system/nixos/modules/users/default.nix index d7468ef..71e12c6 100644 --- a/system/modules/users/default.nix +++ b/system/nixos/modules/users/default.nix @@ -42,6 +42,7 @@ in { "wheel" "docker" "libvirtd" + "yggdrasil" ]; }; diff --git a/system/modules/variables/default.nix b/system/nixos/modules/variables/default.nix similarity index 100% rename from system/modules/variables/default.nix rename to system/nixos/modules/variables/default.nix diff --git a/system/modules/virtualization/default.nix b/system/nixos/modules/virtualization/default.nix similarity index 100% rename from system/modules/virtualization/default.nix rename to system/nixos/modules/virtualization/default.nix diff --git a/system/modules/zapret/default.nix b/system/nixos/modules/zapret/default.nix similarity index 100% rename from system/modules/zapret/default.nix rename to system/nixos/modules/zapret/default.nix diff --git a/system/overlays/vaapiIntel/default.nix b/system/nixos/overlays/vaapiIntel/default.nix similarity index 100% rename from system/overlays/vaapiIntel/default.nix rename to system/nixos/overlays/vaapiIntel/default.nix From 51a6679ff798c79f2e3d899c60aef9d6ebd4634d Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:19:05 +0300 Subject: [PATCH 039/103] system: Rewrite machine constructor --- system/default.nix | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/system/default.nix b/system/default.nix index 641b3de..891b5c3 100644 --- a/system/default.nix +++ b/system/default.nix @@ -1,46 +1,35 @@ -{ lib +{ self +, lib , inputs -, self -, commonModules -, systemModules -, machineConfigurationPath -, machineConfigurationPathExist -, machineModulesPath -, machineModulesPathExist +, machineDir , platform ? null , stateVersion ? null , ... }: -{ +let + machineConfigurationPath = "${self}/system/machine/${machineDir}"; + machineConfigurationPathExist = builtins.pathExists machineConfigurationPath; + machineModulesPath = "${self}/system/machine/${machineDir}/modules"; + machineModulesPathExist = builtins.pathExists machineModulesPath; +in { imports = [ - inputs.home-manager.nixosModules.home-manager - inputs.stylix.nixosModules.stylix - inputs.impermanence.nixosModules.impermanence - inputs.disko.nixosModules.disko - inputs.lanzaboote.nixosModules.lanzaboote - inputs.chaotic.nixosModules.default - inputs.nix-topology.nixosModules.default - inputs.nur.nixosModules.nur - - "${commonModules}" - "${systemModules}" + "${self}/modules" "${self}/overlays/nixpkgs" ] ++ lib.optional machineConfigurationPathExist machineConfigurationPath ++ lib.optional machineModulesPathExist machineModulesPath; module.nix-config.enable = true; - - # System version system = { inherit stateVersion; }; - # HostPlatform + nixpkgs = { + hostPlatform = platform; + overlays = [ inputs.nix-topology.overlays.default + inputs.proxmox-nixos.overlays.${platform} ]; - - hostPlatform = platform; }; } From bee7ee83c38534892649827f58c9ea339fe59a25 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:19:27 +0300 Subject: [PATCH 040/103] lib: Rewrite mk functions --- lib/default.nix | 68 +++++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index 26da2ad..2ddfaf7 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -4,28 +4,19 @@ }: let - homeConfiguration = "${self}/home"; - systemConfiguration = "${self}/system"; - - homeModules = "${homeConfiguration}/modules"; - systemModules = "${systemConfiguration}/modules"; - commonModules = "${self}/modules"; + defaultStateVersion = "24.11"; # Helper function for generating host configs mkHost = machineDir: { username ? "user" - , stateVersion ? "24.05" + , stateVersion ? defaultStateVersion + , hmStateVersion ? stateVersion , platform ? "x86_64-linux" , hostname ? machineDir , isWorkstation ? false , wm ? null }: let - machineConfigurationPath = "${self}/system/machine/${machineDir}"; - machineConfigurationPathExist = builtins.pathExists machineConfigurationPath; - machineModulesPath = "${self}/system/machine/${machineDir}/modules"; - machineModulesPathExist = builtins.pathExists machineModulesPath; - swayEnable = wm == "sway"; hyprlandEnable = wm == "hyprland"; wmEnable = hyprlandEnable || swayEnable; @@ -37,35 +28,49 @@ let hostname username stateVersion + hmStateVersion platform machineDir isWorkstation wm - homeModules - commonModules - systemModules - machineConfigurationPath - machineConfigurationPathExist - machineModulesPath - machineModulesPathExist hyprlandEnable swayEnable wmEnable; }; modules = [ - "${systemConfiguration}" - "${homeConfiguration}" + inputs.home-manager.nixosModules.home-manager + inputs.stylix.nixosModules.stylix + inputs.impermanence.nixosModules.impermanence + inputs.disko.nixosModules.disko + inputs.lanzaboote.nixosModules.lanzaboote + inputs.chaotic.nixosModules.default + inputs.nix-topology.nixosModules.default + inputs.nur.modules.nixos.default + inputs.proxmox-nixos.nixosModules.proxmox-ve + inputs.sops-nix.nixosModules.sops + + "${self}/system/nixos/modules" + "${self}/system" + "${self}/home" ]; }; # Helper function for generating darwin host configs - mkHostDarwin = hostname: + mkHostDarwin = machineDir: { username ? "user" , stateVersion ? 6 + , hmStateVersion ? defaultStateVersion + , hostname ? machineDir , platform ? "aarch64-darwin" + , isWorkstation ? false + , wm ? null }: - inputs.darwin.lib.darwinSystem { + let + swayEnable = wm == "sway"; + hyprlandEnable = wm == "hyprland"; + wmEnable = hyprlandEnable || swayEnable; + in inputs.darwin.lib.darwinSystem { specialArgs = { inherit inputs @@ -73,14 +78,23 @@ let hostname username platform + isWorkstation + machineDir stateVersion - systemModules - commonModules; + hmStateVersion + wm + hyprlandEnable + swayEnable + wmEnable; }; modules = [ - "${systemConfiguration}" - "${homeConfiguration}" + inputs.home-manager.darwinModules.home-manager + inputs.stylix.darwinModules.stylix + + "${self}/system/darwin/modules" + "${self}/system" + "${self}/home" ]; }; in { From d93fb5011903e47bde1a309b1201cd9ded494d98 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:19:50 +0300 Subject: [PATCH 041/103] system/machine/macbox: Add user fix fonts --- system/machine/macbox/default.nix | 15 ++++++++++++++- system/machine/macbox/modules/default.nix | 4 ++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 system/machine/macbox/modules/default.nix diff --git a/system/machine/macbox/default.nix b/system/machine/macbox/default.nix index 2b1b0b1..2ce3dbe 100644 --- a/system/machine/macbox/default.nix +++ b/system/machine/macbox/default.nix @@ -1,17 +1,30 @@ { inputs , pkgs +, username , ... }: { + module = { + stylix.enable = true; + }; + environment.systemPackages = with pkgs; [ vim neovim home-manager - nerdfonts + nerd-fonts.jetbrains-mono + nerd-fonts.ubuntu-mono + nerd-fonts.iosevka alacritty ]; + users.users.${username} = { + name = username; + home = "/Users/${username}"; + description = username; + }; + services.nix-daemon.enable = true; # nix.package = pkgs.nix; diff --git a/system/machine/macbox/modules/default.nix b/system/machine/macbox/modules/default.nix new file mode 100644 index 0000000..9a6c1d4 --- /dev/null +++ b/system/machine/macbox/modules/default.nix @@ -0,0 +1,4 @@ +_: + +{} + From 52e32a0e407a2ee8a23d34c08a991441c1e4e2a6 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:20:04 +0300 Subject: [PATCH 042/103] system/machine/nbox: Fix paths --- system/machine/nbox/modules/hardware/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/system/machine/nbox/modules/hardware/default.nix b/system/machine/nbox/modules/hardware/default.nix index d1c7aa5..9d4d1eb 100644 --- a/system/machine/nbox/modules/hardware/default.nix +++ b/system/machine/nbox/modules/hardware/default.nix @@ -1,10 +1,11 @@ -{ lib -, machineModulesPath +{ self +, lib +, machineDir , ... }: let - hardwareModulesPath = "${machineModulesPath}/hardware"; + hardwareModulesPath = "${self}/system/machine/${machineDir}/modules/hardware"; in { imports = builtins.filter (module: lib.pathIsDirectory module) ( map (module: "${hardwareModulesPath}/${module}") (builtins.attrNames (builtins.readDir hardwareModulesPath)) From 5a84632f2d34ef44120d85bee1caf56b3251ca8d Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:20:09 +0300 Subject: [PATCH 043/103] system/machine/nbox: Fix paths --- system/machine/nbox/modules/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/system/machine/nbox/modules/default.nix b/system/machine/nbox/modules/default.nix index 9084898..1d3d6bd 100644 --- a/system/machine/nbox/modules/default.nix +++ b/system/machine/nbox/modules/default.nix @@ -1,11 +1,14 @@ -{ lib -, machineModulesPath +{ self +, lib +, machineDir , ... }: -{ +let + modules = "${self}/system/machine/${machineDir}/modules"; +in { imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${machineModulesPath}/${module}") (builtins.attrNames (builtins.readDir machineModulesPath)) + map (module: "${modules}/${module}") (builtins.attrNames (builtins.readDir modules)) ); } From 0a2615b0040eb3f34ff40fe0eb627a8cece834de Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:20:22 +0300 Subject: [PATCH 044/103] system/machine/nbox: Add binfmt module. Rename chaotic --- system/machine/nbox/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/system/machine/nbox/default.nix b/system/machine/nbox/default.nix index 724082d..5a8a309 100644 --- a/system/machine/nbox/default.nix +++ b/system/machine/nbox/default.nix @@ -15,16 +15,11 @@ _: minimal.enable = true; nixos-ng.enable = true; plymouth.enable = true; - - chaotic = { - enable = true; - schedulerType = "scx_bpfland"; - }; + binfmt.enable = true; security = { enable = true; enableBootOptions = true; - disableIPV6 = true; }; services = { @@ -39,6 +34,11 @@ _: greetd.enable = true; ollama.enable = true; netbird.enable = true; + + scx = { + enable = true; + schedulerType = "scx_bpfland"; + }; }; programs = { From dcac9297dffc4239902dac2a2abbcca73adf78ea Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:20:40 +0300 Subject: [PATCH 045/103] system/machine/rasp: Fix paths --- system/machine/rasp/modules/hardware/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/machine/rasp/modules/hardware/default.nix b/system/machine/rasp/modules/hardware/default.nix index f173a87..8a74526 100644 --- a/system/machine/rasp/modules/hardware/default.nix +++ b/system/machine/rasp/modules/hardware/default.nix @@ -1,12 +1,12 @@ { self , lib -, hostname +, machineDir , pkgs , ... }: let - machineHardwareModulesPath = "${self}/system/machine/${hostname}/modules/hardware"; + machineHardwareModulesPath = "${self}/system/machine/${machineDir}/modules/hardware"; in { imports = builtins.filter (module: lib.pathIsDirectory module) ( map (module: "${machineHardwareModulesPath}/${module}") (builtins.attrNames (builtins.readDir machineHardwareModulesPath)) From 3835f82730e61868f2cb41e765a4971e41e49b87 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:20:43 +0300 Subject: [PATCH 046/103] system/machine/rasp: Fix paths --- system/machine/rasp/modules/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/system/machine/rasp/modules/default.nix b/system/machine/rasp/modules/default.nix index 9084898..1d3d6bd 100644 --- a/system/machine/rasp/modules/default.nix +++ b/system/machine/rasp/modules/default.nix @@ -1,11 +1,14 @@ -{ lib -, machineModulesPath +{ self +, lib +, machineDir , ... }: -{ +let + modules = "${self}/system/machine/${machineDir}/modules"; +in { imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${machineModulesPath}/${module}") (builtins.attrNames (builtins.readDir machineModulesPath)) + map (module: "${modules}/${module}") (builtins.attrNames (builtins.readDir modules)) ); } From 08dc6f9f445487b803099104a3504fbb68a203dd Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:21:01 +0300 Subject: [PATCH 047/103] system/machine/pcbox: Add ygg in impermanence --- system/machine/pcbox/modules/hardware/impermanence/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/system/machine/pcbox/modules/hardware/impermanence/default.nix b/system/machine/pcbox/modules/hardware/impermanence/default.nix index 781fc7c..87422b3 100644 --- a/system/machine/pcbox/modules/hardware/impermanence/default.nix +++ b/system/machine/pcbox/modules/hardware/impermanence/default.nix @@ -26,6 +26,7 @@ _: "/var/lib/iwd" "/var/lib/libvirt" "/var/lib/systemd" + "/var/lib/private/yggdrasil" ]; files = [ From 052ea912c78d1c4cccbab5d478d0f51251707eb7 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:21:17 +0300 Subject: [PATCH 048/103] system/machine/pcbox: Remove legacy --- .../pcbox/modules/hardware/extra-hardware/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/system/machine/pcbox/modules/hardware/extra-hardware/default.nix b/system/machine/pcbox/modules/hardware/extra-hardware/default.nix index 898b50b..9cf4c7a 100644 --- a/system/machine/pcbox/modules/hardware/extra-hardware/default.nix +++ b/system/machine/pcbox/modules/hardware/extra-hardware/default.nix @@ -1,16 +1,12 @@ -{ lib -, pkgs -, config +{ pkgs , ... }: { - # Extra drivers settings hardware = { enableAllFirmware = true; cpu.amd.updateMicrocode = true; enableRedistributableFirmware = true; - cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; firmware = with pkgs; [ linux-firmware From a6c903b5eb66416423d1ac1a793ad1dc9263cdb9 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:21:24 +0300 Subject: [PATCH 049/103] system/machine/pcbox: Change to amd --- system/machine/pcbox/modules/hardware/kernel/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/system/machine/pcbox/modules/hardware/kernel/default.nix b/system/machine/pcbox/modules/hardware/kernel/default.nix index 92b536e..36d84d9 100644 --- a/system/machine/pcbox/modules/hardware/kernel/default.nix +++ b/system/machine/pcbox/modules/hardware/kernel/default.nix @@ -1,4 +1,5 @@ { pkgs +, config , ... }: @@ -10,9 +11,12 @@ "amdgpu" "kvm-amd" "kvm-intel" + "zenpower" ]; - extraModulePackages = [ ]; + extraModulePackages = [ + config.boot.kernelPackages.zenpower + ]; kernelParams = [ "drm_kms_helper.poll=0" From e268b832c42f96b6fff5bb659cb1a0e48363f101 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:21:31 +0300 Subject: [PATCH 050/103] system/machine/pcbox: Some edits --- system/machine/pcbox/modules/hardware/network/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/system/machine/pcbox/modules/hardware/network/default.nix b/system/machine/pcbox/modules/hardware/network/default.nix index f066169..fb54940 100644 --- a/system/machine/pcbox/modules/hardware/network/default.nix +++ b/system/machine/pcbox/modules/hardware/network/default.nix @@ -5,7 +5,6 @@ _: enable = true; networks.eth0 = { - matchConfig.Name = "enp0s31f6"; address = [ "192.168.1.50/24" ]; dns = [ "192.168.1.8" ]; }; @@ -28,7 +27,7 @@ _: allowedTCPPortRanges = [ { from = 1714; to = 1764; } # KDE Connect ]; - + allowedUDPPortRanges = [ { from = 1714; to = 1764; } # KDE Connect ]; From e9d87cd6a68a2a8a5ebf227d5ddb8014fa4785bf Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:21:36 +0300 Subject: [PATCH 051/103] system/machine/pcbox: Fix paths --- system/machine/pcbox/modules/hardware/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/system/machine/pcbox/modules/hardware/default.nix b/system/machine/pcbox/modules/hardware/default.nix index d1c7aa5..4ab07fa 100644 --- a/system/machine/pcbox/modules/hardware/default.nix +++ b/system/machine/pcbox/modules/hardware/default.nix @@ -1,10 +1,11 @@ -{ lib -, machineModulesPath +{ self +, machineDir +, lib , ... }: let - hardwareModulesPath = "${machineModulesPath}/hardware"; + hardwareModulesPath = "${self}/system/machine/${machineDir}/modules/hardware"; in { imports = builtins.filter (module: lib.pathIsDirectory module) ( map (module: "${hardwareModulesPath}/${module}") (builtins.attrNames (builtins.readDir hardwareModulesPath)) From 8ff10ea1876477f377de46e8a1461dec76342c69 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:21:39 +0300 Subject: [PATCH 052/103] system/machine/pcbox: Fix paths --- system/machine/pcbox/modules/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/system/machine/pcbox/modules/default.nix b/system/machine/pcbox/modules/default.nix index 9084898..2d42d74 100644 --- a/system/machine/pcbox/modules/default.nix +++ b/system/machine/pcbox/modules/default.nix @@ -1,11 +1,14 @@ -{ lib -, machineModulesPath +{ self +, machineDir +, lib , ... }: -{ +let + modules = "${self}/system/machine/${machineDir}/modules"; +in { imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${machineModulesPath}/${module}") (builtins.attrNames (builtins.readDir machineModulesPath)) + map (module: "${modules}/${module}") (builtins.attrNames (builtins.readDir modules)) ); } From 748a4623aadc321a8e8cc26c53d876270216ad87 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:21:51 +0300 Subject: [PATCH 053/103] system/machine/pcbox: Enable some modules --- system/machine/pcbox/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/system/machine/pcbox/default.nix b/system/machine/pcbox/default.nix index 3086a77..c8e15f1 100644 --- a/system/machine/pcbox/default.nix +++ b/system/machine/pcbox/default.nix @@ -17,16 +17,11 @@ minimal.enable = true; nixos-ng.enable = true; plymouth.enable = true; - - chaotic = { - enable = true; - schedulerType = "scx_bpfland"; - }; + binfmt.enable = true; security = { enable = true; enableBootOptions = true; - disableIPV6 = true; }; services = { @@ -39,6 +34,13 @@ greetd.enable = true; qmk.enable = true; netbird.enable = true; + yggdrasil.enable = true; + zram.enable = true; + + scx = { + enable = true; + schedulerType = "scx_bpfland"; + }; ollama = { enable = true; From 3a30bd1296cb500a9101e8e94bcad6de9a1503e9 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Sun, 15 Dec 2024 19:21:58 +0300 Subject: [PATCH 054/103] flake: Update lock --- flake.lock | 653 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 423 insertions(+), 230 deletions(-) diff --git a/flake.lock b/flake.lock index c6d5bce..cf99205 100644 --- a/flake.lock +++ b/flake.lock @@ -57,11 +57,11 @@ "fromYaml": "fromYaml" }, "locked": { - "lastModified": 1708890466, - "narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", + "lastModified": 1732200724, + "narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=", "owner": "SenchoPens", "repo": "base16.nix", - "rev": "665b3c6748534eb766c777298721cece9453fdae", + "rev": "153d52373b0fb2d343592871009a286ec8837aec", "type": "github" }, "original": { @@ -105,11 +105,11 @@ "base16-vim": { "flake": false, "locked": { - "lastModified": 1716150083, - "narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=", + "lastModified": 1731949548, + "narHash": "sha256-XIDexXM66sSh5j/x70e054BnUsviibUShW7XhbDGhYo=", "owner": "tinted-theming", "repo": "base16-vim", - "rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d", + "rev": "61165b1632409bd55e530f3dbdd4477f011cadc6", "type": "github" }, "original": { @@ -120,18 +120,17 @@ }, "chaotic": { "inputs": { - "fenix": "fenix", "flake-schemas": "flake-schemas", "home-manager": "home-manager", "jovian": "jovian", "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1728001451, - "narHash": "sha256-Ost5YHSZZE4ZIKBcWsXC1c7g7n3kIqaNNjs5ula/lAI=", + "lastModified": 1733677156, + "narHash": "sha256-TSgU+M0Zm0PMnb6J/gOovC63wtqSbhgdmN7CucDO0oU=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "25f420d9cf70929455ba14642b92ae715ae8d792", + "rev": "354bcbbadbd00f5bda884bb2c119b7de63b197e9", "type": "github" }, "original": { @@ -174,6 +173,25 @@ "type": "github" } }, + "crane_2": { + "inputs": { + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1717383740, + "narHash": "sha256-559HbY4uhNeoYvK3H6AMZAtVfmR3y8plXZ1x6ON/cWU=", + "owner": "ipetkov", + "repo": "crane", + "rev": "b65673fce97d277934488a451724be94cc62499a", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "ref": "v0.17.3", + "repo": "crane", + "type": "github" + } + }, "cryptopro": { "inputs": { "dream2nix": "dream2nix", @@ -181,11 +199,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1725955099, - "narHash": "sha256-CcDATbwdZTOlm3/NLu2wJ5U//pErNCsz4sQOBpSdAQI=", + "lastModified": 1732095193, + "narHash": "sha256-GphS1owpRXYb/Khgrz2ySd0B5WdHoLbwM/5vtKk7ThY=", "owner": "SomeoneSerge", "repo": "pkgs", - "rev": "6942b3e69f4955effb7159b3af65b1ddbc88be8d", + "rev": "80b5de9f59fe00b28e6ac1338c1c6e4480e64e26", "type": "github" }, "original": { @@ -201,11 +219,11 @@ ] }, "locked": { - "lastModified": 1727999297, - "narHash": "sha256-LTJuQPCsSItZ/8TieFeP30iY+uaLoD0mT0tAj1gLeyQ=", + "lastModified": 1733570843, + "narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "8c8388ade72e58efdeae71b4cbb79e872c23a56b", + "rev": "a35b08d09efda83625bef267eb24347b446c80b8", "type": "github" }, "original": { @@ -217,18 +235,17 @@ }, "devshell": { "inputs": { - "flake-utils": "flake-utils_3", "nixpkgs": [ "nix-topology", "nixpkgs" ] }, "locked": { - "lastModified": 1713532798, - "narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=", + "lastModified": 1728330715, + "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", "owner": "numtide", "repo": "devshell", - "rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40", + "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", "type": "github" }, "original": { @@ -244,11 +261,11 @@ ] }, "locked": { - "lastModified": 1727977578, - "narHash": "sha256-DBORKcmQ7ZjA4qE1MsnF1MmZSokOGrw4W9vTCioOv2U=", + "lastModified": 1733168902, + "narHash": "sha256-8dupm9GfK+BowGdQd7EHK5V61nneLfr9xR6sc5vtDi0=", "owner": "nix-community", "repo": "disko", - "rev": "574400001b3ffe555c7a21e0ff846230759be2ed", + "rev": "785c1e02c7e465375df971949b8dcbde9ec362e5", "type": "github" }, "original": { @@ -267,11 +284,11 @@ "pyproject-nix": "pyproject-nix" }, "locked": { - "lastModified": 1704534571, - "narHash": "sha256-4CqLjWFGXZn7DgLCsFIjmU6lfdTXm3tiKzh5SNj5pdc=", + "lastModified": 1728585693, + "narHash": "sha256-rhx5SYpIkPu7d+rjF9FGGBVxS0BwAEkmYIsJg2a3E20=", "owner": "nix-community", "repo": "dream2nix", - "rev": "62f9486535d98ce862c78e1525b5c90fe6715a15", + "rev": "c6935471f7e1a9e190aaa9ac9823dca34e00d92a", "type": "github" }, "original": { @@ -280,29 +297,23 @@ "type": "github" } }, - "fenix": { - "inputs": { - "nixpkgs": [ - "chaotic", - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, + "flake-compat": { + "flake": false, "locked": { - "lastModified": 1727937235, - "narHash": "sha256-Ih4RD65WZZDgtla9Uh8zm6gQJ1zgkXkiU4HKtEwQjvI=", - "owner": "nix-community", - "repo": "fenix", - "rev": "381781f96b880c2ced9019a9e2406b31ccea82b4", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "fenix", + "owner": "edolstra", + "repo": "flake-compat", "type": "github" } }, - "flake-compat": { + "flake-compat_2": { "flake": false, "locked": { "lastModified": 1673956053, @@ -318,7 +329,7 @@ "type": "github" } }, - "flake-compat_2": { + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1696426674, @@ -334,14 +345,29 @@ "type": "github" } }, - "flake-compat_3": { + "flake-compat_4": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_5": { "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -357,11 +383,11 @@ ] }, "locked": { - "lastModified": 1727826117, - "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -391,6 +417,27 @@ "type": "github" } }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-schemas": { "locked": { "lastModified": 1721999734, @@ -425,14 +472,14 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "owner": "numtide", "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "type": "github" }, "original": { @@ -446,11 +493,11 @@ "systems": "systems_4" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", "type": "github" }, "original": { @@ -464,11 +511,11 @@ "systems": "systems_5" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { @@ -485,11 +532,11 @@ ] }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -500,7 +547,7 @@ }, "flake-utils_6": { "inputs": { - "systems": "systems_8" + "systems": "systems_9" }, "locked": { "lastModified": 1705309234, @@ -518,11 +565,11 @@ "fromYaml": { "flake": false, "locked": { - "lastModified": 1689549921, - "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", "owner": "SenchoPens", "repo": "fromYaml", - "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", "type": "github" }, "original": { @@ -534,11 +581,11 @@ "fzf-zsh-completions": { "flake": false, "locked": { - "lastModified": 1727968409, - "narHash": "sha256-QIRZShypkl1c7UAQHVKJWrjvlpuKae1aaZIApjisjGg=", + "lastModified": 1732180489, + "narHash": "sha256-yCTARZMiJzmdPChGRy84Rr/hP9B0yIDt5fZ3fjKHa3s=", "owner": "chitoku-k", "repo": "fzf-zsh-completions", - "rev": "8dde1cd4f006dc6c230e994f99e621ecef006ad6", + "rev": "4093db491207cd30b8780668cc2c1cbbac3a283e", "type": "github" }, "original": { @@ -547,6 +594,30 @@ "type": "github" } }, + "ghostty": { + "inputs": { + "nixpkgs-stable": [ + "nixpkgs" + ], + "nixpkgs-unstable": [ + "nixpkgs" + ], + "zig": "zig" + }, + "locked": { + "lastModified": 1733436494, + "narHash": "sha256-/h5pK2ysUhBNyqsD6w0ii3W4zhuAOQNIpd99Vac5nBY=", + "ref": "refs/heads/main", + "rev": "2fb92dd4aa75214c3bc58220fa7638b698dcace3", + "revCount": 8178, + "type": "git", + "url": "ssh://git@github.com/ghostty-org/ghostty" + }, + "original": { + "type": "git", + "url": "ssh://git@github.com/ghostty-org/ghostty" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -594,16 +665,16 @@ "gnome-shell": { "flake": false, "locked": { - "lastModified": 1713702291, - "narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=", + "lastModified": 1732369855, + "narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934", + "rev": "dadd58f630eeea41d645ee225a63f719390829dc", "type": "github" }, "original": { "owner": "GNOME", - "ref": "46.1", + "ref": "47.2", "repo": "gnome-shell", "type": "github" } @@ -616,11 +687,11 @@ ] }, "locked": { - "lastModified": 1727817100, - "narHash": "sha256-dlyV9/eiWkm/Y/t2+k4CFZ29tBvCANmJogEYaHeAOTw=", + "lastModified": 1733484277, + "narHash": "sha256-i5ay20XsvpW91N4URET/nOc0VQWOAd4c4vbqYtcH8Rc=", "owner": "nix-community", "repo": "home-manager", - "rev": "437ec62009fa8ceb684eb447d455ffba25911cf9", + "rev": "d00c6f6d0ad16d598bf7e2956f52c1d9d5de3c3a", "type": "github" }, "original": { @@ -636,11 +707,11 @@ ] }, "locked": { - "lastModified": 1727817100, - "narHash": "sha256-dlyV9/eiWkm/Y/t2+k4CFZ29tBvCANmJogEYaHeAOTw=", + "lastModified": 1733484277, + "narHash": "sha256-i5ay20XsvpW91N4URET/nOc0VQWOAd4c4vbqYtcH8Rc=", "owner": "nix-community", "repo": "home-manager", - "rev": "437ec62009fa8ceb684eb447d455ffba25911cf9", + "rev": "d00c6f6d0ad16d598bf7e2956f52c1d9d5de3c3a", "type": "github" }, "original": { @@ -657,11 +728,11 @@ ] }, "locked": { - "lastModified": 1724435763, - "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", + "lastModified": 1733085484, + "narHash": "sha256-dVmNuUajnU18oHzBQWZm1BQtANCHaqNuxTHZQ+GN0r8=", "owner": "nix-community", "repo": "home-manager", - "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", + "rev": "c1fee8d4a60b89cae12b288ba9dbc608ff298163", "type": "github" }, "original": { @@ -707,7 +778,7 @@ "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", "nixpkgs": "nixpkgs_4", - "systems": "systems_2", + "systems": "systems_3", "xdph": "xdph" }, "locked": { @@ -810,7 +881,7 @@ }, "hyprlang_2": { "inputs": { - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_11" }, "locked": { "lastModified": 1704287638, @@ -878,11 +949,11 @@ }, "impermanence": { "locked": { - "lastModified": 1727649413, - "narHash": "sha256-FA53of86DjFdeQzRDVtvgWF9o52rWK70VHGx0Y8fElQ=", + "lastModified": 1731242966, + "narHash": "sha256-B3C3JLbGw0FtLSWCjBxU961gLNv+BOOBC6WvstKLYMw=", "owner": "nix-community", "repo": "impermanence", - "rev": "d0b38e550039a72aff896ee65b0918e975e6d48e", + "rev": "3ed3f0eaae9fcc0a8331e77e9319c8a4abd8a71a", "type": "github" }, "original": { @@ -900,11 +971,11 @@ ] }, "locked": { - "lastModified": 1727865565, - "narHash": "sha256-SBcqfosxb0XlKdIz6QGXCnK4W/TEVHLDZHkRHZ8Me60=", + "lastModified": 1733491721, + "narHash": "sha256-n4fTKTYXeGRngeanNDxSxbuWSRCQ6l74IwOBlqp8dcw=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "703c0ac8432f3758987e0788248ddc1a8e0bf412", + "rev": "0f415721ee427270bc078ef3a5ba2a308d47461f", "type": "github" }, "original": { @@ -916,9 +987,9 @@ "lanzaboote": { "inputs": { "crane": "crane", - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "flake-parts": "flake-parts_2", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "nixpkgs": [ "nixpkgs" ], @@ -942,11 +1013,11 @@ }, "master": { "locked": { - "lastModified": 1728001490, - "narHash": "sha256-jyLDB1hREFhujapdfZNOyFGQ2+FlhsnhCBYa9YBWn+4=", + "lastModified": 1733680200, + "narHash": "sha256-KKhXdeaKDiQDVCI7WiSh98F8Sq1qJwNvqD0C0ovjO8Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "52cfd83eee767c5d02089efe79c4811ffc52a046", + "rev": "b1d2b1d82b7b09044a1d9bc26a2a54c94c7009bf", "type": "github" }, "original": { @@ -965,11 +1036,11 @@ ] }, "locked": { - "lastModified": 1690328911, - "narHash": "sha256-fxtExYk+aGf2YbjeWQ8JY9/n9dwuEt+ma1eUFzF8Jeo=", + "lastModified": 1729697500, + "narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=", "owner": "zhaofengli", "repo": "nix-github-actions", - "rev": "96df4a39c52f53cb7098b923224d8ce941b64747", + "rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf", "type": "github" }, "original": { @@ -1008,11 +1079,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1725483443, - "narHash": "sha256-WzOlGMKV/51Fccn/OMHcm5yrqgbOJZrJIy1ya4pW0u8=", + "lastModified": 1732192922, + "narHash": "sha256-xQO/3I99TFdiXTN5VoS28NpbNlCQWQUvxmPQHlfkzmU=", "owner": "oddlama", "repo": "nix-topology", - "rev": "8738d94670265beb166954c4e3a26e432f79f68c", + "rev": "2b107e98bbde932a363874e0ef5b1739a932bbc5", "type": "github" }, "original": { @@ -1054,37 +1125,67 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1710695816, - "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "lastModified": 1723556749, + "narHash": "sha256-+CHVZnTnIYRLYsARInHYoWkujzcRkLY/gXm3s5bE52o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "614b4613980a522ba49f0d194531beddbb7220d3", + "rev": "4a92571f9207810b559c9eac203d1f4d79830073", "type": "github" }, "original": { + "id": "nixpkgs", + "ref": "nixos-24.05", + "type": "indirect" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1723637854, + "narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", "owner": "NixOS", - "ref": "nixos-23.11", "repo": "nixpkgs", + "rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9", "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" } }, - "nixpkgs-stable_3": { + "nixpkgs_10": { "locked": { - "lastModified": 1725762081, - "narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=", - "owner": "NixOS", + "lastModified": 1733097829, + "narHash": "sha256-9hbb1rqGelllb4kVUCZ307G2k3/UhmA8PPGBoyuWaSw=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "dc454045f5b5d814e5862a6d057e7bb5c29edc05", + "rev": "2c15aa59df0017ca140d9ba302412298ab4bf22a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1702645756, + "narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-24.05", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs_10": { + "nixpkgs_12": { "locked": { "lastModified": 1708093448, "narHash": "sha256-gohEm3/NVyu7WINFhRf83yJH8UM2ie/KY9Iw3VN6fiE=", @@ -1100,11 +1201,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1727802920, - "narHash": "sha256-HP89HZOT0ReIbI7IJZJQoJgxvB2Tn28V6XS3MNKnfLs=", + "lastModified": 1733581040, + "narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "27e30d177e57d912d614c88c622dcfdb2e6e6515", + "rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", "type": "github" }, "original": { @@ -1116,11 +1217,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1704588796, - "narHash": "sha256-6WJKgbo/ozOhIrn4U5RZddHp+K6AkONDxCbeE3b0I00=", + "lastModified": 1729643269, + "narHash": "sha256-jh9t+NAFJGUDThjWiMuxz+rGz+O7sctLBIgJBfm1xQk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2c92367fc6afb7df4700782bccae881d81e02de9", + "rev": "1c9fee8711a88d5b09e2072caf331efaec6501d3", "type": "github" }, "original": { @@ -1148,11 +1249,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1715266358, - "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", + "lastModified": 1730531603, + "narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f1010e0469db743d14519a1efd37e23f8513d714", + "rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d", "type": "github" }, "original": { @@ -1164,27 +1265,27 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1725534445, - "narHash": "sha256-Yd0FK9SkWy+ZPuNqUgmVPXokxDgMJoGuNpMEtkfcf84=", - "owner": "NixOS", + "lastModified": 1733581040, + "narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "9bb1e7571aadf31ddb4af77fc64b2d59580f9a39", + "rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", + "owner": "nixos", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_7": { "locked": { - "lastModified": 1725194671, - "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", + "lastModified": 1714656196, + "narHash": "sha256-kjQkA98lMcsom6Gbhw8SYzmwrSo+2nruiTcTZp5jK7o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c", + "rev": "94035b482d181af0a0f8f77823a790b256b7c3cc", "type": "github" }, "original": { @@ -1196,15 +1297,15 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1726871744, - "narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=", - "owner": "nixos", + "lastModified": 1731763621, + "narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "a1d92660c6b3b7c26fb883500a80ea9d33321be2", + "rev": "c69a9bffbecde46b4b939465422ddc59493d3e4d", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" @@ -1212,27 +1313,32 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1702645756, - "narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=", - "owner": "nixos", + "lastModified": 1732238832, + "narHash": "sha256-sQxuJm8rHY20xq6Ah+GwIUkF95tWjGRd1X8xF+Pkk38=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0", + "rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, "nur": { + "inputs": { + "flake-parts": "flake-parts_3", + "nixpkgs": "nixpkgs_6", + "treefmt-nix": "treefmt-nix" + }, "locked": { - "lastModified": 1727999300, - "narHash": "sha256-y18q4rFuWZ5z1OllpZnNGtYZfIWPYta8V3MI+liB+d8=", + "lastModified": 1733676251, + "narHash": "sha256-uY0Oh9k8A04wmOzJc/HelOB1iKWT9rAYzdvnQ+G1Jq4=", "owner": "nix-community", "repo": "NUR", - "rev": "2eaa6a4b8f589bc82805ec76506e9264e3acec9a", + "rev": "5d422c13c02ccd1764902856837807aa40b90206", "type": "github" }, "original": { @@ -1244,11 +1350,11 @@ "powerlevel10k": { "flake": false, "locked": { - "lastModified": 1727947006, - "narHash": "sha256-C0QgZ/DNA6YwQAUv7HHLo+18xrx+C+pUiU9uoD2/AvQ=", + "lastModified": 1731651047, + "narHash": "sha256-0ORdl9kLhfaDPhUZU3bxd3oVqB7hsrZPZ2wUPVu48gY=", "owner": "romkatv", "repo": "powerlevel10k", - "rev": "c64a13361685fc4ec38a55b41256e28494a5d567", + "rev": "ef83e13c22cf8641f7ab2d50cd1338d01bb31cd2", "type": "github" }, "original": { @@ -1259,24 +1365,23 @@ }, "pre-commit-hooks": { "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils": [ - "nix-topology", - "flake-utils" - ], + "flake-compat": "flake-compat_3", "gitignore": "gitignore_2", "nixpkgs": [ "nix-topology", "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_2" + "nixpkgs-stable": [ + "nix-topology", + "nixpkgs" + ] }, "locked": { - "lastModified": 1714478972, - "narHash": "sha256-q//cgb52vv81uOuwz1LaXElp3XAe1TqrABXODAEF6Sk=", + "lastModified": 1730797577, + "narHash": "sha256-SrID5yVpyUfknUTGWgYkTyvdr9J1LxUym4om3SVGPkg=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "2849da033884f54822af194400f8dff435ada242", + "rev": "1864030ed24a2b8b4e4d386a5eeaf0c5369e50a9", "type": "github" }, "original": { @@ -1316,8 +1421,31 @@ "type": "github" } }, + "proxmox-nixos": { + "inputs": { + "crane": "crane_2", + "flake-compat": "flake-compat_4", + "nixpkgs-stable": "nixpkgs-stable_2", + "nixpkgs-unstable": "nixpkgs-unstable", + "utils": "utils" + }, + "locked": { + "lastModified": 1732473775, + "narHash": "sha256-WnckT473A+DcYYdzLFWgP4RSAvBNaSRw7fJuKySX+Og=", + "owner": "SaumonNet", + "repo": "proxmox-nixos", + "rev": "06fbc351ff461d26a8276f44088450c965195e10", + "type": "github" + }, + "original": { + "owner": "SaumonNet", + "repo": "proxmox-nixos", + "type": "github" + } + }, "purescript-overlay": { "inputs": { + "flake-compat": "flake-compat", "nixpkgs": [ "cryptopro", "dream2nix", @@ -1326,11 +1454,11 @@ "slimlock": "slimlock" }, "locked": { - "lastModified": 1696022621, - "narHash": "sha256-eMjFmsj2G1E0Q5XiibUNgFjTiSz0GxIeSSzzVdoN730=", + "lastModified": 1724504251, + "narHash": "sha256-TIw+sac0NX0FeAneud+sQZT+ql1G/WEb7/Vb436rUXM=", "owner": "thomashoneyman", "repo": "purescript-overlay", - "rev": "047c7933abd6da8aa239904422e22d190ce55ead", + "rev": "988b09676c2a0e6a46dfa3589aa6763c90476b8a", "type": "github" }, "original": { @@ -1365,6 +1493,7 @@ "disko": "disko", "flake-parts": "flake-parts", "fzf-zsh-completions": "fzf-zsh-completions", + "ghostty": "ghostty", "home-manager": "home-manager_2", "hyprland": "hyprland", "impermanence": "impermanence", @@ -1376,10 +1505,11 @@ ], "nur": "nur", "powerlevel10k": "powerlevel10k", + "proxmox-nixos": "proxmox-nixos", "sops-nix": "sops-nix", "stable": "stable", "stylix": "stylix", - "treefmt-nix": "treefmt-nix", + "treefmt-nix": "treefmt-nix_2", "unstable": "unstable", "xdghypr": "xdghypr", "yandex-music": "yandex-music", @@ -1389,23 +1519,6 @@ "zsh-syntax-highlighting": "zsh-syntax-highlighting" } }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1727778987, - "narHash": "sha256-OTI1eKQ3WIkj6q8PROpPY1vhaxYRdiS1btSfBowQPps=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "e1a76671af2fbc74c84c18ba18fcda5e653d7531", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, "rust-overlay": { "inputs": { "flake-utils": [ @@ -1441,11 +1554,11 @@ ] }, "locked": { - "lastModified": 1688610262, - "narHash": "sha256-Wg0ViDotFWGWqKIQzyYCgayeH8s4U1OZcTiWTQYdAp4=", + "lastModified": 1688756706, + "narHash": "sha256-xzkkMv3neJJJ89zo3o2ojp7nFeaZc2G0fYwNXNJRFlo=", "owner": "thomashoneyman", "repo": "slimlock", - "rev": "b5c6cdcaf636ebbebd0a1f32520929394493f1a6", + "rev": "cf72723f59e2340d24881fd7bf61cb113b4c407c", "type": "github" }, "original": { @@ -1456,15 +1569,14 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_6", - "nixpkgs-stable": "nixpkgs-stable_3" + "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1727734513, - "narHash": "sha256-i47LQwoGCVQq4upV2YHV0OudkauHNuFsv306ualB/Sw=", + "lastModified": 1733128155, + "narHash": "sha256-m6/qwJAJYcidGMEdLqjKzRIjapK4nUfMq7rDCTmZajc=", "owner": "Mic92", "repo": "sops-nix", - "rev": "3198a242e547939c5e659353551b0668ec150268", + "rev": "c6134b6fff6bda95a1ac872a2a9d5f32e3c37856", "type": "github" }, "original": { @@ -1475,11 +1587,11 @@ }, "stable": { "locked": { - "lastModified": 1727907660, - "narHash": "sha256-QftbyPoieM5M50WKUMzQmWtBWib/ZJbHo7mhj5riQec=", + "lastModified": 1733384649, + "narHash": "sha256-K5DJ2LpPqht7K76bsxetI+YHhGGRyVteTPRQaIIKJpw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5966581aa04be7eff830b9e1457d56dc70a0b798", + "rev": "190c31a89e5eec80dd6604d7f9e5af3802a58a13", "type": "github" }, "original": { @@ -1495,22 +1607,22 @@ "base16-fish": "base16-fish", "base16-helix": "base16-helix", "base16-vim": "base16-vim", - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_5", "flake-utils": "flake-utils_5", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_7", - "systems": "systems_6", + "nixpkgs": "nixpkgs_9", + "systems": "systems_7", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1727723275, - "narHash": "sha256-k4HrG8TJQ0RqDS1tlDz71kvWFBNQ7qZI9T5Z0qLR85Y=", + "lastModified": 1733510476, + "narHash": "sha256-RH/8yIuo+fNLCjQ6e1mnXwmmxymjvfWC9JcbDuIA8TM=", "owner": "danth", "repo": "stylix", - "rev": "e7e97059776da7e34b739415a7bc8f80f606b803", + "rev": "e309d64fe7f203274a7913e1d2b74307d15ba122", "type": "github" }, "original": { @@ -1535,6 +1647,21 @@ } }, "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -1549,7 +1676,7 @@ "type": "github" } }, - "systems_3": { + "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1564,7 +1691,7 @@ "type": "github" } }, - "systems_4": { + "systems_5": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1579,7 +1706,7 @@ "type": "github" } }, - "systems_5": { + "systems_6": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1594,7 +1721,7 @@ "type": "github" } }, - "systems_6": { + "systems_7": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1609,7 +1736,7 @@ "type": "github" } }, - "systems_7": { + "systems_8": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -1624,7 +1751,7 @@ "type": "github" } }, - "systems_8": { + "systems_9": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1642,43 +1769,45 @@ "tinted-foot": { "flake": false, "locked": { - "lastModified": 1696725948, - "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", "owner": "tinted-theming", "repo": "tinted-foot", - "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", "type": "github" }, "original": { "owner": "tinted-theming", "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", "type": "github" } }, "tinted-kitty": { "flake": false, "locked": { - "lastModified": 1665001328, - "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=", + "lastModified": 1716423189, + "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", "owner": "tinted-theming", "repo": "tinted-kitty", - "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805", + "rev": "eb39e141db14baef052893285df9f266df041ff8", "type": "github" }, "original": { "owner": "tinted-theming", "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", "type": "github" } }, "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1696725902, - "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", + "lastModified": 1729501581, + "narHash": "sha256-1ohEFMC23elnl39kxWnjzH1l2DFWWx4DhFNNYDTYt54=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", + "rev": "f0e7f7974a6441033eb0a172a0342e96722b4f14", "type": "github" }, "original": { @@ -1689,14 +1818,35 @@ }, "treefmt-nix": { "inputs": { - "nixpkgs": "nixpkgs_8" + "nixpkgs": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733222881, + "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "49717b5af6f80172275d47a418c9719a31a78b53", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": "nixpkgs_10" }, "locked": { - "lastModified": 1727984844, - "narHash": "sha256-xpRqITAoD8rHlXQafYZOLvUXCF6cnZkPfoq67ThN0Hc=", + "lastModified": 1733662930, + "narHash": "sha256-9qOp6jNdezzLMxwwXaXZWPXosHbNqno+f7Ii/xftqZ8=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "4446c7a6fc0775df028c5a3f6727945ba8400e64", + "rev": "357cda84af1d74626afb7fb3bc12d6957167cda9", "type": "github" }, "original": { @@ -1707,11 +1857,11 @@ }, "unstable": { "locked": { - "lastModified": 1727802920, - "narHash": "sha256-HP89HZOT0ReIbI7IJZJQoJgxvB2Tn28V6XS3MNKnfLs=", + "lastModified": 1733581040, + "narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "27e30d177e57d912d614c88c622dcfdb2e6e6515", + "rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", "type": "github" }, "original": { @@ -1721,6 +1871,24 @@ "type": "github" } }, + "utils": { + "inputs": { + "systems": "systems_6" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "xdghypr": { "inputs": { "hyprland-protocols": "hyprland-protocols_2", @@ -1728,7 +1896,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_7" + "systems": "systems_8" }, "locked": { "lastModified": 1704466722, @@ -1778,15 +1946,15 @@ "yandex-music": { "inputs": { "flake-utils": "flake-utils_6", - "nixpkgs": "nixpkgs_10", + "nixpkgs": "nixpkgs_12", "ymExe": "ymExe" }, "locked": { - "lastModified": 1727974068, - "narHash": "sha256-+tNKENP5wgpfjaCaEvQBXhUp1j0xf9Ygyt2/O0g/Q/w=", + "lastModified": 1733580574, + "narHash": "sha256-2Cpkwj2TajdOcnrxtdf3uwrHuqlEbG92u1AYVfVkkR0=", "owner": "cucumber-sp", "repo": "yandex-music-linux", - "rev": "4d8753bf03e9faf68ec0fd716c0a55450848e5cf", + "rev": "af0c4de2612df90fae77294b11dca5bbaa90a466", "type": "github" }, "original": { @@ -1798,13 +1966,38 @@ "ymExe": { "flake": false, "locked": { - "narHash": "sha256-PFrV8F2KlkAsxEGSf8Wg1e67dnP2M+iNLNuR5AyJGuE=", + "narHash": "sha256-pmW4gY0B4ZFaoA6IFTfmPG3Xlsvh0phwhECkd9eyCjE=", "type": "file", - "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.20.2.exe" + "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.31.2.exe" }, "original": { "type": "file", - "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.20.2.exe" + "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.31.2.exe" + } + }, + "zig": { + "inputs": { + "flake-compat": [ + "ghostty" + ], + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "ghostty", + "nixpkgs-stable" + ] + }, + "locked": { + "lastModified": 1717848532, + "narHash": "sha256-d+xIUvSTreHl8pAmU1fnmkfDTGQYCn2Rb/zOwByxS2M=", + "owner": "mitchellh", + "repo": "zig-overlay", + "rev": "02fc5cc555fc14fda40c42d7c3250efa43812b43", + "type": "github" + }, + "original": { + "owner": "mitchellh", + "repo": "zig-overlay", + "type": "github" } }, "zsh-auto-notify": { @@ -1826,11 +2019,11 @@ "zsh-autosuggestions": { "flake": false, "locked": { - "lastModified": 1694098728, - "narHash": "sha256-B+Kz3B7d97CM/3ztpQyVkE6EfMipVF8Y4HJNfSRXHtU=", + "lastModified": 1732590459, + "narHash": "sha256-85aw9OM2pQPsWklXjuNOzp9El1MsNb+cIiZQVHUzBnk=", "owner": "zsh-users", "repo": "zsh-autosuggestions", - "rev": "c3d4e576c9c86eac62884bd47c01f6faed043fc5", + "rev": "0e810e5afa27acbd074398eefbe28d13005dbc15", "type": "github" }, "original": { @@ -1858,11 +2051,11 @@ "zsh-syntax-highlighting": { "flake": false, "locked": { - "lastModified": 1704566212, - "narHash": "sha256-4rW2N+ankAH4sA6Sa5mr9IKsdAg7WTgrmyqJ2V1vygQ=", + "lastModified": 1732201766, + "narHash": "sha256-KRsQEDRsJdF7LGOMTZuqfbW6xdV5S38wlgdcCM98Y/Q=", "owner": "zsh-users", "repo": "zsh-syntax-highlighting", - "rev": "e0165eaa730dd0fa321a6a6de74f092fe87630b0", + "rev": "5eb677bb0fa9a3e60f0eff031dc13926e093df92", "type": "github" }, "original": { From ab65d665b25918af4ec958169fb7dc9729217f94 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:05:50 +0300 Subject: [PATCH 055/103] ci/cd: Yaml fmt --- .github/workflows/checks.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index d44a60a..89f8045 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,29 +1,21 @@ name: "Check configuration" - on: push: pull_request: - jobs: check: runs-on: ubuntu-latest - steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Install Nix uses: cachix/install-nix-action@v24 with: extra_nix_config: | - experimental-features = nix-command flakes - + experimental-features = nix-command flakes - name: Run statix check run: nix run 'nixpkgs/nixos-unstable#statix' -- check . - - name: Run deadnix check run: nix run 'nixpkgs/nixos-unstable#deadnix' -- . - - name: Run flake check uses: DeterminateSystems/flake-checker-action@v5 - From 02363829a2d641e8abf4f090e642b4600251b86d Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:06:01 +0300 Subject: [PATCH 056/103] docs: Fmt --- docs/default.nix | 9 +++--- docs/docs.nix | 69 ++++++++++++++++++++++++-------------------- docs/options-doc.nix | 19 ++++++------ 3 files changed, 53 insertions(+), 44 deletions(-) diff --git a/docs/default.nix b/docs/default.nix index 57fdb5e..d5dce7e 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -1,6 +1,7 @@ { - perSystem = { self', pkgs, ... }: { - packages.mydocs = pkgs.callPackage ./docs.nix { self = self'; }; - }; + perSystem = + { self', pkgs, ... }: + { + packages.mydocs = pkgs.callPackage ./docs.nix { self = self'; }; + }; } - diff --git a/docs/docs.nix b/docs/docs.nix index 2864187..0e38468 100644 --- a/docs/docs.nix +++ b/docs/docs.nix @@ -1,38 +1,45 @@ -/* { pkgs -, ... +/* + { pkgs + , ... + }: + + let + inherit (pkgs) stdenv mkdocs python310Packages; + options-doc = pkgs.callPackage ./options-doc.nix {}; + in stdenv.mkDerivation { + src = ./.; + name = "docs"; + + buildInput = [ options-doc ]; + + nativeBuildInputs = [ + mkdocs + python310Packages.mkdocs-material + python310Packages.pygments + ]; + + buildPhase = '' + ln -s ${options-doc} "./docs/nixos-options.md" + mkdocs build + ''; + + installPhase = '' + mv site $out + ''; + } +*/ + +{ + writeShellScriptBin, + pkgs, + self, + ... }: -let - inherit (pkgs) stdenv mkdocs python310Packages; - options-doc = pkgs.callPackage ./options-doc.nix {}; -in stdenv.mkDerivation { - src = ./.; - name = "docs"; - - buildInput = [ options-doc ]; - - nativeBuildInputs = [ - mkdocs - python310Packages.mkdocs-material - python310Packages.pygments - ]; - - buildPhase = '' - ln -s ${options-doc} "./docs/nixos-options.md" - mkdocs build - ''; - - installPhase = '' - mv site $out - ''; - } */ - -{ writeShellScriptBin, pkgs, self, ... }: - let options-doc = pkgs.callPackage ./options-doc.nix { inherit self; }; -in writeShellScriptBin "gen-options-doc" '' +in +writeShellScriptBin "gen-options-doc" '' echo "Generating NixOS module options documentation" cat ${options-doc} > OPTIONS.md '' - diff --git a/docs/options-doc.nix b/docs/options-doc.nix index 61d59d8..afc8014 100644 --- a/docs/options-doc.nix +++ b/docs/options-doc.nix @@ -1,8 +1,9 @@ -{ lib -, self -, pkgs -, runCommand -, nixosOptionsDoc +{ + lib, + self, + pkgs, + runCommand, + nixosOptionsDoc, }: let @@ -22,7 +23,7 @@ let optionsDoc = nixosOptionsDoc { inherit (eval) options; }; -in runCommand "options-doc.md" {} '' - cat ${optionsDoc.optionsCommonMark} >> $out - '' - +in +runCommand "options-doc.md" { } '' + cat ${optionsDoc.optionsCommonMark} >> $out +'' From a6d133d045494112763b0c54c415f94d3c5cfe94 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:06:36 +0300 Subject: [PATCH 057/103] hosts: Fmt --- hosts.nix | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/hosts.nix b/hosts.nix index a6f1ec9..0359ec0 100644 --- a/hosts.nix +++ b/hosts.nix @@ -1,43 +1,42 @@ { nixos = { pcbox = { - username = "maxmur"; - platform = "x86_64-linux"; - stateVersion = "25.05"; + username = "maxmur"; + platform = "x86_64-linux"; + stateVersion = "25.05"; isWorkstation = true; - wm = "sway"; + wm = "sway"; }; nbox = { - username = "maxmur"; - platform = "x86_64-linux"; - stateVersion = "25.05"; + username = "maxmur"; + platform = "x86_64-linux"; + stateVersion = "25.05"; isWorkstation = true; - wm = "sway"; + wm = "sway"; }; rasp = { - username = "maxmur"; - platform = "aarch64-linux"; - stateVersion = "25.05"; + username = "maxmur"; + platform = "aarch64-linux"; + stateVersion = "25.05"; isWorkstation = false; }; hlbox = { - username = "maxmur"; - platform = "x86_64-linux"; - stateVersion = "25.05"; + username = "maxmur"; + platform = "x86_64-linux"; + stateVersion = "25.05"; isWorkstation = false; }; }; darwin = { macbox = { - username = "maxmur"; - platform = "aarch64-darwin"; - stateVersion = 5; + username = "maxmur"; + platform = "aarch64-darwin"; + stateVersion = 5; isWorkstation = true; }; }; } - From 347bab5174fd2b0675f767729aaa39b0cd8f4d73 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:14:27 +0300 Subject: [PATCH 058/103] common: Fmt --- home/modules/alacritty/default.nix | 11 +- home/modules/btop/default.nix | 11 +- home/modules/cinnamon/dconf2nix.nix | 178 +++++-- home/modules/cinnamon/default.nix | 11 +- home/modules/dconf/default.nix | 11 +- home/modules/emacs/default.nix | 15 +- home/modules/eza/default.nix | 11 +- home/modules/fastfetch/default.nix | 15 +- home/modules/firefox/default.nix | 11 +- home/modules/fish/default.nix | 17 +- home/modules/fish/starship/default.nix | 35 +- home/modules/flameshot/default.nix | 13 +- home/modules/foot/default.nix | 11 +- home/modules/fuzzel/default.nix | 11 +- home/modules/fzf/default.nix | 17 +- home/modules/git/default.nix | 11 +- home/modules/helix/default.nix | 40 +- home/modules/htop/default.nix | 11 +- home/modules/hypridle/default.nix | 110 +++-- home/modules/hyprland/binds/default.nix | 64 +-- home/modules/hyprland/default.nix | 22 +- home/modules/hyprland/monitors/default.nix | 34 +- home/modules/hyprlock/default.nix | 15 +- home/modules/hyprpaper/default.nix | 11 +- home/modules/lazygit/default.nix | 11 +- home/modules/neofetch/default.nix | 15 +- home/modules/neovim/config/init.lua | 3 +- .../neovim/config/lua/config/autocmds.lua | 9 +- .../modules/neovim/config/lua/config/init.lua | 9 +- .../neovim/config/lua/config/keymaps.lua | 67 ++- .../modules/neovim/config/lua/config/lazy.lua | 103 ++-- .../neovim/config/lua/config/options.lua | 33 +- .../neovim/config/lua/lsp/handlers.lua | 3 +- home/modules/neovim/config/lua/lsp/init.lua | 44 +- .../config/lua/lsp/settings/ansiblels.lua | 40 +- .../config/lua/lsp/settings/dockerls.lua | 19 +- .../neovim/config/lua/lsp/settings/gopls.lua | 35 +- .../config/lua/lsp/settings/helm_ls.lua | 15 +- .../neovim/config/lua/lsp/settings/jsonls.lua | 1 - .../neovim/config/lua/lsp/settings/lua_ls.lua | 1 - .../neovim/config/lua/lsp/settings/nil_ls.lua | 3 +- .../config/lua/lsp/settings/pyright.lua | 1 - .../neovim/config/lua/lsp/settings/yamlls.lua | 18 +- .../config/lua/plugins/auto-sessions.lua | 31 +- .../neovim/config/lua/plugins/autopairs.lua | 67 ++- .../neovim/config/lua/plugins/autosave.lua | 59 ++- .../neovim/config/lua/plugins/barbar.lua | 37 +- .../neovim/config/lua/plugins/blankline.lua | 93 ++-- .../modules/neovim/config/lua/plugins/cmp.lua | 1 - .../neovim/config/lua/plugins/comment.lua | 1 - .../neovim/config/lua/plugins/dressing.lua | 74 ++- .../modules/neovim/config/lua/plugins/git.lua | 25 +- .../neovim/config/lua/plugins/gitsings.lua | 1 - .../neovim/config/lua/plugins/lualine.lua | 439 +++++++++--------- .../config/lua/plugins/markdown-preview.lua | 1 - .../neovim/config/lua/plugins/mini.lua | 11 +- .../neovim/config/lua/plugins/mylsp.lua | 11 +- .../neovim/config/lua/plugins/noice.lua | 85 ++-- .../config/lua/plugins/nvim-ansible.lua | 11 +- .../neovim/config/lua/plugins/nvim-tree.lua | 177 ++++--- .../neovim/config/lua/plugins/telescope.lua | 1 - .../neovim/config/lua/plugins/theme.lua | 17 +- .../neovim/config/lua/plugins/treesitter.lua | 63 ++- .../neovim/config/lua/plugins/vim-helm.lua | 13 +- home/modules/neovim/default.nix | 15 +- home/modules/password-store/default.nix | 11 +- home/modules/ripgrep/default.nix | 11 +- home/modules/rofi/default.nix | 164 +++---- home/modules/swaylock/default.nix | 11 +- home/modules/swaync/default.nix | 28 +- home/modules/swaync/style.css | 1 - home/modules/thunderbird/default.nix | 11 +- home/modules/vscode/default.nix | 13 +- home/modules/vscode/extentions/default.nix | 6 +- home/modules/vscode/keybindings/default.nix | 9 +- home/modules/vscode/settings/default.nix | 37 +- home/modules/wofi/default.nix | 15 +- home/modules/yazi/default.nix | 11 +- home/modules/zathura/default.nix | 11 +- home/modules/zoxide/default.nix | 11 +- home/modules/zsh/default.nix | 51 +- home/overlays/chrome/default.nix | 1 - home/overlays/rofi-calc/default.nix | 1 - home/overlays/rofi-emoji/default.nix | 1 - home/overlays/waybar/default.nix | 1 - .../maxmur/modules/impermanence/default.nix | 15 +- .../users/maxmur/modules/packages/default.nix | 146 +++--- home/users/maxmur/modules/xdg/default.nix | 11 +- home/users/root/default.nix | 8 +- home/users/test/default.nix | 8 +- home/users/test/nbox/default.nix | 8 +- overlays/nixpkgs/default.nix | 24 +- pkgs/ufetch/default.nix | 9 +- system/darwin/modules/default.nix | 4 +- system/nixos/modules/binfmt/default.nix | 11 +- system/nixos/modules/bluetooth/default.nix | 11 +- system/nixos/modules/boot/default.nix | 11 +- system/nixos/modules/lanzaboot/default.nix | 15 +- system/nixos/modules/locales/default.nix | 11 +- system/nixos/modules/minimal/default.nix | 11 +- system/nixos/modules/network/default.nix | 13 +- system/nixos/modules/nix/default.nix | 6 +- system/nixos/modules/nixos-ng/default.nix | 23 +- system/nixos/modules/pihole/default.nix | 11 +- system/nixos/modules/plymouth/default.nix | 11 +- .../nixos/modules/programs/dconf/default.nix | 11 +- .../nixos/modules/programs/fish/default.nix | 11 +- .../nixos/modules/programs/gnupg/default.nix | 11 +- .../modules/programs/home-manager/default.nix | 15 +- .../modules/programs/kdeconnect/default.nix | 11 +- system/nixos/modules/programs/mtr/default.nix | 11 +- .../modules/programs/nix-helper/default.nix | 13 +- .../programs/systemPackages/default.nix | 116 ++--- .../modules/programs/xdg-portal/default.nix | 15 +- system/nixos/modules/programs/zsh/default.nix | 11 +- system/nixos/modules/security/default.nix | 111 ++--- .../modules/services/adguard-home/default.nix | 17 +- .../nixos/modules/services/bolt/default.nix | 11 +- .../modules/services/cpu-autofreq/default.nix | 11 +- .../nixos/modules/services/fwupd/default.nix | 11 +- .../services/homepage-dashboard/default.nix | 78 ++-- .../modules/services/hyprland/default.nix | 15 +- .../modules/services/netbird/default.nix | 13 +- .../nixos/modules/services/ollama/default.nix | 11 +- .../nixos/modules/services/polkit/default.nix | 11 +- .../modules/services/printing/default.nix | 11 +- system/nixos/modules/services/qmk/default.nix | 13 +- system/nixos/modules/services/scx/default.nix | 13 +- system/nixos/modules/services/ssh/default.nix | 20 +- .../modules/services/syncthing/default.nix | 13 +- .../nixos/modules/services/udev/default.nix | 11 +- .../modules/services/unbound/default.nix | 13 +- .../modules/services/xserver/default.nix | 13 +- .../modules/services/yggdrasil/default.nix | 11 +- .../nixos/modules/services/zram/default.nix | 11 +- system/nixos/modules/sound/default.nix | 13 +- system/nixos/modules/timedate/default.nix | 11 +- system/nixos/modules/users/default.nix | 33 +- system/nixos/modules/variables/default.nix | 35 +- .../nixos/modules/virtualization/default.nix | 15 +- system/nixos/modules/zapret/default.nix | 13 +- system/nixos/overlays/vaapiIntel/default.nix | 5 +- templates/default.nix | 6 +- templates/devshell/flake.nix | 18 +- templates/module/default.nix | 11 +- templates/overlay/default.nix | 3 +- 146 files changed, 2104 insertions(+), 1833 deletions(-) diff --git a/home/modules/alacritty/default.nix b/home/modules/alacritty/default.nix index a60520f..7e63fae 100644 --- a/home/modules/alacritty/default.nix +++ b/home/modules/alacritty/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.alacritty; -in { +in +{ options = { module.alacritty.enable = mkEnableOption "Enables Alacritty"; }; @@ -87,4 +89,3 @@ in { }; }; } - diff --git a/home/modules/btop/default.nix b/home/modules/btop/default.nix index cf39a46..0dc7d30 100644 --- a/home/modules/btop/default.nix +++ b/home/modules/btop/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.btop; -in { +in +{ options = { module.btop.enable = mkEnableOption "Enables btop"; }; @@ -18,4 +20,3 @@ in { }; }; } - diff --git a/home/modules/cinnamon/dconf2nix.nix b/home/modules/cinnamon/dconf2nix.nix index 06abe4a..a6e950d 100644 --- a/home/modules/cinnamon/dconf2nix.nix +++ b/home/modules/cinnamon/dconf2nix.nix @@ -36,11 +36,45 @@ with lib.hm.gvariant; desktop-effects-unmaximize-time = 100; desktop-effects-unmaximize-transition = "easeNone"; device-aliases = [ "/org/freedesktop/UPower/devices/battery_BAT0:=Laptop" ]; - enabled-applets = [ "panel1:left:0:menu@cinnamon.org:30" "panel1:right:9:notifications@cinnamon.org:35" "panel1:right:11:network@cinnamon.org:40" "panel1:right:12:sound@cinnamon.org:41" "panel1:right:13:power@cinnamon.org:42" "panel1:right:15:calendar@cinnamon.org:43" "panel1:right:14:weather@mockturtl:95" "panel1:left:1:workspace-switcher@cinnamon.org:116" "panel1:center:1:window-list@cinnamon.org:121" "panel1:right:5:keyboard@cinnamon.org:128" "panel1:right:6:systray@cinnamon.org:130" "panel1:right:8:xapp-status@cinnamon.org:133" "panel4:left:0:menu@cinnamon.org:138" "panel4:left:1:workspace-switcher@cinnamon.org:139" "panel4:center:1:window-list@cinnamon.org:140" "panel4:right:5:weather@mockturtl:141" "panel4:right:3:keyboard@cinnamon.org:142" "panel4:right:6:calendar@cinnamon.org:144" "panel4:right:4:workspace-name@willurd:152" "panel4:center:2:spacer@cinnamon.org:154" "panel1:center:2:spacer@cinnamon.org:155" "panel4:center:0:spacer@cinnamon.org:156" "panel1:center:0:spacer@cinnamon.org:157" ]; - enabled-desklets = []; + enabled-applets = [ + "panel1:left:0:menu@cinnamon.org:30" + "panel1:right:9:notifications@cinnamon.org:35" + "panel1:right:11:network@cinnamon.org:40" + "panel1:right:12:sound@cinnamon.org:41" + "panel1:right:13:power@cinnamon.org:42" + "panel1:right:15:calendar@cinnamon.org:43" + "panel1:right:14:weather@mockturtl:95" + "panel1:left:1:workspace-switcher@cinnamon.org:116" + "panel1:center:1:window-list@cinnamon.org:121" + "panel1:right:5:keyboard@cinnamon.org:128" + "panel1:right:6:systray@cinnamon.org:130" + "panel1:right:8:xapp-status@cinnamon.org:133" + "panel4:left:0:menu@cinnamon.org:138" + "panel4:left:1:workspace-switcher@cinnamon.org:139" + "panel4:center:1:window-list@cinnamon.org:140" + "panel4:right:5:weather@mockturtl:141" + "panel4:right:3:keyboard@cinnamon.org:142" + "panel4:right:6:calendar@cinnamon.org:144" + "panel4:right:4:workspace-name@willurd:152" + "panel4:center:2:spacer@cinnamon.org:154" + "panel1:center:2:spacer@cinnamon.org:155" + "panel4:center:0:spacer@cinnamon.org:156" + "panel1:center:0:spacer@cinnamon.org:157" + ]; + enabled-desklets = [ ]; enabled-extensions = [ "horizontal-osd@berk-karaal" ]; - favorite-apps = [ "google-chrome.desktop" "cinnamon-settings.desktop" "ulauncher.desktop" "org.gnome.Terminal.desktop" ]; - hotcorner-layout = [ "expo:false:0" "desktop:false:0" "scale:false:0" "desktop:false:0" ]; + favorite-apps = [ + "google-chrome.desktop" + "cinnamon-settings.desktop" + "ulauncher.desktop" + "org.gnome.Terminal.desktop" + ]; + hotcorner-layout = [ + "expo:false:0" + "desktop:false:0" + "scale:false:0" + "desktop:false:0" + ]; next-applet-id = 158; next-desklet-id = 13; no-adjacent-panel-barriers = false; @@ -49,11 +83,36 @@ with lib.hm.gvariant; panel-zone-icon-sizes = "[{\"panelId\": 1, \"left\": 0, \"center\": 0, \"right\": 24}, {\"left\": 0, \"center\": 0, \"right\": 0, \"panelId\": 4}, {\"left\": 0, \"center\": 0, \"right\": 24, \"panelId\": 2}]"; panel-zone-symbolic-icon-sizes = "[{\"panelId\": 1, \"left\": 28, \"center\": 28, \"right\": 16}, {\"left\": 28, \"center\": 28, \"right\": 16, \"panelId\": 4}, {\"left\": 28, \"center\": 28, \"right\": 16, \"panelId\": 2}]"; panel-zone-text-sizes = "[{\"panelId\":1,\"left\":0,\"center\":0,\"right\":0},{\"left\":0,\"center\":0,\"right\":0,\"panelId\":4},{\"left\":0,\"center\":0,\"right\":0,\"panelId\":2}]"; - panels-autohide = [ "1:false" "2:false" "3:true" "4:false" ]; - panels-enabled = [ "1:0:top" "4:1:top" "4:1:top" "2:2:top" ]; - panels-height = [ "1:27" "2:27" "3:30" "4:27" ]; - panels-hide-delay = [ "1:0" "2:0" "3:0" "4:0" ]; - panels-show-delay = [ "1:0" "2:0" "3:0" "4:0" ]; + panels-autohide = [ + "1:false" + "2:false" + "3:true" + "4:false" + ]; + panels-enabled = [ + "1:0:top" + "4:1:top" + "4:1:top" + "2:2:top" + ]; + panels-height = [ + "1:27" + "2:27" + "3:30" + "4:27" + ]; + panels-hide-delay = [ + "1:0" + "2:0" + "3:0" + "4:0" + ]; + panels-show-delay = [ + "1:0" + "2:0" + "3:0" + "4:0" + ]; show-media-keys-osd = "medium"; window-effect-speed = 1; workspace-expo-view-as-grid = true; @@ -122,8 +181,13 @@ with lib.hm.gvariant; }; "org/cinnamon/desktop/keybindings" = { - custom-list = [ "__dummy__" "custom2" "custom3" "custom0" ]; - looking-glass-keybinding = []; + custom-list = [ + "__dummy__" + "custom2" + "custom3" + "custom0" + ]; + looking-glass-keybinding = [ ]; }; "org/cinnamon/desktop/keybindings/custom-keybindings/custom0" = { @@ -139,33 +203,73 @@ with lib.hm.gvariant; }; "org/cinnamon/desktop/keybindings/custom-keybindings/custom3" = { - binding = []; + binding = [ ]; command = "flameshot gui"; name = "screen-shot"; }; "org/cinnamon/desktop/keybindings/media-keys" = { area-screenshot-clip = [ "Print" ]; - screensaver = [ "l" "XF86ScreenSaver" "Cyrillic_de" ]; - screenshot = []; + screensaver = [ + "l" + "XF86ScreenSaver" + "Cyrillic_de" + ]; + screenshot = [ ]; terminal = [ "Return" ]; }; "org/cinnamon/desktop/keybindings/wm" = { close = [ "q" ]; minimize = [ "m" ]; - move-to-workspace-1 = [ "1" "exclam" ]; - move-to-workspace-10 = [ "0" "parenright" ]; - move-to-workspace-11 = [ "underscore" "minus" ]; - move-to-workspace-12 = [ "plus" "equal" ]; - move-to-workspace-2 = [ "2" "at" ]; - move-to-workspace-3 = [ "3" "numbersign" ]; - move-to-workspace-4 = [ "4" "dollar" ]; - move-to-workspace-5 = [ "5" "percent" ]; - move-to-workspace-6 = [ "6" "asciicircum" ]; - move-to-workspace-7 = [ "7" "ampersand" ]; - move-to-workspace-8 = [ "8" "asterisk" ]; - move-to-workspace-9 = [ "9" "parenleft" ]; + move-to-workspace-1 = [ + "1" + "exclam" + ]; + move-to-workspace-10 = [ + "0" + "parenright" + ]; + move-to-workspace-11 = [ + "underscore" + "minus" + ]; + move-to-workspace-12 = [ + "plus" + "equal" + ]; + move-to-workspace-2 = [ + "2" + "at" + ]; + move-to-workspace-3 = [ + "3" + "numbersign" + ]; + move-to-workspace-4 = [ + "4" + "dollar" + ]; + move-to-workspace-5 = [ + "5" + "percent" + ]; + move-to-workspace-6 = [ + "6" + "asciicircum" + ]; + move-to-workspace-7 = [ + "7" + "ampersand" + ]; + move-to-workspace-8 = [ + "8" + "asterisk" + ]; + move-to-workspace-9 = [ + "9" + "parenleft" + ]; switch-to-workspace-1 = [ "1" ]; switch-to-workspace-10 = [ "0" ]; switch-to-workspace-11 = [ "minus" ]; @@ -178,7 +282,11 @@ with lib.hm.gvariant; switch-to-workspace-7 = [ "7" ]; switch-to-workspace-8 = [ "8" ]; switch-to-workspace-9 = [ "9" ]; - switch-to-workspace-up = [ "Up" "F1" "w" ]; + switch-to-workspace-up = [ + "Up" + "F1" + "w" + ]; toggle-fullscreen = [ "f" ]; toggle-maximized = [ "f" ]; }; @@ -246,7 +354,20 @@ with lib.hm.gvariant; num-workspaces = 12; theme = "Arc-Dark"; titlebar-font = "JetBrainsMono Nerd Font 10"; - workspace-names = [ "1. Home" "2. Chats" "3. Music" "4. Notes" "5. Code" "6. Work" "7. GPT" "8. Education" "9. Media" "10. Monitoring" "11. Offtop" "12. Workspace" ]; + workspace-names = [ + "1. Home" + "2. Chats" + "3. Music" + "4. Notes" + "5. Code" + "6. Work" + "7. GPT" + "8. Education" + "9. Media" + "10. Monitoring" + "11. Offtop" + "12. Workspace" + ]; }; "org/cinnamon/gestures" = { @@ -330,4 +451,3 @@ with lib.hm.gvariant; }; }; } - diff --git a/home/modules/cinnamon/default.nix b/home/modules/cinnamon/default.nix index 52746c8..6f2d3e8 100644 --- a/home/modules/cinnamon/default.nix +++ b/home/modules/cinnamon/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.cinnamon; -in { +in +{ imports = [ # ./dconf2nix.nix ]; @@ -20,4 +22,3 @@ in { dconf.enable = true; }; } - diff --git a/home/modules/dconf/default.nix b/home/modules/dconf/default.nix index 36bcfb9..ea185c4 100644 --- a/home/modules/dconf/default.nix +++ b/home/modules/dconf/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.dconf; -in { +in +{ options = { module.dconf.enable = mkEnableOption "Enables dconf"; }; @@ -26,4 +28,3 @@ in { }; }; } - diff --git a/home/modules/emacs/default.nix b/home/modules/emacs/default.nix index 88c09d0..ddda6c3 100644 --- a/home/modules/emacs/default.nix +++ b/home/modules/emacs/default.nix @@ -1,14 +1,16 @@ -{ config -, lib -, pkgs -, ... +{ + config, + lib, + pkgs, + ... }: with lib; let cfg = config.module.emacs; -in { +in +{ options = { module.emacs.enable = mkEnableOption "Enable emacs"; }; @@ -22,9 +24,8 @@ in { services.emacs = { inherit (config.programs.emacs) package enable; - client.enable = true; + client.enable = true; socketActivation.enable = true; }; }; } - diff --git a/home/modules/eza/default.nix b/home/modules/eza/default.nix index 4e0c5a7..b701ad5 100644 --- a/home/modules/eza/default.nix +++ b/home/modules/eza/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.eza; -in { +in +{ options = { module.eza.enable = mkEnableOption "Enables eza"; }; @@ -18,4 +20,3 @@ in { }; }; } - diff --git a/home/modules/fastfetch/default.nix b/home/modules/fastfetch/default.nix index f02770d..f04155f 100644 --- a/home/modules/fastfetch/default.nix +++ b/home/modules/fastfetch/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.fastfetch; -in { +in +{ options = { module.fastfetch = { enable = mkEnableOption "Enable fastfetch"; @@ -26,8 +28,8 @@ in { display = { color = { - keys = "blue"; - title = "blue"; + keys = "blue"; + title = "blue"; }; }; @@ -72,4 +74,3 @@ in { }; }; } - diff --git a/home/modules/firefox/default.nix b/home/modules/firefox/default.nix index 151142d..f4eaeed 100644 --- a/home/modules/firefox/default.nix +++ b/home/modules/firefox/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.firefox; -in { +in +{ options = { module.firefox.enable = mkEnableOption "Enables firefox"; }; @@ -18,4 +20,3 @@ in { }; }; } - diff --git a/home/modules/fish/default.nix b/home/modules/fish/default.nix index 6862002..651808d 100644 --- a/home/modules/fish/default.nix +++ b/home/modules/fish/default.nix @@ -1,16 +1,18 @@ -{ self -, lib -, config -, username -, pkgs -, ... +{ + self, + lib, + config, + username, + pkgs, + ... }: with lib; let cfg = config.module.fish; -in { +in +{ options = { module.fish.enable = mkEnableOption "Enables Fish"; }; @@ -89,4 +91,3 @@ in { }; }; } - diff --git a/home/modules/fish/starship/default.nix b/home/modules/fish/starship/default.nix index 3ed961e..90f4f39 100644 --- a/home/modules/fish/starship/default.nix +++ b/home/modules/fish/starship/default.nix @@ -14,12 +14,12 @@ fill.symbol = " "; character = { - error_symbol = "[](bold red)"; - success_symbol = "[ο€Œ](bold green)"; - vimcmd_symbol = "[N](bold blue)"; - vimcmd_visual_symbol = "[V](bold red)"; + error_symbol = "[](bold red)"; + success_symbol = "[ο€Œ](bold green)"; + vimcmd_symbol = "[N](bold blue)"; + vimcmd_visual_symbol = "[V](bold red)"; vimcmd_replace_one_symbol = "[R](bold purple)"; - vimcmd_replace_symbol = "[R](bold purple)"; + vimcmd_replace_symbol = "[R](bold purple)"; }; username = { @@ -38,24 +38,36 @@ disabled = false; }; - nix_shell = { symbol = "οŒ“ "; }; + nix_shell = { + symbol = "οŒ“ "; + }; golang = { style = "blue"; symbol = " "; }; - lua = { symbol = " "; }; + lua = { + symbol = " "; + }; cmake = { style = "green"; symbol = "β–³ "; }; - git_branch = { symbol = " "; }; - rust = { symbol = " "; }; - nodejs = { symbol = " "; }; - docker_context = { symbol = " "; }; + git_branch = { + symbol = " "; + }; + rust = { + symbol = " "; + }; + nodejs = { + symbol = " "; + }; + docker_context = { + symbol = " "; + }; time = { format = "[$time]($style) "; @@ -84,4 +96,3 @@ }; }; } - diff --git a/home/modules/flameshot/default.nix b/home/modules/flameshot/default.nix index 849779c..6699e23 100644 --- a/home/modules/flameshot/default.nix +++ b/home/modules/flameshot/default.nix @@ -1,14 +1,16 @@ -{ lib -, config -, username -, ... +{ + lib, + config, + username, + ... }: with lib; let cfg = config.module.flameshot; -in { +in +{ options = { module.flameshot.enable = mkEnableOption "Enables Flameshot"; }; @@ -40,4 +42,3 @@ in { }; }; } - diff --git a/home/modules/foot/default.nix b/home/modules/foot/default.nix index 907623b..5e5534f 100644 --- a/home/modules/foot/default.nix +++ b/home/modules/foot/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.foot; -in { +in +{ options = { module.foot.enable = mkEnableOption "Enables Foot"; }; @@ -46,4 +48,3 @@ in { }; }; } - diff --git a/home/modules/fuzzel/default.nix b/home/modules/fuzzel/default.nix index 2d22a51..b173e23 100644 --- a/home/modules/fuzzel/default.nix +++ b/home/modules/fuzzel/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.fuzzel; -in { +in +{ options = { module.fuzzel = { enable = mkEnableOption "Enable fuzzel app runner"; @@ -20,4 +22,3 @@ in { }; }; } - diff --git a/home/modules/fzf/default.nix b/home/modules/fzf/default.nix index 755d9b0..bb803cc 100644 --- a/home/modules/fzf/default.nix +++ b/home/modules/fzf/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.fzf; -in { +in +{ options = { module.fzf.enable = mkEnableOption "Enables fzf"; }; @@ -16,8 +18,11 @@ in { programs.fzf = { enable = true; enableFishIntegration = true; - defaultOptions = ["--border" "--preview 'bat --color=always {}'" "--prompt 'Files> '"]; + defaultOptions = [ + "--border" + "--preview 'bat --color=always {}'" + "--prompt 'Files> '" + ]; }; }; } - diff --git a/home/modules/git/default.nix b/home/modules/git/default.nix index 7c83084..b97a331 100644 --- a/home/modules/git/default.nix +++ b/home/modules/git/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.git; -in { +in +{ options = { module.git.enable = mkEnableOption "Enables git"; }; @@ -33,4 +35,3 @@ in { }; }; } - diff --git a/home/modules/helix/default.nix b/home/modules/helix/default.nix index 728dcbf..5a3db79 100644 --- a/home/modules/helix/default.nix +++ b/home/modules/helix/default.nix @@ -1,14 +1,16 @@ -{ lib -, pkgs -, config -, ... +{ + lib, + pkgs, + config, + ... }: with lib; let cfg = config.module.helix; -in { +in +{ options = { module.helix.enable = mkEnableOption "Enables helix"; }; @@ -24,7 +26,7 @@ in { helm-ls nil ]; - + programs.helix = { enable = true; settings = { @@ -35,14 +37,14 @@ in { text-width = 70; bufferline = "multiple"; default-line-ending = "lf"; - rulers = [73]; + rulers = [ 73 ]; cursorline = true; auto-info = true; color-modes = true; lsp = { display-messages = true; - display-inlay-hints = true; + display-inlay-hints = true; }; soft-wrap = { @@ -57,9 +59,24 @@ in { }; statusline = { - left = ["mode" "spinner" "file-modification-indicator" "read-only-indicator"]; - center = [ "version-control" "file-name"]; - right = ["diagnostics" "selections" "position" "file-encoding" "file-line-ending" "file-type"]; + left = [ + "mode" + "spinner" + "file-modification-indicator" + "read-only-indicator" + ]; + center = [ + "version-control" + "file-name" + ]; + right = [ + "diagnostics" + "selections" + "position" + "file-encoding" + "file-line-ending" + "file-type" + ]; separator = "β”‚"; mode = { normal = "NORMAL"; @@ -83,4 +100,3 @@ in { }; }; } - diff --git a/home/modules/htop/default.nix b/home/modules/htop/default.nix index 884968b..66bb879 100644 --- a/home/modules/htop/default.nix +++ b/home/modules/htop/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.htop; -in { +in +{ options = { module.htop.enable = mkEnableOption "Enables htop"; }; @@ -18,4 +20,3 @@ in { }; }; } - diff --git a/home/modules/hypridle/default.nix b/home/modules/hypridle/default.nix index fd5ed88..60dbbe9 100644 --- a/home/modules/hypridle/default.nix +++ b/home/modules/hypridle/default.nix @@ -1,11 +1,12 @@ -{ config -, lib -, pkgs -, inputs -, hostname -, swayEnable -, hyprlandEnable -, ... +{ + config, + lib, + pkgs, + inputs, + hostname, + swayEnable, + hyprlandEnable, + ... }: with lib; @@ -15,31 +16,38 @@ let suspendCmd = "${pkgs.systemd}/bin/systemctl suspend"; hyprctlCmd = "${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/hyprctl"; - swaymsg = "${pkgs.sway}/bin/swaymsg"; + swaymsg = "${pkgs.sway}/bin/swaymsg"; hyprlockCmd = "${config.programs.hyprlock.package}/bin/hyprlock"; swaylockCmd = "${pkgs.swaylock}/bin/swaylock"; - lockScreen = if hyprlandEnable - then hyprlockCmd - else if swayEnable - then swaylockCmd - else ""; + lockScreen = + if hyprlandEnable then + hyprlockCmd + else if swayEnable then + swaylockCmd + else + ""; hyprlandOnScreen = "${hyprctlCmd} dispatch dpms on"; hyprlandOffScreen = "${hyprctlCmd} dispatch dpms off"; swayOnScreen = "${swaymsg} 'output * power on'"; swayOffScreen = "${swaymsg} 'output * power off'"; - screenOn = if hyprlandEnable - then hyprlandOnScreen - else if swayEnable - then swayOnScreen - else ""; - screenOff = if hyprlandEnable - then hyprlandOffScreen - else if swayEnable - then swayOffScreen - else ""; -in { + screenOn = + if hyprlandEnable then + hyprlandOnScreen + else if swayEnable then + swayOnScreen + else + ""; + screenOff = + if hyprlandEnable then + hyprlandOffScreen + else if swayEnable then + swayOffScreen + else + ""; +in +{ options = { module.hypridle.enable = mkEnableOption "Enables Hypridle"; }; @@ -58,32 +66,34 @@ in { ignore_dbus_inhibit = false; }; - listener = [ - { - timeout = 300; - on-timeout = screenOff; - on-resume = screenOn; - } - { - timeout = 600; - on-timeout = lockScreen; - on-resume = ""; - } - ] ++ lib.optionals (hostname == "nbox") [ - { - timeout = 900; - on-timeout = suspendCmd; - on-resume = ""; - } - ] ++ lib.optionals (hostname == "pcbox") [ - { - timeout = 7200; - on-timeout = suspendCmd; - on-resume = ""; - } - ]; + listener = + [ + { + timeout = 300; + on-timeout = screenOff; + on-resume = screenOn; + } + { + timeout = 600; + on-timeout = lockScreen; + on-resume = ""; + } + ] + ++ lib.optionals (hostname == "nbox") [ + { + timeout = 900; + on-timeout = suspendCmd; + on-resume = ""; + } + ] + ++ lib.optionals (hostname == "pcbox") [ + { + timeout = 7200; + on-timeout = suspendCmd; + on-resume = ""; + } + ]; }; }; }; } - diff --git a/home/modules/hyprland/binds/default.nix b/home/modules/hyprland/binds/default.nix index f81176a..568eaaf 100644 --- a/home/modules/hyprland/binds/default.nix +++ b/home/modules/hyprland/binds/default.nix @@ -1,8 +1,9 @@ -{ config -, self -, lib -, pkgs -, ... +{ + config, + self, + lib, + pkgs, + ... }: with lib; @@ -10,16 +11,17 @@ with lib; let cfg = config.module.hyprland.binds; - terminal = config.module.defaults.terminalCmd; - appLauncher = config.module.defaults.appLauncherCmd; - audioControl = config.module.defaults.audioControlCmd; + terminal = config.module.defaults.terminalCmd; + appLauncher = config.module.defaults.appLauncherCmd; + audioControl = config.module.defaults.audioControlCmd; brightnessControl = config.module.defaults.brightnessControlCmd; - clipHist = config.module.defaults.clipHistCmd; - notificationsApp = config.module.defaults.notificationsAppCmd; + clipHist = config.module.defaults.clipHistCmd; + notificationsApp = config.module.defaults.notificationsAppCmd; - screenshotArea = "${pkgs.grimblast}/bin/grimblast --notify --freeze copy area"; - screenshotScreen = "${pkgs.grimblast}/bin/grimblast --notify --freeze copy output"; -in { + screenshotArea = "${pkgs.grimblast}/bin/grimblast --notify --freeze copy area"; + screenshotScreen = "${pkgs.grimblast}/bin/grimblast --notify --freeze copy output"; +in +{ options = { module.hyprland.binds.enable = mkEnableOption "Enables binds in Hyprland"; }; @@ -144,21 +146,32 @@ in { ]; # Mouse bindings - bindm = ["SUPER, mouse:272, movewindow" "SUPER, mouse:273, resizewindow"]; + bindm = [ + "SUPER, mouse:272, movewindow" + "SUPER, mouse:273, resizewindow" + ]; # layer rules - layerrule = let - toRegex = list: let - elements = lib.concatStringsSep "|" list; - in "^(${elements})$"; - - layers = [ - "gtk-layer-shell" - "swaync-control-center" - "swaync-notification-window" - "waybar" + layerrule = + let + toRegex = + list: + let + elements = lib.concatStringsSep "|" list; + in + "^(${elements})$"; + + layers = [ + "gtk-layer-shell" + "swaync-control-center" + "swaync-notification-window" + "waybar" + ]; + in + [ + "blur, ${toRegex layers}" + "ignorealpha 0.5, ${toRegex layers}" ]; - in ["blur, ${toRegex layers}" "ignorealpha 0.5, ${toRegex layers}"]; # Window rules windowrulev2 = [ @@ -184,4 +197,3 @@ in { }; }; } - diff --git a/home/modules/hyprland/default.nix b/home/modules/hyprland/default.nix index 8cbe09f..6e95ad0 100644 --- a/home/modules/hyprland/default.nix +++ b/home/modules/hyprland/default.nix @@ -1,16 +1,18 @@ -{ inputs -, self -, config -, lib -, pkgs -, ... +{ + inputs, + self, + config, + lib, + pkgs, + ... }: with lib; let cfg = config.module.hyprland; -in { +in +{ imports = [ "${self}/home/modules/hyprland/binds" "${self}/home/modules/hyprland/monitors" @@ -48,7 +50,10 @@ in { animations = { enabled = true; - bezier = [ "md3_decel, 0.05, 0.7, 0.1, 1" "workspace,0.17, 1.17, 0.3,1" ]; + bezier = [ + "md3_decel, 0.05, 0.7, 0.1, 1" + "workspace,0.17, 1.17, 0.3,1" + ]; animation = [ "border, 1, 2, default" @@ -111,4 +116,3 @@ in { }; }; } - diff --git a/home/modules/hyprland/monitors/default.nix b/home/modules/hyprland/monitors/default.nix index 4cdcecc..8653f1c 100644 --- a/home/modules/hyprland/monitors/default.nix +++ b/home/modules/hyprland/monitors/default.nix @@ -1,7 +1,8 @@ -{ config -, lib -, hostname -, ... +{ + config, + lib, + hostname, + ... }: with lib; @@ -9,12 +10,18 @@ with lib; let cfg = config.module.hyprland.monitors; - monitorsSettings = - if hostname == "pcbox" then ["DP-1,1920x1080@144,0x0,1" "DP-2,1920x1080@144,1920x0,1"] - else if hostname == "nbox" then ["eDP-1,2880x1800@120,0x0,1.8"] - else []; + monitorsSettings = + if hostname == "pcbox" then + [ + "DP-1,1920x1080@144,0x0,1" + "DP-2,1920x1080@144,1920x0,1" + ] + else if hostname == "nbox" then + [ "eDP-1,2880x1800@120,0x0,1.8" ] + else + [ ]; - workspacesSettings = + workspacesSettings = if hostname == "pcbox" then [ "1, monitor:DP-2, default:true" @@ -30,7 +37,7 @@ let "11, monitor:DP-1, default:true" "12, monitor:DP-1, default:true" ] - else if hostname == "nbox" then + else if hostname == "nbox" then [ "1, monitor:eDP-1, default:true" "2, monitor:eDP-1, default:true" @@ -45,8 +52,10 @@ let # "11, monitor:eDP-1, default:true" # "12, monitor:eDP-1, default:true" ] - else []; -in { + else + [ ]; +in +{ options = { module.hyprland.monitors.enable = mkEnableOption "Enables monitors in Hyprland"; }; @@ -58,4 +67,3 @@ in { }; }; } - diff --git a/home/modules/hyprlock/default.nix b/home/modules/hyprlock/default.nix index 0d85ed7..146cc4c 100644 --- a/home/modules/hyprlock/default.nix +++ b/home/modules/hyprlock/default.nix @@ -1,15 +1,17 @@ -{ self -, config -, lib -, pkgs -, ... +{ + self, + config, + lib, + pkgs, + ... }: with lib; let cfg = config.module.hyprlock; -in { +in +{ options = { module.hyprlock.enable = mkEnableOption "Enables Hyprlock"; }; @@ -121,4 +123,3 @@ in { }; }; } - diff --git a/home/modules/hyprpaper/default.nix b/home/modules/hyprpaper/default.nix index dbc0f6d..e22682f 100644 --- a/home/modules/hyprpaper/default.nix +++ b/home/modules/hyprpaper/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.hyprpaper; -in { +in +{ options = { module.hyprpaper.enable = mkEnableOption "Enables hyprpaper"; }; @@ -23,4 +25,3 @@ in { }; }; } - diff --git a/home/modules/lazygit/default.nix b/home/modules/lazygit/default.nix index 42f9995..78d154a 100644 --- a/home/modules/lazygit/default.nix +++ b/home/modules/lazygit/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.lazygit; -in { +in +{ options = { module.lazygit.enable = mkEnableOption "Enables lazygit"; }; @@ -18,4 +20,3 @@ in { }; }; } - diff --git a/home/modules/neofetch/default.nix b/home/modules/neofetch/default.nix index d3cfc8e..aaad0ed 100644 --- a/home/modules/neofetch/default.nix +++ b/home/modules/neofetch/default.nix @@ -1,15 +1,17 @@ -{ self -, pkgs -, lib -, config -, ... +{ + self, + pkgs, + lib, + config, + ... }: with lib; let cfg = config.module.neofetch; -in { +in +{ options = { module.neofetch.enable = mkEnableOption "Enables neofetch"; }; @@ -19,4 +21,3 @@ in { xdg.configFile."neofetch/config.conf".source = "${self}/home/modules/neofetch/neofetch.conf"; }; } - diff --git a/home/modules/neovim/config/init.lua b/home/modules/neovim/config/init.lua index 6933571..dbc863e 100644 --- a/home/modules/neovim/config/init.lua +++ b/home/modules/neovim/config/init.lua @@ -1,2 +1 @@ -require('config') - +require("config") diff --git a/home/modules/neovim/config/lua/config/autocmds.lua b/home/modules/neovim/config/lua/config/autocmds.lua index f09261f..de5b538 100644 --- a/home/modules/neovim/config/lua/config/autocmds.lua +++ b/home/modules/neovim/config/lua/config/autocmds.lua @@ -1,7 +1,7 @@ local autocmd = vim.api.nvim_create_autocmd local function check_git_repo() - local cmd = "git rev-parse --is-inside-work-tree" + local cmd = "git rev-parse --is-inside-work-tree" if vim.fn.system(cmd) == "true\n" then vim.api.nvim_exec_autocmds("User", { pattern = "InGitRepo" }) return true @@ -14,8 +14,7 @@ autocmd({ "VimEnter", "DirChanged" }, { end, }) -autocmd({"VimLeave", "VimSuspend"}, { - pattern = "*", - command = "set guicursor=a:ver25" +autocmd({ "VimLeave", "VimSuspend" }, { + pattern = "*", + command = "set guicursor=a:ver25", }) - diff --git a/home/modules/neovim/config/lua/config/init.lua b/home/modules/neovim/config/lua/config/init.lua index 56262d2..bba220d 100644 --- a/home/modules/neovim/config/lua/config/init.lua +++ b/home/modules/neovim/config/lua/config/init.lua @@ -1,5 +1,4 @@ -require('config.options') -require('config.lazy') -require('config.keymaps') -require('config.autocmds') - +require("config.options") +require("config.lazy") +require("config.keymaps") +require("config.autocmds") diff --git a/home/modules/neovim/config/lua/config/keymaps.lua b/home/modules/neovim/config/lua/config/keymaps.lua index 56de2c3..e223a88 100644 --- a/home/modules/neovim/config/lua/config/keymaps.lua +++ b/home/modules/neovim/config/lua/config/keymaps.lua @@ -1,10 +1,10 @@ local map = vim.keymap.set local opts = { noremap = true, silent = true } -local builtin = require('telescope.builtin') +local builtin = require("telescope.builtin") local function escape(str) - local escape_chars = [[;,."|\]] - return vim.fn.escape(str, escape_chars) + local escape_chars = [[;,."|\]] + return vim.fn.escape(str, escape_chars) end -- Russian layout @@ -14,13 +14,13 @@ local en = [[`qwertyuiop[]asdfghjkl;'zxcvbnm]] local ru = [[Ρ‘ΠΉΡ†ΡƒΠΊΠ΅Π½Π³ΡˆΡ‰Π·Ρ…ΡŠΡ„Ρ‹Π²Π°ΠΏΡ€ΠΎΠ»Π΄ΠΆΡΡΡ‡ΡΠΌΠΈΡ‚ΡŒ]] vim.opt.langmap = vim.fn.join({ - escape(ru_shift) .. ';' .. escape(en_shift), - escape(ru) .. ';' .. escape(en), -}, ',') + escape(ru_shift) .. ";" .. escape(en_shift), + escape(ru) .. ";" .. escape(en), +}, ",") -- Base -- nnoremap , :nohlsearch -map('n', ',', 'nohlsearch') --, opts) +map("n", ",", "nohlsearch") --, opts) map({ "n", "x" }, "H", "^", { desc = "Go to start line" }) map({ "n", "x" }, "L", "g_", { desc = "Go to end line" }) map("n", "", "ggG", { desc = "Select All" }) @@ -32,26 +32,26 @@ map("n", "", ":wincmd k", { silent = true, desc = "Focus Top" }) -- BarBar -- Move to previous/next -map('n', '', 'BufferPrevious', opts) -map('n', '', 'BufferNext', opts) +map("n", "", "BufferPrevious", opts) +map("n", "", "BufferNext", opts) -- Re-order to previous/next -map('n', '', 'BufferMovePrevious', opts) -map('n', '>', 'BufferMoveNext', opts) +map("n", "", "BufferMovePrevious", opts) +map("n", ">", "BufferMoveNext", opts) -- Goto buffer in position... -map('n', '', 'BufferGoto 1', opts) -map('n', '', 'BufferGoto 2', opts) -map('n', '', 'BufferGoto 3', opts) -map('n', '', 'BufferGoto 4', opts) -map('n', '', 'BufferGoto 5', opts) -map('n', '', 'BufferGoto 6', opts) -map('n', '', 'BufferGoto 7', opts) -map('n', '', 'BufferGoto 8', opts) -map('n', '', 'BufferGoto 9', opts) -map('n', '', 'BufferLast', opts) +map("n", "", "BufferGoto 1", opts) +map("n", "", "BufferGoto 2", opts) +map("n", "", "BufferGoto 3", opts) +map("n", "", "BufferGoto 4", opts) +map("n", "", "BufferGoto 5", opts) +map("n", "", "BufferGoto 6", opts) +map("n", "", "BufferGoto 7", opts) +map("n", "", "BufferGoto 8", opts) +map("n", "", "BufferGoto 9", opts) +map("n", "", "BufferLast", opts) -- Pin/unpin buffer -map('n', '', 'BufferPin', opts) +map("n", "", "BufferPin", opts) -- Close buffer -map('n', '', 'BufferClose', opts) +map("n", "", "BufferClose", opts) -- Wipeout buffer -- :BufferWipeout -- Close commands @@ -61,13 +61,13 @@ map('n', '', 'BufferClose', opts) -- :BufferCloseBuffersLeft -- :BufferCloseBuffersRight -- Magic buffer-picking mode -map('n', '', 'BufferPick', opts) +map("n", "", "BufferPick", opts) -- Sort automatically by... -map('n', 'bb', 'BufferOrderByBufferNumber', opts) -map('n', 'bn', 'BufferOrderByName', opts) -map('n', 'bd', 'BufferOrderByDirectory', opts) -map('n', 'bl', 'BufferOrderByLanguage', opts) -map('n', 'bw', 'BufferOrderByWindowNumber', opts) +map("n", "bb", "BufferOrderByBufferNumber", opts) +map("n", "bn", "BufferOrderByName", opts) +map("n", "bd", "BufferOrderByDirectory", opts) +map("n", "bl", "BufferOrderByLanguage", opts) +map("n", "bw", "BufferOrderByWindowNumber", opts) -- Other: -- :BarbarEnable - enables barbar (enabled by default) @@ -80,8 +80,7 @@ map("n", "gn", ":LazyGit", { silent = true }) map("n", "", ":NvimTreeToggle", { silent = true }) -- Telescope -map('n', 'ff', builtin.find_files, {}) -map('n', 'fg', builtin.live_grep, {}) -map('n', 'fb', builtin.buffers, {}) -map('n', 'fh', builtin.help_tags, {}) - +map("n", "ff", builtin.find_files, {}) +map("n", "fg", builtin.live_grep, {}) +map("n", "fb", builtin.buffers, {}) +map("n", "fh", builtin.help_tags, {}) diff --git a/home/modules/neovim/config/lua/config/lazy.lua b/home/modules/neovim/config/lua/config/lazy.lua index 8c1ec71..3601f39 100644 --- a/home/modules/neovim/config/lua/config/lazy.lua +++ b/home/modules/neovim/config/lua/config/lazy.lua @@ -2,61 +2,56 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local configs = "plugins" if not (vim.uv or vim.loop).fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) -require("lazy").setup( - configs, - - { - defaults = { - lazy = true, - autocmds = true, - keymaps = true, - }, - - rocks = { - enabled = false, - }, - - ui = { - title = "Plugin Manager", - title_pos = "center", - - icons = { - cmd = "ξ―‡ ", - config = "", - event = "ξͺ†", - ft = "οƒΆ ", - init = " ", - import = " ", - keys = "ο„œ ", - lazy = "σ°‚  ", - loaded = "●", - not_loaded = "β—‹", - plugin = "ο’‡ ", - runtime = "ξŸ… ", - source = "ο„‘ ", - start = "ξ«“", - task = "βœ” ", - - list = { - "●", - "➜", - "β˜…", - "β€’", - }, - }, - }, - } -) - +require("lazy").setup(configs, { + defaults = { + lazy = true, + autocmds = true, + keymaps = true, + }, + + rocks = { + enabled = false, + }, + + ui = { + title = "Plugin Manager", + title_pos = "center", + + icons = { + cmd = "ξ―‡ ", + config = "", + event = "ξͺ†", + ft = "οƒΆ ", + init = " ", + import = " ", + keys = "ο„œ ", + lazy = "σ°‚  ", + loaded = "●", + not_loaded = "β—‹", + plugin = "ο’‡ ", + runtime = "ξŸ… ", + source = "ο„‘ ", + start = "ξ«“", + task = "βœ” ", + + list = { + "●", + "➜", + "β˜…", + "β€’", + }, + }, + }, +}) diff --git a/home/modules/neovim/config/lua/config/options.lua b/home/modules/neovim/config/lua/config/options.lua index bcd2efa..b8b2a33 100644 --- a/home/modules/neovim/config/lua/config/options.lua +++ b/home/modules/neovim/config/lua/config/options.lua @@ -1,22 +1,21 @@ local opt = vim.opt -local g = vim.g +local g = vim.g -opt.mouse = "a" -opt.colorcolumn = "79" -opt.encoding = "utf-8" -opt.clipboard = "unnamedplus" -opt.fileformat = "unix" -opt.number = true +opt.mouse = "a" +opt.colorcolumn = "79" +opt.encoding = "utf-8" +opt.clipboard = "unnamedplus" +opt.fileformat = "unix" +opt.number = true opt.relativenumber = true -opt.swapfile = false -opt.scrolloff = 7 -opt.tabstop = 2 -opt.shiftwidth = 2 -opt.softtabstop = 2 -opt.expandtab = true -opt.smartindent = true +opt.swapfile = false +opt.scrolloff = 7 +opt.tabstop = 2 +opt.shiftwidth = 2 +opt.softtabstop = 2 +opt.expandtab = true +opt.smartindent = true -g.mapleader = "," -g.editorconfig = false +g.mapleader = "," +g.editorconfig = false -- g.nord_italic = false - diff --git a/home/modules/neovim/config/lua/lsp/handlers.lua b/home/modules/neovim/config/lua/lsp/handlers.lua index 13aaedb..83e348f 100644 --- a/home/modules/neovim/config/lua/lsp/handlers.lua +++ b/home/modules/neovim/config/lua/lsp/handlers.lua @@ -21,7 +21,7 @@ M.on_attach = function(client, bufnr) end map("n", "K", vim.lsp.buf.hover) -- map("i", "", "lua vim.lsp.buf.signature_help()") - map("n", "gd", vim.lsp.buf.definition) + map("n", "gd", vim.lsp.buf.definition) map("n", "rf", vim.lsp.buf.references) map("n", "ca", vim.lsp.buf.code_action) map("n", "rn", vim.lsp.buf.rename) @@ -58,4 +58,3 @@ M.on_attach = function(client, bufnr) end return M - diff --git a/home/modules/neovim/config/lua/lsp/init.lua b/home/modules/neovim/config/lua/lsp/init.lua index 83fefca..cf744dc 100644 --- a/home/modules/neovim/config/lua/lsp/init.lua +++ b/home/modules/neovim/config/lua/lsp/init.lua @@ -1,34 +1,32 @@ local status_ok, lsp = pcall(require, "lspconfig") if not status_ok then - return + return end -- require('lsp.handlers').diagnostic() local servers = { - "gopls" - -- , "nil_ls" - , "lua_ls" - , "jsonls" - , "pyright" - , "yamlls" - , "ansiblels" - , "helm_ls" - , "dockerls" - , "docker_compose_language_service" - , "nixd" - -- , "gitlab-ci-ls" + "gopls", -- , "nil_ls" + "lua_ls", + "jsonls", + "pyright", + "yamlls", + "ansiblels", + "helm_ls", + "dockerls", + "docker_compose_language_service", + "nixd", + -- , "gitlab-ci-ls" } for _, server in pairs(servers) do - local opts = { - on_attach = require('lsp.handlers').on_attach, - capabilities = require('lsp.handlers').capabilities, - } - local has_server_opts, server_opts = pcall(require, "lsp.settings." .. server) - if has_server_opts then - opts = vim.tbl_deep_extend("force", server_opts, opts) - end - lsp[server].setup(opts) + local opts = { + on_attach = require("lsp.handlers").on_attach, + capabilities = require("lsp.handlers").capabilities, + } + local has_server_opts, server_opts = pcall(require, "lsp.settings." .. server) + if has_server_opts then + opts = vim.tbl_deep_extend("force", server_opts, opts) + end + lsp[server].setup(opts) end - diff --git a/home/modules/neovim/config/lua/lsp/settings/ansiblels.lua b/home/modules/neovim/config/lua/lsp/settings/ansiblels.lua index 9d16fa1..c20b886 100644 --- a/home/modules/neovim/config/lua/lsp/settings/ansiblels.lua +++ b/home/modules/neovim/config/lua/lsp/settings/ansiblels.lua @@ -1,22 +1,22 @@ return { - settings = { - ansible = { - ansible = { - path = "ansible" - }, - executionEnvironment = { - enabled = false - }, - python = { - interpreterPath = "python" - }, - validation = { - enabled = true, - lint = { - enabled = true, - path = "ansible-lint" - } - } - } - }, + settings = { + ansible = { + ansible = { + path = "ansible", + }, + executionEnvironment = { + enabled = false, + }, + python = { + interpreterPath = "python", + }, + validation = { + enabled = true, + lint = { + enabled = true, + path = "ansible-lint", + }, + }, + }, + }, } diff --git a/home/modules/neovim/config/lua/lsp/settings/dockerls.lua b/home/modules/neovim/config/lua/lsp/settings/dockerls.lua index 6aa641e..7af4375 100644 --- a/home/modules/neovim/config/lua/lsp/settings/dockerls.lua +++ b/home/modules/neovim/config/lua/lsp/settings/dockerls.lua @@ -1,12 +1,11 @@ return { - settings = { - docker = { - languageserver = { - formatter = { - ignoreMultilineInstructions = true, - }, - }, - }, - }, + settings = { + docker = { + languageserver = { + formatter = { + ignoreMultilineInstructions = true, + }, + }, + }, + }, } - diff --git a/home/modules/neovim/config/lua/lsp/settings/gopls.lua b/home/modules/neovim/config/lua/lsp/settings/gopls.lua index a32108d..59edbb9 100644 --- a/home/modules/neovim/config/lua/lsp/settings/gopls.lua +++ b/home/modules/neovim/config/lua/lsp/settings/gopls.lua @@ -1,20 +1,19 @@ return { - settings = { - gopls = { - hints = { - assignVariableTypes = true, - compositeLiteralFields = true, - compositeLiteralTypes = true, - constantValues = true, - functionTypeParameters = true, - parameterNames = true, - rangeVariableTypes = true, - }, - usePlaceholders = true, - completeUnimported = true, - staticcheck = true, - semanticTokens = true, - }, - }, + settings = { + gopls = { + hints = { + assignVariableTypes = true, + compositeLiteralFields = true, + compositeLiteralTypes = true, + constantValues = true, + functionTypeParameters = true, + parameterNames = true, + rangeVariableTypes = true, + }, + usePlaceholders = true, + completeUnimported = true, + staticcheck = true, + semanticTokens = true, + }, + }, } - diff --git a/home/modules/neovim/config/lua/lsp/settings/helm_ls.lua b/home/modules/neovim/config/lua/lsp/settings/helm_ls.lua index c46d4e2..d115452 100644 --- a/home/modules/neovim/config/lua/lsp/settings/helm_ls.lua +++ b/home/modules/neovim/config/lua/lsp/settings/helm_ls.lua @@ -1,10 +1,9 @@ return { - settings = { - ['helm-ls'] = { - yamlls = { - path = "yaml-language-server", - } - } - }, + settings = { + ["helm-ls"] = { + yamlls = { + path = "yaml-language-server", + }, + }, + }, } - diff --git a/home/modules/neovim/config/lua/lsp/settings/jsonls.lua b/home/modules/neovim/config/lua/lsp/settings/jsonls.lua index b428e04..5eb5a19 100644 --- a/home/modules/neovim/config/lua/lsp/settings/jsonls.lua +++ b/home/modules/neovim/config/lua/lsp/settings/jsonls.lua @@ -6,4 +6,3 @@ return { }, }, } - diff --git a/home/modules/neovim/config/lua/lsp/settings/lua_ls.lua b/home/modules/neovim/config/lua/lsp/settings/lua_ls.lua index 174f79f..4b53f97 100644 --- a/home/modules/neovim/config/lua/lsp/settings/lua_ls.lua +++ b/home/modules/neovim/config/lua/lsp/settings/lua_ls.lua @@ -13,4 +13,3 @@ return { }, }, } - diff --git a/home/modules/neovim/config/lua/lsp/settings/nil_ls.lua b/home/modules/neovim/config/lua/lsp/settings/nil_ls.lua index 3ca5647..233d4b9 100644 --- a/home/modules/neovim/config/lua/lsp/settings/nil_ls.lua +++ b/home/modules/neovim/config/lua/lsp/settings/nil_ls.lua @@ -10,4 +10,5 @@ }, }, } -]]-- +]] +-- diff --git a/home/modules/neovim/config/lua/lsp/settings/pyright.lua b/home/modules/neovim/config/lua/lsp/settings/pyright.lua index 587cf33..6a0c23c 100644 --- a/home/modules/neovim/config/lua/lsp/settings/pyright.lua +++ b/home/modules/neovim/config/lua/lsp/settings/pyright.lua @@ -10,4 +10,3 @@ return { }, }, } - diff --git a/home/modules/neovim/config/lua/lsp/settings/yamlls.lua b/home/modules/neovim/config/lua/lsp/settings/yamlls.lua index 7c8e46b..28929ce 100644 --- a/home/modules/neovim/config/lua/lsp/settings/yamlls.lua +++ b/home/modules/neovim/config/lua/lsp/settings/yamlls.lua @@ -1,10 +1,12 @@ return { - settings = { - schemas = { - ["https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.18.0-standalone-strict/all.json"] = "/*.k8s.yaml", - ["https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json"] = {"ci/*.yml", ".gitlab-ci.yml"}, - kubernetes = "templates/**", - }, - }, + settings = { + schemas = { + ["https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.18.0-standalone-strict/all.json"] = "/*.k8s.yaml", + ["https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json"] = { + "ci/*.yml", + ".gitlab-ci.yml", + }, + kubernetes = "templates/**", + }, + }, } - diff --git a/home/modules/neovim/config/lua/plugins/auto-sessions.lua b/home/modules/neovim/config/lua/plugins/auto-sessions.lua index 8060823..661348b 100644 --- a/home/modules/neovim/config/lua/plugins/auto-sessions.lua +++ b/home/modules/neovim/config/lua/plugins/auto-sessions.lua @@ -1,19 +1,18 @@ return { - { - 'rmagatti/auto-session', - enable = true, - lazy = false, + { + "rmagatti/auto-session", + enable = true, + lazy = false, - config = function() - require("auto-session").setup({ - log_level = "error", - auto_session_enabled = true, - auto_session_root_dir = vim.fn.stdpath('data').."/sessions/", - pre_save_cmds = { close_floating_windows, close_toggleterm, "NvimTreeClose", }, - post_restore_cmds = { clear_jumps, "NvimTreeOpen", }, - save_extra_cmds = { "NvimTreeOpen", }, - }) - end, - }, + config = function() + require("auto-session").setup({ + log_level = "error", + auto_session_enabled = true, + auto_session_root_dir = vim.fn.stdpath("data") .. "/sessions/", + pre_save_cmds = { close_floating_windows, close_toggleterm, "NvimTreeClose" }, + post_restore_cmds = { clear_jumps, "NvimTreeOpen" }, + save_extra_cmds = { "NvimTreeOpen" }, + }) + end, + }, } - diff --git a/home/modules/neovim/config/lua/plugins/autopairs.lua b/home/modules/neovim/config/lua/plugins/autopairs.lua index 520baa6..cb2d0a5 100644 --- a/home/modules/neovim/config/lua/plugins/autopairs.lua +++ b/home/modules/neovim/config/lua/plugins/autopairs.lua @@ -1,39 +1,38 @@ return { - { - "windwp/nvim-autopairs", - enabled = true, - event = "InsertEnter", + { + "windwp/nvim-autopairs", + enabled = true, + event = "InsertEnter", - config = function() - local autopairs = require("nvim-autopairs") - local Rule = require("nvim-autopairs.rule") + config = function() + local autopairs = require("nvim-autopairs") + local Rule = require("nvim-autopairs.rule") - autopairs.setup({ - fast_wrap = {}, - disable_filetype = {}, - disable_in_macro = false, - disable_in_visualblock = false, - ignored_next_char = [=[[%w%%%'%[%"%.]]=], - enable_moveright = true, - enable_afterquote = true, - enable_check_bracket_line = true, - enable_bracket_in_quote = true, - break_undo = true, - check_ts = true, - map_cr = true, - map_bs = true, - map_c_h = false, - map_c_w = false, - }) + autopairs.setup({ + fast_wrap = {}, + disable_filetype = {}, + disable_in_macro = false, + disable_in_visualblock = false, + ignored_next_char = [=[[%w%%%'%[%"%.]]=], + enable_moveright = true, + enable_afterquote = true, + enable_check_bracket_line = true, + enable_bracket_in_quote = true, + break_undo = true, + check_ts = true, + map_cr = true, + map_bs = true, + map_c_h = false, + map_c_w = false, + }) - autopairs.add_rules({ - Rule(" ", " "):with_pair(function(opts) - local pair = opts.line:sub(opts.col - 1, opts.col) - return vim.tbl_contains({ "()", "[]", "{}" }, pair) - end), - Rule("|", "|", "rust"), - }) - end, - }, + autopairs.add_rules({ + Rule(" ", " "):with_pair(function(opts) + local pair = opts.line:sub(opts.col - 1, opts.col) + return vim.tbl_contains({ "()", "[]", "{}" }, pair) + end), + Rule("|", "|", "rust"), + }) + end, + }, } - diff --git a/home/modules/neovim/config/lua/plugins/autosave.lua b/home/modules/neovim/config/lua/plugins/autosave.lua index ac4053b..9c84199 100644 --- a/home/modules/neovim/config/lua/plugins/autosave.lua +++ b/home/modules/neovim/config/lua/plugins/autosave.lua @@ -1,37 +1,36 @@ return { - { - "Pocco81/auto-save.nvim", - enable = true, - lazy = false, + { + "Pocco81/auto-save.nvim", + enable = true, + lazy = false, - config = function() - local autosave = require("auto-save") + config = function() + local autosave = require("auto-save") - autosave.setup({ - enabled = true, - execution_message = { - message = function() -- message to print on save - return ("AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S")) - end, + autosave.setup({ + enabled = true, + execution_message = { + message = function() -- message to print on save + return ("AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S")) + end, - dim = 0.18, -- dim the color of `message` - cleaning_interval = 1250, -- (milliseconds) automatically clean MsgArea after displaying `message`. See :h MsgArea - }, + dim = 0.18, -- dim the color of `message` + cleaning_interval = 1250, -- (milliseconds) automatically clean MsgArea after displaying `message`. See :h MsgArea + }, - events = {"InsertLeave", "TextChanged"}, - conditions = { - exists = true, - filename_is_not = {}, - filetype_is_not = {}, - modifiable = true - }, + events = { "InsertLeave", "TextChanged" }, + conditions = { + exists = true, + filename_is_not = {}, + filetype_is_not = {}, + modifiable = true, + }, - write_all_buffers = false, - on_off_commands = true, - clean_command_line_interval = 0, - debounce_delay = 135, - }) - end, - }, + write_all_buffers = false, + on_off_commands = true, + clean_command_line_interval = 0, + debounce_delay = 135, + }) + end, + }, } - diff --git a/home/modules/neovim/config/lua/plugins/barbar.lua b/home/modules/neovim/config/lua/plugins/barbar.lua index 2496749..c14deda 100644 --- a/home/modules/neovim/config/lua/plugins/barbar.lua +++ b/home/modules/neovim/config/lua/plugins/barbar.lua @@ -1,22 +1,23 @@ return { - { - 'romgrk/barbar.nvim', - enable = true, - lazy = false, + { + "romgrk/barbar.nvim", + enable = true, + lazy = false, - dependencies = { - 'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status - 'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons - }, + dependencies = { + "lewis6991/gitsigns.nvim", -- OPTIONAL: for git status + "nvim-tree/nvim-web-devicons", -- OPTIONAL: for file icons + }, - init = function() vim.g.barbar_auto_setup = false end, - opts = { - -- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default: - -- animation = true, - -- insert_at_start = true, - -- …etc. - }, - version = '^1.0.0', - }, + init = function() + vim.g.barbar_auto_setup = false + end, + opts = { + -- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default: + -- animation = true, + -- insert_at_start = true, + -- …etc. + }, + version = "^1.0.0", + }, } - diff --git a/home/modules/neovim/config/lua/plugins/blankline.lua b/home/modules/neovim/config/lua/plugins/blankline.lua index 7cd290e..7ab2399 100644 --- a/home/modules/neovim/config/lua/plugins/blankline.lua +++ b/home/modules/neovim/config/lua/plugins/blankline.lua @@ -1,50 +1,49 @@ return { - { - { - "lukas-reineke/indent-blankline.nvim", - event = { "BufReadPost", "BufNewFile" }, - config = function() - require("ibl").setup({ - indent = { - char = "▏", - }, - scope = { - show_start = false, - show_end = false, - }, - }) - end, - main = "ibl", - }, + { + { + "lukas-reineke/indent-blankline.nvim", + event = { "BufReadPost", "BufNewFile" }, + config = function() + require("ibl").setup({ + indent = { + char = "▏", + }, + scope = { + show_start = false, + show_end = false, + }, + }) + end, + main = "ibl", + }, - { - "echasnovski/mini.indentscope", - enabled = false, - version = false, - event = { "BufReadPre", "BufNewFile" }, - opts = { - symbol = "▏", - options = { try_as_border = true }, - }, - init = function() - vim.api.nvim_create_autocmd("FileType", { - pattern = { - "help", - "alpha", - "dashboard", - "NvimTree", - "Trouble", - "lazy", - "notify", - "toggleterm", - "lazyterm", - }, - callback = function() - vim.b.miniindentscope_disable = true - end, - }) - end, - }, - }, + { + "echasnovski/mini.indentscope", + enabled = false, + version = false, + event = { "BufReadPre", "BufNewFile" }, + opts = { + symbol = "▏", + options = { try_as_border = true }, + }, + init = function() + vim.api.nvim_create_autocmd("FileType", { + pattern = { + "help", + "alpha", + "dashboard", + "NvimTree", + "Trouble", + "lazy", + "notify", + "toggleterm", + "lazyterm", + }, + callback = function() + vim.b.miniindentscope_disable = true + end, + }) + end, + }, + }, } - diff --git a/home/modules/neovim/config/lua/plugins/cmp.lua b/home/modules/neovim/config/lua/plugins/cmp.lua index 39d2145..f963f93 100644 --- a/home/modules/neovim/config/lua/plugins/cmp.lua +++ b/home/modules/neovim/config/lua/plugins/cmp.lua @@ -156,4 +156,3 @@ return { end, }, } - diff --git a/home/modules/neovim/config/lua/plugins/comment.lua b/home/modules/neovim/config/lua/plugins/comment.lua index ecc29ac..4cf712d 100644 --- a/home/modules/neovim/config/lua/plugins/comment.lua +++ b/home/modules/neovim/config/lua/plugins/comment.lua @@ -29,4 +29,3 @@ return { end, }, } - diff --git a/home/modules/neovim/config/lua/plugins/dressing.lua b/home/modules/neovim/config/lua/plugins/dressing.lua index e9969c7..f461cb1 100644 --- a/home/modules/neovim/config/lua/plugins/dressing.lua +++ b/home/modules/neovim/config/lua/plugins/dressing.lua @@ -1,40 +1,38 @@ - return { - { - "stevearc/dressing.nvim", - event = "VeryLazy", - opts = { - input = { - title_pos = "center", - relative = "cursor", - insert_only = false, - start_in_insert = true, - win_options = { - wrap = false, - }, - }, - select = { - backend = { "builtin" }, - get_config = function(opts) - if opts.kind == "codeaction" then - return { - backend = "builtin", - builtin = { - relative = "cursor", - max_height = 0.30, - min_height = 3, - max_width = 0.40, - mappings = { ["q"] = "Close" }, - }, - } - end - end, - mappings = { - [""] = "Close", - [""] = "Confirm", - }, - }, - }, - }, + { + "stevearc/dressing.nvim", + event = "VeryLazy", + opts = { + input = { + title_pos = "center", + relative = "cursor", + insert_only = false, + start_in_insert = true, + win_options = { + wrap = false, + }, + }, + select = { + backend = { "builtin" }, + get_config = function(opts) + if opts.kind == "codeaction" then + return { + backend = "builtin", + builtin = { + relative = "cursor", + max_height = 0.30, + min_height = 3, + max_width = 0.40, + mappings = { ["q"] = "Close" }, + }, + } + end + end, + mappings = { + [""] = "Close", + [""] = "Confirm", + }, + }, + }, + }, } - diff --git a/home/modules/neovim/config/lua/plugins/git.lua b/home/modules/neovim/config/lua/plugins/git.lua index d961346..385fcf2 100644 --- a/home/modules/neovim/config/lua/plugins/git.lua +++ b/home/modules/neovim/config/lua/plugins/git.lua @@ -1,16 +1,15 @@ return { - "kdheepak/lazygit.nvim", - lazy = true, - cmd = { - "LazyGit", - "LazyGitConfig", - "LazyGitCurrentFile", - "LazyGitFilter", - "LazyGitFilterCurrentFile", - }, + "kdheepak/lazygit.nvim", + lazy = true, + cmd = { + "LazyGit", + "LazyGitConfig", + "LazyGitCurrentFile", + "LazyGitFilter", + "LazyGitFilterCurrentFile", + }, - dependencies = { - "nvim-lua/plenary.nvim", - }, + dependencies = { + "nvim-lua/plenary.nvim", + }, } - diff --git a/home/modules/neovim/config/lua/plugins/gitsings.lua b/home/modules/neovim/config/lua/plugins/gitsings.lua index 04950d9..08ba7d8 100644 --- a/home/modules/neovim/config/lua/plugins/gitsings.lua +++ b/home/modules/neovim/config/lua/plugins/gitsings.lua @@ -46,4 +46,3 @@ return { end, }, } - diff --git a/home/modules/neovim/config/lua/plugins/lualine.lua b/home/modules/neovim/config/lua/plugins/lualine.lua index 8a7c365..1d1f0bf 100644 --- a/home/modules/neovim/config/lua/plugins/lualine.lua +++ b/home/modules/neovim/config/lua/plugins/lualine.lua @@ -1,222 +1,221 @@ return { - { - "nvim-lualine/lualine.nvim", - enable = true, - event = "VeryLazy", - config = function() - local lualine = require("lualine") - - local colors = { - bg = "#2e3440", - fg = "#3b4252", - yellow = "#f9e2af", - green = "#a6e3a1", - magenta = "#cba6f7", - lavender = "#b4befe", - blue = "#89b4fa", - red = "#f38ba8", - white = "#cdd6f4", - overlay0 = "#6c7086", - overlay1 = "#7f849c", - overlay2 = "#9399b2", - surface1 = "#45475a", - surface0 = "#313244" - } - - local conditions = { - buffer_not_empty = function() - return vim.fn.empty(vim.fn.expand("%:t")) ~= 1 - end, - hide_in_width = function() - return vim.fn.winwidth(0) > 80 - end, - check_git_workspace = function() - local filepath = vim.fn.expand("%:p:h") - local gitdir = vim.fn.finddir(".git", filepath .. ";") - return gitdir and #gitdir > 0 and #gitdir < #filepath - end, - } - - -- Config - local config = { - options = { - component_separators = "", - section_separators = "", - theme = { - normal = { c = { fg = colors.fg, bg = colors.bg } }, - inactive = { c = { fg = colors.fg, bg = colors.bg } }, - }, - }, - sections = { - -- these are to remove the defaults - lualine_a = {}, - lualine_b = {}, - lualine_y = {}, - lualine_z = {}, - -- These will be filled later - lualine_c = {}, - lualine_x = {}, - }, - inactive_sections = { - -- these are to remove the defaults - lualine_a = {}, - lualine_b = {}, - lualine_y = {}, - lualine_z = {}, - lualine_c = {}, - lualine_x = {}, - }, - } - - local function ins_left(component) - table.insert(config.sections.lualine_c, component) - end - - local function ins_right(component) - table.insert(config.sections.lualine_x, component) - end - - local mode_color = { - n = colors.blue, - i = colors.green, - v = colors.red, - [""] = colors.red, - V = colors.blue, - c = colors.yellow, - no = colors.red, - s = colors.orange, - S = colors.orange, - [""] = colors.orange, - ic = colors.yellow, - R = colors.lavender, - Rv = colors.lavender, - cv = colors.red, - ce = colors.red, - r = colors.cyan, - rm = colors.cyan, - ["r?"] = colors.cyan, - ["!"] = colors.red, - t = colors.red, - } - - ins_left({ - -- mode component - function() - local mode_icon = { - n = "NORMAL", - i = "INSERT", - v = "VISUAL", - c = "COMMAND", - t = "TERMINAL", - [""] = "V-BLOCK", - } - return mode_icon[vim.fn.mode()] - end, - color = function() - return { gui = "bold", bg = mode_color[vim.fn.mode()], fg = "#1f2228" } - end, - padding = { right = 2, left = 2 }, - }) - - ins_left({ - function() - local icon - local ok, devicons = pcall(require, "nvim-web-devicons") - if ok then - icon = devicons.get_icon(vim.fn.expand("%:t")) - if icon == nil then - icon = devicons.get_icon_by_filetype(vim.bo.filetype) - end - else - if vim.fn.exists("*WebDevIconsGetFileTypeSymbol") > 0 then - icon = vim.fn.WebDevIconsGetFileTypeSymbol() - end - end - return icon:gsub("%s+", "") - end, - color = function() - return { fg = colors.white, bg = colors.surface0 } - end, - }) - - ins_left({ - "filename", - cond = conditions.buffer_not_empty, - color = { fg = colors.white, bg = colors.surface0, gui = "bold" }, - padding = { right = 1, left = 1 }, - }) - - ins_left({ - "branch", - icon = "󰘬", - color = function() - return { fg = colors.overlay2, gui = "bold" } - end, - padding = { right = 1, left = 1 }, - }) - - ins_left({ - "diff", - symbols = { added = "οƒΎ ", modified = "󱓻 ", removed = "ο…† " }, - diff_color = { - added = { fg = colors.overlay2 }, - modified = { fg = colors.overlay2 }, - removed = { fg = colors.overlay2 }, - }, - cond = conditions.hide_in_width, - }) - - ins_right({ - "diagnostics", - sources = { "nvim_diagnostic" }, - symbols = { error = ' ', warn = ' ', info = 'οͺ ' }, - diagnostics_color = { - color_error = { fg = colors.red }, - color_warn = { fg = colors.yellow }, - color_info = { fg = colors.cyan }, - }, - }) - - ins_right({ - -- Lsp server name . - function() - local msg = "No Active Lsp" - local buf_ft = vim.api.nvim_buf_get_option(0, "filetype") - local clients = vim.lsp.get_active_clients() - if next(clients) == nil then - return msg - end - for _, client in ipairs(clients) do - local filetypes = client.config.filetypes - if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then - return client.name - end - end - return msg - end, - icon = "ο‚… LSP ~", - color = { fg = colors.overlay2, gui = "bold" }, - }) - - ins_right({ - function() - local icon = " 󰉋 " - local name = vim.loop.cwd():match ".+[\\/](.-)$" .. " " - return (icon .. name) or "" - end, - color = { fg = colors.white, bg = colors.surface0, gui = "bold" }, - }) - - ins_right({ - "progress", - color = function() - return { bg = mode_color[vim.fn.mode()], fg = "#1f2228", gui = "bold" } - end, - padding = { left = 2, right = 2 }, - }) - - lualine.setup(config) - end, - }, + { + "nvim-lualine/lualine.nvim", + enable = true, + event = "VeryLazy", + config = function() + local lualine = require("lualine") + + local colors = { + bg = "#2e3440", + fg = "#3b4252", + yellow = "#f9e2af", + green = "#a6e3a1", + magenta = "#cba6f7", + lavender = "#b4befe", + blue = "#89b4fa", + red = "#f38ba8", + white = "#cdd6f4", + overlay0 = "#6c7086", + overlay1 = "#7f849c", + overlay2 = "#9399b2", + surface1 = "#45475a", + surface0 = "#313244", + } + + local conditions = { + buffer_not_empty = function() + return vim.fn.empty(vim.fn.expand("%:t")) ~= 1 + end, + hide_in_width = function() + return vim.fn.winwidth(0) > 80 + end, + check_git_workspace = function() + local filepath = vim.fn.expand("%:p:h") + local gitdir = vim.fn.finddir(".git", filepath .. ";") + return gitdir and #gitdir > 0 and #gitdir < #filepath + end, + } + + -- Config + local config = { + options = { + component_separators = "", + section_separators = "", + theme = { + normal = { c = { fg = colors.fg, bg = colors.bg } }, + inactive = { c = { fg = colors.fg, bg = colors.bg } }, + }, + }, + sections = { + -- these are to remove the defaults + lualine_a = {}, + lualine_b = {}, + lualine_y = {}, + lualine_z = {}, + -- These will be filled later + lualine_c = {}, + lualine_x = {}, + }, + inactive_sections = { + -- these are to remove the defaults + lualine_a = {}, + lualine_b = {}, + lualine_y = {}, + lualine_z = {}, + lualine_c = {}, + lualine_x = {}, + }, + } + + local function ins_left(component) + table.insert(config.sections.lualine_c, component) + end + + local function ins_right(component) + table.insert(config.sections.lualine_x, component) + end + + local mode_color = { + n = colors.blue, + i = colors.green, + v = colors.red, + [""] = colors.red, + V = colors.blue, + c = colors.yellow, + no = colors.red, + s = colors.orange, + S = colors.orange, + [""] = colors.orange, + ic = colors.yellow, + R = colors.lavender, + Rv = colors.lavender, + cv = colors.red, + ce = colors.red, + r = colors.cyan, + rm = colors.cyan, + ["r?"] = colors.cyan, + ["!"] = colors.red, + t = colors.red, + } + + ins_left({ + -- mode component + function() + local mode_icon = { + n = "NORMAL", + i = "INSERT", + v = "VISUAL", + c = "COMMAND", + t = "TERMINAL", + [""] = "V-BLOCK", + } + return mode_icon[vim.fn.mode()] + end, + color = function() + return { gui = "bold", bg = mode_color[vim.fn.mode()], fg = "#1f2228" } + end, + padding = { right = 2, left = 2 }, + }) + + ins_left({ + function() + local icon + local ok, devicons = pcall(require, "nvim-web-devicons") + if ok then + icon = devicons.get_icon(vim.fn.expand("%:t")) + if icon == nil then + icon = devicons.get_icon_by_filetype(vim.bo.filetype) + end + else + if vim.fn.exists("*WebDevIconsGetFileTypeSymbol") > 0 then + icon = vim.fn.WebDevIconsGetFileTypeSymbol() + end + end + return icon:gsub("%s+", "") + end, + color = function() + return { fg = colors.white, bg = colors.surface0 } + end, + }) + + ins_left({ + "filename", + cond = conditions.buffer_not_empty, + color = { fg = colors.white, bg = colors.surface0, gui = "bold" }, + padding = { right = 1, left = 1 }, + }) + + ins_left({ + "branch", + icon = "󰘬", + color = function() + return { fg = colors.overlay2, gui = "bold" } + end, + padding = { right = 1, left = 1 }, + }) + + ins_left({ + "diff", + symbols = { added = "οƒΎ ", modified = "󱓻 ", removed = "ο…† " }, + diff_color = { + added = { fg = colors.overlay2 }, + modified = { fg = colors.overlay2 }, + removed = { fg = colors.overlay2 }, + }, + cond = conditions.hide_in_width, + }) + + ins_right({ + "diagnostics", + sources = { "nvim_diagnostic" }, + symbols = { error = " ", warn = " ", info = "οͺ " }, + diagnostics_color = { + color_error = { fg = colors.red }, + color_warn = { fg = colors.yellow }, + color_info = { fg = colors.cyan }, + }, + }) + + ins_right({ + -- Lsp server name . + function() + local msg = "No Active Lsp" + local buf_ft = vim.api.nvim_buf_get_option(0, "filetype") + local clients = vim.lsp.get_active_clients() + if next(clients) == nil then + return msg + end + for _, client in ipairs(clients) do + local filetypes = client.config.filetypes + if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then + return client.name + end + end + return msg + end, + icon = "ο‚… LSP ~", + color = { fg = colors.overlay2, gui = "bold" }, + }) + + ins_right({ + function() + local icon = " 󰉋 " + local name = vim.loop.cwd():match(".+[\\/](.-)$") .. " " + return (icon .. name) or "" + end, + color = { fg = colors.white, bg = colors.surface0, gui = "bold" }, + }) + + ins_right({ + "progress", + color = function() + return { bg = mode_color[vim.fn.mode()], fg = "#1f2228", gui = "bold" } + end, + padding = { left = 2, right = 2 }, + }) + + lualine.setup(config) + end, + }, } - diff --git a/home/modules/neovim/config/lua/plugins/markdown-preview.lua b/home/modules/neovim/config/lua/plugins/markdown-preview.lua index 5d8b7b1..980a8e0 100644 --- a/home/modules/neovim/config/lua/plugins/markdown-preview.lua +++ b/home/modules/neovim/config/lua/plugins/markdown-preview.lua @@ -9,4 +9,3 @@ return { end, }, } - diff --git a/home/modules/neovim/config/lua/plugins/mini.lua b/home/modules/neovim/config/lua/plugins/mini.lua index c59d414..744374b 100644 --- a/home/modules/neovim/config/lua/plugins/mini.lua +++ b/home/modules/neovim/config/lua/plugins/mini.lua @@ -1,10 +1,9 @@ return { { - "echasnovski/mini.nvim", - event = { "BufReadPre" }, - config = function() - require('mini.align').setup() - end, + "echasnovski/mini.nvim", + event = { "BufReadPre" }, + config = function() + require("mini.align").setup() + end, }, } - diff --git a/home/modules/neovim/config/lua/plugins/mylsp.lua b/home/modules/neovim/config/lua/plugins/mylsp.lua index d45b403..9f0deed 100644 --- a/home/modules/neovim/config/lua/plugins/mylsp.lua +++ b/home/modules/neovim/config/lua/plugins/mylsp.lua @@ -2,17 +2,16 @@ return { { "neovim/nvim-lspconfig", enable = true, - lazy = false, - -- event = { "VeryLazy" }, + lazy = false, + -- event = { "VeryLazy" }, dependencies = { "b0o/schemastore.nvim", - "nvim-lua/plenary.nvim" + "nvim-lua/plenary.nvim", }, config = function() - require("lsp.init") - end, + require("lsp.init") + end, }, } - diff --git a/home/modules/neovim/config/lua/plugins/noice.lua b/home/modules/neovim/config/lua/plugins/noice.lua index e87de62..caaf1c0 100644 --- a/home/modules/neovim/config/lua/plugins/noice.lua +++ b/home/modules/neovim/config/lua/plugins/noice.lua @@ -1,47 +1,46 @@ return { - { - "folke/noice.nvim", - version = "4.4.7", - event = "VimEnter", - enabled = not vim.g.started_by_firenvim, + { + "folke/noice.nvim", + version = "4.4.7", + event = "VimEnter", + enabled = not vim.g.started_by_firenvim, - opts = { - lsp = { - signature = { - enabled = true, - }, - }, - presets = { - lsp_doc_border = true, - bottom_search = true, - command_palette = true, - long_message_to_split = true, - inc_rename = true, - }, - }, - dependencies = { - { - "rcarriga/nvim-notify", - config = function() - require("notify").setup({ - minimum_width = 50, - background_colour = "#1d2021", - stages = "static", - render = "minimal", - timeout = 1500, - }) - local notify = require("notify") - vim.notify = notify - end, - }, - { - "MunifTanjim/nui.nvim", - }, - }, - }, + opts = { + lsp = { + signature = { + enabled = true, + }, + }, + presets = { + lsp_doc_border = true, + bottom_search = true, + command_palette = true, + long_message_to_split = true, + inc_rename = true, + }, + }, + dependencies = { + { + "rcarriga/nvim-notify", + config = function() + require("notify").setup({ + minimum_width = 50, + background_colour = "#1d2021", + stages = "static", + render = "minimal", + timeout = 1500, + }) + local notify = require("notify") + vim.notify = notify + end, + }, + { + "MunifTanjim/nui.nvim", + }, + }, + }, - vim.api.nvim_set_hl(0, "NoiceCmdlineIcon", { fg = "#dcd7ba" }), - vim.api.nvim_set_hl(0, "NoiceCmdlinePopupTitle", { fg = "#dcd7ba" }), - vim.api.nvim_set_hl(0, "NoiceCmdlinePopupBorder", { fg = "#dcd7ba" }), + vim.api.nvim_set_hl(0, "NoiceCmdlineIcon", { fg = "#dcd7ba" }), + vim.api.nvim_set_hl(0, "NoiceCmdlinePopupTitle", { fg = "#dcd7ba" }), + vim.api.nvim_set_hl(0, "NoiceCmdlinePopupBorder", { fg = "#dcd7ba" }), } - diff --git a/home/modules/neovim/config/lua/plugins/nvim-ansible.lua b/home/modules/neovim/config/lua/plugins/nvim-ansible.lua index f95bdc8..8c51df1 100644 --- a/home/modules/neovim/config/lua/plugins/nvim-ansible.lua +++ b/home/modules/neovim/config/lua/plugins/nvim-ansible.lua @@ -1,8 +1,7 @@ return { - { - 'mfussenegger/nvim-ansible', - enable = true, - lazy = false, - }, + { + "mfussenegger/nvim-ansible", + enable = true, + lazy = false, + }, } - diff --git a/home/modules/neovim/config/lua/plugins/nvim-tree.lua b/home/modules/neovim/config/lua/plugins/nvim-tree.lua index 38b5777..cb7e656 100644 --- a/home/modules/neovim/config/lua/plugins/nvim-tree.lua +++ b/home/modules/neovim/config/lua/plugins/nvim-tree.lua @@ -2,96 +2,95 @@ local HEIGHT_RATIO = 0.9 local WIDTH_RATIO = 0.5 return { - { - "nvim-tree/nvim-tree.lua", - cmd = { "NvimTreeToggle", "NvimTreeOpen" }, - enabled = true, + { + "nvim-tree/nvim-tree.lua", + cmd = { "NvimTreeToggle", "NvimTreeOpen" }, + enabled = true, - config = function() - require("nvim-tree").setup({ - sync_root_with_cwd = true, - respect_buf_cwd = true, - update_focused_file = { - enable = true, - update_root = true, - }, + config = function() + require("nvim-tree").setup({ + sync_root_with_cwd = true, + respect_buf_cwd = true, + update_focused_file = { + enable = true, + update_root = true, + }, - sort_by = "case_sensitive", + sort_by = "case_sensitive", - view = { - number = false, - float = { - enable = true, - open_win_config = function() - local screen_w = vim.opt.columns:get() - local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get() - local window_w = screen_w * WIDTH_RATIO - local window_h = screen_h * HEIGHT_RATIO - local window_w_int = math.floor(window_w) - local window_h_int = math.floor(window_h) - local center_x = (screen_w - window_w) / 2 - local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get() - return { - border = "rounded", - relative = "editor", - row = center_y, - col = center_x, - width = window_w_int, - height = window_h_int, - } - end, - }, - width = function() - return math.floor(vim.opt.columns:get() * WIDTH_RATIO) - end, - }, - hijack_cursor = false, - renderer = { - group_empty = true, - full_name = true, - indent_markers = { - enable = true, - }, - icons = { - show = { - file = true, - folder = true, - folder_arrow = true, - }, - glyphs = { - default = "󰈚", - symlink = "", - folder = { - default = "", - empty = "ξͺƒ", - empty_open = "", - open = "ξ«Ά", - symlink = "ξ«­", - symlink_open = "ο’‚", - arrow_open = "ο‘Ό", - arrow_closed = "ο‘ ", - }, - git = { - untracked = "ο‘΄", - staged = "ο‘—", - deleted = "ο‘˜", - unstaged = "σ°œ€", - renamed = "ο‘š", - ignored = 'β—Œ', - unmerged = "", - }, - }, - }, - }, - filters = { - dotfiles = true, - }, - diagnostics = { - enable = true, - show_on_dirs = true, - }, - }) - end, - }, + view = { + number = false, + float = { + enable = true, + open_win_config = function() + local screen_w = vim.opt.columns:get() + local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get() + local window_w = screen_w * WIDTH_RATIO + local window_h = screen_h * HEIGHT_RATIO + local window_w_int = math.floor(window_w) + local window_h_int = math.floor(window_h) + local center_x = (screen_w - window_w) / 2 + local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get() + return { + border = "rounded", + relative = "editor", + row = center_y, + col = center_x, + width = window_w_int, + height = window_h_int, + } + end, + }, + width = function() + return math.floor(vim.opt.columns:get() * WIDTH_RATIO) + end, + }, + hijack_cursor = false, + renderer = { + group_empty = true, + full_name = true, + indent_markers = { + enable = true, + }, + icons = { + show = { + file = true, + folder = true, + folder_arrow = true, + }, + glyphs = { + default = "󰈚", + symlink = "", + folder = { + default = "", + empty = "ξͺƒ", + empty_open = "", + open = "ξ«Ά", + symlink = "ξ«­", + symlink_open = "ο’‚", + arrow_open = "ο‘Ό", + arrow_closed = "ο‘ ", + }, + git = { + untracked = "ο‘΄", + staged = "ο‘—", + deleted = "ο‘˜", + unstaged = "σ°œ€", + renamed = "ο‘š", + ignored = "β—Œ", + unmerged = "", + }, + }, + }, + }, + filters = { + dotfiles = true, + }, + diagnostics = { + enable = true, + show_on_dirs = true, + }, + }) + end, + }, } - diff --git a/home/modules/neovim/config/lua/plugins/telescope.lua b/home/modules/neovim/config/lua/plugins/telescope.lua index da9aab9..b082a4f 100644 --- a/home/modules/neovim/config/lua/plugins/telescope.lua +++ b/home/modules/neovim/config/lua/plugins/telescope.lua @@ -91,4 +91,3 @@ return { end, }, } - diff --git a/home/modules/neovim/config/lua/plugins/theme.lua b/home/modules/neovim/config/lua/plugins/theme.lua index c020b82..5398bbf 100644 --- a/home/modules/neovim/config/lua/plugins/theme.lua +++ b/home/modules/neovim/config/lua/plugins/theme.lua @@ -1,12 +1,11 @@ return { - { - "shaunsingh/nord.nvim", - enable = true, - lazy = false, + { + "shaunsingh/nord.nvim", + enable = true, + lazy = false, - config = function() - vim.cmd[[colorscheme nord]] - end, - }, + config = function() + vim.cmd([[colorscheme nord]]) + end, + }, } - diff --git a/home/modules/neovim/config/lua/plugins/treesitter.lua b/home/modules/neovim/config/lua/plugins/treesitter.lua index 25950f7..fd073e6 100644 --- a/home/modules/neovim/config/lua/plugins/treesitter.lua +++ b/home/modules/neovim/config/lua/plugins/treesitter.lua @@ -1,38 +1,37 @@ return { - { - "nvim-treesitter/nvim-treesitter", - enable = true, - lazy = false, + { + "nvim-treesitter/nvim-treesitter", + enable = true, + lazy = false, - config = function() - require("nvim-treesitter.configs").setup({ - ensure_installed = { - "c", - "go", - "tsx", - "cpp", - "lua", - "nix", - "yaml", - "json", - "cmake", - "python", - "typescript", - "javascript" - }, + config = function() + require("nvim-treesitter.configs").setup({ + ensure_installed = { + "c", + "go", + "tsx", + "cpp", + "lua", + "nix", + "yaml", + "json", + "cmake", + "python", + "typescript", + "javascript", + }, - ignore_install = {}, + ignore_install = {}, - highlight = { - enable = true, - disable = { "help" }, - }, + highlight = { + enable = true, + disable = { "help" }, + }, - indent = { - enable = true, - }, - }) - end, - }, + indent = { + enable = true, + }, + }) + end, + }, } - diff --git a/home/modules/neovim/config/lua/plugins/vim-helm.lua b/home/modules/neovim/config/lua/plugins/vim-helm.lua index 2866995..2a3af56 100644 --- a/home/modules/neovim/config/lua/plugins/vim-helm.lua +++ b/home/modules/neovim/config/lua/plugins/vim-helm.lua @@ -1,10 +1,9 @@ return { - { - 'towolf/vim-helm', - enable = true, - lazy = false, + { + "towolf/vim-helm", + enable = true, + lazy = false, - ft = 'helm', - }, + ft = "helm", + }, } - diff --git a/home/modules/neovim/default.nix b/home/modules/neovim/default.nix index 3e14f6a..0a71df3 100644 --- a/home/modules/neovim/default.nix +++ b/home/modules/neovim/default.nix @@ -1,15 +1,17 @@ -{ self -, lib -, config -, pkgs -, ... +{ + self, + lib, + config, + pkgs, + ... }: with lib; let cfg = config.module.nvim; -in { +in +{ options = { module.nvim.enable = mkEnableOption "Enables nvim"; }; @@ -46,4 +48,3 @@ in { }; }; } - diff --git a/home/modules/password-store/default.nix b/home/modules/password-store/default.nix index d7c3734..260911d 100644 --- a/home/modules/password-store/default.nix +++ b/home/modules/password-store/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.password-store; -in { +in +{ options = { module.password-store.enable = mkEnableOption "Enables password-store"; }; @@ -22,4 +24,3 @@ in { }; }; } - diff --git a/home/modules/ripgrep/default.nix b/home/modules/ripgrep/default.nix index 679f249..2dd864c 100644 --- a/home/modules/ripgrep/default.nix +++ b/home/modules/ripgrep/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.ripgrep; -in { +in +{ options = { module.ripgrep.enable = mkEnableOption "Enables ripgrep"; }; @@ -18,4 +20,3 @@ in { }; }; } - diff --git a/home/modules/rofi/default.nix b/home/modules/rofi/default.nix index 59b235e..a724a81 100644 --- a/home/modules/rofi/default.nix +++ b/home/modules/rofi/default.nix @@ -1,14 +1,16 @@ -{ config -, lib -, pkgs -, ... +{ + config, + lib, + pkgs, + ... }: with lib; let cfg = config.module.rofi; -in { +in +{ options = { module.rofi.enable = mkEnableOption "Enables rofi"; }; @@ -33,81 +35,85 @@ in { drun-display-format = "{name}"; }; - theme = let - inherit (config.lib.formats.rasi) mkLiteral; - in { - "*" = { - width = 500; + theme = + let + inherit (config.lib.formats.rasi) mkLiteral; + in + { + "*" = { + width = 500; + }; + + "window" = { + height = mkLiteral "550px"; + border = mkLiteral "3px"; + }; + + "inputbar" = { + children = map mkLiteral [ + "prompt" + "entry" + ]; + border-radius = mkLiteral "5px"; + padding = mkLiteral "2px"; + }; + + "prompt" = { + padding = mkLiteral "6px"; + border-radius = mkLiteral "3px"; + margin = mkLiteral "20px 0px 0px 20px"; + }; + + "textbox-prompt-colon" = { + expand = "false"; + str = ":"; + }; + + "entry" = { + padding = mkLiteral "6px"; + border-radius = mkLiteral "3px"; + margin = mkLiteral "20px 10px 0px 10px"; + }; + + "listview" = { + border = mkLiteral "0px 0px 0px"; + padding = mkLiteral "6px 0px 0px"; + margin = mkLiteral "10px 15px 0px 20px"; + columns = "2"; + lines = "8"; + }; + + "element" = { + padding = mkLiteral "5px"; + }; + + "element-icon" = { + size = mkLiteral "25px"; + }; + + "element selected" = { + border-radius = mkLiteral "3px"; + }; + + "button" = { + padding = mkLiteral "10px"; + vertical-align = mkLiteral "0.5"; + horizontal-align = mkLiteral "0.5"; + }; + + "textbox" = { + vertical-align = mkLiteral "0.5"; + horizontal-align = mkLiteral "0.0"; + blink = true; + markup = true; + }; + + "error-message" = { + padding = mkLiteral "10px"; + border = mkLiteral "0px solid"; + border-radius = mkLiteral "0px"; + }; }; - - "window" = { - height = mkLiteral "550px"; - border = mkLiteral "3px"; - }; - - "inputbar" = { - children = map mkLiteral ["prompt" "entry"]; - border-radius = mkLiteral "5px"; - padding = mkLiteral "2px"; - }; - - "prompt" = { - padding = mkLiteral "6px"; - border-radius = mkLiteral "3px"; - margin = mkLiteral "20px 0px 0px 20px"; - }; - - "textbox-prompt-colon" = { - expand = "false"; - str = ":"; - }; - - "entry" = { - padding = mkLiteral "6px"; - border-radius = mkLiteral "3px"; - margin = mkLiteral "20px 10px 0px 10px"; - }; - - "listview" = { - border = mkLiteral "0px 0px 0px"; - padding = mkLiteral "6px 0px 0px"; - margin = mkLiteral "10px 15px 0px 20px"; - columns = "2"; - lines = "8"; - }; - - "element" = { - padding = mkLiteral "5px"; - }; - - "element-icon" = { - size = mkLiteral "25px"; - }; - - "element selected" = { - border-radius = mkLiteral "3px"; - }; - - "button" = { - padding = mkLiteral "10px"; - vertical-align = mkLiteral "0.5"; - horizontal-align = mkLiteral "0.5"; - }; - - "textbox" = { - vertical-align = mkLiteral "0.5"; - horizontal-align = mkLiteral "0.0"; - blink = true; - markup = true; - }; - - "error-message" = { - padding = mkLiteral "10px"; - border = mkLiteral "0px solid"; - border-radius = mkLiteral "0px"; - }; - }; }; }; } - diff --git a/home/modules/swaylock/default.nix b/home/modules/swaylock/default.nix index 2c356ee..4e0fc8d 100644 --- a/home/modules/swaylock/default.nix +++ b/home/modules/swaylock/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.swaylock; -in { +in +{ options = { module.swaylock = { enable = mkEnableOption "Enable swaylock"; @@ -20,4 +22,3 @@ in { }; }; } - diff --git a/home/modules/swaync/default.nix b/home/modules/swaync/default.nix index 1950c90..b32e521 100644 --- a/home/modules/swaync/default.nix +++ b/home/modules/swaync/default.nix @@ -1,16 +1,18 @@ -{ self -, lib -, config -, ... +{ + self, + lib, + config, + ... }: with lib; let cfg = config.module.swaync; -in { - options = { - module.swaync.enable = mkEnableOption "Enables swaync"; +in +{ + options = { + module.swaync.enable = mkEnableOption "Enables swaync"; }; config = mkIf cfg.enable { @@ -58,7 +60,12 @@ in { hide-on-clear = false; # Widget settings - widgets = ["title" "dnd" "notifications" "mpris"]; + widgets = [ + "title" + "dnd" + "notifications" + "mpris" + ]; # Widget config widget-config = { @@ -67,7 +74,9 @@ in { clear-all-button = true; button-text = "Clear All"; }; - dnd = {text = "Do Not Disturb";}; + dnd = { + text = "Do Not Disturb"; + }; mpris = { image-size = 96; image-radius = 12; @@ -81,4 +90,3 @@ in { }; }; } - diff --git a/home/modules/swaync/style.css b/home/modules/swaync/style.css index 336eb5e..4f85944 100644 --- a/home/modules/swaync/style.css +++ b/home/modules/swaync/style.css @@ -98,4 +98,3 @@ trough { border-radius: 8px; padding: 0.25rem; } - diff --git a/home/modules/thunderbird/default.nix b/home/modules/thunderbird/default.nix index 6e37ffa..99f04a9 100644 --- a/home/modules/thunderbird/default.nix +++ b/home/modules/thunderbird/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.thunderbird; -in { +in +{ options = { module.thunderbird.enable = mkEnableOption "Enables thunderbird"; }; @@ -30,4 +32,3 @@ in { }; }; } - diff --git a/home/modules/vscode/default.nix b/home/modules/vscode/default.nix index 93dc7ec..c0e7b3b 100644 --- a/home/modules/vscode/default.nix +++ b/home/modules/vscode/default.nix @@ -1,14 +1,16 @@ -{ self -, lib -, config -, ... +{ + self, + lib, + config, + ... }: with lib; let cfg = config.module.vscode; -in { +in +{ imports = [ "${self}/home/modules/vscode/keybindings" "${self}/home/modules/vscode/extentions" @@ -26,4 +28,3 @@ in { }; }; } - diff --git a/home/modules/vscode/extentions/default.nix b/home/modules/vscode/extentions/default.nix index 5cd7dc7..59c0fa3 100644 --- a/home/modules/vscode/extentions/default.nix +++ b/home/modules/vscode/extentions/default.nix @@ -1,5 +1,6 @@ -{ pkgs -, ... +{ + pkgs, + ... }: { @@ -57,4 +58,3 @@ redhat.vscode-yaml ]; } - diff --git a/home/modules/vscode/keybindings/default.nix b/home/modules/vscode/keybindings/default.nix index a2c3a2b..f603e50 100644 --- a/home/modules/vscode/keybindings/default.nix +++ b/home/modules/vscode/keybindings/default.nix @@ -1,8 +1,9 @@ -{ self -, ... +{ + self, + ... }: { - home.file.".config/Code/User/keybindings.json".source = "${self}/home/modules/vscode/keybindings/keybindings.json"; + home.file.".config/Code/User/keybindings.json".source = + "${self}/home/modules/vscode/keybindings/keybindings.json"; } - diff --git a/home/modules/vscode/settings/default.nix b/home/modules/vscode/settings/default.nix index e0dc465..acecf26 100644 --- a/home/modules/vscode/settings/default.nix +++ b/home/modules/vscode/settings/default.nix @@ -5,8 +5,8 @@ _: "workbench.startupEditor" = "newUntitledFile"; "workbench.colorCustomizations" = { "[Oceanic Next (dimmed bg)]" = { - "sideBar.background" = "#1D2225"; - "editor.background" = "#262626"; + "sideBar.background" = "#1D2225"; + "editor.background" = "#262626"; }; }; "editor.rulers" = [ 80 ]; @@ -24,14 +24,14 @@ _: "go.toolsManagement.autoUpdate" = true; "explorer.confirmDelete" = false; "workbench.editorAssociations" = { - "*.ipynb" = "jupyter-notebook"; - "*.drawio" = "hediet.vscode-drawio-text"; + "*.ipynb" = "jupyter-notebook"; + "*.drawio" = "hediet.vscode-drawio-text"; }; "python.showStartPage" = false; "docker.showStartPage" = false; "notebook.cellToolbarLocation" = { - "default" = "right"; - "jupyter-notebook" = "left"; + "default" = "right"; + "jupyter-notebook" = "left"; }; "explorer.confirmDragAndDrop" = false; "editor.suggestSelection" = "first"; @@ -40,31 +40,31 @@ _: "editor.unicodeHighlight.ambiguousCharacters" = false; "python.defaultInterpreterPath" = "/usr/bin/python3"; "yaml.customTags" = [ - "!reference sequence" - "!vault" + "!reference sequence" + "!vault" ]; "editor.renderWhitespace" = "all"; "liveServer.settings.donotShowInfoMsg" = true; "terminal.integrated.defaultProfile.linux" = "zsh"; "terminal.integrated.gpuAcceleration" = "canvas"; "[python]" = { - "editor.formatOnType" = true; + "editor.formatOnType" = true; }; "editor.minimap.enabled" = false; "gitlens.blame.highlight.locations" = [ - "gutter" - "line" - "overview" + "gutter" + "line" + "overview" ]; "gitlens.changes.locations" = [ - "gutter" - "line" - "overview" + "gutter" + "line" + "overview" ]; "gitlens.heatmap.locations" = [ - "gutter" - "line" - "overview" + "gutter" + "line" + "overview" ]; "gitlens.codeLens.recentChange.enabled" = false; "gitlens.codeLens.authors.enabled" = false; @@ -85,4 +85,3 @@ _: "sops-edit.onlyUseButtons" = true; }; } - diff --git a/home/modules/wofi/default.nix b/home/modules/wofi/default.nix index 0aff498..844ddfe 100644 --- a/home/modules/wofi/default.nix +++ b/home/modules/wofi/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.wofi; -in { +in +{ options = { module.wofi = { enable = mkEnableOption "Enable wofi app runner"; @@ -20,10 +22,9 @@ in { settings = { allow_images = true; - insensitive = true; - width = "30%"; + insensitive = true; + width = "30%"; }; }; }; } - diff --git a/home/modules/yazi/default.nix b/home/modules/yazi/default.nix index 385b68d..817d642 100644 --- a/home/modules/yazi/default.nix +++ b/home/modules/yazi/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.yazi; -in { +in +{ options = { module.yazi.enable = mkEnableOption "Enables yazi"; }; @@ -19,4 +21,3 @@ in { }; }; } - diff --git a/home/modules/zathura/default.nix b/home/modules/zathura/default.nix index 6239546..269f556 100644 --- a/home/modules/zathura/default.nix +++ b/home/modules/zathura/default.nix @@ -1,13 +1,15 @@ -{ config -, lib -, ... +{ + config, + lib, + ... }: with lib; let cfg = config.module.zathura; -in { +in +{ options = { module.zathura.enable = mkEnableOption "Enables zathura"; }; @@ -18,4 +20,3 @@ in { }; }; } - diff --git a/home/modules/zoxide/default.nix b/home/modules/zoxide/default.nix index 3ff5bd2..619e27f 100644 --- a/home/modules/zoxide/default.nix +++ b/home/modules/zoxide/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.zoxide; -in { +in +{ options = { module.zoxide.enable = mkEnableOption "Enables zoxide"; }; @@ -19,4 +21,3 @@ in { }; }; } - diff --git a/home/modules/zsh/default.nix b/home/modules/zsh/default.nix index 31805a7..e54d1b1 100644 --- a/home/modules/zsh/default.nix +++ b/home/modules/zsh/default.nix @@ -1,16 +1,18 @@ -{ inputs -, self -, lib -, username -, config -, ... +{ + inputs, + self, + lib, + username, + config, + ... }: with lib; let cfg = config.module.zsh; -in { +in +{ options = { module.zsh.enable = mkEnableOption "Enables zsh"; }; @@ -50,22 +52,24 @@ in { } ]; - /* oh-my-zsh = { - enable = true; - - plugins = [ - "git" - "vagrant" - "docker" - "python" - "pass" - "kubectl" - ]; - - extraConfig = '' - zstyle ':omz:update' mode disabled - ''; - }; */ + /* + oh-my-zsh = { + enable = true; + + plugins = [ + "git" + "vagrant" + "docker" + "python" + "pass" + "kubectl" + ]; + + extraConfig = '' + zstyle ':omz:update' mode disabled + ''; + }; + */ shellAliases = { # System @@ -125,4 +129,3 @@ in { }; }; } - diff --git a/home/overlays/chrome/default.nix b/home/overlays/chrome/default.nix index 3417ef7..0207fd1 100644 --- a/home/overlays/chrome/default.nix +++ b/home/overlays/chrome/default.nix @@ -3,4 +3,3 @@ _: prev: { commandLineArgs = "--force-dark-mode"; }; } - diff --git a/home/overlays/rofi-calc/default.nix b/home/overlays/rofi-calc/default.nix index 23473c6..5ef009d 100644 --- a/home/overlays/rofi-calc/default.nix +++ b/home/overlays/rofi-calc/default.nix @@ -3,4 +3,3 @@ _: prev: { rofi-unwrapped = prev.rofi-wayland-unwrapped; }; } - diff --git a/home/overlays/rofi-emoji/default.nix b/home/overlays/rofi-emoji/default.nix index 43476ca..f0f04fe 100644 --- a/home/overlays/rofi-emoji/default.nix +++ b/home/overlays/rofi-emoji/default.nix @@ -3,4 +3,3 @@ _: prev: { rofi-unwrapped = prev.rofi-wayland-unwrapped; }; } - diff --git a/home/overlays/waybar/default.nix b/home/overlays/waybar/default.nix index 08a6cd1..1cca86b 100644 --- a/home/overlays/waybar/default.nix +++ b/home/overlays/waybar/default.nix @@ -3,4 +3,3 @@ _: prev: { wireplumberSupport = false; }; } - diff --git a/home/users/maxmur/modules/impermanence/default.nix b/home/users/maxmur/modules/impermanence/default.nix index 1ed0ecc..68cd522 100644 --- a/home/users/maxmur/modules/impermanence/default.nix +++ b/home/users/maxmur/modules/impermanence/default.nix @@ -1,14 +1,16 @@ -{ lib -, config -, username -, ... +{ + lib, + config, + username, + ... }: with lib; let - cfg = config.module.user.impermanence; -in { + cfg = config.module.user.impermanence; +in +{ options = { module.user.impermanence.enable = mkEnableOption "Enables home impermanence"; }; @@ -89,4 +91,3 @@ in { }; }; } - diff --git a/home/users/maxmur/modules/packages/default.nix b/home/users/maxmur/modules/packages/default.nix index 7110e00..5e30531 100644 --- a/home/users/maxmur/modules/packages/default.nix +++ b/home/users/maxmur/modules/packages/default.nix @@ -1,10 +1,11 @@ -{ config -, lib -, pkgs -, inputs -, isWorkstation -, wmEnable -, ... +{ + config, + lib, + pkgs, + inputs, + isWorkstation, + wmEnable, + ... }: with lib; @@ -12,7 +13,8 @@ with lib; let inherit (pkgs.stdenv) isLinux; cfg = config.module.user.packages; -in { +in +{ options.module.user.packages = { enable = mkEnableOption "Enable user packages"; }; @@ -20,79 +22,83 @@ in { config = mkIf cfg.enable { fonts.fontconfig.enable = true; - home.packages = with pkgs; [ - # Utils - bat - tokei - shellcheck - pre-commit - deadnix - statix - ffmpeg - inputs.any-nix-shell + home.packages = + with pkgs; + [ + # Utils + bat + tokei + shellcheck + pre-commit + deadnix + statix + ffmpeg + inputs.any-nix-shell - # Security - age - sops - ] ++ lib.optionals isWorkstation [ - # Text Editors - obsidian + # Security + age + sops + ] + ++ lib.optionals isWorkstation [ + # Text Editors + obsidian # Fonts nerd-fonts.jetbrains-mono nerd-fonts.ubuntu-mono nerd-fonts.iosevka corefonts - ] ++ lib.optionals (isLinux && isWorkstation) [ - inputs.ghostty.packages.x86_64-linux.default - # Programming - go - python3 + ] + ++ lib.optionals (isLinux && isWorkstation) [ + inputs.ghostty.packages.x86_64-linux.default + # Programming + go + python3 - # DevOps Utils - docker-compose - kubectl - kubernetes-helm - ansible - ansible-lint + # DevOps Utils + docker-compose + kubectl + kubernetes-helm + ansible + ansible-lint - # Chats - telegram-desktop - fluffychat - vesktop + # Chats + telegram-desktop + fluffychat + vesktop - # Office - onlyoffice-bin + # Office + onlyoffice-bin - # Misc - obs-studio - dconf2nix - via gpick - gat - vlc - eog - ] ++ lib.optionals wmEnable [ - imagemagick - grim - slurp - wl-clipboard - wf-recorder - hyprpicker - waypaper - cliphist - imv - gtk3 - dbus - glib - swww - xdg-utils - pavucontrol - xfce.thunar - eww - networkmanagerapplet - brightnessctl - ]; + # Misc + obs-studio + dconf2nix + via + gat + vlc + eog + ] + ++ lib.optionals wmEnable [ + imagemagick + grim + slurp + wl-clipboard + wf-recorder + hyprpicker + waypaper + cliphist + imv + gtk3 + dbus + glib + swww + xdg-utils + pavucontrol + xfce.thunar + eww + networkmanagerapplet + brightnessctl + ]; }; } - diff --git a/home/users/maxmur/modules/xdg/default.nix b/home/users/maxmur/modules/xdg/default.nix index 8b79754..98d996a 100644 --- a/home/users/maxmur/modules/xdg/default.nix +++ b/home/users/maxmur/modules/xdg/default.nix @@ -1,13 +1,15 @@ -{ config -, lib -, ... +{ + config, + lib, + ... }: with lib; let cfg = config.module.user.xdg; -in { +in +{ options = { module.user.xdg.enable = mkEnableOption "Enables xdg"; }; @@ -35,4 +37,3 @@ in { }; }; } - diff --git a/home/users/root/default.nix b/home/users/root/default.nix index 33628df..d81b280 100644 --- a/home/users/root/default.nix +++ b/home/users/root/default.nix @@ -1,6 +1,7 @@ -{ pkgs -, inputs -, ... +{ + pkgs, + inputs, + ... }: { @@ -30,4 +31,3 @@ }; }; } - diff --git a/home/users/test/default.nix b/home/users/test/default.nix index b011752..c61ecf9 100644 --- a/home/users/test/default.nix +++ b/home/users/test/default.nix @@ -1,6 +1,7 @@ -{ pkgs -, inputs -, ... +{ + pkgs, + inputs, + ... }: { @@ -17,4 +18,3 @@ ]; }; } - diff --git a/home/users/test/nbox/default.nix b/home/users/test/nbox/default.nix index 463c643..d05970a 100644 --- a/home/users/test/nbox/default.nix +++ b/home/users/test/nbox/default.nix @@ -1,6 +1,7 @@ -{ inputs -, pkgs -, ... +{ + inputs, + pkgs, + ... }: { @@ -31,4 +32,3 @@ ../../../modules/git ]; } - diff --git a/overlays/nixpkgs/default.nix b/overlays/nixpkgs/default.nix index 3a1c72e..7c8d402 100644 --- a/overlays/nixpkgs/default.nix +++ b/overlays/nixpkgs/default.nix @@ -1,5 +1,6 @@ -{ inputs -, ... +{ + inputs, + ... }: let @@ -9,20 +10,25 @@ let }; }; - permittedInsecurePackages = []; - unfreeSettings = baseSettings // { config = baseSettings.config // { inherit permittedInsecurePackages; allowUnfree = true; }; }; -in { + permittedInsecurePackages = [ ]; + unfreeSettings = baseSettings // { + config = baseSettings.config // { + inherit permittedInsecurePackages; + allowUnfree = true; + }; + }; +in +{ nixpkgs.overlays = [ (final: _prev: { - stable = import inputs.stable { inherit (final) system; } // baseSettings; + stable = import inputs.stable { inherit (final) system; } // baseSettings; stable-unfree = import inputs.stable { inherit (final) system; } // unfreeSettings; - unstable = import inputs.unstable { inherit (final) system; } // baseSettings; + unstable = import inputs.unstable { inherit (final) system; } // baseSettings; unstable-unfree = import inputs.unstable { inherit (final) system; } // unfreeSettings; - master = import inputs.master { inherit (final) system; } // baseSettings; + master = import inputs.master { inherit (final) system; } // baseSettings; master-unfree = import inputs.master { inherit (final) system; } // unfreeSettings; }) ]; } - diff --git a/pkgs/ufetch/default.nix b/pkgs/ufetch/default.nix index 2f5f1ba..b10586d 100644 --- a/pkgs/ufetch/default.nix +++ b/pkgs/ufetch/default.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, fetchFromGitLab, makeWrapper, bash }: +{ + lib, + stdenv, + fetchFromGitLab, + makeWrapper, + bash, +}: stdenv.mkDerivation rec { pname = "ufetch"; @@ -28,4 +34,3 @@ stdenv.mkDerivation rec { # mainProgram = "any-nix-shell"; }; } - diff --git a/system/darwin/modules/default.nix b/system/darwin/modules/default.nix index 9a6c1d4..d0c1951 100644 --- a/system/darwin/modules/default.nix +++ b/system/darwin/modules/default.nix @@ -1,4 +1,4 @@ _: -{} - +{ +} diff --git a/system/nixos/modules/binfmt/default.nix b/system/nixos/modules/binfmt/default.nix index b87a5c9..554a4cb 100644 --- a/system/nixos/modules/binfmt/default.nix +++ b/system/nixos/modules/binfmt/default.nix @@ -1,13 +1,15 @@ -{ config -, lib -, ... +{ + config, + lib, + ... }: with lib; let cfg = config.module.binfmt; -in { +in +{ options.module.binfmt = { enable = mkEnableOption "Enable module binfmt"; }; @@ -16,4 +18,3 @@ in { boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; }; } - diff --git a/system/nixos/modules/bluetooth/default.nix b/system/nixos/modules/bluetooth/default.nix index b1985bd..7b765bd 100644 --- a/system/nixos/modules/bluetooth/default.nix +++ b/system/nixos/modules/bluetooth/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.bluetooth; -in { +in +{ options = { module.bluetooth = { enable = mkEnableOption "Enables bluetooth"; @@ -23,4 +25,3 @@ in { }; }; } - diff --git a/system/nixos/modules/boot/default.nix b/system/nixos/modules/boot/default.nix index dc2e270..1554a5a 100644 --- a/system/nixos/modules/boot/default.nix +++ b/system/nixos/modules/boot/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.boot; -in { +in +{ options = { module.boot = { enable = mkEnableOption "Enables Bootloader"; @@ -21,4 +23,3 @@ in { }; }; } - diff --git a/system/nixos/modules/lanzaboot/default.nix b/system/nixos/modules/lanzaboot/default.nix index a0e4065..28d65ee 100644 --- a/system/nixos/modules/lanzaboot/default.nix +++ b/system/nixos/modules/lanzaboot/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.lanzaboote; -in { +in +{ options = { module.lanzaboote = { enable = mkEnableOption "Enables lanzaboote"; @@ -21,10 +23,9 @@ in { loader.efi.canTouchEfiVariables = true; lanzaboote = { - enable = true; - pkiBundle = "/etc/secureboot"; + enable = true; + pkiBundle = "/etc/secureboot"; }; }; }; } - diff --git a/system/nixos/modules/locales/default.nix b/system/nixos/modules/locales/default.nix index 99193e9..4c7d3a6 100644 --- a/system/nixos/modules/locales/default.nix +++ b/system/nixos/modules/locales/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.locales; -in { +in +{ options = { module.locales.enable = mkEnableOption "Enables locales"; }; @@ -20,4 +22,3 @@ in { }; }; } - diff --git a/system/nixos/modules/minimal/default.nix b/system/nixos/modules/minimal/default.nix index b77a093..90777d3 100644 --- a/system/nixos/modules/minimal/default.nix +++ b/system/nixos/modules/minimal/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.minimal; -in { +in +{ options = { module.minimal = { enable = mkEnableOption "Enables minimal"; @@ -28,4 +30,3 @@ in { programs.command-not-found.enable = mkDefault false; }; } - diff --git a/system/nixos/modules/network/default.nix b/system/nixos/modules/network/default.nix index d177596..9962aa5 100644 --- a/system/nixos/modules/network/default.nix +++ b/system/nixos/modules/network/default.nix @@ -1,14 +1,16 @@ -{ lib -, config -, hostname -, ... +{ + lib, + config, + hostname, + ... }: with lib; let cfg = config.module.network; -in { +in +{ options = { module.network = { enable = mkEnableOption "Enables network"; @@ -47,4 +49,3 @@ in { }; }; } - diff --git a/system/nixos/modules/nix/default.nix b/system/nixos/modules/nix/default.nix index de1257f..4d14ec4 100644 --- a/system/nixos/modules/nix/default.nix +++ b/system/nixos/modules/nix/default.nix @@ -1,6 +1,6 @@ -{ config -, lib -, ... +{ + config, + ... }: { diff --git a/system/nixos/modules/nixos-ng/default.nix b/system/nixos/modules/nixos-ng/default.nix index 345f5cc..09df45a 100644 --- a/system/nixos/modules/nixos-ng/default.nix +++ b/system/nixos/modules/nixos-ng/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.nixos-ng; -in { +in +{ options = { module.nixos-ng = { enable = mkEnableOption "Enables nixos-ng"; @@ -18,7 +20,7 @@ in { boot.initrd.systemd.enable = true; services = { - userborn.enable = true; + userborn.enable = true; dbus.implementation = "broker"; }; @@ -28,11 +30,12 @@ in { enableNg = true; }; - /* etc.overlay = { - enable = true; - mutable = true; - }; */ + /* + etc.overlay = { + enable = true; + mutable = true; + }; + */ }; }; } - diff --git a/system/nixos/modules/pihole/default.nix b/system/nixos/modules/pihole/default.nix index f5c290a..1a09ca7 100644 --- a/system/nixos/modules/pihole/default.nix +++ b/system/nixos/modules/pihole/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.pihole; -in { +in +{ options = { module.pihole.enable = mkEnableOption "Enables pihole"; }; @@ -57,4 +59,3 @@ in { }; }; } - diff --git a/system/nixos/modules/plymouth/default.nix b/system/nixos/modules/plymouth/default.nix index 044efb6..2bd496c 100644 --- a/system/nixos/modules/plymouth/default.nix +++ b/system/nixos/modules/plymouth/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.plymouth; -in { +in +{ options = { module.plymouth = { enable = mkEnableOption "Enables plymouth"; @@ -20,4 +22,3 @@ in { }; }; } - diff --git a/system/nixos/modules/programs/dconf/default.nix b/system/nixos/modules/programs/dconf/default.nix index 332ba73..28d8e18 100644 --- a/system/nixos/modules/programs/dconf/default.nix +++ b/system/nixos/modules/programs/dconf/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.programs.dconf; -in { +in +{ options = { module.programs.dconf.enable = mkEnableOption "Enable dconf"; }; @@ -16,4 +18,3 @@ in { programs.dconf.enable = true; }; } - diff --git a/system/nixos/modules/programs/fish/default.nix b/system/nixos/modules/programs/fish/default.nix index d62d3d0..3c0e83a 100644 --- a/system/nixos/modules/programs/fish/default.nix +++ b/system/nixos/modules/programs/fish/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.programs.fish; -in { +in +{ options = { module.programs.fish.enable = mkEnableOption "Enable fish"; }; @@ -16,4 +18,3 @@ in { programs.fish.enable = true; }; } - diff --git a/system/nixos/modules/programs/gnupg/default.nix b/system/nixos/modules/programs/gnupg/default.nix index 6f9fdff..ed28985 100644 --- a/system/nixos/modules/programs/gnupg/default.nix +++ b/system/nixos/modules/programs/gnupg/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.programs.gnupg; -in { +in +{ options = { module.programs.gnupg.enable = mkEnableOption "Enables GnuPG"; }; @@ -19,4 +21,3 @@ in { }; }; } - diff --git a/system/nixos/modules/programs/home-manager/default.nix b/system/nixos/modules/programs/home-manager/default.nix index e1fd927..ec4c314 100644 --- a/system/nixos/modules/programs/home-manager/default.nix +++ b/system/nixos/modules/programs/home-manager/default.nix @@ -1,14 +1,16 @@ -{ inputs -, lib -, config -, ... +{ + inputs, + lib, + config, + ... }: with lib; let cfg = config.module.programs.hm; -in { +in +{ options = { module.programs.hm.enable = mkEnableOption "Enable Home Manager"; }; @@ -16,11 +18,10 @@ in { config = mkIf cfg.enable { home-manager = { useGlobalPkgs = true; - useUserPackages = true; + useUserPackages = true; extraSpecialArgs = { inherit inputs; }; }; }; } - diff --git a/system/nixos/modules/programs/kdeconnect/default.nix b/system/nixos/modules/programs/kdeconnect/default.nix index 036fa73..65d5187 100644 --- a/system/nixos/modules/programs/kdeconnect/default.nix +++ b/system/nixos/modules/programs/kdeconnect/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.programs.kdeconnect; -in { +in +{ options = { module.programs.kdeconnect.enable = mkEnableOption "Enable kdeconnect"; }; @@ -16,4 +18,3 @@ in { programs.kdeconnect.enable = true; }; } - diff --git a/system/nixos/modules/programs/mtr/default.nix b/system/nixos/modules/programs/mtr/default.nix index 482d295..b565f7d 100644 --- a/system/nixos/modules/programs/mtr/default.nix +++ b/system/nixos/modules/programs/mtr/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.programs.mtr; -in { +in +{ options = { module.programs.mtr.enable = mkEnableOption "Enable mtr"; }; @@ -16,4 +18,3 @@ in { programs.mtr.enable = true; }; } - diff --git a/system/nixos/modules/programs/nix-helper/default.nix b/system/nixos/modules/programs/nix-helper/default.nix index 1b11f96..b03aef6 100644 --- a/system/nixos/modules/programs/nix-helper/default.nix +++ b/system/nixos/modules/programs/nix-helper/default.nix @@ -1,14 +1,16 @@ -{ lib -, config -, username -, ... +{ + lib, + config, + username, + ... }: with lib; let cfg = config.module.programs.nh; -in { +in +{ options = { module.programs.nh.enable = mkEnableOption "Enable Nix Helper"; }; @@ -25,4 +27,3 @@ in { }; }; } - diff --git a/system/nixos/modules/programs/systemPackages/default.nix b/system/nixos/modules/programs/systemPackages/default.nix index e426cab..84329bc 100644 --- a/system/nixos/modules/programs/systemPackages/default.nix +++ b/system/nixos/modules/programs/systemPackages/default.nix @@ -1,15 +1,17 @@ -{ pkgs -, lib -, config -, isWorkstation -, ... +{ + pkgs, + lib, + config, + isWorkstation, + ... }: with lib; let cfg = config.module.programs.systemPackages; -in { +in +{ options = { module.programs.systemPackages.enable = mkEnableOption "Enable System Software"; }; @@ -22,60 +24,62 @@ in { corefonts ]; - environment.systemPackages = with pkgs; [ - # Utils - git - nvd - nix-output-monitor - curl - wget - tree - file - zip - unzip - killall - jq + environment.systemPackages = + with pkgs; + [ + # Utils + git + nvd + nix-output-monitor + curl + wget + tree + file + zip + unzip + killall + jq - # Hardware utils - glxinfo - pciutils - usbutils - powertop - lm_sensors - strace - ltrace - lsof - sysstat - cpufetch - sbctl + # Hardware utils + glxinfo + pciutils + usbutils + powertop + lm_sensors + strace + ltrace + lsof + sysstat + cpufetch + sbctl - # Network - inetutils - wireguard-tools - dig - nmap - dnsutils - iperf3 - mtr - ipcalc - cacert - ] ++ optionals isWorkstation [ - # Themes - tela-circle-icon-theme + # Network + inetutils + wireguard-tools + dig + nmap + dnsutils + iperf3 + mtr + ipcalc + cacert + ] + ++ optionals isWorkstation [ + # Themes + tela-circle-icon-theme - # Hardware - microcodeIntel - libGL + # Hardware + microcodeIntel + libGL - # Hardware utils - libva-utils - intel-gpu-tools - fwupd - fwupd-efi + # Hardware utils + libva-utils + intel-gpu-tools + fwupd + fwupd-efi - # Utils - dconf-editor - ]; + # Utils + dconf-editor + ]; }; } - diff --git a/system/nixos/modules/programs/xdg-portal/default.nix b/system/nixos/modules/programs/xdg-portal/default.nix index f181d29..2a626af 100644 --- a/system/nixos/modules/programs/xdg-portal/default.nix +++ b/system/nixos/modules/programs/xdg-portal/default.nix @@ -1,15 +1,17 @@ -{ pkgs -, lib -, config -, wm -, ... +{ + pkgs, + lib, + config, + wm, + ... }: with lib; let cfg = config.module.programs.xdg-portal; -in { +in +{ options = { module.programs.xdg-portal.enable = mkEnableOption "Enable xdg-portal"; }; @@ -36,4 +38,3 @@ in { }; }; } - diff --git a/system/nixos/modules/programs/zsh/default.nix b/system/nixos/modules/programs/zsh/default.nix index 190e534..b94f316 100644 --- a/system/nixos/modules/programs/zsh/default.nix +++ b/system/nixos/modules/programs/zsh/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.programs.zsh; -in { +in +{ options = { module.programs.zsh.enable = mkEnableOption "Enable zsh"; }; @@ -16,4 +18,3 @@ in { programs.zsh.enable = true; }; } - diff --git a/system/nixos/modules/security/default.nix b/system/nixos/modules/security/default.nix index e641e14..8a22704 100644 --- a/system/nixos/modules/security/default.nix +++ b/system/nixos/modules/security/default.nix @@ -1,18 +1,20 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.security; -in { +in +{ options = { module.security = { - enable = mkEnableOption "Enables security"; + enable = mkEnableOption "Enables security"; enableBootOptions = mkEnableOption "Enables boot options"; - disableIPV6 = mkEnableOption "Disable ipv6"; + disableIPV6 = mkEnableOption "Disable ipv6"; }; }; @@ -21,11 +23,11 @@ in { sudo.enable = false; pam.services = { - gtklock = {}; - swaylock = {}; - hyprlock = {}; + gtklock = { }; + swaylock = { }; + hyprlock = { }; }; - + sudo-rs = { enable = true; execWheelOnly = true; @@ -34,16 +36,18 @@ in { }; boot = optionalAttrs cfg.enableBootOptions { - kernelParams = [ - # Security settings - "debugfs=off" - "page_alloc.shuffle=1" - "page_poison=1" - "slab_nomerge" - ] ++ optionals cfg.disableIPV6 [ - # Disable ipv6 - "ipv6.disable=1" - ]; + kernelParams = + [ + # Security settings + "debugfs=off" + "page_alloc.shuffle=1" + "page_poison=1" + "slab_nomerge" + ] + ++ optionals cfg.disableIPV6 [ + # Disable ipv6 + "ipv6.disable=1" + ]; blacklistedKernelModules = [ # Obscure network protocols @@ -75,44 +79,45 @@ in { "ufs" ]; - kernel.sysctl = { - # Hide kptrs even for processes with CAP_SYSLOG` - "kernel.kptr_restrict" = 2; + kernel.sysctl = + { + # Hide kptrs even for processes with CAP_SYSLOG` + "kernel.kptr_restrict" = 2; - # Disable ftrace debugging - "kernel.ftrace_enabled" = false; + # Disable ftrace debugging + "kernel.ftrace_enabled" = false; - # Enable strict reverse path filtering (that is, do not attempt to route - # packets that "obviously" do not belong to the iface's network; dropped - # packets are logged as martians). - "net.ipv4.conf.all.log_martians" = true; - "net.ipv4.conf.all.rp_filter" = "1"; - "net.ipv4.conf.default.log_martians" = true; - "net.ipv4.conf.default.rp_filter" = "1"; + # Enable strict reverse path filtering (that is, do not attempt to route + # packets that "obviously" do not belong to the iface's network; dropped + # packets are logged as martians). + "net.ipv4.conf.all.log_martians" = true; + "net.ipv4.conf.all.rp_filter" = "1"; + "net.ipv4.conf.default.log_martians" = true; + "net.ipv4.conf.default.rp_filter" = "1"; - # Ignore broadcast ICMP (mitigate SMURF) - "net.ipv4.icmp_echo_ignore_broadcasts" = true; + # Ignore broadcast ICMP (mitigate SMURF) + "net.ipv4.icmp_echo_ignore_broadcasts" = true; - # Ignore incoming ICMP redirects (note: default is needed to ensure that the - # setting is applied to interfaces added after the sysctls are set) - "net.ipv4.conf.all.accept_redirects" = false; - "net.ipv4.conf.all.secure_redirects" = false; - "net.ipv4.conf.default.accept_redirects" = false; - "net.ipv4.conf.default.secure_redirects" = false; - "net.ipv6.conf.all.accept_redirects" = false; - "net.ipv6.conf.default.accept_redirects" = false; + # Ignore incoming ICMP redirects (note: default is needed to ensure that the + # setting is applied to interfaces added after the sysctls are set) + "net.ipv4.conf.all.accept_redirects" = false; + "net.ipv4.conf.all.secure_redirects" = false; + "net.ipv4.conf.default.accept_redirects" = false; + "net.ipv4.conf.default.secure_redirects" = false; + "net.ipv6.conf.all.accept_redirects" = false; + "net.ipv6.conf.default.accept_redirects" = false; - # Ignore outgoing ICMP redirects (this is ipv4 only) - "net.ipv4.conf.all.send_redirects" = false; - "net.ipv4.conf.default.send_redirects" = false; - } // optionalAttrs cfg.disableIPV6 { - # Disable ipv6 - "net.ipv6.conf.all.disable_ipv6" = true; - "net.ipv6.conf.default.disable_ipv6" = true; - "net.ipv6.conf.lo.disable_ipv6" = true; - "net.ipv6.conf.tun0.disable_ipv6" = true; - }; + # Ignore outgoing ICMP redirects (this is ipv4 only) + "net.ipv4.conf.all.send_redirects" = false; + "net.ipv4.conf.default.send_redirects" = false; + } + // optionalAttrs cfg.disableIPV6 { + # Disable ipv6 + "net.ipv6.conf.all.disable_ipv6" = true; + "net.ipv6.conf.default.disable_ipv6" = true; + "net.ipv6.conf.lo.disable_ipv6" = true; + "net.ipv6.conf.tun0.disable_ipv6" = true; + }; }; }; } - diff --git a/system/nixos/modules/services/adguard-home/default.nix b/system/nixos/modules/services/adguard-home/default.nix index e141b20..9973c52 100644 --- a/system/nixos/modules/services/adguard-home/default.nix +++ b/system/nixos/modules/services/adguard-home/default.nix @@ -1,17 +1,19 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.services.adguard-home; -in { +in +{ options = { module.services.adguard-home = { enable = mkEnableOption "Enables adguard-home"; - + httpAddress = mkOption { type = types.str; default = "0.0.0.0"; @@ -24,7 +26,7 @@ in { dnsRewrites = mkOption { type = types.listOf types.attrs; - default = [ ]; + default = [ ]; }; }; }; @@ -34,7 +36,7 @@ in { enable = true; port = 3000; mutableSettings = true; - + settings = { auth_attempts = 3; block_auth_min = 5; @@ -65,4 +67,3 @@ in { }; }; } - diff --git a/system/nixos/modules/services/bolt/default.nix b/system/nixos/modules/services/bolt/default.nix index f7f09ea..24fc692 100644 --- a/system/nixos/modules/services/bolt/default.nix +++ b/system/nixos/modules/services/bolt/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.services.bolt; -in { +in +{ options = { module.services.bolt.enable = mkEnableOption "Enable bolt"; }; @@ -16,4 +18,3 @@ in { services.hardware.bolt.enable = true; }; } - diff --git a/system/nixos/modules/services/cpu-autofreq/default.nix b/system/nixos/modules/services/cpu-autofreq/default.nix index 36439ad..9714a13 100644 --- a/system/nixos/modules/services/cpu-autofreq/default.nix +++ b/system/nixos/modules/services/cpu-autofreq/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.services.cpu-autofreq; -in { +in +{ options = { module.services.cpu-autofreq.enable = mkEnableOption "Enable cpu-autofreq"; }; @@ -35,4 +37,3 @@ in { }; }; } - diff --git a/system/nixos/modules/services/fwupd/default.nix b/system/nixos/modules/services/fwupd/default.nix index 48b9ea8..28934df 100644 --- a/system/nixos/modules/services/fwupd/default.nix +++ b/system/nixos/modules/services/fwupd/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.services.fwupd; -in { +in +{ options = { module.services.fwupd.enable = mkEnableOption "Enable fwupd"; }; @@ -16,4 +18,3 @@ in { services.fwupd.enable = true; }; } - diff --git a/system/nixos/modules/services/homepage-dashboard/default.nix b/system/nixos/modules/services/homepage-dashboard/default.nix index f406c39..4672d05 100644 --- a/system/nixos/modules/services/homepage-dashboard/default.nix +++ b/system/nixos/modules/services/homepage-dashboard/default.nix @@ -1,21 +1,22 @@ -{ pkgs -, lib -, config -, ... +{ + pkgs, + lib, + config, + ... }: with lib; let cfg = config.module.services.homepage-dashboard; -in +in { options = { module.services.homepage-dashboard = { enable = mkEnableOption "Enables homepage-dashboard"; }; }; - + config = mkIf cfg.enable { services.homepage-dashboard = { enable = true; @@ -23,41 +24,40 @@ in }; /* - systemd.services.homepage-dashboard.environment.HOMEPAGE_CONFIG_DIR = let - configDir = pkgs.linkFarm "homepage-dashboard-config" { - "settings.yaml" = yaml.generate "settings.yaml" { - title = "Germond Homelab"; - background = "https://images.unsplash.com/photo-1502790671504-542ad42d5189?auto=format&fit=crop&w=2560&q=80"; - cardBlur = "sm"; - theme = "dark"; - color = "zinc"; - iconStyle = "theme"; - statusStyle = "dot"; - - language = "fr"; - - target = "_blank"; # open links in new tabs - - hideVersion = true; - disableCollapse = true; - - logpath = pkgs.linkFarm "homepage-dashboard-null-logs" { - "logs/homepage.log" = "/dev/null"; + systemd.services.homepage-dashboard.environment.HOMEPAGE_CONFIG_DIR = let + configDir = pkgs.linkFarm "homepage-dashboard-config" { + "settings.yaml" = yaml.generate "settings.yaml" { + title = "Germond Homelab"; + background = "https://images.unsplash.com/photo-1502790671504-542ad42d5189?auto=format&fit=crop&w=2560&q=80"; + cardBlur = "sm"; + theme = "dark"; + color = "zinc"; + iconStyle = "theme"; + statusStyle = "dot"; + + language = "fr"; + + target = "_blank"; # open links in new tabs + + hideVersion = true; + disableCollapse = true; + + logpath = pkgs.linkFarm "homepage-dashboard-null-logs" { + "logs/homepage.log" = "/dev/null"; + }; }; + "services.yaml" = yaml.generate "services.yaml" []; + "widgets.yaml" = yaml.generate "widgets.yaml" []; + "bookmarks.yaml" = yaml.generate "bookmarks.yaml" []; + "docker.yaml" = yaml.generate "docker.yaml" {}; + "kubernetes.yaml" = yaml.generate "kubernetes.yaml" { + mode = "disabled"; + }; + "custom.css" = pkgs.writeText "custom.css" ''''; + "custom.js" = pkgs.writeText "custom.js" ''''; }; - "services.yaml" = yaml.generate "services.yaml" []; - "widgets.yaml" = yaml.generate "widgets.yaml" []; - "bookmarks.yaml" = yaml.generate "bookmarks.yaml" []; - "docker.yaml" = yaml.generate "docker.yaml" {}; - "kubernetes.yaml" = yaml.generate "kubernetes.yaml" { - mode = "disabled"; - }; - "custom.css" = pkgs.writeText "custom.css" ''''; - "custom.js" = pkgs.writeText "custom.js" ''''; - }; - in - lib.mkForce "${configDir}"; + in + lib.mkForce "${configDir}"; */ }; } - diff --git a/system/nixos/modules/services/hyprland/default.nix b/system/nixos/modules/services/hyprland/default.nix index 89039a4..a87b895 100644 --- a/system/nixos/modules/services/hyprland/default.nix +++ b/system/nixos/modules/services/hyprland/default.nix @@ -1,15 +1,17 @@ -{ inputs -, pkgs -, lib -, config -, ... +{ + inputs, + pkgs, + lib, + config, + ... }: with lib; let cfg = config.module.services.hyprland; -in { +in +{ options = { module.services.hyprland.enable = mkEnableOption "Enables hyprland"; }; @@ -21,4 +23,3 @@ in { }; }; } - diff --git a/system/nixos/modules/services/netbird/default.nix b/system/nixos/modules/services/netbird/default.nix index d64937a..7f52dc6 100644 --- a/system/nixos/modules/services/netbird/default.nix +++ b/system/nixos/modules/services/netbird/default.nix @@ -1,14 +1,16 @@ -{ lib -, config -, pkgs -, ... +{ + lib, + config, + pkgs, + ... }: with lib; let cfg = config.module.services.netbird; -in { +in +{ options = { module.services.netbird = { enable = mkEnableOption "Enables netbird"; @@ -20,4 +22,3 @@ in { environment.systemPackages = [ pkgs.netbird-ui ]; }; } - diff --git a/system/nixos/modules/services/ollama/default.nix b/system/nixos/modules/services/ollama/default.nix index f22fd15..1a140a7 100644 --- a/system/nixos/modules/services/ollama/default.nix +++ b/system/nixos/modules/services/ollama/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.services.ollama; -in { +in +{ options = { module.services.ollama.enable = mkEnableOption "Enables ollama"; }; @@ -18,4 +20,3 @@ in { }; }; } - diff --git a/system/nixos/modules/services/polkit/default.nix b/system/nixos/modules/services/polkit/default.nix index 8002f2f..acbb2a3 100644 --- a/system/nixos/modules/services/polkit/default.nix +++ b/system/nixos/modules/services/polkit/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.services.polkit; -in { +in +{ options = { module.services.polkit.enable = mkEnableOption "Enable polkit"; }; @@ -33,4 +35,3 @@ in { ''; }; } - diff --git a/system/nixos/modules/services/printing/default.nix b/system/nixos/modules/services/printing/default.nix index 903551d..992edbd 100644 --- a/system/nixos/modules/services/printing/default.nix +++ b/system/nixos/modules/services/printing/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.services.printing; -in { +in +{ options = { module.services.printing.enable = mkEnableOption "Enable printing"; }; @@ -16,4 +18,3 @@ in { services.printing.enable = true; }; } - diff --git a/system/nixos/modules/services/qmk/default.nix b/system/nixos/modules/services/qmk/default.nix index e5e03c8..cdb24ba 100644 --- a/system/nixos/modules/services/qmk/default.nix +++ b/system/nixos/modules/services/qmk/default.nix @@ -1,14 +1,16 @@ -{ lib -, pkgs -, config -, ... +{ + lib, + pkgs, + config, + ... }: with lib; let cfg = config.module.services.qmk; -in { +in +{ options = { module.services.qmk.enable = mkEnableOption "Enables qmk"; }; @@ -25,4 +27,3 @@ in { hardware.keyboard.qmk.enable = true; }; } - diff --git a/system/nixos/modules/services/scx/default.nix b/system/nixos/modules/services/scx/default.nix index 28bcda8..74ae100 100644 --- a/system/nixos/modules/services/scx/default.nix +++ b/system/nixos/modules/services/scx/default.nix @@ -1,16 +1,18 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.services.scx; -in { +in +{ options = { module.services.scx = { - enable = mkEnableOption "Enables scx module"; + enable = mkEnableOption "Enables scx module"; schedulerType = mkOption { type = types.str; @@ -26,4 +28,3 @@ in { }; }; } - diff --git a/system/nixos/modules/services/ssh/default.nix b/system/nixos/modules/services/ssh/default.nix index d612170..09bdef3 100644 --- a/system/nixos/modules/services/ssh/default.nix +++ b/system/nixos/modules/services/ssh/default.nix @@ -1,19 +1,26 @@ -{ config -, lib -, ... +{ + config, + lib, + ... }: with lib; let cfg = config.module.services.ssh; -in { +in +{ options.module.services.ssh = { enable = mkEnableOption "Enable module"; listenAddresses = lib.mkOption { type = lib.types.listOf lib.types.attrs; - default = [ { addr = "0.0.0.0"; port = 2222; } ]; + default = [ + { + addr = "0.0.0.0"; + port = 2222; + } + ]; description = '' Specifies on which ports and addreses the SSH daemon listens. ''; @@ -37,8 +44,7 @@ in { settings = { PermitRootLogin = "no"; PasswordAuthentication = true; - }; + }; }; }; } - diff --git a/system/nixos/modules/services/syncthing/default.nix b/system/nixos/modules/services/syncthing/default.nix index 440861e..efc81f0 100644 --- a/system/nixos/modules/services/syncthing/default.nix +++ b/system/nixos/modules/services/syncthing/default.nix @@ -1,14 +1,16 @@ -{ lib -, config -, username -, ... +{ + lib, + config, + username, + ... }: with lib; let cfg = config.module.services.syncthing; -in { +in +{ options = { module.services.syncthing.enable = mkEnableOption "Enable syncthing"; }; @@ -22,4 +24,3 @@ in { }; }; } - diff --git a/system/nixos/modules/services/udev/default.nix b/system/nixos/modules/services/udev/default.nix index 40bc04f..5c3d8b5 100644 --- a/system/nixos/modules/services/udev/default.nix +++ b/system/nixos/modules/services/udev/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.services.udev; -in { +in +{ options = { module.services.udev.enable = mkEnableOption "Enable udev"; }; @@ -19,4 +21,3 @@ in { ''; }; } - diff --git a/system/nixos/modules/services/unbound/default.nix b/system/nixos/modules/services/unbound/default.nix index 992d100..0c3153b 100644 --- a/system/nixos/modules/services/unbound/default.nix +++ b/system/nixos/modules/services/unbound/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.services.unbound; -in { +in +{ options = { module.services.unbound = { enable = mkEnableOption "Enables unbound"; @@ -31,7 +33,7 @@ in { prefer-ip6 = "no"; harden-glue = "yes"; harden-dnssec-stripped = "yes"; - use-caps-for-id = "no"; + use-caps-for-id = "no"; edns-buffer-size = "1232"; prefetch = "yes"; num-threads = "1"; @@ -55,4 +57,3 @@ in { }; }; } - diff --git a/system/nixos/modules/services/xserver/default.nix b/system/nixos/modules/services/xserver/default.nix index bd90a76..c826c51 100644 --- a/system/nixos/modules/services/xserver/default.nix +++ b/system/nixos/modules/services/xserver/default.nix @@ -1,14 +1,16 @@ -{ pkgs -, lib -, config -, ... +{ + pkgs, + lib, + config, + ... }: with lib; let cfg = config.module.services.xserver; -in { +in +{ options = { module.services.xserver.enable = mkEnableOption "Enable xserver"; }; @@ -45,4 +47,3 @@ in { }; }; } - diff --git a/system/nixos/modules/services/yggdrasil/default.nix b/system/nixos/modules/services/yggdrasil/default.nix index 6dcf1fe..c5437b7 100644 --- a/system/nixos/modules/services/yggdrasil/default.nix +++ b/system/nixos/modules/services/yggdrasil/default.nix @@ -1,13 +1,15 @@ -{ config -, lib -, ... +{ + config, + lib, + ... }: with lib; let cfg = config.module.services.yggdrasil; -in { +in +{ options.module.services.yggdrasil = { enable = mkEnableOption "Enable module yggdrasil"; }; @@ -28,4 +30,3 @@ in { }; }; } - diff --git a/system/nixos/modules/services/zram/default.nix b/system/nixos/modules/services/zram/default.nix index fec381c..3439709 100644 --- a/system/nixos/modules/services/zram/default.nix +++ b/system/nixos/modules/services/zram/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.services.zram; -in { +in +{ options = { module.services.zram.enable = mkEnableOption "Enable zram"; }; @@ -22,4 +24,3 @@ in { }; }; } - diff --git a/system/nixos/modules/sound/default.nix b/system/nixos/modules/sound/default.nix index 73f91b6..52e46c0 100644 --- a/system/nixos/modules/sound/default.nix +++ b/system/nixos/modules/sound/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.sound; -in { +in +{ options = { module.sound.enable = mkEnableOption "Enables sound in your system"; }; @@ -15,7 +17,7 @@ in { config = mkIf cfg.enable { # Sound settings security.rtkit.enable = true; - + services.pipewire = { enable = true; alsa.enable = true; @@ -24,4 +26,3 @@ in { }; }; } - diff --git a/system/nixos/modules/timedate/default.nix b/system/nixos/modules/timedate/default.nix index f5ec5ac..5e67ed0 100644 --- a/system/nixos/modules/timedate/default.nix +++ b/system/nixos/modules/timedate/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.timedate; -in { +in +{ options = { module.timedate.enable = mkEnableOption "Enables timedate"; }; @@ -18,4 +20,3 @@ in { services.chrony.enable = true; }; } - diff --git a/system/nixos/modules/users/default.nix b/system/nixos/modules/users/default.nix index 71e12c6..f36136f 100644 --- a/system/nixos/modules/users/default.nix +++ b/system/nixos/modules/users/default.nix @@ -1,16 +1,18 @@ -{ self -, pkgs -, lib -, config -, username -, ... +{ + self, + pkgs, + lib, + config, + username, + ... }: with lib; let cfg = config.module.users; -in { +in +{ options = { module.users.enable = mkEnableOption "Enables users"; }; @@ -19,7 +21,7 @@ in { users = { mutableUsers = false; - groups = { + groups = { ${username} = { gid = 1000; }; @@ -27,13 +29,13 @@ in { users = { ${username} = { - uid = 1000; - home = "/home/${username}"; - shell = pkgs.fish; - group = "${username}"; - createHome = true; - description = "${username}"; - isSystemUser = true; + uid = 1000; + home = "/home/${username}"; + shell = pkgs.fish; + group = "${username}"; + createHome = true; + description = "${username}"; + isSystemUser = true; hashedPasswordFile = "${self}/secrets/hashes/${username}.hash"; extraGroups = [ @@ -54,4 +56,3 @@ in { }; }; } - diff --git a/system/nixos/modules/variables/default.nix b/system/nixos/modules/variables/default.nix index 0b11637..41ccc24 100644 --- a/system/nixos/modules/variables/default.nix +++ b/system/nixos/modules/variables/default.nix @@ -1,37 +1,38 @@ -{ lib -, config -, username -, ... +{ + lib, + config, + username, + ... }: with lib; let cfg = config.module.variables; -in { +in +{ options = { module.variables.enable = mkEnableOption "Enables variables"; }; config = mkIf cfg.enable { environment.variables = { - QT_QPA_PLATFORM = "wayland"; - SDL_VIDEODRIVER = "wayland"; - CLUTTER_BACKEND = "wayland"; - GDK_BACKEND = "wayland"; - NIXPKGS_ALLOW_UNFREE = "1"; + QT_QPA_PLATFORM = "wayland"; + SDL_VIDEODRIVER = "wayland"; + CLUTTER_BACKEND = "wayland"; + GDK_BACKEND = "wayland"; + NIXPKGS_ALLOW_UNFREE = "1"; NIXPKGS_ALLOW_INSECURE = "1"; - MOZ_ENABLE_WAYLAND = "1"; - XDG_SESSION_TYPE = "wayland"; - NIXOS_OZONE_WL = "1"; + MOZ_ENABLE_WAYLAND = "1"; + XDG_SESSION_TYPE = "wayland"; + NIXOS_OZONE_WL = "1"; }; environment.sessionVariables = { - MOZ_LEGACY_PROFILES = "1"; - FLAKE = "/home/${username}/Code/nixos-configuration"; - QT_QPA_PLATFORMTHEME = "gtk3"; + MOZ_LEGACY_PROFILES = "1"; + FLAKE = "/home/${username}/Code/nixos-configuration"; + QT_QPA_PLATFORMTHEME = "gtk3"; TDESKTOP_I_KNOW_ABOUT_GTK_INCOMPATIBILITY = "1"; }; }; } - diff --git a/system/nixos/modules/virtualization/default.nix b/system/nixos/modules/virtualization/default.nix index 6699c0b..62622a6 100644 --- a/system/nixos/modules/virtualization/default.nix +++ b/system/nixos/modules/virtualization/default.nix @@ -1,15 +1,17 @@ -{ lib -, config -, username -, pkgs -, ... +{ + lib, + config, + username, + pkgs, + ... }: with lib; let cfg = config.module.virtualisation; -in { +in +{ options = { module.virtualisation = { enable = mkEnableOption "Enables virtualisation"; @@ -32,4 +34,3 @@ in { }; }; } - diff --git a/system/nixos/modules/zapret/default.nix b/system/nixos/modules/zapret/default.nix index ab66391..dd753c1 100644 --- a/system/nixos/modules/zapret/default.nix +++ b/system/nixos/modules/zapret/default.nix @@ -1,14 +1,16 @@ -{ lib -, config -, pkgs -, ... +{ + lib, + config, + pkgs, + ... }: with lib; let cfg = config.module.zapret; -in { +in +{ options = { module.zapret = { enable = mkEnableOption "Enables zapret"; @@ -61,4 +63,3 @@ in { }; }; } - diff --git a/system/nixos/overlays/vaapiIntel/default.nix b/system/nixos/overlays/vaapiIntel/default.nix index dd245ce..68d8e01 100644 --- a/system/nixos/overlays/vaapiIntel/default.nix +++ b/system/nixos/overlays/vaapiIntel/default.nix @@ -1,6 +1,5 @@ _: prev: { - vaapiIntel = prev.vaapiIntel.override { - enableHybridCodec = true; + vaapiIntel = prev.vaapiIntel.override { + enableHybridCodec = true; }; } - diff --git a/templates/default.nix b/templates/default.nix index b193e9c..7283630 100644 --- a/templates/default.nix +++ b/templates/default.nix @@ -1,5 +1,6 @@ -{ self -, ... +{ + self, + ... }: { @@ -18,4 +19,3 @@ path = "${self}/templates/overlay"; }; } - diff --git a/templates/devshell/flake.nix b/templates/devshell/flake.nix index 8702151..30bd741 100644 --- a/templates/devshell/flake.nix +++ b/templates/devshell/flake.nix @@ -6,8 +6,10 @@ flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { nixpkgs, flake-utils, ... }: - flake-utils.lib.eachDefaultSystem (system: + outputs = + { nixpkgs, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem ( + system: let pkgs = import nixpkgs { inherit system; @@ -16,11 +18,13 @@ allowUnfree = true; }; }; - in { - devShell = with pkgs; mkShell { - buildInputs = [ ]; - }; + in + { + devShell = + with pkgs; + mkShell { + buildInputs = [ ]; + }; } ); } - diff --git a/templates/module/default.nix b/templates/module/default.nix index fc5b35e..e5ab574 100644 --- a/templates/module/default.nix +++ b/templates/module/default.nix @@ -1,13 +1,15 @@ -{ config -, lib -, ... +{ + config, + lib, + ... }: with lib; let cfg = config.module.""; -in { +in +{ options.module."" = { enable = mkEnableOption "Enable module"; }; @@ -15,4 +17,3 @@ in { config = mkIf cfg.enable { }; } - diff --git a/templates/overlay/default.nix b/templates/overlay/default.nix index 9e38914..ecfb435 100644 --- a/templates/overlay/default.nix +++ b/templates/overlay/default.nix @@ -1,4 +1,3 @@ _: prev: { - package = prev.package.override {}; + package = prev.package.override { }; } - From ee6ca57a60cc31cba7b6f056d1a198a77813256e Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:20:03 +0300 Subject: [PATCH 059/103] common: Fmt --- system/machine/hlbox/default.nix | 44 ++++++----- .../hlbox/modules/hardware/disks/default.nix | 6 +- .../hardware/extra-hardware/default.nix | 6 +- .../hardware/graphics-card/default.nix | 1 - .../modules/hardware/network/default.nix | 8 +- system/machine/macbox/default.nix | 19 +++-- system/machine/macbox/modules/default.nix | 4 +- system/machine/nbox/default.nix | 69 ++++++++-------- .../nbox/modules/hardware/disks/default.nix | 24 ++++-- .../hardware/extra-hardware/default.nix | 10 +-- .../modules/hardware/impermanence/default.nix | 1 - .../nbox/modules/hardware/kernel/default.nix | 10 +-- .../nbox/modules/hardware/network/default.nix | 13 +++- system/machine/pcbox/default.nix | 78 +++++++++---------- .../pcbox/modules/hardware/disks/default.nix | 24 ++++-- .../hardware/extra-hardware/default.nix | 6 +- .../hardware/graphics-card/default.nix | 6 +- .../modules/hardware/impermanence/default.nix | 1 - .../pcbox/modules/hardware/kernel/default.nix | 8 +- .../modules/hardware/network/default.nix | 11 ++- .../machine/pcbox/modules/ollama/default.nix | 11 +-- system/machine/rasp/default.nix | 36 +++++---- system/machine/rasp/modules/nginx/default.nix | 1 - .../rasp/modules/temp-control/default.nix | 18 +++-- 24 files changed, 229 insertions(+), 186 deletions(-) diff --git a/system/machine/hlbox/default.nix b/system/machine/hlbox/default.nix index 2255246..f3d4d02 100644 --- a/system/machine/hlbox/default.nix +++ b/system/machine/hlbox/default.nix @@ -1,29 +1,30 @@ -{ config -, ... +{ + config, + ... }: { module = { - boot.enable = true; - timedate.enable = true; - locales.enable = true; - users.enable = true; - network.enable = true; + boot.enable = true; + timedate.enable = true; + locales.enable = true; + users.enable = true; + network.enable = true; variables.enable = true; - stylix.enable = true; - nixos-ng.enable = true; - plymouth.enable = true; - minimal.enable = true; + stylix.enable = true; + nixos-ng.enable = true; + plymouth.enable = true; + minimal.enable = true; programs = { - gnupg.enable = true; - fish.enable = true; - zsh.enable = true; + gnupg.enable = true; + fish.enable = true; + zsh.enable = true; systemPackages.enable = true; }; security = { - enable = true; + enable = true; enableBootOptions = true; }; @@ -47,12 +48,17 @@ ssh = { enable = true; listenAddresses = [ - { addr = config.module.defaults.network.ip; port = 45631; } + { + addr = config.module.defaults.network.ip; + port = 45631; + } ]; }; - }; + }; }; - nix.settings.trusted-users = [ "maxmur" "root" ]; + nix.settings.trusted-users = [ + "maxmur" + "root" + ]; } - diff --git a/system/machine/hlbox/modules/hardware/disks/default.nix b/system/machine/hlbox/modules/hardware/disks/default.nix index 970f6f7..81f6391 100644 --- a/system/machine/hlbox/modules/hardware/disks/default.nix +++ b/system/machine/hlbox/modules/hardware/disks/default.nix @@ -17,7 +17,10 @@ _: "/boot" = { device = "/dev/disk/by-uuid/2D7C-60DB"; fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; + options = [ + "fmask=0022" + "dmask=0022" + ]; }; "/home" = { @@ -33,4 +36,3 @@ _: }; }; } - diff --git a/system/machine/hlbox/modules/hardware/extra-hardware/default.nix b/system/machine/hlbox/modules/hardware/extra-hardware/default.nix index 98ba039..40e58b2 100644 --- a/system/machine/hlbox/modules/hardware/extra-hardware/default.nix +++ b/system/machine/hlbox/modules/hardware/extra-hardware/default.nix @@ -1,5 +1,6 @@ -{ pkgs -, ... +{ + pkgs, + ... }: { @@ -13,4 +14,3 @@ ]; }; } - diff --git a/system/machine/hlbox/modules/hardware/graphics-card/default.nix b/system/machine/hlbox/modules/hardware/graphics-card/default.nix index 7e59ab5..757f43a 100644 --- a/system/machine/hlbox/modules/hardware/graphics-card/default.nix +++ b/system/machine/hlbox/modules/hardware/graphics-card/default.nix @@ -6,4 +6,3 @@ _: nvidia.open = true; }; } - diff --git a/system/machine/hlbox/modules/hardware/network/default.nix b/system/machine/hlbox/modules/hardware/network/default.nix index 51f6906..06e0bc0 100644 --- a/system/machine/hlbox/modules/hardware/network/default.nix +++ b/system/machine/hlbox/modules/hardware/network/default.nix @@ -1,6 +1,7 @@ -{ config -, username -, ... +{ + config, + username, + ... }: { @@ -41,4 +42,3 @@ }; }; } - diff --git a/system/machine/macbox/default.nix b/system/machine/macbox/default.nix index 2ce3dbe..a2ce064 100644 --- a/system/machine/macbox/default.nix +++ b/system/machine/macbox/default.nix @@ -1,15 +1,19 @@ -{ inputs -, pkgs -, username -, ... -}: +{ + inputs, + pkgs, + username, + ... +}: { module = { - stylix.enable = true; + stylix = { + enable = true; + useCursor = false; + }; }; - environment.systemPackages = with pkgs; [ + environment.systemPackages = with pkgs; [ vim neovim home-manager @@ -33,4 +37,3 @@ system.configurationRevision = inputs.rev or inputs.dirtyRev or null; } - diff --git a/system/machine/macbox/modules/default.nix b/system/machine/macbox/modules/default.nix index 9a6c1d4..d0c1951 100644 --- a/system/machine/macbox/modules/default.nix +++ b/system/machine/macbox/modules/default.nix @@ -1,4 +1,4 @@ _: -{} - +{ +} diff --git a/system/machine/nbox/default.nix b/system/machine/nbox/default.nix index 5a8a309..404e86e 100644 --- a/system/machine/nbox/default.nix +++ b/system/machine/nbox/default.nix @@ -2,38 +2,38 @@ _: { module = { - sound.enable = true; - lanzaboote.enable = true; - bluetooth.enable = true; - locales.enable = true; - network.enable = true; - timedate.enable = true; - users.enable = true; - variables.enable = true; + sound.enable = true; + lanzaboote.enable = true; + bluetooth.enable = true; + locales.enable = true; + network.enable = true; + timedate.enable = true; + users.enable = true; + variables.enable = true; virtualisation.enable = true; - stylix.enable = true; - minimal.enable = true; - nixos-ng.enable = true; - plymouth.enable = true; - binfmt.enable = true; + stylix.enable = true; + minimal.enable = true; + nixos-ng.enable = true; + plymouth.enable = true; + binfmt.enable = true; security = { - enable = true; + enable = true; enableBootOptions = true; }; services = { - bolt.enable = true; - cpu-autofreq.enable = true; - fwupd.enable = true; - polkit.enable = true; - printing.enable = true; - syncthing.enable = true; - udev.enable = true; - zram.enable = true; - greetd.enable = true; - ollama.enable = true; - netbird.enable = true; + bolt.enable = true; + tlp.enable = true; + fwupd.enable = true; + polkit.enable = true; + printing.enable = true; + syncthing.enable = true; + udev.enable = true; + zram.enable = true; + greetd.enable = true; + ollama.enable = true; + netbird.enable = true; scx = { enable = true; @@ -42,17 +42,16 @@ _: }; programs = { - dconf.enable = true; - gnupg.enable = true; - hm.enable = true; - nh.enable = true; - kdeconnect.enable = true; - mtr.enable = true; - xdg-portal.enable = true; - zsh.enable = true; - fish.enable = true; + dconf.enable = true; + gnupg.enable = true; + hm.enable = true; + nh.enable = true; + kdeconnect.enable = true; + mtr.enable = true; + xdg-portal.enable = true; + zsh.enable = true; + fish.enable = true; systemPackages.enable = true; }; }; } - diff --git a/system/machine/nbox/modules/hardware/disks/default.nix b/system/machine/nbox/modules/hardware/disks/default.nix index cb7db54..71b7e28 100644 --- a/system/machine/nbox/modules/hardware/disks/default.nix +++ b/system/machine/nbox/modules/hardware/disks/default.nix @@ -63,7 +63,10 @@ _: format = "vfat"; mountpoint = "/boot"; - mountOptions = [ "defaults" "umask=0077" ]; + mountOptions = [ + "defaults" + "umask=0077" + ]; }; }; @@ -76,7 +79,7 @@ _: content = { type = "lvm_pv"; - vg = "pool"; + vg = "pool"; }; }; }; @@ -103,13 +106,21 @@ _: }; "/persist" = { - mountpoint = "/persist"; - mountOptions = [ "compress=zstd" "subvol=persist" "noatime" ]; + mountpoint = "/persist"; + mountOptions = [ + "compress=zstd" + "subvol=persist" + "noatime" + ]; }; "/nix" = { - mountpoint = "/nix"; - mountOptions = [ "compress=zstd" "subvol=nix" "noatime" ]; + mountpoint = "/nix"; + mountOptions = [ + "compress=zstd" + "subvol=nix" + "noatime" + ]; }; }; }; @@ -119,4 +130,3 @@ _: }; }; } - diff --git a/system/machine/nbox/modules/hardware/extra-hardware/default.nix b/system/machine/nbox/modules/hardware/extra-hardware/default.nix index 1fce5f3..065c07e 100644 --- a/system/machine/nbox/modules/hardware/extra-hardware/default.nix +++ b/system/machine/nbox/modules/hardware/extra-hardware/default.nix @@ -1,7 +1,8 @@ -{ lib -, pkgs -, config -, ... +{ + lib, + pkgs, + config, + ... }: { @@ -22,4 +23,3 @@ }; }; } - diff --git a/system/machine/nbox/modules/hardware/impermanence/default.nix b/system/machine/nbox/modules/hardware/impermanence/default.nix index 781fc7c..6e94223 100644 --- a/system/machine/nbox/modules/hardware/impermanence/default.nix +++ b/system/machine/nbox/modules/hardware/impermanence/default.nix @@ -38,4 +38,3 @@ _: }; }; } - diff --git a/system/machine/nbox/modules/hardware/kernel/default.nix b/system/machine/nbox/modules/hardware/kernel/default.nix index 8666a1f..cb955fb 100644 --- a/system/machine/nbox/modules/hardware/kernel/default.nix +++ b/system/machine/nbox/modules/hardware/kernel/default.nix @@ -1,5 +1,6 @@ -{ pkgs -, ... +{ + pkgs, + ... }: { @@ -17,13 +18,13 @@ "i915" ]; - kernelParams = [ + kernelParams = [ # Video driver settings "i915.enable_guc=1" "pci=assign-busses,hpbussize=0x33,realloc" ]; - initrd.availableKernelModules = [ + initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" @@ -33,4 +34,3 @@ ]; }; } - diff --git a/system/machine/nbox/modules/hardware/network/default.nix b/system/machine/nbox/modules/hardware/network/default.nix index 85bf955..f9c5f0f 100644 --- a/system/machine/nbox/modules/hardware/network/default.nix +++ b/system/machine/nbox/modules/hardware/network/default.nix @@ -30,13 +30,18 @@ _: ]; allowedTCPPortRanges = [ - { from = 1714; to = 1764; } # KDE Connect + { + from = 1714; + to = 1764; + } # KDE Connect ]; - + allowedUDPPortRanges = [ - { from = 1714; to = 1764; } # KDE Connect + { + from = 1714; + to = 1764; + } # KDE Connect ]; }; }; } - diff --git a/system/machine/pcbox/default.nix b/system/machine/pcbox/default.nix index c8e15f1..27417c0 100644 --- a/system/machine/pcbox/default.nix +++ b/system/machine/pcbox/default.nix @@ -1,65 +1,65 @@ -{ config -, ... +{ + config, + ... }: { module = { - sound.enable = true; - boot.enable = true; - bluetooth.enable = true; - locales.enable = true; - network.enable = true; - timedate.enable = true; - users.enable = true; - variables.enable = true; + sound.enable = true; + boot.enable = true; + bluetooth.enable = true; + locales.enable = true; + network.enable = true; + timedate.enable = true; + users.enable = true; + variables.enable = true; virtualisation.enable = true; - stylix.enable = true; - minimal.enable = true; - nixos-ng.enable = true; - plymouth.enable = true; - binfmt.enable = true; + stylix.enable = true; + minimal.enable = true; + nixos-ng.enable = true; + plymouth.enable = true; + binfmt.enable = true; security = { - enable = true; + enable = true; enableBootOptions = true; }; services = { - bolt.enable = true; - fwupd.enable = true; - polkit.enable = true; - printing.enable = true; - syncthing.enable = true; - udev.enable = true; - greetd.enable = true; - qmk.enable = true; - netbird.enable = true; - yggdrasil.enable = true; - zram.enable = true; - + bolt.enable = true; + fwupd.enable = true; + polkit.enable = true; + printing.enable = true; + syncthing.enable = true; + udev.enable = true; + greetd.enable = true; + qmk.enable = true; + netbird.enable = true; + yggdrasil.enable = true; + zram.enable = true; + scx = { enable = true; schedulerType = "scx_bpfland"; }; ollama = { - enable = true; + enable = true; gpuSupport.enable = config.services.ollama.enable; }; }; programs = { - dconf.enable = true; - gnupg.enable = true; - hm.enable = true; - nh.enable = true; - kdeconnect.enable = true; - mtr.enable = true; - xdg-portal.enable = true; - zsh.enable = true; - fish.enable = true; + dconf.enable = true; + gnupg.enable = true; + hm.enable = true; + nh.enable = true; + kdeconnect.enable = true; + mtr.enable = true; + xdg-portal.enable = true; + zsh.enable = true; + fish.enable = true; systemPackages.enable = true; }; }; } - diff --git a/system/machine/pcbox/modules/hardware/disks/default.nix b/system/machine/pcbox/modules/hardware/disks/default.nix index 657bfa9..7a5a4fd 100644 --- a/system/machine/pcbox/modules/hardware/disks/default.nix +++ b/system/machine/pcbox/modules/hardware/disks/default.nix @@ -63,7 +63,10 @@ _: format = "vfat"; mountpoint = "/boot"; - mountOptions = [ "defaults" "umask=0077" ]; + mountOptions = [ + "defaults" + "umask=0077" + ]; }; }; @@ -76,7 +79,7 @@ _: content = { type = "lvm_pv"; - vg = "pool"; + vg = "pool"; }; }; }; @@ -103,13 +106,21 @@ _: }; "/persist" = { - mountpoint = "/persist"; - mountOptions = [ "compress=zstd" "subvol=persist" "noatime" ]; + mountpoint = "/persist"; + mountOptions = [ + "compress=zstd" + "subvol=persist" + "noatime" + ]; }; "/nix" = { - mountpoint = "/nix"; - mountOptions = [ "compress=zstd" "subvol=nix" "noatime" ]; + mountpoint = "/nix"; + mountOptions = [ + "compress=zstd" + "subvol=nix" + "noatime" + ]; }; }; }; @@ -119,4 +130,3 @@ _: }; }; } - diff --git a/system/machine/pcbox/modules/hardware/extra-hardware/default.nix b/system/machine/pcbox/modules/hardware/extra-hardware/default.nix index 9cf4c7a..10cf5b4 100644 --- a/system/machine/pcbox/modules/hardware/extra-hardware/default.nix +++ b/system/machine/pcbox/modules/hardware/extra-hardware/default.nix @@ -1,5 +1,6 @@ -{ pkgs -, ... +{ + pkgs, + ... }: { @@ -18,4 +19,3 @@ }; }; } - diff --git a/system/machine/pcbox/modules/hardware/graphics-card/default.nix b/system/machine/pcbox/modules/hardware/graphics-card/default.nix index 17ced36..5e50da1 100644 --- a/system/machine/pcbox/modules/hardware/graphics-card/default.nix +++ b/system/machine/pcbox/modules/hardware/graphics-card/default.nix @@ -1,5 +1,6 @@ -{ pkgs -, ... +{ + pkgs, + ... }: { @@ -24,4 +25,3 @@ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ]; } - diff --git a/system/machine/pcbox/modules/hardware/impermanence/default.nix b/system/machine/pcbox/modules/hardware/impermanence/default.nix index 87422b3..4d6a9c9 100644 --- a/system/machine/pcbox/modules/hardware/impermanence/default.nix +++ b/system/machine/pcbox/modules/hardware/impermanence/default.nix @@ -39,4 +39,3 @@ _: }; }; } - diff --git a/system/machine/pcbox/modules/hardware/kernel/default.nix b/system/machine/pcbox/modules/hardware/kernel/default.nix index 36d84d9..77938fd 100644 --- a/system/machine/pcbox/modules/hardware/kernel/default.nix +++ b/system/machine/pcbox/modules/hardware/kernel/default.nix @@ -1,6 +1,7 @@ -{ pkgs -, config -, ... +{ + pkgs, + config, + ... }: { @@ -38,4 +39,3 @@ }; }; } - diff --git a/system/machine/pcbox/modules/hardware/network/default.nix b/system/machine/pcbox/modules/hardware/network/default.nix index fb54940..e121e28 100644 --- a/system/machine/pcbox/modules/hardware/network/default.nix +++ b/system/machine/pcbox/modules/hardware/network/default.nix @@ -25,13 +25,18 @@ _: ]; allowedTCPPortRanges = [ - { from = 1714; to = 1764; } # KDE Connect + { + from = 1714; + to = 1764; + } # KDE Connect ]; allowedUDPPortRanges = [ - { from = 1714; to = 1764; } # KDE Connect + { + from = 1714; + to = 1764; + } # KDE Connect ]; }; }; } - diff --git a/system/machine/pcbox/modules/ollama/default.nix b/system/machine/pcbox/modules/ollama/default.nix index 29e76bb..3998851 100644 --- a/system/machine/pcbox/modules/ollama/default.nix +++ b/system/machine/pcbox/modules/ollama/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.services.ollama.gpuSupport; -in { +in +{ options = { module.services.ollama.gpuSupport.enable = mkEnableOption "Enable gpuSupport for ollama"; }; @@ -23,4 +25,3 @@ in { }; }; } - diff --git a/system/machine/rasp/default.nix b/system/machine/rasp/default.nix index 65b6ff5..fab2605 100644 --- a/system/machine/rasp/default.nix +++ b/system/machine/rasp/default.nix @@ -1,25 +1,26 @@ -_: +{ + config, + ... +}: { module = { - locales.enable = true; - network.enable = true; + locales.enable = true; + network.enable = true; security.enable = true; timedate.enable = true; - users.enable = true; - # pihole.enable = true; - + users.enable = true; + programs = { - gnupg.enable = true; - hm.enable = true; - nh.enable = true; - mtr.enable = true; - zsh.enable = true; - fish.enable = true; - dconf.enable = true; + gnupg.enable = true; + hm.enable = true; + nh.enable = true; + mtr.enable = true; + zsh.enable = true; + fish.enable = true; + dconf.enable = true; systemPackages.enable = true; }; - services = { unbound.enable = true; @@ -33,10 +34,13 @@ _: ]; dnsRewrites = [ - { domain = "gitlab.maxmur.info"; anwser = "192.168.1.8"; } + { + domain = "gitlab.maxmur.info"; + anwser = "192.168.1.8"; + } ]; }; + }; }; } - diff --git a/system/machine/rasp/modules/nginx/default.nix b/system/machine/rasp/modules/nginx/default.nix index 263a2f2..f88d85a 100644 --- a/system/machine/rasp/modules/nginx/default.nix +++ b/system/machine/rasp/modules/nginx/default.nix @@ -36,4 +36,3 @@ _: ''; }; } - diff --git a/system/machine/rasp/modules/temp-control/default.nix b/system/machine/rasp/modules/temp-control/default.nix index db1eda2..885e7cf 100644 --- a/system/machine/rasp/modules/temp-control/default.nix +++ b/system/machine/rasp/modules/temp-control/default.nix @@ -1,13 +1,16 @@ -{ pkgs -, ... +{ + pkgs, + ... }: { - environment.systemPackages = (with pkgs; [ - python312 - ]) ++ (with pkgs.python312Packages; [ - rpi-gpio - ]); + environment.systemPackages = + (with pkgs; [ + python312 + ]) + ++ (with pkgs.python312Packages; [ + rpi-gpio + ]); systemd.services.temp-control = { enable = true; @@ -103,4 +106,3 @@ }; }; } - From 031925f5337ec557641e29f1238bf5c0b0d9516d Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:20:36 +0300 Subject: [PATCH 060/103] flake: Change ghostty input --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 57ac082..1b4c4cc 100644 --- a/flake.nix +++ b/flake.nix @@ -91,7 +91,7 @@ }; ghostty = { - url = "git+ssh://git@github.com/ghostty-org/ghostty"; + url = "github:ghostty-org/ghostty"; inputs = { nixpkgs-stable.follows = "nixpkgs"; From 2376affe8e2ea9b22de6231f88b4a4e881169bb4 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:20:48 +0300 Subject: [PATCH 061/103] flake: Change lanzaboote input --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 1b4c4cc..adbd420 100644 --- a/flake.nix +++ b/flake.nix @@ -109,7 +109,7 @@ }; lanzaboote = { - url = "github:nix-community/lanzaboote/v0.3.0"; + url = "github:nix-community/lanzaboote/v0.4.1"; inputs.nixpkgs.follows = "nixpkgs"; }; From 9ca44bd33fe813bf00dc5bff1e5bf0fbd5feba82 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:21:06 +0300 Subject: [PATCH 062/103] flake: Fmt --- flake.nix | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/flake.nix b/flake.nix index adbd420..a08f578 100644 --- a/flake.nix +++ b/flake.nix @@ -98,7 +98,7 @@ nixpkgs-unstable.follows = "nixpkgs"; }; }; - + proxmox-nixos = { url = "github:SaumonNet/proxmox-nixos"; }; @@ -145,31 +145,32 @@ }; }; - outputs = { self, flake-parts, ... } @ inputs: - let - # Description of hosts - hosts = import ./hosts.nix; + outputs = + { self, flake-parts, ... }@inputs: + let + # Description of hosts + hosts = import ./hosts.nix; - # Import helper funcfions - libx = import ./lib { inherit self inputs; }; - in flake-parts.lib.mkFlake { inherit inputs; } { - systems = libx.forAllSystems; + # Import helper funcfions + libx = import ./lib { inherit self inputs; }; + in + flake-parts.lib.mkFlake { inherit inputs; } { + systems = libx.forAllSystems; - imports = [ - ./parts - # ./docs - ]; + imports = [ + ./parts + # ./docs + ]; - flake = { - # NixOS Hosts configuration - nixosConfigurations = libx.genNixos hosts.nixos; + flake = { + # NixOS Hosts configuration + nixosConfigurations = libx.genNixos hosts.nixos; - # MacOS Hosts configuration - darwinConfigurations = libx.genDarwin hosts.darwin; + # MacOS Hosts configuration + darwinConfigurations = libx.genDarwin hosts.darwin; - # Templates - templates = import "${self}/templates" { inherit self; }; + # Templates + templates = import "${self}/templates" { inherit self; }; + }; }; - }; } - From e687227aac734c2e8661935ba1e7a8f3640530fa Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:22:30 +0300 Subject: [PATCH 063/103] system/machine/p8box: Init --- hosts.nix | 8 ++ system/machine/p8box/default.nix | 52 +++++++ system/machine/p8box/modules/default.nix | 13 ++ .../p8box/modules/hardware/default.nix | 13 ++ .../p8box/modules/hardware/disks/default.nix | 136 ++++++++++++++++++ .../hardware/extra-hardware/default.nix | 12 ++ .../modules/hardware/impermanence/default.nix | 40 ++++++ .../p8box/modules/hardware/kernel/default.nix | 34 +++++ .../modules/hardware/network/default.nix | 29 ++++ 9 files changed, 337 insertions(+) create mode 100644 system/machine/p8box/default.nix create mode 100644 system/machine/p8box/modules/default.nix create mode 100644 system/machine/p8box/modules/hardware/default.nix create mode 100644 system/machine/p8box/modules/hardware/disks/default.nix create mode 100644 system/machine/p8box/modules/hardware/extra-hardware/default.nix create mode 100644 system/machine/p8box/modules/hardware/impermanence/default.nix create mode 100644 system/machine/p8box/modules/hardware/kernel/default.nix create mode 100644 system/machine/p8box/modules/hardware/network/default.nix diff --git a/hosts.nix b/hosts.nix index 0359ec0..4ac78a8 100644 --- a/hosts.nix +++ b/hosts.nix @@ -29,6 +29,14 @@ stateVersion = "25.05"; isWorkstation = false; }; + + p8box = { + username = "maxmur"; + platform = "x86_64-linux"; + stateVersion = "25.05"; + isWorkstation = true; + wm = "sway"; + }; }; darwin = { diff --git a/system/machine/p8box/default.nix b/system/machine/p8box/default.nix new file mode 100644 index 0000000..9833348 --- /dev/null +++ b/system/machine/p8box/default.nix @@ -0,0 +1,52 @@ +_: + +{ + module = { + sound.enable = true; + boot.enable = true; + locales.enable = true; + network.enable = true; + timedate.enable = true; + users.enable = true; + variables.enable = true; + stylix.enable = true; + minimal.enable = true; + nixos-ng.enable = true; + plymouth.enable = true; + + security = { + enable = true; + enableBootOptions = true; + }; + + services = { + tlp.enable = true; + fwupd.enable = true; + polkit.enable = true; + printing.enable = true; + syncthing.enable = true; + udev.enable = true; + zram.enable = true; + greetd.enable = true; + netbird.enable = true; + + scx = { + enable = true; + schedulerType = "scx_bpfland"; + }; + }; + + programs = { + dconf.enable = true; + gnupg.enable = true; + hm.enable = true; + nh.enable = true; + kdeconnect.enable = true; + mtr.enable = true; + xdg-portal.enable = true; + zsh.enable = true; + fish.enable = true; + systemPackages.enable = true; + }; + }; +} diff --git a/system/machine/p8box/modules/default.nix b/system/machine/p8box/modules/default.nix new file mode 100644 index 0000000..ed0fd43 --- /dev/null +++ b/system/machine/p8box/modules/default.nix @@ -0,0 +1,13 @@ +{ + self, + machineDir, + allDirs, + ... +}: + +let + modules = "${self}/system/machine/${machineDir}/modules"; +in +{ + imports = allDirs modules; +} diff --git a/system/machine/p8box/modules/hardware/default.nix b/system/machine/p8box/modules/hardware/default.nix new file mode 100644 index 0000000..7b45ccc --- /dev/null +++ b/system/machine/p8box/modules/hardware/default.nix @@ -0,0 +1,13 @@ +{ + self, + machineDir, + allDirs, + ... +}: + +let + hardwareModulesPath = "${self}/system/machine/${machineDir}/modules/hardware"; +in +{ + imports = allDirs hardwareModulesPath; +} diff --git a/system/machine/p8box/modules/hardware/disks/default.nix b/system/machine/p8box/modules/hardware/disks/default.nix new file mode 100644 index 0000000..cdc9d21 --- /dev/null +++ b/system/machine/p8box/modules/hardware/disks/default.nix @@ -0,0 +1,136 @@ +_: + +let + label = "Nixos-Main"; +in +{ + # For impermanence + boot.initrd.systemd.services.rollback = { + description = "Rollback BTRFS root subvolume to a pristine state"; + unitConfig.DefaultDependencies = "no"; + serviceConfig.Type = "oneshot"; + wantedBy = [ "initrd.target" ]; + after = [ "systemd-cryptsetup@crypted.service" ]; + before = [ "sysroot.mount" ]; + + script = '' + vgchange -ay pool + mkdir -p /btrfs_tmp + mount /dev/pool/root /btrfs_tmp + + if [[ -e /btrfs_tmp/root ]]; then + mkdir -p /btrfs_tmp/old_roots + timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S") + mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp" + fi + + delete_subvolume_recursively() { + IFS=$'\n' + for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do + delete_subvolume_recursively "/btrfs_tmp/$i" + done + btrfs subvolume delete "$1" + } + + for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do + delete_subvolume_recursively "$i" + done + + btrfs subvolume create /btrfs_tmp/root + umount /btrfs_tmp + ''; + }; + + fileSystems = { + "/persist" = { + neededForBoot = true; + }; + }; + + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/disk/by-label/${label}"; + + content = { + type = "gpt"; + + partitions = { + esp = { + size = "2G"; + type = "EF00"; + + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + + mountOptions = [ + "defaults" + "umask=0077" + ]; + }; + }; + + luks = { + size = "100%"; + + content = { + type = "luks"; + name = "crypted"; + extraFormatArgs = [ "--label=${label}" ]; + + content = { + type = "lvm_pv"; + vg = "pool"; + }; + }; + }; + }; + }; + }; + }; + + lvm_vg = { + pool = { + type = "lvm_vg"; + + lvs = { + root = { + size = "100%FREE"; + + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + + subvolumes = { + "/root" = { + mountpoint = "/"; + }; + + "/persist" = { + mountpoint = "/persist"; + mountOptions = [ + "compress=zstd" + "subvol=persist" + "noatime" + ]; + }; + + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ + "compress=zstd" + "subvol=nix" + "noatime" + ]; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/system/machine/p8box/modules/hardware/extra-hardware/default.nix b/system/machine/p8box/modules/hardware/extra-hardware/default.nix new file mode 100644 index 0000000..6d1f4dd --- /dev/null +++ b/system/machine/p8box/modules/hardware/extra-hardware/default.nix @@ -0,0 +1,12 @@ +{ + lib, + config, + ... +}: + +{ + hardware = { + enableRedistributableFirmware = true; + cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; +} diff --git a/system/machine/p8box/modules/hardware/impermanence/default.nix b/system/machine/p8box/modules/hardware/impermanence/default.nix new file mode 100644 index 0000000..6e94223 --- /dev/null +++ b/system/machine/p8box/modules/hardware/impermanence/default.nix @@ -0,0 +1,40 @@ +_: + +{ + programs.fuse.userAllowOther = true; + + environment.persistence = { + "/persist" = { + hideMounts = true; + + directories = [ + "/etc/nixos" + "/etc/NetworkManager/system-connections" + "/etc/wireguard" + "/etc/secureboot" + "/var/lib/bluetooth" + "/var/lib/nixos" + "/var/log" + "/var/lib/docker" + "/var/lib/netbird" + "/var/lib/containers" + "/var/lib/qemu" + "/var/lib/private" + "/var/db" + "/var/lib/NetworkManager" + "/var/lib/chrony" + "/var/lib/iwd" + "/var/lib/libvirt" + "/var/lib/systemd" + ]; + + files = [ + "/etc/machine-id" + "/etc/ssh/ssh_host_ed25519_key" + "/etc/ssh/ssh_host_ed25519_key.pub" + "/etc/ssh/ssh_host_rsa_key" + "/etc/ssh/ssh_host_rsa_key.pub" + ]; + }; + }; +} diff --git a/system/machine/p8box/modules/hardware/kernel/default.nix b/system/machine/p8box/modules/hardware/kernel/default.nix new file mode 100644 index 0000000..c82b8ba --- /dev/null +++ b/system/machine/p8box/modules/hardware/kernel/default.nix @@ -0,0 +1,34 @@ +{ + pkgs, + ... +}: + +{ + boot = { + kernelPackages = pkgs.linuxPackages_latest; + + kernelModules = [ + "kvm-intel" + ]; + + kernelParams = [ + "fbcon=rotate:1" + "video=DSI-1:panel_orientation=right_side_up" + ]; + + extraModulePackages = [ ]; + + initrd = { + availableKernelModules = [ + "xhci_pci" + "ahci" + + "xhci_pci" + "nvme" + "usb_storage" + "sd_mod" + "uas" + ]; + }; + }; +} diff --git a/system/machine/p8box/modules/hardware/network/default.nix b/system/machine/p8box/modules/hardware/network/default.nix new file mode 100644 index 0000000..1f967ee --- /dev/null +++ b/system/machine/p8box/modules/hardware/network/default.nix @@ -0,0 +1,29 @@ +_: + +{ + systemd.network = { + enable = true; + }; + + networking = { + firewall = { + enable = true; + + allowedTCPPorts = [ + 8384 + 22000 + ]; + + allowedUDPPorts = [ + 22000 + 21027 + ]; + + allowedTCPPortRanges = [ + ]; + + allowedUDPPortRanges = [ + ]; + }; + }; +} From 1683e7d7c1da6405f1ea2d5da6fdce201aa6a8a3 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:22:46 +0300 Subject: [PATCH 064/103] parts: Fmt --- parts/default.nix | 10 +- parts/devshell/default.nix | 51 +++---- parts/topology/default.nix | 41 +++--- parts/topology/home/default.nix | 226 +++++++++++++++-------------- parts/topology/timeweb/default.nix | 207 +++++++++++++------------- parts/treefmt/default.nix | 30 +++- 6 files changed, 309 insertions(+), 256 deletions(-) diff --git a/parts/default.nix b/parts/default.nix index 8aafb98..82aa76f 100644 --- a/parts/default.nix +++ b/parts/default.nix @@ -1,10 +1,12 @@ -{ lib -, ... +{ + lib, + ... }: { imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: builtins.toString ./. + "/${module}") (builtins.attrNames (builtins.readDir (builtins.toString ./.))) + map (module: builtins.toString ./. + "/${module}") ( + builtins.attrNames (builtins.readDir (builtins.toString ./.)) + ) ); } - diff --git a/parts/devshell/default.nix b/parts/devshell/default.nix index ff64b49..f5775d5 100644 --- a/parts/devshell/default.nix +++ b/parts/devshell/default.nix @@ -1,31 +1,32 @@ { - perSystem = { pkgs, ... }: { - # For nix develop - devShells.default = pkgs.mkShell { - name = "flake-template"; - meta.description = "DevShell for Flake"; + perSystem = + { pkgs, ... }: + { + # For nix develop + devShells.default = pkgs.mkShell { + name = "flake-template"; + meta.description = "DevShell for Flake"; - # Env - EDITOR = "${pkgs.helix}/bin/hx"; + # Env + EDITOR = "${pkgs.helix}/bin/hx"; - shellHook = '' - exec fish - ''; + shellHook = '' + exec fish + ''; - packages = with pkgs; [ - yazi - git - curl - helix - fish - tmux - lynx - ripgrep - htop - disko - fzf - ]; + packages = with pkgs; [ + yazi + git + curl + helix + fish + tmux + lynx + ripgrep + htop + disko + fzf + ]; + }; }; - }; } - diff --git a/parts/topology/default.nix b/parts/topology/default.nix index fbd2d18..5d5096b 100644 --- a/parts/topology/default.nix +++ b/parts/topology/default.nix @@ -1,6 +1,7 @@ -{ inputs -, self -, ... +{ + inputs, + self, + ... }: { @@ -13,23 +14,25 @@ perSystem = _: { # For nix topology topology.modules = [ - ({ config, ... }: - let - inherit - (config.lib.topology) - mkInternet - mkConnection; - in { - inherit (self) nixosConfigurations; + ( + { config, ... }: + let + inherit (config.lib.topology) + mkInternet + mkConnection + ; + in + { + inherit (self) nixosConfigurations; - nodes.internet = mkInternet { - connections = [ - (mkConnection "mgts-bridge-router" "wan1") - (mkConnection "timeweb-router" "wan1") - ]; - }; - }) + nodes.internet = mkInternet { + connections = [ + (mkConnection "mgts-bridge-router" "wan1") + (mkConnection "timeweb-router" "wan1") + ]; + }; + } + ) ]; }; } - diff --git a/parts/topology/home/default.nix b/parts/topology/home/default.nix index 3f92a1f..3e30f28 100644 --- a/parts/topology/home/default.nix +++ b/parts/topology/home/default.nix @@ -1,140 +1,152 @@ -{ self -, ... +{ + self, + ... }: { perSystem = _: { # For nix topology topology.modules = [ - ({ config, ... }: - let - inherit - (config.lib.topology) - mkRouter - mkSwitch - mkDevice - mkConnection; - in { - inherit (self) nixosConfigurations; - - networks = { - mgts-bridge = { - name = "MGTS bridge network"; - cidrv4 = "192.168.0.0/24"; - }; - - home-maxmur = { - name = "Home maxmur"; - cidrv4 = "192.168.1.0/24"; - }; - }; - - nodes = { - mgts-bridge-router = mkRouter "Bridge router" { - info = "MGTS Innbox G84"; - image = ../images/Innbox_G84.png; - - interfaceGroups = [ - [ "eth1" ] - [ "wan1" ] - ]; - - interfaces = { - eth1 = { - addresses = [ "192.168.0.1" ]; - network = "mgts-bridge"; - }; + ( + { config, ... }: + let + inherit (config.lib.topology) + mkRouter + mkSwitch + mkDevice + mkConnection + ; + in + { + inherit (self) nixosConfigurations; + + networks = { + mgts-bridge = { + name = "MGTS bridge network"; + cidrv4 = "192.168.0.0/24"; }; - connections = { - eth1 = mkConnection "main-router" "wan1"; + home-maxmur = { + name = "Home maxmur"; + cidrv4 = "192.168.1.0/24"; }; }; - main-router = mkRouter "Main Router" { - info = "Keenetic Giga"; - image = ../images/keenetic-giga.png; - - interfaceGroups = [ - [ "eth1" "wifi" ] - [ "wan1" ] - ]; + nodes = { + mgts-bridge-router = mkRouter "Bridge router" { + info = "MGTS Innbox G84"; + image = ../images/Innbox_G84.png; + + interfaceGroups = [ + [ "eth1" ] + [ "wan1" ] + ]; + + interfaces = { + eth1 = { + addresses = [ "192.168.0.1" ]; + network = "mgts-bridge"; + }; + }; - interfaces = { - eth1 = { - addresses = [ "192.168.1.1" ]; - network = "home-maxmur"; + connections = { + eth1 = mkConnection "main-router" "wan1"; }; + }; - wifi = { - addresses = [ "192.168.1.1" ]; - network = "home-maxmur"; + main-router = mkRouter "Main Router" { + info = "Keenetic Giga"; + image = ../images/keenetic-giga.png; + + interfaceGroups = [ + [ + "eth1" + "wifi" + ] + [ "wan1" ] + ]; + + interfaces = { + eth1 = { + addresses = [ "192.168.1.1" ]; + network = "home-maxmur"; + }; + + wifi = { + addresses = [ "192.168.1.1" ]; + network = "home-maxmur"; + }; + + wan1 = { + addresses = [ "192.168.0.2" ]; + network = "mgts-bridge"; + }; }; - wan1 = { - addresses = [ "192.168.0.2" ]; - network = "mgts-bridge"; + connections = { + wifi = mkConnection "nbox" "wlp3s0"; }; }; - connections = { - wifi = mkConnection "nbox" "wlp3s0"; + switch-main = mkSwitch "Main Switch" { + info = "TP-Link TL-SG1016D"; + image = ../images/TL-SG1016D.png; + + interfaceGroups = [ + [ + "eth1" + "eth2" + "eth3" + "eth4" + "eth5" + ] + ]; + + connections = { + eth1 = mkConnection "main-router" "eth1"; + eth2 = mkConnection "pcbox" "eth0"; + eth3 = mkConnection "rasp" "eth0"; + eth4 = mkConnection "macbox" "eth0"; + eth5 = mkConnection "mbox" "eth0"; + }; }; - }; - switch-main = mkSwitch "Main Switch" { - info = "TP-Link TL-SG1016D"; - image = ../images/TL-SG1016D.png; + macbox = mkDevice "macbox" { + deviceType = "device"; + hardware.info = "Mac Mini"; + deviceIcon = ../images/apple.png; - interfaceGroups = [ - [ "eth1" "eth2" "eth3" "eth4" "eth5" ] - ]; + interfaces = { + eth0 = { + addresses = [ "192.168.1.75" ]; + network = "home-maxmur"; + }; + }; - connections = { - eth1 = mkConnection "main-router" "eth1"; - eth2 = mkConnection "pcbox" "eth0"; - eth3 = mkConnection "rasp" "eth0"; - eth4 = mkConnection "macbox" "eth0"; - eth5 = mkConnection "mbox" "eth0"; + interfaceGroups = [ + [ "eth0" ] + ]; }; - }; - macbox = mkDevice "macbox" { - deviceType = "device"; - hardware.info = "Mac Mini"; - deviceIcon = ../images/apple.png; + mbox = mkDevice "mbox" { + deviceType = "device"; + hardware.info = "Mint box"; + deviceIcon = ../images/linux-mint.png; - interfaces = { - eth0 = { - addresses = [ "192.168.1.75" ]; - network = "home-maxmur"; + interfaces = { + eth0 = { + addresses = [ "192.168.1.80" ]; + network = "home-maxmur"; + }; }; - }; - - interfaceGroups = [ - [ "eth0" ] - ]; - }; - mbox = mkDevice "mbox" { - deviceType = "device"; - hardware.info = "Mint box"; - deviceIcon = ../images/linux-mint.png; - - interfaces = { - eth0 = { - addresses = [ "192.168.1.80" ]; - network = "home-maxmur"; - }; + interfaceGroups = [ + [ "eth0" ] + ]; }; - - interfaceGroups = [ - [ "eth0" ] - ]; }; - }; - }) + } + ) ]; }; } - diff --git a/parts/topology/timeweb/default.nix b/parts/topology/timeweb/default.nix index 52bfd33..3448116 100644 --- a/parts/topology/timeweb/default.nix +++ b/parts/topology/timeweb/default.nix @@ -1,131 +1,144 @@ -{ self -, ... +{ + self, + ... }: { perSystem = _: { # For nix topology topology.modules = [ - ({ config, ... }: - let - inherit - (config.lib.topology) - mkRouter - mkDevice - mkConnection; - in { - inherit (self) nixosConfigurations; - - networks = { - timeweb-private = { - name = "Timeweb private"; - cidrv4 = "10.20.0.0/16"; - }; - - wireguard-private = { - name = "Wireguard private"; - cidrv4 = "10.200.100.0/24"; - }; - }; - - nodes = { - timeweb-router = mkRouter "Timeweb router" { - info = "Timeweb internal router"; - interfaceGroups = [ - [ "eth1" ] - [ "wan1" ] - ]; - - interfaces = { - eth1 = { - addresses = [ "10.20.0.1" ]; - network = "timeweb-private"; - }; + ( + { config, ... }: + let + inherit (config.lib.topology) + mkRouter + mkDevice + mkConnection + ; + in + { + inherit (self) nixosConfigurations; + + networks = { + timeweb-private = { + name = "Timeweb private"; + cidrv4 = "10.20.0.0/16"; }; - connections = { - eth1 = [ - (mkConnection "site" "eth0") - (mkConnection "services" "eth0") - ]; + wireguard-private = { + name = "Wireguard private"; + cidrv4 = "10.200.100.0/24"; }; }; - site = mkDevice "site" { - deviceType = "device"; - hardware.info = "Site hosting"; - deviceIcon = ../images/timeweb.png; + nodes = { + timeweb-router = mkRouter "Timeweb router" { + info = "Timeweb internal router"; + interfaceGroups = [ + [ "eth1" ] + [ "wan1" ] + ]; - interfaces = { - eth0 = { - addresses = [ "10.20.0.4" ]; - network = "timeweb-private"; + interfaces = { + eth1 = { + addresses = [ "10.20.0.1" ]; + network = "timeweb-private"; + }; }; - wg0 = { - addresses = [ "10.200.100.1" ]; - network = "wireguard-private"; - renderer.hidePhysicalConnections = false; - virtual = true; - type = "wireguard"; + connections = { + eth1 = [ + (mkConnection "site" "eth0") + (mkConnection "services" "eth0") + ]; }; }; - interfaceGroups = [ - [ "eth0" ] - [ "wg0" ] - ]; - - services = { - nginx = { - name = "NGINX"; - icon = "services.nginx"; - details = { - "http" = { text = "0.0.0.0:80"; }; - "https" = { text = "0.0.0.0:443"; }; + site = mkDevice "site" { + deviceType = "device"; + hardware.info = "Site hosting"; + deviceIcon = ../images/timeweb.png; + + interfaces = { + eth0 = { + addresses = [ "10.20.0.4" ]; + network = "timeweb-private"; + }; + + wg0 = { + addresses = [ "10.200.100.1" ]; + network = "wireguard-private"; + renderer.hidePhysicalConnections = false; + virtual = true; + type = "wireguard"; }; }; - }; - }; - services = mkDevice "services" { - deviceType = "device"; - hardware.info = "Services hosting"; - deviceIcon = ../images/timeweb.png; + interfaceGroups = [ + [ "eth0" ] + [ "wg0" ] + ]; - interfaces = { - eth0 = { - addresses = [ "10.20.0.5" ]; - network = "timeweb-private"; + services = { + nginx = { + name = "NGINX"; + icon = "services.nginx"; + details = { + "http" = { + text = "0.0.0.0:80"; + }; + "https" = { + text = "0.0.0.0:443"; + }; + }; + }; }; }; - interfaceGroups = [ - [ "eth0" ] - ]; - - services = { - nginx = { - name = "NGINX"; - icon = "services.nginx"; - details = { - "http" = { text = "0.0.0.0:80"; }; - "https" = { text = "0.0.0.0:443"; }; + services = mkDevice "services" { + deviceType = "device"; + hardware.info = "Services hosting"; + deviceIcon = ../images/timeweb.png; + + interfaces = { + eth0 = { + addresses = [ "10.20.0.5" ]; + network = "timeweb-private"; }; }; - gitlab = { - name = "Gitlab"; - icon = ../images/services/gitlab.png; - details = { - "ssh" = { text = "0.0.0.0:4224"; }; + interfaceGroups = [ + [ "eth0" ] + ]; + + services = { + nginx = { + name = "NGINX"; + icon = "services.nginx"; + details = { + "http" = { + text = "0.0.0.0:80"; + }; + "https" = { + text = "0.0.0.0:443"; + }; + }; + }; + + gitlab = { + name = "Gitlab"; + icon = ../images/services/gitlab.png; + details = { + "ssh" = { + text = "0.0.0.0:4224"; + }; + }; }; }; }; }; - }; - }) + } + ) ]; }; } - diff --git a/parts/treefmt/default.nix b/parts/treefmt/default.nix index 52824f3..20c207d 100644 --- a/parts/treefmt/default.nix +++ b/parts/treefmt/default.nix @@ -1,5 +1,6 @@ -{ inputs -, ... +{ + inputs, + ... }: { @@ -7,16 +8,37 @@ inputs.treefmt-nix.flakeModule ]; - perSystem = { config, ... }: { + perSystem = _: { # For nix fmt treefmt.config = { projectRootFile = "flake.nix"; + settings = { + global.excludes = [ + "LICENSE" + ".gitattributes" + + "*.png" + "*.svg" + "*.bp" + "*.conf" + "*.zsh" + "**/*rc" + "**/.gitkeep" + + "secrets/**" + ]; + }; programs = { deadnix.enable = true; statix.enable = true; + shellcheck.enable = true; + prettier.enable = true; + + nixfmt.enable = true; + stylua.enable = true; + yamlfmt.enable = true; }; }; }; } - From 3f245f7ec6de1ad66bdadd82c2a5223441abddc2 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:24:03 +0300 Subject: [PATCH 065/103] home/modules: Add chromium configuration --- home/modules/chrome/default.nix | 55 +++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/home/modules/chrome/default.nix b/home/modules/chrome/default.nix index 59ff0d2..198272b 100644 --- a/home/modules/chrome/default.nix +++ b/home/modules/chrome/default.nix @@ -1,30 +1,67 @@ -{ pkgs -, lib -, config -, ... +{ + pkgs, + lib, + config, + ... }: with lib; let - cfg = config.module.chrome; -in { + cfg = config.module.chromium; +in +{ options = { - module.chrome.enable = mkEnableOption "Enables Google Chrome"; + module.chromium.enable = mkEnableOption "Enables Chromium"; }; config = mkIf cfg.enable { programs.chromium = { enable = true; - package = pkgs.google-chrome; + package = pkgs.ungoogled-chromium; + + extensions = [ + "ddkjiahejlhfcafbddmgiahcphecmpfh" # uBlock Origin Lite + "mnjggcdmjocbbbhaepdhchncahnbgone" # SponsorBlock + "jghecgabfgfdldnmbfkhmffcabddioke" # Volume Master + ]; commandLineArgs = [ + # Wayland "--ozone-platform=wayland" "--ozone-platform-hint=auto" + # Performance "--gtk-version=4" "--ignore-gpu-blocklist" + "--enable-gpu-rasterization" + "--enable-oop-rasterization" + "--enable-zero-copy" + "--ignore-gpu-blocklist" + # Etc + "--disk-cache=$XDG_RUNTIME_DIR/chromium-cache" + "--disable-reading-from-canvas" + "--no-first-run" + "--disable-wake-on-wifi" + "--disable-speech-api" + "--disable-speech-synthesis-api" + # Use strict extension verification + "--extension-content-verification=enforce_strict" + "--extensions-install-verification=enforce_strict" + # Disable pings + "--no-pings" + # Require HTTPS for component updater + "--component-updater=require_encryption" + # Disable crash upload + "--no-crash-upload" + # don't run things without asking + "--no-service-autorun" + # Disable sync + "--disable-sync" + # Disable autofill + "AutofillPaymentCardBenefits" + "AutofillPaymentCvcStorage" + "AutofillPaymentCardBenefits" ]; }; }; } - From f406ab46cf33ddcb0bb734dc4576c732a75d6f7e Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:24:13 +0300 Subject: [PATCH 066/103] home/modules: Add librewolf configuration --- home/modules/librewolf/default.nix | 245 ++++++++++++++++++++++++++++- 1 file changed, 240 insertions(+), 5 deletions(-) diff --git a/home/modules/librewolf/default.nix b/home/modules/librewolf/default.nix index 85d6c0e..1d38be9 100644 --- a/home/modules/librewolf/default.nix +++ b/home/modules/librewolf/default.nix @@ -1,13 +1,16 @@ -{ lib -, config -, ... +{ + lib, + config, + pkgs, + ... }: with lib; let cfg = config.module.librewolf; -in { +in +{ options = { module.librewolf.enable = mkEnableOption "Enables librewolf"; }; @@ -16,16 +19,248 @@ in { programs.librewolf = { enable = true; + profiles = { + work = { + id = 1; + name = "Work"; + + extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + ublock-origin + vimium + ]; + + search = { + force = true; + default = "Google"; + + order = [ + "Google" + "DuckDuckGo" + ]; + + engines = { + "Bing".metaData.hidden = true; + "Amazon.com".metaData.hidden = true; + }; + }; + }; + + default = { + id = 0; + name = "Default"; + isDefault = true; + + extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + ublock-origin + sponsorblock + return-youtube-dislikes + foxyproxy-standard + vimium + wappalyzer + ]; + + search = { + force = true; + default = "nogoo"; + + order = [ + "Google" + "DuckDuckGo" + "4get" + "nogoo" + "Youtube" + "NixOS Options" + "Nix Packages" + "GitHub" + "Home Manager" + ]; + + engines = { + "Bing".metaData.hidden = true; + "Amazon.com".metaData.hidden = true; + + "4get" = { + updateInterval = 24 * 60 * 60 * 1000; + definedAliases = [ "@4get" ]; + urls = [ + { + template = "https://4get.bloat.cat/web"; + params = [ + { + name = "s"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + + "nogoo" = { + updateInterval = 24 * 60 * 60 * 1000; + definedAliases = [ "@nogoo" ]; + urls = [ + { + template = "https://nogoo.me/search"; + params = [ + { + name = "q"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + + "YouTube" = { + iconUpdateURL = "https://youtube.com/favicon.ico"; + updateInterval = 24 * 60 * 60 * 1000; + definedAliases = [ "@yt" ]; + urls = [ + { + template = "https://www.youtube.com/results"; + params = [ + { + name = "search_query"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + + "Nix Packages" = { + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@np" ]; + urls = [ + { + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + + "NixOS Options" = { + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@no" ]; + urls = [ + { + template = "https://search.nixos.org/options"; + params = [ + { + name = "channel"; + value = "unstable"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + + "GitHub" = { + iconUpdateURL = "https://github.com/favicon.ico"; + updateInterval = 24 * 60 * 60 * 1000; + definedAliases = [ "@gh" ]; + + urls = [ + { + template = "https://github.com/search"; + params = [ + { + name = "q"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + + "Home Manager" = { + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@hm" ]; + + url = [ + { + template = "https://mipmip.github.io/home-manager-option-search/"; + params = [ + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + }; + }; + }; + }; + }; + settings = { "webgl.disabled" = false; "privacy.resistFingerprinting" = false; "privacy.clearOnShutdown.history" = false; "privacy.clearOnShutdown.cookies" = false; + "privacy.clearOnShutdown_v2.cookiesAndStorage" = false; "network.cookie.lifetimePolicy" = 0; "browser.fullscreen.autohide" = false; + "ui.key.menuAccessKeyFocuses" = false; + + "browser.translations.enable" = false; + "geo.enabled" = false; + "media.ffmpeg.vaapi.enabled" = true; + "media.rdd-ffmpeg.enabled" = true; + "widget.dmabuf.force-enabled" = true; + "gfx.webrender.all" = true; + "gfx.webrender.compositor" = true; + "image.jxl.enabled" = true; + + # Disable some useless stuff + "extensions.pocket.enabled" = false; # disable pocket, save links, send tabs + "extensions.abuseReport.enabled" = false; # don't show 'report abuse' in extensions + "extensions.formautofill.creditCards.enabled" = false; # don't auto-fill credit card information + "identity.fxaccounts.enabled" = false; # disable firefox login + "identity.fxaccounts.toolbar.enabled" = false; + "identity.fxaccounts.pairing.enabled" = false; + "identity.fxaccounts.commands.enabled" = false; + "browser.contentblocking.report.lockwise.enabled" = false; # don't use firefox password manger + "browser.uitour.enabled" = false; # no tutorial please + "browser.newtabpage.activity-stream.showSponsored" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + + # Disable telemetry for privacy reasons + "toolkit.telemetry.archive.enabled" = false; + "toolkit.telemetry.enabled" = false; # enforced by nixos + "toolkit.telemetry.server" = ""; + "toolkit.telemetry.unified" = false; + "extensions.webcompat-reporter.enabled" = false; # don't report compability problems to mozilla + "datareporting.policy.dataSubmissionEnabled" = false; + "datareporting.healthreport.uploadEnabled" = false; + "browser.ping-centre.telemetry" = false; + "browser.urlbar.eventTelemetry.enabled" = false; # (default) + + # disable annoying web features + "dom.push.enabled" = false; # no notifications, really... + "dom.push.connection.enabled" = false; + "dom.battery.enabled" = false; # you don't need to see my battery... + + "extensions.autoDisableScopes" = 0; + "extensions.enabledScopes" = 15; + "browser.bookmarks.addedImportButton" = false; + "browser.toolbars.bookmarks.visibility" = "never"; }; }; }; } - From 0a91d269dd38f11abc7e9395316d6620c1297bc8 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:25:01 +0300 Subject: [PATCH 067/103] home/modules: Sway fmt --- home/modules/sway/keybinds/default.nix | 121 +++++++++++++------------ 1 file changed, 61 insertions(+), 60 deletions(-) diff --git a/home/modules/sway/keybinds/default.nix b/home/modules/sway/keybinds/default.nix index acbb706..0b9bce9 100644 --- a/home/modules/sway/keybinds/default.nix +++ b/home/modules/sway/keybinds/default.nix @@ -1,7 +1,8 @@ -{ config -, lib -, pkgs -, ... +{ + config, + lib, + pkgs, + ... }: with lib; @@ -10,33 +11,33 @@ let cfg = config.module.sway.keybindings; super = "Mod4"; - workspace1 = "workspace number 1"; - workspace2 = "workspace number 2"; - workspace3 = "workspace number 3"; - workspace4 = "workspace number 4"; - workspace5 = "workspace number 5"; - workspace6 = "workspace number 6"; - workspace7 = "workspace number 7"; - workspace8 = "workspace number 8"; - workspace9 = "workspace number 9"; + workspace1 = "workspace number 1"; + workspace2 = "workspace number 2"; + workspace3 = "workspace number 3"; + workspace4 = "workspace number 4"; + workspace5 = "workspace number 5"; + workspace6 = "workspace number 6"; + workspace7 = "workspace number 7"; + workspace8 = "workspace number 8"; + workspace9 = "workspace number 9"; workspace10 = "workspace number 10"; workspace11 = "workspace number 11"; workspace12 = "workspace number 12"; - terminal = config.module.defaults.terminalCmd; - appLauncher = config.module.defaults.appLauncherCmd; - audioControl = config.module.defaults.audioControlCmd; + terminal = config.module.defaults.terminalCmd; + appLauncher = config.module.defaults.appLauncherCmd; + audioControl = config.module.defaults.audioControlCmd; brightnessControl = config.module.defaults.brightnessControlCmd; - clipHist = config.module.defaults.clipHistCmd; - notificationsApp = config.module.defaults.notificationsAppCmd; + clipHist = config.module.defaults.clipHistCmd; + notificationsApp = config.module.defaults.notificationsAppCmd; - screenshotArea = "${pkgs.slurp}/bin/slurp | ${pkgs.grim}/bin/grim -g - - | ${pkgs.wl-clipboard}/bin/wl-copy"; - screenshotScreen = "${pkgs.grim}/bin/grim -o $(swaymsg -t get_outputs | ${pkgs.jq}/bin/jq -r '.[] | select(.focused) | .name') - | ${pkgs.wl-clipboard}/bin/wl-copy"; + screenshotArea = "${pkgs.slurp}/bin/slurp | ${pkgs.grim}/bin/grim -g - - | ${pkgs.wl-clipboard}/bin/wl-copy"; + screenshotScreen = "${pkgs.grim}/bin/grim -o $(swaymsg -t get_outputs | ${pkgs.jq}/bin/jq -r '.[] | select(.focused) | .name') - | ${pkgs.wl-clipboard}/bin/wl-copy"; powerMenu = pkgs.writeShellScriptBin "powerMenu.sh" '' #!/usr/bin/env bash - op=$(echo -e " Poweroff\nοƒœ Reboot\n Suspend\nο€£ Lock\nο‚‹ Logout" | ${pkgs.wofi}/bin/wofi -i --dmenu | ${pkgs.gawk}/bin/awk '{print tolower($2)}') + op=$(echo -e " Poweroff\nοƒœ Reboot\n Suspend\nο€£ Lock\nο‚‹ Logout" | ${pkgs.rofi-wayland}/bin/rofi -i -dmenu | ${pkgs.gawk}/bin/awk '{print tolower($2)}') case $op in poweroff) @@ -54,7 +55,8 @@ let ;; esac ''; -in { +in +{ options.module.sway.keybindings = { enable = mkEnableOption "Enable sway keybindings"; }; @@ -89,9 +91,9 @@ in { "${super}+l" = "focus right"; # With arrows - "${super}+Left" = "focus left"; - "${super}+Down" = "focus down"; - "${super}+Up" = "focus up"; + "${super}+Left" = "focus left"; + "${super}+Down" = "focus down"; + "${super}+Up" = "focus up"; "${super}+Right" = "focus right"; # Move focused window @@ -102,9 +104,9 @@ in { "${super}+Shift+l" = "move right"; # With arrows - "${super}+Shift+Left" = "move left"; - "${super}+Shift+Down" = "move down"; - "${super}+Shift+Up" = "move up"; + "${super}+Shift+Left" = "move left"; + "${super}+Shift+Down" = "move down"; + "${super}+Shift+Up" = "move up"; "${super}+Shift+Right" = "move right"; # Application launcher @@ -112,17 +114,17 @@ in { "${super}+c" = "exec ${clipHist}"; # Multimedia keys - "xf86audioraisevolume" = "exec ${audioControl} set-sink-volume @DEFAULT_SINK@ +5%"; - "xf86audiolowervolume" = "exec ${audioControl} set-sink-volume @DEFAULT_SINK@ -5%"; - "xf86audiomute" = "exec ${audioControl} set-sink-mute @DEFAULT_SINK@ toggle"; + "xf86audioraisevolume" = "exec ${audioControl} set-sink-volume @DEFAULT_SINK@ +5%"; + "xf86audiolowervolume" = "exec ${audioControl} set-sink-volume @DEFAULT_SINK@ -5%"; + "xf86audiomute" = "exec ${audioControl} set-sink-mute @DEFAULT_SINK@ toggle"; "XF86MonBrightnessDown" = "exec ${brightnessControl} set 5%-"; - "XF86MonBrightnessUp" = "exec ${brightnessControl} set +5%"; + "XF86MonBrightnessUp" = "exec ${brightnessControl} set +5%"; # Notifications "${super}+n" = "exec ${notificationsApp}"; # Screenshot - "Print" = "exec ${screenshotArea}"; + "Print" = "exec ${screenshotArea}"; "Shift+Print" = "exec ${screenshotScreen}"; # Reload the configuration file @@ -144,16 +146,16 @@ in { "${super}+a" = "focus parent"; # Switch to workspace using number row - "${super}+1" = "${workspace1}"; - "${super}+2" = "${workspace2}"; - "${super}+3" = "${workspace3}"; - "${super}+4" = "${workspace4}"; - "${super}+5" = "${workspace5}"; - "${super}+6" = "${workspace6}"; - "${super}+7" = "${workspace7}"; - "${super}+8" = "${workspace8}"; - "${super}+9" = "${workspace9}"; - "${super}+0" = "${workspace10}"; + "${super}+1" = "${workspace1}"; + "${super}+2" = "${workspace2}"; + "${super}+3" = "${workspace3}"; + "${super}+4" = "${workspace4}"; + "${super}+5" = "${workspace5}"; + "${super}+6" = "${workspace6}"; + "${super}+7" = "${workspace7}"; + "${super}+8" = "${workspace8}"; + "${super}+9" = "${workspace9}"; + "${super}+0" = "${workspace10}"; "${super}+minus" = "${workspace11}"; "${super}+equal" = "${workspace12}"; @@ -161,16 +163,16 @@ in { "${super}+z" = "scratchpad show"; # Move window to workspace using number row - "${super}+Shift+1" = "move container to ${workspace1}"; - "${super}+Shift+2" = "move container to ${workspace2}"; - "${super}+Shift+3" = "move container to ${workspace3}"; - "${super}+Shift+4" = "move container to ${workspace4}"; - "${super}+Shift+5" = "move container to ${workspace5}"; - "${super}+Shift+6" = "move container to ${workspace6}"; - "${super}+Shift+7" = "move container to ${workspace7}"; - "${super}+Shift+8" = "move container to ${workspace8}"; - "${super}+Shift+9" = "move container to ${workspace9}"; - "${super}+Shift+0" = "move container to ${workspace10}"; + "${super}+Shift+1" = "move container to ${workspace1}"; + "${super}+Shift+2" = "move container to ${workspace2}"; + "${super}+Shift+3" = "move container to ${workspace3}"; + "${super}+Shift+4" = "move container to ${workspace4}"; + "${super}+Shift+5" = "move container to ${workspace5}"; + "${super}+Shift+6" = "move container to ${workspace6}"; + "${super}+Shift+7" = "move container to ${workspace7}"; + "${super}+Shift+8" = "move container to ${workspace8}"; + "${super}+Shift+9" = "move container to ${workspace9}"; + "${super}+Shift+0" = "move container to ${workspace10}"; "${super}+Shift+minus" = "move container to ${workspace11}"; "${super}+Shift+equal" = "move container to ${workspace12}"; @@ -187,9 +189,9 @@ in { "l" = "resize shrink width 10px"; # Arrows - "Left" = "resize shrink width 10px"; - "Down" = "resize shrink height 10px"; - "Up" = "resize shrink height 10px"; + "Left" = "resize shrink width 10px"; + "Down" = "resize shrink height 10px"; + "Up" = "resize shrink height 10px"; "Right" = "resize shrink width 10px"; # Vim like binds @@ -199,9 +201,9 @@ in { "Shift+l" = "resize grow width 10px"; # Arrows - "Shift+Left" = "resize grow width 10px"; - "Shift+Down" = "resize grow height 10px"; - "Shift+Up" = "resize grow height 10px"; + "Shift+Left" = "resize grow width 10px"; + "Shift+Down" = "resize grow height 10px"; + "Shift+Up" = "resize grow height 10px"; "Shift+Right" = "resize grow width 10px"; # Return to normal mode @@ -212,4 +214,3 @@ in { }; }; } - From cc88989fc397926b012f9818b9db38e1e2206110 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:25:46 +0300 Subject: [PATCH 068/103] home/modules: Sway outputs fmt --- home/modules/sway/outputs/default.nix | 111 +++++++++++++++++++------- 1 file changed, 83 insertions(+), 28 deletions(-) diff --git a/home/modules/sway/outputs/default.nix b/home/modules/sway/outputs/default.nix index 14ddc34..f1a5b2d 100644 --- a/home/modules/sway/outputs/default.nix +++ b/home/modules/sway/outputs/default.nix @@ -1,7 +1,8 @@ -{ config -, lib -, hostname -, ... +{ + config, + lib, + hostname, + ... }: with lib; @@ -10,14 +11,14 @@ let cfg = config.module.sway.outputs; outputs = { - default = { }; + default = { }; pcbox = { - DP-1 = { + DP-1 = { resolution = "1920x1080@144Hz"; position = "0 0"; }; - + DP-2 = { resolution = "1920x1080@144Hz"; position = "1920 0"; @@ -33,33 +34,88 @@ let }; workspaces = { - default = [ ]; + default = [ ]; pcbox = [ - { workspace = "1"; output = "DP-2"; } - { workspace = "2"; output = "DP-2"; } - { workspace = "3"; output = "DP-2"; } - { workspace = "4"; output = "DP-2"; } - { workspace = "5"; output = "DP-2"; } - { workspace = "6"; output = "DP-2"; } - { workspace = "7"; output = "DP-1"; } - { workspace = "8"; output = "DP-1"; } - { workspace = "9"; output = "DP-1"; } - { workspace = "10"; output = "DP-1"; } - { workspace = "11"; output = "DP-1"; } - { workspace = "12"; output = "DP-1"; } + { + workspace = "1"; + output = "DP-2"; + } + { + workspace = "2"; + output = "DP-2"; + } + { + workspace = "3"; + output = "DP-2"; + } + { + workspace = "4"; + output = "DP-2"; + } + { + workspace = "5"; + output = "DP-2"; + } + { + workspace = "6"; + output = "DP-2"; + } + { + workspace = "7"; + output = "DP-1"; + } + { + workspace = "8"; + output = "DP-1"; + } + { + workspace = "9"; + output = "DP-1"; + } + { + workspace = "10"; + output = "DP-1"; + } + { + workspace = "11"; + output = "DP-1"; + } + { + workspace = "12"; + output = "DP-1"; + } ]; nbox = [ - { workspace = "1"; output = "eDP-1"; } - { workspace = "2"; output = "eDP-1"; } - { workspace = "3"; output = "eDP-1"; } - { workspace = "4"; output = "eDP-1"; } - { workspace = "5"; output = "eDP-1"; } - { workspace = "6"; output = "eDP-1"; } + { + workspace = "1"; + output = "eDP-1"; + } + { + workspace = "2"; + output = "eDP-1"; + } + { + workspace = "3"; + output = "eDP-1"; + } + { + workspace = "4"; + output = "eDP-1"; + } + { + workspace = "5"; + output = "eDP-1"; + } + { + workspace = "6"; + output = "eDP-1"; + } ]; }; -in { +in +{ options.module.sway.outputs = { enable = mkEnableOption "Enable sway outputs"; }; @@ -72,4 +128,3 @@ in { }; }; } - From f368420345dcb39a15d4f03f5d6b70d7bd80df37 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:26:05 +0300 Subject: [PATCH 069/103] home/modules: Sway add p8box outputs --- home/modules/sway/outputs/default.nix | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/home/modules/sway/outputs/default.nix b/home/modules/sway/outputs/default.nix index f1a5b2d..2a38f53 100644 --- a/home/modules/sway/outputs/default.nix +++ b/home/modules/sway/outputs/default.nix @@ -31,6 +31,13 @@ let position = "0 0"; }; }; + + p8box = { + DSI-1 = { + resolution = "800x1280@60Hz"; + position = "0 0"; + }; + }; }; workspaces = { @@ -113,6 +120,33 @@ let output = "eDP-1"; } ]; + + p8box = [ + { + workspace = "1"; + output = "eDP-1"; + } + { + workspace = "2"; + output = "eDP-1"; + } + { + workspace = "3"; + output = "eDP-1"; + } + { + workspace = "4"; + output = "eDP-1"; + } + { + workspace = "5"; + output = "eDP-1"; + } + { + workspace = "6"; + output = "eDP-1"; + } + ]; }; in { From 855f06bafb520f4dcf79260c5b32cc7bc89ac74f Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:26:22 +0300 Subject: [PATCH 070/103] home/modules: Sway fmt --- home/modules/sway/default.nix | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/home/modules/sway/default.nix b/home/modules/sway/default.nix index 69cbe78..e27b675 100644 --- a/home/modules/sway/default.nix +++ b/home/modules/sway/default.nix @@ -1,15 +1,17 @@ -{ self -, config -, lib -, pkgs -, ... +{ + self, + config, + lib, + pkgs, + ... }: with lib; let cfg = config.module.sway; -in { +in +{ imports = [ "${self}/home/modules/sway/keybinds" "${self}/home/modules/sway/outputs" @@ -22,13 +24,13 @@ in { config = mkIf cfg.enable { module.sway = { keybindings.enable = cfg.enable; - outputs.enable = cfg.enable; + outputs.enable = cfg.enable; }; home.sessionVariables = { XDG_CURRENT_DESKTOP = "sway"; XDG_SESSION_DESKTOP = "sway"; - GTK_CSD = 0; + GTK_CSD = 0; }; gtk = { @@ -68,7 +70,7 @@ in { inner = 7; }; - bars = [ ]; + bars = [ ]; window = { titlebar = false; @@ -79,15 +81,18 @@ in { { command = "${pkgs.wl-clipboard}/bin/wl-paste --type text --watch cliphist store"; } { command = "${pkgs.wl-clipboard}/bin/wl-paste --type image --watch cliphist store"; } { command = "${pkgs.sway}/bin/swaymsg 'workspace 1; exec ${pkgs.librewolf}/bin/librewolf'"; } - { command = "${pkgs.sway}/bin/swaymsg 'workspace 2; exec ${pkgs.telegram-desktop}/bin/telegram-desktop'"; } + { + command = "${pkgs.sway}/bin/swaymsg 'workspace 2; exec ${pkgs.telegram-desktop}/bin/telegram-desktop'"; + } { command = "${pkgs.sway}/bin/swaymsg 'workspace 4; exec ${pkgs.obsidian}/bin/obsidian'"; } { command = "${pkgs.sway}/bin/swaymsg 'workspace 5; exec ${pkgs.foot}/bin/foot'"; } { command = "${pkgs.sway}/bin/swaymsg 'workspace 5; exec ${pkgs.foot}/bin/foot'"; } { command = "${pkgs.sway}/bin/swaymsg 'workspace 5; exec ${pkgs.foot}/bin/foot'"; } - { command = "${pkgs.sway}/bin/swaymsg 'workspace 6; exec ${pkgs.librewolf}/bin/librewolf -P work'"; } + { + command = "${pkgs.sway}/bin/swaymsg 'workspace 6; exec ${pkgs.librewolf}/bin/librewolf -P Work'"; + } ]; }; }; }; } - From 3d7729376a76156e16943dc1c6adf59b492e3c40 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:28:01 +0300 Subject: [PATCH 071/103] home/modules: Waybar fmt --- home/modules/waybar/default.nix | 45 ++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/home/modules/waybar/default.nix b/home/modules/waybar/default.nix index a4eaa26..9546cc0 100644 --- a/home/modules/waybar/default.nix +++ b/home/modules/waybar/default.nix @@ -1,16 +1,18 @@ -{ self -, pkgs -, config -, lib -, wm -, ... +{ + self, + pkgs, + config, + lib, + wm, + ... }: with lib; let cfg = config.module.waybar; -in { +in +{ options = { module.waybar.enable = mkEnableOption "Enables waybar"; }; @@ -75,7 +77,9 @@ in { disable-scroll = true; all-outputs = true; show-special = true; - persistent-workspaces = {"*" = 6;}; + persistent-workspaces = { + "*" = 6; + }; }; "sway/workspaces" = { @@ -140,7 +144,13 @@ in { format-source = "󰍬"; format-source-muted = "󰍭"; format-muted = "󰖁 / {format_source}"; - format-icons = {default = ["σ°•Ώ" "σ°–€" "σ°•Ύ"];}; + format-icons = { + default = [ + "σ°•Ώ" + "σ°–€" + "σ°•Ύ" + ]; + }; on-click = "${pkgs.pavucontrol}/bin/pavucontrol"; on-click-right = "${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle"; on-scroll-up = "${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +1%"; @@ -152,7 +162,13 @@ in { battery = { format = "{icon} {capacity}%"; format-charging = "{icon} {capacity}%"; - format-icons = ["" "" "" "" ""]; + format-icons = [ + "" + "" + "" + "" + "" + ]; format-plugged = " {power} W"; interval = 5; tooltip-format = "{timeTo}, {capacity}%\n {power} W"; @@ -190,7 +206,13 @@ in { # Network network = { - format-icons = ["σ°€―" "󰀟" "σ°€’" "σ°€₯" "󰀨"]; + format-icons = [ + "σ°€―" + "󰀟" + "σ°€’" + "σ°€₯" + "󰀨" + ]; format-wifi = "{icon}"; format-ethernet = "σ°ˆ€"; # 󰈁 format-disconnected = "⚠"; @@ -214,4 +236,3 @@ in { }; }; } - From ad98aad8263ef87676fb82b334890a438186426a Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:28:11 +0300 Subject: [PATCH 072/103] home/modules: Waybar change wofi to defaults value --- home/modules/waybar/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/modules/waybar/default.nix b/home/modules/waybar/default.nix index 9546cc0..a77186b 100644 --- a/home/modules/waybar/default.nix +++ b/home/modules/waybar/default.nix @@ -61,13 +61,13 @@ in "custom/nixlogo" = { format = "οŒ“"; tooltip = false; - on-click = "${pkgs.wofi}/bin/wofi --show drun"; + on-click = config.module.defaults.appLauncherCmd; }; "image#nixlogo" = { path = "${self}/assets/Nix_Logo.svg"; tooltip = false; - on-click = "${pkgs.wofi}/bin/wofi --show drun"; + on-click = config.module.defaults.appLauncherCmd; }; # Workspaces From 020ab5f4e5f45bbc31485d6d953b1d86b90e4073 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:28:20 +0300 Subject: [PATCH 073/103] home/modules: Waybar css fmt --- home/modules/waybar/style.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/home/modules/waybar/style.css b/home/modules/waybar/style.css index 197f60b..fc0bfe0 100644 --- a/home/modules/waybar/style.css +++ b/home/modules/waybar/style.css @@ -51,7 +51,7 @@ window#waybar { #battery, #custom-notification, #workspaces button, -#custom-nixlogo, +#custom-nixlogo, #image, #privacy, #clock { @@ -63,6 +63,10 @@ window#waybar { padding: 0.2rem 0.6rem 0.2rem 0.6rem; } +#privacy { + background: @base0B; +} + .modules-left #workspaces button { border-bottom: 1px solid @base03; } @@ -202,4 +206,3 @@ menu menuitem:only-child { color: @base05; } } - From 177b632c03dfbaba369450b7a3dfbe499d31cdbc Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:28:47 +0300 Subject: [PATCH 074/103] home/users/maxmur: Packages module fmt --- home/users/maxmur/modules/packages/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/home/users/maxmur/modules/packages/default.nix b/home/users/maxmur/modules/packages/default.nix index 5e30531..3e12428 100644 --- a/home/users/maxmur/modules/packages/default.nix +++ b/home/users/maxmur/modules/packages/default.nix @@ -43,11 +43,11 @@ in # Text Editors obsidian - # Fonts - nerd-fonts.jetbrains-mono - nerd-fonts.ubuntu-mono - nerd-fonts.iosevka - corefonts + # Fonts + nerd-fonts.jetbrains-mono + nerd-fonts.ubuntu-mono + nerd-fonts.iosevka + corefonts ] ++ lib.optionals (isLinux && isWorkstation) [ inputs.ghostty.packages.x86_64-linux.default From 7d679618c0c8f2198e5c70eda854f3c8c9b57807 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:28:55 +0300 Subject: [PATCH 075/103] home/users/maxmur: Remove gpick from packages --- home/users/maxmur/modules/packages/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/home/users/maxmur/modules/packages/default.nix b/home/users/maxmur/modules/packages/default.nix index 3e12428..3d1e945 100644 --- a/home/users/maxmur/modules/packages/default.nix +++ b/home/users/maxmur/modules/packages/default.nix @@ -70,7 +70,6 @@ in # Office onlyoffice-bin - gpick # Misc obs-studio dconf2nix From 698e1642914b50b500e3b1485e22d5d73c6d68fa Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:30:33 +0300 Subject: [PATCH 076/103] home/users/maxmur: Fmt --- home/users/maxmur/default.nix | 71 ++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/home/users/maxmur/default.nix b/home/users/maxmur/default.nix index b629a4d..f1aeac3 100644 --- a/home/users/maxmur/default.nix +++ b/home/users/maxmur/default.nix @@ -1,13 +1,14 @@ -{ isWorkstation -, isLinux -, hyprlandEnable ? false -, swayEnable ? false -, wmEnable ? false -, ... +{ + isWorkstation, + isLinux, + hyprlandEnable ? false, + swayEnable ? false, + wmEnable ? false, + ... }: { - nixpkgs.overlays = [ ]; + nixpkgs.overlays = [ ]; stylix.targets = { vscode.enable = false; @@ -16,50 +17,50 @@ module = { alacritty.enable = isWorkstation; - vscode.enable = isWorkstation; - emacs.enable = isWorkstation; - zathura.enable = isWorkstation; - stylix.enable = isWorkstation; + vscode.enable = isWorkstation; + emacs.enable = isWorkstation; + zathura.enable = isWorkstation; + stylix.enable = isWorkstation; - chrome.enable = isLinux && isWorkstation; - firefox.enable = isLinux && isWorkstation; - librewolf.enable = isLinux && isWorkstation; + chromium.enable = isLinux && isWorkstation; + firefox.enable = isLinux && isWorkstation; + librewolf.enable = isLinux && isWorkstation; thunderbird.enable = isLinux && isWorkstation; - foot.enable = isLinux && isWorkstation; - ssh.enable = isLinux && isWorkstation; + foot.enable = isLinux && isWorkstation; + ssh.enable = isLinux && isWorkstation; hyprland.enable = hyprlandEnable && isLinux && isWorkstation; hyprlock.enable = hyprlandEnable && isLinux && isWorkstation; - sway.enable = swayEnable && isLinux && isWorkstation; + sway.enable = swayEnable && isLinux && isWorkstation; swaylock.enable = swayEnable && isLinux && isWorkstation; hypridle.enable = wmEnable && isLinux && isWorkstation; - waybar.enable = wmEnable && isLinux && isWorkstation; fuzzel.enable = wmEnable && isLinux && isWorkstation; wofi.enable = wmEnable && isLinux && isWorkstation; - swaync.enable = wmEnable && isLinux && isWorkstation; + waybar.enable = wmEnable && isLinux && isWorkstation; + swaync.enable = wmEnable && isLinux && isWorkstation; - btop.enable = true; - eza.enable = true; - git.enable = true; - fzf.enable = true; - htop.enable = true; - ripgrep.enable = true; - lazygit.enable = true; - neofetch.enable = true; - fastfetch.enable = true; - nvim.enable = true; - helix.enable = true; + btop.enable = true; + eza.enable = true; + git.enable = true; + fzf.enable = true; + htop.enable = true; + ripgrep.enable = true; + lazygit.enable = true; + neofetch.enable = true; + fastfetch.enable = true; + nvim.enable = true; + helix.enable = true; password-store.enable = true; - zsh.enable = true; - fish.enable = true; - zoxide.enable = true; - yazi.enable = true; + zsh.enable = true; + fish.enable = true; + zoxide.enable = true; + yazi.enable = true; user = { impermanence.enable = isLinux && isWorkstation; - xdg.enable = isLinux && isWorkstation; + xdg.enable = isLinux && isWorkstation; packages.enable = true; }; From 01b833901d59a0cd68af99b5852202744f343076 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:30:50 +0300 Subject: [PATCH 077/103] home/users/maxmur: Disable fuzzel/wofi. Enable rofi. --- home/users/maxmur/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/home/users/maxmur/default.nix b/home/users/maxmur/default.nix index f1aeac3..2d30293 100644 --- a/home/users/maxmur/default.nix +++ b/home/users/maxmur/default.nix @@ -36,9 +36,8 @@ swaylock.enable = swayEnable && isLinux && isWorkstation; hypridle.enable = wmEnable && isLinux && isWorkstation; - fuzzel.enable = wmEnable && isLinux && isWorkstation; - wofi.enable = wmEnable && isLinux && isWorkstation; waybar.enable = wmEnable && isLinux && isWorkstation; + rofi.enable = wmEnable && isLinux && isWorkstation; swaync.enable = wmEnable && isLinux && isWorkstation; btop.enable = true; From a1cb7233d06ae2fe9eb98006eb5e7f9fefb97f6a Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:31:10 +0300 Subject: [PATCH 078/103] home/users/maxmur: Fmt --- home/users/maxmur/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/home/users/maxmur/default.nix b/home/users/maxmur/default.nix index 2d30293..32db143 100644 --- a/home/users/maxmur/default.nix +++ b/home/users/maxmur/default.nix @@ -65,4 +65,3 @@ }; }; } - From 72cf336a0bd9b51d0a5bb8aa2ec0d8bedd5c607c Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:32:40 +0300 Subject: [PATCH 079/103] home: Constructor fmt --- home/default.nix | 113 ++++++++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 51 deletions(-) diff --git a/home/default.nix b/home/default.nix index 8a3e790..8bc5641 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,68 +1,80 @@ -{ self -, pkgs -, lib -, inputs -, hostname -, username -, platform -, hmStateVersion -, isWorkstation ? false -, wm ? "" -, swayEnable ? false -, hyprlandEnable ? false -, wmEnable ? false -, ... +{ + self, + pkgs, + lib, + inputs, + hostname, + username, + platform, + hmStateVersion, + isWorkstation ? false, + wm ? "", + swayEnable ? false, + hyprlandEnable ? false, + wmEnable ? false, + ... }: let inherit (pkgs.stdenv) isDarwin; inherit (pkgs.stdenv) isLinux; - stateVersion = hmStateVersion; - isRoot = username == "root"; - homeDirectory = if isDarwin then "/Users/${username}" else if isRoot then "/root" else "/home/${username}"; - userConfigurationPath = "${self}/home/users/${username}"; + stateVersion = hmStateVersion; + isRoot = username == "root"; + homeDirectory = + if isDarwin then + "/Users/${username}" + else if isRoot then + "/root" + else + "/home/${username}"; + userConfigurationPath = "${self}/home/users/${username}"; userConfigurationPathExist = builtins.pathExists userConfigurationPath; - userModulesPath = "${self}/home/users/${username}/modules"; - userModulesPathExist = builtins.pathExists userModulesPath; - sshModulePath = "${self}/home/modules/ssh"; - sshModuleExistPath = builtins.pathExists sshModulePath; -in { + userModulesPath = "${self}/home/users/${username}/modules"; + userModulesPathExist = builtins.pathExists userModulesPath; + sshModulePath = "${self}/home/modules/ssh"; + sshModuleExistPath = builtins.pathExists sshModulePath; +in +{ home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - backupFileExtension = "backup-" + pkgs.lib.readFile "${pkgs.runCommand "timestamp" {} "echo -n `date '+%Y%m%d%H%M%S'` > $out"}"; + useGlobalPkgs = true; + useUserPackages = true; + backupFileExtension = + "backup-" + + pkgs.lib.readFile "${pkgs.runCommand "timestamp" { } "echo -n `date '+%Y%m%d%H%M%S'` > $out"}"; - extraSpecialArgs = { - inherit - inputs - self - hostname - username - platform - stateVersion - isLinux + extraSpecialArgs = { + inherit + inputs + self + hostname + username + platform + stateVersion + isLinux isWorkstation - wm - swayEnable - hyprlandEnable - wmEnable; + wm + swayEnable + hyprlandEnable + wmEnable + ; }; - sharedModules = [ - inputs.sops-nix.homeManagerModules.sops - ]; - users.${username} = { - imports = [ - inputs.impermanence.nixosModules.home-manager.impermanence - inputs.nur.modules.homeManager.default + imports = + [ + inputs.impermanence.nixosModules.home-manager.impermanence + inputs.sops-nix.homeManagerModules.sops + inputs.nur.modules.homeManager.default - "${self}/modules" - "${self}/home/modules" - ] ++ lib.optional sshModuleExistPath sshModulePath + "${self}/modules" + "${self}/home/modules" + ] + ++ lib.optional sshModuleExistPath sshModulePath ++ lib.optional userConfigurationPathExist userConfigurationPath - ++ lib.optional userModulesPathExist userModulesPath; + ++ lib.optional userModulesPathExist userModulesPath; + + nixpkgs.overlays = [ inputs.nur.overlay ]; home = { inherit username; @@ -72,4 +84,3 @@ in { }; }; } - From 62c8a43817d3ba1afc70e86f049b579423fd4991 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:33:11 +0300 Subject: [PATCH 080/103] modules: Defaults fmt --- modules/defaults/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/defaults/default.nix b/modules/defaults/default.nix index 6593942..018f3d6 100644 --- a/modules/defaults/default.nix +++ b/modules/defaults/default.nix @@ -1,14 +1,16 @@ -{ lib -, config -, pkgs -, ... +{ + lib, + config, + pkgs, + ... }: with lib; let cfg = config.module.defaults; -in { +in +{ options.module.defaults = { # Defaults terminal = mkOption { @@ -78,7 +80,7 @@ in { ssh = { pubKeys = mkOption { type = types.listOf types.str; - default = []; + default = [ ]; }; }; From c4ce5bbb69de1acbee45df4a26a202dc77f0b207 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:33:26 +0300 Subject: [PATCH 081/103] modules: Defaults add rofi-wayland and change default --- modules/defaults/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/defaults/default.nix b/modules/defaults/default.nix index 018f3d6..4846e4f 100644 --- a/modules/defaults/default.nix +++ b/modules/defaults/default.nix @@ -26,10 +26,11 @@ in type = types.enum [ "wofi" "rofi" + "rofi-wayland" "fuzzel" ]; - default = "wofi"; + default = "rofi-wayland"; }; browser = mkOption { From d3cb556829b122a37142b063914bfa6b377302fa Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:33:33 +0300 Subject: [PATCH 082/103] modules: Defaults add chromium --- modules/defaults/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/defaults/default.nix b/modules/defaults/default.nix index 4846e4f..50efe77 100644 --- a/modules/defaults/default.nix +++ b/modules/defaults/default.nix @@ -37,6 +37,7 @@ in type = types.enum [ "librewolf" "firefox" + "chromium" ]; default = "librewolf"; From 7f15c7d14f1c531938cfda91180584c0a19e5df1 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:34:25 +0300 Subject: [PATCH 083/103] modules: Defaults change cmd choosing for browsers and appLaucnhers --- modules/defaults/default.nix | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/modules/defaults/default.nix b/modules/defaults/default.nix index 50efe77..f85a92c 100644 --- a/modules/defaults/default.nix +++ b/modules/defaults/default.nix @@ -49,15 +49,33 @@ in default = "${pkgs.${cfg.terminal}}/bin/${cfg.terminal}"; }; - browserCmd = mkOption { - type = types.str; - default = "${pkgs.${cfg.browser}}/bin/${cfg.browser}"; - }; + browserCmd = + + let + browserExecs = { + librewolf = "${pkgs.librewolf}/bin/librewolf"; + firefox = "${pkgs.firefox}/bin/firefox"; + chromium = "${pkgs.ungoogled-chromium}/bin/chromium"; + }; + in + mkOption { + type = types.str; + default = browserExecs.${cfg.browser}; + }; - appLauncherCmd = mkOption { - type = types.str; - default = "${pkgs.${cfg.appLauncher}}/bin/${cfg.appLauncher} --show drun"; - }; + appLauncherCmd = + let + appLauncherExecs = { + rofi = "${pkgs.rofi}/bin/rofi -show drun"; + rofi-wayland = "${pkgs.rofi-wayland}/bin/rofi -show drun"; + wofi = "${pkgs.wofi}/wofi --show drun"; + fuzzel = "${pkgs.fuzzel}/fuzzel --show drun"; + }; + in + mkOption { + type = types.str; + default = appLauncherExecs.${cfg.appLauncher}; + }; audioControlCmd = mkOption { type = types.str; @@ -114,4 +132,3 @@ in }; }; } - From f290fe6ec61c6a8943357c943f7633133f1c30f4 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:34:40 +0300 Subject: [PATCH 084/103] modules: Nix fmt --- modules/nix/default.nix | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 347e1f7..c43922f 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -1,15 +1,17 @@ -{ inputs -, lib -, config -, pkgs -, ... +{ + inputs, + lib, + config, + pkgs, + ... }: with lib; let cfg = config.module.nix-config; -in { +in +{ options = { module.nix-config = { enable = mkEnableOption "Enables nix-config"; @@ -42,7 +44,10 @@ in { registry.s.flake = inputs.self; settings = { - experimental-features = [ "nix-command" "flakes" ]; + experimental-features = [ + "nix-command" + "flakes" + ]; substituters = [ "https://hyprland.cachix.org" @@ -61,4 +66,3 @@ in { }; }; } - From 7a36263ca98241a1150ad49335f5ea4ba546f310 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:34:49 +0300 Subject: [PATCH 085/103] modules: Fluffychat change version --- modules/nix/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nix/default.nix b/modules/nix/default.nix index c43922f..bb890cc 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -33,7 +33,7 @@ in "electron-27.3.11" "electron-25.9.0" "electron-19.1.9" - "fluffychat-linux-1.22.1" + "fluffychat-linux-1.23.0" "olm-3.2.16" ]; }; From 00bc4142db5fea92ae620ee4d782f216b5f9d159 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:35:37 +0300 Subject: [PATCH 086/103] modules: Stylix add useCursor option --- modules/stylix/default.nix | 100 ++++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 46 deletions(-) diff --git a/modules/stylix/default.nix b/modules/stylix/default.nix index 4cc1644..462e25b 100644 --- a/modules/stylix/default.nix +++ b/modules/stylix/default.nix @@ -1,72 +1,80 @@ -{ pkgs -, lib -, self -, config -, hostname -, ... -}: +{ + pkgs, + lib, + self, + config, + hostname, + ... +}: with lib; let cfg = config.module.stylix; - inherit (pkgs.stdenv) isLinux; theme = "${pkgs.base16-schemes}/share/themes/nord.yaml"; wallpaper = "${self}/assets/grey_gradient.png"; cursorSize = if hostname == "nbox" then 24 else 14; -in { +in +{ options = { module.stylix = { enable = mkEnableOption "Enables stylix"; + + useCursor = mkOption { + type = types.bool; + default = true; + description = "Enable cursor settings"; + }; }; }; config = mkIf cfg.enable { - stylix = ({ - enable = true; - image = wallpaper; - autoEnable = true; - polarity = "dark"; - - base16Scheme = theme; + stylix = + { + enable = true; + image = wallpaper; + autoEnable = true; + polarity = "dark"; - opacity = { - applications = 1.0; - terminal = 1.0; - popups = 1.0; - desktop = 1.0; - }; + base16Scheme = theme; - fonts = { - sizes = { - applications = 11; - terminal = 11; - popups = 12; - desktop = 11; + opacity = { + applications = 1.0; + terminal = 1.0; + popups = 1.0; + desktop = 1.0; }; - serif = { - package = pkgs.nerd-fonts.iosevka; - name = "Iosevka Nerd Font Mono"; - }; + fonts = { + sizes = { + applications = 11; + terminal = 11; + popups = 12; + desktop = 11; + }; - sansSerif = config.stylix.fonts.serif; + serif = { + package = pkgs.nerd-fonts.iosevka; + name = "Iosevka Nerd Font Mono"; + }; - monospace = { - inherit (config.stylix.fonts.serif) package; - name = "Iosevka Nerd Font Mono"; - }; + sansSerif = config.stylix.fonts.serif; - emoji = config.stylix.fonts.serif; - }; - } // optionalAttrs isLinux { - cursor = { - name = "Vimix-cursors"; - package = pkgs.vimix-cursors; - size = cursorSize; + monospace = { + inherit (config.stylix.fonts.serif) package; + name = "Iosevka Nerd Font Mono"; + }; + + emoji = config.stylix.fonts.serif; + }; + } + // optionalAttrs cfg.useCursor { + cursor = { + name = "Vimix-cursors"; + package = pkgs.vimix-cursors; + size = cursorSize; + }; }; - }); }; } - From 204c0eb9c261c6064020ff25e45693fb66716bac Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:36:02 +0300 Subject: [PATCH 087/103] system/machine/hlbox: Add zpool1 & zpool2 --- system/machine/hlbox/modules/hardware/disks/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system/machine/hlbox/modules/hardware/disks/default.nix b/system/machine/hlbox/modules/hardware/disks/default.nix index 81f6391..cacdedb 100644 --- a/system/machine/hlbox/modules/hardware/disks/default.nix +++ b/system/machine/hlbox/modules/hardware/disks/default.nix @@ -5,6 +5,8 @@ _: boot.zfs.extraPools = [ "zmirror" + "zpool1" + "zpool2" ]; fileSystems = { From 9aeec41f5270f424e71204096a8aae7b4245efa6 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:36:49 +0300 Subject: [PATCH 088/103] system/machine/hlbox: Fmt --- .../hlbox/modules/hardware/kernel/default.nix | 35 +++++++++++++------ 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/system/machine/hlbox/modules/hardware/kernel/default.nix b/system/machine/hlbox/modules/hardware/kernel/default.nix index 77122fc..9912af3 100644 --- a/system/machine/hlbox/modules/hardware/kernel/default.nix +++ b/system/machine/hlbox/modules/hardware/kernel/default.nix @@ -1,34 +1,47 @@ -{ config -, ... +{ + config, + ... }: let ipKernelParam = with config.module.defaults.network; [ "ip=${ip}::${gw}:${mask}::${iface}:none" ]; -in { +in +{ boot = { - kernelModules = [ "kvm-intel" "r8169" ]; + kernelModules = [ + "kvm-intel" + "r8169" + ]; extraModulePackages = [ ]; - kernelParams = [ - "zfs.zfs_arc_max=2147483648" + kernelParams = [ + "zfs.zfs_arc_max=2147483648" ] ++ ipKernelParam; initrd = { - availableKernelModules = [ "ath10k_pci" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "r8169" ]; + availableKernelModules = [ + "ath10k_pci" + "xhci_pci" + "ahci" + "nvme" + "usbhid" + "usb_storage" + "sd_mod" + "r8169" + ]; kernelModules = [ ]; network = { enable = true; ssh = { - enable = true; - port = 2222; - hostKeys = [ /etc/secrets/initrd/ssh_host_ed25519_key ]; + enable = true; + port = 2222; + hostKeys = [ /etc/secrets/initrd/ssh_host_ed25519_key ]; authorizedKeys = config.module.defaults.ssh.pubKeys; }; }; }; }; } - From b2ef58c94c8628d09c64cd67c486a2d5b305039d Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:37:39 +0300 Subject: [PATCH 089/103] system/nixos/modules: Add ipAddress option for proxmox-ve --- .../modules/services/proxmox-ve/default.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/system/nixos/modules/services/proxmox-ve/default.nix b/system/nixos/modules/services/proxmox-ve/default.nix index e8eb6cb..982f6bc 100644 --- a/system/nixos/modules/services/proxmox-ve/default.nix +++ b/system/nixos/modules/services/proxmox-ve/default.nix @@ -1,21 +1,29 @@ -{ config -, lib -, ... +{ + config, + lib, + ... }: with lib; let cfg = config.module.services.proxmox-ve; -in { +in +{ options.module.services.proxmox-ve = { enable = mkEnableOption "Enable module proxmox-ve"; + + ipAddress = mkOption { + type = types.str; + default = ""; + description = "IP address for proxmox"; + }; }; config = mkIf cfg.enable { services.proxmox-ve = { enable = true; + inherit (cfg) ipAddress; }; }; } - From 3d31fd3ff0c7becb061428b39791a972a27c6246 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:37:54 +0300 Subject: [PATCH 090/103] system/machine/hlbox: Set ipAddress for proxmox-ve --- system/machine/hlbox/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/machine/hlbox/default.nix b/system/machine/hlbox/default.nix index f3d4d02..bfb5025 100644 --- a/system/machine/hlbox/default.nix +++ b/system/machine/hlbox/default.nix @@ -43,7 +43,10 @@ }; services = { - proxmox-ve.enable = true; + proxmox-ve = { + enable = true; + ipAddress = config.module.defaults.network.ip; + }; ssh = { enable = true; From bfb967f2dbc57063f1b237ecc1190e363ef1a5b7 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:38:15 +0300 Subject: [PATCH 091/103] system/machine/nbox: Fix overlays path --- .../nbox/modules/hardware/graphics-card/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/system/machine/nbox/modules/hardware/graphics-card/default.nix b/system/machine/nbox/modules/hardware/graphics-card/default.nix index 2e71b6d..f684e86 100644 --- a/system/machine/nbox/modules/hardware/graphics-card/default.nix +++ b/system/machine/nbox/modules/hardware/graphics-card/default.nix @@ -1,11 +1,13 @@ -{ pkgs -, ... +{ + pkgs, + self, + ... }: { # Graphics card settings nixpkgs.overlays = [ - (import ../../../../../overlays/vaapiIntel) + (import "${self}/system/nixos/overlays/vaapiIntel") ]; hardware.graphics = { @@ -21,4 +23,3 @@ ]; }; } - From 807068059f12d79b51d32ef4edf646d485f36f34 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:38:24 +0300 Subject: [PATCH 092/103] system/machine/nbox: Remove dns servers --- system/machine/nbox/modules/hardware/network/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/system/machine/nbox/modules/hardware/network/default.nix b/system/machine/nbox/modules/hardware/network/default.nix index f9c5f0f..9e2d347 100644 --- a/system/machine/nbox/modules/hardware/network/default.nix +++ b/system/machine/nbox/modules/hardware/network/default.nix @@ -11,11 +11,6 @@ _: }; networking = { - nameservers = [ - "8.8.8.8" - "8.8.4.4" - ]; - firewall = { enable = true; From 2d3ed8e1c9e52c3d523bf329e94ce0147a708298 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:38:52 +0300 Subject: [PATCH 093/103] system/machine/rasp: Add ssh pubkey settings --- .../rasp/modules/hardware/network/default.nix | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/system/machine/rasp/modules/hardware/network/default.nix b/system/machine/rasp/modules/hardware/network/default.nix index bfa1cea..a7bbb2b 100644 --- a/system/machine/rasp/modules/hardware/network/default.nix +++ b/system/machine/rasp/modules/hardware/network/default.nix @@ -1,8 +1,12 @@ -{ config -, ... +{ + config, + username, + ... }: { + users.users.${username}.openssh.authorizedKeys.keys = config.module.defaults.ssh.pubKeys; + systemd.network = { enable = true; @@ -30,6 +34,7 @@ 5335 8053 8384 + 34561 ]; allowedUDPPorts = [ @@ -42,13 +47,21 @@ topology.self = { services = { nginx.details = { - "https" = { text = "0.0.0.0:443"; }; - "gitlab ssh" = { text = "0.0.0.0:4224"; }; - "syncthing web" = { text = "0.0.0.0:8384"; }; + "https" = { + text = "0.0.0.0:443"; + }; + "gitlab ssh" = { + text = "0.0.0.0:4224"; + }; + "syncthing web" = { + text = "0.0.0.0:8384"; + }; }; adguardhome.details = { - "dns" = { text = "192.168.1.8:53"; }; + "dns" = { + text = "192.168.1.8:53"; + }; }; }; @@ -63,4 +76,3 @@ }; }; } - From 8afcc5aaec7827083e5c5de776ec04b482b02adb Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:39:17 +0300 Subject: [PATCH 094/103] system/machine/rasp: Fmt --- .../machine/rasp/modules/hardware/default.nix | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/system/machine/rasp/modules/hardware/default.nix b/system/machine/rasp/modules/hardware/default.nix index 8a74526..e70678b 100644 --- a/system/machine/rasp/modules/hardware/default.nix +++ b/system/machine/rasp/modules/hardware/default.nix @@ -1,20 +1,22 @@ -{ self -, lib -, machineDir -, pkgs -, ... +{ + self, + machineDir, + pkgs, + ... }: let machineHardwareModulesPath = "${self}/system/machine/${machineDir}/modules/hardware"; -in { - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${machineHardwareModulesPath}/${module}") (builtins.attrNames (builtins.readDir machineHardwareModulesPath)) - ); +in +{ boot = { kernelPackages = pkgs.linuxKernel.packages.linux_rpi4; - initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ]; + initrd.availableKernelModules = [ + "xhci_pci" + "usbhid" + "usb_storage" + ]; loader = { grub.enable = false; @@ -34,10 +36,9 @@ in { libraspberrypi ]; - services.openssh = { - enable = true; - }; - hardware.enableRedistributableFirmware = true; + nix.settings.trusted-users = [ + "maxmur" + "root" + ]; } - From 7bf9790a1387455f4d2818b0a7ce1e6e37bec51d Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:42:34 +0300 Subject: [PATCH 095/103] system/machine/rasp: Add defaults network and ssh settings --- system/machine/rasp/default.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/system/machine/rasp/default.nix b/system/machine/rasp/default.nix index fab2605..e7a8715 100644 --- a/system/machine/rasp/default.nix +++ b/system/machine/rasp/default.nix @@ -21,6 +21,21 @@ dconf.enable = true; systemPackages.enable = true; }; + + defaults = { + network = { + iface = "end0"; + ip = "192.168.1.8"; + gw = "192.168.1.1"; + mask = "255.255.255.0"; + cidr = "24"; + }; + + ssh.pubKeys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIdsRbzlFB23BdrUzzuBdcDmlkCrdU/620MlH1jdi6vx" + ]; + }; + services = { unbound.enable = true; @@ -41,6 +56,15 @@ ]; }; + ssh = { + enable = true; + listenAddresses = [ + { + addr = config.module.defaults.network.ip; + port = 34561; + } + ]; + }; }; }; } From 24a1808d334d63a4c1ee220419d079b61c330b24 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:43:23 +0300 Subject: [PATCH 096/103] system/nixos/modules: Greetd change way to choosing wm cmd --- .../nixos/modules/services/greetd/default.nix | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/system/nixos/modules/services/greetd/default.nix b/system/nixos/modules/services/greetd/default.nix index f780e09..9d39341 100644 --- a/system/nixos/modules/services/greetd/default.nix +++ b/system/nixos/modules/services/greetd/default.nix @@ -1,10 +1,11 @@ -{ pkgs -, lib -, config -, username -, inputs -, wm -, ... +{ + pkgs, + lib, + config, + username, + inputs, + wm, + ... }: with lib; @@ -12,12 +13,14 @@ with lib; let cfg = config.module.services.greetd; - cmd = if wm == "hyprland" - then "${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/Hyprland" - else if wm == "sway" - then "${pkgs.sway}/bin/sway" - else ""; -in { + wms = { + hyprland = "${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/Hyprland"; + sway = "${pkgs.sway}/bin/sway"; + }; + + wmCmd = wms.${wm}; +in +{ options = { module.services.greetd = { enable = mkEnableOption "Enable greetd"; @@ -31,7 +34,11 @@ in { programs.regreet = { enable = true; - cageArgs = [ "-s" "-m" "last" ]; + cageArgs = [ + "-s" + "-m" + "last" + ]; }; services.greetd = { @@ -47,11 +54,10 @@ in { "--asterisks" "--remember" "--time" - "--cmd ${cmd}" + "--cmd ${wmCmd}" ]; }; }; }; }; } - From 0819d260eee88c00b42533a3ebb3751c23510bc3 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:43:43 +0300 Subject: [PATCH 097/103] system/nixos/modules: Tlp change policy on bat to balanced --- system/nixos/modules/services/tlp/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/system/nixos/modules/services/tlp/default.nix b/system/nixos/modules/services/tlp/default.nix index aab6d46..585c6c8 100644 --- a/system/nixos/modules/services/tlp/default.nix +++ b/system/nixos/modules/services/tlp/default.nix @@ -1,13 +1,15 @@ -{ lib -, config -, ... +{ + lib, + config, + ... }: with lib; let cfg = config.module.services.tlp; -in { +in +{ options = { module.services.tlp.enable = mkEnableOption "Enable tlp"; }; @@ -15,13 +17,13 @@ in { config = mkIf cfg.enable { services.tlp = { enable = true; - + settings = { PLATFORM_PROFILE_ON_AC = "performance"; PLATFORM_PROFILE_ON_BAT = "balanced"; CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; - CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_performance"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "balanced"; CPU_BOOST_ON_AC = 1; CPU_BOOST_ON_BAT = 0; @@ -37,4 +39,3 @@ in { }; }; } - From 6c447cf992693c48d201b237fa0071641d995f11 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:50:30 +0300 Subject: [PATCH 098/103] common: Add func allDir --- home/default.nix | 2 ++ home/modules/default.nix | 13 +++++-------- home/users/maxmur/modules/default.nix | 17 ++++++++--------- lib/default.nix | 8 ++++++++ modules/default.nix | 12 +++++------- system/machine/hlbox/modules/default.nix | 17 ++++++++--------- .../machine/hlbox/modules/hardware/default.nix | 17 ++++++++--------- system/machine/nbox/modules/default.nix | 17 ++++++++--------- .../machine/nbox/modules/hardware/default.nix | 17 ++++++++--------- system/machine/pcbox/modules/default.nix | 17 ++++++++--------- .../machine/pcbox/modules/hardware/default.nix | 17 ++++++++--------- system/machine/rasp/modules/default.nix | 17 ++++++++--------- .../machine/rasp/modules/hardware/default.nix | 2 ++ system/nixos/modules/default.nix | 16 +++++++--------- system/nixos/modules/programs/default.nix | 16 +++++++--------- system/nixos/modules/services/default.nix | 15 +++++++-------- 16 files changed, 107 insertions(+), 113 deletions(-) diff --git a/home/default.nix b/home/default.nix index 8bc5641..4882f06 100644 --- a/home/default.nix +++ b/home/default.nix @@ -12,6 +12,7 @@ swayEnable ? false, hyprlandEnable ? false, wmEnable ? false, + allDirs, ... }: @@ -47,6 +48,7 @@ in inherit inputs self + allDirs hostname username platform diff --git a/home/modules/default.nix b/home/modules/default.nix index 3f6ac6c..6c86b96 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -1,12 +1,9 @@ -{ self -, lib -, ... +{ + self, + allDirs, + ... }: { - # Read all directories - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${self}/home/modules/${module}") (builtins.attrNames (builtins.readDir "${self}/home/modules")) - ); + imports = allDirs "${self}/home/modules"; } - diff --git a/home/users/maxmur/modules/default.nix b/home/users/maxmur/modules/default.nix index ffa0d9e..ef34673 100644 --- a/home/users/maxmur/modules/default.nix +++ b/home/users/maxmur/modules/default.nix @@ -1,14 +1,13 @@ -{ self -, lib -, username -, ... +{ + self, + username, + allDirs, + ... }: let userModules = "${self}/home/users/${username}/modules"; -in { - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${userModules}/${module}") (builtins.attrNames (builtins.readDir userModules)) - ); +in +{ + imports = allDirs userModules; } - diff --git a/lib/default.nix b/lib/default.nix index 2ddfaf7..2ee91a1 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -6,6 +6,12 @@ let defaultStateVersion = "24.11"; + allDirs = + dirName: + builtins.filter ( + module: ((builtins.pathExists module) && ((builtins.readFileType module) == "directory")) + ) (map (module: "${dirName}/${module}") (builtins.attrNames (builtins.readDir dirName))); + # Helper function for generating host configs mkHost = machineDir: { username ? "user" @@ -25,6 +31,7 @@ let inherit inputs self + allDirs hostname username stateVersion @@ -75,6 +82,7 @@ let inherit inputs self + allDirs hostname username platform diff --git a/modules/default.nix b/modules/default.nix index d354952..8cfa1f9 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,11 +1,9 @@ -{ self -, lib -, ... +{ + self, + allDirs, + ... }: { - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${self}/modules/${module}") (builtins.attrNames (builtins.readDir "${self}/modules")) - ); + imports = allDirs "${self}/modules"; } - diff --git a/system/machine/hlbox/modules/default.nix b/system/machine/hlbox/modules/default.nix index 2d42d74..ed0fd43 100644 --- a/system/machine/hlbox/modules/default.nix +++ b/system/machine/hlbox/modules/default.nix @@ -1,14 +1,13 @@ -{ self -, machineDir -, lib -, ... +{ + self, + machineDir, + allDirs, + ... }: let modules = "${self}/system/machine/${machineDir}/modules"; -in { - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${modules}/${module}") (builtins.attrNames (builtins.readDir modules)) - ); +in +{ + imports = allDirs modules; } - diff --git a/system/machine/hlbox/modules/hardware/default.nix b/system/machine/hlbox/modules/hardware/default.nix index 9d4d1eb..7b45ccc 100644 --- a/system/machine/hlbox/modules/hardware/default.nix +++ b/system/machine/hlbox/modules/hardware/default.nix @@ -1,14 +1,13 @@ -{ self -, lib -, machineDir -, ... +{ + self, + machineDir, + allDirs, + ... }: let hardwareModulesPath = "${self}/system/machine/${machineDir}/modules/hardware"; -in { - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${hardwareModulesPath}/${module}") (builtins.attrNames (builtins.readDir hardwareModulesPath)) - ); +in +{ + imports = allDirs hardwareModulesPath; } - diff --git a/system/machine/nbox/modules/default.nix b/system/machine/nbox/modules/default.nix index 1d3d6bd..ed0fd43 100644 --- a/system/machine/nbox/modules/default.nix +++ b/system/machine/nbox/modules/default.nix @@ -1,14 +1,13 @@ -{ self -, lib -, machineDir -, ... +{ + self, + machineDir, + allDirs, + ... }: let modules = "${self}/system/machine/${machineDir}/modules"; -in { - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${modules}/${module}") (builtins.attrNames (builtins.readDir modules)) - ); +in +{ + imports = allDirs modules; } - diff --git a/system/machine/nbox/modules/hardware/default.nix b/system/machine/nbox/modules/hardware/default.nix index 9d4d1eb..7b45ccc 100644 --- a/system/machine/nbox/modules/hardware/default.nix +++ b/system/machine/nbox/modules/hardware/default.nix @@ -1,14 +1,13 @@ -{ self -, lib -, machineDir -, ... +{ + self, + machineDir, + allDirs, + ... }: let hardwareModulesPath = "${self}/system/machine/${machineDir}/modules/hardware"; -in { - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${hardwareModulesPath}/${module}") (builtins.attrNames (builtins.readDir hardwareModulesPath)) - ); +in +{ + imports = allDirs hardwareModulesPath; } - diff --git a/system/machine/pcbox/modules/default.nix b/system/machine/pcbox/modules/default.nix index 2d42d74..ed0fd43 100644 --- a/system/machine/pcbox/modules/default.nix +++ b/system/machine/pcbox/modules/default.nix @@ -1,14 +1,13 @@ -{ self -, machineDir -, lib -, ... +{ + self, + machineDir, + allDirs, + ... }: let modules = "${self}/system/machine/${machineDir}/modules"; -in { - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${modules}/${module}") (builtins.attrNames (builtins.readDir modules)) - ); +in +{ + imports = allDirs modules; } - diff --git a/system/machine/pcbox/modules/hardware/default.nix b/system/machine/pcbox/modules/hardware/default.nix index 4ab07fa..7b45ccc 100644 --- a/system/machine/pcbox/modules/hardware/default.nix +++ b/system/machine/pcbox/modules/hardware/default.nix @@ -1,14 +1,13 @@ -{ self -, machineDir -, lib -, ... +{ + self, + machineDir, + allDirs, + ... }: let hardwareModulesPath = "${self}/system/machine/${machineDir}/modules/hardware"; -in { - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${hardwareModulesPath}/${module}") (builtins.attrNames (builtins.readDir hardwareModulesPath)) - ); +in +{ + imports = allDirs hardwareModulesPath; } - diff --git a/system/machine/rasp/modules/default.nix b/system/machine/rasp/modules/default.nix index 1d3d6bd..ed0fd43 100644 --- a/system/machine/rasp/modules/default.nix +++ b/system/machine/rasp/modules/default.nix @@ -1,14 +1,13 @@ -{ self -, lib -, machineDir -, ... +{ + self, + machineDir, + allDirs, + ... }: let modules = "${self}/system/machine/${machineDir}/modules"; -in { - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${modules}/${module}") (builtins.attrNames (builtins.readDir modules)) - ); +in +{ + imports = allDirs modules; } - diff --git a/system/machine/rasp/modules/hardware/default.nix b/system/machine/rasp/modules/hardware/default.nix index e70678b..8f0609c 100644 --- a/system/machine/rasp/modules/hardware/default.nix +++ b/system/machine/rasp/modules/hardware/default.nix @@ -2,6 +2,7 @@ self, machineDir, pkgs, + allDirs, ... }: @@ -9,6 +10,7 @@ let machineHardwareModulesPath = "${self}/system/machine/${machineDir}/modules/hardware"; in { + imports = allDirs machineHardwareModulesPath; boot = { kernelPackages = pkgs.linuxKernel.packages.linux_rpi4; diff --git a/system/nixos/modules/default.nix b/system/nixos/modules/default.nix index 0e85eed..1889cfc 100644 --- a/system/nixos/modules/default.nix +++ b/system/nixos/modules/default.nix @@ -1,14 +1,12 @@ -{ self -, lib -, ... +{ + self, + allDirs, + ... }: let modules = "${self}/system/nixos/modules"; -in { - # Read all directories from modules - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${modules}/${module}") (builtins.attrNames (builtins.readDir modules)) - ); +in +{ + imports = allDirs modules; } - diff --git a/system/nixos/modules/programs/default.nix b/system/nixos/modules/programs/default.nix index 7918f9c..405fcda 100644 --- a/system/nixos/modules/programs/default.nix +++ b/system/nixos/modules/programs/default.nix @@ -1,14 +1,12 @@ -{ self -, lib -, ... +{ + self, + allDirs, + ... }: let hostProgramModulesPath = "${self}/system/nixos/modules/programs"; -in { - # Import all program modules - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${hostProgramModulesPath}/${module}") (builtins.attrNames (builtins.readDir hostProgramModulesPath)) - ); +in +{ + imports = allDirs hostProgramModulesPath; } - diff --git a/system/nixos/modules/services/default.nix b/system/nixos/modules/services/default.nix index c01cc14..66cc166 100644 --- a/system/nixos/modules/services/default.nix +++ b/system/nixos/modules/services/default.nix @@ -1,13 +1,12 @@ -{ self -, lib -, ... +{ + self, + allDirs, + ... }: let hostServicesModulesPath = "${self}/system/nixos/modules/services"; -in { - imports = builtins.filter (module: lib.pathIsDirectory module) ( - map (module: "${hostServicesModulesPath}/${module}") (builtins.attrNames (builtins.readDir hostServicesModulesPath)) - ); +in +{ + imports = allDirs hostServicesModulesPath; } - From a239a6ee9bd4ccb7be4697978d91e3700c78cbae Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:50:59 +0300 Subject: [PATCH 099/103] system: Constructor fmt --- system/default.nix | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/system/default.nix b/system/default.nix index 891b5c3..a598c08 100644 --- a/system/default.nix +++ b/system/default.nix @@ -1,24 +1,29 @@ -{ self -, lib -, inputs -, machineDir -, platform ? null -, stateVersion ? null -, ... +{ + self, + lib, + inputs, + machineDir, + hostType, + platform ? null, + stateVersion ? null, + ... }: let - machineConfigurationPath = "${self}/system/machine/${machineDir}"; + machineConfigurationPath = "${self}/system/machine/${machineDir}"; machineConfigurationPathExist = builtins.pathExists machineConfigurationPath; - machineModulesPath = "${self}/system/machine/${machineDir}/modules"; - machineModulesPathExist = builtins.pathExists machineModulesPath; -in { - imports = [ - "${self}/modules" - "${self}/overlays/nixpkgs" - ] - ++ lib.optional machineConfigurationPathExist machineConfigurationPath - ++ lib.optional machineModulesPathExist machineModulesPath; + machineModulesPath = "${self}/system/machine/${machineDir}/modules"; + machineModulesPathExist = builtins.pathExists machineModulesPath; +in +{ + imports = + [ + "${self}/modules" + "${self}/overlays/nixpkgs" + "${self}/system/${hostType}/modules" + ] + ++ lib.optional machineConfigurationPathExist machineConfigurationPath + ++ lib.optional machineModulesPathExist machineModulesPath; module.nix-config.enable = true; system = { inherit stateVersion; }; @@ -32,4 +37,3 @@ in { ]; }; } - From 1e3b0bb31aa85f75f543a025407028cfc4869436 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:51:03 +0300 Subject: [PATCH 100/103] lib: Fmt --- lib/default.nix | 129 +++++++++++++++++++++++++++--------------------- 1 file changed, 73 insertions(+), 56 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index 2ee91a1..0fd9875 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,11 +1,17 @@ -{ self -, inputs -, ... +{ + self, + inputs, + ... }: let defaultStateVersion = "24.11"; + constructors = [ + "${self}/home" + "${self}/system" + ]; + allDirs = dirName: builtins.filter ( @@ -13,22 +19,26 @@ let ) (map (module: "${dirName}/${module}") (builtins.attrNames (builtins.readDir dirName))); # Helper function for generating host configs - mkHost = machineDir: - { username ? "user" - , stateVersion ? defaultStateVersion - , hmStateVersion ? stateVersion - , platform ? "x86_64-linux" - , hostname ? machineDir - , isWorkstation ? false - , wm ? null + mkHost = + machineDir: + { + username ? "user", + stateVersion ? defaultStateVersion, + hmStateVersion ? stateVersion, + platform ? "x86_64-linux", + hostname ? machineDir, + isWorkstation ? false, + wm ? null, + hostType ? "nixos", }: let - swayEnable = wm == "sway"; + swayEnable = wm == "sway"; hyprlandEnable = wm == "hyprland"; - wmEnable = hyprlandEnable || swayEnable; - in inputs.nixpkgs.lib.nixosSystem { + wmEnable = hyprlandEnable || swayEnable; + in + inputs.nixpkgs.lib.nixosSystem { specialArgs = { - inherit + inherit inputs self allDirs @@ -42,44 +52,50 @@ let wm hyprlandEnable swayEnable - wmEnable; + wmEnable + hostType + ; }; - modules = [ - inputs.home-manager.nixosModules.home-manager - inputs.stylix.nixosModules.stylix - inputs.impermanence.nixosModules.impermanence - inputs.disko.nixosModules.disko - inputs.lanzaboote.nixosModules.lanzaboote - inputs.chaotic.nixosModules.default - inputs.nix-topology.nixosModules.default - inputs.nur.modules.nixos.default - inputs.proxmox-nixos.nixosModules.proxmox-ve - inputs.sops-nix.nixosModules.sops - - "${self}/system/nixos/modules" - "${self}/system" - "${self}/home" - ]; + modules = + with inputs; + [ + home-manager.nixosModules.home-manager + stylix.nixosModules.stylix + impermanence.nixosModules.impermanence + disko.nixosModules.disko + lanzaboote.nixosModules.lanzaboote + chaotic.nixosModules.default + nix-topology.nixosModules.default + nur.modules.nixos.default + proxmox-nixos.nixosModules.proxmox-ve + sops-nix.nixosModules.sops + nur.modules.nixos.default + ] + ++ constructors; }; # Helper function for generating darwin host configs - mkHostDarwin = machineDir: - { username ? "user" - , stateVersion ? 6 - , hmStateVersion ? defaultStateVersion - , hostname ? machineDir - , platform ? "aarch64-darwin" - , isWorkstation ? false - , wm ? null + mkHostDarwin = + machineDir: + { + username ? "user", + stateVersion ? 6, + hmStateVersion ? defaultStateVersion, + hostname ? machineDir, + platform ? "aarch64-darwin", + isWorkstation ? false, + wm ? null, + hostType ? "darwin", }: let - swayEnable = wm == "sway"; + swayEnable = wm == "sway"; hyprlandEnable = wm == "hyprland"; - wmEnable = hyprlandEnable || swayEnable; - in inputs.darwin.lib.darwinSystem { + wmEnable = hyprlandEnable || swayEnable; + in + inputs.darwin.lib.darwinSystem { specialArgs = { - inherit + inherit inputs self allDirs @@ -93,25 +109,26 @@ let wm hyprlandEnable swayEnable - wmEnable; + wmEnable + hostType + ; }; - modules = [ - inputs.home-manager.darwinModules.home-manager - inputs.stylix.darwinModules.stylix - - "${self}/system/darwin/modules" - "${self}/system" - "${self}/home" - ]; + modules = + with inputs; + [ + home-manager.darwinModules.home-manager + stylix.darwinModules.stylix + ] + ++ constructors; }; -in { +in +{ forAllSystems = inputs.nixpkgs.lib.systems.flakeExposed; # This function just add mkHost or mkHostDarwin before hosts attrset # ex: pcbox = { username = "test"; stateVersion = "24.11"; }; -> # pcbox = mkHost { username = "test"; stateVersion = "24.11"; }; - genNixos = builtins.mapAttrs mkHost; + genNixos = builtins.mapAttrs mkHost; genDarwin = builtins.mapAttrs mkHostDarwin; } - From 821019a71ccec4a91ecc825c25034b0a59af6ff1 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:52:56 +0300 Subject: [PATCH 101/103] README: Format. Add description. Add p8box. Add thanks Add description for system/{nixos,darwin}. Add p8box host description --- README.md | 81 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 67dc19c..21d8931 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ - [Features](#-features) - [File structure](#-file-structure) - [Desktop preview](#%EF%B8%8F-desktop-preview) - - [Hyprland](#-hyprland) - - [Sway](#-sway) + - [Hyprland](#-hyprland) + - [Sway](#-sway) - [Software](#-software) - [Network topology](#-network-topology) - [Hosts description](#%EF%B8%8F-hosts-description) @@ -24,37 +24,37 @@ - [Special thanks](#%EF%B8%8F-special-thanks) - [Star history](#-star-history) -## ✨ Features +## ✨ Features -- ❄️ Flakes -- for precise dependency management of the entire system. -- 🏑 Home Manager -- to configure all used software for the user. -- πŸ’½ Disko -- for declarative disk management: luks + lvm + btrfs. -- ⚠️ Impermanence -- to remove junk files and directories that are not specified in the config. -- πŸ’ˆ Stylix -- to customize the theme for the entire system and the software you use. -- 🍎 NixDarwin -- to declaratively customize MacOS. -- πŸ” Lanzaboot -- to securely boot the system. +- ❄️ Flakes - for precise dependency management of the entire system. +- 🏑 Home Manager - to configure all used software for the user. +- πŸ’½ Disko - for declarative disk management: luks + lvm + btrfs. +- ⚠️ Impermanence - to remove junk files and directories that are not specified in the config. +- πŸ’ˆ Stylix - to customize the theme for the entire system and the software you use. +- 🍎 NixDarwin - to declaratively customize MacOS. +- πŸ” Lanzaboot - to securely boot the system. - πŸ“ Config file structure and modules with options. ## πŸ“ File structure - [❄️ flake.nix](flake.nix) configuration entry point - [🏑 home](home/default.nix) entry point for creating a home manager user - - [🧩 modules](home/modules/) home manager modules - - [♻️ overlays](home/overlays) home manager overlays - - [πŸ‘€ users](home/users) users configurations for home manager - - [🧩 modules](home/users/maxmur/modules/) home manager user modules + - [🧩 modules](home/modules/) home manager modules + - [♻️ overlays](home/overlays) home manager overlays + - [πŸ‘€ users](home/users) users configurations for home manager + - [🧩 modules](home/users/maxmur/modules/) home manager user modules - [πŸ“ƒ lib](lib/default.nix) helper functions for creating configurations - [🧩 modules](modules/default.nix) common modules for nixos/nixDarwin/home-manager - [♻️ overlays](overlays/) common overlays - [❄️parts](parts/) flake parts modules - [πŸ’€pkgs](pkgs/) self-sealed packages - [πŸ–₯️ system](system/default.nix) entry point for creating a machine - - [🏎️ machine](system/machine) machines configurations - - [πŸš€ hostname](system/machine/pcbox/) starting the configuration of a specific machine - - [🧩 modules](system/machine/pcbox/modules) machine modules - - [πŸ’Ύ hardware](system/machine/pcbox/modules/hardware) machine hardware modules - - [🧩 modules](system/modules) common modules for machines - - [♻️ overlays](system/overlays) common overlays for machines + - [🏎️ machine](system/machine) machines configurations + - [πŸš€ hostname](system/machine/pcbox/) starting the configuration of a specific machine + - [🧩 modules](system/machine/pcbox/modules) machine modules + - [πŸ’Ύ hardware](system/machine/pcbox/modules/hardware) machine hardware modules + - [🧩 nixos](system/nixos) nixos modules/overlays/etc + - [🧩 darwin](system/darwin) nixos modules/overlays/etc - [πŸ“„ templates](templates/default.nix) templates for creating configuration parts ## πŸ–ΌοΈ Desktop preview @@ -81,16 +81,16 @@ The images below may not represent the final system. Some parts may differ. ## πŸ“˜ Software - - OS - [**`NixOS`**](https://nixos.org/) - - WM - [**`Hyprland`**](https://hyprland.org/) or [**`Sway`**](https://github.com/swaywm/sway) - - Theme - [**`Nord`**](https://github.com/nordtheme/nord) - - Wallpapers - [**`Grey wave`**](assets/grey_gradient.png) - - Editor - [**`Neovim`**](https://neovim.io/) - - Bar - [**`Waybar`**](https://github.com/Alexays/Waybar) - - Terminal - [**`Foot`**](https://codeberg.org/dnkl/foot) - - Shell - [**`Fish`**](https://fishshell.com/) - - Promt - [**`Starship`**](https://starship.rs/) - - Filemanager - [**`Yazi`**](https://github.com/sxyazi/yazi) +- OS - [**`NixOS`**](https://nixos.org/) +- WM - [**`Hyprland`**](https://hyprland.org/) or [**`Sway`**](https://github.com/swaywm/sway) +- Theme - [**`Nord`**](https://github.com/nordtheme/nord) +- Wallpapers - [**`Grey wave`**](assets/grey_gradient.png) +- Editor - [**`Neovim`**](https://neovim.io/) +- Bar - [**`Waybar`**](https://github.com/Alexays/Waybar) +- Terminal - [**`Foot`**](https://codeberg.org/dnkl/foot) +- Shell - [**`Fish`**](https://fishshell.com/) +- Promt - [**`Starship`**](https://starship.rs/) +- Filemanager - [**`Yazi`**](https://github.com/sxyazi/yazi) ## πŸ‘€ Network topology @@ -102,23 +102,25 @@ These diagrams show the network topology of my home network. ## πŸ–₯️ Hosts description -| Hostname | Board | CPU | RAM | GPU | OS | State | -| --- | --- | --- | --- | --- | --- | --- | -| pcbox | X299 AORUS Ultra Gaming Pro-CF | i7-7800X | 64GB | Sapphire AMD Radeon RX 7600 XT PULSE | NixOS | OK | -| nbox | Asus ZenBook 2024 Oled | Ultra7 155h | 32GB | Integrated Intel Arc (?) | NixOS | OK | -| rasp | Raspberry Pi 4 | Broadcom BCM2711 | 4GB | Broadcom VideoCore VI | NixOS | OK | -| macbox | Mac Mini M1 | Apple Silicon M1 | 8GB | Apple M1 8-Core GPU | MacOS | ? | +| Hostname | Board | CPU | RAM | GPU | OS | State | +| -------- | ------------------------------ | ---------------- | ----- | ------------------------------------ | ----- | ----- | +| pcbox | ASRock B650 Pro RS | Ryzen 5 7500f | 32GB | Sapphire AMD Radeon RX 7600 XT PULSE | NixOS | OK | +| nbox | Asus ZenBook 2024 Oled | Ultra7 155h | 32GB | Integrated Intel Arc (?) | NixOS | OK | +| hlbox | X299 AORUS Ultra Gaming Pro-CF | i7-7800X | 128GB | GTX 1050ti | NixOS | OK | +| p8box | P8 Mini Laptop | Intel N100 | 12GB | Intel UHD Graphics | NixOS | OK | +| rasp | Raspberry Pi 4 | Broadcom BCM2711 | 4GB | Broadcom VideoCore VI | NixOS | OK | +| macbox | Mac Mini M1 | Apple Silicon M1 | 8GB | Apple M1 8-Core GPU | MacOS | OK | ## ⌨️ Keyboard -I use corne split with a modified [miryoku](https://github.com/manna-harbour/miryoku) layout. This is one of the most affordable and easy options for an ergonomic keyboard. +I use corne split with a modified [miryoku](https://github.com/manna-harbour/miryoku) layout. This is one of the most affordable and easy options for an ergonomic keyboard. - WS Heavy Tactile switches - Blank white PBT Cherry keycaps - KBDFANS switch pads - Tape mod - O-rings -- Jincomso wrist rest +- Jincomso wrist rest
Layer 0 Main @@ -174,6 +176,8 @@ I use corne split with a modified [miryoku](https://github.com/manna-harbour/mir [voronind-com](https://github.com/voronind-com) +[Corgiek](https://github.com/Corgiek) + ## ⭐ Star History @@ -183,4 +187,3 @@ I use corne split with a modified [miryoku](https://github.com/manna-harbour/mir Star History Chart - From 0334ea29786908d722376a2d9ba1d2bc572beba4 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 11:54:56 +0300 Subject: [PATCH 102/103] flake: Update lock --- flake.lock | 422 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 273 insertions(+), 149 deletions(-) diff --git a/flake.lock b/flake.lock index cf99205..512cfcd 100644 --- a/flake.lock +++ b/flake.lock @@ -89,11 +89,11 @@ "base16-helix": { "flake": false, "locked": { - "lastModified": 1725860795, - "narHash": "sha256-Z2o8VBPW3I+KKTSfe25kskz0EUj7MpUh8u355Z1nVsU=", + "lastModified": 1736852337, + "narHash": "sha256-esD42YdgLlEh7koBrSqcT7p2fsMctPAcGl/+2sYJa2o=", "owner": "tinted-theming", "repo": "base16-helix", - "rev": "7f795bf75d38e0eea9fed287264067ca187b88a9", + "rev": "03860521c40b0b9c04818f2218d9cc9efc21e7a5", "type": "github" }, "original": { @@ -105,11 +105,11 @@ "base16-vim": { "flake": false, "locked": { - "lastModified": 1731949548, - "narHash": "sha256-XIDexXM66sSh5j/x70e054BnUsviibUShW7XhbDGhYo=", + "lastModified": 1735953590, + "narHash": "sha256-YbQwaApLFJobn/0lbpMKcJ8N5axKlW2QIGkDS5+xoSU=", "owner": "tinted-theming", "repo": "base16-vim", - "rev": "61165b1632409bd55e530f3dbdd4477f011cadc6", + "rev": "c2a1232aa2c0ed27dcbf005779bcfe0e0ab5e85d", "type": "github" }, "original": { @@ -120,17 +120,18 @@ }, "chaotic": { "inputs": { + "fenix": "fenix", "flake-schemas": "flake-schemas", "home-manager": "home-manager", "jovian": "jovian", "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1733677156, - "narHash": "sha256-TSgU+M0Zm0PMnb6J/gOovC63wtqSbhgdmN7CucDO0oU=", + "lastModified": 1737216937, + "narHash": "sha256-lgIK7OsoH+KeovKlhw3aEKclK6Rb1eGHH9Mx9s0pgOg=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "354bcbbadbd00f5bda884bb2c119b7de63b197e9", + "rev": "e300abf0ef16528298be33f66a2f70b20b15d2fa", "type": "github" }, "original": { @@ -142,29 +143,17 @@ }, "crane": { "inputs": { - "flake-compat": [ - "lanzaboote", - "flake-compat" - ], - "flake-utils": [ - "lanzaboote", - "flake-utils" - ], "nixpkgs": [ "lanzaboote", "nixpkgs" - ], - "rust-overlay": [ - "lanzaboote", - "rust-overlay" ] }, "locked": { - "lastModified": 1681177078, - "narHash": "sha256-ZNIjBDou2GOabcpctiQykEQVkI8BDwk7TyvlWlI4myE=", + "lastModified": 1717535930, + "narHash": "sha256-1hZ/txnbd/RmiBPNUs7i8UQw2N89uAK3UzrGAWdnFfU=", "owner": "ipetkov", "repo": "crane", - "rev": "0c9f468ff00576577d83f5019a66c557ede5acf6", + "rev": "55e7754ec31dac78980c8be45f8a28e80e370946", "type": "github" }, "original": { @@ -219,11 +208,11 @@ ] }, "locked": { - "lastModified": 1733570843, - "narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=", + "lastModified": 1737162735, + "narHash": "sha256-5T+HkouTMGaRm0rh3kgD4Z1O7ONKfgjyoPQH5rSyreU=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "a35b08d09efda83625bef267eb24347b446c80b8", + "rev": "87131f51f8256952d1a306b5521cedc2dc61aa08", "type": "github" }, "original": { @@ -261,11 +250,11 @@ ] }, "locked": { - "lastModified": 1733168902, - "narHash": "sha256-8dupm9GfK+BowGdQd7EHK5V61nneLfr9xR6sc5vtDi0=", + "lastModified": 1737038063, + "narHash": "sha256-rMEuiK69MDhjz1JgbaeQ9mBDXMJ2/P8vmOYRbFndXsk=", "owner": "nix-community", "repo": "disko", - "rev": "785c1e02c7e465375df971949b8dcbde9ec362e5", + "rev": "bf0abfde48f469c256f2b0f481c6281ff04a5db2", "type": "github" }, "original": { @@ -297,6 +286,44 @@ "type": "github" } }, + "fenix": { + "inputs": { + "nixpkgs": [ + "chaotic", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1737009074, + "narHash": "sha256-BF+OxooVz4KeSIJyLXCnX2VTMsyfGrpEsay76hGRyrI=", + "owner": "nix-community", + "repo": "fenix", + "rev": "fe17a42e2c306d1a8a4fb3f977b12048d8cf7471", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1736899990, + "narHash": "sha256-S79Hqn2EtSxU4kp99t8tRschSifWD4p/51++0xNWUxw=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "91ca1f82d717b02ceb03a3f423cbe8082ebbb26d", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -316,11 +343,11 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -346,6 +373,7 @@ } }, "flake-compat_4": { + "flake": false, "locked": { "lastModified": 1696426674, "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", @@ -361,7 +389,6 @@ } }, "flake-compat_5": { - "flake": false, "locked": { "lastModified": 1696426674, "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", @@ -376,6 +403,22 @@ "type": "github" } }, + "flake-compat_6": { + "flake": false, + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -383,11 +426,11 @@ ] }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "lastModified": 1736143030, + "narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de", "type": "github" }, "original": { @@ -404,11 +447,11 @@ ] }, "locked": { - "lastModified": 1680392223, - "narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=", + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "type": "github" }, "original": { @@ -493,11 +536,11 @@ "systems": "systems_4" }, "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -596,6 +639,7 @@ }, "ghostty": { "inputs": { + "flake-compat": "flake-compat_2", "nixpkgs-stable": [ "nixpkgs" ], @@ -605,17 +649,43 @@ "zig": "zig" }, "locked": { - "lastModified": 1733436494, - "narHash": "sha256-/h5pK2ysUhBNyqsD6w0ii3W4zhuAOQNIpd99Vac5nBY=", - "ref": "refs/heads/main", - "rev": "2fb92dd4aa75214c3bc58220fa7638b698dcace3", - "revCount": 8178, - "type": "git", - "url": "ssh://git@github.com/ghostty-org/ghostty" + "lastModified": 1737085478, + "narHash": "sha256-EzdUQf1ljtGIWMmscVzoW3rUxxN3UKyNXOXbzUvz3BQ=", + "owner": "ghostty-org", + "repo": "ghostty", + "rev": "72d085525b22d66468c5969a4d507a0fa68d4a04", + "type": "github" }, "original": { - "type": "git", - "url": "ssh://git@github.com/ghostty-org/ghostty" + "owner": "ghostty-org", + "repo": "ghostty", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "stylix", + "flake-compat" + ], + "gitignore": "gitignore_3", + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1735882644, + "narHash": "sha256-3FZAG+pGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "a5a961387e75ae44cc20f0a57ae463da5e959656", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" } }, "gitignore": { @@ -627,11 +697,11 @@ ] }, "locked": { - "lastModified": 1660459072, - "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "type": "github" }, "original": { @@ -662,6 +732,28 @@ "type": "github" } }, + "gitignore_3": { + "inputs": { + "nixpkgs": [ + "stylix", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "gnome-shell": { "flake": false, "locked": { @@ -687,11 +779,11 @@ ] }, "locked": { - "lastModified": 1733484277, - "narHash": "sha256-i5ay20XsvpW91N4URET/nOc0VQWOAd4c4vbqYtcH8Rc=", + "lastModified": 1736883540, + "narHash": "sha256-dgPgoPUSg8cGAMqbhQRkww665sZtgzpWXxWjlyqhv94=", "owner": "nix-community", "repo": "home-manager", - "rev": "d00c6f6d0ad16d598bf7e2956f52c1d9d5de3c3a", + "rev": "0dfec9deb275854a56c97c356c40ef72e3a2e632", "type": "github" }, "original": { @@ -707,11 +799,11 @@ ] }, "locked": { - "lastModified": 1733484277, - "narHash": "sha256-i5ay20XsvpW91N4URET/nOc0VQWOAd4c4vbqYtcH8Rc=", + "lastModified": 1737299337, + "narHash": "sha256-0NBrY2A7buujKmeCbieopOMSbLxTu8TFcTLqAbTnQDw=", "owner": "nix-community", "repo": "home-manager", - "rev": "d00c6f6d0ad16d598bf7e2956f52c1d9d5de3c3a", + "rev": "f8ef4541bb8a54a8b52f19b52912119e689529b3", "type": "github" }, "original": { @@ -728,11 +820,11 @@ ] }, "locked": { - "lastModified": 1733085484, - "narHash": "sha256-dVmNuUajnU18oHzBQWZm1BQtANCHaqNuxTHZQ+GN0r8=", + "lastModified": 1736785676, + "narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=", "owner": "nix-community", "repo": "home-manager", - "rev": "c1fee8d4a60b89cae12b288ba9dbc608ff298163", + "rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d", "type": "github" }, "original": { @@ -949,11 +1041,11 @@ }, "impermanence": { "locked": { - "lastModified": 1731242966, - "narHash": "sha256-B3C3JLbGw0FtLSWCjBxU961gLNv+BOOBC6WvstKLYMw=", + "lastModified": 1736688610, + "narHash": "sha256-1Zl9xahw399UiZSJ9Vxs1W4WRFjO1SsNdVZQD4nghz0=", "owner": "nix-community", "repo": "impermanence", - "rev": "3ed3f0eaae9fcc0a8331e77e9319c8a4abd8a71a", + "rev": "c64bed13b562fc3bb454b48773d4155023ac31b7", "type": "github" }, "original": { @@ -971,11 +1063,11 @@ ] }, "locked": { - "lastModified": 1733491721, - "narHash": "sha256-n4fTKTYXeGRngeanNDxSxbuWSRCQ6l74IwOBlqp8dcw=", + "lastModified": 1737007397, + "narHash": "sha256-uJ7Lk0moWSn8Tr0QkUbOCWR7WrhiLeha4E00rckhl8I=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "0f415721ee427270bc078ef3a5ba2a308d47461f", + "rev": "6bbb19666e753c18ef8af35f590cbc3ba42dd0ca", "type": "github" }, "original": { @@ -987,7 +1079,7 @@ "lanzaboote": { "inputs": { "crane": "crane", - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "flake-parts": "flake-parts_2", "flake-utils": "flake-utils_3", "nixpkgs": [ @@ -997,27 +1089,27 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1682802423, - "narHash": "sha256-Fb5TeRTdvUlo/5Yi2d+FC8a6KoRLk2h1VE0/peMhWPs=", + "lastModified": 1718178907, + "narHash": "sha256-eSZyrQ9uoPB9iPQ8Y5H7gAmAgAvCw3InStmU3oEjqsE=", "owner": "nix-community", "repo": "lanzaboote", - "rev": "64b903ca87d18cef2752c19c098af275c6e51d63", + "rev": "b627ccd97d0159214cee5c7db1412b75e4be6086", "type": "github" }, "original": { "owner": "nix-community", - "ref": "v0.3.0", + "ref": "v0.4.1", "repo": "lanzaboote", "type": "github" } }, "master": { "locked": { - "lastModified": 1733680200, - "narHash": "sha256-KKhXdeaKDiQDVCI7WiSh98F8Sq1qJwNvqD0C0ovjO8Q=", + "lastModified": 1737370608, + "narHash": "sha256-hFA6SmioeqvGW/XvZa9bxniAeulksCOcj3kokdNT/YE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b1d2b1d82b7b09044a1d9bc26a2a54c94c7009bf", + "rev": "300081d0cc72df578b02d914df941b8ec62240e6", "type": "github" }, "original": { @@ -1079,11 +1171,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1732192922, - "narHash": "sha256-xQO/3I99TFdiXTN5VoS28NpbNlCQWQUvxmPQHlfkzmU=", + "lastModified": 1737125456, + "narHash": "sha256-MHjmUcYO8VT0aDf1AdIsPdcRE7vxdo+TB1gAGpDPP1k=", "owner": "oddlama", "repo": "nix-topology", - "rev": "2b107e98bbde932a363874e0ef5b1739a932bbc5", + "rev": "ddee77422129896886ed1a0b32f0e08b882ea99f", "type": "github" }, "original": { @@ -1109,32 +1201,32 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1678872516, - "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-22.11", + "ref": "nixos-23.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1723556749, - "narHash": "sha256-+CHVZnTnIYRLYsARInHYoWkujzcRkLY/gXm3s5bE52o=", + "lastModified": 1732981179, + "narHash": "sha256-F7thesZPvAMSwjRu0K8uFshTk3ZZSNAsXTIFvXBT+34=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4a92571f9207810b559c9eac203d1f4d79830073", + "rev": "62c435d93bf046a5396f3016472e8f7c8e2aed65", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "type": "indirect" } }, @@ -1155,11 +1247,11 @@ }, "nixpkgs_10": { "locked": { - "lastModified": 1733097829, - "narHash": "sha256-9hbb1rqGelllb4kVUCZ307G2k3/UhmA8PPGBoyuWaSw=", + "lastModified": 1735554305, + "narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2c15aa59df0017ca140d9ba302412298ab4bf22a", + "rev": "0e82ab234249d8eee3e8c91437802b32c74bb3fd", "type": "github" }, "original": { @@ -1201,11 +1293,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1733581040, - "narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", + "lastModified": 1737062831, + "narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", + "rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c", "type": "github" }, "original": { @@ -1265,11 +1357,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1733581040, - "narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", + "lastModified": 1737062831, + "narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", + "rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c", "type": "github" }, "original": { @@ -1313,16 +1405,16 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1732238832, - "narHash": "sha256-sQxuJm8rHY20xq6Ah+GwIUkF95tWjGRd1X8xF+Pkk38=", + "lastModified": 1736798957, + "narHash": "sha256-qwpCtZhSsSNQtK4xYGzMiyEDhkNzOCz/Vfu4oL2ETsQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d", + "rev": "9abb87b552b7f55ac8916b6fc9e5cb486656a2f3", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -1334,11 +1426,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1733676251, - "narHash": "sha256-uY0Oh9k8A04wmOzJc/HelOB1iKWT9rAYzdvnQ+G1Jq4=", + "lastModified": 1737370937, + "narHash": "sha256-kOJzS9zWmDrUccUBBleTCia35Jqs8XqwlhkKnKXweW0=", "owner": "nix-community", "repo": "NUR", - "rev": "5d422c13c02ccd1764902856837807aa40b90206", + "rev": "f8569084d180fe971e75e84263e16005c26d5f6c", "type": "github" }, "original": { @@ -1350,11 +1442,11 @@ "powerlevel10k": { "flake": false, "locked": { - "lastModified": 1731651047, - "narHash": "sha256-0ORdl9kLhfaDPhUZU3bxd3oVqB7hsrZPZ2wUPVu48gY=", + "lastModified": 1736162665, + "narHash": "sha256-6tWuayZgQd9pUrD3xKlUSmOFQCgZ96G3DB8ojgZ/a78=", "owner": "romkatv", "repo": "powerlevel10k", - "rev": "ef83e13c22cf8641f7ab2d50cd1338d01bb31cd2", + "rev": "3e2053a9341fe4cf5ab69909d3f39d53b1dfe772", "type": "github" }, "original": { @@ -1365,7 +1457,7 @@ }, "pre-commit-hooks": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "gitignore": "gitignore_2", "nixpkgs": [ "nix-topology", @@ -1396,10 +1488,6 @@ "lanzaboote", "flake-compat" ], - "flake-utils": [ - "lanzaboote", - "flake-utils" - ], "gitignore": "gitignore", "nixpkgs": [ "lanzaboote", @@ -1408,11 +1496,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1681413034, - "narHash": "sha256-/t7OjNQcNkeWeSq/CFLYVBfm+IEnkjoSm9iKvArnUUI=", + "lastModified": 1717664902, + "narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "d3de8f69ca88fb6f8b09e5b598be5ac98d28ede5", + "rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", "type": "github" }, "original": { @@ -1424,17 +1512,17 @@ "proxmox-nixos": { "inputs": { "crane": "crane_2", - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "nixpkgs-stable": "nixpkgs-stable_2", "nixpkgs-unstable": "nixpkgs-unstable", "utils": "utils" }, "locked": { - "lastModified": 1732473775, - "narHash": "sha256-WnckT473A+DcYYdzLFWgP4RSAvBNaSRw7fJuKySX+Og=", + "lastModified": 1735469959, + "narHash": "sha256-knX3c5OWE1C5QRDdvup+zqlWvwCLDHiME6+i18WwKsE=", "owner": "SaumonNet", "repo": "proxmox-nixos", - "rev": "06fbc351ff461d26a8276f44088450c965195e10", + "rev": "4ad21ba619d779b229e308b58066bafd65d5153d", "type": "github" }, "original": { @@ -1519,6 +1607,23 @@ "zsh-syntax-highlighting": "zsh-syntax-highlighting" } }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1736970696, + "narHash": "sha256-WP5yBCVkidEf5y3kCaUSjRd0udpAE6nmY3MMx3Q2aNo=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "7d337c7f350a163ac3a9bd4ce0c4dae2df20579b", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, "rust-overlay": { "inputs": { "flake-utils": [ @@ -1531,11 +1636,11 @@ ] }, "locked": { - "lastModified": 1682129965, - "narHash": "sha256-1KRPIorEL6pLpJR04FwAqqnt4Tzcm4MqD84yhlD+XSk=", + "lastModified": 1717813066, + "narHash": "sha256-wqbRwq3i7g5EHIui0bIi84mdqZ/It1AXBSLJ5tafD28=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "2c417c0460b788328220120c698630947547ee83", + "rev": "6dc3e45fe4aee36efeed24d64fc68b1f989d5465", "type": "github" }, "original": { @@ -1572,11 +1677,11 @@ "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1733128155, - "narHash": "sha256-m6/qwJAJYcidGMEdLqjKzRIjapK4nUfMq7rDCTmZajc=", + "lastModified": 1737107480, + "narHash": "sha256-GXUE9+FgxoZU8v0p6ilBJ8NH7k8nKmZjp/7dmMrCv3o=", "owner": "Mic92", "repo": "sops-nix", - "rev": "c6134b6fff6bda95a1ac872a2a9d5f32e3c37856", + "rev": "4c4fb93f18b9072c6fa1986221f9a3d7bf1fe4b6", "type": "github" }, "original": { @@ -1587,11 +1692,11 @@ }, "stable": { "locked": { - "lastModified": 1733384649, - "narHash": "sha256-K5DJ2LpPqht7K76bsxetI+YHhGGRyVteTPRQaIIKJpw=", + "lastModified": 1735563628, + "narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "190c31a89e5eec80dd6604d7f9e5af3802a58a13", + "rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798", "type": "github" }, "original": { @@ -1607,22 +1712,25 @@ "base16-fish": "base16-fish", "base16-helix": "base16-helix", "base16-vim": "base16-vim", - "flake-compat": "flake-compat_5", + "firefox-gnome-theme": "firefox-gnome-theme", + "flake-compat": "flake-compat_6", "flake-utils": "flake-utils_5", + "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", "nixpkgs": "nixpkgs_9", "systems": "systems_7", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", - "tinted-tmux": "tinted-tmux" + "tinted-tmux": "tinted-tmux", + "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1733510476, - "narHash": "sha256-RH/8yIuo+fNLCjQ6e1mnXwmmxymjvfWC9JcbDuIA8TM=", + "lastModified": 1737207873, + "narHash": "sha256-XTCuMv753lpm8DvdVf9q2mH3rhlfsKrCUYbaADPC/bA=", "owner": "danth", "repo": "stylix", - "rev": "e309d64fe7f203274a7913e1d2b74307d15ba122", + "rev": "51ad2cec11e773a949bdbec88bed2524f098f49a", "type": "github" }, "original": { @@ -1803,11 +1911,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1729501581, - "narHash": "sha256-1ohEFMC23elnl39kxWnjzH1l2DFWWx4DhFNNYDTYt54=", + "lastModified": 1735737224, + "narHash": "sha256-FO2hRBkZsjlIRqzNHCPc/52yxg11kHGA8MEtSun9RwE=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "f0e7f7974a6441033eb0a172a0342e96722b4f14", + "rev": "aead506a9930c717ebf81cc83a2126e9ca08fa64", "type": "github" }, "original": { @@ -1816,6 +1924,22 @@ "type": "github" } }, + "tinted-zed": { + "flake": false, + "locked": { + "lastModified": 1725758778, + "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=", + "owner": "tinted-theming", + "repo": "base16-zed", + "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-zed", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -1842,11 +1966,11 @@ "nixpkgs": "nixpkgs_10" }, "locked": { - "lastModified": 1733662930, - "narHash": "sha256-9qOp6jNdezzLMxwwXaXZWPXosHbNqno+f7Ii/xftqZ8=", + "lastModified": 1737103437, + "narHash": "sha256-uPNWcYbhY2fjY3HOfRCR5jsfzdzemhfxLSxwjXYXqNc=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "357cda84af1d74626afb7fb3bc12d6957167cda9", + "rev": "d1ed3b385f8130e392870cfb1dbfaff8a63a1899", "type": "github" }, "original": { @@ -1857,11 +1981,11 @@ }, "unstable": { "locked": { - "lastModified": 1733581040, - "narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", + "lastModified": 1737062831, + "narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", + "rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c", "type": "github" }, "original": { @@ -1950,11 +2074,11 @@ "ymExe": "ymExe" }, "locked": { - "lastModified": 1733580574, - "narHash": "sha256-2Cpkwj2TajdOcnrxtdf3uwrHuqlEbG92u1AYVfVkkR0=", + "lastModified": 1737074508, + "narHash": "sha256-ddZ1AiEvGkcOw8w9/z5NEMiuzAP67l04nxJLGPQBUuc=", "owner": "cucumber-sp", "repo": "yandex-music-linux", - "rev": "af0c4de2612df90fae77294b11dca5bbaa90a466", + "rev": "c73d62807032c49783f06a0341543a1c54989a0a", "type": "github" }, "original": { @@ -1966,13 +2090,13 @@ "ymExe": { "flake": false, "locked": { - "narHash": "sha256-pmW4gY0B4ZFaoA6IFTfmPG3Xlsvh0phwhECkd9eyCjE=", + "narHash": "sha256-ufrWW90Vj+aMfntRGIiK5eGpjSNYpJIYdtIZ26FDmGA=", "type": "file", - "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.31.2.exe" + "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.35.0.exe" }, "original": { "type": "file", - "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.31.2.exe" + "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.35.0.exe" } }, "zig": { From 5fe6f53162b516411e5858363b219932b8a149c0 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Tue, 21 Jan 2025 12:15:04 +0300 Subject: [PATCH 103/103] system/nixos/modules: Fix statix check in network module --- system/nixos/modules/network/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/system/nixos/modules/network/default.nix b/system/nixos/modules/network/default.nix index 9962aa5..5f09169 100644 --- a/system/nixos/modules/network/default.nix +++ b/system/nixos/modules/network/default.nix @@ -18,10 +18,14 @@ in }; config = mkIf cfg.enable { - systemd.services.NetworkManager-wait-online.enable = false; - systemd.services.systemd-networkd-wait-online.enable = mkForce false; + systemd = { + network.enable = true; - systemd.network.enable = true; + services = { + NetworkManager-wait-online.enable = false; + systemd-networkd-wait-online.enable = mkForce false; + }; + }; networking = { firewall = {