Evie Litherland-Smith
05d19c1813
Split system-level sway and plasma config into separate files, move sway-specific home-level config to sway file. Only truly common desktop components are kept in common spaces. This allows much easier switching between using KDE Plasma and Sway.
191 lines
5.7 KiB
Nix
191 lines
5.7 KiB
Nix
{
|
|
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 = {system}: let
|
|
iosevkaCustom = {
|
|
packages = iosevka-custom.outputs.packages.${system};
|
|
names = iosevka-custom.outputs.names;
|
|
};
|
|
in {
|
|
inherit iosevkaCustom;
|
|
inherit (plasma-manager.packages.${system}) rc2nix;
|
|
accentColourName = "base0E";
|
|
fonts = with iosevkaCustom; rec {
|
|
sizes = {
|
|
applications = 14;
|
|
desktop = 12;
|
|
popups = 16;
|
|
terminal = 14;
|
|
};
|
|
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];
|
|
services.greetd.settings.initial_session.user = 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;};
|
|
useGlobalPkgs = true;
|
|
useUserPackages = true;
|
|
backupFileExtension = "backup";
|
|
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;
|
|
homeDirectory = "/home/${username}";
|
|
stateVersion = "23.05";
|
|
};
|
|
programs.home-manager.enable = true;
|
|
nixpkgs.config.allowUnfree = 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;};
|
|
};
|
|
};
|
|
};
|
|
}
|