mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2024-12-28 09:38:56 +01:00
Merge pull request #59 from ryan4yin/nixos-23.11
feat: bump nixos's version to 23.11
This commit is contained in:
commit
311cd74cc5
@ -52,7 +52,7 @@ In your system's `flake.nix`, add a new outputs named `colmena`. A simple exampl
|
||||
```nix{11-34}
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
# ...
|
||||
};
|
||||
|
@ -67,7 +67,7 @@ If you want to set `pkgs` to a cross-compilation toolchain globally in a flake,
|
||||
description = "NixOS running on LicheePi 4A";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, ... }: {
|
||||
@ -118,7 +118,7 @@ As for `flake.nix`, its setting method is very simple, even simpler than the set
|
||||
description = "NixOS running on LicheePi 4A";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, ... }: {
|
||||
@ -194,7 +194,7 @@ So how to use this method in Flakes? The example `flake.nix` is as follows:
|
||||
description = "NixOS running on LicheePi 4A";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05-small";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11-small";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }:
|
||||
@ -227,7 +227,7 @@ To avoid this problem, a better way is to create a new `pkgs` instance, and only
|
||||
description = "NixOS running on LicheePi 4A";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05-small";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11-small";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }: let
|
||||
|
@ -76,7 +76,7 @@ Here is a `flake.nix` that defines a development environment with Node.js 18 ins
|
||||
description = "A Nix-flake-based Node.js development environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
};
|
||||
|
||||
outputs = { self , nixpkgs ,... }: let
|
||||
@ -127,7 +127,7 @@ Here is an example:
|
||||
description = "A Nix-flake-based Node.js development environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
};
|
||||
|
||||
outputs = { self , nixpkgs ,... }: let
|
||||
|
@ -9,7 +9,7 @@ An example of kernel development with `flake.nix`.
|
||||
description = "NixOS running on LicheePi 4A";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05-small";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11-small";
|
||||
|
||||
# custom kernel's source
|
||||
thead-kernel = {
|
||||
|
@ -13,8 +13,8 @@ Here's an example of how you can add multiple nixpkgs inputs, each using a diffe
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
# Latest stable branch of nixpkgs, used for version rollback
|
||||
# The current latest version is 23.05
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
# The current latest version is 23.11
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
# You can also use a specific git commit hash to lock the version
|
||||
nixpkgs-fd40cef8d.url = "github:nixos/nixpkgs/fd40cef8d797670e203a27a91e4b8e6decf0b90c";
|
||||
|
@ -217,7 +217,7 @@ To test the usage of `lib.mkBefore` and `lib.mkAfter`, let's create a simple Fla
|
||||
description = "Ryan's NixOS Flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs: {
|
||||
|
@ -78,7 +78,7 @@ Note that the copied template cannot be used directly. You need to modify it to
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
# home-manager, used for managing user configuration
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.05";
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
# The `follows` keyword in inputs is used for inheritance.
|
||||
# Here, `inputs.nixpkgs` of home-manager is kept consistent with
|
||||
# the `inputs.nixpkgs` of the current flake,
|
||||
@ -193,8 +193,8 @@ First, we need to add Helix as an input in `flake.nix`:
|
||||
inputs = {
|
||||
# ...
|
||||
|
||||
# Helix editor, using version 23.05
|
||||
helix.url = "github:helix-editor/helix/23.05";
|
||||
# Helix editor, version - 23.10
|
||||
helix.url = "github:helix-editor/helix/23.10";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, ... }: {
|
||||
|
@ -160,7 +160,7 @@ According to the official [Home Manager Manual](https://nix-community.github.io/
|
||||
# You can update home Manager without changing this value. See
|
||||
# the home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
home.stateVersion = "23.05";
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
# Let home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
@ -52,7 +52,7 @@ ssh-add ~/.ssh/your-private-key
|
||||
```nix{11-34}
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
# ...
|
||||
};
|
||||
|
@ -68,7 +68,7 @@ pkgsCross.mmix
|
||||
description = "NixOS running on LicheePi 4A";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, ... }: {
|
||||
@ -119,7 +119,7 @@ pkgsCross.mmix
|
||||
description = "NixOS running on LicheePi 4A";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, ... }: {
|
||||
@ -194,7 +194,7 @@ nix-repl> pkgs.pkgsCross.riscv64.stdenv.cc
|
||||
description = "NixOS running on LicheePi 4A";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05-small";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11-small";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }:
|
||||
@ -227,7 +227,7 @@ nix-repl> pkgs.pkgsCross.riscv64.stdenv.cc
|
||||
description = "NixOS running on LicheePi 4A";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05-small";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11-small";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }: let
|
||||
|
@ -80,7 +80,7 @@ stdenv.mkDerivation ({
|
||||
description = "A Nix-flake-based Node.js development environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
};
|
||||
|
||||
outputs = { self , nixpkgs ,... }: let
|
||||
@ -131,7 +131,7 @@ stdenv.mkDerivation ({
|
||||
description = "A Nix-flake-based Node.js development environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
};
|
||||
|
||||
outputs = { self , nixpkgs ,... }: let
|
||||
|
@ -9,7 +9,7 @@
|
||||
description = "NixOS running on LicheePi 4A";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05-small";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11-small";
|
||||
|
||||
# custom kernel's source
|
||||
thead-kernel = {
|
||||
|
@ -15,8 +15,8 @@
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
# 最新 stable 分支的 nixpkgs,用于回退个别软件包的版本
|
||||
# 当前最新版本为 23.05
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
# 当前最新版本为 23.11
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
|
||||
# 另外也可以使用 git commit hash 来锁定版本,这是最彻底的锁定方式
|
||||
nixpkgs-fd40cef8d.url = "github:nixos/nixpkgs/fd40cef8d797670e203a27a91e4b8e6decf0b90c";
|
||||
|
@ -196,7 +196,7 @@ Nix Flakes 对目录结构没有任何要求,你可以参考上面的例子,
|
||||
description = "Ryan's NixOS Flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs: {
|
||||
|
@ -74,7 +74,7 @@ cat flake.nix
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
# home-manager,用于管理用户配置
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.05";
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
# `follows` 是 inputs 中的继承语法
|
||||
# 这里使 sops-nix 的 `inputs.nixpkgs` 与当前 flake 的
|
||||
# `inputs.nixpkgs` 保持一致,避免依赖的 nixpkgs 版本不一致导致问题
|
||||
@ -175,8 +175,8 @@ cat flake.nix
|
||||
inputs = {
|
||||
# ......
|
||||
|
||||
# helix editor, use tag 23.05
|
||||
helix.url = "github:helix-editor/helix/23.05";
|
||||
# helix editor, use tag 23.10
|
||||
helix.url = "github:helix-editor/helix/23.10";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, ... }: {
|
||||
|
@ -160,7 +160,7 @@
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
home.stateVersion = "23.05";
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
14
flake.lock
14
flake.lock
@ -5,11 +5,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1687171271,
|
||||
"narHash": "sha256-BJlq+ozK2B1sJDQXS3tzJM5a+oVZmi1q0FlBK/Xqv7M=",
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "abfb11bd1aec8ced1c9bb9adfe68018230f4fb3c",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -20,16 +20,16 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1687489123,
|
||||
"narHash": "sha256-SjLfNT5X/1+4RrDpsyD/J9usnf9N7xoN2u+HMVqKSSQ=",
|
||||
"lastModified": 1701742334,
|
||||
"narHash": "sha256-kofCitkjb+AjyMqV9xFFTfr36ZV+yohZDWrRVvos3tk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fc541b860a2890aac7f0c6fc43a86d43080f631a",
|
||||
"rev": "1f39de03a7b65f29bbb71e0630af11f8e6a64377",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-23.05",
|
||||
"ref": "release-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user