diff --git a/flake.lock b/flake.lock index c9412bd..cd0a3fa 100644 --- a/flake.lock +++ b/flake.lock @@ -210,6 +210,42 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -606,6 +642,26 @@ "type": "github" } }, + "nix-gaming": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_3", + "umu": "umu" + }, + "locked": { + "lastModified": 1729733994, + "narHash": "sha256-OFI0EG5ToqHJMPgMKmo6eAJcHqhNVgrgcAMQ8oIHEN8=", + "owner": "fufexan", + "repo": "nix-gaming", + "rev": "af2e2e01939aa85a6ca588b97297a0856618f341", + "type": "github" + }, + "original": { + "owner": "fufexan", + "repo": "nix-gaming", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1728729581, @@ -638,6 +694,30 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1727825735, + "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + } + }, + "nixpkgs-lib_2": { + "locked": { + "lastModified": 1727825735, + "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1720386169, @@ -687,6 +767,22 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1728538411, + "narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1728492678, "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=", @@ -702,7 +798,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1725194671, "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", @@ -718,7 +814,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1722415718, "narHash": "sha256-5US0/pgxbMksF92k1+eOa8arJTJiPvsdZj9Dl+vJkM4=", @@ -734,7 +830,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1727348695, "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", @@ -814,12 +910,14 @@ "auto-cpufreq": "auto-cpufreq", "ayugram-desktop": "ayugram-desktop", "firefox-addons": "firefox-addons", + "flake-parts": "flake-parts", "home-manager": "home-manager", "hyprfocus": "hyprfocus", "hyprland": "hyprland", "hyprland-plugins": "hyprland-plugins", + "nix-gaming": "nix-gaming", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable_2", "nur": "nur", "nypkgs": "nypkgs", @@ -883,7 +981,7 @@ "flake-utils": "flake-utils_3", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "systems": "systems_3", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", @@ -1012,6 +1110,31 @@ "type": "github" } }, + "umu": { + "inputs": { + "nixpkgs": [ + "nix-gaming", + "nixpkgs" + ] + }, + "locked": { + "dir": "packaging/nix", + "lastModified": 1728772489, + "narHash": "sha256-6sHjXNhPrRXIV1au5jlSXHeqn/QHb9wyRt7V0F5p4PA=", + "ref": "refs/heads/main", + "rev": "475e2b37e34a663b11f8c92b79dd45637a3e848c", + "revCount": 770, + "submodules": true, + "type": "git", + "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" + }, + "original": { + "dir": "packaging/nix", + "submodules": true, + "type": "git", + "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" + } + }, "walls": { "flake": false, "locked": { @@ -1073,7 +1196,7 @@ "yazi": { "inputs": { "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "rust-overlay": "rust-overlay" }, "locked": { @@ -1092,7 +1215,7 @@ }, "zen-browser": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1729457884, diff --git a/flake.nix b/flake.nix index 03b8dcf..09cb971 100644 --- a/flake.nix +++ b/flake.nix @@ -1,26 +1,28 @@ { - outputs = { nixpkgs, home-manager, ... }@inputs: + outputs = { flake-parts, nixpkgs, home-manager, ... }@inputs: let - nxsys = nixpkgs.lib.nixosSystem; - hmsys = home-manager.lib.homeManagerConfiguration; - in { - nixosConfigurations = { - wysvort = nxsys { - specialArgs = { inherit inputs; }; - modules = [ ./host ]; + nx = nixpkgs.lib.nixosSystem; + hm = home-manager.lib.homeManagerConfiguration; + in flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ "x86_64-linux" ]; + flake = { + # HOST CONFIGURATION + nixosConfigurations = { + wysvort = nx { + specialArgs = { inherit inputs; }; + modules = [ ./host ]; + }; + }; + + # HOME CONFIGURATION + homeConfigurations = { + megamozg = hm { + pkgs = nixpkgs.legacyPackages."x86_64-linux"; + extraSpecialArgs = { inherit inputs; }; + modules = [ ./home ]; + }; }; }; - - homeConfigurations = { - megamozg = hmsys { - pkgs = nixpkgs.legacyPackages."x86_64-linux"; - extraSpecialArgs = { inherit inputs; }; - modules = [ ./home ]; - }; - }; - - hostModules = import ./modules/host; - homeModules = import ./modules/home; }; inputs = { @@ -34,6 +36,8 @@ hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; zen-browser.url = "github:0xc000022070/zen-browser-flake"; + flake-parts.url = "github:hercules-ci/flake-parts"; + nix-gaming.url = "github:fufexan/nix-gaming"; stylix.url = "github:danth/stylix"; yazi.url = "github:sxyazi/yazi"; diff --git a/home/programs/cli/git/default.nix b/home/programs/cli/git/default.nix index c800a7e..382477c 100644 --- a/home/programs/cli/git/default.nix +++ b/home/programs/cli/git/default.nix @@ -6,7 +6,7 @@ extraConfig = { color.ui = true; init.defaultBranch = "main"; - safe.directory = "/home/megamozg/.flake"; + safe.directory = "*"; }; }; } diff --git a/home/window-managers/default.nix b/home/window-managers/default.nix index f54db3a..99c2000 100644 --- a/home/window-managers/default.nix +++ b/home/window-managers/default.nix @@ -1,20 +1,19 @@ -{ pkgs, inputs, ... }: -{ - imports = [ - ./hyprland - # ./swayfx - ./terminals - ./misc - ]; - home.packages = with pkgs; [ - hyprcursor - kitty - mako - nwg-drawer - grimblast - wf-recorder - light - wl-clipboard - hyprpicker - ]; +{ pkgs, inputs, ... }: { + imports = [ + ./hyprland + # ./swayfx + ./terminals + ./misc + ]; + home.packages = with pkgs; [ + hyprcursor + kitty + mako + nwg-drawer + grimblast + wf-recorder + light + wl-clipboard + hyprpicker + ]; } diff --git a/host/misc/user.nix b/host/misc/user.nix index d70ece6..4df039f 100644 --- a/host/misc/user.nix +++ b/host/misc/user.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, config, ... }: { + # module = { user.enable = true; }; users = { users = { # USERS megamozg = { diff --git a/host/system/sound.nix b/host/system/sound.nix index 212baca..9c5d93c 100644 --- a/host/system/sound.nix +++ b/host/system/sound.nix @@ -1,10 +1,12 @@ { ... }: { - security.rtkit.enable = true; - services.pipewire = { # SOUND NEW GEN - enable = true; - wireplumber.enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; + imports = [ ../../modules/host/hardware/sound ]; + module = { hardware = { sound.enable = true; }; }; + # security.rtkit.enable = true; + # services.pipewire = { # SOUND NEW GEN + # enable = true; + # wireplumber.enable = true; + # alsa.enable = true; + # alsa.support32Bit = true; + # pulse.enable = true; + # }; } diff --git a/modules/host/default.nix b/modules/host/default.nix index def3b81..5bf802b 100644 --- a/modules/host/default.nix +++ b/modules/host/default.nix @@ -1,5 +1 @@ -{ lib, ... }: { - imports = lib.fileset.toList ( - # All default.nix files in ./. - lib.fileset.fileFilter (file: file.name == "default.nix") ./.); -} +{ imports = [ ./hardware ./misc ./programs ./services ]; } diff --git a/modules/host/hardware/default.nix b/modules/host/hardware/default.nix index def3b81..5361486 100644 --- a/modules/host/hardware/default.nix +++ b/modules/host/hardware/default.nix @@ -1,5 +1 @@ -{ lib, ... }: { - imports = lib.fileset.toList ( - # All default.nix files in ./. - lib.fileset.fileFilter (file: file.name == "default.nix") ./.); -} +{ imports = [ ./bluetooth ./boot ./cpu ./gpu ./network ./security ./sound ]; } diff --git a/modules/host/hardware/sound/default.nix b/modules/host/hardware/sound/default.nix index dff725e..137d31f 100644 --- a/modules/host/hardware/sound/default.nix +++ b/modules/host/hardware/sound/default.nix @@ -1,4 +1,4 @@ -{ lib, config, ... }: +{ lib, config, inputs, ... }: with lib; @@ -6,6 +6,7 @@ let cfg = config.module.hardware.sound; in { options = { module.hardware.sound = { enable = mkEnableOption ""; }; }; + imports = [ inputs.nix-gaming.nixosModules.pipewireLowLatency ]; config = mkIf cfg.enable { security.rtkit.enable = true; services.pipewire = { diff --git a/modules/host/misc/default.nix b/modules/host/misc/default.nix index def3b81..4d90981 100644 --- a/modules/host/misc/default.nix +++ b/modules/host/misc/default.nix @@ -1,5 +1,12 @@ -{ lib, ... }: { - imports = lib.fileset.toList ( - # All default.nix files in ./. - lib.fileset.fileFilter (file: file.name == "default.nix") ./.); +{ + imports = [ + ./locales + ./minimal + ./power + ./system76 + ./torrserver + ./users + ./variables + ./zapret + ]; } diff --git a/modules/host/programs/default.nix b/modules/host/programs/default.nix index def3b81..4ddf2ce 100644 --- a/modules/host/programs/default.nix +++ b/modules/host/programs/default.nix @@ -1,5 +1 @@ -{ lib, ... }: { - imports = lib.fileset.toList ( - # All default.nix files in ./. - lib.fileset.fileFilter (file: file.name == "default.nix") ./.); -} +{ imports = [ ./fish ./git ./hm ./hyprland ./light ./nh ./packages ./steam ]; } diff --git a/modules/host/services/default.nix b/modules/host/services/default.nix index 2f7d474..e71395d 100644 --- a/modules/host/services/default.nix +++ b/modules/host/services/default.nix @@ -1,6 +1,14 @@ -{ lib, ... }: { - imports = lib.fileset.toList ( - # All default.nix files in ./. - lib.fileset.fileFilter (file: file.name == "default.nix") ./.); +{ + imports = [ + ./autocpu + ./dbus + ./getty + ./gvfs + ./laptop + ./polkit + ./printing + ./tailscale + ./xserver + ./zram + ]; } -