diff --git a/flake.lock b/flake.lock index 0cc7d68..141c70b 100644 --- a/flake.lock +++ b/flake.lock @@ -87,11 +87,29 @@ "type": "github" } }, + "game-of-life": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1728511087, + "narHash": "sha256-CvO74jwMjUUPySy0QCt7sPImbxKlhWcSAet93Fkt6iU=", + "owner": "local-interloper", + "repo": "game-of-life", + "rev": "c39d37e394f5da79a6a7d198e1d7e505aa5298a7", + "type": "github" + }, + "original": { + "owner": "local-interloper", + "repo": "game-of-life", + "type": "github" + } + }, "nixos-wsl": { "inputs": { "flake-compat": "flake-compat", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1726981058, @@ -109,6 +127,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1717179513, + "narHash": "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "63dacb46bf939521bdc93981b4cbb7ecb58427a0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1726320982, "narHash": "sha256-RuVXUwcYwaUeks6h3OLrEmg14z9aFXdWppTWPMTwdQw=", @@ -124,7 +158,7 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "lastModified": 1728241625, "narHash": "sha256-yumd4fBc/hi8a9QgA9IT8vlQuLZ2oqhkJXHPKxH/tRw=", @@ -142,8 +176,9 @@ }, "root": { "inputs": { + "game-of-life": "game-of-life", "nixos-wsl": "nixos-wsl", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "snowfall-lib": "snowfall-lib" } }, diff --git a/flake.nix b/flake.nix index 9cf53f3..a27e95a 100644 --- a/flake.nix +++ b/flake.nix @@ -10,32 +10,46 @@ url = "github:snowfallorg/lib"; inputs.nixpkgs.follows = "nixpkgs"; }; + game-of-life.url = "github:local-interloper/game-of-life"; }; - outputs = inputs: - inputs.snowfall-lib.mkFlake { + outputs = inputs: let + lib = inputs.snowfall-lib.mkLib { + inherit inputs; + src = ./.; + + channels-config = { + allowUnfree = true; + allowUnfreePredicate = _: true; + permittedInsecurePackages = ["openssl-1.1.1w"]; + }; + + # Configure Snowfall Lib, all of these settings are optional. + snowfall = { + # Tell Snowfall Lib to look in the `./nix/` directory for your + # Nix files. + root = ./.; + + # Choose a namespace to use for your flake's packages, library, + # and overlays. + namespace = "my-namespace"; + + # Add flake metadata that can be processed by tools like Snowfall Frost. + meta = { + # A slug to use in documentation when displaying things like file paths. + name = "nixos-config-hionv"; + + # A title to show for your flake, typically the name. + title = "Hion's Personal NixOS Config"; + }; + }; + }; + in + lib.mkFlake { inherit inputs; src = ./.; - # Configure Snowfall Lib, all of these settings are optional. - snowfall = { - # Tell Snowfall Lib to look in the `./nix/` directory for your - # Nix files. - root = ./.; - - # Choose a namespace to use for your flake's packages, library, - # and overlays. - namespace = "my-namespace"; - - # Add flake metadata that can be processed by tools like Snowfall Frost. - meta = { - # A slug to use in documentation when displaying things like file paths. - name = "nixos-config-hionv"; - - # A title to show for your flake, typically the name. - title = "Hion's Personal NixOS Config"; - }; - }; + systems.modules.nixos = with inputs; [ # my-input.nixosModules.my-module diff --git a/lib/default.nix b/lib/default.nix new file mode 100644 index 0000000..2b0cfd0 --- /dev/null +++ b/lib/default.nix @@ -0,0 +1,32 @@ +{lib, ...}: let + inherit (lib) mkOption strings; + inherit (lib.attrsets) filterAttrs mapAttrsToList; + inherit (lib.types) bool; +in rec { + disabled = {enable = false;}; + enabled = {enable = true;}; + ifThenElse = cond: t: f: + if cond + then t + else f; + mkOpt = type: default: description: + mkOption {inherit type default description;}; + mkOpt' = type: default: mkOpt type default null; + mkBoolOpt = mkOpt bool; + mkBoolOpt' = mkOpt' bool; + mkPxeMenu = args: + '' + UI menu.c32 + TIMEOUT 300 + '' + + strings.concatStringsSep "\n" (mapAttrsToList + ( + name: value: '' + LABEL ${name} + MENU LABEL ${value.content.label} + KERNEL ${value.content.kernel} + append ${value.content.append} + '' + ) + (filterAttrs (_: v: v.condition) args)); +} diff --git a/modules/home/stream-tools.nix b/modules/home/stream-tools.nix new file mode 100644 index 0000000..342695f --- /dev/null +++ b/modules/home/stream-tools.nix @@ -0,0 +1,21 @@ +{ + pkgs, + config, + lib, + ... +}: let + inherit (lib.my-namespace) mkEnableOption mkIf; + cfg = config.my-namespace.home.stream-tools; +in { + options.my-namespace.home.stream-tools = { + enable = mkEnableOption "Enable the Stream Machine Tools"; + }; + + config = mkIf cfg.enable { + home = { + packages = with pkgs; [ + obs-studio + ]; + }; + }; +} \ No newline at end of file diff --git a/systems/x86_64-linux/th0nkpad-nixos/default.nix b/systems/x86_64-linux/th0nkpad-nixos/default.nix index 8d59cd0..511fbf2 100644 --- a/systems/x86_64-linux/th0nkpad-nixos/default.nix +++ b/systems/x86_64-linux/th0nkpad-nixos/default.nix @@ -49,9 +49,12 @@ in soundwireserver vscode spotify + appimage-run + inputs.game-of-life.packages.x86_64-linux.default # thunderbird ]; }; + lib.my-namespace.home.stream-tools.enable = true; # Open ports in the firewall.