{ description = "Evie's machine configurations"; nixConfig = { extra-substituters = ["https://nix.xenia.me.uk"]; extra-trusted-public-keys = ["nix.xenia.me.uk:tlgwOaG5KMLjQUk2YaErS8mAG69ZCr3PaHXZYi+Y5eI="]; }; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; plasma-manager = { url = "github:nix-community/plasma-manager"; inputs = { nixpkgs.follows = "nixpkgs"; home-manager.follows = "home-manager"; }; }; iosevka-custom.url = "git+https://git.xenia.me.uk/pixelifytica/iosevka.git"; base16.url = "github:SenchoPens/base16.nix"; tt-schemes = { url = "github:tinted-theming/schemes"; flake = false; }; }; outputs = { nixpkgs, home-manager, plasma-manager, iosevka-custom, base16, tt-schemes, ... }: let defaultSpecialArgs = {system ? "x86_64-linux", ...}: { iosevkaCustom = { packages = iosevka-custom.outputs.packages.${system}; names = iosevka-custom.outputs.names; }; }; defaultExtraSpecialArgs = { hostname, system, }: let iosevkaCustom = { packages = iosevka-custom.outputs.packages.${system}; names = iosevka-custom.outputs.names; }; in { inherit hostname iosevkaCustom; inherit (plasma-manager.packages.${system}) rc2nix; accentColourName = "base0C"; fonts = with iosevkaCustom; rec { sizes = { applications = 12; desktop = 10; popups = 14; terminal = 12; }; serif = sansSerif; sansSerif = { name = names.iosevka-custom-aile; package = packages.iosevka-custom-aile; }; monospace = { name = names.iosevka-custom-nerdfont; package = packages.iosevka-custom-nerdfont; }; }; }; defaultModules = { system ? "x86_64-linux", username ? "pixelifytica", hostName ? "Atlas", loginShell ? "zsh", ... }: [ home-manager.nixosModules.home-manager ./system/default.nix ./system/${hostName}.nix ./system/hardware-configuration/${hostName}.nix ({ config, lib, pkgs, ... }: { networking = {inherit hostName;}; nix.settings.trusted-users = [username]; programs.${loginShell}.enable = true; users.users.${username} = { 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;}; }; home-manager = { extraSpecialArgs = defaultExtraSpecialArgs { inherit system; hostname = hostName; }; useGlobalPkgs = true; useUserPackages = true; users.${username} = { imports = [ plasma-manager.homeManagerModules.plasma-manager base16.homeManagerModule {scheme = "${tt-schemes}/base16/one-light.yaml";} ./home/default.nix ./home/${hostName}.nix ]; home = {inherit username;}; programs.home-manager.enable = true; }; }; }) ]; in { devShells.x86_64-linux.default = let pkgs = import nixpkgs {system = "x86_64-linux";}; in pkgs.mkShellNoCC { packages = with pkgs; [nil pre-commit]; shellHook = "pre-commit install --install-hooks"; }; nixosConfigurations = { ## Server Legion = let system = "x86_64-linux"; username = "pixelifytica"; hostName = "Legion"; loginShell = "zsh"; in nixpkgs.lib.nixosSystem { specialArgs = defaultSpecialArgs {inherit system;}; modules = defaultModules {inherit system username hostName loginShell;}; }; ## Personal Northstar = let system = "x86_64-linux"; username = "pixelifytica"; hostName = "Northstar"; loginShell = "zsh"; in nixpkgs.lib.nixosSystem { specialArgs = defaultSpecialArgs {inherit system;}; modules = defaultModules {inherit system username hostName loginShell;}; }; Vanguard = let system = "x86_64-linux"; username = "pixelifytica"; hostName = "Vanguard"; loginShell = "zsh"; in nixpkgs.lib.nixosSystem { specialArgs = defaultSpecialArgs {inherit system;}; modules = defaultModules {inherit system username hostName loginShell;}; }; ## Work Tone = let system = "x86_64-linux"; username = "elitherl"; hostName = "Tone"; loginShell = "zsh"; in nixpkgs.lib.nixosSystem { specialArgs = defaultSpecialArgs {inherit system;}; modules = defaultModules {inherit system username hostName loginShell;}; }; Scorch = let system = "x86_64-linux"; username = "elitherl"; hostName = "Scorch"; loginShell = "zsh"; in nixpkgs.lib.nixosSystem { specialArgs = defaultSpecialArgs {inherit system;}; modules = defaultModules {inherit system username hostName loginShell;}; }; }; }; }