parent
3a29285054
commit
fd8c03cd86
2 changed files with 476 additions and 60 deletions
111
flake.nix
111
flake.nix
|
@ -1,53 +1,68 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
inputs.disko.url = "github:nix-community/disko";
|
||||
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
description = "main system and home configuration flake";
|
||||
|
||||
outputs = { nixpkgs, disko, ... }:
|
||||
{
|
||||
nixosConfigurations.hetzner-cloud = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
# tested with 2GB/2CPU droplet, 1GB droplets do not have enough RAM for kexec
|
||||
nixosConfigurations.digitalocean = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
{ disko.devices.disk.disk1.device = "/dev/vda"; }
|
||||
{
|
||||
# do not use DHCP, as DigitalOcean provisions IPs using cloud-init
|
||||
networking.useDHCP = nixpkgs.lib.mkForce false;
|
||||
inputs = {
|
||||
# NixOS official package source, using the nixos-24.05 branch as stable and nixos-unstable as default
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
stablepkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||
|
||||
services.cloud-init = {
|
||||
enable = true;
|
||||
network.enable = true;
|
||||
|
||||
# not strictly needed, just for good measure
|
||||
datasource_list = [ "DigitalOcean" ];
|
||||
datasource.DigitalOcean = { };
|
||||
};
|
||||
}
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
nixosConfigurations.hetzner-cloud-aarch64 = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
nixosConfigurations.biggerpi = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
./configuration.nix
|
||||
./disk-config.nix
|
||||
];
|
||||
};
|
||||
# Home manager using nixos-unstable
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Anyrun launcher
|
||||
anyrun = {
|
||||
url = "github:anyrun-org/anyrun";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Declarative flatpak management, documentation states overriding nixpkgs is not supported
|
||||
flatpaks.url = "github:GermanBread/declarative-flatpak/stable-v3";
|
||||
|
||||
# Nixvim neovim distro for easier nixified configuration
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, stablepkgs, home-manager, ... } @ inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
stablepkgs = stablepkgs.legacyPacakges.${system};
|
||||
in
|
||||
{
|
||||
nixosConfigurations.gabbielaptop = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
# Import nixos modules here
|
||||
./hosts/gabbielaptop/configuration.nix
|
||||
./modules/nh.nix
|
||||
./modules/waydroid.nix
|
||||
./modules/packages.nix
|
||||
|
||||
# Imports home-manager module for use within nixos, not reccomended for use WITH standalone version
|
||||
# inputs.home-manager.nixosModules.default
|
||||
];
|
||||
};
|
||||
|
||||
# Standalone home-manager config
|
||||
homeConfigurations.blue = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
# Import home-manager modules here
|
||||
modules = [
|
||||
./home-manager/home.nix
|
||||
# ./home-manager/librewolf.nix
|
||||
inputs.anyrun.homeManagerModules.default
|
||||
inputs.flatpaks.homeManagerModules.default
|
||||
inputs.nixvim.homeManagerModules.default
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue