diff --git a/utilities/nixos-installers/examples/testbed/flake.lock b/hosts/i001/flake.lock similarity index 100% rename from utilities/nixos-installers/examples/testbed/flake.lock rename to hosts/i001/flake.lock diff --git a/hosts/i001/flake.nix b/hosts/i001/flake.nix new file mode 100644 index 00000000..dc806fec --- /dev/null +++ b/hosts/i001/flake.nix @@ -0,0 +1,138 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; + home-manager.url = "github:rycee/home-manager/release-25.11"; + + common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?dir=flakes/common"; + # de_plasma.url = "path:../../../../flakes/de_plasma"; + de_plasma.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?dir=flakes/de_plasma"; + ros_neovim.url = "git+https://git.joshuabell.xyz/ringofstorms/nvim"; + + impermanence.url = "github:nix-community/impermanence"; + }; + + outputs = + { + ... + }@inputs: + let + configurationName = "i001"; + system = "x86_64-linux"; + primaryUser = "luser"; + configLocation = "/home/${primaryUser}/.config/nixos-config/hosts/${configurationName}"; + lib = inputs.nixpkgs.lib; + in + { + nixosConfigurations = { + "${configurationName}" = ( + lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs; + }; + modules = [ + inputs.impermanence.nixosModules.impermanence + inputs.home-manager.nixosModules.default + + inputs.ros_neovim.nixosModules.default + ({ + ringofstorms-nvim.includeAllRuntimeDependencies = true; + }) + + inputs.de_plasma.nixosModules.default + ({ + ringofstorms.dePlasma = { + enable = true; + gpu.intel.enable = true; + sddm.autologinUser = "luser"; + }; + }) + + inputs.common.nixosModules.essentials + inputs.common.nixosModules.git + inputs.common.nixosModules.tmux + inputs.common.nixosModules.boot_systemd + inputs.common.nixosModules.hardening + inputs.common.nixosModules.jetbrains_font + inputs.common.nixosModules.nix_options + inputs.common.nixosModules.no_sleep + inputs.common.nixosModules.timezone_auto + inputs.common.nixosModules.tty_caps_esc + inputs.common.nixosModules.zsh + + ./hardware-configuration.nix + ./impermanence.nix + ./test.nix + ( + { + config, + pkgs, + upkgs, + lib, + ... + }: + rec { + system.stateVersion = "25.05"; + # TODO allowing password auth for now + services.openssh.settings.PasswordAuthentication = lib.mkForce true; + + # Home Manager + home-manager = { + useUserPackages = true; + useGlobalPkgs = true; + backupFileExtension = "bak"; + # add all normal users to home manager so it applies to them + users = lib.mapAttrs (name: user: { + home.stateVersion = "25.05"; + programs.home-manager.enable = true; + }) (lib.filterAttrs (name: user: user.isNormalUser or false) users.users); + + sharedModules = [ + inputs.common.homeManagerModules.tmux + inputs.common.homeManagerModules.atuin + inputs.common.homeManagerModules.direnv + inputs.common.homeManagerModules.git + inputs.common.homeManagerModules.postgres_cli_options + inputs.common.homeManagerModules.starship + inputs.common.homeManagerModules.zoxide + inputs.common.homeManagerModules.zsh + ]; + + extraSpecialArgs = { + inherit inputs; + inherit upkgs; + }; + }; + + # System configuration + networking.networkmanager.enable = true; + networking.hostName = configurationName; + programs.nh.flake = configLocation; + nixpkgs.config.allowUnfree = true; + users.mutableUsers = false; + users.users = { + "${primaryUser}" = { + isNormalUser = true; + hashedPassword = "$y$j9T$v1QhXiZMRY1pFkPmkLkdp0$451GvQt.XFU2qCAi4EQNd1BEqjM/CH6awU8gjcULps6"; # "test" password + extraGroups = [ + "wheel" + "networkmanager" + ]; + openssh.authorizedKeys.keys = [ + ]; + }; + }; + + # Specifics for this machine + environment.systemPackages = with pkgs; [ + qdirstat + google-chrome + ]; + } + ) + ]; + } + ); + }; + }; +} diff --git a/utilities/nixos-installers/examples/testbed/hardware-configuration.nix b/hosts/i001/hardware-configuration.nix similarity index 100% rename from utilities/nixos-installers/examples/testbed/hardware-configuration.nix rename to hosts/i001/hardware-configuration.nix diff --git a/utilities/nixos-installers/examples/testbed/impermanence.nix b/hosts/i001/impermanence.nix similarity index 100% rename from utilities/nixos-installers/examples/testbed/impermanence.nix rename to hosts/i001/impermanence.nix diff --git a/utilities/nixos-installers/examples/testbed/test.nix b/hosts/i001/test.nix similarity index 100% rename from utilities/nixos-installers/examples/testbed/test.nix rename to hosts/i001/test.nix diff --git a/utilities/nixos-installers/examples/test/flake.lock b/utilities/nixos-installers/examples/test/flake.lock new file mode 100644 index 00000000..c6e8b971 --- /dev/null +++ b/utilities/nixos-installers/examples/test/flake.lock @@ -0,0 +1,1149 @@ +{ + "nodes": { + "common": { + "locked": { + "dir": "flakes/common", + "lastModified": 1764738806, + "narHash": "sha256-CRXCWZDrgy31TH+pnUZMIXS0wosRLI/wxaG0s3S01Ks=", + "ref": "refs/heads/master", + "rev": "0ba6c5ccecd24e04ff8f45c4ed144c4a8b6b4f7e", + "revCount": 836, + "type": "git", + "url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" + }, + "original": { + "dir": "flakes/common", + "type": "git", + "url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" + } + }, + "de_plasma": { + "inputs": { + "plasma-manager": "plasma-manager" + }, + "locked": { + "dir": "flakes/de_plasma", + "lastModified": 1764738806, + "narHash": "sha256-CRXCWZDrgy31TH+pnUZMIXS0wosRLI/wxaG0s3S01Ks=", + "ref": "refs/heads/master", + "rev": "0ba6c5ccecd24e04ff8f45c4ed144c4a8b6b4f7e", + "revCount": 836, + "type": "git", + "url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" + }, + "original": { + "dir": "flakes/de_plasma", + "type": "git", + "url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "de_plasma", + "plasma-manager", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1756579987, + "narHash": "sha256-duCce8zGsaMsrqqOmLOsuaV1PVIw/vXWnKuLKZClsGg=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "99a69bdf8a3c6bf038c4121e9c4b6e99706a187a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1764736872, + "narHash": "sha256-4mqLegNQeD54X7enm6EI9aNWl6CaIfyhl5PaYoGYwqk=", + "owner": "rycee", + "repo": "home-manager", + "rev": "3366918730bb6b699395a9d237397f1d710a94b3", + "type": "github" + }, + "original": { + "owner": "rycee", + "ref": "release-25.11", + "repo": "home-manager", + "type": "github" + } + }, + "impermanence": { + "locked": { + "lastModified": 1737831083, + "narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=", + "owner": "nix-community", + "repo": "impermanence", + "rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "impermanence", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1756542300, + "narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d7600c775f877cd87b4f5a831c28aa94137377aa", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1764522689, + "narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1764522689, + "narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1764040936, + "narHash": "sha256-d1NFBVGQZ/Xb0pMviuzenqrfXymJs0m/pKrEg1tDGsE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "b9491974f02dadeb5acca22649ccbd89a6a81afb", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "nvim_plugin-Almo7aya/openingh.nvim": { + "flake": false, + "locked": { + "lastModified": 1746139196, + "narHash": "sha256-/FlNLWOSIrOYiWzAcgOdu9//QTorCDV1KWb+h6eqLwk=", + "owner": "Almo7aya", + "repo": "openingh.nvim", + "rev": "7cc8c897cb6b34d8ed28e99d95baccef609ed251", + "type": "github" + }, + "original": { + "owner": "Almo7aya", + "repo": "openingh.nvim", + "type": "github" + } + }, + "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim": { + "flake": false, + "locked": { + "lastModified": 1763599441, + "narHash": "sha256-RwCQQfgQIQITVSJSX+QOSIOChT7E2AXdIwfU07S9GaU=", + "owner": "CopilotC-Nvim", + "repo": "CopilotChat.nvim", + "rev": "df5376c132382dd47e3e552612940cbf25b3580c", + "type": "github" + }, + "original": { + "owner": "CopilotC-Nvim", + "repo": "CopilotChat.nvim", + "type": "github" + } + }, + "nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring": { + "flake": false, + "locked": { + "lastModified": 1733574156, + "narHash": "sha256-AjDM3+n4+lNBQi8P2Yrh0Ab06uYCndBQT9TX36rDbOM=", + "owner": "JoosepAlviste", + "repo": "nvim-ts-context-commentstring", + "rev": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f", + "type": "github" + }, + "original": { + "owner": "JoosepAlviste", + "repo": "nvim-ts-context-commentstring", + "type": "github" + } + }, + "nvim_plugin-L3MON4D3/LuaSnip": { + "flake": false, + "locked": { + "lastModified": 1762213057, + "narHash": "sha256-Pil9m8zN3XzMtPT8spdr78dzkMW7dcpVnbWzie6524A=", + "owner": "L3MON4D3", + "repo": "LuaSnip", + "rev": "3732756842a2f7e0e76a7b0487e9692072857277", + "type": "github" + }, + "original": { + "owner": "L3MON4D3", + "repo": "LuaSnip", + "type": "github" + } + }, + "nvim_plugin-MeanderingProgrammer/render-markdown.nvim": { + "flake": false, + "locked": { + "lastModified": 1763430554, + "narHash": "sha256-0DwPuzqR+7R4lJFQ9f2xN26YhdQKg85Hw6+bPvloZoc=", + "owner": "MeanderingProgrammer", + "repo": "render-markdown.nvim", + "rev": "6e0e8902dac70fecbdd8ce557d142062a621ec38", + "type": "github" + }, + "original": { + "owner": "MeanderingProgrammer", + "repo": "render-markdown.nvim", + "type": "github" + } + }, + "nvim_plugin-MunifTanjim/nui.nvim": { + "flake": false, + "locked": { + "lastModified": 1749392788, + "narHash": "sha256-41slmnvt1z7sCxvpiVuFmQ9g7eCaxQi1dDCL3AxSL1A=", + "owner": "MunifTanjim", + "repo": "nui.nvim", + "rev": "de740991c12411b663994b2860f1a4fd0937c130", + "type": "github" + }, + "original": { + "owner": "MunifTanjim", + "repo": "nui.nvim", + "type": "github" + } + }, + "nvim_plugin-RRethy/vim-illuminate": { + "flake": false, + "locked": { + "lastModified": 1748105647, + "narHash": "sha256-KqAJRCtDBG5xsvNsqkxoBdDckg02u4NBBreYQw7BphA=", + "owner": "RRethy", + "repo": "vim-illuminate", + "rev": "0d1e93684da00ab7c057410fecfc24f434698898", + "type": "github" + }, + "original": { + "owner": "RRethy", + "repo": "vim-illuminate", + "type": "github" + } + }, + "nvim_plugin-Saecki/crates.nvim": { + "flake": false, + "locked": { + "lastModified": 1755956579, + "narHash": "sha256-jfmST/S9ymwgQ99PTCOlJkk5zaxE5HiDV16TmTISDII=", + "owner": "Saecki", + "repo": "crates.nvim", + "rev": "ac9fa498a9edb96dc3056724ff69d5f40b898453", + "type": "github" + }, + "original": { + "owner": "Saecki", + "repo": "crates.nvim", + "type": "github" + } + }, + "nvim_plugin-aznhe21/actions-preview.nvim": { + "flake": false, + "locked": { + "lastModified": 1759462626, + "narHash": "sha256-YUeWBXxxeurfWBi0PjUi6izqYAvUw9DHmvsuPXm7ohw=", + "owner": "aznhe21", + "repo": "actions-preview.nvim", + "rev": "cb938c25edaac38d362555f19244a9cb85d561e8", + "type": "github" + }, + "original": { + "owner": "aznhe21", + "repo": "actions-preview.nvim", + "type": "github" + } + }, + "nvim_plugin-b0o/schemastore.nvim": { + "flake": false, + "locked": { + "lastModified": 1763748041, + "narHash": "sha256-4KKj1zp+5Z2zbC31hpvw73BIuf4dW7rimepGOggmUp4=", + "owner": "b0o", + "repo": "schemastore.nvim", + "rev": "aa25399c48236b77af71d4b64cdf157d2ba4e990", + "type": "github" + }, + "original": { + "owner": "b0o", + "repo": "schemastore.nvim", + "type": "github" + } + }, + "nvim_plugin-catppuccin/nvim": { + "flake": false, + "locked": { + "lastModified": 1763995197, + "narHash": "sha256-i4WmQzSNWeR5rh61yonzR55yyklJ3xOL8D/XyEnDa+E=", + "owner": "catppuccin", + "repo": "nvim", + "rev": "180e0435707cf1fed09a98a9739e5807d92b69be", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "nvim", + "type": "github" + } + }, + "nvim_plugin-chrisgrieser/nvim-early-retirement": { + "flake": false, + "locked": { + "lastModified": 1764013541, + "narHash": "sha256-Mzz1y7YYTYUWv9S/Yr26to7AuDCZ+9asHa3qzDz06D0=", + "owner": "chrisgrieser", + "repo": "nvim-early-retirement", + "rev": "6fb7d87a965e439cfb4e04a5c0e5038010fc015b", + "type": "github" + }, + "original": { + "owner": "chrisgrieser", + "repo": "nvim-early-retirement", + "type": "github" + } + }, + "nvim_plugin-declancm/cinnamon.nvim": { + "flake": false, + "locked": { + "lastModified": 1722992123, + "narHash": "sha256-kccQ4iFMSQ8kvE7hYz90hBrsDLo7VohFj/6lEZZiAO8=", + "owner": "declancm", + "repo": "cinnamon.nvim", + "rev": "450cb3247765fed7871b41ef4ce5fa492d834215", + "type": "github" + }, + "original": { + "owner": "declancm", + "repo": "cinnamon.nvim", + "type": "github" + } + }, + "nvim_plugin-folke/lazy.nvim": { + "flake": false, + "locked": { + "lastModified": 1762421181, + "narHash": "sha256-h5404njTAfqMJFQ3MAr2PWSbV81eS4aIs0cxAXkT0EM=", + "owner": "folke", + "repo": "lazy.nvim", + "rev": "85c7ff3711b730b4030d03144f6db6375044ae82", + "type": "github" + }, + "original": { + "owner": "folke", + "repo": "lazy.nvim", + "type": "github" + } + }, + "nvim_plugin-folke/neodev.nvim": { + "flake": false, + "locked": { + "lastModified": 1720260306, + "narHash": "sha256-hOjzlo/IqmV8tYjGwfmcCPEmHYsWnEIwtHZdhpwA1kM=", + "owner": "folke", + "repo": "neodev.nvim", + "rev": "46aa467dca16cf3dfe27098042402066d2ae242d", + "type": "github" + }, + "original": { + "owner": "folke", + "repo": "neodev.nvim", + "type": "github" + } + }, + "nvim_plugin-folke/which-key.nvim": { + "flake": false, + "locked": { + "lastModified": 1761664528, + "narHash": "sha256-rKaYnXM4gRkkF/+xIFm2oCZwtAU6CeTdRWU93N+Jmbc=", + "owner": "folke", + "repo": "which-key.nvim", + "rev": "3aab2147e74890957785941f0c1ad87d0a44c15a", + "type": "github" + }, + "original": { + "owner": "folke", + "repo": "which-key.nvim", + "type": "github" + } + }, + "nvim_plugin-hrsh7th/cmp-buffer": { + "flake": false, + "locked": { + "lastModified": 1743497185, + "narHash": "sha256-dG4U7MtnXThoa/PD+qFtCt76MQ14V1wX8GMYcvxEnbM=", + "owner": "hrsh7th", + "repo": "cmp-buffer", + "rev": "b74fab3656eea9de20a9b8116afa3cfc4ec09657", + "type": "github" + }, + "original": { + "owner": "hrsh7th", + "repo": "cmp-buffer", + "type": "github" + } + }, + "nvim_plugin-hrsh7th/cmp-nvim-lsp": { + "flake": false, + "locked": { + "lastModified": 1763018865, + "narHash": "sha256-CYZdfAsJYQyW413fRvNbsS5uayuc6fKDvDLZ2Y7j3ZQ=", + "owner": "hrsh7th", + "repo": "cmp-nvim-lsp", + "rev": "cbc7b02bb99fae35cb42f514762b89b5126651ef", + "type": "github" + }, + "original": { + "owner": "hrsh7th", + "repo": "cmp-nvim-lsp", + "type": "github" + } + }, + "nvim_plugin-hrsh7th/cmp-path": { + "flake": false, + "locked": { + "lastModified": 1753844861, + "narHash": "sha256-e4Rd2y1Wekp7aobpTGaUeoSBnlfIASDaBR8js5dh2Vw=", + "owner": "hrsh7th", + "repo": "cmp-path", + "rev": "c642487086dbd9a93160e1679a1327be111cbc25", + "type": "github" + }, + "original": { + "owner": "hrsh7th", + "repo": "cmp-path", + "type": "github" + } + }, + "nvim_plugin-hrsh7th/nvim-cmp": { + "flake": false, + "locked": { + "lastModified": 1763258674, + "narHash": "sha256-Z6F8auKq1jSgGoPhV4RbkB1YTexnolSbEjpa/JJI/Fc=", + "owner": "hrsh7th", + "repo": "nvim-cmp", + "rev": "d97d85e01339f01b842e6ec1502f639b080cb0fc", + "type": "github" + }, + "original": { + "owner": "hrsh7th", + "repo": "nvim-cmp", + "type": "github" + } + }, + "nvim_plugin-j-hui/fidget.nvim": { + "flake": false, + "locked": { + "lastModified": 1761243883, + "narHash": "sha256-XXTeJweQRIsC/WFhFxFbepOETV8e5Wfmh513su2Wve0=", + "owner": "j-hui", + "repo": "fidget.nvim", + "rev": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a", + "type": "github" + }, + "original": { + "owner": "j-hui", + "repo": "fidget.nvim", + "type": "github" + } + }, + "nvim_plugin-johmsalas/text-case.nvim": { + "flake": false, + "locked": { + "lastModified": 1722628320, + "narHash": "sha256-2IMufSMy9JW50VzZ3SgOtp8kYs81ANwV0eP0ZH3rTFo=", + "owner": "johmsalas", + "repo": "text-case.nvim", + "rev": "e898cfd46fa6cde0e83abb624a16e67d2ffc6457", + "type": "github" + }, + "original": { + "owner": "johmsalas", + "repo": "text-case.nvim", + "type": "github" + } + }, + "nvim_plugin-lewis6991/gitsigns.nvim": { + "flake": false, + "locked": { + "lastModified": 1763280728, + "narHash": "sha256-w2/osNJwbtmUxxQIXBsyqMYrvyNUaVzXrUNGYqGmzi4=", + "owner": "lewis6991", + "repo": "gitsigns.nvim", + "rev": "cdafc320f03f2572c40ab93a4eecb733d4016d07", + "type": "github" + }, + "original": { + "owner": "lewis6991", + "repo": "gitsigns.nvim", + "type": "github" + } + }, + "nvim_plugin-lnc3l0t/glow.nvim": { + "flake": false, + "locked": { + "lastModified": 1693233815, + "narHash": "sha256-vdlwkIK2EkFviJmSiOqPWvc15xqJ9F2gHCC4ObJ5Qjk=", + "owner": "lnc3l0t", + "repo": "glow.nvim", + "rev": "5b38fb7b6e806cac62707a4aba8c10c5f14d5bb5", + "type": "github" + }, + "original": { + "owner": "lnc3l0t", + "repo": "glow.nvim", + "type": "github" + } + }, + "nvim_plugin-lukas-reineke/indent-blankline.nvim": { + "flake": false, + "locked": { + "lastModified": 1742224677, + "narHash": "sha256-0q/V+b4UrDRnaC/eRWOi9HU9a61vQSAM9/C8ZQyKt+Y=", + "owner": "lukas-reineke", + "repo": "indent-blankline.nvim", + "rev": "005b56001b2cb30bfa61b7986bc50657816ba4ba", + "type": "github" + }, + "original": { + "owner": "lukas-reineke", + "repo": "indent-blankline.nvim", + "type": "github" + } + }, + "nvim_plugin-m4xshen/hardtime.nvim": { + "flake": false, + "locked": { + "lastModified": 1757738091, + "narHash": "sha256-Jy9ARUHU1ySpSxxoS3hLRjxp5Lqt7juWN5Jnbdo0rg0=", + "owner": "m4xshen", + "repo": "hardtime.nvim", + "rev": "b4e431934af1fe224a3a801f632c008278cb7628", + "type": "github" + }, + "original": { + "owner": "m4xshen", + "repo": "hardtime.nvim", + "type": "github" + } + }, + "nvim_plugin-mbbill/undotree": { + "flake": false, + "locked": { + "lastModified": 1759186837, + "narHash": "sha256-EWOH08KAWyoT9m45/B1d5aKQQJtd3k4orJbagVsxe08=", + "owner": "mbbill", + "repo": "undotree", + "rev": "0f1c9816975b5d7f87d5003a19c53c6fd2ff6f7f", + "type": "github" + }, + "original": { + "owner": "mbbill", + "repo": "undotree", + "type": "github" + } + }, + "nvim_plugin-mfussenegger/nvim-lint": { + "flake": false, + "locked": { + "lastModified": 1763729870, + "narHash": "sha256-9fIZPUZhnQEHJtvboCs+A2QXo4UMTFejuHNagDkfkRk=", + "owner": "mfussenegger", + "repo": "nvim-lint", + "rev": "d1118791070d090777398792a73032a0ca5c79ff", + "type": "github" + }, + "original": { + "owner": "mfussenegger", + "repo": "nvim-lint", + "type": "github" + } + }, + "nvim_plugin-mrcjkb/rustaceanvim": { + "flake": false, + "locked": { + "lastModified": 1763539887, + "narHash": "sha256-aMyjQEEY6MlTBMMxjR6NxNhdbWmvRhOcfpgE1w712nE=", + "owner": "mrcjkb", + "repo": "rustaceanvim", + "rev": "6b7e0e18ad8fa0598bc038aef7bb6bba288adbad", + "type": "github" + }, + "original": { + "owner": "mrcjkb", + "repo": "rustaceanvim", + "type": "github" + } + }, + "nvim_plugin-neovim/nvim-lspconfig": { + "flake": false, + "locked": { + "lastModified": 1763880753, + "narHash": "sha256-huuWVUKo6CmxjXYRnGv8tUs+7bo85gNyL8vVnreiTAU=", + "owner": "neovim", + "repo": "nvim-lspconfig", + "rev": "30a2b191bccf541ce1797946324c9329e90ec448", + "type": "github" + }, + "original": { + "owner": "neovim", + "repo": "nvim-lspconfig", + "type": "github" + } + }, + "nvim_plugin-numToStr/Comment.nvim": { + "flake": false, + "locked": { + "lastModified": 1717957420, + "narHash": "sha256-h0kPue5Eqd5aeu4VoLH45pF0DmWWo1d8SnLICSQ63zc=", + "owner": "numToStr", + "repo": "Comment.nvim", + "rev": "e30b7f2008e52442154b66f7c519bfd2f1e32acb", + "type": "github" + }, + "original": { + "owner": "numToStr", + "repo": "Comment.nvim", + "type": "github" + } + }, + "nvim_plugin-nvim-lua/plenary.nvim": { + "flake": false, + "locked": { + "lastModified": 1753570668, + "narHash": "sha256-9Un7ekhBxcnmFE1xjCCFTZ7eqIbmXvQexpnhduAg4M0=", + "owner": "nvim-lua", + "repo": "plenary.nvim", + "rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509", + "type": "github" + }, + "original": { + "owner": "nvim-lua", + "repo": "plenary.nvim", + "type": "github" + } + }, + "nvim_plugin-nvim-lualine/lualine.nvim": { + "flake": false, + "locked": { + "lastModified": 1763865090, + "narHash": "sha256-OpLZH+sL5cj2rcP5/T+jDOnuxd1QWLHCt2RzloffZOA=", + "owner": "nvim-lualine", + "repo": "lualine.nvim", + "rev": "47f91c416daef12db467145e16bed5bbfe00add8", + "type": "github" + }, + "original": { + "owner": "nvim-lualine", + "repo": "lualine.nvim", + "type": "github" + } + }, + "nvim_plugin-nvim-telescope/telescope-file-browser.nvim": { + "flake": false, + "locked": { + "lastModified": 1754424906, + "narHash": "sha256-FlJ7w5Ywwq03E0oYdnFJFb+MMUMQMa+5QhDMy2O9tGQ=", + "owner": "nvim-telescope", + "repo": "telescope-file-browser.nvim", + "rev": "3610dc7dc91f06aa98b11dca5cc30dfa98626b7e", + "type": "github" + }, + "original": { + "owner": "nvim-telescope", + "repo": "telescope-file-browser.nvim", + "type": "github" + } + }, + "nvim_plugin-nvim-telescope/telescope-fzf-native.nvim": { + "flake": false, + "locked": { + "lastModified": 1762521376, + "narHash": "sha256-ChEM4jJonAE4qXd/dgTu2mdlpNBj5rEdpA8TgR38oRM=", + "owner": "nvim-telescope", + "repo": "telescope-fzf-native.nvim", + "rev": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c", + "type": "github" + }, + "original": { + "owner": "nvim-telescope", + "repo": "telescope-fzf-native.nvim", + "type": "github" + } + }, + "nvim_plugin-nvim-telescope/telescope-ui-select.nvim": { + "flake": false, + "locked": { + "lastModified": 1701723223, + "narHash": "sha256-YRhNmmG4gx9Ht8JwjQfbTjJyTHEuZmtP6lqnhOsk8bE=", + "owner": "nvim-telescope", + "repo": "telescope-ui-select.nvim", + "rev": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2", + "type": "github" + }, + "original": { + "owner": "nvim-telescope", + "repo": "telescope-ui-select.nvim", + "type": "github" + } + }, + "nvim_plugin-nvim-telescope/telescope.nvim": { + "flake": false, + "locked": { + "lastModified": 1763414201, + "narHash": "sha256-6hrylUCc6KlcbnMgcJNJhbX2Cgu0YHKoMPOqpaKRljE=", + "owner": "nvim-telescope", + "repo": "telescope.nvim", + "rev": "83a3a713d6b2d2a408491a1b959e55a7fa8678e8", + "type": "github" + }, + "original": { + "owner": "nvim-telescope", + "repo": "telescope.nvim", + "type": "github" + } + }, + "nvim_plugin-nvim-tree/nvim-tree.lua": { + "flake": false, + "locked": { + "lastModified": 1763712665, + "narHash": "sha256-YwaWMPQ3IC+z/utnkZ1Tfs5tZFex9Gdf/vS9sUaMDCA=", + "owner": "nvim-tree", + "repo": "nvim-tree.lua", + "rev": "3fb91e18a727ecc0385637895ec397dea90be42a", + "type": "github" + }, + "original": { + "owner": "nvim-tree", + "repo": "nvim-tree.lua", + "type": "github" + } + }, + "nvim_plugin-nvim-tree/nvim-web-devicons": { + "flake": false, + "locked": { + "lastModified": 1761440007, + "narHash": "sha256-klBjUtj0AvarN5a6O8Hh2t5BuOTe/m3ps2cHnlxVJvE=", + "owner": "nvim-tree", + "repo": "nvim-web-devicons", + "rev": "8dcb311b0c92d460fac00eac706abd43d94d68af", + "type": "github" + }, + "original": { + "owner": "nvim-tree", + "repo": "nvim-web-devicons", + "type": "github" + } + }, + "nvim_plugin-nvim-treesitter/nvim-treesitter-context": { + "flake": false, + "locked": { + "lastModified": 1762769683, + "narHash": "sha256-ICwAUXKngSPsJ6VV+84KUPqtAwlGPrm4FIf9ioisiz8=", + "owner": "nvim-treesitter", + "repo": "nvim-treesitter-context", + "rev": "660861b1849256398f70450afdf93908d28dc945", + "type": "github" + }, + "original": { + "owner": "nvim-treesitter", + "repo": "nvim-treesitter-context", + "type": "github" + } + }, + "nvim_plugin-rafamadriz/friendly-snippets": { + "flake": false, + "locked": { + "lastModified": 1745949052, + "narHash": "sha256-FzApcTbWfFkBD9WsYMhaCyn6ky8UmpUC2io/co/eByM=", + "owner": "rafamadriz", + "repo": "friendly-snippets", + "rev": "572f5660cf05f8cd8834e096d7b4c921ba18e175", + "type": "github" + }, + "original": { + "owner": "rafamadriz", + "repo": "friendly-snippets", + "type": "github" + } + }, + "nvim_plugin-rcarriga/nvim-notify": { + "flake": false, + "locked": { + "lastModified": 1757190131, + "narHash": "sha256-h7STMjY+CBTqBkIDJXgtJz4WhNeQ02ES2Jesi3jZXeM=", + "owner": "rcarriga", + "repo": "nvim-notify", + "rev": "8701bece920b38ea289b457f902e2ad184131a5d", + "type": "github" + }, + "original": { + "owner": "rcarriga", + "repo": "nvim-notify", + "type": "github" + } + }, + "nvim_plugin-rmagatti/auto-session": { + "flake": false, + "locked": { + "lastModified": 1761853983, + "narHash": "sha256-9/SfXUAZIiPAS5ojvJCxDCxmuLoL/kIrAsNWAoLWFq4=", + "owner": "rmagatti", + "repo": "auto-session", + "rev": "292492ab7af4bd8b9e37e28508bc8ce995722fd5", + "type": "github" + }, + "original": { + "owner": "rmagatti", + "repo": "auto-session", + "type": "github" + } + }, + "nvim_plugin-ron-rs/ron.vim": { + "flake": false, + "locked": { + "lastModified": 1660904719, + "narHash": "sha256-8/xJmymtVGVz2avzlamgK1cNflZ3NRL+B3c7xxbI964=", + "owner": "ron-rs", + "repo": "ron.vim", + "rev": "f749e543975a82e8dd9a6e7df9600a1c098ae800", + "type": "github" + }, + "original": { + "owner": "ron-rs", + "repo": "ron.vim", + "type": "github" + } + }, + "nvim_plugin-saadparwaiz1/cmp_luasnip": { + "flake": false, + "locked": { + "lastModified": 1730707109, + "narHash": "sha256-86lKQPPyqFz8jzuLajjHMKHrYnwW6+QOcPyQEx6B+gw=", + "owner": "saadparwaiz1", + "repo": "cmp_luasnip", + "rev": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90", + "type": "github" + }, + "original": { + "owner": "saadparwaiz1", + "repo": "cmp_luasnip", + "type": "github" + } + }, + "nvim_plugin-sindrets/diffview.nvim": { + "flake": false, + "locked": { + "lastModified": 1718279802, + "narHash": "sha256-SX+ybIzL/w6uyCy4iZKnWnzTFwqB1oXSgyYVAdpdKi8=", + "owner": "sindrets", + "repo": "diffview.nvim", + "rev": "4516612fe98ff56ae0415a259ff6361a89419b0a", + "type": "github" + }, + "original": { + "owner": "sindrets", + "repo": "diffview.nvim", + "type": "github" + } + }, + "nvim_plugin-stevearc/conform.nvim": { + "flake": false, + "locked": { + "lastModified": 1763939276, + "narHash": "sha256-2TLMJdbSbMbdGn6zhZwNSUZnxVGu+Y0ZYhTjinTc7Hs=", + "owner": "stevearc", + "repo": "conform.nvim", + "rev": "6208aefd675939cc7c8f1a57176135974dad269f", + "type": "github" + }, + "original": { + "owner": "stevearc", + "repo": "conform.nvim", + "type": "github" + } + }, + "nvim_plugin-stevearc/dressing.nvim": { + "flake": false, + "locked": { + "lastModified": 1739381641, + "narHash": "sha256-dBz+/gZA6O6fJy/GSgM6ZHGAR3MTGt/W1olzzTYRlgM=", + "owner": "stevearc", + "repo": "dressing.nvim", + "rev": "2d7c2db2507fa3c4956142ee607431ddb2828639", + "type": "github" + }, + "original": { + "owner": "stevearc", + "repo": "dressing.nvim", + "type": "github" + } + }, + "nvim_plugin-tpope/vim-sleuth": { + "flake": false, + "locked": { + "lastModified": 1726718493, + "narHash": "sha256-2Cr3h3uJvUL3CSoJs3aBFrkBeOBURSQItgQ4ep9sHXM=", + "owner": "tpope", + "repo": "vim-sleuth", + "rev": "be69bff86754b1aa5adcbb527d7fcd1635a84080", + "type": "github" + }, + "original": { + "owner": "tpope", + "repo": "vim-sleuth", + "type": "github" + } + }, + "nvim_plugin-tpope/vim-surround": { + "flake": false, + "locked": { + "lastModified": 1666730476, + "narHash": "sha256-DZE5tkmnT+lAvx/RQHaDEgEJXRKsy56KJY919xiH1lE=", + "owner": "tpope", + "repo": "vim-surround", + "rev": "3d188ed2113431cf8dac77be61b842acb64433d9", + "type": "github" + }, + "original": { + "owner": "tpope", + "repo": "vim-surround", + "type": "github" + } + }, + "nvim_plugin-uga-rosa/ccc.nvim": { + "flake": false, + "locked": { + "lastModified": 1746537659, + "narHash": "sha256-3TZ8VmvdgQ9n63m78C3r4OIUkVQHTHBvC24ixBdhTig=", + "owner": "uga-rosa", + "repo": "ccc.nvim", + "rev": "9d1a256e006decc574789dfc7d628ca11644d4c2", + "type": "github" + }, + "original": { + "owner": "uga-rosa", + "repo": "ccc.nvim", + "type": "github" + } + }, + "nvim_plugin-windwp/nvim-ts-autotag": { + "flake": false, + "locked": { + "lastModified": 1757545454, + "narHash": "sha256-nT2W5gKFEfzP7MztLjm7yqwam3ADk0svcMdLg2nmI/4=", + "owner": "windwp", + "repo": "nvim-ts-autotag", + "rev": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc", + "type": "github" + }, + "original": { + "owner": "windwp", + "repo": "nvim-ts-autotag", + "type": "github" + } + }, + "nvim_plugin-zbirenbaum/copilot-cmp": { + "flake": false, + "locked": { + "lastModified": 1733947099, + "narHash": "sha256-erRL8bY/zuwuCZfttw+avTrFV7pjv2H6v73NzY2bymM=", + "owner": "zbirenbaum", + "repo": "copilot-cmp", + "rev": "15fc12af3d0109fa76b60b5cffa1373697e261d1", + "type": "github" + }, + "original": { + "owner": "zbirenbaum", + "repo": "copilot-cmp", + "type": "github" + } + }, + "nvim_plugin-zbirenbaum/copilot.lua": { + "flake": false, + "locked": { + "lastModified": 1763512274, + "narHash": "sha256-NMIXOb/20aEmXvPgSDPzVuRIV+OUnJyfXVaVEuVAaTM=", + "owner": "zbirenbaum", + "repo": "copilot.lua", + "rev": "4383e05a47493d7ff77b058c0548129eb38ec7fb", + "type": "github" + }, + "original": { + "owner": "zbirenbaum", + "repo": "copilot.lua", + "type": "github" + } + }, + "plasma-manager": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1763909441, + "narHash": "sha256-56LwV51TX/FhgX+5LCG6akQ5KrOWuKgcJa+eUsRMxsc=", + "owner": "nix-community", + "repo": "plasma-manager", + "rev": "b24ed4b272256dfc1cc2291f89a9821d5f9e14b4", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "plasma-manager", + "type": "github" + } + }, + "root": { + "inputs": { + "common": "common", + "de_plasma": "de_plasma", + "home-manager": "home-manager_2", + "impermanence": "impermanence", + "nixpkgs": "nixpkgs_3", + "ros_neovim": "ros_neovim" + } + }, + "ros_neovim": { + "inputs": { + "nixpkgs": "nixpkgs_4", + "nvim_plugin-Almo7aya/openingh.nvim": "nvim_plugin-Almo7aya/openingh.nvim", + "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim": "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim", + "nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring": "nvim_plugin-JoosepAlviste/nvim-ts-context-commentstring", + "nvim_plugin-L3MON4D3/LuaSnip": "nvim_plugin-L3MON4D3/LuaSnip", + "nvim_plugin-MeanderingProgrammer/render-markdown.nvim": "nvim_plugin-MeanderingProgrammer/render-markdown.nvim", + "nvim_plugin-MunifTanjim/nui.nvim": "nvim_plugin-MunifTanjim/nui.nvim", + "nvim_plugin-RRethy/vim-illuminate": "nvim_plugin-RRethy/vim-illuminate", + "nvim_plugin-Saecki/crates.nvim": "nvim_plugin-Saecki/crates.nvim", + "nvim_plugin-aznhe21/actions-preview.nvim": "nvim_plugin-aznhe21/actions-preview.nvim", + "nvim_plugin-b0o/schemastore.nvim": "nvim_plugin-b0o/schemastore.nvim", + "nvim_plugin-catppuccin/nvim": "nvim_plugin-catppuccin/nvim", + "nvim_plugin-chrisgrieser/nvim-early-retirement": "nvim_plugin-chrisgrieser/nvim-early-retirement", + "nvim_plugin-declancm/cinnamon.nvim": "nvim_plugin-declancm/cinnamon.nvim", + "nvim_plugin-folke/lazy.nvim": "nvim_plugin-folke/lazy.nvim", + "nvim_plugin-folke/neodev.nvim": "nvim_plugin-folke/neodev.nvim", + "nvim_plugin-folke/which-key.nvim": "nvim_plugin-folke/which-key.nvim", + "nvim_plugin-hrsh7th/cmp-buffer": "nvim_plugin-hrsh7th/cmp-buffer", + "nvim_plugin-hrsh7th/cmp-nvim-lsp": "nvim_plugin-hrsh7th/cmp-nvim-lsp", + "nvim_plugin-hrsh7th/cmp-path": "nvim_plugin-hrsh7th/cmp-path", + "nvim_plugin-hrsh7th/nvim-cmp": "nvim_plugin-hrsh7th/nvim-cmp", + "nvim_plugin-j-hui/fidget.nvim": "nvim_plugin-j-hui/fidget.nvim", + "nvim_plugin-johmsalas/text-case.nvim": "nvim_plugin-johmsalas/text-case.nvim", + "nvim_plugin-lewis6991/gitsigns.nvim": "nvim_plugin-lewis6991/gitsigns.nvim", + "nvim_plugin-lnc3l0t/glow.nvim": "nvim_plugin-lnc3l0t/glow.nvim", + "nvim_plugin-lukas-reineke/indent-blankline.nvim": "nvim_plugin-lukas-reineke/indent-blankline.nvim", + "nvim_plugin-m4xshen/hardtime.nvim": "nvim_plugin-m4xshen/hardtime.nvim", + "nvim_plugin-mbbill/undotree": "nvim_plugin-mbbill/undotree", + "nvim_plugin-mfussenegger/nvim-lint": "nvim_plugin-mfussenegger/nvim-lint", + "nvim_plugin-mrcjkb/rustaceanvim": "nvim_plugin-mrcjkb/rustaceanvim", + "nvim_plugin-neovim/nvim-lspconfig": "nvim_plugin-neovim/nvim-lspconfig", + "nvim_plugin-numToStr/Comment.nvim": "nvim_plugin-numToStr/Comment.nvim", + "nvim_plugin-nvim-lua/plenary.nvim": "nvim_plugin-nvim-lua/plenary.nvim", + "nvim_plugin-nvim-lualine/lualine.nvim": "nvim_plugin-nvim-lualine/lualine.nvim", + "nvim_plugin-nvim-telescope/telescope-file-browser.nvim": "nvim_plugin-nvim-telescope/telescope-file-browser.nvim", + "nvim_plugin-nvim-telescope/telescope-fzf-native.nvim": "nvim_plugin-nvim-telescope/telescope-fzf-native.nvim", + "nvim_plugin-nvim-telescope/telescope-ui-select.nvim": "nvim_plugin-nvim-telescope/telescope-ui-select.nvim", + "nvim_plugin-nvim-telescope/telescope.nvim": "nvim_plugin-nvim-telescope/telescope.nvim", + "nvim_plugin-nvim-tree/nvim-tree.lua": "nvim_plugin-nvim-tree/nvim-tree.lua", + "nvim_plugin-nvim-tree/nvim-web-devicons": "nvim_plugin-nvim-tree/nvim-web-devicons", + "nvim_plugin-nvim-treesitter/nvim-treesitter-context": "nvim_plugin-nvim-treesitter/nvim-treesitter-context", + "nvim_plugin-rafamadriz/friendly-snippets": "nvim_plugin-rafamadriz/friendly-snippets", + "nvim_plugin-rcarriga/nvim-notify": "nvim_plugin-rcarriga/nvim-notify", + "nvim_plugin-rmagatti/auto-session": "nvim_plugin-rmagatti/auto-session", + "nvim_plugin-ron-rs/ron.vim": "nvim_plugin-ron-rs/ron.vim", + "nvim_plugin-saadparwaiz1/cmp_luasnip": "nvim_plugin-saadparwaiz1/cmp_luasnip", + "nvim_plugin-sindrets/diffview.nvim": "nvim_plugin-sindrets/diffview.nvim", + "nvim_plugin-stevearc/conform.nvim": "nvim_plugin-stevearc/conform.nvim", + "nvim_plugin-stevearc/dressing.nvim": "nvim_plugin-stevearc/dressing.nvim", + "nvim_plugin-tpope/vim-sleuth": "nvim_plugin-tpope/vim-sleuth", + "nvim_plugin-tpope/vim-surround": "nvim_plugin-tpope/vim-surround", + "nvim_plugin-uga-rosa/ccc.nvim": "nvim_plugin-uga-rosa/ccc.nvim", + "nvim_plugin-windwp/nvim-ts-autotag": "nvim_plugin-windwp/nvim-ts-autotag", + "nvim_plugin-zbirenbaum/copilot-cmp": "nvim_plugin-zbirenbaum/copilot-cmp", + "nvim_plugin-zbirenbaum/copilot.lua": "nvim_plugin-zbirenbaum/copilot.lua", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1764112623, + "narHash": "sha256-IBjor1S6fq2nwmzi7sRwJg6mRFlO9qwA1OhJhyHvwlw=", + "ref": "refs/heads/master", + "rev": "d85f1e831e400b2d1ea574fe6e40deba39d4d750", + "revCount": 323, + "type": "git", + "url": "https://git.joshuabell.xyz/ringofstorms/nvim" + }, + "original": { + "type": "git", + "url": "https://git.joshuabell.xyz/ringofstorms/nvim" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "ros_neovim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1764038373, + "narHash": "sha256-M6w2wNBRelcavoDAyFL2iO4NeWknD40ASkH1S3C0YGM=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "ab3536fe850211a96673c6ffb2cb88aab8071cc9", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/utilities/nixos-installers/examples/testbed/flake.nix b/utilities/nixos-installers/examples/test/flake.nix similarity index 100% rename from utilities/nixos-installers/examples/testbed/flake.nix rename to utilities/nixos-installers/examples/test/flake.nix diff --git a/utilities/nixos-installers/examples/test/hardware-configuration.nix b/utilities/nixos-installers/examples/test/hardware-configuration.nix new file mode 100644 index 00000000..865dc023 --- /dev/null +++ b/utilities/nixos-installers/examples/test/hardware-configuration.nix @@ -0,0 +1,120 @@ +# 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, ... }: +let + NIXBOOT = "/dev/disk/by-uuid/641A-6BDB"; + NIXROOT ="/dev/disk/by-uuid/ae94db42-ec46-4e2f-a98a-118359428a68"; + cryptroot = "/dev/disk/by-uuid/49f11bf1-d4b7-4188-9203-4d7a42569afa"; + + USB_KEY = "/dev/disk/by-uuid/9985-EBD1"; +in +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" "ehci_pci" "uas" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/boot" = + { device = NIXBOOT; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + boot.initrd.luks.devices."cryptroot" = { + device = NIXROOT; + + # Auto decrypt + keyFile = USB_KEY; + keyFileSize = 5000; + keyFileOffset = 5443; + + tryEmptyPassphrase = true; + fallbackToPassword = true; + crypttabExtraOpts = [ "tries=2" ]; + }; + + fileSystems."/" = + { device = cryptroot; + fsType = "btrfs"; + options = [ "subvol=@root" "compress=zstd" ]; + }; + + fileSystems."/nix" = + { device = cryptroot; + fsType = "btrfs"; + options = [ "subvol=@nix" "compress=zstd" "noatime" ]; + }; + + fileSystems."/persist" = + { device = cryptroot; + neededForBoot = true; + fsType = "btrfs"; + options = [ "subvol=@persist" "compress=zstd" ]; + }; + + fileSystems."/.swap" = + { device = cryptroot; + fsType = "btrfs"; + options = [ "subvol=@swap" "noatime" ]; + }; + + fileSystems."/.snapshots" = + { device = cryptroot; + fsType = "btrfs"; + options = [ "subvol=@snapshots" "compress=zstd" "noatime"]; + }; + + services.btrfs.autoScrub = { + enable = true; + # syntax as defined by https://www.freedesktop.org/software/systemd/man/systemd.time.html#Calendar%20Event s + interval = "monthly"; + fileSystems = ["/"]; + }; + + swapDevices = [{ + device = "/.swap/swapfile"; + size = 8*1024; # Creates an 8GB swap file + }]; + + boot.initrd.postResumeCommands = lib.mkAfter '' + mkdir /btrfs_tmp + mount ${cryptroot} /btrfs_tmp + if [[ -e /btrfs_tmp/@root ]]; then + mkdir -p /btrfs_tmp/old_roots + timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/@root)" "+%Y-%m-%-d_%H:%M:%S") + mv /btrfs_tmp/@root "/btrfs_tmp/old_roots/$timestamp" + fi + + delete_subvolume_recursively() { + IFS=$'\n' + for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do + delete_subvolume_recursively "/btrfs_tmp/$i" + done + btrfs subvolume delete "$1" + } + + for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do + delete_subvolume_recursively "$i" + done + + btrfs subvolume create /btrfs_tmp/@root + umount /btrfs_tmp + ''; + + # 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.enp1s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/utilities/nixos-installers/examples/test/impermanence.nix b/utilities/nixos-installers/examples/test/impermanence.nix new file mode 100644 index 00000000..c621b069 --- /dev/null +++ b/utilities/nixos-installers/examples/test/impermanence.nix @@ -0,0 +1,42 @@ +{ ... }: +{ + environment.persistence."/persist" = { + enable = true; + hideMounts = true; + directories = [ + "/var/log" + "/var/lib/nixos" + "/var/lib/systemd/coredump" + "/var/lib/systemd/timers" + + "/etc/nixos" + "/etc/ssh" + + "/etc/NetworkManager/system-connections" + "/var/lib/bluetooth" + "/var/lib/fail2ban" + ]; + files = [ + "/etc/machine-id" + ]; + users.luser = { + directories = [ + "projects" + ".config/nixos-config" + + ".config/atuin" + ".local/share/atuin" + + ".local/share/zoxide" + + # KDE connect specific + ".config/kdeconnect" + + ".local/state/nvim_ringofstorms_helium" + ]; + files = [ + + ]; + }; + }; +} diff --git a/utilities/nixos-installers/examples/test/test.nix b/utilities/nixos-installers/examples/test/test.nix new file mode 100644 index 00000000..ed15a31c --- /dev/null +++ b/utilities/nixos-installers/examples/test/test.nix @@ -0,0 +1,5 @@ +{ + powerMangement.enable = true; + # powerManagement.powertop.enable = true; + powerMangement.cpuFreqGovernor = "performance"; +}