-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
177 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
inputs = { | ||
# Principle inputs (updated by `nix run .#update`) | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; | ||
home-manager.url = "github:nix-community/home-manager/release-24.05"; | ||
home-manager.inputs.nixpkgs.follows = "nixpkgs"; | ||
|
||
flake-parts.url = "github:hercules-ci/flake-parts"; | ||
nixos-flake.url = "github:srid/nixos-flake"; | ||
}; | ||
|
||
outputs = inputs@{ self, ... }: | ||
inputs.flake-parts.lib.mkFlake { inherit inputs; } { | ||
systems = [ "x86_64-linux" "aarch64-darwin" ]; | ||
imports = [ inputs.nixos-flake.flakeModule ]; | ||
|
||
flake = { | ||
# Configurations for Linux (NixOS) machines | ||
nixosConfigurations.ny-ci-nixos = self.nixos-flake.lib.mkLinuxSystem { | ||
nixpkgs.hostPlatform = "x86_64-linux"; | ||
nixos-flake.sshTarget = "admin@ny-ci-nixos"; | ||
imports = [ | ||
./nixos/hardware-configuration.nix | ||
./nixos/configuration.nix | ||
{ | ||
system.stateVersion = "24.05"; | ||
} | ||
# Setup home-manager in NixOS config | ||
self.nixosModules.home-manager | ||
{ | ||
home-manager.users.admin = { | ||
imports = [ self.homeModules.default ]; | ||
home.stateVersion = "24.05"; | ||
}; | ||
} | ||
]; | ||
}; | ||
|
||
# home-manager configuration goes here. | ||
homeModules.default = { pkgs, ... }: { | ||
imports = [ ]; | ||
programs.git.enable = true; | ||
programs.starship.enable = true; | ||
programs.bash.enable = true; | ||
}; | ||
}; | ||
}; | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
default: | ||
@just --list | ||
|
||
deploy: | ||
nix run .#activate ny-ci-nixos | ||
# List hosts | ||
hosts: | ||
ls ./hosts | ||
|
||
# Auto-format source tree | ||
fmt: | ||
nix fmt | ||
|
||
# Deploy the given host (e.g.: `just deploy sambar`) | ||
deploy HOST: | ||
nix run --override-input common ./common ./hosts/{{HOST}}#activate {{HOST}} |