diff --git a/checks.nix b/checks.nix index b5ae3a5..723e87e 100644 --- a/checks.nix +++ b/checks.nix @@ -8,6 +8,7 @@ # Needs https://github.com/DeterminateSystems/flake-checker/pull/130 #flake-checker.enable = true; nixfmt-rfc-style.enable = true; + check-merge-conflicts.enable = true; }; }; } diff --git a/darwin/default.nix b/darwin/default.nix index 67caf6c..abb607c 100644 --- a/darwin/default.nix +++ b/darwin/default.nix @@ -1,30 +1,31 @@ -{ inputs, overlays, ... }: +{ top, overlays, ... }: let mac = - { system ? "aarch64-darwin" - , name - , channel ? inputs.nixunstable - , hm ? inputs.hmunstable - , extraMods ? [ ] + { + system ? "aarch64-darwin", + name, + channel ? top.nixunstable, + hm ? top.hmunstable, + extraMods ? [ ], }: let - nixpkgs = import channel { - inherit system overlays; - }; + nixpkgs = import channel { inherit system overlays; }; in - inputs.darwin.lib.darwinSystem { + top.darwin.lib.darwinSystem { inherit system; - specialArgs = { inherit nixpkgs; }; + specialArgs = { + inherit nixpkgs; + }; modules = [ { nixpkgs.overlays = overlays; home-manager.extraSpecialArgs = { - inherit inputs; + inherit top; host = name; }; } hm.darwinModules.home-manager - inputs.self.modules.darwinModule + top.self.modules.darwinModule ./${name} ] ++ extraMods; }; diff --git a/flake.nix b/flake.nix index bb0f14c..99cc5eb 100644 --- a/flake.nix +++ b/flake.nix @@ -45,49 +45,72 @@ zed.url = "github:zed-industries/zed/v0.156.x"; }; - outputs = { self, ... }@inputs: + outputs = + { self, ... }@top: let local_overlay = import ./overlays; + packages_overlay = ( + _: prev: + (import ./pkgs { + inherit self; + pkgs = prev; + }).packages + ); overlays = [ - inputs.agenix.overlays.default + top.agenix.overlays.default local_overlay - inputs.nurpkgs.overlay - inputs.vsext.overlays.default - (_: _: { zed-editor = inputs.zed.packages.x86_64-linux.default; }) + packages_overlay + top.nurpkgs.overlay + top.vsext.overlays.default + (_: _: { zed-editor = top.zed.packages.x86_64-linux.default; }) ]; in - inputs.flake-parts.lib.mkFlake { inherit inputs; } { - systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; + top.flake-parts.lib.mkFlake { inputs = top; } { + systems = [ + "aarch64-linux" + "x86_64-linux" + "aarch64-darwin" + ]; flake = { - nixosConfigurations = (import ./hosts { inherit inputs overlays; }); + nixosConfigurations = (import ./hosts { inherit top overlays; }); - darwinConfigurations = (import ./darwin { inherit inputs overlays; }); + darwinConfigurations = (import ./darwin { inherit top overlays; }); - homeConfigurations = (import ./home { inherit inputs overlays; }); + homeConfigurations = (import ./home { inherit top overlays; }); overlays = { - default = local_overlay; + default = packages_overlay; + local = local_overlay; }; modules = import ./modules; }; - perSystem = { pkgs, self', system, ... }: { - _module.args.pkgs = import inputs.nixstable { - inherit system overlays; + perSystem = + { + pkgs, + self', + system, + ... + }: + { + _module.args = { + pkgs = import top.nixstable { inherit system overlays; }; + }; + + imports = [ ./pkgs ]; + + checks = import ./checks.nix { + inherit system; + inherit (top) hooks; + }; + + devShells = import ./shells.nix { + inherit self' pkgs; + inherit (top) nixvimunstable; + }; }; - - checks = import ./checks.nix { inherit system; inherit (inputs) hooks; }; - - devShells = import ./shells.nix { inherit self' pkgs; inherit (inputs) nixvimunstable; }; - - packages = rec { - default = iso; - iso = self.nixosConfigurations.iso.config.system.build.isoImage; - iso-beta = self.nixosConfigurations.iso-beta.config.system.build.isoImage; - }; - }; }; } diff --git a/home/default.nix b/home/default.nix index f4225f2..b6eb72b 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,20 +1,22 @@ -{ inputs -, overlays -, ... -}: +{ top, overlays, ... }: rec { greghellings = let system = "x86_64-linux"; - pkgs = (import inputs.nixunstable { inherit system overlays; config.allowUnfree = true; }); + pkgs = ( + import top.nixunstable { + inherit system overlays; + config.allowUnfree = true; + } + ); in - inputs.hmunstable.lib.homeManagerConfiguration { + top.hmunstable.lib.homeManagerConfiguration { inherit pkgs; modules = [ ./home.nix ]; extraSpecialArgs = { - inherit inputs; - nixvim = inputs.nixvimunstable; + inherit top; + nixvim = top.nixvimunstable; gui = false; gnome = false; host = "ivr"; diff --git a/home/hosts/ivr/default.nix b/home/hosts/ivr/default.nix index ae59dfe..8c9f4f8 100644 --- a/home/hosts/ivr/default.nix +++ b/home/hosts/ivr/default.nix @@ -1,26 +1,35 @@ -{ pkgs, lib, inputs, ... }: +{ + pkgs, + lib, + top, + ... +}: let - nix23 = import inputs.nix23_05 { + nix23 = import top.nix23_05 { inherit (pkgs.stdenv) system; - overlays = [ inputs.self.overlays.default ]; + overlays = [ top.self.overlays.default ]; }; - py = nix23.python311.withPackages (p: with p; [ - django - djangorestframework - django-rapyd-modernauth - environs - mysqlclient - pyyaml - ruamel-yaml - tox - ]); + py = nix23.python311.withPackages ( + p: with p; [ + django + djangorestframework + django-rapyd-modernauth + environs + mysqlclient + pyyaml + ruamel-yaml + tox + ] + ); x = pkgs.xonsh.override { - extraPackages = (ps: [ - pkgs.nur.repos.xonsh-xontribs.xonsh-direnv - pkgs.nur.repos.xonsh-xontribs.xontrib-vox - ps.xonsh-apipenv - pkgs.pipenv-ivr - ]); + extraPackages = ( + ps: [ + pkgs.nur.repos.xonsh-xontribs.xonsh-direnv + pkgs.nur.repos.xonsh-xontribs.xontrib-vox + ps.xonsh-apipenv + pkgs.pipenv-ivr + ] + ); }; in { @@ -33,9 +42,7 @@ in nixpkgs.config = { allowUnfree = true; - permittedInsecurePackages = [ - "jitsi-meet-1.0.8043" - ]; + permittedInsecurePackages = [ "jitsi-meet-1.0.8043" ]; }; home = { @@ -51,14 +58,16 @@ in robo3t x ]; - file.".pip/pip.conf".text = (lib.strings.concatStringsSep "\n" [ - "[global]" - "retries = 1" - "index-url = https://pypi.python.org/simple" - "extra-index-url =" - " https://pypi.ivrtechnology.com/simple/" - " https://pypidev.ivrtechnology.com/simple/" - ]); + file.".pip/pip.conf".text = ( + lib.strings.concatStringsSep "\n" [ + "[global]" + "retries = 1" + "index-url = https://pypi.python.org/simple" + "extra-index-url =" + " https://pypi.ivrtechnology.com/simple/" + " https://pypidev.ivrtechnology.com/simple/" + ] + ); username = "gregory.hellings"; homeDirectory = lib.mkForce "/home/gregory.hellings"; }; diff --git a/home/modules/vscodium.nix b/home/modules/vscodium.nix index b0ea339..3dbaab2 100644 --- a/home/modules/vscodium.nix +++ b/home/modules/vscodium.nix @@ -1,4 +1,10 @@ -{ pkgs, config, lib, inputs, ... }: +{ + pkgs, + config, + lib, + top, + ... +}: let cfg = config.greg.vscodium; @@ -17,7 +23,7 @@ in programs.vscode = { enable = true; package = pkgs.vscodium; - extensions = with inputs.vsext.extensions."${pkgs.stdenv.system}".vscode-marketplace; [ + extensions = with top.vsext.extensions."${pkgs.stdenv.system}".vscode-marketplace; [ arrterian.nix-env-selector asvetliakov.vscode-neovim batisteo.vscode-django @@ -49,9 +55,7 @@ in "terminal.integrated.defaultProfile.linux" = "tmux"; "vscode-neovim.neovimInitVimPaths.darwin" = "~/.config/nvim/init.lua"; "vscode-neovim.neovimInitVimPaths.linux" = "~/.config/nvim/init.lua"; - "workbench.settings.applyToAllProfiles" = [ - "direnv.path.executable" - ]; + "workbench.settings.applyToAllProfiles" = [ "direnv.path.executable" ]; }; }; }; diff --git a/hosts/default.nix b/hosts/default.nix index 28c41d2..bf2cdd3 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,28 +1,33 @@ -{ inputs, overlays, ... }: +{ top, overlays, ... }: let - wsl = args: (unstable (args // { extraMods = [ inputs.wsl.nixosModules.wsl ]; })); - unstable = args: (machine (args // { - channel = inputs.nixunstable; - hm = inputs.hmunstable; - nixvim = inputs.nixvimunstable; - })); + wsl = args: (unstable (args // { extraMods = [ top.wsl.nixosModules.wsl ]; })); + unstable = + args: + (machine ( + args + // { + channel = top.nixunstable; + hm = top.hmunstable; + nixvim = top.nixvimunstable; + } + )); machine = - { channel ? inputs.nixstable - , extraMods ? [ ] - , name - , system ? "x86_64-linux" - , hm ? inputs.hm - , nixvim ? inputs.nixvimstable - , + { + channel ? top.nixstable, + extraMods ? [ ], + name, + system ? "x86_64-linux", + hm ? top.hm, + nixvim ? top.nixvimstable, }: let - nixpkgs = import channel { - inherit system; - }; + nixpkgs = import channel { inherit system; }; in channel.lib.nixosSystem { inherit system; - specialArgs = { inherit nixpkgs inputs overlays; }; + specialArgs = { + inherit nixpkgs top overlays; + }; modules = [ { nixpkgs.overlays = overlays; @@ -31,17 +36,17 @@ let useUserPackages = true; users.greg = import ../home/home.nix; extraSpecialArgs = { - inherit inputs overlays nixvim; + inherit top overlays nixvim; home = "/home/greg"; host = name; }; backupFileExtension = "bkp"; }; } - inputs.agenix.nixosModules.default + top.agenix.nixosModules.default hm.nixosModules.home-manager - inputs.self.modules.nixosModule - inputs.nurpkgs.nixosModules.nur + top.self.modules.nixosModule + top.nurpkgs.nixosModules.nur ./${name} ] ++ extraMods; }; @@ -58,7 +63,13 @@ in iso = machine { name = "iso"; }; iso-beta = unstable { name = "iso"; }; # nix build '.#nixosConfigurations.wsl.config.system.build.installer' - nixos = wsl { name = "wsl"; system = "aarch64-linux"; }; + nixos = wsl { + name = "wsl"; + system = "aarch64-linux"; + }; # nix build '.#nixosConfigurations.wsl-aarch.config.system.build.installer' - nixos-arm = wsl { name = "wsl"; system = "aarch64-linux"; }; + nixos-arm = wsl { + name = "wsl"; + system = "aarch64-linux"; + }; } diff --git a/hosts/hosea/default.nix b/hosts/hosea/default.nix index ee37611..5d95678 100644 --- a/hosts/hosea/default.nix +++ b/hosts/hosea/default.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ inputs, ... }: +{ top, ... }: let wanInterface = "enp2s0"; lanInterface = "enp1s0"; @@ -10,13 +10,12 @@ let in { - imports = - [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - inputs.btc.nixosModules.default - ./bitcoin.nix - ]; + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + top.btc.nixosModules.default + ./bitcoin.nix + ]; # Bootloader boot = { @@ -39,10 +38,12 @@ in "${wanInterface}".useDHCP = true; "${lanInterface}" = { useDHCP = false; - ipv4.addresses = [{ - address = lanIpAddress; - prefixLength = 16; - }]; + ipv4.addresses = [ + { + address = lanIpAddress; + prefixLength = 16; + } + ]; }; }; }; diff --git a/hosts/myself/container-runner.nix b/hosts/myself/container-runner.nix index df12891..fe7baae 100644 --- a/hosts/myself/container-runner.nix +++ b/hosts/myself/container-runner.nix @@ -1,92 +1,109 @@ -{ inputs, name, extra ? { }, packages ? [ ], overlays }: +{ + top, + name, + extra ? { }, + packages ? [ ], + overlays, +}: -({ config, pkgs, lib, ... }: ( - lib.attrsets.recursiveUpdate { + config, + pkgs, + lib, + ... + }: + (lib.attrsets.recursiveUpdate + { - imports = [ - inputs.agenix.nixosModules.default - inputs.self.modules.nixosModule - ]; + imports = [ + top.agenix.nixosModules.default + top.self.modules.nixosModule + ]; - nixpkgs.overlays = overlays; + nixpkgs.overlays = overlays; - greg.tailscale.enable = true; + greg.tailscale.enable = true; - age = { - identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; - secrets.runner-reg = { - file = ../../secrets/gitlab/myself-${name}-runner-reg.age; - owner = "gitlab-runner"; + age = { + identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; + secrets.runner-reg = { + file = ../../secrets/gitlab/myself-${name}-runner-reg.age; + owner = "gitlab-runner"; + }; }; - }; - environment.systemPackages = with pkgs; [ - curl - gawk - git - unzip - xorriso - wget - ] ++ packages; + environment.systemPackages = + with pkgs; + [ + curl + gawk + git + unzip + xorriso + wget + ] + ++ packages; - networking = { - useHostResolvConf = pkgs.lib.mkForce false; - nameservers = [ "100.100.100.100" ]; - }; + networking = { + useHostResolvConf = pkgs.lib.mkForce false; + nameservers = [ "100.100.100.100" ]; + }; - nixpkgs.config.allowUnfree = true; + nixpkgs.config.allowUnfree = true; - users.users.gitlab-runner = { - isSystemUser = true; - group = "kvm"; - extraGroups = [ "kvm" ]; - }; + users.users.gitlab-runner = { + isSystemUser = true; + group = "kvm"; + extraGroups = [ "kvm" ]; + }; - services = { - gitlab-runner = { - enable = true; - settings.concurrent = 5; - services = { - shell = { - executor = "shell"; - limit = 5; - authenticationTokenConfigFile = config.age.secrets.runner-reg.path; - environmentVariables = { - EFI_DIR = "${pkgs.OVMF.fd}/FV/"; - STORAGE_URL = "http://s3.thehellings.lan:9000"; + services = { + gitlab-runner = { + enable = true; + settings.concurrent = 5; + services = { + shell = { + executor = "shell"; + limit = 5; + authenticationTokenConfigFile = config.age.secrets.runner-reg.path; + environmentVariables = { + EFI_DIR = "${pkgs.OVMF.fd}/FV/"; + STORAGE_URL = "http://s3.thehellings.lan:9000"; + }; }; }; }; + resolved.enable = true; }; - resolved.enable = true; - }; - systemd.services.gitlab-runner = { - wants = [ - "network-online.target" - "systemd-resolved.service" - ]; - after = [ - "network.target" - "network-online.target" - "systemd-resolved.service" - ]; - serviceConfig = { - DevicePolicy = lib.mkForce "auto"; - PrivateDevices = false; - ProtectKernelModules = false; - DevicesAllow = [ "/dev/kvm" "/dev/mem" ]; - DynamicUser = lib.mkForce false; - User = "root"; - Group = "kvm"; + systemd.services.gitlab-runner = { + wants = [ + "network-online.target" + "systemd-resolved.service" + ]; + after = [ + "network.target" + "network-online.target" + "systemd-resolved.service" + ]; + serviceConfig = { + DevicePolicy = lib.mkForce "auto"; + PrivateDevices = false; + ProtectKernelModules = false; + DevicesAllow = [ + "/dev/kvm" + "/dev/mem" + ]; + DynamicUser = lib.mkForce false; + User = "root"; + Group = "kvm"; + }; }; - }; - system.stateVersion = lib.mkForce "24.05"; - } + system.stateVersion = lib.mkForce "24.05"; + } extra -) # End of attrsets.recursiveUpdate -) # End of outter function wrapper + ) # End of attrsets.recursiveUpdate +) # End of outter function wrapper diff --git a/hosts/myself/git.nix b/hosts/myself/git.nix index 6b4cb79..296d138 100644 --- a/hosts/myself/git.nix +++ b/hosts/myself/git.nix @@ -1,16 +1,12 @@ -{ config, pkgs, lib, inputs, overlays, ... }: +{ + config, + pkgs, + lib, + ... +}: let - gitlabStateDir = "/var/lib/gitlab"; - - container = input: (lib.attrsets.recursiveUpdate - { - bindMounts."/etc/ssh".hostPath = "/etc/ssh"; # For agenix secrets - enableTun = true; - privateNetwork = true; - } - input); in { networking = { @@ -28,12 +24,14 @@ in greg.proxies."git.thehellings.lan" = { target = "http://192.168.200.2"; extraConfig = '' - proxy_set_header X-Forwarded-Proto https; - proxy_set_header X-Forwarded-Ssl on; - ''; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Forwarded-Ssl on; + ''; }; - system.activationScripts.makeGitlabDir = lib.stringAfter [ "var" ] "mkdir -p ${gitlabStateDir} && touch ${gitlabStateDir}/touch"; + system.activationScripts.makeGitlabDir = lib.stringAfter [ + "var" + ] "mkdir -p ${gitlabStateDir} && touch ${gitlabStateDir}/touch"; greg.containers.gitlab = { tailscale = true; diff --git a/modules/nixos/container.nix b/modules/nixos/container.nix index 3ffa4c4..5b8de59 100644 --- a/modules/nixos/container.nix +++ b/modules/nixos/container.nix @@ -1,11 +1,18 @@ -{ config, lib, inputs, overlays, ... }: +{ + config, + lib, + top, + overlays, + ... +}: let cfg = config.greg.containers; # Create a container with all our default settings - makeContainer = _: container: + makeContainer = + _: container: let agekey = "/etc/ssh/agenix_key"; in @@ -15,35 +22,38 @@ let localAddress = "192.168.${container.subnet}.2"; privateNetwork = true; bindMounts = { - "${agekey}".hostPath = "/etc/ssh/ssh_host_ed25519_key"; # This is needed for agenix to + "${agekey}".hostPath = "/etc/ssh/ssh_host_ed25519_key"; # This is needed for agenix to }; enableTun = container.tailscale; - config = { ... }: { - imports = [ - inputs.agenix.nixosModules.default - inputs.self.modules.nixosModule - container.builder - ]; + config = + { ... }: + { + imports = [ + top.agenix.nixosModules.default + top.self.modules.nixosModule + container.builder + ]; - nixpkgs.overlays = overlays; + nixpkgs.overlays = overlays; - networking = { - firewall.enable = true; - useHostResolvConf = lib.mkForce false; + networking = { + firewall.enable = true; + useHostResolvConf = lib.mkForce false; + }; + + age.identityPaths = [ agekey ]; + + greg.tailscale.enable = container.tailscale; }; - - age.identityPaths = [ agekey ]; - - greg.tailscale.enable = container.tailscale; - }; }; in { options.greg.containers = lib.mkOption { default = { }; - type = with lib.types; attrsOf (submodule ( - { + type = + with lib.types; + attrsOf (submodule ({ options = { tailscale = lib.mkOption { type = bool; @@ -57,20 +67,19 @@ in builder = lib.mkOption { default = { ... }: { }; description = '' - This needs to be a function, like the one for - a container's config. It will setup the core system above the - defaults set in this module. - ''; + This needs to be a function, like the one for + a container's config. It will setup the core system above the + defaults set in this module. + ''; example = '' - { pkgs, config, lib, ... } : - { - services.openssh.enable = true; - } - ''; + { pkgs, config, lib, ... } : + { + services.openssh.enable = true; + } + ''; }; }; - } - )); + })); }; config = { diff --git a/overlays/default.nix b/overlays/default.nix index 7edee08..5ca09c3 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,19 +1,20 @@ final: prev: let - myPackages = pypackages: with pypackages; [ - black - dateutil - ipython - mypy - pylint - pyyaml - responses - ruamel-yaml - tox - typing-extensions - virtualenv - ]; + myPackages = + pypackages: with pypackages; [ + black + dateutil + ipython + mypy + pylint + pyyaml + responses + ruamel-yaml + tox + typing-extensions + virtualenv + ]; myPython = prev.python312.withPackages myPackages; is2405 = prev.lib.versionAtLeast prev.lib.version "24"; @@ -24,34 +25,34 @@ rec { ## Testing adding python packages in the correct manner pythonPackagesExtensions = (prev.pythonPackagesExtensions or [ ]) ++ [ - (python-final: _: - let cp = python-final.callPackage; in { + ( + python-final: _: + let + cp = python-final.callPackage; + in + { django-rapyd-modernauth = cp ./django-rapyd-modernauth.nix { }; graypy = cp ./graypy.nix { }; itg-django-utils = cp ./itg-django-utils.nix { }; xonsh-apipenv = cp ./xonsh-apipenv.nix { }; - }) + } + ) ]; # My own packages aacs = prev.callPackage ./aacs.nix { }; create_ssl = prev.callPackage ./create_ssl.nix { }; enwiki-dump = prev.callPackage ./enwiki-dump.nix { }; - hms = prev.callPackage ./hms { - pkgs = final.pkgs; - }; inject = prev.callPackage ./inject.nix { inherit (final) pkgs; }; inject-darwin = prev.callPackage ./inject-darwin.nix { inherit (final) pkgs; }; - setup-ssh = prev.callPackage ./setup-ssh { - pkgs = final.pkgs; - }; + setup-ssh = prev.callPackage ./setup-ssh { pkgs = final.pkgs; }; upgrade-pg-cluster = prev.callPackage ./upgrade-pg-cluster.nix { }; # Overrides of packages brew = prev.callPackage ./homebrew.nix { }; - copier = (if is2405 then - prev.copier.overridePythonAttrs - (_: { + copier = ( + if is2405 then + prev.copier.overridePythonAttrs (_: { version = "9.1.0"; src = final.fetchFromGitHub { owner = "copier-org"; @@ -60,15 +61,16 @@ rec { hash = "sha256-x5r7Xv4lAOMkR+UIEeSY7LvbYMLpTWYuICYe9ygz1tA="; postFetch = "rm $out/tests/demo/doc/ma*ana.txt"; }; - }) else prev.copier); + }) + else + prev.copier + ); libbluray-custom = prev.libbluray.override { withAACS = true; withBDplus = true; }; template = prev.callPackage ./template.nix { }; - handbrake = prev.handbrake.override { - libbluray = libbluray-custom; - }; + handbrake = prev.handbrake.override { libbluray = libbluray-custom; }; libvirt-greg = prev.libvirt.overrideAttrs { postInstall = prev.libvirt.postInstall + "rm -r $out/lib/systemd/system/libvirtd.service"; }; diff --git a/overlays/hms/default.nix b/overlays/hms/default.nix deleted file mode 100644 index 385661f..0000000 --- a/overlays/hms/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ pkgs, ... }: - -pkgs.writeShellScriptBin "hms" (builtins.readFile ./hms.sh) diff --git a/overlays/packages.nix b/overlays/packages.nix deleted file mode 100644 index 63bed4a..0000000 --- a/overlays/packages.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ nixunstable, flake-utils }: - -flake-utils.lib.eachDefaultSystemMap (system: -let - pkgs = (import nixunstable { inherit system; }); -in -{ - hms = pkgs.callPackage ./hms.nix { - inherit pkgs; - }; - - brew = pkgs.callPackage ./homebrew.nix { }; - - django-rapyd-modernauth = pkgs.python3.pkgs.callPackage ./django-rapyd-modernauth.nix { - buildPythonPackage = pkgs.python3.pkgs.buildPythonPackage; - }; - - xonsh-direnv = pkgs.callPackage ./xonsh-direnv.nix { - buildPythonPackage = pkgs.python3.pkgs.buildPythonPackage; - fetchPypi = pkgs.python.pkgs.fetchPypi; - }; -} -) diff --git a/pkgs/default.nix b/pkgs/default.nix new file mode 100644 index 0000000..5d4bd6a --- /dev/null +++ b/pkgs/default.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: + +let + c = pkgs.callPackage; +in +{ + packages = { + #default = iso; + #iso = top.self.nixosConfigurations.iso.config.system.build.isoImage; + #iso-beta = self.nixosConfigurations.iso-beta.config.system.build.isoImage; + hms = c ./hms { }; + }; +} diff --git a/pkgs/hms/default.nix b/pkgs/hms/default.nix new file mode 100644 index 0000000..7662e58 --- /dev/null +++ b/pkgs/hms/default.nix @@ -0,0 +1,3 @@ +{ writeShellScriptBin, ... }: + +writeShellScriptBin "hms" (builtins.readFile ./hms.sh) diff --git a/overlays/hms/hms.sh b/pkgs/hms/hms.sh similarity index 94% rename from overlays/hms/hms.sh rename to pkgs/hms/hms.sh index 2d45713..a6916b8 100644 --- a/overlays/hms/hms.sh +++ b/pkgs/hms/hms.sh @@ -1,5 +1,4 @@ # vim: set ft=bash: -set -eo pipefail # Build different targets with GUI or not # Build and switch