From ea347ed312c14311c5d9236006521e5978b7a144 Mon Sep 17 00:00:00 2001 From: Bad Date: Thu, 20 Oct 2022 18:26:28 +0200 Subject: [PATCH] Switch to nixpkgs-unstable --- flake.lock | 82 +++++++++++++++++++------------- flake.nix | 6 +-- overlays/overrides.nix | 28 +---------- profiles/core/default.nix | 70 ++++++++++++++------------- profiles/game/default.nix | 1 - users/modules/neovim/default.nix | 1 + users/profiles/core/default.nix | 2 +- 7 files changed, 92 insertions(+), 98 deletions(-) diff --git a/flake.lock b/flake.lock index 1bbfc3c..8234ed7 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1664140963, - "narHash": "sha256-pFxDtOLduRFlol0Y4ShE+soRQX4kbhaCNBtDOvx7ykw=", + "lastModified": 1665870395, + "narHash": "sha256-Tsbqb27LDNxOoPLh0gw2hIb6L/6Ow/6lIBvqcHzEKBI=", "owner": "ryantm", "repo": "agenix", - "rev": "6acb1fe5f8597d5ce63fc82bc7fcac7774b1cdf0", + "rev": "a630400067c6d03c9b3e0455347dc8559db14288", "type": "github" }, "original": { @@ -150,11 +150,11 @@ ] }, "locked": { - "lastModified": 1659622306, - "narHash": "sha256-Kpfm2PNs+kZU0W7qcugoPATLG8I2P7FJFGTgsf1LJiU=", + "lastModified": 1665848456, + "narHash": "sha256-UwJ2bY/K5rK5oa+uIQjyz9EXyNoGYBlKXZCcdav5w14=", "owner": "divnix", "repo": "digga", - "rev": "d1193743a535d7fbbc7f3eda4e51295b10bd4d2c", + "rev": "1f97cb28f13aa0770947568589116468c68b3f26", "type": "github" }, "original": { @@ -169,11 +169,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1665470981, - "narHash": "sha256-ybKBuDqIq4ZDa1QQqkDVDYewUuxPGs3akEWuhEF2ltw=", + "lastModified": 1666248064, + "narHash": "sha256-boxI58K2KSi8MLP+DJkQEbZcVjr0OOZ2ocEJm37Zl+w=", "owner": "nix-community", "repo": "fenix", - "rev": "0ba1e28f8810df02d9cd20e05b1957a782c7d9d1", + "rev": "d87c114ae9d074bcb1d73c2b4debef86dffeddc0", "type": "github" }, "original": { @@ -365,11 +365,11 @@ ] }, "locked": { - "lastModified": 1665476539, - "narHash": "sha256-NDs0qfTSfG+vEvB3HN2GOOZgMBPAYBpFeIC4hrN5wjk=", + "lastModified": 1666253070, + "narHash": "sha256-MtaNgghmfp+ywh5mv9FcspFT4ACaYINSN+D98PCkrP0=", "owner": "nix-community", "repo": "home-manager", - "rev": "b37a909508edb8d7fdcd04ac90761b2cfa2a5f28", + "rev": "c485669ca529e01c1505429fa9017c9a93f15559", "type": "github" }, "original": { @@ -396,16 +396,16 @@ }, "latest": { "locked": { - "lastModified": 1665349835, - "narHash": "sha256-UK4urM3iN80UXQ7EaOappDzcisYIuEURFRoGQ/yPkug=", + "lastModified": 1666282307, + "narHash": "sha256-O1T2HGLARLKDLfdOmjPBfn3eC4cSIaQD71wUN4I/6/s=", "owner": "nixos", "repo": "nixpkgs", - "rev": "34c5293a71ffdb2fe054eb5288adc1882c1eb0b1", + "rev": "b7d8c687782c8f9a1d425a7e486eb989654f6468", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-unstable", + "ref": "master", "repo": "nixpkgs", "type": "github" } @@ -451,26 +451,27 @@ }, "nixos": { "locked": { - "lastModified": 1665349835, - "narHash": "sha256-UK4urM3iN80UXQ7EaOappDzcisYIuEURFRoGQ/yPkug=", - "owner": "NixOS", + "lastModified": 1666198336, + "narHash": "sha256-VTrWD8Bb48h2pi57P1++LuvZIgum3gSLiRzZ/8q3rg0=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "34c5293a71ffdb2fe054eb5288adc1882c1eb0b1", + "rev": "db25c4da285c5989b39e4ce13dea651a88b7a9d4", "type": "github" }, "original": { - "id": "nixpkgs", + "owner": "nixos", "ref": "nixos-unstable", - "type": "indirect" + "repo": "nixpkgs", + "type": "github" } }, "nixos-hardware": { "locked": { - "lastModified": 1665321371, - "narHash": "sha256-0SO6MTW0bX6lxZmz1AZW/Xmk+hnTd7/hp1vF7Tp7jg0=", + "lastModified": 1665987993, + "narHash": "sha256-MvlaIYTRiqefG4dzI5p6vVCfl+9V8A1cPniUjcn6Ngc=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "236ba4df714131059945d7754c0aa3fbe9d2f74c", + "rev": "0e6593630071440eb89cd97a52921497482b22c6", "type": "github" }, "original": { @@ -481,11 +482,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1665259268, - "narHash": "sha256-ONFhHBLv5nZKhwV/F2GOH16197PbvpyWhoO0AOyktkU=", + "lastModified": 1666109165, + "narHash": "sha256-BMLyNVkr0oONuq3lKlFCRVuYqF75CO68Z8EoCh81Zdk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c5924154f000e6306030300592f4282949b2db6c", + "rev": "32096899af23d49010bd8cf6a91695888d9d9e73", "type": "github" }, "original": { @@ -612,17 +613,18 @@ "nixos-hardware": "nixos-hardware", "nvfetcher": "nvfetcher", "peerix": "peerix", - "pwnix": "pwnix" + "pwnix": "pwnix", + "stable": "stable" } }, "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1665438197, - "narHash": "sha256-uVkoQqUHyeu1j3DucZDmp0w89WaY91eP/p2BmPFIPaY=", + "lastModified": 1666216399, + "narHash": "sha256-0evdMjhsffxZBn4ZnICnsc4J8Zv8qmSfFZfwnI+h34Q=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "5d4995191326a3710206d152a710470e196e4466", + "rev": "a77ac93b2a6bfada6641a9067045ef6b3ec46951", "type": "github" }, "original": { @@ -632,6 +634,22 @@ "type": "github" } }, + "stable": { + "locked": { + "lastModified": 1666164185, + "narHash": "sha256-5v+YB4ijeUfg5LCz9ck4gIpCPhIS+qn02OyPJO48bCE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "c5203abb1329f7ea084c04acda330ca75d5b9fb5", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-22.05", + "repo": "nixpkgs", + "type": "github" + } + }, "utils": { "locked": { "lastModified": 1637014545, diff --git a/flake.nix b/flake.nix index f60597e..ef900a9 100644 --- a/flake.nix +++ b/flake.nix @@ -4,9 +4,9 @@ nixConfig.extra-experimental-features = "nix-command flakes"; inputs = { - # nixos.url = "github:nixos/nixpkgs/nixos-22.05"; - nixos.url = "nixpkgs/nixos-unstable"; - latest.url = "github:nixos/nixpkgs/nixos-unstable"; + stable.url = "github:nixos/nixpkgs/nixos-22.05"; + nixos.url = "github:nixos/nixpkgs/nixos-unstable"; + latest.url = "github:nixos/nixpkgs/master"; flake-utils.url = "github:numtide/flake-utils"; diff --git a/overlays/overrides.nix b/overlays/overrides.nix index e98b76b..ea165d2 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -3,36 +3,10 @@ let latest = channels.latest; in { - __dontExport = true; # overrides clutter up actual creations - inherit (latest) - cachix - nix-direnv - minetest - dhall - discord - element-desktop - rage - ghidra - podman - nixpkgs-fmt - qutebrowser - nvfetcher - signal-desktop - delve - neovim - polymc - lutris - sumneko-lua-language-server - cargo-crev - cargo-fuzz - tdesktop - vimPlugins - mako - neovim-unwrapped; - + asdf; latest = latest; haskellPackages = prev.haskellPackages.override diff --git a/profiles/core/default.nix b/profiles/core/default.nix index 2d77fd3..16caa36 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -2,16 +2,44 @@ let inherit (lib) fileContents; in { - # Cachix nix = { - binaryCaches = [ - "https://cache.nixos.org/" - "https://nix-community.cachix.org" - ]; - binaryCachePublicKeys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; + settings = { + substituters = [ + "https://cache.nixos.org/" + "https://nix-community.cachix.org" + ]; + trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + trusted-users = [ "root" "@wheel" ]; + + system-features = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; + sandbox = true; + + auto-optimise-store = true; + + }; + + registry = { + nixpkgs.flake = self.inputs.nixos; + latest.flake = self.inputs.latest; + stable.flake = self.inputs.stable; + pwnix.flake = self.inputs.pwnix; + + }; + + # Improve nix store disk usage + gc.automatic = true; + optimise.automatic = true; + + + # Generally useful nix option defaults + extraOptions = '' + keep-outputs = true + keep-derivations = true + fallback = true + ''; }; # For rage encryption, all hosts need a ssh key pair @@ -20,11 +48,6 @@ in openFirewall = lib.mkDefault false; }; - # This is just a representation of the nix default - nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; - nix.registry.nixpkgs.flake = self.inputs.nixos; - nix.registry.latest.flake = self.inputs.latest; - nix.registry.pwnix.flake = self.inputs.pwnix; # Fix zsh autocompletion with home-manager environment.pathsToLink = [ "/share/zsh" ]; @@ -92,27 +115,6 @@ in }; }; - nix = { - # Improve nix store disk usage - autoOptimiseStore = true; - gc.automatic = true; - optimise.automatic = true; - - # Prevents impurities in builds - useSandbox = true; - - # give root and @wheel special privileges with nix - trustedUsers = [ "root" "@wheel" ]; - - # Generally useful nix option defaults - extraOptions = '' - keep-outputs = true - keep-derivations = true - fallback = true - ''; - - }; - time.timeZone = "Europe/Warsaw"; i18n.defaultLocale = "en_US.UTF-8"; diff --git a/profiles/game/default.nix b/profiles/game/default.nix index 80ae672..f2519e8 100644 --- a/profiles/game/default.nix +++ b/profiles/game/default.nix @@ -6,7 +6,6 @@ steam-run minetest mumble - polymc (retroarch.override { cores = [ libretro.snes9x ]; }) olympus godot diff --git a/users/modules/neovim/default.nix b/users/modules/neovim/default.nix index d24acfc..09e9c53 100644 --- a/users/modules/neovim/default.nix +++ b/users/modules/neovim/default.nix @@ -42,6 +42,7 @@ in set termguicolors set ic + set mouse= set number set autoindent diff --git a/users/profiles/core/default.nix b/users/profiles/core/default.nix index 44306e7..1ef3cde 100644 --- a/users/profiles/core/default.nix +++ b/users/profiles/core/default.nix @@ -1,3 +1,3 @@ { - home.sessionPath = ["$HOME/.local/bin" "$HOME/.cargo/bin/"]; + home.sessionPath = [ "$HOME/.local/bin" "$HOME/.cargo/bin/" ]; }