From df20c486e746d6c0c5fdc7ca99c84dadf8b4fd16 Mon Sep 17 00:00:00 2001 From: xinyangli Date: Sat, 23 Sep 2023 01:12:38 +0800 Subject: [PATCH] calcite: bump version, drop steam, drop opengl32 --- flake.lock | 60 ++++++++++----------- flake.nix | 4 +- home/xin/common/default.nix | 3 +- machines/calcite/configuration.nix | 14 ++--- machines/calcite/hardware-configuration.nix | 4 ++ machines/calcite/network.nix | 7 ++- machines/clash.nix | 5 -- machines/sops.nix | 8 ++- 8 files changed, 49 insertions(+), 56 deletions(-) diff --git a/flake.lock b/flake.lock index 62d175d..81619de 100644 --- a/flake.lock +++ b/flake.lock @@ -21,11 +21,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "owner": "numtide", "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "type": "github" }, "original": { @@ -74,11 +74,11 @@ ] }, "locked": { - "lastModified": 1689891262, - "narHash": "sha256-Pc4wDczbdgd6QXKJIXprgxe7L9AVDsoAkMnvm5vmpUU=", + "lastModified": 1695224363, + "narHash": "sha256-+hfjJLUMck5G92RVFDZA7LWkR3kOxs5zQ7RPW9t3eM8=", "owner": "nix-community", "repo": "home-manager", - "rev": "ee5673246de0254186e469935909e821b8f4ec15", + "rev": "408ba13188ff9ce309fa2bdd2f81287d79773b00", "type": "github" }, "original": { @@ -94,11 +94,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1689903271, - "narHash": "sha256-t3CPQ3afi5fUbY/I4nldZgsUMO9/17UwIC9XPiD0ybs=", + "lastModified": 1695345913, + "narHash": "sha256-TkCmI8cLQ02HW9jW2HEquQZ1u1ljeOlEFMU+9PS2tLg=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "2064829219ef11822e539664ba975fdf443bbe7b", + "rev": "8f30a4bcd475bff9f23097e4450754ec068523b2", "type": "github" }, "original": { @@ -130,11 +130,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1689320556, - "narHash": "sha256-vODUkZLWFVCvo1KPK3dC2CbXjxa9antEn5ozwlcTr48=", + "lastModified": 1695109627, + "narHash": "sha256-4rpyoVzmunIG6xWA/EonnSSqC69bDBzciFi6SjBze/0=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "d4ea64f2063820120c05f6ba93ee02e6d4671d6b", + "rev": "cb4dc98f776ddb6af165e6f06b2902efe31ca67a", "type": "github" }, "original": { @@ -162,11 +162,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1689885880, - "narHash": "sha256-2ikAcvHKkKh8J/eUrwMA+wy1poscC+oL1RkN1V3RmT8=", + "lastModified": 1695272228, + "narHash": "sha256-4uw2OdJPVyjdB+xcDst9SecrNIpxKXJ2usN3M5HVa7o=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fa793b06f56896b7d1909e4b69977c7bf842b2f0", + "rev": "55ac2a9d2024f15c56adf20da505b29659911da8", "type": "github" }, "original": { @@ -178,11 +178,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1689473667, - "narHash": "sha256-41ePf1ylHMTogSPAiufqvBbBos+gtB6zjQlYFSEKFMM=", + "lastModified": 1694908564, + "narHash": "sha256-ducA98AuWWJu5oUElIzN24Q22WlO8bOfixGzBgzYdVc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "13231eccfa1da771afa5c0807fdd73e05a1ec4e6", + "rev": "596611941a74be176b98aeba9328aa9d01b8b322", "type": "github" }, "original": { @@ -194,11 +194,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1689940971, - "narHash": "sha256-397xShPnFqPC59Bmpo3lS+/Aw0yoDRMACGo1+h2VJMo=", + "lastModified": 1695145219, + "narHash": "sha256-Eoe9IHbvmo5wEDeJXKFOpKUwxYJIOxKUesounVccNYk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9ca785644d067445a4aa749902b29ccef61f7476", + "rev": "5ba549eafcf3e33405e5f66decd1a72356632b96", "type": "github" }, "original": { @@ -210,11 +210,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1689413807, - "narHash": "sha256-exuzOvOhGAEKWQKwDuZAL4N8a1I837hH5eocaTcIbLc=", + "lastModified": 1694760568, + "narHash": "sha256-3G07BiXrp2YQKxdcdms22MUx6spc6A++MSePtatCYuI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "46ed466081b9cad1125b11f11a2af5cc40b942c7", + "rev": "46688f8eb5cd6f1298d873d4d2b9cf245e09e88e", "type": "github" }, "original": { @@ -226,11 +226,11 @@ }, "nur": { "locked": { - "lastModified": 1689986542, - "narHash": "sha256-nfAoJhHAeOM+G2E4qzE3E8vtt5VH14bq9u7a9wxTR1c=", + "lastModified": 1695395799, + "narHash": "sha256-D/SfJk+w2AknDWfR4KX5lEs/1zYtpq814oQfwEpmXC0=", "owner": "nix-community", "repo": "NUR", - "rev": "3d51c81356bd84bfa7b5b2ccb11c36b58b9f5cde", + "rev": "e256049bbaab62633de72dd14be51a8f592d6631", "type": "github" }, "original": { @@ -258,11 +258,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1689534977, - "narHash": "sha256-EB4hasmjKgetTR0My2bS5AwELZFIQ4zANLqHKi7aVXg=", + "lastModified": 1695284550, + "narHash": "sha256-z9fz/wz9qo9XePEvdduf+sBNeoI9QG8NJKl5ssA8Xl4=", "owner": "Mic92", "repo": "sops-nix", - "rev": "bd695cc4d0a5e1bead703cc1bec5fa3094820a81", + "rev": "2f375ed8702b0d8ee2430885059d5e7975e38f78", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 02117ee..4ca0638 100644 --- a/flake.nix +++ b/flake.nix @@ -68,8 +68,8 @@ modules = [ machines/massicot (mkHome "xin" "gold") - ] - } + ]; + }; nixosConfigurations.raspite = mkNixos { system = "aarch64-linux"; diff --git a/home/xin/common/default.nix b/home/xin/common/default.nix index da76694..6681fb7 100644 --- a/home/xin/common/default.nix +++ b/home/xin/common/default.nix @@ -9,8 +9,7 @@ nix.settings = { experimental-features = [ "nix-command" "flakes" ]; auto-optimise-store = true; - substituters = "https://cache.nixos.org https://mirrors.ustc.edu.cn/nix-channels/store https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store https://cache.nixos.org/ https://cuda-maintainers.cachix.org"; - trusted-public-keys = "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="; + substituters = "https://mirrors.ustc.edu.cn/nix-channels/store https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"; }; diff --git a/machines/calcite/configuration.nix b/machines/calcite/configuration.nix index a5d45f8..1b1abd4 100644 --- a/machines/calcite/configuration.nix +++ b/machines/calcite/configuration.nix @@ -104,9 +104,9 @@ # Allow unfree packages nixpkgs.config.allowUnfree = true; nixpkgs.config.permittedInsecurePackages = [ - "openssl-1.1.1u" + "openssl-1.1.1w" # For wechat-uos - "electron-19.0.7" + "electron-19.1.9" ]; # List packages installed in system profile. To search, run: # $ nix search wget @@ -173,8 +173,6 @@ gnome.gnome-tweaks gthumb - steam - # Multimedia vlc obs-studio @@ -208,11 +206,6 @@ ghidra ]; - programs.steam = { - enable = true; - }; - - system.stateVersion = "22.05"; # Use mirror for binary cache @@ -240,7 +233,7 @@ # Fonts fonts = { - fonts = with pkgs; [ + packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-emoji @@ -274,7 +267,6 @@ }; docker = { enable = true; - enableNvidia = true; autoPrune.enable = true; }; }; diff --git a/machines/calcite/hardware-configuration.nix b/machines/calcite/hardware-configuration.nix index 4baf3c7..0bd2426 100644 --- a/machines/calcite/hardware-configuration.nix +++ b/machines/calcite/hardware-configuration.nix @@ -46,4 +46,8 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.opengl = { + enable = true; + driSupport32Bit = false; + }; } diff --git a/machines/calcite/network.nix b/machines/calcite/network.nix index 16a1c94..1d9fb88 100644 --- a/machines/calcite/network.nix +++ b/machines/calcite/network.nix @@ -6,8 +6,7 @@ networkmanager = { enable = true; dns = "systemd-resolved"; - # dns = "none"; - + # dns = "resolvconf"; }; }; @@ -16,9 +15,9 @@ extraConfig = '' [Resolve] Domains=~. - DNS=114.114.114.114 1.1.1.1 - DNSOverTLS=opportunistic + DNS=127.0.0.1 ''; + # DNSOverTLS=opportunistic }; # Configure network proxy if necessary diff --git a/machines/clash.nix b/machines/clash.nix index e6c76ca..fc90056 100644 --- a/machines/clash.nix +++ b/machines/clash.nix @@ -1,10 +1,5 @@ { config, lib, pkgs, ... }: { - sops = { - secrets.clash_subscription_link = { - owner = "xin"; - }; - }; systemd.timers."clash-config-update" = { wantedBy = [ "timers.target" ]; diff --git a/machines/sops.nix b/machines/sops.nix index 5c6a079..d3f04f8 100644 --- a/machines/sops.nix +++ b/machines/sops.nix @@ -2,8 +2,12 @@ { sops = { defaultSopsFile = ./secrets.yaml; + # TODO: How to generate this key when bootstrap? age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; - # age.keyFile = "/var/lib/sops-nix/keys.txt"; - # age.generateKey = true; + secrets = { + clash_subscription_link = { + owner = "xin"; + }; + }; }; } \ No newline at end of file