From 26ecc9d36c07b68e23677de0c4252a737b41ac78 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Sat, 23 Nov 2024 01:23:26 -0600 Subject: [PATCH] Eliminate use of stable Take all references to Nix stable out Take out hm stable and other inputs th also depended on it Clean up some lints and deadnix code --- flake.lock | 283 +-------------------- flake.nix | 10 +- hardware-configuration.nix | 29 ++- home/modules/baseline/vim/config.nix | 10 +- hosts/default.nix | 7 +- hosts/iso/default.nix | 2 +- hosts/vm-jellyfin/default.nix | 6 +- hosts/vm-matrix/default.nix | 3 +- hosts/vm-matrix/hardware-configuration.nix | 29 ++- 9 files changed, 55 insertions(+), 324 deletions(-) diff --git a/flake.lock b/flake.lock index 4385e1c..cd4c9ce 100644 --- a/flake.lock +++ b/flake.lock @@ -89,27 +89,6 @@ } }, "devshell": { - "inputs": { - "nixpkgs": [ - "nixvimstable", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1728330715, - "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", - "owner": "numtide", - "repo": "devshell", - "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "devshell_2": { "inputs": { "nixpkgs": [ "nixvimunstable", @@ -202,36 +181,6 @@ } }, "flake-compat_4": { - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "revCount": 57, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" - } - }, - "flake-compat_5": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_6": { "flake": false, "locked": { "lastModified": 1696426674, @@ -266,27 +215,6 @@ } }, "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "nixvimstable", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1730504689, - "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "506278e768c2a08bec68eb62932193e341f55c90", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "nixvimunstable", @@ -380,39 +308,12 @@ } }, "git-hooks": { - "inputs": { - "flake-compat": "flake-compat_3", - "gitignore": "gitignore_2", - "nixpkgs": [ - "nixvimstable", - "nixpkgs" - ], - "nixpkgs-stable": [ - "nixvimstable", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1730302582, - "narHash": "sha256-W1MIJpADXQCgosJZT8qBYLRuZls2KSiKdpnTVdKBuvU=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "git-hooks_2": { "inputs": { "flake-compat": [ "nixvimunstable", "flake-compat" ], - "gitignore": "gitignore_3", + "gitignore": "gitignore_2", "nixpkgs": [ "nixvimunstable", "nixpkgs" @@ -458,28 +359,6 @@ } }, "gitignore_2": { - "inputs": { - "nixpkgs": [ - "nixvimstable", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gitignore_3": { "inputs": { "nixpkgs": [ "nixvimunstable", @@ -501,31 +380,10 @@ "type": "github" } }, - "hm": { - "inputs": { - "nixpkgs": [ - "nixstable" - ] - }, - "locked": { - "lastModified": 1726989464, - "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-24.05", - "repo": "home-manager", - "type": "github" - } - }, "hmunstable": { "inputs": { "nixpkgs": [ - "nixstable" + "nixunstable" ] }, "locked": { @@ -565,28 +423,6 @@ } }, "home-manager_2": { - "inputs": { - "nixpkgs": [ - "nixvimstable", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1726989464, - "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-24.05", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_3": { "inputs": { "nixpkgs": [ "nixvimunstable", @@ -657,27 +493,6 @@ } }, "nix-darwin": { - "inputs": { - "nixpkgs": [ - "nixvimstable", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1730448474, - "narHash": "sha256-qE/cYKBhzxHMtKtLK3hlSR3uzO1pWPGLrBuQK7r0CHc=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "683d0c4cd1102dcccfa3f835565378c7f3cbe05e", - "type": "github" - }, - "original": { - "owner": "lnl7", - "repo": "nix-darwin", - "type": "github" - } - }, - "nix-darwin_2": { "inputs": { "nixpkgs": [ "nixvimunstable", @@ -827,22 +642,6 @@ } }, "nixpkgs_3": { - "locked": { - "lastModified": 1730327045, - "narHash": "sha256-xKel5kd1AbExymxoIfQ7pgcX6hjw9jCgbiBjiUfSVJ8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "080166c15633801df010977d9d7474b4a6c549d7", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { "locked": { "lastModified": 1731139594, "narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=", @@ -858,7 +657,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { "lastModified": 1713805509, "narHash": "sha256-YgSEan4CcrjivCNO5ZNzhg7/8ViLkZ4CB/GrGBVSudo=", @@ -874,22 +673,6 @@ "type": "github" } }, - "nixstable": { - "locked": { - "lastModified": 1731797254, - "narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, "nixunstable": { "locked": { "lastModified": 1731139594, @@ -906,7 +689,7 @@ "type": "github" } }, - "nixvimstable": { + "nixvimunstable": { "inputs": { "devshell": "devshell", "flake-compat": "flake-compat_2", @@ -915,34 +698,8 @@ "home-manager": "home-manager_2", "nix-darwin": "nix-darwin", "nixpkgs": "nixpkgs_3", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1731959181, - "narHash": "sha256-RryrMTaCvmXzhl0lYm/jAG8bAxsAhEcNq1JRtkCL4wI=", - "owner": "nix-community", - "repo": "nixvim", - "rev": "8d29728abfcc2e4207afb3fd8606feff17c15cec", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "nixos-24.05", - "repo": "nixvim", - "type": "github" - } - }, - "nixvimunstable": { - "inputs": { - "devshell": "devshell_2", - "flake-compat": "flake-compat_4", - "flake-parts": "flake-parts_3", - "git-hooks": "git-hooks_2", - "home-manager": "home-manager_3", - "nix-darwin": "nix-darwin_2", - "nixpkgs": "nixpkgs_4", "nuschtosSearch": "nuschtosSearch", - "treefmt-nix": "treefmt-nix_2" + "treefmt-nix": "treefmt-nix" }, "locked": { "lastModified": 1731527733, @@ -1003,14 +760,11 @@ "btc": "btc", "darwin": "darwin_2", "flake-parts": "flake-parts", - "hm": "hm", "hmunstable": "hmunstable", "hooks": "hooks", "nix23_05": "nix23_05", "nixos-generators": "nixos-generators", - "nixstable": "nixstable", "nixunstable": "nixunstable", - "nixvimstable": "nixvimstable", "nixvimunstable": "nixvimunstable", "nurpkgs": "nurpkgs", "vsext": "vsext", @@ -1093,27 +847,6 @@ } }, "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nixvimstable", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1730321837, - "narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "746901bb8dba96d154b66492a29f5db0693dbfcc", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "treefmt-nix_2": { "inputs": { "nixpkgs": [ "nixvimunstable", @@ -1136,9 +869,9 @@ }, "vsext": { "inputs": { - "flake-compat": "flake-compat_5", + "flake-compat": "flake-compat_3", "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1731548914, @@ -1156,7 +889,7 @@ }, "wsl": { "inputs": { - "flake-compat": "flake-compat_6", + "flake-compat": "flake-compat_4", "flake-utils": "flake-utils_4", "nixpkgs": [ "nixunstable" diff --git a/flake.nix b/flake.nix index fd8ce95..f5b8e4b 100644 --- a/flake.nix +++ b/flake.nix @@ -29,22 +29,16 @@ }; flake-parts.url = "github:hercules-ci/flake-parts"; hooks.url = "github:cachix/git-hooks.nix"; - hm = { - url = "github:nix-community/home-manager/release-24.05"; - inputs.nixpkgs.follows = "nixstable"; - }; hmunstable = { url = "github:nix-community/home-manager/master"; - inputs.nixpkgs.follows = "nixstable"; + inputs.nixpkgs.follows = "nixunstable"; }; nixos-generators = { url = "github:nix-community/nixos-generators"; inputs.nixpkgs.follows = "nixunstable"; }; - nixvimstable.url = "github:nix-community/nixvim/nixos-24.05"; nixvimunstable.url = "github:nix-community/nixvim/main"; nix23_05.url = "github:NixOS/nixpkgs/nixos-23.05"; - nixstable.url = "github:nixos/nixpkgs/nixos-24.05"; nixunstable.url = "github:nixos/nixpkgs/nixos-unstable"; nurpkgs.url = "github:nix-community/NUR"; vsext.url = "github:nix-community/nix-vscode-extensions"; @@ -105,7 +99,7 @@ }: { _module.args = { - pkgs = import top.nixstable { inherit system overlays; }; + pkgs = import top.nixunstable { inherit system overlays; }; }; packages = (import ./pkgs { inherit pkgs top; }) // (import ./vms { inherit top; }); diff --git a/hardware-configuration.nix b/hardware-configuration.nix index e5b3f07..b1199b1 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -1,27 +1,30 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ lib, modulesPath, ... }: { - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_blk" ]; + boot.initrd.availableKernelModules = [ + "ahci" + "xhci_pci" + "virtio_pci" + "virtio_blk" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/f222513b-ded1-49fa-b591-20ce86a2fe7f"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/f222513b-ded1-49fa-b591-20ce86a2fe7f"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "systemd-1"; - fsType = "autofs"; - }; + fileSystems."/boot" = { + device = "systemd-1"; + fsType = "autofs"; + }; swapDevices = [ ]; diff --git a/home/modules/baseline/vim/config.nix b/home/modules/baseline/vim/config.nix index 0c96ab6..effee27 100644 --- a/home/modules/baseline/vim/config.nix +++ b/home/modules/baseline/vim/config.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - lib, - ... -}: +{ config, pkgs, ... }: let vim-xonsh = pkgs.vimUtils.buildVimPlugin { name = "vim-xonsh"; @@ -157,7 +152,8 @@ in }; neo-tree.enable = true; notify.enable = true; - } // (if (lib.versionAtLeast lib.version "24.11") then { web-devicons.enable = true; } else { }); + web-devicons.enable = true; + }; userCommands = { Ggr = { command = "Ggrep! | cw | redraw!"; diff --git a/hosts/default.nix b/hosts/default.nix index 2aad610..19c1274 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -54,11 +54,11 @@ let }; in { - genesis = machine { name = "genesis"; }; + genesis = unstable { name = "genesis"; }; exodus = unstable { name = "exodus"; }; jude = unstable { name = "jude"; }; icdm-root = unstable { name = "icdm-root"; }; - linode = machine { name = "linode"; }; + linode = unstable { name = "linode"; }; hosea = unstable { name = "hosea"; }; jeremiah = unstable { name = "jeremiah"; }; isaiah = unstable { name = "isaiah"; }; @@ -66,8 +66,7 @@ in vm-jellyfin = vm { name = "vm-jellyfin"; }; vm-matrix = vm { name = "vm-matrix"; }; - iso = machine { name = "iso"; }; - iso-beta = unstable { name = "iso"; }; + iso = unstable { name = "iso"; }; # nix build '.#nixosConfigurations.wsl.config.system.build.installer' nixos = wsl { name = "wsl"; diff --git a/hosts/iso/default.nix b/hosts/iso/default.nix index bbb5e8e..54c1e52 100644 --- a/hosts/iso/default.nix +++ b/hosts/iso/default.nix @@ -12,7 +12,7 @@ ]; networking.networkmanager.enable = lib.mkForce false; - users.users.greg.initialPassword = ""; + users.users.greg.initialPassword = lib.mkForce ""; #services.getty.autologinUser = lib.mkForce "greg"; environment.systemPackages = with pkgs; [ tree ]; } diff --git a/hosts/vm-jellyfin/default.nix b/hosts/vm-jellyfin/default.nix index dec314f..bf00be0 100644 --- a/hosts/vm-jellyfin/default.nix +++ b/hosts/vm-jellyfin/default.nix @@ -2,7 +2,7 @@ { imports = [ ]; - #boot.loader.grub.devices = [ "/dev/vda" ]; + boot.loader.grub.devices = [ "/dev/disk/by-label/ESP" ]; greg = { proxies."jellyfin.home".target = "http://localhost:8096/"; @@ -10,6 +10,10 @@ }; fileSystems = { + "/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; "/music" = { device = "10.42.1.4:/volume1/music"; fsType = "nfs"; diff --git a/hosts/vm-matrix/default.nix b/hosts/vm-matrix/default.nix index 008886c..6acfcb0 100644 --- a/hosts/vm-matrix/default.nix +++ b/hosts/vm-matrix/default.nix @@ -7,7 +7,7 @@ in environment.systemPackages = with pkgs; [ upgrade-pg-cluster ]; - boot.loader.grub.devices = [ "/dev/vda" ]; + boot.loader.grub.devices = [ "/dev/disk/by-label/ESP" ]; greg = { tailscale.enable = true; @@ -34,7 +34,6 @@ in isSystemUser = true; group = "dendrite"; }; - greg.initialPassword = "password"; }; users.groups.dendrite = { }; diff --git a/hosts/vm-matrix/hardware-configuration.nix b/hosts/vm-matrix/hardware-configuration.nix index e5b3f07..81490bf 100644 --- a/hosts/vm-matrix/hardware-configuration.nix +++ b/hosts/vm-matrix/hardware-configuration.nix @@ -1,27 +1,30 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ lib, modulesPath, ... }: { - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_blk" ]; + boot.initrd.availableKernelModules = [ + "ahci" + "xhci_pci" + "virtio_pci" + "virtio_blk" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/f222513b-ded1-49fa-b591-20ce86a2fe7f"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "systemd-1"; - fsType = "autofs"; - }; + fileSystems."/boot" = { + device = "systemd-1"; + fsType = "autofs"; + }; swapDevices = [ ];