diff --git a/build-iso.sh b/build-iso.sh deleted file mode 100755 index 2cd9c7d..0000000 --- a/build-iso.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -beta="${1}" - -nix build ".#nixosConfigurations.iso${beta}.config.system.build.isoImage" diff --git a/darwin.sh b/darwin.sh deleted file mode 100644 index 0bd50b0..0000000 --- a/darwin.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -set -ex -set -o pipefail - -dir="$(mktemp -d)" -cd "${dir}" - -# Install nix-darwin -nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer -./result/bin/darwin-installer - -# Get my configuration -mkdir -p ~/.config/darwin -cd ~/.config/darwin -curl -O -L https://github.com/greg-hellings/nixos-config/archive/refs/heads/main.tar.gz -tar xvzf main.tar.gz --strip-components 1 - -# Build NixOS for this system -cd "${dir}" -nix build "~/.config/darwin#darwinConfigurations.$(hostname -s).system" -./result/sw/bin/darwin-rebuild switch --flake ~/.config/darwin diff --git a/flake.nix b/flake.nix index 115fe99..2e49c9b 100644 --- a/flake.nix +++ b/flake.nix @@ -84,6 +84,7 @@ gnutar gzip inject + inject-darwin tmux vim xonsh @@ -102,7 +103,7 @@ x86_64-linux = rec { default = iso; iso = self.nixosConfigurations.iso.config.system.build.isoImage; - iso-beta = self.nixosConfigurations.iso.config.system.build.isoImage; + iso-beta = self.nixosConfigurations.iso-beta.config.system.build.isoImage; }; }; }; diff --git a/garnix.yaml b/garnix.yaml index dccf8ab..fa8b2e2 100644 --- a/garnix.yaml +++ b/garnix.yaml @@ -1,8 +1,11 @@ builds: + exclude: + - devShells.i686-linux.default include: - - darwinConfigurations.* - - devShells.x86_64-linux.default - - devShells.aarch64-linux.default - - devShells.x86_64-darwin.default - - homeConfigurations.greghellings.activationPackage + - darwinConfigurations.*.system + - devShells.*.default + - homeConfigurations.* - nixosConfigurations.* + - packages.x86_64-linux.* + - packages.aarch64-linux.* + - packages.aarch64-darwin.* diff --git a/home/hosts/ivr/default.nix b/home/hosts/ivr/default.nix index 1d1b4b2..276c973 100644 --- a/home/hosts/ivr/default.nix +++ b/home/hosts/ivr/default.nix @@ -36,6 +36,6 @@ in { " https://pypidev.ivrtechnology.com/simple/" ]); username = "gregory.hellings"; - homeDirectory = "/home/gregory.hellings"; + homeDirectory = lib.mkForce "/home/gregory.hellings"; }; } diff --git a/hosts/gen2/default.nix b/hosts/gen2/default.nix deleted file mode 100644 index 9bea64d..0000000 --- a/hosts/gen2/default.nix +++ /dev/null @@ -1,96 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, pkgs, ... }: - -{ - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; - - # Bootloader. - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/vda"; - boot.loader.grub.useOSProber = true; - - nix.settings.experimental-features = "nix-command flakes"; - networking.hostName = "nixos"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Enable networking - networking.networkmanager.enable = true; - - # Set your time zone. - time.timeZone = "America/Chicago"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "en_US.UTF-8"; - LC_IDENTIFICATION = "en_US.UTF-8"; - LC_MEASUREMENT = "en_US.UTF-8"; - LC_MONETARY = "en_US.UTF-8"; - LC_NAME = "en_US.UTF-8"; - LC_NUMERIC = "en_US.UTF-8"; - LC_PAPER = "en_US.UTF-8"; - LC_TELEPHONE = "en_US.UTF-8"; - LC_TIME = "en_US.UTF-8"; - }; - - # Configure keymap in X11 - services.xserver = { - layout = "us"; - xkbVariant = ""; - }; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.greg = { - isNormalUser = true; - description = "Greg Hellings"; - extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; []; - }; - - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - git - vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget - ]; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - # services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "23.05"; # Did you read the comment? - -} diff --git a/hosts/genesis/home-assistant.nix b/hosts/genesis/home-assistant.nix index df578cc..2dc35fb 100755 --- a/hosts/genesis/home-assistant.nix +++ b/hosts/genesis/home-assistant.nix @@ -73,6 +73,7 @@ in # I have ZWave devices. The easiest way to connect to them is the zwavejs2mqtt service running, so we spin up # its container and map the ZWave device into it containers.zwave = { + autoStart = false; # We will try to start it with udev.extraRules listed below, as this option starts it too quickly image = "zwavejs/zwave-js-ui:latest"; ports = [ "8091:8091" "3000:3000" ]; volumes = [ "/var/lib/zwave:/usr/src/app/store" ]; @@ -95,6 +96,10 @@ in }; }; + services.udev.extraRules = '' + SUBSYSTEM=="tty", KERNEL=="ttyACM0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="podman-zwave.service" + ''; + greg.proxies = { "smart.home".target = "http://127.0.0.1:8123/"; diff --git a/nix.conf b/nix.conf deleted file mode 100644 index c7d7291..0000000 --- a/nix.conf +++ /dev/null @@ -1 +0,0 @@ -experimental-features = nix-command flakes diff --git a/overlays/default.nix b/overlays/default.nix index f1d5b97..0a660f9 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -51,10 +51,12 @@ in rec { aacs = prev.callPackage ./aacs.nix {}; configure_aws_creds = prev.callPackage ./configure_aws_creds.nix {}; create_ssl = prev.callPackage ./create_ssl.nix {}; + enwiki-dump = prev.callPackage ./enwiki-dump.nix {}; hms = prev.callPackage ./hms { pkgs = final.pkgs; }; - enwiki-dump = prev.callPackage ./enwiki-dump.nix {}; + 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; }; @@ -71,7 +73,6 @@ in rec { postFetch = "rm $out/tests/demo/doc/ma*ana.txt"; }; }) else prev.copier); - inject = prev.callPackage ./inject.nix { inherit (final) pkgs; }; libbluray-custom = prev.libbluray.override { withAACS = true; withBDplus = true; diff --git a/overlays/inject-darwin.nix b/overlays/inject-darwin.nix new file mode 100644 index 0000000..baf6a45 --- /dev/null +++ b/overlays/inject-darwin.nix @@ -0,0 +1,32 @@ +{ + pkgs, + coreutils, + curl, + gnutar, + nix, + ... +}: +pkgs.writeShellScriptBin "inject-darwin" '' +set -ex +set -o pipefail + +dir="$(${coreutils}/bin/mktemp -d)" +cd "''${dir}" + +# Install nix-darwin +${nix}/bin/nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer +./result/bin/darwin-installer + +# Get my configuration +mkdir -p ~/.config/darwin +cd ~/.config/darwin +${curl}/bin/curl -O -L https://github.com/greg-hellings/nixos-config/archive/refs/heads/main.tar.gz +${gnutar}/bin/tar xvzf main.tar.gz --strip-components 1 + +# Build NixOS for this system +pushd "''${dir}" +${nix}/bin/nix build "~/.config/darwin#darwinConfigurations.$(hostname -s).system" +./result/sw/bin/darwin-rebuild switch --flake ~/.config/darwin +popd +rm -r "''${dir}" +''