From d5c807a4f939854596ee8b64f1caec72517b1b55 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 30 Oct 2020 01:39:45 -0400 Subject: [PATCH] Move to nixpkgs/master For that 5.9.2 kernel goodness. Since I can track nixpkgs myself, I'm using nixpkgs/master now (and twice, so I can track them at separate rates). Though, for now, nixpkgs == nixpkgs.unstable --- default.nix | 15 ++++--- flake.lock | 68 +++++++++++++++--------------- flake.nix | 31 +++++++------- hosts/linode.nix | 12 +++--- modules/desktop/apps/discord.nix | 6 +-- modules/desktop/default.nix | 2 +- modules/desktop/media/daw.nix | 2 +- modules/desktop/media/graphics.nix | 2 +- modules/themes/alucard/default.nix | 2 +- 9 files changed, 69 insertions(+), 71 deletions(-) diff --git a/default.nix b/default.nix index 4f7a3d9b..49822c9a 100644 --- a/default.nix +++ b/default.nix @@ -17,11 +17,11 @@ with inputs; # Configure nix and nixpkgs environment.variables.NIXPKGS_ALLOW_UNFREE = "1"; nix = { - package = pkgs.unstable.nixFlakes; + package = pkgs.nixFlakes; extraOptions = "experimental-features = nix-command flakes"; nixPath = [ - "nixpkgs=${nixos}" - "nixpkgs-unstable=${nixos-unstable}" + "nixpkgs=${nixpkgs}" + "nixpkgs-unstable=${nixpkgs-unstable}" "nixpkgs-overlays=${dotFilesDir}/overlays" "home-manager=${home-manager}" "dotfiles=${dotFilesDir}" @@ -34,9 +34,10 @@ with inputs; "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; registry = { - nixos.flake = nixos; - nixpkgs.flake = nixos-unstable; + nixos.flake = nixpkgs; + nixpkgs.flake = nixpkgs-unstable; }; + useSandbox = true; }; system.configurationRevision = mkIf (self ? rev) self.rev; system.stateVersion = "20.09"; @@ -48,7 +49,7 @@ with inputs; fileSystems."/".device = "/dev/disk/by-label/nixos"; # Use the latest kernel - boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = pkgs.linuxPackages_5_9; boot.loader = { efi.canTouchEfiVariables = true; @@ -58,7 +59,7 @@ with inputs; # Just the bear necessities... environment.systemPackages = with pkgs; [ - unstable.cached-nix-shell + cached-nix-shell coreutils git vim diff --git a/flake.lock b/flake.lock index 72c45bcc..9e95078d 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "emacs-overlay": { "locked": { - "lastModified": 1603643126, - "narHash": "sha256-gpvbYrdN0LOS5C6jdhMSDI53MwvAm2GY+VtHUuCjFvI=", + "lastModified": 1604032123, + "narHash": "sha256-zFPYmFFXoKTF+dBxjwKd4fFJD9Z0VbBEPr8LKeQT5FA=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "7b5dea6b1493fd3b065878364f0bfc5aa4363306", + "rev": "4e45953b184dc1029fbbc60c70f37b40bf8d08c7", "type": "github" }, "original": { @@ -18,15 +18,15 @@ "home-manager": { "inputs": { "nixpkgs": [ - "nixos-unstable" + "nixpkgs" ] }, "locked": { - "lastModified": 1603403461, - "narHash": "sha256-1BBTgps384veCOtCuHLdg8vuRNYyYPssWDQxsYQ5Lg8=", + "lastModified": 1603922580, + "narHash": "sha256-rPJ3YxsVm5YYHzIRLy1w3jSXIQvVXK1KydraC7m/2xc=", "owner": "rycee", "repo": "home-manager", - "rev": "9bf1f40af124573a54fd208b1f539eb694ef31a6", + "rev": "a98ec6ec158686387d66654ea96153ec06be33d7", "type": "github" }, "original": { @@ -36,48 +36,48 @@ "type": "github" } }, - "nixos": { + "nixos-hardware": { "locked": { - "lastModified": 1603528673, - "narHash": "sha256-iFrxF9GMes1jH7v8qjep1BsQYEq/admkEv/gJoqQsHo=", + "lastModified": 1603995690, + "narHash": "sha256-aqDvu6Im9uglnKboMKYwH8D8h1dLwlSOaEDqPxEfKf4=", + "owner": "nixos", + "repo": "nixos-hardware", + "rev": "46a68df837414dcdfb1c240c88d5fff1b6ef805c", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixos-hardware", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1604033338, + "narHash": "sha256-u08n7zy1Y6+JLILAKas+dLKJ1dwJri1OaECbJEbT6v8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "95d26c9a9f2a102e25cf318a648de44537f42e09", + "rev": "fcc6849bcd58073b365848031335abf58c7331cd", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-20.09", + "ref": "master", "type": "indirect" } }, - "nixos-hardware": { + "nixpkgs-unstable": { "locked": { - "lastModified": 1603168674, - "narHash": "sha256-nX7t9jtzX96xieiwsKf/AL3yBiMl20Z2/IFyc1GQZk4=", - "owner": "nixos", - "repo": "nixos-hardware", - "rev": "e8c5f886b05178367c6a86903921c1e934303075", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixos-hardware", - "type": "github" - } - }, - "nixos-unstable": { - "locked": { - "lastModified": 1603214869, - "narHash": "sha256-gmiZPO8nOkeCpmJ060F80VGDxGFO1lMV3Obocwxrp2U=", + "lastModified": 1604033338, + "narHash": "sha256-u08n7zy1Y6+JLILAKas+dLKJ1dwJri1OaECbJEbT6v8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bd017760509492a1774b0ea2fc5c1bbb4b2d98af", + "rev": "fcc6849bcd58073b365848031335abf58c7331cd", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-unstable", + "ref": "master", "type": "indirect" } }, @@ -85,9 +85,9 @@ "inputs": { "emacs-overlay": "emacs-overlay", "home-manager": "home-manager", - "nixos": "nixos", "nixos-hardware": "nixos-hardware", - "nixos-unstable": "nixos-unstable" + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" } } }, diff --git a/flake.nix b/flake.nix index 440fbb3c..d88fbf5e 100644 --- a/flake.nix +++ b/flake.nix @@ -12,42 +12,43 @@ inputs = { - # Core dependencies - nixos.url = "nixpkgs/nixos-20.09"; - nixos-unstable.url = "nixpkgs/nixos-unstable"; + # Core dependencies. + # Two inputs so I can track them separately at different rates. + nixpkgs.url = "nixpkgs/master"; + nixpkgs-unstable.url = "nixpkgs/master"; + home-manager.url = "github:rycee/home-manager/master"; - home-manager.inputs.nixpkgs.follows = "nixos-unstable"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; # Extras emacs-overlay.url = "github:nix-community/emacs-overlay"; nixos-hardware.url = "github:nixos/nixos-hardware"; }; - outputs = inputs @ { self, nixos, nixos-unstable, home-manager, ... }: + outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, home-manager, ... }: let - inherit (builtins) baseNameOf; - inherit (lib) nixosSystem mkIf removeSuffix attrNames attrValues; - inherit (lib.my) dotFilesDir mapModules mapModulesRec mapHosts; + inherit (lib) attrValues; + inherit (lib.my) mapModules mapModulesRec mapHosts; system = "x86_64-linux"; - lib = nixos.lib.extend - (self: super: { my = import ./lib { inherit pkgs inputs; lib = self; }; }); - mkPkgs = pkgs: extraOverlays: import pkgs { inherit system; config.allowUnfree = true; # forgive me Stallman senpai overlays = extraOverlays ++ (attrValues self.overlays); }; - pkgs = mkPkgs nixos [ self.overlay ]; - unstable = mkPkgs nixos-unstable []; + pkgs = mkPkgs nixpkgs [ self.overlay ]; + uPkgs = mkPkgs nixpkgs-unstable []; + + lib = nixpkgs.lib.extend + (self: super: { my = import ./lib { inherit pkgs inputs; lib = self; }; }); in { lib = lib.my; overlay = final: prev: { - inherit unstable; - user = self.packages."${system}"; + unstable = uPkgs; + my = self.packages."${system}"; }; overlays = diff --git a/hosts/linode.nix b/hosts/linode.nix index 15f129e9..e9d694d7 100644 --- a/hosts/linode.nix +++ b/hosts/linode.nix @@ -29,18 +29,16 @@ with lib; { - imports = filter pathExists ["/etc/nixos/configuration.nix"]; - environment.systemPackages = with pkgs; [ inetutils mtr sysstat git ]; modules = { - # editors = { - # default = "nvim"; - # vim.enable = true; - # }; + editors = { + default = "nvim"; + vim.enable = true; + }; shell = { - # git.enable = true; + git.enable = true; zsh.enable = true; }; services.ssh.enable = true; diff --git a/modules/desktop/apps/discord.nix b/modules/desktop/apps/discord.nix index 8bdb9571..e1dddf05 100644 --- a/modules/desktop/apps/discord.nix +++ b/modules/desktop/apps/discord.nix @@ -10,11 +10,9 @@ in { config = mkIf cfg.enable { user.packages = with pkgs; [ - # If not installed from unstable, Discord will sometimes soft-lock itself - # on a "there's an update for discord" screen. + # If not installed from the bleeding edge, Discord will sometimes + # soft-lock itself on a "there's an update for discord" screen. unstable.discord - - # unstable.ripcord ]; }; } diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index ee14848b..f2bf219f 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -38,7 +38,7 @@ in { ]; fonts = { - enableFontDir = true; + fontDir.enable = true; enableGhostscriptFonts = true; fonts = with pkgs; [ ubuntu_font_family diff --git a/modules/desktop/media/daw.nix b/modules/desktop/media/daw.nix index 923a22c5..44e878c7 100644 --- a/modules/desktop/media/daw.nix +++ b/modules/desktop/media/daw.nix @@ -19,7 +19,7 @@ in { user.packages = with pkgs; [ # lmms on stable is broken due to 'Could not find the Qt platform plugin # "xcb" in ""' error: https://github.com/NixOS/nixpkgs/issues/76074 - unstable.lmms # for making music + lmms # for making music audacity # for recording and remastering audio # sunvox # for making music (where LMMS is overkill) diff --git a/modules/desktop/media/graphics.nix b/modules/desktop/media/graphics.nix index 95f532b8..4b2ace0b 100644 --- a/modules/desktop/media/graphics.nix +++ b/modules/desktop/media/graphics.nix @@ -28,7 +28,7 @@ in { # replaces illustrator & indesign (if cfg.vector.enable then [ - unstable.inkscape + inkscape ] else []) ++ # Replaces photoshop diff --git a/modules/themes/alucard/default.nix b/modules/themes/alucard/default.nix index 0c116b9a..d7897bd8 100644 --- a/modules/themes/alucard/default.nix +++ b/modules/themes/alucard/default.nix @@ -40,7 +40,7 @@ in { # Desktop (X11) theming (mkIf config.services.xserver.enable { user.packages = with pkgs; [ - unstable.dracula-theme + dracula-theme paper-icon-theme # for rofi ]; fonts = {