mirror of
https://github.com/Mic92/sops-nix.git
synced 2026-02-22 04:45:29 +08:00
Bump go to 1.25, remove compatibility for 25.05 or older
This commit is contained in:
parent
17eea6f381
commit
5c23dc81a7
13 changed files with 31 additions and 44 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
../modules/home-manager/sops.nix
|
../modules/home-manager/sops.nix
|
||||||
];
|
];
|
||||||
home.stateVersion = "25.05";
|
home.stateVersion = "25.11";
|
||||||
home.username = "sops-user";
|
home.username = "sops-user";
|
||||||
home.homeDirectory = "/home/sops-user";
|
home.homeDirectory = "/home/sops-user";
|
||||||
home.enableNixpkgsReleaseCheck = false;
|
home.enableNixpkgsReleaseCheck = false;
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,7 @@ rec {
|
||||||
inherit vendorHash;
|
inherit vendorHash;
|
||||||
};
|
};
|
||||||
unit-tests = pkgs.callPackage ./pkgs/unit-tests.nix { };
|
unit-tests = pkgs.callPackage ./pkgs/unit-tests.nix { };
|
||||||
}
|
|
||||||
// pkgs.lib.optionalAttrs (pkgs ? buildGo124Module) {
|
|
||||||
lint = pkgs.callPackage ./pkgs/lint.nix {
|
lint = pkgs.callPackage ./pkgs/lint.nix {
|
||||||
inherit sops-install-secrets;
|
inherit sops-install-secrets;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
sha256-MW4McwteXVA4RxkqsHLquFnS3v1zZiXOJ/VFPwAgTC4=
|
sha256-CJal6YSeZtyF9O5lpf37QEGRRPxq4DNcuqf+NaXjUbA=
|
||||||
34
dev/private/flake.lock
generated
34
dev/private/flake.lock
generated
|
|
@ -7,11 +7,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1769872935,
|
"lastModified": 1770164260,
|
||||||
"narHash": "sha256-07HMIGQ/WJeAQJooA7Kkg1SDKxhAiV6eodvOwTX6WKI=",
|
"narHash": "sha256-mQgOAYWlVJyuyXjZN6yxqXWyODvQI5P/UZUCU7IOuYo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "f4ad5068ee8e89e4a7c2e963e10dd35cd77b37b7",
|
"rev": "4fda26500b4539e0a1e3afba9f0e1616bdad4f85",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -27,11 +27,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1768764703,
|
"lastModified": 1770184146,
|
||||||
"narHash": "sha256-5ulSDyOG1U+1sJhkJHYsUOWEsmtLl97O0NTVMvgIVyc=",
|
"narHash": "sha256-DsqnN6LvXmohTRaal7tVZO/AKBuZ02kPBiZKSU4qa/k=",
|
||||||
"owner": "LnL7",
|
"owner": "LnL7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "0fc4e7ac670a0ed874abacf73c4b072a6a58064b",
|
"rev": "0d7874ef7e3ba02d58bebb871e6e29da36fa1b37",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -42,16 +42,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767313136,
|
"lastModified": 1770136044,
|
||||||
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
|
"narHash": "sha256-tlFqNG/uzz2++aAmn4v8J0vAkV3z7XngeIIB3rM3650=",
|
||||||
"ref": "nixos-25.05",
|
"ref": "nixos-25.11",
|
||||||
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
|
"rev": "e576e3c9cf9bad747afcddd9e34f51d18c855b4e",
|
||||||
"shallow": true,
|
"shallow": true,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/NixOS/nixpkgs"
|
"url": "https://github.com/NixOS/nixpkgs"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"ref": "nixos-25.05",
|
"ref": "nixos-25.11",
|
||||||
"shallow": true,
|
"shallow": true,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/NixOS/nixpkgs"
|
"url": "https://github.com/NixOS/nixpkgs"
|
||||||
|
|
@ -59,10 +59,10 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1769740369,
|
"lastModified": 1770141374,
|
||||||
"narHash": "sha256-xKPyJoMoXfXpDM5DFDZDsi9PHArf2k5BJjvReYXoFpM=",
|
"narHash": "sha256-yD4K/vRHPwXbJf5CK3JkptBA6nFWUKNX/jlFp2eKEQc=",
|
||||||
"ref": "nixpkgs-unstable",
|
"ref": "nixpkgs-unstable",
|
||||||
"rev": "6308c3b21396534d8aaeac46179c14c439a89b8a",
|
"rev": "41965737c1797c1d83cfb0b644ed0840a6220bd1",
|
||||||
"shallow": true,
|
"shallow": true,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/NixOS/nixpkgs"
|
"url": "https://github.com/NixOS/nixpkgs"
|
||||||
|
|
@ -90,11 +90,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1769691507,
|
"lastModified": 1770228511,
|
||||||
"narHash": "sha256-8aAYwyVzSSwIhP2glDhw/G0i5+wOrren3v6WmxkVonM=",
|
"narHash": "sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD+Fyxk=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "28b19c5844cc6e2257801d43f2772a4b4c050a1b",
|
"rev": "337a4fe074be1042a35086f15481d763b8ddc0e7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
description = "private inputs";
|
description = "private inputs";
|
||||||
|
|
||||||
inputs.nixpkgs-stable.url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixos-25.05";
|
inputs.nixpkgs-stable.url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixos-25.11";
|
||||||
|
|
||||||
inputs.nixpkgs-unstable.url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixpkgs-unstable";
|
inputs.nixpkgs-unstable.url = "git+https://github.com/NixOS/nixpkgs?shallow=1&ref=nixpkgs-unstable";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@
|
||||||
suffix-version =
|
suffix-version =
|
||||||
version: attrs:
|
version: attrs:
|
||||||
nixpkgs.lib.mapAttrs' (name: value: nixpkgs.lib.nameValuePair (name + version) value) attrs;
|
nixpkgs.lib.mapAttrs' (name: value: nixpkgs.lib.nameValuePair (name + version) value) attrs;
|
||||||
suffix-stable = suffix-version "-25_05";
|
suffix-stable = suffix-version "-25_11";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home-manager = self.legacyPackages.${system}.homeConfigurations.sops.activation-script;
|
home-manager = self.legacyPackages.${system}.homeConfigurations.sops.activation-script;
|
||||||
|
|
@ -107,7 +107,7 @@
|
||||||
// nixpkgs.lib.optionalAttrs pkgs.stdenv.isLinux (suffix-stable tests-stable)
|
// nixpkgs.lib.optionalAttrs pkgs.stdenv.isLinux (suffix-stable tests-stable)
|
||||||
// nixpkgs.lib.optionalAttrs pkgs.stdenv.isDarwin {
|
// nixpkgs.lib.optionalAttrs pkgs.stdenv.isDarwin {
|
||||||
darwin-sops =
|
darwin-sops =
|
||||||
self.darwinConfigurations."sops-${pkgs.hostPlatform.darwinArch}".config.system.build.toplevel;
|
self.darwinConfigurations."sops-${pkgs.stdenv.hostPlatform.darwinArch}".config.system.build.toplevel;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
2
go.mod
2
go.mod
|
|
@ -1,6 +1,6 @@
|
||||||
module github.com/Mic92/sops-nix
|
module github.com/Mic92/sops-nix
|
||||||
|
|
||||||
go 1.24.0
|
go 1.25.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/Mic92/ssh-to-age v0.0.0-20240115094500-460a2109aaf0
|
github.com/Mic92/ssh-to-age v0.0.0-20240115094500-460a2109aaf0
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ let
|
||||||
regularTemplates = cfg.templates;
|
regularTemplates = cfg.templates;
|
||||||
|
|
||||||
withEnvironment = import ./with-environment.nix {
|
withEnvironment = import ./with-environment.nix {
|
||||||
# sops >=3.10.0 now unconditionally searches
|
# sops >=3.10.0 now unconditionally searches
|
||||||
# for an SSH key in $HOME/.ssh/, introduced in #1692 [0]. Since in the
|
# for an SSH key in $HOME/.ssh/, introduced in #1692 [0]. Since in the
|
||||||
# activation script $HOME is never set, it just spits out a slew a
|
# activation script $HOME is never set, it just spits out a slew a
|
||||||
# warnings [1].
|
# warnings [1].
|
||||||
|
|
|
||||||
|
|
@ -2,24 +2,15 @@
|
||||||
makeSetupHook,
|
makeSetupHook,
|
||||||
gnupg,
|
gnupg,
|
||||||
sops,
|
sops,
|
||||||
lib,
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
makeSetupHook {
|
||||||
# FIXME: drop after 23.05
|
|
||||||
propagatedBuildInputs =
|
|
||||||
if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.05") then
|
|
||||||
"deps"
|
|
||||||
else
|
|
||||||
"propagatedBuildInputs";
|
|
||||||
in
|
|
||||||
(makeSetupHook {
|
|
||||||
name = "sops-import-keys-hook";
|
name = "sops-import-keys-hook";
|
||||||
substitutions = {
|
substitutions = {
|
||||||
gpg = "${gnupg}/bin/gpg";
|
gpg = "${gnupg}/bin/gpg";
|
||||||
};
|
};
|
||||||
${propagatedBuildInputs} = [
|
propagatedBuildInputs = [
|
||||||
sops
|
sops
|
||||||
gnupg
|
gnupg
|
||||||
];
|
];
|
||||||
} ./sops-import-keys-hook.bash)
|
} ./sops-import-keys-hook.bash
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
//go:build darwin
|
//go:build darwin
|
||||||
// +build darwin
|
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
buildGo124Module,
|
buildGo125Module,
|
||||||
stdenv,
|
stdenv,
|
||||||
vendorHash,
|
vendorHash,
|
||||||
go,
|
go,
|
||||||
}:
|
}:
|
||||||
buildGo124Module {
|
buildGo125Module {
|
||||||
pname = "sops-install-secrets";
|
pname = "sops-install-secrets";
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
//go:build linux
|
//go:build linux
|
||||||
// +build linux
|
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|
@ -8,8 +7,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
|
||||||
"github.com/moby/sys/mountinfo"
|
"github.com/moby/sys/mountinfo"
|
||||||
|
"golang.org/x/sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
func RuntimeDir() (string, error) {
|
func RuntimeDir() (string, error) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
//go:build linux || darwin
|
//go:build linux || darwin
|
||||||
// +build linux darwin
|
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue