ditched flake-utis cleaned up flake, reverted back to nix 2.13

This commit is contained in:
Gerg-L 2023-05-07 22:08:28 -04:00
parent 1231534d40
commit 7ee7675019
4 changed files with 56 additions and 97 deletions

98
flake.lock generated
View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1683451313, "lastModified": 1683508929,
"narHash": "sha256-BBpDeKFVRKScdLgcpJLeMGjwJXgfccYJOZ2Q0gWwg4o=", "narHash": "sha256-AqkIrwewCL8+zlkqhNxheF+kOfyakzZDk43SqRTIqRE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "35c3426fece22a6084c0bd64eccc37ff546da6ee", "rev": "2a59f5cf641607dbecb0cfec3ae32247e4aeb311",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -22,17 +22,16 @@
}, },
"fetch-rs": { "fetch-rs": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"unstable" "unstable"
] ]
}, },
"locked": { "locked": {
"lastModified": 1679350554, "lastModified": 1683510454,
"narHash": "sha256-Xyz1Y0wJdNkyj/HBwZtA7Ouj4u1edO0bgoH14rNDIKw=", "narHash": "sha256-9MMlAdZdfqakRpgA4S18q/3kp66Ydh7c+LWBiq3F3+c=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "fetch-rs", "repo": "fetch-rs",
"rev": "611fe211b1a746553b678024aec67225cff340fd", "rev": "89ea40a98ffcd8d6d7ae29514dad751ca2902a16",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -58,21 +57,6 @@
} }
}, },
"flake-utils": { "flake-utils": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
}, },
@ -90,7 +74,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": { "flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
}, },
@ -108,24 +92,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_4": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"lowdown-src": { "lowdown-src": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -144,11 +110,11 @@
}, },
"master": { "master": {
"locked": { "locked": {
"lastModified": 1683485721, "lastModified": 1683510273,
"narHash": "sha256-xEalZlIy1Ky+NdblYAZwxL9DMZHnhzPYljiol23RSpE=", "narHash": "sha256-VSJ0hmIPgcD97XV+8UzVEPkKVR5n2sZd3Wm2HC0UI/U=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "494f8e2a53ce7d6b413070d7a1e1ef5f92114cb3", "rev": "055a2f470bced98bb34a5d94b775c410e1594cc2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -159,10 +125,7 @@
}, },
"neovim-src": { "neovim-src": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": "flake-utils",
"nvim-flake",
"flake-utils"
],
"nixpkgs": [ "nixpkgs": [
"nvim-flake", "nvim-flake",
"nixpkgs" "nixpkgs"
@ -192,17 +155,17 @@
"nixpkgs-regression": "nixpkgs-regression" "nixpkgs-regression": "nixpkgs-regression"
}, },
"locked": { "locked": {
"lastModified": 1682437013, "lastModified": 1681227902,
"narHash": "sha256-4xiFigiJtSIK17t008X0iA+FxhXDa1RjUAJ1dqvHyy8=", "narHash": "sha256-hNHfvmb1bIWwqFT5nesQgwh4V0OlyZHxj5ZVSQbZ+p4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nix", "repo": "nix",
"rev": "946fd29422361e8478425d6aaf9ccae23d7ddffb", "rev": "8340e2623a7f87b86c0bb88666c85ef6c8562519",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "latest-release",
"repo": "nix", "repo": "nix",
"rev": "946fd29422361e8478425d6aaf9ccae23d7ddffb",
"type": "github" "type": "github"
} }
}, },
@ -292,18 +255,17 @@
}, },
"nvim-flake": { "nvim-flake": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3",
"neovim-src": "neovim-src", "neovim-src": "neovim-src",
"nixpkgs": [ "nixpkgs": [
"unstable" "unstable"
] ]
}, },
"locked": { "locked": {
"lastModified": 1683428547, "lastModified": 1683510496,
"narHash": "sha256-eiFIcb4N5YXTLYQuF/U/2kieE9sd1CRybeT/aDHDS1M=", "narHash": "sha256-lZ4wm+IM/C5+XyP/iN/bqjwPvoHtlz8TS3oc2UjvpbE=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "nvim-flake", "repo": "nvim-flake",
"rev": "c7a6bfc8d8e25958b33d8f3ba0c302b301cf3026", "rev": "03338835c3615b2ded7cc5478d59b22db4521f56",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -316,7 +278,6 @@
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
"fetch-rs": "fetch-rs", "fetch-rs": "fetch-rs",
"flake-utils": "flake-utils_2",
"master": "master", "master": "master",
"nix": "nix", "nix": "nix",
"nixos-generators": "nixos-generators", "nixos-generators": "nixos-generators",
@ -351,7 +312,7 @@
}, },
"spicetify-nix": { "spicetify-nix": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"unstable" "unstable"
] ]
@ -393,11 +354,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1679458093, "lastModified": 1683510562,
"narHash": "sha256-MdUKglpP0h9OfpMEUVwfXTaWH05qtMrgxLPCC45ZPds=", "narHash": "sha256-BXWVMN1kIGXyTZnxrMPFtKOxKx6JHBFFd4wP7SHcOEs=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "suckless", "repo": "suckless",
"rev": "90e38ace57a93c2cbddb5d85135799e651d08b0b", "rev": "a32c7af88b906f60db4cf3191a20634c7d183ef9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -436,21 +397,6 @@
"type": "github" "type": "github"
} }
}, },
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1683408522, "lastModified": 1683408522,

View file

@ -5,9 +5,8 @@
unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
stable.url = "github:NixOS/nixpkgs/nixos-22.11"; stable.url = "github:NixOS/nixpkgs/nixos-22.11";
#nix 2.16 #nix 2.16
nix.url = "github:NixOS/nix/946fd29422361e8478425d6aaf9ccae23d7ddffb"; nix.url = "github:NixOS/nix/latest-release";
#utilites
flake-utils.url = "github:numtide/flake-utils";
nixos-generators = { nixos-generators = {
url = "github:nix-community/nixos-generators"; url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "unstable"; inputs.nixpkgs.follows = "unstable";
@ -42,7 +41,6 @@
outputs = inputs @ { outputs = inputs @ {
self, self,
unstable, unstable,
flake-utils,
nixos-generators, nixos-generators,
... ...
}: let }: let
@ -71,6 +69,21 @@
lib.genAttrs names ( lib.genAttrs names (
name: (import (self + "/systems/" + name + "/disko.nix") inputs) name: (import (self + "/systems/" + name + "/disko.nix") inputs)
); );
withSystem = attrSet: let
f = attrPath:
lib.zipAttrsWith (
n: values:
if lib.tail values == []
then lib.head values
else if lib.all lib.isList values
then lib.unique (lib.concatLists values)
else if lib.all lib.isAttrs values
then f (attrPath ++ [n]) values
else lib.last values
);
in
f [] (map (system: attrSet system) ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]);
in in
{ {
nixosConfigurations = nixosConfigurations =
@ -89,13 +102,13 @@
"moms-laptop" "moms-laptop"
]; ];
} }
// flake-utils.lib.eachDefaultSystem ( // withSystem (
system: let system: let
pkgs = import unstable {inherit system;}; pkgs = unstable.legacyPackages.${system};
in { in {
formatter = pkgs.alejandra; formatter.${system} = pkgs.alejandra;
devShells = {
default = pkgs.mkShell { devShells.${system}.default = pkgs.mkShell {
packages = [ packages = [
pkgs.sops pkgs.sops
pkgs.nil pkgs.nil
@ -104,8 +117,8 @@
pkgs.statix pkgs.statix
]; ];
}; };
};
packages = packages.${system} =
{ {
nixos-iso = nixos-generators.nixosGenerate { nixos-iso = nixos-generators.nixosGenerate {
inherit system; inherit system;

View file

@ -30,7 +30,7 @@ in {
#other nix settings #other nix settings
nix = { nix = {
package = inputs.nix.packages.${pkgs.system}.default; #package = inputs.nix.packages.${pkgs.system}.default;
settings = { settings = {
experimental-features = ["nix-command" "flakes" "repl-flake"]; experimental-features = ["nix-command" "flakes" "repl-flake"];
auto-optimise-store = true; auto-optimise-store = true;
@ -38,7 +38,7 @@ in {
#ignore global registry #ignore global registry
flake-registry = builtins.toFile "empty-flake-registry.json" ''{"flakes":[],"version":2}''; flake-registry = builtins.toFile "empty-flake-registry.json" ''{"flakes":[],"version":2}'';
#become stable faster stupid #become stable faster stupid
use-xdg-base-directories = true; #use-xdg-base-directories = true;
trusted-users = [ trusted-users = [
"root" "root"
"@wheel" "@wheel"

View file

@ -38,7 +38,7 @@ inputs: {
]; ];
overlays = [ overlays = [
inputs.nvim-flake.overlays.default inputs.nvim-flake.overlay
]; ];
}; };
nix.settings.system-features = ["kvm" "big-parallel" "nixos-test" "benchmark"]; nix.settings.system-features = ["kvm" "big-parallel" "nixos-test" "benchmark"];