commit 17a95099651155c6b80c2bda5cc2e0c4c21b40bd Author: Daniel Flanagan Date: Tue Oct 10 22:49:32 2023 -0500 I'm compiling a kernel for a custom NixOS ISO diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c4a847d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/result diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..8d23886 --- /dev/null +++ b/flake.lock @@ -0,0 +1,653 @@ +{ + "nodes": { + "api-lyte-dev": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1690574004, + "narHash": "sha256-1bF8WGiYe9AwhVaRN2VcyIPmQsnxRL5BPQC1hAe3K64=", + "ref": "refs/heads/master", + "rev": "02bf4481bc8d057a7ef4ae01467f8bd574ccb1c1", + "revCount": 71, + "type": "git", + "url": "ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git" + }, + "original": { + "type": "git", + "url": "ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git" + } + }, + "crane": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": [ + "lytedev", + "helix", + "flake-utils" + ], + "nixpkgs": [ + "lytedev", + "helix", + "nixpkgs" + ], + "rust-overlay": [ + "lytedev", + "helix", + "rust-overlay" + ] + }, + "locked": { + "lastModified": 1688772518, + "narHash": "sha256-ol7gZxwvgLnxNSZwFTDJJ49xVY5teaSvF7lzlo3YQfM=", + "owner": "ipetkov", + "repo": "crane", + "rev": "8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "disko": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1696266752, + "narHash": "sha256-wJnMDFM21+xXdsXSs6pXMElbv4YfqmQslcPApRuaYKs=", + "owner": "nix-community", + "repo": "disko", + "rev": "646ee25c25fffee122a66282861f5f56ad3e0fd9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "disko", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "hardware": { + "locked": { + "lastModified": 1696161939, + "narHash": "sha256-HI1DxS//s46/qv9dcW06TzXaBjxL2DVTQP8R1QsnHzM=", + "owner": "nixos", + "repo": "nixos-hardware", + "rev": "0ab3ee718e964fb42dc57ace6170f19cb0b66532", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixos-hardware", + "type": "github" + } + }, + "helix": { + "inputs": { + "crane": "crane", + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_3", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1696295907, + "narHash": "sha256-GFeo5NpbFQjVeu2lv/B/pfZY/+SIt0KRHjh26s0bXAY=", + "owner": "helix-editor", + "repo": "helix", + "rev": "75c0a5ceb32d8a503915a93ccc1b64c8ad1cba8b", + "type": "github" + }, + "original": { + "owner": "helix-editor", + "repo": "helix", + "rev": "75c0a5ceb32d8a503915a93ccc1b64c8ad1cba8b", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1696145345, + "narHash": "sha256-3dM7I/d4751SLPJah0to1WBlWiyzIiuCEUwJqwBdmr4=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "6f9b5b83ad1f470b3d11b8a9fe1d5ef68c7d0e30", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "home-manager", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "hyprland-protocols": "hyprland-protocols", + "nixpkgs": "nixpkgs_5", + "systems": "systems_3", + "wlroots": "wlroots", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1696261738, + "narHash": "sha256-ujhtnd7vCZHJosOxTi4lgIyHA6iblYwXhx+ZS678fxw=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "b784931e678f907b1f1e41d04485fefd8a1faaf8", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "Hyprland", + "type": "github" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "lytedev", + "hyprland", + "nixpkgs" + ], + "systems": [ + "lytedev", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1691753796, + "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "lowdown-src": { + "flake": false, + "locked": { + "lastModified": 1598695561, + "narHash": "sha256-gyH/5j+h/nWw0W8AcR2WKvNBUsiQ7QuxqSJNXAwV+8E=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "1705b4a26fbf065d9574dce47a94e8c7c79e052f", + "type": "github" + }, + "original": { + "owner": "kristapsdz", + "repo": "lowdown", + "type": "github" + } + }, + "lytedev": { + "inputs": { + "api-lyte-dev": "api-lyte-dev", + "disko": "disko", + "hardware": "hardware", + "helix": "helix", + "home-manager": "home-manager", + "hyprland": "hyprland", + "nixpkgs-stable": "nixpkgs-stable", + "nixpkgs-unstable": "nixpkgs-unstable", + "sops-nix": "sops-nix", + "ssbm": "ssbm" + }, + "locked": { + "lastModified": 1696974152, + "narHash": "sha256-U6WnnSjIhJG8Jkt7Nve7huugLHM02CHfyfzMui+JzsE=", + "ref": "refs/heads/main", + "rev": "60b8d36a035b9025340ef5105a6716c389a37db6", + "revCount": 102, + "type": "git", + "url": "https://git.lyte.dev/lytedev/nix" + }, + "original": { + "type": "git", + "url": "https://git.lyte.dev/lytedev/nix" + } + }, + "nix": { + "inputs": { + "lowdown-src": "lowdown-src", + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1609520816, + "narHash": "sha256-IGO7tfJXsv9u2wpW76VCzOsHYapRZqH9pHGVsoffPrI=", + "owner": "NixOS", + "repo": "nix", + "rev": "8a2ce0f455da32bc20978e68c0aad9efb4560abc", + "type": "github" + }, + "original": { + "id": "nix", + "type": "indirect" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1690026219, + "narHash": "sha256-oOduRk/kzQxOBknZXTLSEYd7tk+GoKvr8wV6Ab+t4AU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "f465da166263bc0d4b39dfd4ca28b777c92d4b73", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1696039360, + "narHash": "sha256-g7nIUV4uq1TOVeVIDEZLb005suTWCUjSY0zYOlSBsyE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "32dcb45f66c0487e92db8303a798ebc548cadedc", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_2": { + "locked": { + "lastModified": 1694908564, + "narHash": "sha256-ducA98AuWWJu5oUElIzN24Q22WlO8bOfixGzBgzYdVc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "596611941a74be176b98aeba9328aa9d01b8b322", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1696019113, + "narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1696125185, + "narHash": "sha256-zJTpVLKg5YhbNJdILfBzYGz9zhM4Cjs5ySaD3eVWcTA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0396d3b0fb7f62ddc79a506ad3e6124f01d2ed0a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1690272529, + "narHash": "sha256-MakzcKXEdv/I4qJUtq/k/eG+rVmyOZLnYNC2w1mB59Y=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ef99fa5c5ed624460217c31ac4271cfb5cb2502c", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1696019113, + "narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1694767346, + "narHash": "sha256-5uH27SiVFUwsTsqC5rs3kS7pBoNhtoy9QfTP9BmknGk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ace5093e36ab1e95cb9463863491bee90d5a4183", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1694760568, + "narHash": "sha256-3G07BiXrp2YQKxdcdms22MUx6spc6A++MSePtatCYuI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "46688f8eb5cd6f1298d873d4d2b9cf245e09e88e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1602702596, + "narHash": "sha256-fqJ4UgOb4ZUnCDIapDb4gCrtAah5Rnr2/At3IzMitig=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ad0d20345219790533ebe06571f82ed6b034db31", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-20.09-small", + "type": "indirect" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1692447944, + "narHash": "sha256-fkJGNjEmTPvqBs215EQU4r9ivecV5Qge5cF/QDLVn3U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d680ded26da5cf104dd2735a51e88d2d8f487b4d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "lytedev": "lytedev" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": [ + "lytedev", + "helix", + "flake-utils" + ], + "nixpkgs": [ + "lytedev", + "helix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1690424156, + "narHash": "sha256-Bpml+L280tHTQpwpC5/BJbU4HSvEzMvW8IZ4gAXimhE=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "f335a0213504c7e6481c359dc1009be9cf34432c", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "slippi-desktop": { + "flake": false, + "locked": { + "lastModified": 1607036060, + "narHash": "sha256-TUYsiVvKAws3N3roZYDwkLB0obyl6zwvh8CAk2RwHrY=", + "owner": "project-slippi", + "repo": "slippi-desktop-app", + "rev": "3ca39ba6bbd02157515b12a79aa01e5d669ad1b1", + "type": "github" + }, + "original": { + "owner": "project-slippi", + "repo": "slippi-desktop-app", + "type": "github" + } + }, + "sops-nix": { + "inputs": { + "nixpkgs": "nixpkgs_6", + "nixpkgs-stable": "nixpkgs-stable_2" + }, + "locked": { + "lastModified": 1695284550, + "narHash": "sha256-z9fz/wz9qo9XePEvdduf+sBNeoI9QG8NJKl5ssA8Xl4=", + "owner": "Mic92", + "repo": "sops-nix", + "rev": "2f375ed8702b0d8ee2430885059d5e7975e38f78", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "sops-nix", + "type": "github" + } + }, + "ssbm": { + "inputs": { + "nix": "nix", + "nixpkgs": "nixpkgs_8", + "slippi-desktop": "slippi-desktop" + }, + "locked": { + "lastModified": 1696638790, + "narHash": "sha256-fmpFkchuAyQfaSOWqEMnw4wRxWFkD7LqBwjKcVog8xQ=", + "owner": "djanatyn", + "repo": "ssbm-nix", + "rev": "cfeb1874b437e5883272c522234d1d15cb3d3ebd", + "type": "github" + }, + "original": { + "owner": "djanatyn", + "repo": "ssbm-nix", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "wlroots": { + "flake": false, + "locked": { + "host": "gitlab.freedesktop.org", + "lastModified": 1696255886, + "narHash": "sha256-0KZfiqqREousitBgG1mkzKmmNX4tjOIWdbBm6MvRCjQ=", + "owner": "wlroots", + "repo": "wlroots", + "rev": "5ef42e8e8adece098848fac53c721b6eb3818fc2", + "type": "gitlab" + }, + "original": { + "host": "gitlab.freedesktop.org", + "owner": "wlroots", + "repo": "wlroots", + "rev": "5ef42e8e8adece098848fac53c721b6eb3818fc2", + "type": "gitlab" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": [ + "lytedev", + "hyprland", + "hyprland-protocols" + ], + "nixpkgs": [ + "lytedev", + "hyprland", + "nixpkgs" + ], + "systems": [ + "lytedev", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1694628480, + "narHash": "sha256-Qg9hstRw0pvjGu5hStkr2UX1D73RYcQ9Ns/KnZMIm9w=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "8f45a6435069b9e24ebd3160eda736d7a391cbf2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..28f4987 --- /dev/null +++ b/flake.nix @@ -0,0 +1,89 @@ +{ + inputs = { + lytedev.url = "git+https://git.lyte.dev/lytedev/nix"; + }; + + outputs = {lytedev, ...}: let + system = "x86_64-linux"; + overlay = final: prev: { + final = { + linux_6_5 = { + patches = []; + kernelPatches = []; + }; + }; + linux_6_5 = prev.linux_6_5.override { + patches = []; + kernelPatches = []; + }; + }; + pkgs = lytedev.inputs.nixpkgs-unstable.legacyPackages."x86_64-linux".extend overlay; + in { + nixosConfigurations.live = lytedev.inputs.nixpkgs-unstable.lib.nixosSystem { + inherit system; + modules = [ + (lytedev.inputs.nixpkgs-unstable + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix") + { + boot.supportedFilesystems = + pkgs.lib.mkForce ["btrfs" "cifs" "f2fs" "jfs" "ntfs" "reiserfs" "vfat" "xfs"]; + + boot.kernelPatches = pkgs.lib.singleton { + name = "no"; + patch = null; + extraConfig = '' + ''; + }; + + boot.kernelPackages = pkgs.linuxPackagesFor ( + pkgs.linux_6_5.override { + argsOverride = { + src = pkgs.fetchurl { + url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.7.tar.xz"; + sha256 = "sha256-DQnqRIAFyc/lOD5Mcqhys5GIuSj4xE4UawOxt4Ufu4w="; + }; + version = "6.5.7"; + modDirVersion = "6.5.7"; + }; + } + ); + } + ]; + }; + # Standalone home-manager configuration entrypoint + # Available through 'home-manager --flake .#your-username@your-hostname' + homeConfigurations = { + # TODO: non-system-specific home configurations? + "foxtrot" = let + system = "x86_64-linux"; + in + lytedev.inputs.home-manager.lib.homeManagerConfiguration { + pkgs = lytedev.inputs.nixpkgs-unstable.legacyPackages.${system}; + extraSpecialArgs = { + inherit (lytedev) outputs inputs colors font; + inherit system; + }; + modules = with lytedev.outputs.homeManagerModules; [sway sway-laptop]; + }; + }; + + diskoConfigurations = import ./disko; + }; + + nixConfig = { + extra-experimental-features = ["nix-command" "flakes"]; + + extra-substituters = [ + "https://cache.nixos.org/" + "https://helix.cachix.org" + "https://nix-community.cachix.org" + "https://nix.h.lyte.dev" + ]; + + extra-trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "h.lyte.dev:HeVWtne31ZG8iMf+c15VY3/Mky/4ufXlfTpT8+4Xbs0=" + ]; + }; +}