diff --git a/flake.lock b/flake.lock index 1629ff0..396fa31 100644 --- a/flake.lock +++ b/flake.lock @@ -3,17 +3,18 @@ "hyprland": { "inputs": { "hyprland-protocols": "hyprland-protocols", + "hyprlang": "hyprlang", "nixpkgs": "nixpkgs", "systems": "systems", "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1708215223, - "narHash": "sha256-5z+NPNoiWKoaz3M4LZJ2fP+N7Vl9XGwr4QAV8rh4l4o=", + "lastModified": 1708543581, + "narHash": "sha256-wvhsh4J+Q9ED8oAWG+iz5uNOw70nagF+aeetlGpLkqs=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "683a4b07c514fa3c13cdf09e475283a69fcc7653", + "rev": "ea3fd13e24d7d3a74cf803bef3e6133b5d708d1b", "type": "github" }, "original": { @@ -48,6 +49,27 @@ } }, "hyprlang": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1708005943, + "narHash": "sha256-9TT3xk++LI5/SPYgjYX34xZ4ebR93c1uerIq+SE/ues=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "aeb3e012adc7b3235335c540b214b82267c2b983", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlang_2": { "inputs": { "nixpkgs": [ "hyprland", @@ -86,6 +108,21 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1708475490, + "narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0e74ca98a74bc7270d28838369593635a5db3260", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "personalpkgs": { "locked": { "lastModified": 1701902328, "narHash": "sha256-3tiiSEgQRPps0aV40belvLk1k4Max7oRh/+hZGLtfGc=", @@ -104,7 +141,8 @@ "root": { "inputs": { "hyprland": "hyprland", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_2", + "personalpkgs": "personalpkgs" } }, "systems": { @@ -147,7 +185,7 @@ "hyprland", "hyprland-protocols" ], - "hyprlang": "hyprlang", + "hyprlang": "hyprlang_2", "nixpkgs": [ "hyprland", "nixpkgs" diff --git a/flake.nix b/flake.nix index 27ca7cf..584dd65 100644 --- a/flake.nix +++ b/flake.nix @@ -1,16 +1,36 @@ { inputs = { - nixpkgs.url = "github:langedev/nixpkgs/nixos-unstable"; + nixpkgs.url = "nixpkgs/nixos-unstable"; + personalpkgs.url = "github:langedev/nixpkgs/nixos-unstable"; hyprland.url = "github:hyprwm/Hyprland"; }; - outputs = { nixpkgs, hyprland, ... }: { + outputs = { self, nixpkgs, personalpkgs, hyprland, ... }: + # let + # personal-overlay = final: prev: { + # personal = personalpkgs.legacyPackages.${prev.system}; + # }; + # in { + { nixosConfigurations.onizuka = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ - ./configuration.nix + modules = [ + # ({ config, pkgs, ... }: { nixpkgs.overlays = [ personal-overlay ]; }) hyprland.nixosModules.default { programs.hyprland.enable = true; } + ./systems/shared + ./systems/onizuka + ]; + }; + + nixosConfigurations.jibril = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + # ({ config, pkgs, ... }: { nixpkgs.overlays = [ personal-overlay ]; }) + hyprland.nixosModules.default + { programs.hyprland.enable = true; } + ./systems/shared + ./systems/jibril ]; }; }; diff --git a/laptop.nix b/laptop.nix deleted file mode 100644 index 0019c68..0000000 --- a/laptop.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - networking.hostName = "jibril"; - imports = [ - ./hardware/laptop.nix - - ./modules/network/networking - ./modules/network/bluetooth - ]; -} diff --git a/systems/jibril/default.nix b/systems/jibril/default.nix new file mode 100644 index 0000000..bd3a34e --- /dev/null +++ b/systems/jibril/default.nix @@ -0,0 +1,11 @@ +{ config, pkgs, lib, ... }: + +{ + networking.hostName = "jibril"; + imports = [ + ./hardware.nix + + ../../modules/network/bluetooth + ../../modules/network/networking + ]; +} diff --git a/hardware/laptop.nix b/systems/jibril/hardware.nix similarity index 100% rename from hardware/laptop.nix rename to systems/jibril/hardware.nix diff --git a/desktop.nix b/systems/onizuka/default.nix similarity index 57% rename from desktop.nix rename to systems/onizuka/default.nix index 9a5dc5d..8bc25ef 100644 --- a/desktop.nix +++ b/systems/onizuka/default.nix @@ -3,8 +3,7 @@ { networking.hostName = "onizuka"; imports = [ - ./hardware/desktop.nix - - ./modules/graphics/nvidia + ./hardware.nix + ../../modules/graphics/nvidia ]; } diff --git a/hardware/desktop.nix b/systems/onizuka/hardware.nix similarity index 100% rename from hardware/desktop.nix rename to systems/onizuka/hardware.nix diff --git a/configuration.nix b/systems/shared/default.nix similarity index 62% rename from configuration.nix rename to systems/shared/default.nix index 25b762f..3a62bd3 100644 --- a/configuration.nix +++ b/systems/shared/default.nix @@ -3,32 +3,24 @@ # and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, ... }: - -let - #systemType = "laptop"; - systemType = "desktop"; -in { +{ nix.package = pkgs.nixUnstable; imports = [ - # Hardware Specific Configuration - ./${systemType}.nix - # System essentials (boot, lang, hostname, ...) - ./modules/system + ../../modules/system - ./modules/user + ../../modules/user - ./modules/themeing + ../../modules/themeing - ./modules/audio/pipewire + ../../modules/audio/pipewire - #./modules/shell/fish - ./modules/shell/xonsh - ./modules/network/browsers/librewolf - ./modules/network/syncthing + ../../modules/shell/xonsh + ../../modules/network/browsers/librewolf + ../../modules/network/syncthing - ./modules/login/greetd + ../../modules/login/greetd ]; nixpkgs.config.allowUnfree = true;