diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index ca1ca28..1040ee6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -35,4 +35,4 @@ Please search on the [issue tracker](../) before creating one. ## Your Environment - + diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index c8a8f64..e80861b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -2,7 +2,7 @@ name: "Check & Cachix" on: push: branches: - - main + - master - trying - staging jobs: diff --git a/.github/workflows/mdbook_docs.yml b/.github/workflows/mdbook_docs.yml index 5faf9c2..9d15cc1 100644 --- a/.github/workflows/mdbook_docs.yml +++ b/.github/workflows/mdbook_docs.yml @@ -3,7 +3,7 @@ name: Deploy Docs to GitHub Pages on: push: branches: - - main + - master jobs: deploy: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b22de0..111be31 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 with: - ref: core + ref: master - name: Update Changelog uses: heinrichreimer/github-changelog-generator-action@v2.1.1 with: @@ -49,7 +49,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 with: - ref: core + ref: master - name: Get Changelog Entry id: changelog_reader diff --git a/.gitignore b/.gitignore index 4a99123..6cce155 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ result .direnv doc/index.html -# Result of flk commands +# Result of bud commands vm iso doi diff --git a/README.md b/README.md index f088ca0..1d81382 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,13 @@ Make an awesome template for NixOS users, with consideration for common tools li [devshell][devshell], and [more](./doc/integrations). ### No. Why _flakes_? -Flakes are a part of an explicit push to improve [Nix's UI](https://github.com/NixOS/nix/blob/master/doc/manual/src/contributing/cli-guideline.md), and have become an intergral part of that effort. +Flakes are a part of an explicit push to improve [Nix's UX](https://github.com/NixOS/nix/blob/master/doc/manual/src/contributing/cli-guideline.md), and have become an integral part of that effort. They also make [Nix expressions](https://nixos.org/manual/nix/unstable/expressions/expression-syntax.html) easier to distribute and reuse with convient [flake references](https://github.com/NixOS/nix/blob/master/src/nix/flake.md#flake-references) for building or using packages, modules, and whole systems. ## Getting Started Check out the [guide](https://devos.divnix.com/start) to get up and running. -Also, have a look at [_flake.nix_][toc]. If anything is not immediately +Also, have a look at [_flake.nix_](./flake.nix). If anything is not immediately discoverable via "[`digga`][digga]'s [`mkFlake`][mk-flake], please file a bug report. @@ -88,4 +88,4 @@ DevOS is licensed under the [MIT License][mit]. [nixpkgs]: https://github.com/NixOS/nixpkgs [nvfetcher]: https://github.com/berberman/nvfetcher [please]: https://github.com/nrdxp/devos/tree/nrd - +[matrix]: https://matrix.to/#/#devos:nixos.org diff --git a/bud/get.bash b/bud/get.bash index 3b4d9a7..770c002 100644 --- a/bud/get.bash +++ b/bud/get.bash @@ -1 +1 @@ -nix flake new -t "github:divnix/devos/core" "${2:-devos}" +nix flake new -t "github:divnix/devos/master" "${2:-devos}" diff --git a/flake.lock b/flake.lock index 34e9802..92d2d0b 100644 --- a/flake.lock +++ b/flake.lock @@ -106,10 +106,9 @@ "deploy": { "inputs": { "flake-compat": "flake-compat", - "naersk": "naersk", "nixpkgs": [ "digga", - "nixpkgs" + "latest" ], "utils": [ "digga", @@ -117,11 +116,11 @@ ] }, "locked": { - "lastModified": 1628752686, - "narHash": "sha256-Lzh9MYUJDsjgif+YEyOErXtj1IH+ci8J1C30g1ms69s=", + "lastModified": 1632822684, + "narHash": "sha256-lt7eayYmgsD5OQwpb1XYfHpxttn43bWo7G7hIJs+zJw=", "owner": "serokell", "repo": "deploy-rs", - "rev": "e5546f9c2503c26d175f08a81fc0a0f330be4cbe", + "rev": "9a02de4373e0ec272d08a417b269a28ac8b961b4", "type": "github" }, "original": { @@ -132,11 +131,11 @@ }, "devshell": { "locked": { - "lastModified": 1629275356, - "narHash": "sha256-R17M69EKXP6q8/mNHaK53ECwjFo1pdF+XaJC9Qq8zjg=", + "lastModified": 1632436039, + "narHash": "sha256-OtITeVWcKXn1SpVEnImpTGH91FycCskGBPqmlxiykv4=", "owner": "numtide", "repo": "devshell", - "rev": "26f25a12265f030917358a9632cd600b51af1d97", + "rev": "7a7a7aa0adebe5488e5abaec688fd9ae0f8ea9c6", "type": "github" }, "original": { @@ -155,6 +154,7 @@ "home-manager": [ "home" ], + "latest": "latest", "nix": "nix", "nixlib": [ "nixos" @@ -165,11 +165,11 @@ ] }, "locked": { - "lastModified": 1631974852, - "narHash": "sha256-f2K83yDufQWp22kjtOQXHfsXXyUbndCMxrhG57mI9DE=", + "lastModified": 1632959483, + "narHash": "sha256-jXogai6e+QRtiZFBOrMmYdeLXejzVT91kuDKu2RuJ10=", "owner": "divnix", "repo": "digga", - "rev": "8e91e1814ef0ab294731ceb106ffdac009363702", + "rev": "6549cf4c87d1a77138cbecbc6bb9483c20572cd7", "type": "github" }, "original": { @@ -184,11 +184,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1632364326, - "narHash": "sha256-oksVLLm/4wSM6FTBcWFvqs0kzrAqZVT029aLXEp/ExI=", + "lastModified": 1633141670, + "narHash": "sha256-+uijaBz8uRHqfzLj2CZlizBMFSNdkAUFLzePjoJ7NZY=", "owner": "nix-community", "repo": "fenix", - "rev": "b04bbfe1ed32cfa3c5ec40cbd9f36b19e4e7592e", + "rev": "24731cb4716d4583e4db427f4320534389640fb5", "type": "github" }, "original": { @@ -200,11 +200,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1606424373, - "narHash": "sha256-oq8d4//CJOrVj+EcOaSXvMebvuTkmBJuT5tzlfewUnQ=", + "lastModified": 1627913399, + "narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=", "owner": "edolstra", "repo": "flake-compat", - "rev": "99f1c2157fba4bfe6211a321fd0ee43199025dbf", + "rev": "12c64ca55c1014cdc1b16ed5a804aa8576601ff2", "type": "github" }, "original": { @@ -287,17 +287,34 @@ }, "latest": { "locked": { - "lastModified": 1632325095, - "narHash": "sha256-KHVVIxhVHq4Wwj4oQPem8/eVkukVKhSPqFKI1o5NrTw=", - "owner": "NixOS", + "lastModified": 1632660378, + "narHash": "sha256-sjA8eQlnyDjDLyAyq3XlJmN0nqW0ftl/pb7VnMg86L0=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "a930f7da84786807bb105df40e76b541604c3e72", + "rev": "31ffc50c571e6683e9ecc9dbcbd4a8e9914b4497", "type": "github" }, "original": { - "id": "nixpkgs", + "owner": "nixos", "ref": "nixos-unstable", - "type": "indirect" + "repo": "nixpkgs", + "type": "github" + } + }, + "latest_2": { + "locked": { + "lastModified": 1633080050, + "narHash": "sha256-T9I2WnlUzAIL70dk9V1jqaYk3nypy/cMkWR19S47ZHc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "82155ff501c7622cb2336646bb62f7624261f6d7", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" } }, "lowdown-src": { @@ -318,29 +335,6 @@ } }, "naersk": { - "inputs": { - "nixpkgs": [ - "digga", - "deploy", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1622810282, - "narHash": "sha256-4wmvM3/xfD0hCdNDIXVzRMfL4yB1J+DjH6Zte2xbAxk=", - "owner": "nmattia", - "repo": "naersk", - "rev": "e8061169e1495871b56be97c5c51d310fae01374", - "type": "github" - }, - "original": { - "owner": "nmattia", - "ref": "master", - "repo": "naersk", - "type": "github" - } - }, - "naersk_2": { "inputs": { "nixpkgs": [ "latest" @@ -384,17 +378,18 @@ }, "nixos": { "locked": { - "lastModified": 1632378131, - "narHash": "sha256-r/zMNkbh61eIh/1Njp8+y6mwqCltis4u8giP5kg5LBY=", - "owner": "NixOS", + "lastModified": 1633176478, + "narHash": "sha256-D6HDiWHo8V6Iq7cUZ4ZoPyVL7hImR+XcOvNVI3CEl3k=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "d22c3a6bc15d965f82020c69924bf700ef3b3275", + "rev": "520179f2208a8ed8bb5efa0e8f37d584645aac1f", "type": "github" }, "original": { - "id": "nixpkgs", + "owner": "nixos", "ref": "release-21.05", - "type": "indirect" + "repo": "nixpkgs", + "type": "github" } }, "nixos-generators": { @@ -424,11 +419,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1632267580, - "narHash": "sha256-AvNXdmaPHYs6idbfgu1H40vEw4Wq15xLAgCnpCN1l1A=", + "lastModified": 1632990363, + "narHash": "sha256-SNqz+9Vt4yDHqw8u/CMFdzMQTulKoMlVGJdshfcb5O0=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "3cc8c47af31798040ea62499090540413279f832", + "rev": "0a8b8054c9920368a3c15e6d766188fdf04b736f", "type": "github" }, "original": { @@ -439,11 +434,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1631962327, - "narHash": "sha256-h2fgtNHozEcB42BQ1QVWAJUpQ1FA3gpgq/RrOKAxbfE=", + "lastModified": 1633080050, + "narHash": "sha256-T9I2WnlUzAIL70dk9V1jqaYk3nypy/cMkWR19S47ZHc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bc9b956714ed6eac5f8888322aac5bc41389defa", + "rev": "82155ff501c7622cb2336646bb62f7624261f6d7", "type": "github" }, "original": { @@ -470,11 +465,11 @@ ] }, "locked": { - "lastModified": 1628690139, - "narHash": "sha256-9bk59V0YjZnMfSQMCHuYVPA/Bc3enjTtoyTWt1B3/zE=", + "lastModified": 1632700276, + "narHash": "sha256-XABvQUq2qv+YcQxW93DnU8mgtVsGJWyhcznny/Lbp0Q=", "owner": "berberman", "repo": "nvfetcher", - "rev": "e9600782adbf6fb8217087bd2f05335cad96e542", + "rev": "248fe98ed1bc352ce164d08a9e76fdc5f301ba2d", "type": "github" }, "original": { @@ -534,8 +529,8 @@ "flake-utils-plus" ], "home": "home", - "latest": "latest", - "naersk": "naersk_2", + "latest": "latest_2", + "naersk": "naersk", "nixlib": [ "digga", "nixlib" @@ -551,11 +546,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1632341070, - "narHash": "sha256-e8ML3a8tHPPbd/TyYU5sCFymyr8hycoxN4PFkVft1YQ=", + "lastModified": 1633118502, + "narHash": "sha256-dQQFD5Yw5KgsepO0gD6ttBmMQXxWZgWNe7wm+fZbVvg=", "owner": "rust-analyzer", "repo": "rust-analyzer", - "rev": "075fe761f393c0445bc375175eaa52164bbdc728", + "rev": "237ea0d34dced3444486931f68e87cd07f52b6a8", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index b889e8e..699467e 100644 --- a/flake.nix +++ b/flake.nix @@ -4,8 +4,8 @@ nixConfig.extra-experimental-features = "nix-command flakes ca-references"; inputs = { - nixos.url = "nixpkgs/release-21.05"; - latest.url = "nixpkgs/nixos-unstable"; + nixos.url = "github:nixos/nixpkgs/release-21.05"; + latest.url = "github:nixos/nixpkgs/nixos-unstable"; digga.url = "github:divnix/digga"; digga.inputs.nixpkgs.follows = "nixos"; @@ -76,13 +76,16 @@ digga.overlays.patchedNix agenix.overlay nvfetcher.overlay - deploy.overlay ./pkgs/default.nix fenix.overlay ]; }; - latest = { }; + latest = { + overlays = [ + deploy.overlay + ]; + }; }; lib = import ./lib { lib = digga.lib // nixos.lib; }; @@ -100,8 +103,8 @@ hostDefaults = { system = "x86_64-linux"; channelName = "nixos"; - imports = [ (digga.lib.importModules ./modules) ]; - externalModules = [ + imports = [ (digga.lib.importExportableModules ./modules) ]; + modules = [ { lib.our = self.lib; } digga.nixosModules.bootstrapIso digga.nixosModules.nixConfig @@ -124,8 +127,8 @@ }; home = { - imports = [ (digga.lib.importModules ./users/modules) ]; - externalModules = [ ]; + imports = [ (digga.lib.importExportableModules ./users/modules) ]; + modules = [ ]; importables = rec { profiles = digga.lib.rakeLeaves ./users/profiles; suites = with profiles; rec { diff --git a/hosts/bootstrap.nix b/hosts/bootstrap.nix new file mode 100644 index 0000000..d491855 --- /dev/null +++ b/hosts/bootstrap.nix @@ -0,0 +1,18 @@ +{ profiles, ... }: +{ + # build with: `bud build bootstrap bootstrapIso` + # reachable on the local link via ssh root@fe80::47%eno1 + # where 'eno1' is replaced by your own machine's network + # interface that has the local link to the target machine + imports = [ + # profiles.networking + profiles.core + profiles.users.root # make sure to configure ssh keys + profiles.users.nixos + ]; + + boot.loader.systemd-boot.enable = true; + + # will be overridden by the bootstrapIso instrumentation + fileSystems."/" = { device = "/dev/disk/by-label/nixos"; }; +} diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 882c769..7ae291d 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -13,6 +13,7 @@ channels: final: prev: { qutebrowser nvfetcher signal-desktop + delve neovim neovim-unwrapped starship; diff --git a/shell/default.nix b/shell/default.nix index aef90a5..d22b3af 100644 --- a/shell/default.nix +++ b/shell/default.nix @@ -1,9 +1,9 @@ { self, inputs, ... }: { - externalModules = with inputs; [ + modules = with inputs; [ bud.devshellModules.bud ]; - modules = [ + exportedModules = [ ./devos.nix ]; } diff --git a/shell/devos.nix b/shell/devos.nix index 128b45c..9090143 100644 --- a/shell/devos.nix +++ b/shell/devos.nix @@ -41,7 +41,7 @@ in category = "devos"; name = pkgs.nvfetcher-bin.pname; help = pkgs.nvfetcher-bin.meta.description; - command = "cd $DEVSHELL_ROOT/pkgs; ${pkgs.nvfetcher-bin}/bin/nvfetcher -c ./sources.toml --no-output $@"; + command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher-bin}/bin/nvfetcher -c ./sources.toml $@"; } (linter nixpkgs-fmt) (linter editorconfig-checker)