diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..7e2860f --- /dev/null +++ b/flake.nix @@ -0,0 +1,139 @@ +{ + description = "marleyOS"; + + outputs = inputs: + inputs.flake-parts.lib.mkFlake {inherit inputs;} { + imports = [inputs.easy-hosts.flakeModule]; + + systems = [ + "x86_64-nixos" + "aarch64-darwin" + ]; + + ### Nixpkgs Config ### + perSystem = {system, ...}: { + _module.args.pkgs = import inputs.nixpkgs { + inherit system; + + config = { + allowUnfree = true; + }; + + overlays = with inputs; [ + lix.overlays.default + nur.overlays.default + agenix.overlays.default + niri-flake.overlays.niri + ]; + }; + }; + + easyHosts = { + ### Module Imports ### + shared.modules = with inputs; [ + lix.nixosModules.default + agenix.nixosModules.default + + { + home-manager.sharedModules = [ + nixcord.homeModules.nixcord + ]; + } + ]; + + perClass = class: { + modules = with inputs; + (nixpkgs.lib.optionals (class == "nixos") [ + home-manager.nixosModules.home-manager + agenix.nixosModules.default + stylix.nixosModules.default + niri-flake.nixosModules.niri + ]) + ++ (nixpkgs.lib.optionals (class == "darwin") [ + home-manager.darwinModules.home-manager + agenix.darwinModules.default + ]); + }; + + hosts = { + ### Desktop ### + nyx = { + arch = "x86_64"; + class = "nixos"; + }; + + ### Macbook Air ### + mairley = { + arch = "aarch64"; + class = "darwin"; + }; + + ### Servers ### + + marleycentre = { + arch = "x86_64"; + class = "nixos"; + }; + + marleynet = { + arch = "x86_64"; + class = "nixos"; + }; + }; + }; + }; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; + unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + + nur = { + url = "github:nix-community/NUR"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + lix = { + url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-1.tar.gz"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + flake-parts = { + url = "github:hercules-ci/flake-parts"; + inputs.nixpkgs-lib.follows = "nixpkgs"; + }; + + easy-hosts.url = "github:tgirlcloud/easy-hosts"; + + darwin = { + url = "github:LnL7/nix-darwin/nix-darwin-24.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + home-manager = { + url = "github:nix-community/home-manager/release-24.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + agenix = { + url = "github:ryantm/agenix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + darwin.follows = "darwin"; + home-manager.follows = "home-manager"; + }; + }; + + stylix.url = "github:danth/stylix/release-24.11"; + + niri-flake.url = "github:sodiboo/niri-flake"; + + wezterm = { + url = "github:wez/wezterm?dir=nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + marleyvim.url = "git+https://codewith.babesonthe.net/punkfairie/marleyvim"; + + nixcord.url = "github:kaylorben/nixcord"; + }; +} diff --git a/snowflake/flake.nix b/snowflake/flake.nix deleted file mode 100644 index 802f1d9..0000000 --- a/snowflake/flake.nix +++ /dev/null @@ -1,102 +0,0 @@ -{ - description = "marleyOS"; - - outputs = inputs: - inputs.snowfall-lib.mkFlake { - inherit inputs; - src = ./.; - - snowfall = { - namespace = "marleyos"; - title = "marleyOS"; - }; - - channels-config = { - allowUnfree = true; - }; - - overlays = with inputs; [ - lix.overlays.default - nur.overlays.default - agenix.overlays.default - niri-flake.overlays.niri - ]; - - systems.modules.nixos = with inputs; [ - agenix.nixosModules.default - stylix.nixosModules.stylix - niri-flake.nixosModules.niri - ]; - - systems.modules.darwin = with inputs; [ - agenix.darwinModules.default - lix.nixosModules.default - ]; - - homes.modules = with inputs; [ - agenix.homeManagerModules.default - nixcord.homeModules.nixcord - ]; - - outputs-builder = channels: { - formatter = channels.nixpkgs.alejandra; - }; - }; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; - unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - - nur = { - url = "github:nix-community/NUR"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - lix = { - url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-1.tar.gz"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - snowfall-lib = { - url = "github:snowfallorg/lib"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - darwin = { - url = "github:LnL7/nix-darwin/nix-darwin-24.11"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - home-manager = { - url = "github:nix-community/home-manager/release-24.11"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - agenix = { - url = "github:ryantm/agenix"; - inputs = { - nixpkgs.follows = "nixpkgs"; - darwin.follows = "darwin"; - home-manager.follows = "home-manager"; - }; - }; - - nixgl = { - url = "github:nix-community/nixGL"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - stylix.url = "github:danth/stylix/release-24.11"; - - niri-flake.url = "github:sodiboo/niri-flake"; - - wezterm = { - url = "github:wez/wezterm?dir=nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - marleyvim.url = "git+https://codewith.babesonthe.net/punkfairie/marleyvim"; - - nixcord.url = "github:kaylorben/nixcord"; - }; -}