initial commit
This commit is contained in:
128
flake.nix
Normal file
128
flake.nix
Normal file
@@ -0,0 +1,128 @@
|
||||
{
|
||||
description = "Nomarchy - A NixOS-based distribution with Omarchy flavour";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-colors.url = "github:misterio77/nix-colors";
|
||||
stylix.url = "github:danth/stylix";
|
||||
walker.url = "github:abenz1267/walker";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixos-hardware, disko, home-manager, nix-colors, stylix, walker, ... } @ inputs: {
|
||||
nixosModules = {
|
||||
system = import ./modules/system;
|
||||
home = import ./modules/home;
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
installerIso = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
|
||||
./hosts/live-iso.nix
|
||||
{
|
||||
system.stateVersion = "24.11";
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
installerVm = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hosts/live-iso.nix
|
||||
{
|
||||
system.stateVersion = "24.11";
|
||||
networking.hostName = "nomarchy-installer";
|
||||
|
||||
# VM specific settings to start in terminal
|
||||
virtualisation.vmVariant = {
|
||||
virtualisation.memorySize = 2048;
|
||||
virtualisation.cores = 2;
|
||||
virtualisation.graphics = true;
|
||||
};
|
||||
|
||||
# Use a dummy hardware config
|
||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
|
||||
# Setup a user that automatically logs in to console
|
||||
users.users.nixos = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "video" ];
|
||||
initialPassword = "nixos";
|
||||
};
|
||||
|
||||
services.getty.autologinUser = "nixos";
|
||||
|
||||
# Optionally, start the installer immediately
|
||||
environment.interactiveShellInit = ''
|
||||
if [[ "$(tty)" == "/dev/tty1" ]]; then
|
||||
echo "Welcome to the Nomarchy Installer Test VM!"
|
||||
echo "To start the installer, run: sudo /etc/install-nomarchy.sh"
|
||||
fi
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
vm = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./modules/system
|
||||
./modules/system/hardware.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
system.stateVersion = "24.11";
|
||||
networking.hostName = "nomarchy";
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
# VM specific settings
|
||||
virtualisation.vmVariant = {
|
||||
virtualisation.memorySize = 2048;
|
||||
virtualisation.cores = 2;
|
||||
virtualisation.graphics = true;
|
||||
};
|
||||
|
||||
# Use a dummy hardware config for VM
|
||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
|
||||
# Setup default user for testing
|
||||
users.users.nomarchy = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "video" ];
|
||||
initialPassword = "nixos";
|
||||
};
|
||||
|
||||
services.displayManager.autoLogin.enable = true;
|
||||
services.displayManager.autoLogin.user = "nomarchy";
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.nomarchy = {
|
||||
imports = [ ./modules/home ];
|
||||
home.username = "nomarchy";
|
||||
home.homeDirectory = "/home/nomarchy";
|
||||
home.stateVersion = "24.11";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user