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
|
2024-09-19 08:05:48 +01:00
|
|
|
inputs.stylix.nixosModules.stylix
|
2024-08-30 12:57:02 +01:00
|
|
|
./${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;
|
2024-09-27 10:20:53 +01:00
|
|
|
substituters = [ "https://nix.xenia.me.uk" ];
|
|
|
|
trusted-public-keys = [ "nix.xenia.me.uk:tlgwOaG5KMLjQUk2YaErS8mAG69ZCr3PaHXZYi+Y5eI=" ];
|
2024-05-11 15:41:19 +01:00
|
|
|
};
|
2024-10-25 05:30:32 +01:00
|
|
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
2024-05-11 15:41:19 +01:00
|
|
|
channel.enable = true;
|
|
|
|
gc = {
|
|
|
|
automatic = true;
|
2024-12-14 06:59:37 +00:00
|
|
|
options = "--delete-older-than 3d";
|
2024-05-11 15:41:19 +01:00
|
|
|
};
|
|
|
|
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-11-14 08:43:27 +00:00
|
|
|
nixpkgs.config.allowUnfreePredicate =
|
|
|
|
pkg:
|
|
|
|
builtins.elem (lib.getName pkg) [
|
|
|
|
"steam"
|
|
|
|
"steam-unwrapped"
|
|
|
|
"steam-original"
|
|
|
|
"steam-run"
|
2024-11-15 06:55:08 +00:00
|
|
|
"steamcmd"
|
2024-11-14 08:43:27 +00:00
|
|
|
"nomachine-client"
|
|
|
|
];
|
2024-10-17 06:07:29 +01:00
|
|
|
system.autoUpgrade = {
|
|
|
|
enable = true;
|
|
|
|
persistent = true;
|
|
|
|
allowReboot = false;
|
|
|
|
flake = "git+${config.nix.registry.my-nixos.to.url}";
|
|
|
|
dates = "02:00";
|
|
|
|
randomizedDelaySec = "5min";
|
2024-10-17 06:17:24 +01:00
|
|
|
fixedRandomDelay = true;
|
2024-10-17 06:07:29 +01:00
|
|
|
flags = [
|
|
|
|
"--option"
|
|
|
|
"extra-binary-caches"
|
|
|
|
"https://nix.xenia.me.uk"
|
|
|
|
];
|
2024-06-07 06:17:37 +01:00
|
|
|
};
|
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;
|
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"
|
2024-11-16 07:19:26 +00:00
|
|
|
"gamemode"
|
2024-08-30 12:57:02 +01:00
|
|
|
];
|
|
|
|
initialHashedPassword = "$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
|
|
|
|
openssh = {
|
|
|
|
inherit authorizedKeys;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
backupFileExtension = "backup";
|
|
|
|
users.${username} = {
|
2024-11-14 08:43:27 +00:00
|
|
|
imports = [
|
|
|
|
./home/shell/default.nix
|
|
|
|
./home/scripts/default.nix
|
|
|
|
];
|
2024-08-30 12:57:02 +01:00
|
|
|
home = {
|
|
|
|
inherit username;
|
|
|
|
homeDirectory = "/home/${username}";
|
|
|
|
};
|
2024-11-14 08:43:27 +00:00
|
|
|
programs.home-manager.enable = true;
|
2024-08-30 12:57:02 +01:00
|
|
|
};
|
|
|
|
extraSpecialArgs = {
|
|
|
|
inherit inputs;
|
|
|
|
};
|
|
|
|
};
|
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-10-20 07:33:16 +01:00
|
|
|
p7zip
|
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
|
2024-09-27 10:20:53 +01:00
|
|
|
distrobox
|
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;
|
|
|
|
nano = {
|
|
|
|
enable = true;
|
|
|
|
syntaxHighlight = true;
|
|
|
|
nanorc = ''
|
|
|
|
set nowrap
|
|
|
|
set tabstospaces
|
|
|
|
set tabsize 2
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2023-10-11 08:28:27 +01:00
|
|
|
services = {
|
|
|
|
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;
|
2024-10-29 09:15:07 +00:00
|
|
|
location = {
|
|
|
|
latitude = 51.7;
|
|
|
|
longitude = -1.2;
|
|
|
|
provider = "manual";
|
|
|
|
};
|
2023-10-09 11:40:25 +01:00
|
|
|
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-09-19 08:05:48 +01:00
|
|
|
stylix = {
|
|
|
|
enable = true;
|
2024-11-14 08:43:27 +00:00
|
|
|
image = ./wallpapers/tropic_island_day.jpg;
|
2024-11-25 08:14:01 +00:00
|
|
|
base16Scheme = "${pkgs.base16-schemes}/share/themes/one-light.yaml";
|
2024-12-09 15:14:57 +00:00
|
|
|
opacity = {
|
2024-12-16 07:11:14 +00:00
|
|
|
applications = 0.8;
|
2024-12-09 15:14:57 +00:00
|
|
|
desktop = 0.8;
|
|
|
|
popups = 0.8;
|
2024-12-16 07:11:14 +00:00
|
|
|
terminal = 0.8;
|
2024-12-09 15:14:57 +00:00
|
|
|
};
|
2024-09-19 08:05:48 +01:00
|
|
|
cursor = {
|
|
|
|
package = pkgs.volantes-cursors;
|
|
|
|
name = "volantes_cursors";
|
|
|
|
size = 32;
|
|
|
|
};
|
2024-09-27 10:20:53 +01:00
|
|
|
fonts = {
|
|
|
|
monospace = {
|
2024-12-12 08:19:16 +00:00
|
|
|
package = pkgs.nerdfonts.override { fonts = [ "DejaVuSansMono" ]; };
|
|
|
|
name = "DejaVuSansM Nerd Font";
|
2024-09-27 10:20:53 +01:00
|
|
|
};
|
|
|
|
sizes = {
|
2024-12-12 08:19:16 +00:00
|
|
|
applications = 10;
|
|
|
|
desktop = 12;
|
|
|
|
popups = 14;
|
|
|
|
terminal = 10;
|
2024-09-27 10:20:53 +01:00
|
|
|
};
|
|
|
|
};
|
2024-09-19 08:05:48 +01:00
|
|
|
};
|
2024-10-30 07:46:58 +00:00
|
|
|
fonts.packages = with pkgs; [
|
|
|
|
liberation_ttf # Documents
|
|
|
|
lmodern # LaTeX
|
|
|
|
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
|
|
|
|
];
|
2023-10-09 11:40:25 +01:00
|
|
|
}
|