nixos/flake.nix
Evie Litherland-Smith 2a42c14fb5 Lots more theming
Switch remaining catppuccin to tokyonight, using stylix to generate GTK
theme now

Switch SDDM for LightDM (uses stylix theme), enable plymouth boot
splashscreen

Make Hyprland window rules (not launch binds) silent now
2023-10-14 20:49:30 +01:00

191 lines
6.4 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";
};
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
anyrun = {
url = "github:Kirottu/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
watershot = {
url = "github:Kirottu/watershot";
inputs.nixpkgs.follows = "nixpkgs";
};
# Non-flake inputs
doom-emacs = {
url = "github:doomemacs/doomemacs";
flake = false;
};
gitui = {
url = "github:extrawurst/gitui";
flake = false;
};
tokyonight-folke = {
url = "github:folke/tokyonight.nvim";
flake = false;
};
};
outputs = { self, nixpkgs, home-manager, stylix, ... }@inputs:
let
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/accounts/default.nix
./home/emacs/default.nix
./home/ferdium/default.nix
./home/hyprland/default.nix
./home/alacritty.nix
./home/default.nix
./home/firefox.nix
./home/kdeconnect.nix
./home/media.nix
./home/pass.nix
./home/zathura.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
specialArgs = {
inherit hostName user;
inherit (inputs) anyrun watershot;
};
extraSpecialArgs = specialArgs // {
inherit (inputs) doom-emacs gitui tokyonight-folke;
};
in nixpkgs.lib.nixosSystem {
inherit system specialArgs;
modules = [
./hosts/${hostName}/configuration.nix
./hosts/${hostName}/hardware-configuration.nix
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix
({ pkgs, ... }: {
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
programs.${shell}.enable = true;
system = { inherit stateVersion; };
networking = { inherit hostName; };
users.users.${user} = {
inherit group;
isNormalUser = true;
description = "Evie Litherland-Smith";
extraGroups = [ "networkmanager" "wheel" "video" ];
shell = pkgs.${shell};
initialHashedPassword =
"$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIANfkqd5lPTsSPU3SRYnAa1UjCYDmDeBTyzq5McmWlm6 xenia@Vanguard"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion"
"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 ./home/default.nix ]
++ homeModules;
home = { inherit username homeDirectory stateVersion; };
programs.home-manager.enable = true;
xdg.userDirs = {
enable = true;
createDirectories = true;
extraConfig = {
XDG_PROJECTS_DIR = "${homeDirectory}/Projects";
};
};
};
};
})
] ++ systemModules ++ serviceModules;
};
in {
nixosConfigurations = {
Legion = let
hostName = "Legion";
user = "xenia";
system = "x86_64-linux";
in systemConfig {
inherit hostName user system;
systemModules = [ ./system/default.nix ];
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/default.nix ];
};
Northstar = let
hostName = "Northstar";
user = "xenia";
system = "x86_64-linux";
in systemConfig {
inherit hostName user system;
systemModules = default.systemModules ++ [ ./system/steam.nix ];
};
Ronin = let
hostName = "Ronin";
user = "elitherl";
system = "x86_64-linux";
in systemConfig { inherit hostName user system; };
Scorch = let
hostName = "Scorch";
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 = default.systemModules ++ [ ./system/steam.nix ];
};
};
};
}