2024-03-31 12:59:24 +01:00
|
|
|
{
|
2024-06-07 06:17:37 +01:00
|
|
|
config,
|
2024-08-23 10:49:58 +01:00
|
|
|
lib,
|
2024-03-31 12:59:24 +01:00
|
|
|
pkgs,
|
2024-08-30 12:57:02 +01:00
|
|
|
inputs,
|
|
|
|
username,
|
|
|
|
hostName,
|
2024-03-31 12:59:24 +01:00
|
|
|
...
|
2024-07-30 15:06:34 +01:00
|
|
|
}:
|
|
|
|
{
|
2024-08-30 12:57:02 +01:00
|
|
|
imports = [
|
|
|
|
inputs.home-manager.nixosModules.home-manager
|
|
|
|
./${hostName}.nix
|
|
|
|
./hardware-configuration/${hostName}.nix
|
|
|
|
];
|
2024-05-11 15:41:19 +01:00
|
|
|
nix = {
|
|
|
|
enable = true;
|
2024-08-30 12:57:02 +01:00
|
|
|
package = pkgs.nixVersions.latest;
|
2024-05-11 15:41:19 +01:00
|
|
|
settings = {
|
|
|
|
cores = 0;
|
|
|
|
max-jobs = "auto";
|
2024-08-30 12:57:02 +01:00
|
|
|
trusted-users = [
|
|
|
|
"root"
|
|
|
|
username
|
|
|
|
];
|
2024-07-30 15:06:34 +01:00
|
|
|
experimental-features = [
|
|
|
|
"nix-command"
|
|
|
|
"flakes"
|
|
|
|
];
|
2024-05-11 15:41:19 +01:00
|
|
|
auto-optimise-store = true;
|
|
|
|
};
|
|
|
|
channel.enable = true;
|
|
|
|
gc = {
|
|
|
|
automatic = true;
|
|
|
|
options = "--delete-older-than 7d";
|
|
|
|
};
|
|
|
|
optimise.automatic = true;
|
2024-07-03 07:26:09 +01:00
|
|
|
registry.my-nixos = {
|
|
|
|
from = {
|
|
|
|
type = "indirect";
|
|
|
|
id = "my-nixos";
|
2024-07-03 07:15:39 +01:00
|
|
|
};
|
2024-07-03 07:26:09 +01:00
|
|
|
to = {
|
|
|
|
type = "git";
|
|
|
|
url = "https://git.xenia.me.uk/pixelifytica/nixos.git?ref=main";
|
2024-07-03 07:15:39 +01:00
|
|
|
};
|
|
|
|
};
|
2024-05-11 15:41:19 +01:00
|
|
|
extraOptions = ''
|
|
|
|
keep-outputs = false
|
|
|
|
keep-derivations = false
|
|
|
|
min-free = ${toString (100 * 1024 * 1024)}
|
|
|
|
max-free = ${toString (1024 * 1024 * 1024)}
|
|
|
|
'';
|
|
|
|
};
|
2024-08-30 12:57:02 +01:00
|
|
|
nixpkgs = {
|
|
|
|
config.allowUnfreePredicate =
|
|
|
|
pkg:
|
|
|
|
builtins.elem (lib.getName pkg) [
|
|
|
|
"steam"
|
|
|
|
"steam-original"
|
|
|
|
"steam-run"
|
2024-09-14 11:58:03 +01:00
|
|
|
"steamcmd"
|
2024-08-30 12:57:02 +01:00
|
|
|
];
|
|
|
|
overlays = [ (final: prev: { inherit (inputs.plasma-manager.packages.${prev.system}) rc2nix; }) ];
|
|
|
|
};
|
2024-06-07 06:17:37 +01:00
|
|
|
system = {
|
|
|
|
stateVersion = "23.05";
|
|
|
|
autoUpgrade = {
|
|
|
|
enable = true;
|
|
|
|
persistent = true;
|
2024-06-25 06:50:05 +01:00
|
|
|
allowReboot = false;
|
2024-06-07 06:17:37 +01:00
|
|
|
flake = "git+${config.nix.registry.my-nixos.to.url}";
|
|
|
|
dates = "02:00";
|
2024-08-23 10:29:51 +01:00
|
|
|
randomizedDelaySec = "15min";
|
2024-06-07 06:17:37 +01:00
|
|
|
flags = [
|
2024-06-25 06:50:05 +01:00
|
|
|
"--accept-flake-config"
|
2024-06-07 06:17:37 +01:00
|
|
|
"--option"
|
|
|
|
"extra-binary-caches"
|
|
|
|
"https://nix.xenia.me.uk"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-08-23 10:49:58 +01:00
|
|
|
systemd.services = lib.mkIf config.system.autoUpgrade.enable {
|
|
|
|
nixos-upgrade.serviceConfig = {
|
|
|
|
CPUQuota = "75%";
|
|
|
|
CPUWeight = 20;
|
|
|
|
IOWeight = 20;
|
|
|
|
};
|
|
|
|
};
|
2024-02-25 06:32:13 +00:00
|
|
|
boot.loader = {
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
};
|
2023-10-09 11:40:25 +01:00
|
|
|
networking = {
|
2024-08-30 12:57:02 +01:00
|
|
|
inherit hostName;
|
2023-10-09 11:40:25 +01:00
|
|
|
networkmanager.enable = true;
|
2024-02-25 06:32:13 +00:00
|
|
|
firewall.enable = true;
|
2024-07-30 15:06:34 +01:00
|
|
|
nameservers = [ "9.9.9.9" ];
|
2023-10-09 11:40:25 +01:00
|
|
|
};
|
2024-08-30 12:57:02 +01:00
|
|
|
users.users =
|
|
|
|
let
|
|
|
|
authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC4M1zV3yLMMI1tYwdY9QDXJDlOBugm7UXKC+Xk89yHq pixelifytica@Vanguard"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICPypUUGVAdpl0SHrUDVw0RureuFNsljrXQvrf0uc055 pixelifytica@Northstar"
|
|
|
|
];
|
|
|
|
in
|
|
|
|
{
|
|
|
|
root.openssh = {
|
|
|
|
inherit authorizedKeys;
|
|
|
|
};
|
|
|
|
${username} = {
|
|
|
|
isNormalUser = true;
|
2024-09-01 12:58:42 +01:00
|
|
|
group = "users";
|
2024-08-30 12:57:02 +01:00
|
|
|
description = "Evie Litherland-Smith";
|
|
|
|
extraGroups = [
|
|
|
|
"networkmanager"
|
|
|
|
"wheel"
|
|
|
|
"video"
|
|
|
|
"input"
|
|
|
|
"uinput"
|
|
|
|
"dialout"
|
|
|
|
];
|
|
|
|
initialHashedPassword = "$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
|
|
|
|
openssh = {
|
|
|
|
inherit authorizedKeys;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
backupFileExtension = "backup";
|
|
|
|
users.${username} = {
|
|
|
|
imports = [ ./home/default.nix ];
|
|
|
|
home = {
|
|
|
|
inherit username;
|
|
|
|
stateVersion = "23.05";
|
|
|
|
homeDirectory = "/home/${username}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
extraSpecialArgs = {
|
|
|
|
inherit inputs;
|
|
|
|
accentColourName = "base0E";
|
|
|
|
# Emulating stylix behaviour, rewrite at some point
|
|
|
|
fonts =
|
|
|
|
let
|
|
|
|
monospace.name = inputs.iosevka-custom.outputs.names.iosevka-custom-nerdfont;
|
|
|
|
serif.name = inputs.iosevka-custom.outputs.names.iosevka-custom-aile;
|
|
|
|
sansSerif.name = serif.name;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
inherit monospace serif sansSerif;
|
|
|
|
sizes = {
|
|
|
|
applications = 12;
|
|
|
|
desktop = 10;
|
|
|
|
popups = 14;
|
|
|
|
terminal = 12;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-10-09 11:40:25 +01:00
|
|
|
environment = {
|
2024-03-08 08:10:36 +00:00
|
|
|
sessionVariables = {
|
|
|
|
XDG_CONFIG_HOME = "$HOME/.config";
|
|
|
|
XDG_CACHE_HOME = "$HOME/.cache";
|
|
|
|
XDG_DATA_HOME = "$HOME/.local/share";
|
|
|
|
XDG_STATE_HOME = "$HOME/.local/state";
|
|
|
|
};
|
2023-12-12 06:31:18 +00:00
|
|
|
systemPackages = with pkgs; [
|
2024-05-30 13:37:32 +01:00
|
|
|
coreutils-full
|
2024-05-11 16:15:46 +01:00
|
|
|
gnumake
|
2024-01-12 08:19:20 +00:00
|
|
|
git
|
2024-05-27 10:18:56 +01:00
|
|
|
file
|
2023-12-12 06:31:18 +00:00
|
|
|
zip
|
|
|
|
unzip
|
2024-05-30 13:37:32 +01:00
|
|
|
curl
|
|
|
|
wget
|
2024-05-27 10:18:56 +01:00
|
|
|
dig
|
2024-02-20 15:36:16 +00:00
|
|
|
wireguard-tools
|
2024-07-08 10:16:04 +01:00
|
|
|
quickemu
|
2023-12-12 06:31:18 +00:00
|
|
|
];
|
2023-10-09 11:40:25 +01:00
|
|
|
localBinInPath = true;
|
|
|
|
};
|
2024-02-25 06:32:13 +00:00
|
|
|
programs = {
|
|
|
|
command-not-found.enable = false;
|
|
|
|
ssh.startAgent = true;
|
2024-09-01 12:58:42 +01:00
|
|
|
fish.enable = true;
|
2024-02-25 06:32:13 +00:00
|
|
|
nano = {
|
|
|
|
enable = true;
|
|
|
|
syntaxHighlight = true;
|
|
|
|
nanorc = ''
|
|
|
|
set nowrap
|
|
|
|
set tabstospaces
|
|
|
|
set tabsize 2
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2023-10-11 08:28:27 +01:00
|
|
|
services = {
|
2024-09-12 09:17:57 +01:00
|
|
|
passSecretService.enable = true;
|
2023-10-11 08:28:27 +01:00
|
|
|
upower.enable = true;
|
|
|
|
power-profiles-daemon.enable = true;
|
2023-10-20 22:33:34 +01:00
|
|
|
system76-scheduler = {
|
|
|
|
enable = true;
|
|
|
|
useStockConfig = true;
|
|
|
|
};
|
2023-10-11 08:28:27 +01:00
|
|
|
};
|
2024-06-19 13:55:24 +01:00
|
|
|
security.rtkit.enable = true;
|
2023-10-09 11:40:25 +01:00
|
|
|
virtualisation.podman.enable = true;
|
|
|
|
time.timeZone = "Europe/London";
|
2024-06-17 08:46:29 +01:00
|
|
|
i18n.defaultLocale = "en_GB.UTF-8";
|
2024-07-03 07:15:39 +01:00
|
|
|
console.useXkbConfig = true;
|
2024-02-25 06:32:13 +00:00
|
|
|
fonts = {
|
2024-08-30 12:57:02 +01:00
|
|
|
packages =
|
|
|
|
(with inputs.iosevka-custom.outputs.packages.${pkgs.system}; [
|
|
|
|
iosevka-custom-nerdfont
|
|
|
|
iosevka-custom-aile
|
|
|
|
])
|
|
|
|
++ (with pkgs; [
|
|
|
|
lmodern # LaTeX
|
|
|
|
noto-fonts-emoji # Emoji
|
|
|
|
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
|
|
|
|
]);
|
2024-03-31 12:59:24 +01:00
|
|
|
fontconfig = {
|
|
|
|
enable = true;
|
2024-08-30 12:57:02 +01:00
|
|
|
defaultFonts = with inputs.iosevka-custom.outputs.names; {
|
2024-07-30 15:06:34 +01:00
|
|
|
serif = [ iosevka-custom-aile ];
|
|
|
|
sansSerif = [ iosevka-custom-aile ];
|
|
|
|
monospace = [ iosevka-custom-nerdfont ];
|
|
|
|
emoji = [ "Noto Color Emoji" ];
|
2024-03-31 12:59:24 +01:00
|
|
|
};
|
|
|
|
};
|
2024-02-25 06:32:13 +00:00
|
|
|
};
|
2023-10-09 11:40:25 +01:00
|
|
|
}
|