nixos/flake.nix

139 lines
4 KiB
Nix
Raw Normal View History

2023-06-21 17:41:35 +01:00
{
description = "Evie's machine configurations";
nixConfig = {
extra-substituters = ["https://nix.xenia.me.uk"];
2024-04-17 18:04:43 +01:00
extra-trusted-public-keys = ["nix.xenia.me.uk:tlgwOaG5KMLjQUk2YaErS8mAG69ZCr3PaHXZYi+Y5eI="];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
2024-03-12 05:46:32 +00:00
iosevka-custom.url = "git+https://git.xenia.me.uk/pixelifytica/iosevka.git";
};
2023-06-21 17:41:35 +01:00
2024-01-30 14:21:50 +00:00
outputs = {
nixpkgs,
iosevka-custom,
2024-01-30 14:21:50 +00:00
...
}: let
defaultSpecialArgs = {system ? "x86_64-linux", ...}: {
iosevkaCustom = {
packages = iosevka-custom.outputs.packages.${system};
names = iosevka-custom.outputs.names;
};
};
defaultModules = {
hostName ? "Atlas",
primaryUser ? "pixelifytica",
loginShell ? "zsh",
...
}: [
./configuration/default.nix
./configuration/${hostName}.nix
./hardware-configuration/${hostName}.nix
({
config,
lib,
pkgs,
...
}: {
networking = {inherit hostName;};
nix = {
settings.trusted-users = [primaryUser];
registry = {
nixpkgs.flake = nixpkgs;
my-nixos = {
from = {
type = "indirect";
id = "my-nixos";
};
to = {
type = "git";
url = "https://git.xenia.me.uk/pixelifytica/nixos.git?ref=main";
};
};
my-home-manager = {
from = {
type = "indirect";
id = "my-home-manager";
};
to = {
type = "git";
url = "https://git.xenia.me.uk/pixelifytica/home-manager.git?ref=main";
};
};
};
};
services.greetd.settings.initial_session.user = primaryUser;
programs.${loginShell}.enable = true;
users.users.${primaryUser} = {
shell = pkgs.${loginShell};
group = "users";
isNormalUser = true;
description = "Evie Litherland-Smith";
extraGroups = ["networkmanager" "wheel" "video" "input" "uinput"];
initialHashedPassword = "$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
openssh = {inherit (config.users.users.root.openssh) authorizedKeys;};
};
})
];
2024-01-30 14:21:50 +00:00
in {
devShells.x86_64-linux.default = let
pkgs = import nixpkgs {system = "x86_64-linux";};
in
pkgs.mkShellNoCC {
packages = [pkgs.nil];
};
nixosConfigurations = {
2024-01-30 14:21:50 +00:00
## Server
Legion = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules {
hostName = "Legion";
primaryUser = "pixelifytica";
loginShell = "zsh";
};
};
2024-01-30 14:21:50 +00:00
## Personal
Northstar = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules {
hostName = "Northstar";
primaryUser = "pixelifytica";
loginShell = "zsh";
};
};
Vanguard = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules {
hostName = "Vanguard";
primaryUser = "pixelifytica";
loginShell = "zsh";
};
2024-03-08 07:30:18 +00:00
};
2024-01-30 14:21:50 +00:00
## Work
2024-05-20 07:10:25 +01:00
Tone = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules {
2024-05-20 07:10:25 +01:00
hostName = "Tone";
primaryUser = "elitherl";
loginShell = "zsh";
};
};
Scorch = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules {
hostName = "Scorch";
primaryUser = "elitherl";
loginShell = "zsh";
};
};
};
2024-01-30 14:21:50 +00:00
};
2023-06-21 17:41:35 +01:00
}