From ea9d99b2a965b24083567d0ee604b406eed171cb Mon Sep 17 00:00:00 2001 From: Joshua Potter Date: Fri, 8 Dec 2023 12:07:54 -0700 Subject: [PATCH] Unnest machines to top-level. --- .gitignore | 1 - infra/.sops.yaml => .sops.yaml | 0 desktop/flake.nix | 44 --- flake.lock | 282 ++++++++++++++++++ flake.nix | 42 +++ {desktop => framework}/configuration.nix | 2 +- {desktop => framework}/flake.lock | 0 framework/flake.nix | 39 +++ framework/hardware-configuration.nix | 38 +++ .../jrpotter/bash/default.nix | 0 .../jrpotter/bash/git-prompt.sh | 0 {desktop => framework}/jrpotter/default.nix | 0 {desktop => framework}/jrpotter/git.nix | 0 {desktop => framework}/jrpotter/lang/bash.nix | 0 {desktop => framework}/jrpotter/lang/c.nix | 0 .../jrpotter/lang/elixir.nix | 0 {desktop => framework}/jrpotter/lang/lean.nix | 0 {desktop => framework}/jrpotter/lang/lua.nix | 0 .../jrpotter/lang/markdown.nix | 0 {desktop => framework}/jrpotter/lang/nix.nix | 0 .../jrpotter/lang/python.nix | 0 .../jrpotter/lang/typescript.nix | 0 .../jrpotter/neovim/default.nix | 0 .../jrpotter/neovim/lua/default.nix | 0 .../jrpotter/neovim/lua/init/c.lua | 0 .../jrpotter/neovim/lua/init/cmp.lua | 0 .../jrpotter/neovim/lua/init/dap.lua | 0 .../jrpotter/neovim/lua/init/lsp.lua | 0 .../jrpotter/neovim/lua/init/lua.lua | 0 .../jrpotter/neovim/lua/init/python.lua | 0 .../jrpotter/neovim/lua/init/statusline.lua | 0 .../jrpotter/neovim/lua/init/telescope.lua | 0 .../jrpotter/neovim/lua/init/treesitter.lua | 0 .../jrpotter/neovim/utils.nix | 0 .../jrpotter/wezterm/default.nix | 0 .../jrpotter/wezterm/wezterm.lua | 0 infra/flake.nix | 33 -- infra/phobos/flake.lock | 27 -- {infra => phobos}/flake.lock | 70 +---- {infra/phobos => phobos}/flake.nix | 15 +- {infra/phobos => phobos}/secrets.yaml | 0 41 files changed, 421 insertions(+), 172 deletions(-) delete mode 100644 .gitignore rename infra/.sops.yaml => .sops.yaml (100%) delete mode 100644 desktop/flake.nix create mode 100644 flake.lock create mode 100644 flake.nix rename {desktop => framework}/configuration.nix (98%) rename {desktop => framework}/flake.lock (100%) create mode 100644 framework/flake.nix create mode 100644 framework/hardware-configuration.nix rename {desktop => framework}/jrpotter/bash/default.nix (100%) rename {desktop => framework}/jrpotter/bash/git-prompt.sh (100%) rename {desktop => framework}/jrpotter/default.nix (100%) rename {desktop => framework}/jrpotter/git.nix (100%) rename {desktop => framework}/jrpotter/lang/bash.nix (100%) rename {desktop => framework}/jrpotter/lang/c.nix (100%) rename {desktop => framework}/jrpotter/lang/elixir.nix (100%) rename {desktop => framework}/jrpotter/lang/lean.nix (100%) rename {desktop => framework}/jrpotter/lang/lua.nix (100%) rename {desktop => framework}/jrpotter/lang/markdown.nix (100%) rename {desktop => framework}/jrpotter/lang/nix.nix (100%) rename {desktop => framework}/jrpotter/lang/python.nix (100%) rename {desktop => framework}/jrpotter/lang/typescript.nix (100%) rename {desktop => framework}/jrpotter/neovim/default.nix (100%) rename {desktop => framework}/jrpotter/neovim/lua/default.nix (100%) rename {desktop => framework}/jrpotter/neovim/lua/init/c.lua (100%) rename {desktop => framework}/jrpotter/neovim/lua/init/cmp.lua (100%) rename {desktop => framework}/jrpotter/neovim/lua/init/dap.lua (100%) rename {desktop => framework}/jrpotter/neovim/lua/init/lsp.lua (100%) rename {desktop => framework}/jrpotter/neovim/lua/init/lua.lua (100%) rename {desktop => framework}/jrpotter/neovim/lua/init/python.lua (100%) rename {desktop => framework}/jrpotter/neovim/lua/init/statusline.lua (100%) rename {desktop => framework}/jrpotter/neovim/lua/init/telescope.lua (100%) rename {desktop => framework}/jrpotter/neovim/lua/init/treesitter.lua (100%) rename {desktop => framework}/jrpotter/neovim/utils.nix (100%) rename {desktop => framework}/jrpotter/wezterm/default.nix (100%) rename {desktop => framework}/jrpotter/wezterm/wezterm.lua (100%) delete mode 100644 infra/flake.nix delete mode 100644 infra/phobos/flake.lock rename {infra => phobos}/flake.lock (70%) rename {infra/phobos => phobos}/flake.nix (90%) rename {infra/phobos => phobos}/secrets.yaml (100%) diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 577b0a0..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -hardware-configuration.nix diff --git a/infra/.sops.yaml b/.sops.yaml similarity index 100% rename from infra/.sops.yaml rename to .sops.yaml diff --git a/desktop/flake.nix b/desktop/flake.nix deleted file mode 100644 index db78abe..0000000 --- a/desktop/flake.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - description = "NixOS Flake"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; - bootstrap = { - url = "github:jrpotter/bootstrap/v0.1.2"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - home-manager = { - url = "github:nix-community/home-manager/release-23.05"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = { nixpkgs, bootstrap, home-manager, ... }: - let - system = "x86_64-linux"; - in - { - nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { - inherit system; - - modules = [ - ./configuration.nix - home-manager.nixosModules.home-manager - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - - users.jrpotter = import ./jrpotter; - - # Used to pass non-default parameters to submodules. - extraSpecialArgs = { - inherit system; - bootstrap = bootstrap.packages.${system}.default; - }; - }; - } - ]; - }; - }; -} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..1fc6c28 --- /dev/null +++ b/flake.lock @@ -0,0 +1,282 @@ +{ + "nodes": { + "boardwise": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1701963345, + "narHash": "sha256-ObPo2TtW4JqhpjR/bzuGDPvcQp21ykImi5DYD7gKg4Q=", + "owner": "boardwise-gg", + "repo": "website", + "rev": "0eca8e5f5f9cf1b4c12c1d50e851dad94b33c0a9", + "type": "github" + }, + "original": { + "owner": "boardwise-gg", + "ref": "v0.1.0", + "repo": "website", + "type": "github" + } + }, + "bootstrap": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "nixpkgs": [ + "framework", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1701362005, + "narHash": "sha256-YueE+a2t54o41flddLpOlz3O6XZtSlaQyQVn909k4R4=", + "owner": "jrpotter", + "repo": "bootstrap", + "rev": "383ada86616194d8bf66b9646ec601f84c6add05", + "type": "github" + }, + "original": { + "owner": "jrpotter", + "ref": "v0.1.2", + "repo": "bootstrap", + "type": "github" + } + }, + "flake-compat": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_2": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "framework": { + "inputs": { + "bootstrap": "bootstrap", + "home-manager": "home-manager", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1, + "narHash": "sha256-El3RJD5VwflvBxsxtzx3V7rz96G8JxgN9UWi2hxw9Mo=", + "path": "./framework", + "type": "path" + }, + "original": { + "path": "./framework", + "type": "path" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "framework", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1699748081, + "narHash": "sha256-MOmMapBydd7MTjhX4eeQZzKlCABWw8W6iSHSG4OeFKE=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "04bac349d585c9df38d78e0285b780a140dc74a4", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-23.05", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1701615100, + "narHash": "sha256-7VI84NGBvlCTduw2aHLVB62NvCiZUlALLqBe5v684Aw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9f06adb793d1cca5384907b3b8a4071d5d7cb19", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1701568804, + "narHash": "sha256-iwr1fjOCvlirVL/xNvOTwY9kg3L/F3TC/7yh/QszaPI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "dc01248a9c946953ad4d438b0a626f5c987a93e4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1700794826, + "narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "phobos": { + "inputs": { + "boardwise": "boardwise", + "nixpkgs": [ + "nixpkgs" + ], + "sops-nix": "sops-nix" + }, + "locked": { + "lastModified": 1, + "narHash": "sha256-/ZJi6zwrTNAJihWJDtLqmvnJEoZFXI2BqVesNqLP1xM=", + "path": "./phobos", + "type": "path" + }, + "original": { + "path": "./phobos", + "type": "path" + } + }, + "root": { + "inputs": { + "framework": "framework", + "nixpkgs": "nixpkgs", + "phobos": "phobos" + } + }, + "sops-nix": { + "inputs": { + "nixpkgs": [ + "phobos", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1701728052, + "narHash": "sha256-7lOMc3PtW5a55vFReBJLLLOnopsoi1W7MkjJ93jPV4E=", + "owner": "Mic92", + "repo": "sops-nix", + "rev": "e91ece6d2cf5a0ae729796b8f0dedceab5107c3d", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "sops-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" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f3ecefe --- /dev/null +++ b/flake.nix @@ -0,0 +1,42 @@ +{ + description = "Colmena hive configuration."; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; + framework = { + url = "path:./framework"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + phobos = { + url = "path:./phobos"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { nixpkgs, framework, phobos, ... }: + let + system = "x86_64-linux"; + in + { + colmena = { + meta = { + nixpkgs = import nixpkgs { inherit system; }; + specialArgs = { inherit system; }; + }; + + # Local machines. Deploy using `colmena apply-local [--sudo]` + + framework = { + imports = [ framework.nixosModules.default ]; + deployment = { + allowLocalDeployment = true; + targetHost = null; # Disable SSH deployment. + }; + }; + + # Remote machines. Deploy using `colmena apply` + + phobos = phobos.nixosModules.default; + }; + }; +} diff --git a/desktop/configuration.nix b/framework/configuration.nix similarity index 98% rename from desktop/configuration.nix rename to framework/configuration.nix index c40483f..c8c1976 100644 --- a/desktop/configuration.nix +++ b/framework/configuration.nix @@ -59,7 +59,7 @@ hardware.bluetooth.enable = true; - networking.hostName = "nixos"; + networking.hostName = "framework"; networking.networkmanager.enable = true; nix.settings.experimental-features = [ "nix-command" "flakes" ]; diff --git a/desktop/flake.lock b/framework/flake.lock similarity index 100% rename from desktop/flake.lock rename to framework/flake.lock diff --git a/framework/flake.nix b/framework/flake.nix new file mode 100644 index 0000000..2c0e2c8 --- /dev/null +++ b/framework/flake.nix @@ -0,0 +1,39 @@ +{ + description = "Local machine - framework"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; + bootstrap = { + url = "github:jrpotter/bootstrap/v0.1.2"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { + url = "github:nix-community/home-manager/release-23.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { bootstrap, home-manager, ... }: { + nixosModules.default = { pkgs, system, ... }: + let + jrpotter-home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.jrpotter = import ./jrpotter; + + # Used to pass non-default parameters to submodules. + extraSpecialArgs = { + inherit system; + bootstrap = bootstrap.packages.${system}.default; + }; + }; + in + { + imports = [ + ./configuration.nix + home-manager.nixosModules.home-manager + { home-manager = jrpotter-home-manager; } + ]; + }; + }; +} diff --git a/framework/hardware-configuration.nix b/framework/hardware-configuration.nix new file mode 100644 index 0000000..faf4a3c --- /dev/null +++ b/framework/hardware-configuration.nix @@ -0,0 +1,38 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/cb6f7cbc-f3a1-4347-8193-9047090d8ee1"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/DED1-6712"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp170s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/desktop/jrpotter/bash/default.nix b/framework/jrpotter/bash/default.nix similarity index 100% rename from desktop/jrpotter/bash/default.nix rename to framework/jrpotter/bash/default.nix diff --git a/desktop/jrpotter/bash/git-prompt.sh b/framework/jrpotter/bash/git-prompt.sh similarity index 100% rename from desktop/jrpotter/bash/git-prompt.sh rename to framework/jrpotter/bash/git-prompt.sh diff --git a/desktop/jrpotter/default.nix b/framework/jrpotter/default.nix similarity index 100% rename from desktop/jrpotter/default.nix rename to framework/jrpotter/default.nix diff --git a/desktop/jrpotter/git.nix b/framework/jrpotter/git.nix similarity index 100% rename from desktop/jrpotter/git.nix rename to framework/jrpotter/git.nix diff --git a/desktop/jrpotter/lang/bash.nix b/framework/jrpotter/lang/bash.nix similarity index 100% rename from desktop/jrpotter/lang/bash.nix rename to framework/jrpotter/lang/bash.nix diff --git a/desktop/jrpotter/lang/c.nix b/framework/jrpotter/lang/c.nix similarity index 100% rename from desktop/jrpotter/lang/c.nix rename to framework/jrpotter/lang/c.nix diff --git a/desktop/jrpotter/lang/elixir.nix b/framework/jrpotter/lang/elixir.nix similarity index 100% rename from desktop/jrpotter/lang/elixir.nix rename to framework/jrpotter/lang/elixir.nix diff --git a/desktop/jrpotter/lang/lean.nix b/framework/jrpotter/lang/lean.nix similarity index 100% rename from desktop/jrpotter/lang/lean.nix rename to framework/jrpotter/lang/lean.nix diff --git a/desktop/jrpotter/lang/lua.nix b/framework/jrpotter/lang/lua.nix similarity index 100% rename from desktop/jrpotter/lang/lua.nix rename to framework/jrpotter/lang/lua.nix diff --git a/desktop/jrpotter/lang/markdown.nix b/framework/jrpotter/lang/markdown.nix similarity index 100% rename from desktop/jrpotter/lang/markdown.nix rename to framework/jrpotter/lang/markdown.nix diff --git a/desktop/jrpotter/lang/nix.nix b/framework/jrpotter/lang/nix.nix similarity index 100% rename from desktop/jrpotter/lang/nix.nix rename to framework/jrpotter/lang/nix.nix diff --git a/desktop/jrpotter/lang/python.nix b/framework/jrpotter/lang/python.nix similarity index 100% rename from desktop/jrpotter/lang/python.nix rename to framework/jrpotter/lang/python.nix diff --git a/desktop/jrpotter/lang/typescript.nix b/framework/jrpotter/lang/typescript.nix similarity index 100% rename from desktop/jrpotter/lang/typescript.nix rename to framework/jrpotter/lang/typescript.nix diff --git a/desktop/jrpotter/neovim/default.nix b/framework/jrpotter/neovim/default.nix similarity index 100% rename from desktop/jrpotter/neovim/default.nix rename to framework/jrpotter/neovim/default.nix diff --git a/desktop/jrpotter/neovim/lua/default.nix b/framework/jrpotter/neovim/lua/default.nix similarity index 100% rename from desktop/jrpotter/neovim/lua/default.nix rename to framework/jrpotter/neovim/lua/default.nix diff --git a/desktop/jrpotter/neovim/lua/init/c.lua b/framework/jrpotter/neovim/lua/init/c.lua similarity index 100% rename from desktop/jrpotter/neovim/lua/init/c.lua rename to framework/jrpotter/neovim/lua/init/c.lua diff --git a/desktop/jrpotter/neovim/lua/init/cmp.lua b/framework/jrpotter/neovim/lua/init/cmp.lua similarity index 100% rename from desktop/jrpotter/neovim/lua/init/cmp.lua rename to framework/jrpotter/neovim/lua/init/cmp.lua diff --git a/desktop/jrpotter/neovim/lua/init/dap.lua b/framework/jrpotter/neovim/lua/init/dap.lua similarity index 100% rename from desktop/jrpotter/neovim/lua/init/dap.lua rename to framework/jrpotter/neovim/lua/init/dap.lua diff --git a/desktop/jrpotter/neovim/lua/init/lsp.lua b/framework/jrpotter/neovim/lua/init/lsp.lua similarity index 100% rename from desktop/jrpotter/neovim/lua/init/lsp.lua rename to framework/jrpotter/neovim/lua/init/lsp.lua diff --git a/desktop/jrpotter/neovim/lua/init/lua.lua b/framework/jrpotter/neovim/lua/init/lua.lua similarity index 100% rename from desktop/jrpotter/neovim/lua/init/lua.lua rename to framework/jrpotter/neovim/lua/init/lua.lua diff --git a/desktop/jrpotter/neovim/lua/init/python.lua b/framework/jrpotter/neovim/lua/init/python.lua similarity index 100% rename from desktop/jrpotter/neovim/lua/init/python.lua rename to framework/jrpotter/neovim/lua/init/python.lua diff --git a/desktop/jrpotter/neovim/lua/init/statusline.lua b/framework/jrpotter/neovim/lua/init/statusline.lua similarity index 100% rename from desktop/jrpotter/neovim/lua/init/statusline.lua rename to framework/jrpotter/neovim/lua/init/statusline.lua diff --git a/desktop/jrpotter/neovim/lua/init/telescope.lua b/framework/jrpotter/neovim/lua/init/telescope.lua similarity index 100% rename from desktop/jrpotter/neovim/lua/init/telescope.lua rename to framework/jrpotter/neovim/lua/init/telescope.lua diff --git a/desktop/jrpotter/neovim/lua/init/treesitter.lua b/framework/jrpotter/neovim/lua/init/treesitter.lua similarity index 100% rename from desktop/jrpotter/neovim/lua/init/treesitter.lua rename to framework/jrpotter/neovim/lua/init/treesitter.lua diff --git a/desktop/jrpotter/neovim/utils.nix b/framework/jrpotter/neovim/utils.nix similarity index 100% rename from desktop/jrpotter/neovim/utils.nix rename to framework/jrpotter/neovim/utils.nix diff --git a/desktop/jrpotter/wezterm/default.nix b/framework/jrpotter/wezterm/default.nix similarity index 100% rename from desktop/jrpotter/wezterm/default.nix rename to framework/jrpotter/wezterm/default.nix diff --git a/desktop/jrpotter/wezterm/wezterm.lua b/framework/jrpotter/wezterm/wezterm.lua similarity index 100% rename from desktop/jrpotter/wezterm/wezterm.lua rename to framework/jrpotter/wezterm/wezterm.lua diff --git a/infra/flake.nix b/infra/flake.nix deleted file mode 100644 index 4557137..0000000 --- a/infra/flake.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - description = "Configuration of all remote NixOS machines."; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; - phobos = { - url = "path:./phobos"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - sops-nix = { - url = "github:Mic92/sops-nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = { nixpkgs, phobos, sops-nix, ... }: - let - system = "x86_64-linux"; - in - { - colmena = { - meta = { - nixpkgs = import nixpkgs { - inherit system; - }; - specialArgs = { inherit system; }; - }; - - # Remote machines - phobos = phobos.nixosModules.default; - }; - }; -} diff --git a/infra/phobos/flake.lock b/infra/phobos/flake.lock deleted file mode 100644 index a9a33a9..0000000 --- a/infra/phobos/flake.lock +++ /dev/null @@ -1,27 +0,0 @@ -{ - "nodes": { - "nixpkgs": { - "locked": { - "lastModified": 1701615100, - "narHash": "sha256-7VI84NGBvlCTduw2aHLVB62NvCiZUlALLqBe5v684Aw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e9f06adb793d1cca5384907b3b8a4071d5d7cb19", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/infra/flake.lock b/phobos/flake.lock similarity index 70% rename from infra/flake.lock rename to phobos/flake.lock index 0bba99f..4f49e5a 100644 --- a/infra/flake.lock +++ b/phobos/flake.lock @@ -4,10 +4,7 @@ "inputs": { "flake-compat": "flake-compat", "flake-utils": "flake-utils", - "nixpkgs": [ - "phobos", - "nixpkgs" - ] + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1701963345, @@ -58,16 +55,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1701952659, - "narHash": "sha256-TJv2srXt6fYPUjxgLAL0cy4nuf1OZD4KuA1TrCiQqg0=", + "lastModified": 1700794826, + "narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b4372c4924d9182034066c823df76d6eaf1f4ec4", + "rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -88,52 +85,32 @@ "type": "github" } }, - "nixpkgs-stable_2": { + "nixpkgs_2": { "locked": { - "lastModified": 1701568804, - "narHash": "sha256-iwr1fjOCvlirVL/xNvOTwY9kg3L/F3TC/7yh/QszaPI=", + "lastModified": 1701615100, + "narHash": "sha256-7VI84NGBvlCTduw2aHLVB62NvCiZUlALLqBe5v684Aw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dc01248a9c946953ad4d438b0a626f5c987a93e4", + "rev": "e9f06adb793d1cca5384907b3b8a4071d5d7cb19", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-23.05", + "ref": "nixos-23.05", "repo": "nixpkgs", "type": "github" } }, - "phobos": { - "inputs": { - "boardwise": "boardwise", - "nixpkgs": [ - "nixpkgs" - ], - "sops-nix": "sops-nix" - }, - "locked": { - "lastModified": 1, - "narHash": "sha256-eJcRqFATORPXB3PXPLiR+5lAJDNiEK+SbpdBkBcS3G8=", - "path": "./phobos", - "type": "path" - }, - "original": { - "path": "./phobos", - "type": "path" - } - }, "root": { "inputs": { - "nixpkgs": "nixpkgs", - "phobos": "phobos", - "sops-nix": "sops-nix_2" + "boardwise": "boardwise", + "nixpkgs": "nixpkgs_2", + "sops-nix": "sops-nix" } }, "sops-nix": { "inputs": { "nixpkgs": [ - "phobos", "nixpkgs" ], "nixpkgs-stable": "nixpkgs-stable" @@ -152,27 +129,6 @@ "type": "github" } }, - "sops-nix_2": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable_2" - }, - "locked": { - "lastModified": 1701728052, - "narHash": "sha256-7lOMc3PtW5a55vFReBJLLLOnopsoi1W7MkjJ93jPV4E=", - "owner": "Mic92", - "repo": "sops-nix", - "rev": "e91ece6d2cf5a0ae729796b8f0dedceab5107c3d", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "sops-nix", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/infra/phobos/flake.nix b/phobos/flake.nix similarity index 90% rename from infra/phobos/flake.nix rename to phobos/flake.nix index 8727e23..52eb4be 100644 --- a/infra/phobos/flake.nix +++ b/phobos/flake.nix @@ -1,11 +1,10 @@ { - description = "Phobos machine"; + description = "Remote machine - phobos"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; boardwise = { url = "github:boardwise-gg/website/v0.1.0"; - inputs.nixpkgs.follows = "nixpkgs"; }; sops-nix = { url = "github:Mic92/sops-nix"; @@ -20,13 +19,7 @@ sops-nix.nixosModules.sops ]; - sops.defaultSopsFile = ./secrets.yaml; - sops.secrets.example-key = {}; - sops.secrets."myservice/my_subdir/my_secret" = {}; - - deployment = { - targetHost = "146.190.127.180"; - }; + deployment.targetHost = "146.190.127.180"; networking = { hostName = "phobos"; @@ -55,6 +48,10 @@ }; }; + sops.defaultSopsFile = ./secrets.yaml; + sops.secrets.example-key = {}; + sops.secrets."myservice/my_subdir/my_secret" = {}; + system.stateVersion = "23.11"; }; }; diff --git a/infra/phobos/secrets.yaml b/phobos/secrets.yaml similarity index 100% rename from infra/phobos/secrets.yaml rename to phobos/secrets.yaml