Evie Litherland-Smith
9394a99a4c
Loads of expressions were a single default.nix in a directory, instead just make a single directory Hyprland is the only directory of expressions left Move a few things around to fit this a bit better Add home/default.nix to defer "import all" from flake.nix Remove work email from default account set up, add to work laptop specifically and only Clean up a few unused expressions
268 lines
9 KiB
Nix
268 lines
9 KiB
Nix
{
|
|
description = "Evie's machine configurations";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
hyprland = {
|
|
url = "github:hyprwm/Hyprland";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Non-flake inputs
|
|
doom-emacs = {
|
|
url = "github:doomemacs/doomemacs";
|
|
flake = false;
|
|
};
|
|
wallpapers = {
|
|
url = "git+https://git.xenia.me.uk/xenia/wallpapers.git";
|
|
flake = false;
|
|
};
|
|
catppuccin-alacritty = {
|
|
url = "github:catppuccin/alacritty";
|
|
flake = false;
|
|
};
|
|
catppuccin-bat = {
|
|
url = "github:catppuccin/bat";
|
|
flake = false;
|
|
};
|
|
catppuccin-fish = {
|
|
url = "github:catppuccin/fish";
|
|
flake = false;
|
|
};
|
|
catppuccin-gitui = {
|
|
url = "github:catppuccin/gitui";
|
|
flake = false;
|
|
};
|
|
catppuccin-hyprland = {
|
|
url = "github:catppuccin/hyprland";
|
|
flake = false;
|
|
};
|
|
catppuccin-starship = {
|
|
url = "github:catppuccin/starship";
|
|
flake = false;
|
|
};
|
|
catppuccin-zathura = {
|
|
url = "github:catppuccin/zathura";
|
|
flake = false;
|
|
};
|
|
catppuccin-zsh = {
|
|
url = "github:catppuccin/zsh-syntax-highlighting";
|
|
flake = false;
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, home-manager, ... }@inputs:
|
|
let
|
|
flakeURL = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main";
|
|
wallpapers = { default = "${inputs.wallpapers}/waves/cat-waves.png"; };
|
|
catppuccin-themes = with inputs; {
|
|
alacritty = "${catppuccin-alacritty}/catppuccin-macchiato.yml";
|
|
bat = "${catppuccin-bat}/Catppuccin-macchiato.tmTheme";
|
|
fish = "${catppuccin-fish}/themes/Catppuccin Macchiato.theme";
|
|
gitui = "${catppuccin-gitui}/theme/macchiato.ron";
|
|
hyprland = "${catppuccin-hyprland}/themes/macchiato.conf";
|
|
starship = "${catppuccin-starship}/palettes/macchiato.toml";
|
|
zathura = "${catppuccin-zathura}/src/catppuccin-macchiato";
|
|
zsh =
|
|
"${catppuccin-zsh}/themes/catppuccin_macchiato-zsh-syntax-highlighting.zsh";
|
|
};
|
|
default = {
|
|
hostName = "Atlas";
|
|
user = "xenia";
|
|
system = "x86_64-linux";
|
|
group = "users";
|
|
shell = "zsh";
|
|
systemModules = [ ./system/hyprland.nix ];
|
|
serviceModules =
|
|
[ ./services/sshd/default.nix ./services/syncthing/default.nix ];
|
|
homeModules = [ ./home/default.nix ];
|
|
stateVersion = "23.05";
|
|
};
|
|
systemConfig = { hostName ? default.hostName, user ? default.user
|
|
, system ? default.system, group ? default.group, shell ? default.shell
|
|
, systemModules ? default.systemModules
|
|
, serviceModules ? default.serviceModules
|
|
, homeModules ? default.homeModules, stateVersion ? default.stateVersion
|
|
}:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
overlays = [
|
|
(final: prev: {
|
|
waybar = prev.waybar.overrideAttrs (oldAttrs: {
|
|
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
|
});
|
|
})
|
|
];
|
|
};
|
|
specialArgs = {
|
|
inherit hostName user group;
|
|
inherit (inputs) hyprland;
|
|
};
|
|
extraSpecialArgs = specialArgs // {
|
|
inherit wallpapers catppuccin-themes;
|
|
inherit (inputs) doom-emacs;
|
|
};
|
|
commonModule = {
|
|
nix = {
|
|
settings = {
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
auto-optimise-store = true;
|
|
};
|
|
gc = {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than 30d";
|
|
};
|
|
extraOptions = ''
|
|
keep-outputs = true
|
|
keep-derivations = true
|
|
min-free = ${toString (100 * 1024 * 1024)}
|
|
max-free = ${toString (1024 * 1024 * 1024)}
|
|
'';
|
|
};
|
|
networking = {
|
|
inherit hostName;
|
|
networkmanager.enable = true;
|
|
};
|
|
environment = {
|
|
systemPackages = with pkgs; [ git neofetch ];
|
|
localBinInPath = true;
|
|
};
|
|
services = {
|
|
power-profiles-daemon.enable = true;
|
|
passSecretService.enable = true;
|
|
};
|
|
virtualisation.podman.enable = true;
|
|
time.timeZone = "Europe/London";
|
|
i18n = let locale = "en_GB.UTF-8";
|
|
in {
|
|
# Select internationalisation properties.
|
|
defaultLocale = locale;
|
|
extraLocaleSettings = {
|
|
LC_ADDRESS = locale;
|
|
LC_IDENTIFICATION = locale;
|
|
LC_MEASUREMENT = locale;
|
|
LC_MONETARY = locale;
|
|
LC_NAME = locale;
|
|
LC_NUMERIC = locale;
|
|
LC_PAPER = locale;
|
|
LC_TELEPHONE = locale;
|
|
LC_TIME = locale;
|
|
};
|
|
};
|
|
programs.${shell}.enable = true;
|
|
system = {
|
|
inherit stateVersion;
|
|
autoUpgrade.flake = flakeURL;
|
|
};
|
|
users.users.${user} = {
|
|
inherit group;
|
|
isNormalUser = true;
|
|
description = "Evie Litherland-Smith";
|
|
extraGroups = [ "networkmanager" "wheel" "video" ];
|
|
shell = pkgs.${shell};
|
|
openssh.authorizedKeys.keys = [
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIANfkqd5lPTsSPU3SRYnAa1UjCYDmDeBTyzq5McmWlm6 xenia@Vanguard"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII1tJFdbiyJApuVZFvo9E9kjlBwvXZeySqVuS2qGdxha tux@monarch"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDI44C35I2x9tqzeZDmIpbzmGJWXfATn/Wp5KzVRdlCi root@debian"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKMVEXJTqWkrpmvinPJGsSvome9bCd0CM4iu13aVG6UZ elitherl@Ronin"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ/ZSSCN5sqrA+tdoIZr5EUm5DRuBV4dQ7J+QBEtUwUU xenia@Northstar"
|
|
];
|
|
};
|
|
home-manager = {
|
|
inherit extraSpecialArgs;
|
|
useGlobalPkgs = true;
|
|
useUserPackages = true;
|
|
users.${user} = let
|
|
username = user;
|
|
homeDirectory = "/home/${user}";
|
|
in {
|
|
imports = [ ./hosts/${hostName}/home.nix ] ++ homeModules;
|
|
home = { inherit username homeDirectory stateVersion; };
|
|
programs.home-manager.enable = true;
|
|
xdg.userDirs = {
|
|
enable = true;
|
|
createDirectories = true;
|
|
extraConfig = {
|
|
XDG_PROJECTS_DIR = "${homeDirectory}/Projects";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
in nixpkgs.lib.nixosSystem {
|
|
inherit pkgs specialArgs;
|
|
modules = [
|
|
./hosts/${hostName}/configuration.nix
|
|
./hosts/${hostName}/hardware-configuration.nix
|
|
home-manager.nixosModules.home-manager
|
|
commonModule
|
|
] ++ systemModules ++ serviceModules;
|
|
};
|
|
in {
|
|
nixosConfigurations = {
|
|
|
|
Legion = let
|
|
hostName = "Legion";
|
|
user = "xenia";
|
|
system = "x86_64-linux";
|
|
in systemConfig {
|
|
inherit hostName user system;
|
|
systemModules = [ ];
|
|
serviceModules = [
|
|
./services/adguardhome/default.nix
|
|
./services/gitea/default.nix
|
|
./services/nextcloud/default.nix
|
|
./services/sshd/default.nix
|
|
./services/syncthing/default.nix
|
|
./services/terraria/windy_limbo_of_melancholy.nix
|
|
./services/traefik/adguardhome.nix
|
|
./services/traefik/gitea.nix
|
|
./services/traefik/nextcloud.nix
|
|
./services/traefik/qbittorrent.nix
|
|
];
|
|
homeModules = [
|
|
./home/git/default.nix
|
|
./home/ssh/default.nix
|
|
./home/tui/default.nix
|
|
];
|
|
};
|
|
|
|
Northstar = let
|
|
hostName = "Northstar";
|
|
user = "xenia";
|
|
system = "x86_64-linux";
|
|
in systemConfig { inherit hostName user system; };
|
|
|
|
Ronin = let
|
|
hostName = "Ronin";
|
|
user = "elitherl";
|
|
system = "x86_64-linux";
|
|
in systemConfig { inherit hostName user system; };
|
|
|
|
Vanguard = let
|
|
hostName = "Vanguard";
|
|
user = "xenia";
|
|
system = "x86_64-linux";
|
|
in systemConfig {
|
|
inherit hostName user system;
|
|
systemModules = [ ./system/gamepass.nix ];
|
|
serviceModules = [ ./services/sshd/default.nix ];
|
|
homeModules = [
|
|
./home/git/default.nix
|
|
./home/ssh/default.nix
|
|
./home/tui/default.nix
|
|
];
|
|
};
|
|
|
|
};
|
|
};
|
|
}
|