diff --git a/dummy/flake.nix b/dummy/flake.nix new file mode 100644 index 0000000..b047a08 --- /dev/null +++ b/dummy/flake.nix @@ -0,0 +1,69 @@ +{ + description = "Dummy Stormd Service"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + outputs = + { self, nixpkgs }: + let + systems = nixpkgs.lib.systems.flakeExposed; + forAllSystems = nixpkgs.lib.genAttrs systems; + in + { + packages = forAllSystems (system: { + stormd = nixpkgs.legacyPackages.${system}.writeScriptBin "stormd" '' + #!${nixpkgs.legacyPackages.${system}.bash}/bin/bash + echo "This is a dummy stormd implementation" + exit 0 + ''; + default = self.packages.${system}.stormd; + }); + + apps = forAllSystems (system: { + stormd = { + type = "app"; + program = "${self.packages.${system}.stormd}/bin/stormd"; + }; + default = self.apps.${system}.stormd; + }); + + overlays = forAllSystems (system: [ (final: prev: { stormd = self.packages.${system}.stormd; }) ]); + + devShells = forAllSystems (system: { + default = nixpkgs.legacyPackages.${system}.mkShell { + packages = [ self.packages.${system}.stormd ]; + }; + }); + + nixosModules = forAllSystems ( + system: + { config, lib, ... }: + { + options = { + services.stormd = { + enable = lib.mkEnableOption "Enable the Stormd service."; + extraOptions = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ ]; + description = "Extra options to pass to stormd daemon."; + }; + rootUser = lib.mkOption { + type = lib.types.str; + default = "root"; + description = "Root user name that will have stormd available."; + }; + nebulaPackage = lib.mkOption { + type = lib.types.package; + default = self.packages.${system}.stormd; + description = "The nebula package to use."; + }; + }; + }; + + config = lib.mkIf config.services.stormd.enable { }; + } + ); + }; +} diff --git a/flake.lock b/flake.lock index 9263df6..3190bfc 100644 --- a/flake.lock +++ b/flake.lock @@ -289,11 +289,11 @@ }, "nix-filter": { "locked": { - "lastModified": 1710156097, - "narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=", + "lastModified": 1731533336, + "narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=", "owner": "numtide", "repo": "nix-filter", - "rev": "3342559a24e85fc164b295c3444e8a139924675b", + "rev": "f7653272fd234696ae94229839a99b73c9ab7de0", "type": "github" }, "original": { @@ -368,11 +368,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1728888510, - "narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=", + "lastModified": 1732521221, + "narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", + "rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d", "type": "github" }, "original": { @@ -1540,11 +1540,11 @@ ] }, "locked": { - "lastModified": 1729218602, - "narHash": "sha256-KDmYxpkFWa0Go0WnOpkgQOypVaQxbwgpEutET5ey1VQ=", + "lastModified": 1732674798, + "narHash": "sha256-oM1gjCv9R4zxDFO3as9wqQ4FI3+pDA9MKZ72L7tTIII=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "9051466c82b9b3a6ba9e06be99621ad25423ec94", + "rev": "1d569430326b0a7807ccffdb2a188b814091976c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 8eeab5e..9a5f47f 100644 --- a/flake.nix +++ b/flake.nix @@ -43,7 +43,13 @@ url = "git+https://git.joshuabell.xyz/nvim"; }; ringofstorms-stormd = { + # Initial non git access run + # url = "./dummy"; + # inputs.nixpkgs.follows = "nixpkgs_stable"; + + # Normal access url = "git+ssh://git.joshuabell.xyz:3032/stormd"; + # Local path usage for testing changes locally # url = "path:/home/josh/projects/stormd"; }; @@ -164,9 +170,7 @@ path = lib.fileset.maybeMissing ./modules; recursive = true; } - ++ [ - ./hosts/configuration.nix - ]; + ++ [ ./hosts/configuration.nix ]; specialArgs = inputs // { inherit ylib; settings = diff --git a/hosts/h002/configuration.nix b/hosts/h002/configuration.nix index 1492021..d7e03b6 100644 --- a/hosts/h002/configuration.nix +++ b/hosts/h002/configuration.nix @@ -12,14 +12,14 @@ # My custom modules mods = { - boot_grub = true; + boot_grub.enable = true; shell_common.enable = true; de_gnome_xorg.enable = true; audio_pulse.enable = true; neovim.enable = true; tty_caps_esc.enable = true; docker.enable = true; - # stormd.enable = true; + stormd.enable = true; nebula.enable = true; ssh.enable = true; }; diff --git a/modules/boot/grub.nix b/modules/boot/grub.nix index ca7a929..46f5e5e 100644 --- a/modules/boot/grub.nix +++ b/modules/boot/grub.nix @@ -12,7 +12,7 @@ in options = { mods.${name} = { enable = mkEnableOption (lib.mdDoc "Enable ${name}"); - device = mkDefaultOption { + device = mkOption { type = types.str; default = "/dev/sda"; description = ''