diff --git a/flake.lock b/flake.lock index eac468d..8c59b44 100644 --- a/flake.lock +++ b/flake.lock @@ -231,15 +231,16 @@ ] }, "locked": { - "lastModified": 1701071203, - "narHash": "sha256-lQywA7QU/vzTdZ1apI0PfgCWNyQobXUYghVrR5zuIeM=", + "lastModified": 1700814205, + "narHash": "sha256-lWqDPKHRbQfi+zNIivf031BUeyciVOtwCwTjyrhDB5g=", "owner": "nix-community", "repo": "home-manager", - "rev": "db1878f013b52ba5e4034db7c1b63e8d04173a86", + "rev": "aeb2232d7a32530d3448318790534d196bf9427a", "type": "github" }, "original": { "owner": "nix-community", + "ref": "release-23.11", "repo": "home-manager", "type": "github" } @@ -368,7 +369,9 @@ "luasnip": "luasnip", "neoformat": "neoformat", "nix2lua": "nix2lua", - "nixpkgs": "nixpkgs", + "nixpkgs": [ + "nixpkgs-unstable" + ], "nlsp-settings-nvim": "nlsp-settings-nvim", "nvim-cmp": "nvim-cmp", "nvim-colorizer": "nvim-colorizer", @@ -384,11 +387,11 @@ "theme": "theme" }, "locked": { - "lastModified": 1698759517, - "narHash": "sha256-SqrybSLa0G42PEaoRWsivFuyiD/c+gBGRog1vt7LFJY=", + "lastModified": 1701345648, + "narHash": "sha256-Ta/5S6suVBUsgxY4hRWuQCYkOWi0V4bquVsKHkMQn1I=", "ref": "refs/heads/main", - "rev": "ddc7c23ef6cbfdcde81325b9af9fce0313c5e4bc", - "revCount": 111, + "rev": "542364e035e3c6fd859df3b527ecbfaf24f0c29d", + "revCount": 112, "type": "git", "url": "https://git.pleshevski.ru/mynix/neovim" }, @@ -454,16 +457,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1695806987, - "narHash": "sha256-fX5kGs66NZIxCMcpAGIpxuftajHL8Hil1vjHmjjl118=", + "lastModified": 1701156937, + "narHash": "sha256-jpMJOFvOTejx211D8z/gz0ErRtQPy6RXxgD2ZB86mso=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f3dab3509afca932f3f4fd0908957709bb1c1f57", + "rev": "7c4c20509c4363195841faa6c911777a134acdf3", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-23.11", "repo": "nixpkgs", "type": "github" } @@ -485,11 +488,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1701174899, - "narHash": "sha256-1W+FMe8mWsJKXoBc+QgKmEeRj33kTFnPq7XCjU+bfnA=", + "lastModified": 1701237617, + "narHash": "sha256-Ryd8xpNDY9MJnBFDYhB37XSFIxCPVVVXAbInNPa95vs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "010c7296f3b19a58b206fdf7d68d75a5b0a09e9e", + "rev": "85306ef2470ba705c97ce72741d56e42d0264015", "type": "github" }, "original": { @@ -499,22 +502,6 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1701156937, - "narHash": "sha256-jpMJOFvOTejx211D8z/gz0ErRtQPy6RXxgD2ZB86mso=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "7c4c20509c4363195841faa6c911777a134acdf3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, "nlsp-settings-nvim": { "flake": false, "locked": { @@ -669,7 +656,7 @@ "mailserver": "mailserver", "myneovim": "myneovim", "nil": "nil", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", "vnetod": "vnetod", "wired": "wired", diff --git a/flake.nix b/flake.nix index c3d4cd4..cb66d77 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,7 @@ }; home-manager = { - url = "github:nix-community/home-manager"; + url = "github:nix-community/home-manager/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -31,6 +31,7 @@ # my neovim configuration myneovim = { url = "git+https://git.pleshevski.ru/mynix/neovim"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.flake-utils.follows = "flake-utils"; }; @@ -120,8 +121,6 @@ }; }) // { - overlays.default = final: prev: import ./packages { inherit (prev) lib callPackage; }; - nixosConfigurations = nixpkgs.lib.mapAttrs (hostname: { system diff --git a/home/modules/dev_tools.nix b/home/modules/dev_tools.nix index b99bf10..457bf16 100644 --- a/home/modules/dev_tools.nix +++ b/home/modules/dev_tools.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - exaPackage = pkgs.exa.override { gitSupport = false; }; + exaPackage = pkgs.unstable.eza.override { gitSupport = true; }; in { - programs.exa = { + programs.eza = { enable = true; package = exaPackage; }; diff --git a/home/users/jan/default.nix b/home/users/jan/default.nix index 0f1167d..c056e17 100644 --- a/home/users/jan/default.nix +++ b/home/users/jan/default.nix @@ -31,7 +31,7 @@ in (lib.mkIf config.services.kubo.enable "ipfs") ]; shell = pkgs.zsh; - passwordFile = config.age.secrets.users-jan-passfile.path; + hashedPasswordFile = config.age.secrets.users-jan-passfile.path; openssh.authorizedKeys.keys = data.publicKeys.users.jan; }; diff --git a/home/users/nas/default.nix b/home/users/nas/default.nix index 088f95b..ec9ab90 100644 --- a/home/users/nas/default.nix +++ b/home/users/nas/default.nix @@ -18,7 +18,7 @@ users.users.nas = { isNormalUser = true; shell = pkgs.zsh; - passwordFile = config.age.secrets.users-nas-passfile.path; + hashedPasswordFile = config.age.secrets.users-nas-passfile.path; }; home-manager.users.nas = { lib, ... }: { diff --git a/nixos/modules/nix.nix b/nixos/modules/nix.nix index 3714f51..b547819 100644 --- a/nixos/modules/nix.nix +++ b/nixos/modules/nix.nix @@ -29,7 +29,6 @@ in (pkg: elem (lib.getName pkg) cfg.allowUnfreePackages); nixpkgs.overlays = lib.mkBefore [ - inputs.self.overlays.default (final: prev: { unstable = import inputs.nixpkgs-unstable { inherit (config.nixpkgs) config overlays system; diff --git a/nixos/shared/fonts.nix b/nixos/shared/fonts.nix index 93a55d8..ab8a62b 100644 --- a/nixos/shared/fonts.nix +++ b/nixos/shared/fonts.nix @@ -2,8 +2,8 @@ { fonts = { - enableDefaultFonts = true; - fonts = with pkgs; [ + enableDefaultPackages = true; + packages = with pkgs; [ ubuntu_font_family fira-code fira-code-symbols diff --git a/packages/default.nix b/packages/default.nix deleted file mode 100644 index 027286f..0000000 --- a/packages/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ callPackage, ... }: - -(import ./woodpecker { inherit callPackage; }) diff --git a/packages/woodpecker/agent.nix b/packages/woodpecker/agent.nix deleted file mode 100644 index 2865711..0000000 --- a/packages/woodpecker/agent.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ lib, buildGoModule, callPackage, fetchFromGitHub }: -let - common = callPackage ./common.nix { }; -in -buildGoModule { - pname = "woodpecker-agent"; - inherit (common) version src ldflags postBuild; - vendorSha256 = null; - - subPackages = "cmd/agent"; - - CGO_ENABLED = 0; - - meta = common.meta // { - description = "Woodpecker Continuous Integration agent"; - }; -} diff --git a/packages/woodpecker/cli.nix b/packages/woodpecker/cli.nix deleted file mode 100644 index b5eda9e..0000000 --- a/packages/woodpecker/cli.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ lib, buildGoModule, callPackage, fetchFromGitHub }: -let - common = callPackage ./common.nix { }; -in -buildGoModule { - pname = "woodpecker-cli"; - inherit (common) version src ldflags postBuild; - vendorSha256 = null; - - subPackages = "cmd/cli"; - - CGO_ENABLED = 0; - - meta = common.meta // { - description = "Command line client for the Woodpecker Continuous Integration server"; - }; -} diff --git a/packages/woodpecker/common.nix b/packages/woodpecker/common.nix deleted file mode 100644 index e6b4c36..0000000 --- a/packages/woodpecker/common.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ lib, fetchFromGitea }: -let - version = "ef1f27d5e3fae7ae6278717f33dde61778a302d1"; - srcSha256 = "sha256-4m9+SC4aMU8AVwrgdDoNFf02mh4R6PLmgnGQ2K8dEuk="; - yarnSha256 = "sha256-DZHwITEG+d3Xtj2k4FaWTEFNjJtX7rD0OvG2uuv6xH0="; -in -{ - inherit version yarnSha256; - - src = fetchFromGitea { - domain = "git.pleshevski.ru"; - owner = "infra"; - repo = "woodpecker"; - rev = version; - sha256 = srcSha256; - }; - - postBuild = '' - cd $GOPATH/bin - for f in *; do - mv -- "$f" "woodpecker-$f" - done - cd - - ''; - - ldflags = [ - "-s" - "-w" - "-X github.com/woodpecker-ci/woodpecker/version.Version=next" - ]; - - meta = with lib; { - homepage = "https://woodpecker-ci.org/"; - license = licenses.asl20; - maintainers = with maintainers; [ ambroisie techknowlogick ]; - }; -} diff --git a/packages/woodpecker/default.nix b/packages/woodpecker/default.nix deleted file mode 100644 index c0028db..0000000 --- a/packages/woodpecker/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ callPackage }: - -{ - woodpecker-agent = callPackage ./agent.nix { }; - - woodpecker-cli = callPackage ./cli.nix { }; - - woodpecker-server = callPackage ./server.nix { - woodpecker-frontend = callPackage ./frontend.nix { }; - }; -} diff --git a/packages/woodpecker/frontend.nix b/packages/woodpecker/frontend.nix deleted file mode 100644 index 78a23b3..0000000 --- a/packages/woodpecker/frontend.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ callPackage, fetchYarnDeps, mkYarnPackage }: - -let - common = callPackage ./common.nix { }; -in -mkYarnPackage { - pname = "woodpecker-frontend"; - inherit (common) version; - - src = "${common.src}/web"; - - packageJSON = ./woodpecker-package.json; - offlineCache = fetchYarnDeps { - yarnLock = "${common.src}/web/yarn.lock"; - sha256 = common.yarnSha256; - }; - - patchPhase = '' - cd src/assets/locales - rm $(ls | grep -v en.json) - cd - - ''; - - buildPhase = '' - runHook preBuild - - yarn build - - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - - cp -R deps/woodpecker-ci/dist $out - echo "${common.version}" > "$out/version" - - runHook postInstall - ''; - - # Do not attempt generating a tarball for woodpecker-frontend again. - doDist = false; - - meta = common.meta // { - description = "Woodpecker Continuous Integration server frontend"; - }; -} diff --git a/packages/woodpecker/server.nix b/packages/woodpecker/server.nix deleted file mode 100644 index d974126..0000000 --- a/packages/woodpecker/server.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ lib, buildGoModule, callPackage, fetchFromGitHub, woodpecker-frontend }: -let - common = callPackage ./common.nix { }; -in -buildGoModule { - pname = "woodpecker-server"; - inherit (common) version src ldflags postBuild; - vendorSha256 = null; - - postPatch = '' - cp -r ${woodpecker-frontend} web/dist - ''; - - subPackages = "cmd/server"; - - CGO_ENABLED = 1; - - passthru = { - inherit woodpecker-frontend; - - updateScript = ./update.sh; - }; - - meta = common.meta // { - description = "Woodpecker Continuous Integration server"; - }; -} diff --git a/packages/woodpecker/update.sh b/packages/woodpecker/update.sh deleted file mode 100755 index b60e850..0000000 --- a/packages/woodpecker/update.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p wget prefetch-yarn-deps nix-prefetch-git jq - -# shellcheck shell=bash - -function help () { - echo "Regenerates packaging data for the woodpecker packages." - echo "Usage: $0 " - exit 1 -} - -if [ -n "$GITHUB_TOKEN" ]; then - TOKEN_ARGS=(--header "Authorization: token $GITHUB_TOKEN") -fi - - -if [[ $# -gt 1 || $1 == -* ]]; then - help -fi - -set -x - -cd "$(dirname "$0")" -version="$1" - -set -euo pipefail - -if [ -z "$version" ]; then - help -fi - -# Woodpecker repository -src_hash=$(nix-prefetch-git --url https://git.pleshevski.ru/infra/woodpecker --rev "${version}" | jq -r .sha256) - -# Front-end dependencies -woodpecker_src="https://git.pleshevski.ru/infra/woodpecker/raw/$version" -wget "${TOKEN_ARGS[@]}" "$woodpecker_src/web/package.json" -O woodpecker-package.json - -web_tmpdir=$(mktemp -d) -trap 'rm -rf "$web_tmpdir"' EXIT -pushd "$web_tmpdir" -wget "${TOKEN_ARGS[@]}" "$woodpecker_src/web/yarn.lock" -yarn_hash=$(prefetch-yarn-deps yarn.lock) -popd - -# Use friendlier hashes -src_hash=$(nix hash to-sri --type sha256 "$src_hash") -yarn_hash=$(nix hash to-sri --type sha256 "$yarn_hash") - -sed -i -E -e "s#version = \".*\"#version = \"$version\"#" common.nix -sed -i -E -e "s#srcSha256 = \".*\"#srcSha256 = \"$src_hash\"#" common.nix -sed -i -E -e "s#yarnSha256 = \".*\"#yarnSha256 = \"$yarn_hash\"#" common.nix diff --git a/packages/woodpecker/woodpecker-package.json b/packages/woodpecker/woodpecker-package.json deleted file mode 100644 index 08210db..0000000 --- a/packages/woodpecker/woodpecker-package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "woodpecker-ci", - "author": "Woodpecker CI", - "version": "0.0.0", - "license": "Apache-2.0", - "engines": { - "node": ">=14" - }, - "scripts": { - "start": "vite", - "build": "vite build", - "serve": "vite preview", - "lint": "eslint --max-warnings 0 --ext .js,.ts,.vue,.json .", - "formatcheck": "prettier -c .", - "format:fix": "prettier --write .", - "typecheck": "vue-tsc --noEmit", - "test": "echo 'No tests configured' && exit 0" - }, - "dependencies": { - "@intlify/unplugin-vue-i18n": "^0.9.2", - "@kyvg/vue3-notification": "^2.9.0", - "@vueuse/core": "^9.13.0", - "ansi_up": "^5.1.0", - "dayjs": "^1.11.7", - "floating-vue": "^2.0.0-beta.20", - "fuse.js": "^6.6.2", - "humanize-duration": "^3.28.0", - "javascript-time-ago": "^2.5.9", - "lodash": "^4.17.21", - "node-emoji": "^1.11.0", - "pinia": "^2.0.33", - "prismjs": "^1.29.0", - "vue": "^3.2.47", - "vue-i18n": "^9.2.2", - "vue-router": "^4.1.6" - }, - "devDependencies": { - "@iconify/json": "^2.2.36", - "@types/humanize-duration": "^3.27.1", - "@types/javascript-time-ago": "^2.0.3", - "@types/lodash": "^4.14.191", - "@types/node": "^18.15.3", - "@types/node-emoji": "^1.8.2", - "@types/prismjs": "^1.26.0", - "@typescript-eslint/eslint-plugin": "^5.55.0", - "@typescript-eslint/parser": "^5.55.0", - "@vitejs/plugin-vue": "^4.1.0", - "@vue/compiler-sfc": "^3.2.47", - "eslint": "^8.36.0", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-airbnb-typescript": "^17.0.0", - "eslint-config-prettier": "^8.7.0", - "eslint-plugin-import": "^2.27.5", - "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-simple-import-sort": "^10.0.0", - "eslint-plugin-vue": "^9.9.0", - "eslint-plugin-vue-scoped-css": "^2.4.0", - "prettier": "^2.8.5", - "typescript": "5.0.2", - "unplugin-icons": "^0.15.3", - "unplugin-vue-components": "^0.24.1", - "vite": "^4.2.0", - "vite-plugin-prismjs": "^0.0.8", - "vite-plugin-windicss": "^1.8.10", - "vite-svg-loader": "^4.0.0", - "vue-eslint-parser": "^9.1.0", - "vue-tsc": "^1.2.0", - "windicss": "^3.5.6" - } -}