2024-04-21 19:16:41 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
inputs,
|
|
|
|
nixpkgs-nixos-unstable-and-unfree,
|
|
|
|
...
|
|
|
|
}: let
|
2023-12-18 10:28:15 +00:00
|
|
|
stateVersion = "23.11";
|
2022-12-02 13:43:26 +00:00
|
|
|
username = "cyryl";
|
|
|
|
in {
|
2022-03-08 15:45:44 +00:00
|
|
|
imports = [
|
|
|
|
./common-hardware.nix
|
|
|
|
./common-services.nix
|
|
|
|
./security.nix
|
|
|
|
./syncthing.nix
|
|
|
|
];
|
2019-03-26 10:12:24 +00:00
|
|
|
|
2021-11-22 19:32:26 +00:00
|
|
|
security.allowUserNamespaces = true;
|
2024-04-21 19:16:41 +01:00
|
|
|
boot.supportedFilesystems = ["ntfs"];
|
2021-11-22 19:32:26 +00:00
|
|
|
environment.enableDebugInfo = true;
|
2021-06-12 16:15:00 +01:00
|
|
|
|
2024-04-27 11:33:38 +01:00
|
|
|
nixpkgs.config.allowUnfree = true;
|
2021-11-22 19:32:26 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
2022-08-20 00:00:50 +01:00
|
|
|
ccache
|
|
|
|
curl
|
2023-01-11 08:52:44 +00:00
|
|
|
davfs2
|
2022-08-20 00:00:50 +01:00
|
|
|
dnsutils
|
|
|
|
fd
|
2021-11-22 19:32:26 +00:00
|
|
|
git
|
|
|
|
gnupg
|
|
|
|
home-manager
|
2022-08-20 00:00:50 +01:00
|
|
|
htop
|
2021-11-22 19:32:26 +00:00
|
|
|
pciutils
|
|
|
|
powertop
|
2023-01-11 08:52:44 +00:00
|
|
|
sshfs
|
2022-08-20 00:00:50 +01:00
|
|
|
tmux
|
2021-11-22 19:32:26 +00:00
|
|
|
usbutils
|
2022-08-20 00:00:50 +01:00
|
|
|
wget
|
2024-03-24 11:33:56 +00:00
|
|
|
veracrypt
|
2021-11-22 19:32:26 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
i18n.defaultLocale = "en_GB.UTF-8";
|
|
|
|
|
2022-12-02 13:43:26 +00:00
|
|
|
users.users."${username}" = {
|
2021-11-22 19:32:26 +00:00
|
|
|
isNormalUser = true;
|
2022-03-08 15:45:44 +00:00
|
|
|
extraGroups = [
|
2022-08-20 00:00:50 +01:00
|
|
|
"adbusers"
|
2023-01-11 08:52:44 +00:00
|
|
|
"davfs2"
|
2022-08-20 00:00:50 +01:00
|
|
|
"dialout"
|
|
|
|
"docker"
|
|
|
|
"libvirtd"
|
|
|
|
"lp"
|
2022-03-08 15:45:44 +00:00
|
|
|
"networkmanager"
|
|
|
|
"scanner"
|
|
|
|
"vboxusers"
|
2022-08-20 00:00:50 +01:00
|
|
|
"video"
|
|
|
|
"wheel"
|
2022-03-08 15:45:44 +00:00
|
|
|
"wireshark"
|
|
|
|
];
|
2021-11-22 19:32:26 +00:00
|
|
|
shell = pkgs.zsh;
|
|
|
|
};
|
|
|
|
|
2024-04-21 19:16:41 +01:00
|
|
|
networking.nameservers = ["9.9.9.9" "2620:fe::fe" "149.112.112.112" "2620:fe::9"];
|
2022-03-06 09:41:19 +00:00
|
|
|
|
2024-04-21 19:16:41 +01:00
|
|
|
networking.hosts = {"10.11.99.1" = ["remarkable"];};
|
2021-11-22 19:32:26 +00:00
|
|
|
|
2024-04-21 19:16:41 +01:00
|
|
|
programs = {
|
|
|
|
light.enable = true;
|
|
|
|
adb.enable = true;
|
|
|
|
wireshark.enable = true;
|
2023-03-05 11:17:25 +00:00
|
|
|
|
2024-04-21 19:16:41 +01:00
|
|
|
ssh.extraConfig = ''
|
|
|
|
Host cupsnet.cyplo.dev
|
|
|
|
HostName cupsnet.cyplo.dev
|
|
|
|
Port 2222
|
|
|
|
Host cupsnet cupsnet.raptor-carp.ts.net
|
|
|
|
HostName cupsnet.raptor-carp.ts.net
|
|
|
|
Port 2222
|
|
|
|
StrictHostKeyChecking=accept-new
|
|
|
|
'';
|
|
|
|
};
|
2021-11-22 19:32:26 +00:00
|
|
|
virtualisation.docker = {
|
|
|
|
enable = true;
|
|
|
|
autoPrune.enable = true;
|
2022-07-25 17:04:03 +01:00
|
|
|
daemon.settings = {
|
2024-04-21 19:16:41 +01:00
|
|
|
"insecure-registries" = ["vpsfree1.raptor-carp.ts.net:5000"];
|
2022-07-25 17:04:03 +01:00
|
|
|
};
|
2021-11-22 19:32:26 +00:00
|
|
|
};
|
|
|
|
|
2022-03-08 15:50:45 +00:00
|
|
|
fonts.fontconfig = {
|
|
|
|
enable = true;
|
2024-04-21 19:16:41 +01:00
|
|
|
defaultFonts.monospace = ["BerkeleyMono Nerd Font"];
|
2022-03-08 15:50:45 +00:00
|
|
|
};
|
|
|
|
|
2023-11-30 21:22:10 +00:00
|
|
|
fonts.packages = with pkgs; [
|
2023-06-22 13:33:57 +01:00
|
|
|
inconsolata
|
2023-04-15 13:02:24 +01:00
|
|
|
(fetchzip {
|
|
|
|
url = "file://" + ./fonts/berkeley.tar.xz;
|
2023-06-21 09:54:10 +01:00
|
|
|
sha256 = "sha256-nsDqdQikT65vJVMq7r2MAOxd3xqj8vJ0Ky2y9CfI/bg==";
|
2023-04-15 13:02:24 +01:00
|
|
|
})
|
2023-04-15 17:01:31 +01:00
|
|
|
(fetchzip {
|
|
|
|
url = "file://" + ./fonts/tragicastle.tar.xz;
|
|
|
|
sha256 = "sha256-AjvaPmjlyDjBDxeVp1A1yPin0FrwbBib87ywF4GHqS0=";
|
2023-04-15 13:02:24 +01:00
|
|
|
})
|
|
|
|
];
|
2021-11-22 19:32:26 +00:00
|
|
|
|
|
|
|
nix = {
|
2022-12-02 14:56:05 +00:00
|
|
|
settings.auto-optimise-store = true;
|
2021-11-22 19:32:26 +00:00
|
|
|
gc.automatic = true;
|
|
|
|
optimise.automatic = true;
|
|
|
|
extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
2022-12-25 17:42:42 +00:00
|
|
|
stalled-download-timeout = 30
|
2021-11-22 19:32:26 +00:00
|
|
|
'';
|
|
|
|
};
|
2019-03-26 12:32:59 +00:00
|
|
|
|
2024-04-21 19:16:41 +01:00
|
|
|
system = {inherit stateVersion;};
|
2023-07-05 16:07:48 +01:00
|
|
|
system.activationScripts.diff = ''
|
|
|
|
${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
|
|
|
|
'';
|
2021-11-22 19:32:26 +00:00
|
|
|
}
|