This commit is contained in:
Cyryl Płotnicki 2022-03-10 12:25:23 +00:00
parent 28c7af45d3
commit 3d6dd759c4
99 changed files with 584 additions and 735 deletions

View file

@ -34,7 +34,8 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.cyryl = {
imports = [ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
imports =
[ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
_module.args.inputs = inputs;
};
}
@ -57,9 +58,7 @@
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.cyryl = {
imports = [ ./nixos/home-manager ];
};
home-manager.users.cyryl = { imports = [ ./nixos/home-manager ]; };
}
];

View file

@ -1,8 +1,8 @@
{ config, pkgs, ... }:
let
extraArgs = [ "--exclude='.cache'" "--exclude='.rustup'" "--exclude='.cargo'" ];
in
{
extraArgs =
[ "--exclude='.cache'" "--exclude='.rustup'" "--exclude='.cargo'" ];
in {
services = {
restic.backups.home-to-bolty = {

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];
boot = {
@ -12,6 +11,5 @@
};
};
}

View file

@ -1,9 +1,9 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
boot = {
kernelPackages = pkgs.linuxPackages_latest;
initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_acpi" ];
initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_acpi" ];
initrd.kernelModules = [ "dm-snapshot" ];
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
@ -15,20 +15,25 @@
fileSystems."/data" = {
device = "/dev/disk/by-uuid/78e8e5b5-9068-4381-8e85-b4297607f9ea";
fsType = "btrfs";
options = [ "autodefrag" "space_cache" "inode_cache" "noatime" "nodiratime" "compress=zstd" ];
options = [
"autodefrag"
"space_cache"
"inode_cache"
"noatime"
"nodiratime"
"compress=zstd"
];
};
fileSystems."/" =
{
device = "/dev/disk/by-uuid/28afab71-ff3d-4f1a-b7e4-2129572706dd";
fsType = "btrfs";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/28afab71-ff3d-4f1a-b7e4-2129572706dd";
fsType = "btrfs";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/5BFB-9E6B";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5BFB-9E6B";
fsType = "vfat";
};
swapDevices = [ ];

View file

@ -1,5 +1,4 @@
{ config, pkgs, inputs, lib, ... }:
{
{ config, pkgs, inputs, lib, ... }: {
imports = [
./bolty-boot.nix
./real-hardware.nix
@ -16,7 +15,8 @@
enable = true;
dataDir = "/data/syncthing";
openDefaultPorts = true;
package = inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".syncthing;
package =
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".syncthing;
};
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
networking = {

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
services.i2pd = {
enable = true;
bandwidth = 1024; # kb/s

View file

@ -1,5 +1,4 @@
{ config, pkgs, inputs, ... }:
{
{ config, pkgs, inputs, ... }: {
services.postgresql = {
enable = true;
initialScript = pkgs.writeText "synapse-init.sql" ''
@ -15,27 +14,23 @@
enable = true;
server_name = "cyplo.dev";
enable_registration = false;
listeners = [
{
port = 8008;
bind_address = "bolty.cyplo.github.beta.tailscale.net";
type = "http";
tls = false;
x_forwarded = true;
resources = [
{
names = [ "client" "federation" ];
compress = false;
}
];
}
];
app_service_config_files = [
];
listeners = [{
port = 8008;
bind_address = "bolty.cyplo.github.beta.tailscale.net";
type = "http";
tls = false;
x_forwarded = true;
resources = [{
names = [ "client" "federation" ];
compress = false;
}];
}];
app_service_config_files = [ ];
extraConfig = ''
experimental_features: { spaces_enabled: true }
'';
package = inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".matrix-synapse;
package =
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".matrix-synapse;
};
networking.firewall.allowedTCPPorts = [ 8008 ];

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
networking.firewall.allowedTCPPorts = [ 80 ];
services.nextcloud = {

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }:
{
{ config, pkgs, lib, ... }: {
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [ 631 6566 ];
@ -21,7 +20,8 @@
description = "Epson XP-540";
location = "connected to bolty";
name = "epson_xp540";
deviceUri = "usb://EPSON/XP-540%20Series?serial=583245393030303936&interface=1";
deviceUri =
"usb://EPSON/XP-540%20Series?serial=583245393030303936&interface=1";
model = "raw";
ppdOptions = { PageSize = "A4"; };
}];

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }:
{
{ config, pkgs, lib, ... }: {
networking.firewall.allowedTCPPorts = [ 9100 ];
services.prometheus = {
enable = true;

View file

@ -1,11 +1,8 @@
{ config, pkgs, lib, ... }:
{
{ config, pkgs, lib, ... }: {
hardware.enableRedistributableFirmware = true;
services.smartd.enable = true;
services.fstrim.enable = true;
environment.systemPackages = with pkgs; [
smartmontools
];
environment.systemPackages = with pkgs; [ smartmontools ];
services.fwupd.enable = true;
services.thermald.enable = true;
services.haveged.enable = true;

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
environment.systemPackages = with pkgs; [ restic ];
networking.firewall.allowedTCPPorts = [ 8000 ];
services.restic.server = {

View file

@ -1,8 +1,8 @@
{ config, pkgs, inputs, lib, ... }:
let
tailscale = inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
in
{
tailscale =
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
in {
systemd.services.tailscale-autoconnect = {
description = "Automatic connection to Tailscale";

View file

@ -1,5 +1,4 @@
{ config, pkgs, inputs, nixpkgs-nixos-unstable-and-unfree, ... }:
{
{ config, pkgs, inputs, nixpkgs-nixos-unstable-and-unfree, ... }: {
networking.hostName = "fixme";
imports = [

View file

@ -1,11 +1,11 @@
{ config, lib, pkgs, inputs, ... }:
{
{ config, lib, pkgs, inputs, ... }: {
boot = {
kernelModules = [ "kvm-intel" ];
initrd = {
kernelModules = [ "dm-snapshot" ];
availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
availableKernelModules =
[ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
};
loader.efi.canTouchEfiVariables = true;

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
environment.systemPackages = with pkgs; [
vim
tmux

View file

@ -1,12 +1,12 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
boot.kernelPackages = pkgs.linuxPackages_latest;
nixpkgs.overlays = [
(self: super: {
buildLinux = x: super.buildLinux ({
ignoreConfigErrors = true;
enableParallelBuilding = true;
} // x);
buildLinux = x:
super.buildLinux ({
ignoreConfigErrors = true;
enableParallelBuilding = true;
} // x);
})
];
boot.kernelPatches = [{

View file

@ -1,5 +1,4 @@
{ config, pkgs, inputs, lib, nixpkgs-nixos-unstable-and-unfree, ... }:
{
{ config, pkgs, inputs, lib, nixpkgs-nixos-unstable-and-unfree, ... }: {
networking.hostName = "foureighty";
imports = [
@ -19,9 +18,7 @@
../../tailscale.nix
];
fileSystems."/" = {
options = [ "compress=zstd" ];
};
fileSystems."/" = { options = [ "compress=zstd" ]; };
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
@ -43,14 +40,10 @@
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.video.hidpi.enable = lib.mkDefault true;
services.fprintd = {
enable = true;
};
services.fprintd = { enable = true; };
home-manager.users.cyryl = { ... }: {
imports = [
../../home-manager/programs/kitty.nix
];
imports = [ ../../home-manager/programs/kitty.nix ];
home.packages = [
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".bisq-desktop
];

View file

@ -1,18 +1,19 @@
{ config, lib, pkgs, inputs, ... }:
{
{ config, lib, pkgs, inputs, ... }: {
boot = {
kernelModules = [ "kvm-intel" ];
initrd = {
kernelModules = [ "dm-snapshot" ];
availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
availableKernelModules =
[ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
};
loader.efi.canTouchEfiVariables = true;
loader.systemd-boot.enable = true;
};
boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/c2deaeaa-cb76-4d29-a603-0cf42f6e829f";
boot.initrd.luks.devices."crypt".device =
"/dev/disk/by-uuid/c2deaeaa-cb76-4d29-a603-0cf42f6e829f";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/FC06-82E6";

View file

@ -1,8 +1,5 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
libqmi
];
{ config, pkgs, ... }: {
environment.systemPackages = with pkgs; [ libqmi ];
boot.extraModulePackages = with pkgs; [ libqmi ];
boot.kernelModules = [ "qmi_wwan" "qcserial" ];
}

View file

@ -8,7 +8,7 @@ let
export __VK_LAYER_NV_optimus=NVIDIA_only
exec -a "$0" "$@"
'';
whichgpu = pkgs.writeShellScriptBin "whichgpu" ''glxinfo | grep vendor'';
whichgpu = pkgs.writeShellScriptBin "whichgpu" "glxinfo | grep vendor";
nvidiaon = pkgs.writeShellScriptBin "nvidiaon" ''
export __NV_PRIME_RENDER_OFFLOAD=1;
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0;
@ -16,8 +16,7 @@ let
export __VK_LAYER_NV_optimus=NVIDIA_only;
glxinfo | grep vendor; echo OK!;
'';
in
{
in {
environment.systemPackages = [ nvidia-offload whichgpu nvidiaon ];
hardware.opengl.enable = true;
hardware.opengl.driSupport32Bit = true;

View file

@ -1,8 +1,8 @@
{ config, pkgs, inputs, lib, ... }:
let
tailscale = inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
in
{
tailscale =
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
in {
systemd.services.tailscale-autoconnect = {
description = "Automatic connection to Tailscale";

View file

@ -1,10 +1,7 @@
{ config, pkgs, inputs, lib, nixpkgs-nixos-unstable-and-unfree, ... }: {
environment.systemPackages = with pkgs; [ vim nixfmt ];
imports = [
../../git
../../mercurial
];
imports = [ ../../git ../../mercurial ];
services.nix-daemon.enable = true;
nix = {
useDaemon = true;

View file

@ -1,7 +1,5 @@
{ config, pkgs, inputs, lib, ... }:
{
imports = [
];
{ config, pkgs, inputs, lib, ... }: {
imports = [ ];
boot = {
kernelPackages = pkgs.linuxPackages_rpi4;
tmpOnTmpfs = true;
@ -23,9 +21,7 @@
boot.loader.generic-extlinux-compatible.enable = true;
networking = {
hostName = "rpi4-8";
networkmanager = {
enable = true;
};
networkmanager = { enable = true; };
};
environment.systemPackages = with pkgs; [ neovim htop ];

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
networking.hostName = "skinnyv";
imports = [
@ -23,9 +22,7 @@
services.thermald.enable = true;
home-manager.users.cyryl = { ... }: {
imports = [
../../home-manager/programs/kitty.nix
];
imports = [ ../../home-manager/programs/kitty.nix ];
};
}

View file

@ -1,11 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -16,7 +15,8 @@
options = [ "compress=zstd" ];
};
boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/0c192a18-178f-4598-a1ed-5295ef2abdc4";
boot.initrd.luks.devices."crypt".device =
"/dev/disk/by-uuid/0c192a18-178f-4598-a1ed-5295ef2abdc4";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0A6A-AAFC";

View file

@ -1,8 +1,8 @@
{ config, pkgs, inputs, lib, ... }:
let
tailscale = inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
in
{
tailscale =
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
in {
systemd.services.tailscale-autoconnect = {
description = "Automatic connection to Tailscale";

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
networking.hostName = "thinky";
imports = [
@ -28,8 +27,6 @@
memoryPercent = 50;
};
home-manager.users.cyryl = { ... }: {
imports = [
../../home-manager/programs/termite.nix
];
imports = [ ../../home-manager/programs/termite.nix ];
};
}

View file

@ -1,11 +1,11 @@
{ config, lib, pkgs, inputs, ... }:
{
{ config, lib, pkgs, inputs, ... }: {
boot = {
kernelModules = [ "kvm-intel" ];
initrd = {
kernelModules = [ "dm-snapshot" ];
availableKernelModules = [ "ata_generic" "uhci_hcd" "ehci_pci" "ahci" "usb_storage" "sd_mod" ];
availableKernelModules =
[ "ata_generic" "uhci_hcd" "ehci_pci" "ahci" "usb_storage" "sd_mod" ];
};
loader.grub.enable = true;
@ -18,7 +18,8 @@
fsType = "btrfs";
};
boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/8d51b38a-5d90-4a7a-a86a-0d57648fd82d";
boot.initrd.luks.devices."crypt".device =
"/dev/disk/by-uuid/8d51b38a-5d90-4a7a-a86a-0d57648fd82d";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/195b3f15-885e-4123-879f-6e4591a58317";

View file

@ -1,8 +1,8 @@
{ config, pkgs, inputs, lib, ... }:
let
tailscale = inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
in
{
tailscale =
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
in {
systemd.services.tailscale-autoconnect = {
description = "Automatic connection to Tailscale";

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }:
{
{ config, pkgs, lib, ... }: {
time.timeZone = "Europe/London";
services.xserver.desktopManager.plasma5.enable = lib.mkForce false;
@ -8,9 +7,6 @@
virtualisation.virtualbox.guest.enable = true;
virtualisation.virtualbox.guest.x11 = true;
imports = [
<nixpkgs/nixos/modules/installer/virtualbox-demo.nix>
../common.nix
];
imports =
[ <nixpkgs/nixos/modules/installer/virtualbox-demo.nix> ../common.nix ];
}

View file

@ -1,5 +1,4 @@
{ config, pkgs, inputs, lib, ... }:
{
{ config, pkgs, inputs, lib, ... }: {
networking.hostName = "vpsfree1";
imports = [

View file

@ -1,8 +1,8 @@
{ config, pkgs, inputs, lib, ... }:
let
tailscale = inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
in
{
tailscale =
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
in {
systemd.services.tailscale-autoconnect = {
description = "Automatic connection to Tailscale";

View file

@ -8,20 +8,18 @@
{ config, pkgs, lib, ... }:
with lib;
let
nameservers = [
"1.1.1.1"
"2606:4700:4700::1111"
];
in
{
let nameservers = [ "1.1.1.1" "2606:4700:4700::1111" ];
in {
networking.nameservers = lib.mkDefault nameservers;
services.resolved = lib.mkDefault { fallbackDns = nameservers; };
networking.dhcpcd.extraConfig = "noipv4ll";
systemd.services.systemd-sysctl.enable = false;
systemd.sockets."systemd-journald-audit".enable = false;
systemd.mounts = [{ where = "/sys/kernel/debug"; enable = false; }];
systemd.mounts = [{
where = "/sys/kernel/debug";
enable = false;
}];
systemd.services.systemd-udev-trigger.enable = false;
systemd.services.rpc-gssd.enable = false;
@ -29,7 +27,8 @@ in
boot.enableContainers = mkDefault true;
boot.loader.initScript.enable = true;
boot.specialFileSystems."/run/keys".fsType = lib.mkForce "tmpfs";
boot.systemdExecutable = mkDefault "systemd systemd.unified_cgroup_hierarchy=0";
boot.systemdExecutable =
mkDefault "systemd systemd.unified_cgroup_hierarchy=0";
# Overrides for <nixpkgs/nixos/modules/virtualisation/container-config.nix>
documentation.enable = mkOverride 500 true;

View file

@ -1,5 +1,4 @@
{ config, pkgs, inputs, lib, ... }:
{
{ config, pkgs, inputs, lib, ... }: {
networking.hostName = "vultr1";
imports = [

View file

@ -1,13 +1,9 @@
{ config, pkgs, lib, ... }:
{
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"fahclient"
];
{ config, pkgs, lib, ... }: {
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [ "fahclient" ];
services.foldingathome = {
enable = true;
user = "cyplo";
};
boot.kernel.sysctl = {
"kernel.unprivileged_userns_clone" = 1;
};
boot.kernel.sysctl = { "kernel.unprivileged_userns_clone" = 1; };
}

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
services.nginx = {
virtualHosts = {
@ -7,26 +6,22 @@
forceSSL = true;
enableACME = true;
locations."= /.well-known/matrix/server".extraConfig =
let
server = { "m.server" = "cyplo.dev:443"; };
in
''
let server = { "m.server" = "cyplo.dev:443"; };
in ''
add_header Content-Type application/json;
return 200 '${builtins.toJSON server}';
'';
locations."= /.well-known/matrix/client".extraConfig =
let
client = {
"m.homeserver" = { "base_url" = "https://cyplo.dev"; };
"m.identity_server" = { "base_url" = "https://vector.im"; };
};
in
''
add_header Content-Type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON client}';
'';
locations."= /.well-known/matrix/client".extraConfig = let
client = {
"m.homeserver" = { "base_url" = "https://cyplo.dev"; };
"m.identity_server" = { "base_url" = "https://vector.im"; };
};
in ''
add_header Content-Type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON client}';
'';
locations."/".extraConfig = ''
return 404;

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.nginx = {
enable = true;

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
services.nginx = {
virtualHosts = {
@ -13,9 +12,7 @@
proxy_send_timeout 60s;
proxy_read_timeout 60s;
'';
locations."/" = {
proxyPass = "http://localhost:8888";
};
locations."/" = { proxyPass = "http://localhost:8888"; };
};
};
};

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }:
{
{ config, pkgs, lib, ... }: {
containers.snowflake = {
autoStart = true;
ephemeral = true;
@ -29,7 +28,8 @@
RestrictRealtime = "yes";
RestrictSUIDSGID = "yes";
SystemCallArchitectures = "native";
SystemCallFilter = "~@chown @clock @cpu-emulation @debug @module @mount @obsolete @raw-io @reboot @setuid @swap @privileged @resources";
SystemCallFilter =
"~@chown @clock @cpu-emulation @debug @module @mount @obsolete @raw-io @reboot @setuid @swap @privileged @resources";
CapabilityBoundingSet = "";
ProtectProc = "invisible";
ProcSubset = "pid";

View file

@ -1,8 +1,8 @@
{ config, pkgs, inputs, lib, ... }:
let
tailscale = inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
in
{
tailscale =
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
in {
systemd.services.tailscale-autoconnect = {
description = "Automatic connection to Tailscale";

View file

@ -1,8 +1,20 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
boot = {
initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" "virtio_net" "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_scsi" "9p" "9pnet_virtio" ];
initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_pci"
"sr_mod"
"virtio_blk"
"virtio_net"
"virtio_pci"
"virtio_mmio"
"virtio_blk"
"virtio_scsi"
"9p"
"9pnet_virtio"
];
initrd.kernelModules = [ "virtio_balloon" "virtio_console" "virtio_rng" ];
initrd.postDeviceCommands = ''
@ -23,12 +35,10 @@
fsType = "ext4";
};
swapDevices = [
{
device = "/swapfile";
size = 2048;
}
];
swapDevices = [{
device = "/swapfile";
size = 2048;
}];
}

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
services = {
udev.packages = [ pkgs.android-udev-rules ];
ratbagd.enable = true;
@ -11,9 +10,7 @@
tlp = {
enable = true;
settings = {
"DISK_IOSCHED" = "mq-deadline";
};
settings = { "DISK_IOSCHED" = "mq-deadline"; };
};
upower.enable = true;

View file

@ -1,8 +1,6 @@
{ config, pkgs, inputs, ... }:
let
unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system};
in
{
let unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system};
in {
home-manager.users.cyryl = { ... }: {
accounts.email.accounts.cyplo = {
primary = true;
@ -54,27 +52,22 @@ in
programs.mbsync.enable = true;
programs.msmtp.enable = true;
programs.neomutt = {
enable = true;
};
programs.neomutt = { enable = true; };
programs.notmuch = {
enable = true;
hooks.preNew = "${pkgs.isync}/bin/mbsync -a";
};
programs.alot = {
enable = true;
};
programs.alot = { enable = true; };
home.packages = with pkgs; [
unstable.protonmail-bridge
];
home.packages = with pkgs; [ unstable.protonmail-bridge ];
services.mbsync.enable = true;
systemd.user.services."proton-bridge" = {
Unit.Description = "Bridge to ProtonMail";
Install.WantedBy = [ "default.target" "mbsync.service" ];
Service.ExecStart = "${unstable.protonmail-bridge}/bin/protonmail-bridge --noninteractive";
Service.ExecStart =
"${unstable.protonmail-bridge}/bin/protonmail-bridge --noninteractive";
Service.Environment = "PATH=${pkgs.pass}/bin:${pkgs.gnupg}/bin";
};

View file

@ -1,10 +1,7 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
services = { };
xsession = {
enable = false;
};
xsession = { enable = false; };
programs.gnome-terminal = {
enable = true;

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
services.xserver = {
enable = true;
desktopManager.enlightenment.enable = true;

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
services.xserver.videoDrivers = [ "intel" ];
hardware.opengl = {

View file

@ -7,8 +7,7 @@ let
export __VK_LAYER_NV_optimus=NVIDIA_only
exec -a "$0" "$@"
'';
in
{
in {
environment.systemPackages = [ nvidia-offload ];
services.xserver.videoDrivers = [ "nvidia" ];

View file

@ -1,8 +1,3 @@
{ config, pkgs, lib, ... }:
{
home-manager.users.cyryl = { ... }: {
imports = [
./home.nix
];
};
{ config, pkgs, lib, ... }: {
home-manager.users.cyryl = { ... }: { imports = [ ./home.nix ]; };
}

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
programs.git = {
enable = true;
lfs.enable = true;
@ -24,12 +23,14 @@
pull.ff = "only";
push.default = "simple";
};
aliases =
{
tree = "log --show-signature --color --decorate --date=short --all --graph -n 3";
newbranch = "!git checkout master && git fetch -p && git reset --hard origin/master && git checkout -b $2";
head = "log HEAD -n1";
vacuum = "!git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs -r git branch -D && git gc --aggressive --auto";
};
aliases = {
tree =
"log --show-signature --color --decorate --date=short --all --graph -n 3";
newbranch =
"!git checkout master && git fetch -p && git reset --hard origin/master && git checkout -b $2";
head = "log HEAD -n1";
vacuum =
"!git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs -r git branch -D && git gc --aggressive --auto";
};
};
}

View file

@ -1,12 +1,5 @@
{ config, pkgs, ... }:
{
imports = [
./system.nix
];
{ config, pkgs, ... }: {
imports = [ ./system.nix ];
home-manager.users.cyryl = { ... }: {
imports = [
./home.nix
];
};
home-manager.users.cyryl = { ... }: { imports = [ ./home.nix ]; };
}

View file

@ -1,15 +1,9 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
services = { };
xsession = {
enable = false;
};
xsession = { enable = false; };
home.packages = with pkgs; [
gnome-usage
gnome3.gnome-tweaks
];
home.packages = with pkgs; [ gnome-usage gnome3.gnome-tweaks ];
programs.gnome-terminal = {
enable = true;

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, ... }: {
services.xserver = {
enable = true;