2023-06-21 17:41:35 +01:00
|
|
|
{
|
2023-06-21 20:49:28 +01:00
|
|
|
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";
|
|
|
|
};
|
2023-10-23 21:33:06 +01:00
|
|
|
nix-index-database = {
|
|
|
|
url = "github:Mic92/nix-index-database";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-09-26 19:03:50 +01:00
|
|
|
stylix = {
|
|
|
|
url = "github:danth/stylix";
|
2023-07-13 12:41:00 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-09-12 06:24:56 +01:00
|
|
|
|
|
|
|
# Non-flake inputs
|
2023-10-24 11:20:35 +01:00
|
|
|
crafted-emacs = {
|
|
|
|
url = "github:SystemCrafters/crafted-emacs";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-10-12 07:21:40 +01:00
|
|
|
tokyonight-folke = {
|
|
|
|
url = "github:folke/tokyonight.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-06-21 20:49:28 +01:00
|
|
|
};
|
2023-06-21 17:41:35 +01:00
|
|
|
|
2023-10-23 21:33:06 +01:00
|
|
|
outputs =
|
|
|
|
{ self, nixpkgs, home-manager, nix-index-database, stylix, ... }@inputs:
|
2023-08-31 12:22:29 +01:00
|
|
|
let
|
2023-09-10 17:07:11 +01:00
|
|
|
default = {
|
|
|
|
hostName = "Atlas";
|
|
|
|
user = "xenia";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
group = "users";
|
2023-11-04 16:47:14 +00:00
|
|
|
shell = "fish";
|
2023-09-10 17:07:11 +01:00
|
|
|
systemModules = [ ./system/hyprland.nix ];
|
2023-10-09 11:40:25 +01:00
|
|
|
homeModules = [
|
|
|
|
./home/accounts/default.nix
|
|
|
|
./home/emacs/default.nix
|
|
|
|
./home/hyprland/default.nix
|
2023-11-04 10:01:21 +00:00
|
|
|
./home/nyxt/default.nix
|
2023-10-09 11:40:25 +01:00
|
|
|
./home/alacritty.nix
|
|
|
|
./home/default.nix
|
2023-11-04 10:26:47 +00:00
|
|
|
./home/kdeconnect.nix
|
2023-10-09 11:40:25 +01:00
|
|
|
./home/media.nix
|
|
|
|
./home/pass.nix
|
|
|
|
];
|
2023-09-10 17:07:11 +01:00
|
|
|
stateVersion = "23.05";
|
|
|
|
};
|
|
|
|
systemConfig = { hostName ? default.hostName, user ? default.user
|
|
|
|
, system ? default.system, group ? default.group, shell ? default.shell
|
2023-10-26 16:49:11 +01:00
|
|
|
, systemModules ? default.systemModules, serviceModules ? [ ]
|
2023-09-10 17:07:11 +01:00
|
|
|
, homeModules ? default.homeModules, stateVersion ? default.stateVersion
|
|
|
|
}:
|
2023-08-31 12:22:29 +01:00
|
|
|
let
|
2023-10-30 17:54:50 +00:00
|
|
|
specialArgs = { inherit hostName user; };
|
2023-09-13 06:45:28 +01:00
|
|
|
extraSpecialArgs = specialArgs // {
|
2023-10-25 07:53:07 +01:00
|
|
|
inherit (inputs) crafted-emacs tokyonight-folke;
|
2023-09-13 06:45:28 +01:00
|
|
|
};
|
2023-07-25 16:14:50 +01:00
|
|
|
in nixpkgs.lib.nixosSystem {
|
2023-09-21 08:51:07 +01:00
|
|
|
inherit system specialArgs;
|
2023-08-31 12:22:29 +01:00
|
|
|
modules = [
|
|
|
|
./hosts/${hostName}/configuration.nix
|
2023-09-10 17:07:11 +01:00
|
|
|
./hosts/${hostName}/hardware-configuration.nix
|
2023-09-13 06:45:28 +01:00
|
|
|
home-manager.nixosModules.home-manager
|
2023-10-23 21:33:06 +01:00
|
|
|
nix-index-database.nixosModules.nix-index
|
2023-09-26 19:03:50 +01:00
|
|
|
stylix.nixosModules.stylix
|
2023-10-15 12:27:16 +01:00
|
|
|
({ config, lib, pkgs, ... }: {
|
2023-10-09 14:48:40 +01:00
|
|
|
boot.loader = {
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
};
|
2023-10-23 08:29:58 +01:00
|
|
|
programs = {
|
|
|
|
${shell}.enable = true;
|
|
|
|
nano = {
|
|
|
|
enable = true;
|
|
|
|
syntaxHighlight = true;
|
|
|
|
nanorc = ''
|
|
|
|
set nowrap
|
|
|
|
set tabstospaces
|
|
|
|
set tabsize 2
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
command-not-found.enable = false;
|
2023-10-23 21:33:06 +01:00
|
|
|
nix-index.enable = true;
|
2023-10-23 08:29:58 +01:00
|
|
|
};
|
2023-10-15 12:27:16 +01:00
|
|
|
nix = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
auto-optimise-store = true;
|
|
|
|
};
|
|
|
|
channel.enable = false;
|
2023-10-23 08:29:58 +01:00
|
|
|
nixPath = [
|
|
|
|
"nixpkgs=${pkgs.path}"
|
|
|
|
"/nix/var/nix/profiles/per-user/root/channels"
|
|
|
|
];
|
2023-10-15 12:27:16 +01:00
|
|
|
registry = {
|
|
|
|
nixpkgs.to = {
|
|
|
|
type = "path";
|
|
|
|
path = pkgs.path;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
gc = {
|
|
|
|
automatic = true;
|
|
|
|
options = "--delete-older-than 7d";
|
|
|
|
};
|
|
|
|
optimise.automatic = true;
|
|
|
|
extraOptions = ''
|
|
|
|
keep-outputs = true
|
|
|
|
keep-derivations = true
|
|
|
|
min-free = ${toString (100 * 1024 * 1024)}
|
|
|
|
max-free = ${toString (1024 * 1024 * 1024)}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
|
|
|
builtins.elem (lib.getName pkg) [
|
|
|
|
"steam"
|
|
|
|
"steam-original"
|
|
|
|
"steam-run"
|
2023-11-03 07:03:00 +00:00
|
|
|
"discord"
|
2023-10-15 12:27:16 +01:00
|
|
|
"nomachine-client"
|
|
|
|
];
|
2023-10-09 11:40:25 +01:00
|
|
|
system = { inherit stateVersion; };
|
|
|
|
networking = { inherit hostName; };
|
2023-10-18 06:57:42 +01:00
|
|
|
stylix = {
|
|
|
|
image = ./wallpapers/default.jpg;
|
|
|
|
base16Scheme =
|
2023-11-05 05:55:52 +00:00
|
|
|
"${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml";
|
2023-10-18 06:57:42 +01:00
|
|
|
polarity = "dark";
|
|
|
|
opacity = {
|
2023-11-05 05:55:52 +00:00
|
|
|
applications = 0.8;
|
|
|
|
desktop = 0.5;
|
2023-10-19 07:40:03 +01:00
|
|
|
popups = 0.5;
|
2023-10-18 06:57:42 +01:00
|
|
|
terminal = 0.8;
|
|
|
|
};
|
|
|
|
fonts = rec {
|
|
|
|
emoji = {
|
|
|
|
name = "Noto Color Emoji";
|
|
|
|
package = pkgs.noto-fonts-emoji;
|
|
|
|
};
|
|
|
|
monospace = {
|
|
|
|
name = "Fira Mono";
|
|
|
|
package = pkgs.fira-mono;
|
|
|
|
};
|
|
|
|
sansSerif = {
|
|
|
|
name = "Fira Sans";
|
|
|
|
package = pkgs.fira;
|
|
|
|
};
|
|
|
|
serif = sansSerif;
|
|
|
|
};
|
|
|
|
homeManagerIntegration.followSystem = true;
|
|
|
|
};
|
|
|
|
fonts = {
|
|
|
|
packages = with pkgs; [
|
|
|
|
fira
|
|
|
|
fira-mono
|
|
|
|
fira-code
|
|
|
|
fira-code-symbols
|
2023-11-01 08:37:30 +00:00
|
|
|
(nerdfonts.override {
|
|
|
|
fonts = [
|
|
|
|
"FiraCode"
|
|
|
|
"FiraMono"
|
|
|
|
"DejaVuSansMono"
|
|
|
|
"Noto"
|
|
|
|
"ComicShannsMono"
|
|
|
|
"NerdFontsSymbolsOnly"
|
|
|
|
];
|
|
|
|
})
|
|
|
|
emacs-all-the-icons-fonts
|
|
|
|
weather-icons
|
2023-10-18 06:57:42 +01:00
|
|
|
noto-fonts
|
|
|
|
noto-fonts-cjk
|
|
|
|
noto-fonts-emoji
|
|
|
|
liberation_ttf
|
|
|
|
];
|
|
|
|
fontconfig = {
|
|
|
|
enable = true;
|
|
|
|
defaultFonts = rec {
|
|
|
|
sansSerif = [ "Fira Sans" "DejaVu Sans" ];
|
|
|
|
serif = sansSerif;
|
|
|
|
monospace = [ "Fira Mono" "DejaVu Sans Mono" ];
|
|
|
|
emoji = [ "Noto Color Emoji" "Noto Emoji" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-10-22 06:52:38 +01:00
|
|
|
users.users = let
|
|
|
|
authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIANfkqd5lPTsSPU3SRYnAa1UjCYDmDeBTyzq5McmWlm6 xenia@Vanguard"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ/ZSSCN5sqrA+tdoIZr5EUm5DRuBV4dQ7J+QBEtUwUU xenia@Northstar"
|
|
|
|
];
|
|
|
|
in {
|
|
|
|
root = {
|
2023-11-04 16:47:14 +00:00
|
|
|
shell = pkgs.bash;
|
2023-10-22 06:52:38 +01:00
|
|
|
openssh = { inherit authorizedKeys; };
|
|
|
|
};
|
2023-10-22 06:38:40 +01:00
|
|
|
${user} = {
|
|
|
|
inherit group;
|
|
|
|
isNormalUser = true;
|
|
|
|
description = "Evie Litherland-Smith";
|
|
|
|
extraGroups = [ "networkmanager" "wheel" "video" ];
|
|
|
|
shell = pkgs.${shell};
|
|
|
|
initialHashedPassword =
|
|
|
|
"$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
|
2023-10-22 06:52:38 +01:00
|
|
|
openssh = { inherit authorizedKeys; };
|
2023-10-22 06:38:40 +01:00
|
|
|
};
|
2023-10-09 11:40:25 +01:00
|
|
|
};
|
|
|
|
home-manager = {
|
|
|
|
inherit extraSpecialArgs;
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
2023-10-18 06:43:41 +01:00
|
|
|
users = {
|
|
|
|
root = {
|
|
|
|
imports = [ ./home/default.nix ];
|
|
|
|
home = {
|
|
|
|
inherit stateVersion;
|
|
|
|
username = "root";
|
|
|
|
homeDirectory = "/root";
|
|
|
|
};
|
|
|
|
programs.home-manager.enable = true;
|
|
|
|
};
|
|
|
|
${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";
|
|
|
|
};
|
2023-10-09 11:40:25 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
2023-09-10 17:07:11 +01:00
|
|
|
] ++ systemModules ++ serviceModules;
|
2023-07-16 17:35:36 +01:00
|
|
|
};
|
2023-08-31 12:22:29 +01:00
|
|
|
in {
|
|
|
|
nixosConfigurations = {
|
2023-09-10 17:07:11 +01:00
|
|
|
|
|
|
|
Legion = let
|
2023-08-31 12:22:29 +01:00
|
|
|
hostName = "Legion";
|
2023-08-31 12:33:10 +01:00
|
|
|
user = "xenia";
|
2023-08-31 12:22:29 +01:00
|
|
|
system = "x86_64-linux";
|
2023-09-10 17:07:11 +01:00
|
|
|
in systemConfig {
|
|
|
|
inherit hostName user system;
|
2023-10-09 11:40:25 +01:00
|
|
|
systemModules = [ ./system/default.nix ];
|
2023-10-26 16:49:11 +01:00
|
|
|
serviceModules = [
|
2023-10-21 17:55:11 +01:00
|
|
|
./services/adguardhome/default.nix
|
2023-09-10 17:07:11 +01:00
|
|
|
./services/gitea/default.nix
|
|
|
|
./services/nextcloud/default.nix
|
2023-10-21 17:55:11 +01:00
|
|
|
./services/ntfy-sh/default.nix
|
2023-10-26 16:49:11 +01:00
|
|
|
./services/sshd/default.nix
|
|
|
|
./services/syncthing/default.nix
|
2023-09-10 17:07:11 +01:00
|
|
|
];
|
2023-10-24 09:58:42 +01:00
|
|
|
homeModules =
|
|
|
|
[ ./home/default.nix ./home/media.nix ./home/emacs/default.nix ];
|
2023-09-10 17:07:11 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
Northstar = let
|
|
|
|
hostName = "Northstar";
|
|
|
|
user = "xenia";
|
|
|
|
system = "x86_64-linux";
|
2023-10-26 16:49:11 +01:00
|
|
|
in systemConfig { inherit hostName user system; };
|
2023-09-10 17:07:11 +01:00
|
|
|
|
|
|
|
Ronin = let
|
2023-08-31 12:22:29 +01:00
|
|
|
hostName = "Ronin";
|
|
|
|
user = "elitherl";
|
|
|
|
system = "x86_64-linux";
|
2023-09-11 10:31:55 +01:00
|
|
|
in systemConfig { inherit hostName user system; };
|
2023-09-10 17:07:11 +01:00
|
|
|
|
|
|
|
Vanguard = let
|
2023-08-31 12:22:29 +01:00
|
|
|
hostName = "Vanguard";
|
|
|
|
user = "xenia";
|
|
|
|
system = "x86_64-linux";
|
2023-09-10 17:07:11 +01:00
|
|
|
in systemConfig {
|
|
|
|
inherit hostName user system;
|
2023-09-23 18:05:51 +01:00
|
|
|
systemModules = default.systemModules ++ [ ./system/steam.nix ];
|
2023-10-20 22:01:07 +01:00
|
|
|
homeModules = default.homeModules ++ [ ./home/obs.nix ];
|
2023-07-16 17:35:36 +01:00
|
|
|
};
|
2023-09-10 17:07:11 +01:00
|
|
|
|
2023-08-31 12:22:29 +01:00
|
|
|
};
|
2023-06-21 20:49:28 +01:00
|
|
|
};
|
2023-06-21 17:41:35 +01:00
|
|
|
}
|