feat: using nixos's stable branch by default to stablize the system

This commit is contained in:
Ryan Yin
2023-06-17 22:32:19 +08:00
parent ccd4752d04
commit 8314b91324
2 changed files with 12 additions and 16 deletions
+5 -4
View File
@@ -38,9 +38,9 @@
# There are many ways to reference flake inputs. The most widely used is github:owner/name/reference, # There are many ways to reference flake inputs. The most widely used is github:owner/name/reference,
# which represents the GitHub repository URL + branch/commit-id/tag. # which represents the GitHub repository URL + branch/commit-id/tag.
# Official NixOS package source, using nixos-unstable branch here # Official NixOS package source, using nixos's stable branch by default
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# for macos # for macos
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-23.05-darwin"; nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-23.05-darwin";
@@ -93,7 +93,8 @@
let let
x64_system = "x86_64-linux"; x64_system = "x86_64-linux";
x64_specialArgs = { x64_specialArgs = {
pkgs-stable = import inputs.nixpkgs-stable { # use unstable branch for some packages to get the latest updates
pkgs-unstable = import inputs.nixpkgs-unstable {
system = x64_system; # refer the `system` parameter form outer scope recursively system = x64_system; # refer the `system` parameter form outer scope recursively
# To use chrome, we need to allow the installation of non-free software # To use chrome, we need to allow the installation of non-free software
config.allowUnfree = true; config.allowUnfree = true;
+7 -12
View File
@@ -1,5 +1,4 @@
{ pkgs { pkgs
, pkgs-stable
, ... , ...
}: }:
@@ -11,10 +10,6 @@
google-chrome = { google-chrome = {
enable = true; enable = true;
# chrome wayland support was broken on nixos-unstable branch, so fallback to stable branch for now
# https://github.com/swaywm/sway/issues/7562
package = pkgs-stable.google-chrome;
commandLineArgs = [ commandLineArgs = [
# make it use GTK_IM_MODULE if it runs with Gtk4, so fcitx5 can work with it. # make it use GTK_IM_MODULE if it runs with Gtk4, so fcitx5 can work with it.
# (only supported by chromium/chrome at this time, not electron) # (only supported by chromium/chrome at this time, not electron)
@@ -30,18 +25,18 @@
firefox = { firefox = {
enable = true; enable = true;
enableGnomeExtensions = false; enableGnomeExtensions = false;
package = pkgs-stable.firefox-wayland; # firefox with wayland support # package = pkgs.firefox-wayland; # firefox with wayland support
}; };
vscode = { vscode = {
enable = true; enable = true;
# use the stable version # use the stable version
package = pkgs-stable.vscode.override { # package = pkgs.vscode.override {
commandLineArgs = [ # commandLineArgs = [
# make it use text-input-v1, which works for kwin 5.27 and weston # # make it use text-input-v1, which works for kwin 5.27 and weston
# "--enable-wayland-ime" # # "--enable-wayland-ime"
]; # ];
}; # };
# let vscode sync and update its configuration & extensions across devices, using github account. # let vscode sync and update its configuration & extensions across devices, using github account.
# userSettings = {}; # userSettings = {};