Skip to content

Commit

Permalink
Upgrade to 23.11 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany authored Jan 19, 2024
1 parent 6b39a62 commit 5e645bb
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: cachix/install-nix-action@v22
with:
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"
nix_path: nixpkgs=channel:nixos-23.05
nix_path: nixpkgs=channel:nixos-23.11

- name: build
run: NIXPKGS_ALLOW_UNFREE=1 nix build --impure
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Packages [kolide/launcher](https://github.com/kolide/launcher) for Nix.

## Developing and testing in a VM

Create a VM using a NixOS 23.05 image with flakes enabled and SSH to the new VM.
Create a VM using a NixOS 23.11 image with flakes enabled and SSH to the new VM.

Make a directory for the launcher flake and copy your changes to `flake.nix` and `flake.lock` into it.
Make the subdirectory `modules/kolide-launcher` and copy your changes to `default.nix` into it.
Expand Down
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
description = "Kolide launcher";

inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";

outputs = { self, nixpkgs }: {
packages.x86_64-linux.kolide-launcher =
Expand Down
20 changes: 19 additions & 1 deletion modules/kolide-launcher/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@ in
itself and its osquery installation: one of stable, nightly, beta, or alpha.
'';
};

autoupdateInterval = mkOption {
type = types.str;
default = "1h";
description = ''
The interval to check for launcher and osqueryd updates.
'';
};

autoupdaterInitialDelay = mkOption {
type = types.str;
default = "1h";
description = ''
Initial autoupdater subprocess delay.
'';
};
};

config = mkIf cfg.enable {
Expand All @@ -71,7 +87,9 @@ in
--enroll_secret_path ${cfg.enrollSecretDirectory}/secret \
--update_channel ${cfg.updateChannel} \
--transport jsonrpc \
--autoupdate
--autoupdate \
--autoupdate_interval ${cfg.autoupdateInterval} \
--autoupdater_initial_delay ${cfg.autoupdaterInitialDelay}
'';
Restart = "on-failure";
RestartSec = 3;
Expand Down
6 changes: 3 additions & 3 deletions tests/kolide-launcher.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

let
nixpkgs = builtins.fetchTarball {
url = "https://github.com/nixOS/nixpkgs/archive/23.05.tar.gz";
sha256 = "sha256:10wn0l08j9lgqcw8177nh2ljrnxdrpri7bp0g7nvrsn9rkawvlbf";
url = "https://github.com/nixOS/nixpkgs/archive/23.11.tar.gz";
sha256 = "sha256:1ndiv385w1qyb3b18vw13991fzb9wg4cl21wglk89grsfsnra41k";
};
pkgs = import nixpkgs { config = {}; overlays = []; };
in
Expand Down Expand Up @@ -37,7 +37,7 @@ pkgs.nixosTest {
hardware.pulseaudio.enable = true;

services.kolide-launcher.enable = true;
system.stateVersion = "23.05";
system.stateVersion = "23.11";
};

testScript = { nodes, ... }:
Expand Down

0 comments on commit 5e645bb

Please sign in to comment.