From 71f2d3458b464ab14386836d5e1b7672e9cce1ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Estrella?= <2049686+sestrella@users.noreply.github.com> Date: Sat, 21 Oct 2023 03:27:03 -0500 Subject: [PATCH] Fix CI (#20) --- .github/workflows/ci.yml | 2 +- flake.nix | 26 +++++++++++++++++--------- home.nix | 6 +----- runner.nix | 10 ++++++++++ sestrella.nix | 10 ++++++++++ 5 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 runner.nix create mode 100644 sestrella.nix diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c1e218..e9dd460 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,4 +14,4 @@ jobs: - uses: actions/checkout@v3 - uses: DeterminateSystems/flake-checker-action@v5 - uses: DeterminateSystems/nix-installer-action@v6 - - run: nix run home-manager/master -- init --switch + - run: nix run home-manager/master -- init --switch $GITHUB_WORKSPACE diff --git a/flake.nix b/flake.nix index 0068229..4113976 100644 --- a/flake.nix +++ b/flake.nix @@ -10,21 +10,29 @@ }; }; - outputs = { nixpkgs, home-manager, ... }: - let - system = "aarch64-darwin"; - pkgs = nixpkgs.legacyPackages.${system}; - in - { - homeConfigurations."sestrella" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; + outputs = { nixpkgs, home-manager, ... }: { + homeConfigurations = { + runner = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; # Specify your home configuration modules here, for example, # the path to your home.nix. - modules = [ ./home.nix ]; + modules = [ ./runner.nix ]; + + # Optionally use extraSpecialArgs + # to pass through arguments to home.nix + + }; + sestrella = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.aarch64-darwin; + + # Specify your home configuration modules here, for example, + # the path to your home.nix. + modules = [ ./sestrella.nix ]; # Optionally use extraSpecialArgs # to pass through arguments to home.nix }; }; + }; } diff --git a/home.nix b/home.nix index ab77003..ff976d6 100644 --- a/home.nix +++ b/home.nix @@ -1,11 +1,6 @@ { config, pkgs, ... }: { - # Home Manager needs a bit of information about you and the paths it should - # manage. - home.username = "sestrella"; - home.homeDirectory = "/Users/sestrella"; - # This value determines the Home Manager release that your configuration is # compatible with. This helps avoid breakage when a new Home Manager release # introduces backwards incompatible changes. @@ -78,4 +73,5 @@ # nixpkgs.overlays = [ # vim-plugins-overlays.default # ]; + programs.home-manager.enable = true; } diff --git a/runner.nix b/runner.nix new file mode 100644 index 0000000..7ef94f7 --- /dev/null +++ b/runner.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +{ + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = "runner"; + home.homeDirectory = "/home/runner"; + + imports = [ ./home.nix ]; +} diff --git a/sestrella.nix b/sestrella.nix new file mode 100644 index 0000000..d7469a0 --- /dev/null +++ b/sestrella.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +{ + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = "sestrella"; + home.homeDirectory = "/Users/sestrella"; + + imports = [ ./home.nix ]; +}