Use Determinate Nix in GitHub Actions.
-
Date: Tue, 26 Aug 2025 12:55:08 -0400
Subject: [PATCH 13/18] Tidy up
---
src/CodeBlock/index.scss | 1 +
src/InstallCTA/InstallForNixOS.tsx | 13 +++++----
src/InstallCTA/UseWithGitHubActions.tsx | 9 +-----
src/InstallCTA/index.scss | 38 ++++++++++++++++---------
src/InstallCTA/index.tsx | 8 ++----
src/sass/_mixins.scss | 6 ++++
6 files changed, 44 insertions(+), 31 deletions(-)
diff --git a/src/CodeBlock/index.scss b/src/CodeBlock/index.scss
index d6b5c7e..d1d463b 100644
--- a/src/CodeBlock/index.scss
+++ b/src/CodeBlock/index.scss
@@ -6,6 +6,7 @@
.code-block {
@include mixins.border(base);
+ @include mixins.margin-y(xl);
.highlight {
@include mixins.border-bottom(base);
diff --git a/src/InstallCTA/InstallForNixOS.tsx b/src/InstallCTA/InstallForNixOS.tsx
index 410c5c1..8f98b3b 100644
--- a/src/InstallCTA/InstallForNixOS.tsx
+++ b/src/InstallCTA/InstallForNixOS.tsx
@@ -15,18 +15,21 @@ nixosConfigurations.workstation = nixpkgs.lib.nixosSystem {
const InstallForNixOS: FC = () => {
return (
<>
-
+ Add Determinate as an input to your flake:
+ Then, include the Determinate NixOS module:
diff --git a/src/InstallCTA/UseWithGitHubActions.tsx b/src/InstallCTA/UseWithGitHubActions.tsx
index ccb5bec..f1a383c 100644
--- a/src/InstallCTA/UseWithGitHubActions.tsx
+++ b/src/InstallCTA/UseWithGitHubActions.tsx
@@ -19,14 +19,7 @@ const UseWithGitHubActions: FC = () => {
return (
<>
Use Determinate Nix in GitHub Actions.
-
+
See our other{" "}
diff --git a/src/InstallCTA/index.scss b/src/InstallCTA/index.scss
index f00f406..9c4f7dc 100644
--- a/src/InstallCTA/index.scss
+++ b/src/InstallCTA/index.scss
@@ -2,12 +2,15 @@
@use "../sass/tokens";
@use "../sass/mixins";
+@use "../sass/functions";
.install-cta {
@include mixins.border(base);
@include mixins.pad(lg);
@include mixins.shadow;
+ width: 100%;
+
.install-cta__header {
font-weight: 600;
font-size: map.get(tokens.$font-size, lg);
@@ -30,21 +33,22 @@
}
}
+.install-cta__body {
+ margin: map.get(tokens.$spacing, xl) 0;
+
+ p {
+ font-size: map.get(tokens.$font-size, base);
+ }
+}
+
.install-cta__links {
display: flex;
flex-direction: row;
+ flex-wrap: wrap;
gap: map.get(tokens.$spacing, base);
list-style-type: none;
- margin-top: map.get(tokens.$padding, lg);
- padding: 0;
-}
-
-.install-cta__body {
- margin: map.get(tokens.$spacing, lg) 0;
-}
-
-.install-cta__tab {
+ padding-top: map.get(tokens.$spacing, base);
}
.install-cta__link {
@@ -56,6 +60,12 @@
border-top: 2px solid
rgba($color: map.get(tokens.$colors, secondary), $alpha: 0);
padding: map.get(tokens.$spacing, lg) map.get(tokens.$spacing, base);
+ @include mixins.transition(color, short);
+
+ color: functions.lighten(map.get(tokens.$brand, black), 30%);
+ border-top: 2px solid
+ rgba($color: map.get(tokens.$colors, secondary), $alpha: 0);
+ padding: map.get(tokens.$spacing, lg) map.get(tokens.$spacing, xs);
svg {
padding-right: map.get(tokens.$padding, base);
@@ -63,13 +73,15 @@
width: auto;
}
- &.install-cta__link--active {
- border-top-color: map.get(tokens.$colors, primary);
+ &:hover {
+ color: map.get(tokens.$brand, very-black);
+ border-top-color: map.get(tokens.$colors, secondary);
}
- &:hover,
+ &.install-cta__link--active,
&:focus {
- border-top-color: map.get(tokens.$colors, secondary);
+ color: map.get(tokens.$brand, ocean-blue);
+ border-top-color: map.get(tokens.$brand, ocean-blue);
}
}
diff --git a/src/InstallCTA/index.tsx b/src/InstallCTA/index.tsx
index ab09a18..151ec93 100644
--- a/src/InstallCTA/index.tsx
+++ b/src/InstallCTA/index.tsx
@@ -58,11 +58,9 @@ const InstallCTA: FC = ({ initialTab }) => {
return (
-
-
- Get Determinate for {activeTab}
-
-
+
+ Get Determinate for {activeTab}
+
diff --git a/src/sass/_mixins.scss b/src/sass/_mixins.scss
index 3a64cf3..5626814 100644
--- a/src/sass/_mixins.scss
+++ b/src/sass/_mixins.scss
@@ -103,6 +103,12 @@
transition-duration: map.get(tokens.$duration, $duration);
}
+@mixin margin-y($size) {
+ $spacing: map.get(tokens.$spacing, $size);
+
+ margin: $spacing 0;
+}
+
@mixin pad($size) {
$padding: map.get(tokens.$padding, $size);
From 1ad8088a2ce505c3d794495ef167ebcb68b2a889 Mon Sep 17 00:00:00 2001
From: Graham Christensen
Date: Tue, 26 Aug 2025 16:21:11 -0400
Subject: [PATCH 14/18] Make the AWS icon look better
---
src/InstallCTA/index.scss | 7 +++++++
src/InstallCTA/index.tsx | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/InstallCTA/index.scss b/src/InstallCTA/index.scss
index 9c4f7dc..cb22c89 100644
--- a/src/InstallCTA/index.scss
+++ b/src/InstallCTA/index.scss
@@ -45,6 +45,8 @@
display: flex;
flex-direction: row;
flex-wrap: wrap;
+ text-align: center;
+ align-items: center;
gap: map.get(tokens.$spacing, base);
list-style-type: none;
@@ -53,6 +55,7 @@
.install-cta__link {
display: flex;
+ text-align: center;
align-items: center;
text-wrap-mode: nowrap;
@@ -73,6 +76,10 @@
width: auto;
}
+ svg.install-cta__icon--apple {
+ height: 30px;
+ }
+
&:hover {
color: map.get(tokens.$brand, very-black);
border-top-color: map.get(tokens.$colors, secondary);
diff --git a/src/InstallCTA/index.tsx b/src/InstallCTA/index.tsx
index 151ec93..59093cd 100644
--- a/src/InstallCTA/index.tsx
+++ b/src/InstallCTA/index.tsx
@@ -28,7 +28,7 @@ const ctaTabs: [InstallTarget, React.FC][] = [
[InstallTarget.MacOS, FaApple],
[InstallTarget.Linux, FaLinux],
[InstallTarget.NixOS, SiNixos],
- [InstallTarget.AWS, FaAws],
+ [InstallTarget.AWS, () => ],
[InstallTarget.GitHub, FaGithub],
];
From 2111385d628da245301b6d8cc2df91a0273b08ff Mon Sep 17 00:00:00 2001
From: Graham Christensen
Date: Tue, 26 Aug 2025 16:29:50 -0400
Subject: [PATCH 15/18] knolling
---
src/Highlight/index.scss | 6 ++---
src/InstallCTA/FindAwsAMIs.tsx | 9 ++++---
src/InstallCTA/index.scss | 44 +++++++++++++++++++++++-----------
src/InstallCTA/index.tsx | 16 ++++++-------
src/Link/index.scss | 2 ++
src/sass/_tokens.scss | 2 +-
6 files changed, 49 insertions(+), 30 deletions(-)
diff --git a/src/Highlight/index.scss b/src/Highlight/index.scss
index f639e31..8b0e470 100644
--- a/src/Highlight/index.scss
+++ b/src/Highlight/index.scss
@@ -4,16 +4,14 @@
@use "../sass/mixins";
// Default values taken from Shiki's 'classic' output type
-$shiki-dark-bg: #24292e;
-$shiki-light-bg: #fff;
.highlight {
text-wrap-mode: wrap;
line-break: anywhere;
- background-color: var(--shiki-dark-bg, map.get(tokens.$code, bg-dark));
+ background-color: map.get(tokens.$code, bg-dark);
@include mixins.light-mode {
- background-color: var(--shiki-light-bg, map.get(tokens.$code, bg-light));
+ background-color: map.get(tokens.$code, bg-light);
}
&.highlight--inline {
diff --git a/src/InstallCTA/FindAwsAMIs.tsx b/src/InstallCTA/FindAwsAMIs.tsx
index 6c7094d..d9506e2 100644
--- a/src/InstallCTA/FindAwsAMIs.tsx
+++ b/src/InstallCTA/FindAwsAMIs.tsx
@@ -1,6 +1,6 @@
import type { FC } from "react";
import CodeBlock from "../CodeBlock";
-import GitHubButton from "../GitHubButton";
+import Link from "../Link";
const code = `aws ec2 describe-images \\
--owners 535002876703 \\
@@ -22,8 +22,11 @@ const FindAwsAMIs: FC = () => {
title={"Search for AMIs"}
/>
- See DeterminateSystems/nixos-amis on GitHub{" "}
-
+ See{" "}
+
+ DeterminateSystems/nixos-amis on GitHub
+
+ .
>
);
diff --git a/src/InstallCTA/index.scss b/src/InstallCTA/index.scss
index cb22c89..6e94eb9 100644
--- a/src/InstallCTA/index.scss
+++ b/src/InstallCTA/index.scss
@@ -6,12 +6,13 @@
.install-cta {
@include mixins.border(base);
- @include mixins.pad(lg);
@include mixins.shadow;
width: 100%;
.install-cta__header {
+ @include mixins.pad(lg);
+
font-weight: 600;
font-size: map.get(tokens.$font-size, lg);
color: map.get(tokens.$brand, light);
@@ -34,6 +35,7 @@
}
.install-cta__body {
+ @include mixins.pad(lg);
margin: map.get(tokens.$spacing, xl) 0;
p {
@@ -42,6 +44,7 @@
}
.install-cta__links {
+ @include mixins.pad(lg);
display: flex;
flex-direction: row;
flex-wrap: wrap;
@@ -50,7 +53,11 @@
gap: map.get(tokens.$spacing, base);
list-style-type: none;
- padding-top: map.get(tokens.$spacing, base);
+ padding-bottom: map.get(tokens.$spacing, base);
+ border-bottom: 1px solid map.get(tokens.$border-color, dark);
+ @include mixins.light-mode {
+ border-bottom: 1px solid map.get(tokens.$border-color, light);
+ }
}
.install-cta__link {
@@ -59,14 +66,14 @@
align-items: center;
text-wrap-mode: nowrap;
- @include mixins.transition(border-top-color, shortish);
- border-top: 2px solid
- rgba($color: map.get(tokens.$colors, secondary), $alpha: 0);
- padding: map.get(tokens.$spacing, lg) map.get(tokens.$spacing, base);
- @include mixins.transition(color, short);
+ @include mixins.transition(border-bottom-color, shortish);
+ @include mixins.transition(color, shortish);
- color: functions.lighten(map.get(tokens.$brand, black), 30%);
- border-top: 2px solid
+ color: functions.darken(map.get(tokens.$brand, white), 15%);
+ @include mixins.light-mode {
+ color: functions.lighten(map.get(tokens.$brand, black), 30%);
+ }
+ border-bottom: 2px solid
rgba($color: map.get(tokens.$colors, secondary), $alpha: 0);
padding: map.get(tokens.$spacing, lg) map.get(tokens.$spacing, xs);
@@ -76,19 +83,28 @@
width: auto;
}
- svg.install-cta__icon--apple {
+ svg.install-cta__icon--aws {
height: 30px;
+ margin-top: 5px;
}
&:hover {
- color: map.get(tokens.$brand, very-black);
- border-top-color: map.get(tokens.$colors, secondary);
+ color: map.get(tokens.$brand, white);
+ border-bottom-color: map.get(tokens.$colors, secondary);
+ @include mixins.light-mode {
+ color: map.get(tokens.$brand, very-black);
+ }
}
&.install-cta__link--active,
&:focus {
- color: map.get(tokens.$brand, ocean-blue);
- border-top-color: map.get(tokens.$brand, ocean-blue);
+ color: map.get(tokens.$brand, sky-blue);
+ border-bottom-color: map.get(tokens.$brand, sky-blue);
+
+ @include mixins.light-mode {
+ color: map.get(tokens.$brand, ocean-blue);
+ border-bottom-color: map.get(tokens.$brand, ocean-blue);
+ }
}
}
diff --git a/src/InstallCTA/index.tsx b/src/InstallCTA/index.tsx
index 59093cd..7a92c81 100644
--- a/src/InstallCTA/index.tsx
+++ b/src/InstallCTA/index.tsx
@@ -27,8 +27,8 @@ export interface InstallCTAProps {
const ctaTabs: [InstallTarget, React.FC][] = [
[InstallTarget.MacOS, FaApple],
[InstallTarget.Linux, FaLinux],
- [InstallTarget.NixOS, SiNixos],
- [InstallTarget.AWS, () => ],
+ [InstallTarget.NixOS, () => ],
+ [InstallTarget.AWS, () => ],
[InstallTarget.GitHub, FaGithub],
];
@@ -58,12 +58,6 @@ const InstallCTA: FC = ({ initialTab }) => {
return (
-
- Get Determinate for {activeTab}
-
-
-
-
{ctaTabs.map(([target, icon]) => (
= ({ initialTab }) => {
/>
))}
+
+ Get Determinate for {activeTab}
+
+
+
+
);
};
diff --git a/src/Link/index.scss b/src/Link/index.scss
index b57d28e..71cd5f2 100644
--- a/src/Link/index.scss
+++ b/src/Link/index.scss
@@ -5,6 +5,8 @@
.link {
color: map.get(tokens.$brand, orange);
+ text-decoration: underline;
+ text-underline-offset: 0.15em;
@include mixins.transition(color, short);
&:hover {
diff --git a/src/sass/_tokens.scss b/src/sass/_tokens.scss
index 039b5b3..94489c2 100644
--- a/src/sass/_tokens.scss
+++ b/src/sass/_tokens.scss
@@ -41,7 +41,7 @@ $colors: (
$code: (
// Default values taken from Shiki's 'classic' output type
- bg-dark: #24292e,
+ bg-dark: #231f20,
bg-light: #fff
);
From 033f2f8e2b0b8c4f70c90a2a91999769ef8b5de6 Mon Sep 17 00:00:00 2001
From: Graham Christensen
Date: Tue, 26 Aug 2025 17:18:40 -0400
Subject: [PATCH 16/18] Make the icons more consistent
---
src/InstallCTA/TabSelector.tsx | 5 +++--
src/InstallCTA/index.scss | 5 -----
src/InstallCTA/index.tsx | 16 ++++++++--------
3 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/src/InstallCTA/TabSelector.tsx b/src/InstallCTA/TabSelector.tsx
index 4998f43..4380a96 100644
--- a/src/InstallCTA/TabSelector.tsx
+++ b/src/InstallCTA/TabSelector.tsx
@@ -1,10 +1,11 @@
import { useCallback, type FC, type MouseEvent } from "react";
import type { InstallTarget } from "./types";
+import type { IconBaseProps } from "react-icons";
export interface TabSelectorProps {
name: InstallTarget;
- icon: FC;
+ icon: FC;
active: boolean;
onClick: () => void;
}
@@ -34,7 +35,7 @@ const TabSelector: FC = ({
}
onClick={handleClick}
>
- {name}
+ {name}
);
diff --git a/src/InstallCTA/index.scss b/src/InstallCTA/index.scss
index 6e94eb9..4ed939a 100644
--- a/src/InstallCTA/index.scss
+++ b/src/InstallCTA/index.scss
@@ -83,11 +83,6 @@
width: auto;
}
- svg.install-cta__icon--aws {
- height: 30px;
- margin-top: 5px;
- }
-
&:hover {
color: map.get(tokens.$brand, white);
border-bottom-color: map.get(tokens.$colors, secondary);
diff --git a/src/InstallCTA/index.tsx b/src/InstallCTA/index.tsx
index 7a92c81..3f4eae0 100644
--- a/src/InstallCTA/index.tsx
+++ b/src/InstallCTA/index.tsx
@@ -1,6 +1,5 @@
import { useState, type FC } from "react";
-import { FaApple, FaLinux, FaAws, FaGithub } from "react-icons/fa6";
-import { SiNixos } from "react-icons/si";
+import { SiGithub, SiLinux, SiApple, SiNixos, SiAmazon } from "react-icons/si";
import TabSelector from "./TabSelector";
import { InstallTarget, detectInstallTarget } from "./types";
@@ -13,6 +12,7 @@ import InstallForNixOS from "./InstallForNixOS";
import MacInstaller from "../MacInstaller";
import "./index.scss";
+import type { IconBaseProps } from "react-icons";
export { InstallTarget as CTAType } from "./types";
@@ -24,12 +24,12 @@ export interface InstallCTAProps {
initialTab?: InstallTarget;
}
-const ctaTabs: [InstallTarget, React.FC][] = [
- [InstallTarget.MacOS, FaApple],
- [InstallTarget.Linux, FaLinux],
- [InstallTarget.NixOS, () => ],
- [InstallTarget.AWS, () => ],
- [InstallTarget.GitHub, FaGithub],
+const ctaTabs: [InstallTarget, React.FC][] = [
+ [InstallTarget.MacOS, SiApple],
+ [InstallTarget.Linux, SiLinux],
+ [InstallTarget.NixOS, SiNixos],
+ [InstallTarget.AWS, SiAmazon],
+ [InstallTarget.GitHub, SiGithub],
];
const ctaComponents: Record = {
From 5ee1512a9aea7f03a768bd68564c40c27a579445 Mon Sep 17 00:00:00 2001
From: Graham Christensen
Date: Tue, 26 Aug 2025 17:25:32 -0400
Subject: [PATCH 17/18] Clean up the MacInstaller icon to match
---
src/MacInstaller/index.scss | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/src/MacInstaller/index.scss b/src/MacInstaller/index.scss
index ae3693b..d1e5881 100644
--- a/src/MacInstaller/index.scss
+++ b/src/MacInstaller/index.scss
@@ -10,13 +10,25 @@
min-width: 15em;
align-items: center;
+ justify-content: center;
background-color: map.get(tokens.$brand, black);
- border: 1px solid map.get(tokens.$brand, magenta);
+ @include mixins.light-mode {
+ background-color: map.get(tokens.$brand, light);
+ }
+
color: map.get(tokens.$brand, white);
+ @include mixins.light-mode {
+ color: map.get(tokens.$brand, black);
+ }
+
+ border: 1px solid map.get(tokens.$brand, magenta);
+
text-decoration: none;
font-family: map.get(tokens.$fonts, sans);
+ font-size: map.get(tokens.$font-size, base);
+ font-weight: 500;
padding: 1rem;
border-radius: 0.5rem;
@@ -25,14 +37,22 @@
&:hover,
&:focus {
+
background-color: color.scale(
map.get(tokens.$brand, magenta),
$blackness: 50%
);
+ @include mixins.light-mode {
+ background-color: color.scale(
+ map.get(tokens.$brand, magenta),
+ $lightness: 80%
+ );
+ }
}
}
.mac-installer__pkg {
flex: 3.5rem 3.5rem auto;
margin-right: 1rem;
+ width: 45px;
}
From 4a0338d7f0562ec0d4f5ed797e73a381f9bca088 Mon Sep 17 00:00:00 2001
From: Graham Christensen
Date: Tue, 26 Aug 2025 17:36:44 -0400
Subject: [PATCH 18/18] Make the cta widget support a version
---
src/InstallCTA/FindAwsAMIs.tsx | 3 +-
src/InstallCTA/InstallCTA.stories.tsx | 70 +++++++++++++++++++++----
src/InstallCTA/InstallForNixOS.tsx | 5 +-
src/InstallCTA/InstallFromCurl.tsx | 14 +++--
src/InstallCTA/UseWithGitHubActions.tsx | 8 +--
src/InstallCTA/index.scss | 5 --
src/InstallCTA/index.tsx | 24 ++++++---
src/MacInstaller/index.scss | 9 ++--
src/MacInstaller/index.tsx | 35 ++++++++-----
9 files changed, 124 insertions(+), 49 deletions(-)
diff --git a/src/InstallCTA/FindAwsAMIs.tsx b/src/InstallCTA/FindAwsAMIs.tsx
index d9506e2..557ac3a 100644
--- a/src/InstallCTA/FindAwsAMIs.tsx
+++ b/src/InstallCTA/FindAwsAMIs.tsx
@@ -1,6 +1,7 @@
import type { FC } from "react";
import CodeBlock from "../CodeBlock";
import Link from "../Link";
+import type { TabProps } from ".";
const code = `aws ec2 describe-images \\
--owners 535002876703 \\
@@ -8,7 +9,7 @@ const code = `aws ec2 describe-images \\
"Name=architecture,Values=x86_64,arm64" \\
--query "Images | sort_by(@, &CreationDate) | [-1]"`;
-const FindAwsAMIs: FC = () => {
+const FindAwsAMIs: FC = (_: TabProps) => {
return (
<>
diff --git a/src/InstallCTA/InstallCTA.stories.tsx b/src/InstallCTA/InstallCTA.stories.tsx
index 0c24908..1910150 100644
--- a/src/InstallCTA/InstallCTA.stories.tsx
+++ b/src/InstallCTA/InstallCTA.stories.tsx
@@ -6,7 +6,21 @@ import { InstallTarget } from "./types";
const meta = {
title: "Composite/InstallCTA",
component: InstallCTA,
- argTypes: {},
+ argTypes: {
+ initialTab: {
+ type: "string",
+ options: [
+ InstallTarget.AWS,
+ InstallTarget.GitHub,
+ InstallTarget.Linux,
+ InstallTarget.MacOS,
+ InstallTarget.NixOS,
+ ],
+ },
+ version: {
+ type: "string",
+ },
+ },
} satisfies Meta;
export default meta;
@@ -16,35 +30,73 @@ export const Default: Story = {
args: {},
};
-export const MacOS: Story = {
- name: "macOS",
+export const MacOSLatest: Story = {
+ name: "macOS Tagged",
+ args: {
+ initialTab: InstallTarget.MacOS,
+ },
+};
+
+export const LinuxLatest: Story = {
+ args: {
+ initialTab: InstallTarget.Linux,
+ },
+};
+
+export const AWSLatest: Story = {
+ args: {
+ initialTab: InstallTarget.AWS,
+ },
+};
+
+export const GitHubLatest: Story = {
+ name: "GitHub Latest",
+ args: {
+ initialTab: InstallTarget.GitHub,
+ },
+};
+
+export const NixOSLatest: Story = {
+ name: "NixOS Latest",
+ args: {
+ initialTab: InstallTarget.NixOS,
+ },
+};
+
+export const MacOSTagged: Story = {
+ name: "macOS Tagged",
args: {
initialTab: InstallTarget.MacOS,
+ version: "3.8.6",
},
};
-export const Linux: Story = {
+export const LinuxTagged: Story = {
args: {
initialTab: InstallTarget.Linux,
+ version: "3.8.6",
},
};
-export const AWS: Story = {
+export const AWSTagged: Story = {
args: {
initialTab: InstallTarget.AWS,
+ version: "3.8.6",
},
};
-export const GitHub: Story = {
- name: "GitHub",
+export const GitHubTagged: Story = {
+ name: "GitHub Tagged",
args: {
initialTab: InstallTarget.GitHub,
+ version: "3.8.6",
},
};
-export const NixOS: Story = {
- name: "NixOS",
+export const NixOSTagged: Story = {
+ name: "NixOS Tagged",
args: {
initialTab: InstallTarget.NixOS,
+ version: "3.8.6",
},
};
diff --git a/src/InstallCTA/InstallForNixOS.tsx b/src/InstallCTA/InstallForNixOS.tsx
index 8f98b3b..848f898 100644
--- a/src/InstallCTA/InstallForNixOS.tsx
+++ b/src/InstallCTA/InstallForNixOS.tsx
@@ -1,6 +1,7 @@
import type { FC } from "react";
import CodeBlock from "../CodeBlock";
import Link from "../Link";
+import type { TabProps } from ".";
const code = `
nixosConfigurations.workstation = nixpkgs.lib.nixosSystem {
@@ -12,14 +13,14 @@ nixosConfigurations.workstation = nixpkgs.lib.nixosSystem {
};
`;
-const InstallForNixOS: FC = () => {
+const InstallForNixOS: FC = ({ version }: TabProps) => {
return (
<>
Add Determinate as an input to your flake:
diff --git a/src/InstallCTA/InstallFromCurl.tsx b/src/InstallCTA/InstallFromCurl.tsx
index 0ef66e3..a163d3f 100644
--- a/src/InstallCTA/InstallFromCurl.tsx
+++ b/src/InstallCTA/InstallFromCurl.tsx
@@ -1,11 +1,17 @@
import { type FC } from "react";
import CodeBlock from "../CodeBlock";
+import type { TabProps } from ".";
-const installScript =
- "curl -fsSL https://install.determinate.systems/nix | sh -s -- install --determinate";
+const installScript = (version: string | undefined) => {
+ if (typeof version === "undefined") {
+ return "curl -fsSL https://install.determinate.systems/nix | sh -s -- install --determinate";
+ } else {
+ return `curl -fsSL https://install.determinate.systems/nix/tag/v${version} | sh -s -- install --determinate`;
+ }
+};
-const InstallFromCurl: FC = () => (
+const InstallFromCurl: FC = ({ version }: TabProps) => (
<>
Use the Determinate Nix Installer CLI for Linux, including Windows
@@ -14,7 +20,7 @@ const InstallFromCurl: FC = () => (
>
diff --git a/src/InstallCTA/UseWithGitHubActions.tsx b/src/InstallCTA/UseWithGitHubActions.tsx
index f1a383c..2319249 100644
--- a/src/InstallCTA/UseWithGitHubActions.tsx
+++ b/src/InstallCTA/UseWithGitHubActions.tsx
@@ -1,8 +1,10 @@
import type { FC } from "react";
import Link from "../Link";
import CodeBlock from "../CodeBlock";
+import type { TabProps } from ".";
-const code = `
+const UseWithGitHubActions: FC = ({ version }: TabProps) => {
+ const code = `
on:
push:
jobs:
@@ -10,12 +12,10 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- - uses: DeterminateSystems/determinate-nix-action@v3
+ - uses: DeterminateSystems/determinate-nix-action@v${version || "3"}
- run: nix build .#
`;
-
-const UseWithGitHubActions: FC = () => {
return (
<>
Use Determinate Nix in GitHub Actions.
diff --git a/src/InstallCTA/index.scss b/src/InstallCTA/index.scss
index 4ed939a..ae2a4e6 100644
--- a/src/InstallCTA/index.scss
+++ b/src/InstallCTA/index.scss
@@ -53,11 +53,6 @@
gap: map.get(tokens.$spacing, base);
list-style-type: none;
- padding-bottom: map.get(tokens.$spacing, base);
- border-bottom: 1px solid map.get(tokens.$border-color, dark);
- @include mixins.light-mode {
- border-bottom: 1px solid map.get(tokens.$border-color, light);
- }
}
.install-cta__link {
diff --git a/src/InstallCTA/index.tsx b/src/InstallCTA/index.tsx
index 3f4eae0..1c17e17 100644
--- a/src/InstallCTA/index.tsx
+++ b/src/InstallCTA/index.tsx
@@ -22,6 +22,18 @@ export interface InstallCTAProps {
* This is only applicable for the initial render.
*/
initialTab?: InstallTarget;
+
+ /**
+ * Version of Determinate to pin to, when possible
+ */
+ version?: string;
+}
+
+export interface TabProps {
+ /**
+ * Version of Determinate to pin to, when possible
+ */
+ version?: string;
}
const ctaTabs: [InstallTarget, React.FC][] = [
@@ -32,7 +44,7 @@ const ctaTabs: [InstallTarget, React.FC][] = [
[InstallTarget.GitHub, SiGithub],
];
-const ctaComponents: Record = {
+const ctaComponents: Record> = {
[InstallTarget.MacOS]: MacInstaller,
[InstallTarget.Linux]: InstallFromCurl,
[InstallTarget.AWS]: FindAwsAMIs,
@@ -45,7 +57,7 @@ const ctaComponents: Record = {
*
* Due to the numerous options available,
*/
-const InstallCTA: FC = ({ initialTab }) => {
+const InstallCTA: FC = ({ initialTab, version }) => {
const [activeTab, setActiveTab] = useState(() => {
if (initialTab) {
return initialTab;
@@ -58,6 +70,9 @@ const InstallCTA: FC = ({ initialTab }) => {
return (
+
+ Get Determinate{version && ` v${version}`}
+
{ctaTabs.map(([target, icon]) => (
= ({ initialTab }) => {
/>
))}
-
- Get Determinate for {activeTab}
-
-
+
);
diff --git a/src/MacInstaller/index.scss b/src/MacInstaller/index.scss
index d1e5881..db14d8e 100644
--- a/src/MacInstaller/index.scss
+++ b/src/MacInstaller/index.scss
@@ -37,16 +37,15 @@
&:hover,
&:focus {
-
background-color: color.scale(
map.get(tokens.$brand, magenta),
$blackness: 50%
);
@include mixins.light-mode {
- background-color: color.scale(
- map.get(tokens.$brand, magenta),
- $lightness: 80%
- );
+ background-color: color.scale(
+ map.get(tokens.$brand, magenta),
+ $lightness: 80%
+ );
}
}
}
diff --git a/src/MacInstaller/index.tsx b/src/MacInstaller/index.tsx
index 2ecc7cc..79df065 100644
--- a/src/MacInstaller/index.tsx
+++ b/src/MacInstaller/index.tsx
@@ -4,21 +4,30 @@ import url from "./macPackageData";
import "./index.scss";
+export interface MacInstallerProps {
+ version?: string;
+}
+
/**
* A call to action for downloading the Determinate Nix universal Mac installer.
*/
-const MacInstaller: FC = () => (
-
-
- Download Determinate Nix
-
-);
+const MacInstaller: FC = ({
+ version,
+}: MacInstallerProps) => {
+ const urlPath = version ? `tag/v${version}` : `stable`;
+ return (
+
+
+ Download Determinate Nix{version && ` v${version}`}
+
+ );
+};
export default MacInstaller;