reformat with alejandra

This commit is contained in:
Cyryl Płotnicki 2022-12-19 09:09:08 +00:00
parent 2c324ccaf7
commit 1c9bae290c
120 changed files with 2199 additions and 1759 deletions

View file

@ -1,10 +1,21 @@
{ {
description = "NixOS configuration with flakes"; description = "NixOS configuration with flakes";
outputs = { self, flake-utils, flake-compat, home-manager outputs = {
, nixpkgs-nixos-unstable, nixpkgs-master, nixpkgs-stable, darwin self,
, nixos-hardware, nur, sops, nil, helix, alejandra }@inputs: flake-utils,
flake-compat,
let home-manager,
nixpkgs-nixos-unstable,
nixpkgs-master,
nixpkgs-stable,
darwin,
nixos-hardware,
nur,
sops,
nil,
helix,
alejandra,
} @ inputs: let
mkServer = pkgs: system: hostname: mkServer = pkgs: system: hostname:
pkgs.lib.nixosSystem { pkgs.lib.nixosSystem {
inherit system; inherit system;
@ -34,13 +45,11 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.cyryl = { home-manager.users.cyryl = {
imports = imports = [./nixos/home-manager ./nixos/home-manager/linux.nix];
[ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
_module.args.inputs = inputs; _module.args.inputs = inputs;
_module.args.system = system; _module.args.system = system;
}; };
} }
]; ];
specialArgs = {inherit inputs system;}; specialArgs = {inherit inputs system;};
}; };
@ -58,13 +67,11 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.cyryl = { home-manager.users.cyryl = {
imports = imports = [./nixos/home-manager ./nixos/home-manager/linux.nix];
[ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
_module.args.inputs = inputs; _module.args.inputs = inputs;
_module.args.system = system; _module.args.system = system;
}; };
} }
]; ];
specialArgs = { specialArgs = {
inherit inputs system; inherit inputs system;
@ -78,9 +85,10 @@
}; };
}; };
}; };
mkShell = packageSet: system: mkShell = packageSet: system: let
let pkgs = packageSet.legacyPackages.${system}; pkgs = packageSet.legacyPackages.${system};
in pkgs.mkShell { in
pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
cacert cacert
git git
@ -145,8 +153,7 @@
(import (import
"${inputs.nixpkgs-nixos-unstable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix") "${inputs.nixpkgs-nixos-unstable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix")
{ {
environment.systemPackages = environment.systemPackages = with nixpkgs-nixos-unstable.legacyPackages."aarch64-linux"; [
with nixpkgs-nixos-unstable.legacyPackages."aarch64-linux"; [
neovim neovim
htop htop
btop btop
@ -274,5 +281,4 @@ alejandra = {
flake = false; flake = false;
}; };
}; };
} }

View file

@ -1,5 +1,8 @@
{ config, pkgs, ... }: {
let config,
pkgs,
...
}: let
extraArgs = [ extraArgs = [
"--exclude='.cache'" "--exclude='.cache'"
"--exclude='.rustup'" "--exclude='.rustup'"
@ -12,7 +15,6 @@ let
IOSchedulingClass = "idle"; IOSchedulingClass = "idle";
}; };
in { in {
services = { services = {
restic.backups.home-to-bolty = { restic.backups.home-to-bolty = {
passwordFile = "/etc/nixos/secrets/restic-password-bolty"; passwordFile = "/etc/nixos/secrets/restic-password-bolty";

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
fileSystems."/".options = ["noatime" "nodiratime" "discard"]; fileSystems."/".options = ["noatime" "nodiratime" "discard"];
boot = { boot = {
@ -10,6 +14,4 @@
"net.core.bpf_jit_harden" = true; "net.core.bpf_jit_harden" = true;
}; };
}; };
} }

View file

@ -1,9 +1,11 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
initrd.availableKernelModules = initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_acpi"];
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_acpi" ];
initrd.kernelModules = ["dm-snapshot"]; initrd.kernelModules = ["dm-snapshot"];
kernelModules = ["kvm-amd"]; kernelModules = ["kvm-amd"];
extraModulePackages = []; extraModulePackages = [];

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, lib, ... }: {
let config,
pkgs,
inputs,
lib,
...
}: let
physicalInterface = "enp4s0"; physicalInterface = "enp4s0";
bridgeInterface = "br0"; bridgeInterface = "br0";
in { in {
@ -29,10 +34,12 @@ in {
wakeOnLan.enable = true; wakeOnLan.enable = true;
}; };
"${bridgeInterface}" = { "${bridgeInterface}" = {
ipv4.addresses = [{ ipv4.addresses = [
{
"address" = "10.0.0.8"; "address" = "10.0.0.8";
"prefixLength" = 24; "prefixLength" = 24;
}]; }
];
}; };
}; };
bridges = {"${bridgeInterface}".interfaces = ["${physicalInterface}"];}; bridges = {"${bridgeInterface}".interfaces = ["${physicalInterface}"];};
@ -57,5 +64,4 @@ in {
security.allowUserNamespaces = true; security.allowUserNamespaces = true;
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";
} }

View file

@ -1,8 +1,13 @@
{ config, pkgs, inputs, lib, ... }: {
let port = 8123; config,
pkgs,
inputs,
lib,
...
}: let
port = 8123;
in { in {
imports = []; imports = [];
networking.firewall.allowedTCPPorts = [port]; networking.firewall.allowedTCPPorts = [port];
} }

View file

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

View file

@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }: { {
config,
pkgs,
inputs,
...
}: {
services.postgresql = { services.postgresql = {
enable = true; enable = true;
initialScript = pkgs.writeText "synapse-init.sql" '' initialScript = pkgs.writeText "synapse-init.sql" ''
@ -14,17 +19,21 @@
enable = true; enable = true;
settings = { settings = {
server_name = "cyplo.dev"; server_name = "cyplo.dev";
listeners = [{ listeners = [
{
port = 8008; port = 8008;
bind_addresses = ["bolty.cyplo.github.beta.tailscale.net"]; bind_addresses = ["bolty.cyplo.github.beta.tailscale.net"];
type = "http"; type = "http";
tls = false; tls = false;
x_forwarded = true; x_forwarded = true;
resources = [{ resources = [
{
names = ["client" "federation"]; names = ["client" "federation"];
compress = false; compress = false;
}]; }
}]; ];
}
];
experimental_features = {spaces_enabled = true;}; experimental_features = {spaces_enabled = true;};
enable_registration = false; enable_registration = false;
suppress_key_server_warning = true; suppress_key_server_warning = true;

View file

@ -1,5 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
networking.firewall.allowedTCPPorts = [9000 9001]; networking.firewall.allowedTCPPorts = [9000 9001];
services.minio = { services.minio = {
enable = true; enable = true;

View file

@ -1,5 +1,9 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}: {
networking.firewall.enable = true; networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [631 6566]; networking.firewall.allowedTCPPorts = [631 6566];
networking.firewall.allowedUDPPorts = [631 6566]; networking.firewall.allowedUDPPorts = [631 6566];
@ -16,15 +20,16 @@
''; '';
}; };
hardware.printers.ensurePrinters = [{ hardware.printers.ensurePrinters = [
{
description = "Epson XP-540"; description = "Epson XP-540";
location = "connected to bolty"; location = "connected to bolty";
name = "epson_xp540"; name = "epson_xp540";
deviceUri = deviceUri = "usb://EPSON/XP-540%20Series?serial=583245393030303936&interface=1";
"usb://EPSON/XP-540%20Series?serial=583245393030303936&interface=1";
model = "raw"; model = "raw";
ppdOptions = {PageSize = "A4";}; ppdOptions = {PageSize = "A4";};
}]; }
];
hardware.sane = { hardware.sane = {
enable = true; enable = true;
@ -45,5 +50,4 @@
hagath hagath
''; '';
}; };
} }

View file

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

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}: {
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
services.smartd.enable = true; services.smartd.enable = true;
services.fstrim.enable = true; services.fstrim.enable = true;

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
environment.systemPackages = with pkgs; [restic]; environment.systemPackages = with pkgs; [restic];
networking.firewall.allowedTCPPorts = [8000]; networking.firewall.allowedTCPPorts = [8000];
services.restic.server = { services.restic.server = {
@ -8,5 +12,4 @@
prometheus = true; prometheus = true;
extraFlags = ["--no-auth"]; extraFlags = ["--no-auth"];
}; };
} }

View file

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

View file

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

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
atop atop
btop btop

View file

@ -1,8 +1,15 @@
{ config, pkgs, inputs, lib, nixpkgs-nixos-unstable-and-unfree, ... }: {
let config,
pkgs,
inputs,
lib,
nixpkgs-nixos-unstable-and-unfree,
...
}: let
system_cert_bundle_path = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; system_cert_bundle_path = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
form3_cert_path = ./form3-palo-alto.pem; form3_cert_path = ./form3-palo-alto.pem;
form3_cert_bundle = builtins.toFile "form3-cert-bundle.crt" form3_cert_bundle =
builtins.toFile "form3-cert-bundle.crt"
(builtins.readFile system_cert_bundle_path (builtins.readFile system_cert_bundle_path
+ builtins.readFile form3_cert_path); + builtins.readFile form3_cert_path);
in { in {
@ -24,12 +31,8 @@ in {
(runCommand "berkeley-fonts" {} '' (runCommand "berkeley-fonts" {} ''
mkdir -vp "$out/share/fonts/opentype" mkdir -vp "$out/share/fonts/opentype"
mkdir -vp "$out/share/fonts/truetype" mkdir -vp "$out/share/fonts/truetype"
${pkgs.unzip}/bin/unzip ${ ${pkgs.unzip}/bin/unzip ${../../fonts.zip} \*.otf -d $out/share/fonts/opentype
../../fonts.zip ${pkgs.unzip}/bin/unzip ${../../fonts.zip} \*.ttf -d $out/share/fonts/truetype
} \*.otf -d $out/share/fonts/opentype
${pkgs.unzip}/bin/unzip ${
../../fonts.zip
} \*.ttf -d $out/share/fonts/truetype
'') '')
nerdfonts nerdfonts
@ -55,11 +58,9 @@ in {
imports = []; imports = [];
home.packages = with pkgs; [awscli kubectl cargo-update]; home.packages = with pkgs; [awscli kubectl cargo-update];
programs.git.userEmail = lib.mkForce "cyryl.plotnicki@form3.tech"; programs.git.userEmail = lib.mkForce "cyryl.plotnicki@form3.tech";
programs.git.extraConfig.user.signingkey = programs.git.extraConfig.user.signingkey = "6441B1BC81F8FB1561C9AFF5534222210FE423ED";
"6441B1BC81F8FB1561C9AFF5534222210FE423ED";
programs.git.extraConfig.commit.gpgsign = true; programs.git.extraConfig.commit.gpgsign = true;
programs.git.extraConfig."url \"git@github.com:\"".insteadOf = programs.git.extraConfig."url \"git@github.com:\"".insteadOf = "https://github.com/";
"https://github.com/";
programs.gpg.enable = true; programs.gpg.enable = true;
programs.gpg.homedir = "/Users/cyryl/.gnupg"; programs.gpg.homedir = "/Users/cyryl/.gnupg";
programs.zsh.loginExtra = '' programs.zsh.loginExtra = ''

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
nixpkgs.overlays = [ nixpkgs.overlays = [
(self: super: { (self: super: {
@ -6,10 +10,12 @@
super.buildLinux ({ super.buildLinux ({
ignoreConfigErrors = true; ignoreConfigErrors = true;
enableParallelBuilding = true; enableParallelBuilding = true;
} // x); }
// x);
}) })
]; ];
boot.kernelPatches = [{ boot.kernelPatches = [
{
name = "foureighty"; name = "foureighty";
patch = null; patch = null;
extraConfig = '' extraConfig = ''
@ -89,5 +95,6 @@
X86_SGX y X86_SGX y
X86_SGX_KVM y X86_SGX_KVM y
''; '';
}]; }
];
} }

View file

@ -1,4 +1,11 @@
{ config, pkgs, inputs, lib, nixpkgs-nixos-unstable-and-unfree, ... }: { {
config,
pkgs,
inputs,
lib,
nixpkgs-nixos-unstable-and-unfree,
...
}: {
networking.hostName = "foureighty"; networking.hostName = "foureighty";
imports = [ imports = [
@ -55,7 +62,6 @@
buttonMapping = "1 0 3 4 5 6 7 8 9 10"; buttonMapping = "1 0 3 4 5 6 7 8 9 10";
}; };
}; };
}; };
services.fprintd = {enable = true;}; services.fprintd = {enable = true;};
programs.ccache.enable = true; programs.ccache.enable = true;

View file

@ -1,11 +1,16 @@
{ config, lib, pkgs, inputs, ... }: { {
config,
lib,
pkgs,
inputs,
...
}: {
boot = { boot = {
kernelModules = ["kvm-intel"]; kernelModules = ["kvm-intel"];
initrd = { initrd = {
kernelModules = ["dm-snapshot"]; kernelModules = ["dm-snapshot"];
availableKernelModules = availableKernelModules = ["xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod"];
[ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
}; };
loader.systemd-boot.enable = true; loader.systemd-boot.enable = true;
@ -14,8 +19,7 @@
}; };
boot.initrd.secrets = {"/crypto_keyfile.bin" = null;}; boot.initrd.secrets = {"/crypto_keyfile.bin" = null;};
boot.initrd.luks.devices."luks-43a80125-4089-45be-9561-fab93f984916".device = boot.initrd.luks.devices."luks-43a80125-4089-45be-9561-fab93f984916".device = "/dev/disk/by-uuid/43a80125-4089-45be-9561-fab93f984916";
"/dev/disk/by-uuid/43a80125-4089-45be-9561-fab93f984916";
fileSystems."/boot/efi" = { fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/D6C0-1A9D"; device = "/dev/disk/by-uuid/D6C0-1A9D";

View file

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

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: let
let
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" '' nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
export __NV_PRIME_RENDER_OFFLOAD=1 export __NV_PRIME_RENDER_OFFLOAD=1
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0

View file

@ -1,5 +1,9 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}: {
boot.extraModprobeConfig = "options thinkpad_acpi fan_control=1"; boot.extraModprobeConfig = "options thinkpad_acpi fan_control=1";
services.thinkfan = { services.thinkfan = {
enable = true; enable = true;

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, lib, ... }: { {
config,
pkgs,
inputs,
lib,
...
}: {
imports = [inputs.nixos-hardware.nixosModules.raspberry-pi-4]; imports = [inputs.nixos-hardware.nixosModules.raspberry-pi-4];
networking = { networking = {

View file

@ -1,10 +1,14 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services.home-assistant = { services.home-assistant = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
package = (pkgs.home-assistant.override { package =
(pkgs.home-assistant.override {
extraPackages = ps: with ps; []; extraPackages = ps: with ps; [];
extraComponents = [ extraComponents = [
"api" "api"
@ -23,7 +27,7 @@
"zeroconf" "zeroconf"
"zwave" "zwave"
]; ];
}).overridePythonAttrs { doCheck = false; }; })
.overridePythonAttrs {doCheck = false;};
}; };
} }

View file

@ -1,4 +1,11 @@
{ config, pkgs, inputs, lib, nixpkgs-nixos-unstable-and-unfree, ... }: { {
config,
pkgs,
inputs,
lib,
nixpkgs-nixos-unstable-and-unfree,
...
}: {
environment.systemPackages = with pkgs; [vim nixfmt]; environment.systemPackages = with pkgs; [vim nixfmt];
imports = [../../git ../../mercurial]; imports = [../../git ../../mercurial];

View file

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

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
networking.hostName = "skinnyv"; networking.hostName = "skinnyv";
imports = [ imports = [

View file

@ -1,10 +1,13 @@
{ config, lib, pkgs, modulesPath, ... }:
{ {
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")]; imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod"];
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
@ -15,19 +18,20 @@
options = ["compress=zstd"]; options = ["compress=zstd"];
}; };
boot.initrd.luks.devices."crypt".device = boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/0c192a18-178f-4598-a1ed-5295ef2abdc4";
"/dev/disk/by-uuid/0c192a18-178f-4598-a1ed-5295ef2abdc4";
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0A6A-AAFC"; device = "/dev/disk/by-uuid/0A6A-AAFC";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [{ swapDevices = [
{
device = "/swapfile"; device = "/swapfile";
size = 16 * 1024; size = 16 * 1024;
priority = 1; priority = 1;
}]; }
];
zramSwap = { zramSwap = {
enable = true; enable = true;

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
networking.hostName = "thinky"; networking.hostName = "thinky";
imports = [ imports = [

View file

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

View file

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

View file

@ -1,9 +1,11 @@
{ config, pkgs, ... }: {
let config,
pkgs,
...
}: let
genericBackupPath = "/var/lib/backups/"; genericBackupPath = "/var/lib/backups/";
containersBackupPath = "${genericBackupPath}/oci-containers/"; containersBackupPath = "${genericBackupPath}/oci-containers/";
in rec { in rec {
environment.systemPackages = with pkgs; [restic]; environment.systemPackages = with pkgs; [restic];
sops.secrets."restic-backups-b2-repo-password" = { sops.secrets."restic-backups-b2-repo-password" = {
@ -29,8 +31,7 @@ in rec {
${pkgs.podman}/bin/podman volume export woodpecker-server-data -o ${containersBackupPath}/woodpecker.tar ${pkgs.podman}/bin/podman volume export woodpecker-server-data -o ${containersBackupPath}/woodpecker.tar
''; '';
timerConfig = {OnCalendar = "hourly";}; timerConfig = {OnCalendar = "hourly";};
environmentFile = environmentFile = "${config.sops.secrets.restic-backups-b2-environment.path}";
"${config.sops.secrets.restic-backups-b2-environment.path}";
}; };
}; };

View file

@ -1,7 +1,10 @@
{ config, pkgs, inputs, lib, ... }:
{ {
config,
pkgs,
inputs,
lib,
...
}: {
imports = [../nginx.nix]; imports = [../nginx.nix];
services.nginx = { services.nginx = {
@ -13,5 +16,4 @@
}; };
}; };
}; };
} }

View file

@ -1,7 +1,10 @@
{ config, pkgs, inputs, lib, ... }:
{ {
config,
pkgs,
inputs,
lib,
...
}: {
imports = [../nginx.nix]; imports = [../nginx.nix];
services.nginx = { services.nginx = {
@ -38,5 +41,4 @@
}; };
ports = ["9005:80"]; ports = ["9005:80"];
}; };
} }

View file

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

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, lib, ... }: {
let config,
pkgs,
inputs,
lib,
...
}: let
port = 8081; port = 8081;
domain = "fossil.cyplo.dev"; domain = "fossil.cyplo.dev";
baseurl = "https://${domain}"; baseurl = "https://${domain}";
@ -19,18 +24,23 @@ in {
containers.fossil = { containers.fossil = {
autoStart = true; autoStart = true;
forwardPorts = [{ forwardPorts = [
{
containerPort = port; containerPort = port;
hostPort = port; hostPort = port;
}]; }
];
bindMounts = { bindMounts = {
"${path}" = { "${path}" = {
hostPath = "${path}"; hostPath = "${path}";
isReadOnly = false; isReadOnly = false;
}; };
}; };
config = { config, pkgs, ... }: config = {
let config,
pkgs,
...
}: let
user = "fossil"; user = "fossil";
group = "fossil"; group = "fossil";
in { in {
@ -59,13 +69,16 @@ in {
Group = group; Group = group;
WorkingDirectory = path; WorkingDirectory = path;
ReadWritePaths = [path]; ReadWritePaths = [path];
ExecStart = "${pkgs.fossil}/bin/fossil server" + " --localhost" ExecStart =
+ " --https" + " --port ${toString port}" "${pkgs.fossil}/bin/fossil server"
+ " --baseurl ${baseurl}" + " --repolist ${path}"; + " --localhost"
+ " --https"
+ " --port ${toString port}"
+ " --baseurl ${baseurl}"
+ " --repolist ${path}";
Restart = "always"; Restart = "always";
RestartSec = 3; RestartSec = 3;
}; };
}; };
}; };
}; };

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, lib, ... }: {
let config,
pkgs,
inputs,
lib,
...
}: let
foundryvtt = pkgs.fetchzip { foundryvtt = pkgs.fetchzip {
name = "foundryvtt"; name = "foundryvtt";
url = "file:///" + ./FoundryVTT-10.290.zip; url = "file:///" + ./FoundryVTT-10.290.zip;
@ -36,17 +41,23 @@ in {
containers.foundryvtt = { containers.foundryvtt = {
autoStart = true; autoStart = true;
forwardPorts = [{ forwardPorts = [
{
containerPort = 30000; containerPort = 30000;
hostPort = 30000; hostPort = 30000;
}]; }
];
bindMounts = { bindMounts = {
"/var/lib/foundryvtt" = { "/var/lib/foundryvtt" = {
hostPath = "/var/lib/foundryvtt"; hostPath = "/var/lib/foundryvtt";
isReadOnly = false; isReadOnly = false;
}; };
}; };
config = { config, pkgs, ... }: { config = {
config,
pkgs,
...
}: {
system.stateVersion = "22.05"; system.stateVersion = "22.05";
systemd.services."foundryvtt" = { systemd.services."foundryvtt" = {
requires = ["network-online.target"]; requires = ["network-online.target"];
@ -61,11 +72,17 @@ in {
}; };
containers.foundryvtt-test = { containers.foundryvtt-test = {
autoStart = true; autoStart = true;
forwardPorts = [{ forwardPorts = [
{
containerPort = 30001; containerPort = 30001;
hostPort = 30001; hostPort = 30001;
}]; }
config = { config, pkgs, ... }: { ];
config = {
config,
pkgs,
...
}: {
system.stateVersion = "22.05"; system.stateVersion = "22.05";
systemd.services."foundryvtt" = { systemd.services."foundryvtt" = {
requires = ["network-online.target"]; requires = ["network-online.target"];

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, lib, ... }: {
let config,
pkgs,
inputs,
lib,
...
}: let
httpPort = 8083; httpPort = 8083;
sshPort = 22; sshPort = 22;
domain = "git.cyplo.dev"; domain = "git.cyplo.dev";
@ -74,9 +79,16 @@ in {
isReadOnly = true; isReadOnly = true;
}; };
}; };
config = { config, pkgs, lib, ... }: { config = {
config,
pkgs,
lib,
...
}: {
system.stateVersion = "22.05"; system.stateVersion = "22.05";
users = users // { users =
users
// {
mutableUsers = false; mutableUsers = false;
allowNoPasswordLogin = true; allowNoPasswordLogin = true;
}; };
@ -104,7 +116,6 @@ in {
IS_TLS_ENABLED = true; IS_TLS_ENABLED = true;
USER = "postmaster@${emailDomain}"; USER = "postmaster@${emailDomain}";
}; };
}; };
}; };
}; };

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, lib, ... }: {
let config,
pkgs,
inputs,
lib,
...
}: let
domain = "peninsula.industries"; domain = "peninsula.industries";
streamingPort = 55000; streamingPort = 55000;
webPort = 55001; webPort = 55001;
@ -57,14 +62,18 @@ in {
}; };
}; };
sops.secrets."${mailgunSmtpSecretName}" = { sops.secrets."${mailgunSmtpSecretName}" =
{
sopsFile = ./mailgun.sops.yaml; sopsFile = ./mailgun.sops.yaml;
path = mailgunSmtpPasswordPath; path = mailgunSmtpPasswordPath;
} // secretSettings; }
sops.secrets."${mastodonDbSecretName}" = { // secretSettings;
sops.secrets."${mastodonDbSecretName}" =
{
sopsFile = ./mastodon-db.sops.yaml; sopsFile = ./mastodon-db.sops.yaml;
path = mastodonDbSecretPath; path = mastodonDbSecretPath;
} // secretSettings; }
// secretSettings;
inherit users; inherit users;
@ -113,10 +122,17 @@ in {
isReadOnly = true; isReadOnly = true;
}; };
}; };
config = { config, pkgs, lib, ... }: { config = {
config,
pkgs,
lib,
...
}: {
system.stateVersion = "22.05"; system.stateVersion = "22.05";
services.postgresql.port = postgresPort; services.postgresql.port = postgresPort;
users = users // { users =
users
// {
mutableUsers = false; mutableUsers = false;
allowNoPasswordLogin = true; allowNoPasswordLogin = true;
}; };
@ -151,6 +167,5 @@ in {
}; };
}; };
}; };
}; };
} }

View file

@ -1,12 +1,15 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services.nginx = { services.nginx = {
virtualHosts = { virtualHosts = {
"cyplo.dev" = { "cyplo.dev" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."= /.well-known/matrix/server".extraConfig = locations."= /.well-known/matrix/server".extraConfig = let
let server = { "m.server" = "cyplo.dev:443"; }; server = {"m.server" = "cyplo.dev:443";};
in '' in ''
add_header Content-Type application/json; add_header Content-Type application/json;
return 200 '${builtins.toJSON server}'; return 200 '${builtins.toJSON server}';
@ -33,5 +36,4 @@
}; };
}; };
}; };
} }

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, lib, ... }: {
let config,
pkgs,
inputs,
lib,
...
}: let
port = 8080; port = 8080;
domain = "news.cyplo.dev"; domain = "news.cyplo.dev";
in { in {
@ -17,12 +22,17 @@ in {
containers.rss = { containers.rss = {
autoStart = true; autoStart = true;
forwardPorts = [{ forwardPorts = [
{
containerPort = port; containerPort = port;
hostPort = port; hostPort = port;
}]; }
config = { config, pkgs, ... }: ];
let config = {
config,
pkgs,
...
}: let
inherit (config.services.tt-rss) pool; inherit (config.services.tt-rss) pool;
inherit (config.services.tt-rss) root; inherit (config.services.tt-rss) root;
in { in {
@ -38,10 +48,12 @@ in {
enable = true; enable = true;
virtualHosts = { virtualHosts = {
"${domain}" = { "${domain}" = {
listen = [{ listen = [
{
inherit port; inherit port;
addr = "0.0.0.0"; addr = "0.0.0.0";
}]; }
];
root = "${root}/www"; root = "${root}/www";
locations."/" = {index = "index.php";}; locations."/" = {index = "index.php";};
locations."^~ /feed-icons" = {root = "${root}";}; locations."^~ /feed-icons" = {root = "${root}";};
@ -59,5 +71,4 @@ in {
}; };
}; };
}; };
} }

View file

@ -1,5 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services.nginx = { services.nginx = {
virtualHosts = { virtualHosts = {
"search.cyplo.dev" = { "search.cyplo.dev" = {
@ -25,4 +28,3 @@
}; };
}; };
} }

View file

@ -1,5 +1,9 @@
{ config, pkgs, ... }: {
let port = 2222; config,
pkgs,
...
}: let
port = 2222;
in { in {
services.openssh = { services.openssh = {
enable = true; enable = true;

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, lib, ... }: { {
config,
pkgs,
inputs,
lib,
...
}: {
networking.firewall.allowedTCPPorts = [22067 22070]; networking.firewall.allowedTCPPorts = [22067 22070];
services.syncthing.relay = { services.syncthing.relay = {
enable = true; enable = true;

View file

@ -5,10 +5,14 @@
# from vpsAdminOS repository: # from vpsAdminOS repository:
# #
# https://github.com/vpsfreecz/vpsadminos/blob/staging/os/lib/nixos-container/vpsadminos.nix # https://github.com/vpsfreecz/vpsadminos/blob/staging/os/lib/nixos-container/vpsadminos.nix
{
{ config, pkgs, lib, ... }: config,
with lib; pkgs,
let nameservers = [ "1.1.1.1" "2606:4700:4700::1111" ]; lib,
...
}:
with lib; let
nameservers = ["1.1.1.1" "2606:4700:4700::1111"];
in { in {
networking.nameservers = mkDefault nameservers; networking.nameservers = mkDefault nameservers;
services.resolved = mkDefault {fallbackDns = nameservers;}; services.resolved = mkDefault {fallbackDns = nameservers;};
@ -16,10 +20,12 @@ in {
systemd.services.systemd-sysctl.enable = false; systemd.services.systemd-sysctl.enable = false;
systemd.sockets."systemd-journald-audit".enable = false; systemd.sockets."systemd-journald-audit".enable = false;
systemd.mounts = [{ systemd.mounts = [
{
where = "/sys/kernel/debug"; where = "/sys/kernel/debug";
enable = false; enable = false;
}]; }
];
systemd.services.systemd-udev-trigger.enable = false; systemd.services.systemd-udev-trigger.enable = false;
systemd.services.rpc-gssd.enable = false; systemd.services.rpc-gssd.enable = false;
@ -27,7 +33,8 @@ in {
boot.enableContainers = mkDefault true; boot.enableContainers = mkDefault true;
boot.loader.initScript.enable = true; boot.loader.initScript.enable = true;
boot.specialFileSystems."/run/keys".fsType = mkForce "tmpfs"; boot.specialFileSystems."/run/keys".fsType = mkForce "tmpfs";
boot.systemdExecutable = mkDefault boot.systemdExecutable =
mkDefault
"/run/current-system/systemd/lib/systemd/systemd systemd.unified_cgroup_hierarchy=0"; "/run/current-system/systemd/lib/systemd/systemd systemd.unified_cgroup_hierarchy=0";
# Overrides for <nixpkgs/nixos/modules/virtualisation/container-config.nix> # Overrides for <nixpkgs/nixos/modules/virtualisation/container-config.nix>

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, lib, ... }: {
let config,
pkgs,
inputs,
lib,
...
}: let
httpPort = 8000; httpPort = 8000;
agentPort = 9000; agentPort = 9000;
domain = "ci.cyplo.dev"; domain = "ci.cyplo.dev";
@ -8,8 +13,7 @@ let
agent = { agent = {
dependsOn = ["${serverContainerName}"]; dependsOn = ["${serverContainerName}"];
volumes = ["/var/run/podman/podman.sock:/var/run/docker.sock"]; volumes = ["/var/run/podman/podman.sock:/var/run/docker.sock"];
image = image = "woodpeckerci/woodpecker-agent@sha256:9a98e25ca6fcf7c437ad355cfce53a696c55b9864399a4d456429a20bfb44545";
"woodpeckerci/woodpecker-agent@sha256:9a98e25ca6fcf7c437ad355cfce53a696c55b9864399a4d456429a20bfb44545";
environmentFiles = ["${config.sops.secrets.gitea-env.path}"]; environmentFiles = ["${config.sops.secrets.gitea-env.path}"];
environment = { environment = {
WOODPECKER_SERVER = "${serverContainerName}:${toString agentPort}"; WOODPECKER_SERVER = "${serverContainerName}:${toString agentPort}";
@ -19,7 +23,6 @@ let
}; };
extraOptions = ["--network=woodpecker"]; extraOptions = ["--network=woodpecker"];
}; };
in { in {
imports = [../nginx.nix]; imports = [../nginx.nix];
@ -43,8 +46,7 @@ in {
virtualisation.podman.defaultNetwork.dnsname.enable = true; virtualisation.podman.defaultNetwork.dnsname.enable = true;
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
"${serverContainerName}" = { "${serverContainerName}" = {
image = image = "woodpeckerci/woodpecker-server@sha256:e6027e46a782d50790183b7274a2a2ad3a6c6fb9a645e6af81a16419613c28ea";
"woodpeckerci/woodpecker-server@sha256:e6027e46a782d50790183b7274a2a2ad3a6c6fb9a645e6af81a16419613c28ea";
volumes = ["woodpecker-server-data:${path}"]; volumes = ["woodpecker-server-data:${path}"];
environmentFiles = ["${config.sops.secrets.gitea-env.path}"]; environmentFiles = ["${config.sops.secrets.gitea-env.path}"];
environment = { environment = {
@ -62,5 +64,4 @@ in {
woodpecker-agent3 = agent; woodpecker-agent3 = agent;
woodpecker-agent4 = agent; woodpecker-agent4 = agent;
}; };
} }

View file

@ -1,5 +1,12 @@
{ config, pkgs, inputs, lib, system, nixpkgs-nixos-unstable-and-unfree, ... }: { {
config,
pkgs,
inputs,
lib,
system,
nixpkgs-nixos-unstable-and-unfree,
...
}: {
networking.hostName = "yoga"; networking.hostName = "yoga";
imports = [./hardware-configuration.nix ../../boot.nix ../../git]; imports = [./hardware-configuration.nix ../../boot.nix ../../git];
@ -50,9 +57,7 @@
isNormalUser = true; isNormalUser = true;
description = "cyryl"; description = "cyryl";
extraGroups = ["networkmanager" "wheel"]; extraGroups = ["networkmanager" "wheel"];
packages = with pkgs; packages = with pkgs; [
[
]; ];
}; };
@ -76,5 +81,4 @@
}; };
system = {stateVersion = "22.05";}; system = {stateVersion = "22.05";};
} }

View file

@ -1,10 +1,13 @@
{ config, lib, pkgs, modulesPath, ... }:
{ {
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = []; imports = [];
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
@ -15,26 +18,22 @@
boot.initrd.secrets = {"/crypto_keyfile.bin" = null;}; boot.initrd.secrets = {"/crypto_keyfile.bin" = null;};
boot.initrd.luks.devices."luks-e6cb9de6-a571-4462-ba9e-6f8dafdd3d21".device = boot.initrd.luks.devices."luks-e6cb9de6-a571-4462-ba9e-6f8dafdd3d21".device = "/dev/disk/by-uuid/e6cb9de6-a571-4462-ba9e-6f8dafdd3d21";
"/dev/disk/by-uuid/e6cb9de6-a571-4462-ba9e-6f8dafdd3d21"; boot.initrd.luks.devices."luks-e6cb9de6-a571-4462-ba9e-6f8dafdd3d21".keyFile = "/crypto_keyfile.bin";
boot.initrd.luks.devices."luks-e6cb9de6-a571-4462-ba9e-6f8dafdd3d21".keyFile =
"/crypto_keyfile.bin";
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/d19afedb-d03b-4a85-9ad7-d99d2ed057c5"; device = "/dev/disk/by-uuid/d19afedb-d03b-4a85-9ad7-d99d2ed057c5";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-10f9ad25-cff6-4a5c-ae92-4847e1374b2d".device = boot.initrd.luks.devices."luks-10f9ad25-cff6-4a5c-ae92-4847e1374b2d".device = "/dev/disk/by-uuid/10f9ad25-cff6-4a5c-ae92-4847e1374b2d";
"/dev/disk/by-uuid/10f9ad25-cff6-4a5c-ae92-4847e1374b2d";
fileSystems."/boot/efi" = { fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/5A4D-EDA3"; device = "/dev/disk/by-uuid/5A4D-EDA3";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices = [{device = "/dev/disk/by-uuid/5c9ab30b-9128-4c31-b392-785e7acbc0d2";}];
[{ device = "/dev/disk/by-uuid/5c9ab30b-9128-4c31-b392-785e7acbc0d2"; }];
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;

View file

@ -1,4 +1,10 @@
{ config, pkgs, nixpkgs-nixos-unstable-and-unfree, lib, ... }: { {
config,
pkgs,
nixpkgs-nixos-unstable-and-unfree,
lib,
...
}: {
boot.kernelModules = ["fuse"]; boot.kernelModules = ["fuse"];
services.smartd.enable = true; services.smartd.enable = true;
@ -6,7 +12,8 @@
networking.networkmanager = { networking.networkmanager = {
enable = true; enable = true;
dispatcherScripts = [{ dispatcherScripts = [
{
source = pkgs.writeText "upHook" '' source = pkgs.writeText "upHook" ''
enable_disable_wifi () enable_disable_wifi ()
{ {
@ -27,7 +34,8 @@
fi fi
''; '';
type = "basic"; type = "basic";
}]; }
];
}; };
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
@ -69,8 +77,7 @@
description = "Epson XP-540 via bolty"; description = "Epson XP-540 via bolty";
name = "epson_xp540_via_bolty"; name = "epson_xp540_via_bolty";
deviceUri = "ipp://bolty:631/printers/epson_xp540"; deviceUri = "ipp://bolty:631/printers/epson_xp540";
model = model = "epson-inkjet-printer-escpr/Epson-XP-540_Series-epson-escpr-en.ppd";
"epson-inkjet-printer-escpr/Epson-XP-540_Series-epson-escpr-en.ppd";
ppdOptions = { ppdOptions = {
PageSize = "A4"; PageSize = "A4";
Duplex = "DuplexNoTumble"; Duplex = "DuplexNoTumble";
@ -79,8 +86,7 @@
{ {
description = "Samsung SCX-4623 Series"; description = "Samsung SCX-4623 Series";
name = "samsung-SCX-4623"; name = "samsung-SCX-4623";
deviceUri = deviceUri = "usb://Samsung/SCX-4623%20Series?serial=Z2TYBFFZC01007W&interface=1";
"usb://Samsung/SCX-4623%20Series?serial=Z2TYBFFZC01007W&interface=1";
model = "samsung/SCX-4623FW.ppd"; model = "samsung/SCX-4623FW.ppd";
ppdOptions = { ppdOptions = {
PageSize = "A4"; PageSize = "A4";

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
console.keyMap = "pl"; console.keyMap = "pl";
imports = [./tailscale]; imports = [./tailscale];
services = { services = {
@ -41,7 +45,6 @@
Option "TearFree" "true" Option "TearFree" "true"
Option "AccelMethod" "sna" Option "AccelMethod" "sna"
''; '';
}; };
}; };
} }

View file

@ -1,5 +1,11 @@
{ config, pkgs, lib, inputs, nixpkgs-nixos-unstable-and-unfree, ... }: {
let config,
pkgs,
lib,
inputs,
nixpkgs-nixos-unstable-and-unfree,
...
}: let
stateVersion = "22.05"; stateVersion = "22.05";
username = "cyryl"; username = "cyryl";
in { in {
@ -51,8 +57,7 @@ in {
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
networking.nameservers = networking.nameservers = ["91.239.100.100" "89.233.43.71" "1.1.1.1" "8.8.8.8"];
[ "91.239.100.100" "89.233.43.71" "1.1.1.1" "8.8.8.8" ];
networking.hosts = {"10.11.99.1" = ["remarkable"];}; networking.hosts = {"10.11.99.1" = ["remarkable"];};
@ -73,17 +78,12 @@ in {
defaultFonts.monospace = ["Berkeley Mono"]; defaultFonts.monospace = ["Berkeley Mono"];
}; };
fonts.fonts = with pkgs; fonts.fonts = with pkgs; [
[
(runCommand "berkeley-fonts" {} '' (runCommand "berkeley-fonts" {} ''
mkdir -vp "$out/share/fonts/opentype" mkdir -vp "$out/share/fonts/opentype"
mkdir -vp "$out/share/fonts/truetype" mkdir -vp "$out/share/fonts/truetype"
${pkgs.unzip}/bin/unzip ${ ${pkgs.unzip}/bin/unzip ${./fonts.zip} \*.otf -d $out/share/fonts/opentype
./fonts.zip ${pkgs.unzip}/bin/unzip ${./fonts.zip} \*.ttf -d $out/share/fonts/truetype
} \*.otf -d $out/share/fonts/opentype
${pkgs.unzip}/bin/unzip ${
./fonts.zip
} \*.ttf -d $out/share/fonts/truetype
'') '')
]; ];

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
programs.ssh.extraConfig = '' programs.ssh.extraConfig = ''
Host vpsfree1 Host vpsfree1
HostName vpsfree1 HostName vpsfree1
@ -6,7 +10,8 @@
StrictHostKeyChecking=accept-new StrictHostKeyChecking=accept-new
''; '';
nix.buildMachines = [{ nix.buildMachines = [
{
hostName = "bolty"; hostName = "bolty";
sshUser = "nix-builder"; sshUser = "nix-builder";
sshKey = "/home/cyryl/.ssh/id_ed25519"; sshKey = "/home/cyryl/.ssh/id_ed25519";
@ -15,11 +20,11 @@
speedFactor = 1; speedFactor = 1;
supportedFeatures = ["kvm" "big-parallel"]; supportedFeatures = ["kvm" "big-parallel"];
mandatoryFeatures = []; mandatoryFeatures = [];
}]; }
];
nix.extraOptions = '' nix.extraOptions = ''
builders-use-substitutes = true builders-use-substitutes = true
''; '';
nix.distributedBuilds = true; nix.distributedBuilds = true;
} }

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, ... }: {
let unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system}; config,
pkgs,
inputs,
...
}: let
unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system};
in { in {
home-manager.users.cyryl = { home-manager.users.cyryl = {
accounts.email.accounts.cyplo = { accounts.email.accounts.cyplo = {
@ -70,10 +75,8 @@ in {
systemd.user.services."proton-bridge" = { systemd.user.services."proton-bridge" = {
Unit.Description = "Bridge to ProtonMail"; Unit.Description = "Bridge to ProtonMail";
Install.WantedBy = ["default.target" "mbsync.service"]; Install.WantedBy = ["default.target" "mbsync.service"];
Service.ExecStart = Service.ExecStart = "${unstable.protonmail-bridge}/bin/protonmail-bridge --noninteractive";
"${unstable.protonmail-bridge}/bin/protonmail-bridge --noninteractive";
Service.Environment = "PATH=${pkgs.pass}/bin:${pkgs.gnupg}/bin"; Service.Environment = "PATH=${pkgs.pass}/bin:${pkgs.gnupg}/bin";
}; };
}; };
} }

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services = {}; services = {};
xsession = {enable = false;}; xsession = {enable = false;};

View file

@ -1,8 +1,11 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services.xserver = { services.xserver = {
enable = true; enable = true;
desktopManager.enlightenment.enable = true; desktopManager.enlightenment.enable = true;
}; };
users.users.cyryl.packages = with pkgs; []; users.users.cyryl.packages = with pkgs; [];
} }

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services.xserver = { services.xserver = {
videoDrivers = ["intel"]; videoDrivers = ["intel"];
deviceSection = '' deviceSection = ''
@ -23,5 +27,4 @@
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;}; vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
}; };
}; };
} }

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services.xserver = {videoDrivers = ["modesetting"];}; services.xserver = {videoDrivers = ["modesetting"];};
hardware.opengl = { hardware.opengl = {
@ -17,5 +21,4 @@
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;}; vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
}; };
}; };
} }

View file

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

View file

@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }: { {
config,
pkgs,
inputs,
...
}: {
programs.git = { programs.git = {
enable = true; enable = true;
lfs.enable = true; lfs.enable = true;
@ -25,13 +30,10 @@
push.default = "simple"; push.default = "simple";
}; };
aliases = { aliases = {
tree = tree = "log --show-signature --color --decorate --date=short --all --graph -n 3";
"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";
newbranch =
"!git checkout master && git fetch -p && git reset --hard origin/master && git checkout -b $2";
head = "log HEAD -n1"; head = "log HEAD -n1";
vacuum = vacuum = "!git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs -r git branch -D && git gc --aggressive --auto";
"!git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs -r git branch -D && git gc --aggressive --auto";
}; };
}; };
} }

View file

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

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services = {}; services = {};
xsession = {enable = false;}; xsession = {enable = false;};

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services.xserver = { services.xserver = {
enable = true; enable = true;
displayManager.gdm.enable = true; displayManager.gdm.enable = true;
@ -15,4 +19,3 @@
gsconnect gsconnect
]; ];
} }

View file

@ -1,10 +1,18 @@
{ config, pkgs, ... }: { {
networking.firewall.allowedTCPPortRanges = [{ config,
pkgs,
...
}: {
networking.firewall.allowedTCPPortRanges = [
{
from = 1716; from = 1716;
to = 1764; to = 1764;
}]; }
networking.firewall.allowedUDPPortRanges = [{ ];
from = 1716; networking.firewall.allowedUDPPortRanges = [
to = 1764; {
}]; from = 1716;
to = 1764;
}
];
} }

View file

@ -1,10 +1,15 @@
{ config, pkgs, discord, inputs, nixpkgs-nixos-stable-and-unfree {
, nixpkgs-nixos-unstable-and-unfree, ... }: config,
let pkgs,
discord,
inputs,
nixpkgs-nixos-stable-and-unfree,
nixpkgs-nixos-unstable-and-unfree,
...
}: let
unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system}; unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system};
nixpkgs-master = inputs.nixpkgs-master.legacyPackages.${pkgs.system}; nixpkgs-master = inputs.nixpkgs-master.legacyPackages.${pkgs.system};
in { in {
security.chromiumSuidSandbox.enable = true; security.chromiumSuidSandbox.enable = true;
home-manager.users.cyryl = {...}: { home-manager.users.cyryl = {...}: {
@ -76,7 +81,9 @@ in {
yubikey-manager-qt yubikey-manager-qt
yubikey-personalization yubikey-personalization
yubikey-personalization-gui yubikey-personalization-gui
] ++ [ unstable.gnucash unstable.thunderbird ] ++ [ ]
++ [unstable.gnucash unstable.thunderbird]
++ [
nixpkgs-nixos-stable-and-unfree.discord nixpkgs-nixos-stable-and-unfree.discord
nixpkgs-nixos-unstable-and-unfree.hopper nixpkgs-nixos-unstable-and-unfree.hopper
]; ];

View file

@ -1,7 +1,15 @@
{ config, pkgs, lib, ... }: { {
home.file.".config/firejail/firefox.profile".text = '' config,
pkgs,
lib,
...
}: {
home.file.".config/firejail/firefox.profile".text =
''
include ${pkgs.firejail}/etc/firejail/firefox.profile include ${pkgs.firejail}/etc/firejail/firefox.profile
ignore apparmor ignore apparmor
ignore noexec '' + "$" + "{HOME}"; ignore noexec ''
+ "$"
+ "{HOME}";
} }

View file

@ -1,6 +1,9 @@
{ config, pkgs, ... }: { {
home.packages = with pkgs; config,
[ pkgs,
...
}: {
home.packages = with pkgs; [
(vscode-with-extensions.override { (vscode-with-extensions.override {
vscodeExtensions = with vscode-extensions; vscodeExtensions = with vscode-extensions;
[ [
@ -10,17 +13,13 @@
name = "vadimcn.vscode-lldb-1.6.10"; name = "vadimcn.vscode-lldb-1.6.10";
src = fetchurl { src = fetchurl {
name = "vadimcn.vscode-lldb.zip"; name = "vadimcn.vscode-lldb.zip";
url = url = "https://github.com/vadimcn/vscode-lldb/releases/download/v1.6.10/codelldb-${pkgs.system}.vsix";
"https://github.com/vadimcn/vscode-lldb/releases/download/v1.6.10/codelldb-${pkgs.system}.vsix";
sha256 = "sha256-QWbpe6ofacjrTCyWSKljwHDWWeHGmKNqi7cpw8Qy5Tw="; sha256 = "sha256-QWbpe6ofacjrTCyWSKljwHDWWeHGmKNqi7cpw8Qy5Tw=";
}; };
buildInputs = with pkgs; [llvm lldb python37 autoPatchelfHook]; buildInputs = with pkgs; [llvm lldb python37 autoPatchelfHook];
}) })
] ]
++ vscode-utils.extensionsFromVscodeMarketplace [
++
vscode-utils.extensionsFromVscodeMarketplace [
{ {
publisher = "vscodevim"; publisher = "vscodevim";
name = "vim"; name = "vim";

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, ... }: { {
config,
pkgs,
inputs,
system,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
(pass.withExtensions (ext: [ (pass.withExtensions (ext: [
ext.pass-otp ext.pass-otp
@ -7,6 +13,7 @@
ext.pass-audit ext.pass-audit
ext.pass-update ext.pass-update
])) ]))
inputs.alejandra.packages.${system}.default
age age
android-tools android-tools
aria aria
@ -53,6 +60,5 @@
wget wget
whois whois
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".youtube-dl inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".youtube-dl
]; ];
} }

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, ... }: {
let username = "cyryl"; config,
pkgs,
inputs,
...
}: let
username = "cyryl";
in { in {
home.sessionVariables = { home.sessionVariables = {
LC_ALL = "en_GB.UTF-8"; LC_ALL = "en_GB.UTF-8";
@ -30,5 +35,4 @@ in {
./programs/vim.nix ./programs/vim.nix
./programs/zsh.nix ./programs/zsh.nix
]; ];
} }

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
home.file.".config/nixpkgs/config.nix".source = ../shell-config.nix; home.file.".config/nixpkgs/config.nix".source = ../shell-config.nix;
home.file.".gdbinit".text = '' home.file.".gdbinit".text = ''
set auto-load python-scripts on set auto-load python-scripts on

View file

@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }: { {
config,
pkgs,
inputs,
...
}: {
services.gpg-agent = { services.gpg-agent = {
enable = true; enable = true;
pinentryFlavor = "curses"; pinentryFlavor = "curses";

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
home.sessionVariables = {TERMINAL = "alacritty";}; home.sessionVariables = {TERMINAL = "alacritty";};
programs.alacritty = { programs.alacritty = {
@ -6,11 +10,13 @@
settings = { settings = {
window.decorations = "none"; window.decorations = "none";
mouse_bindings = [{ mouse_bindings = [
{
mouse = "Middle"; mouse = "Middle";
mode = "~Vi"; mode = "~Vi";
action = "None"; action = "None";
}]; }
];
scrolling = { scrolling = {
history = 32000; history = 32000;
multiplier = 3; multiplier = 3;

View file

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

View file

@ -1,9 +1,10 @@
{ pkgs }: {pkgs}: let
let
myEmacs = pkgs.emacs-nox; myEmacs = pkgs.emacs-nox;
inherit ((pkgs.emacsPackagesFor myEmacs)) emacsWithPackages; inherit ((pkgs.emacsPackagesFor myEmacs)) emacsWithPackages;
in emacsWithPackages (epkgs: in
(with epkgs.melpaStablePackages; [ ]) ++ (with epkgs.melpaPackages; [ emacsWithPackages (epkgs:
(with epkgs.melpaStablePackages; [])
++ (with epkgs.melpaPackages; [
color-theme-sanityinc-solarized color-theme-sanityinc-solarized
evil evil
evil-collection evil-collection
@ -14,9 +15,11 @@ in emacsWithPackages (epkgs:
nix-mode nix-mode
projectile projectile
xterm-color xterm-color
]) ++ (with epkgs.elpaPackages; [ ])
++ (with epkgs.elpaPackages; [
beacon # ; highlight my cursor when scrolling beacon # ; highlight my cursor when scrolling
nameless # ; hide current package name everywhere in elisp code nameless # ; hide current package name everywhere in elisp code
]) ++ [ ])
++ [
pkgs.notmuch # From main packages set pkgs.notmuch # From main packages set
]) ])

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
home.file.".emacs".text = '' home.file.".emacs".text = ''
(require 'package) (require 'package)
@ -33,5 +37,4 @@
enable = true; enable = true;
package = import ./emacs.nix {inherit pkgs;}; package = import ./emacs.nix {inherit pkgs;};
}; };
} }

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
home.sessionVariables = {TERMINAL = "kitty";}; home.sessionVariables = {TERMINAL = "kitty";};
programs.kitty = { programs.kitty = {
@ -33,7 +37,6 @@
color13 = "#5856b9"; color13 = "#5856b9";
color14 = "#81908f"; color14 = "#81908f";
color15 = "#fcf4dc"; color15 = "#fcf4dc";
}; };
}; };
} }

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
programs.newsboat = { programs.newsboat = {
enable = true; enable = true;
autoReload = true; autoReload = true;
@ -44,8 +48,7 @@
{url = "https://sfconservancy.org/feeds/blog/";} {url = "https://sfconservancy.org/feeds/blog/";}
{url = "https://sourcehut.org/blog/index.xml";} {url = "https://sourcehut.org/blog/index.xml";}
{ {
url = url = "https://openwrt.org/feed.php?type=rss&mode=list&sort=date&ns=advisory&linkto=current&content=html";
"https://openwrt.org/feed.php?type=rss&mode=list&sort=date&ns=advisory&linkto=current&content=html";
} }
{url = "https://nora.codes/index.xml";} {url = "https://nora.codes/index.xml";}
{url = "http://hackedfrompieces.wordpress.com/feed/";} {url = "http://hackedfrompieces.wordpress.com/feed/";}
@ -104,8 +107,7 @@
{url = "http://sparkleshare.org/feed/";} {url = "http://sparkleshare.org/feed/";}
{url = "http://osprintingllc.com/feed/";} {url = "http://osprintingllc.com/feed/";}
{ {
url = url = "https://forum.openwrt.org/extern.php?action=feed&fid=11&type=rss";
"https://forum.openwrt.org/extern.php?action=feed&fid=11&type=rss";
} }
{url = "http://corgibytes.com/feed.xml";} {url = "http://corgibytes.com/feed.xml";}
{url = "http://chatolandia.pl/feed/";} {url = "http://chatolandia.pl/feed/";}
@ -115,8 +117,7 @@
{url = "https://blog.uncensoreddns.org/feeds/atom/all/";} {url = "https://blog.uncensoreddns.org/feeds/atom/all/";}
{url = "http://www.paulallenengineering.com/1/feed";} {url = "http://www.paulallenengineering.com/1/feed";}
{ {
url = url = "http://komornik.wroclaw.pl/index.php?option=com_rss&feed=RSS2.0&no_html=1";
"http://komornik.wroclaw.pl/index.php?option=com_rss&feed=RSS2.0&no_html=1";
} }
{url = "https://rachelbythebay.com/w/atom.xml";} {url = "https://rachelbythebay.com/w/atom.xml";}
{url = "http://sliptonic.com/feed/";} {url = "http://sliptonic.com/feed/";}

View file

@ -1,7 +1,9 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
programs.ssh.extraConfig = '' programs.ssh.extraConfig = ''
StrictHostKeyChecking=accept-new StrictHostKeyChecking=accept-new
''; '';
} }

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
home.sessionVariables = {TERMINAL = "termite";}; home.sessionVariables = {TERMINAL = "termite";};
programs.termite = { programs.termite = {
enable = true; enable = true;

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
programs.tmux = { programs.tmux = {
enable = true; enable = true;
shortcut = "a"; shortcut = "a";

View file

@ -1,5 +1,11 @@
{ config, pkgs, lib, inputs, system, ... }: {
let config,
pkgs,
lib,
inputs,
system,
...
}: let
unstablePackages = inputs.nixpkgs-nixos-unstable.legacyPackages."${system}"; unstablePackages = inputs.nixpkgs-nixos-unstable.legacyPackages."${system}";
nil = inputs.nil.packages."${system}".default; nil = inputs.nil.packages."${system}".default;
cocPackage = unstablePackages.vimPlugins.coc-nvim; cocPackage = unstablePackages.vimPlugins.coc-nvim;
@ -27,7 +33,6 @@ in {
}; };
}; };
}; };
}; };
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
history = { history = {

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
imports = [ imports = [
./scripts/mount-vault.nix ./scripts/mount-vault.nix
./scripts/umount-vault.nix ./scripts/umount-vault.nix

View file

@ -1,11 +1,11 @@
{ config, pkgs, ... }: {
config,
let pkgs,
...
}: let
download = pkgs.writeShellScriptBin "download" '' download = pkgs.writeShellScriptBin "download" ''
${pkgs.aria}/bin/aria2c -x 16 -s 16 $@ ${pkgs.aria}/bin/aria2c -x 16 -s 16 $@
''; '';
in { in {
home.packages = with pkgs; [download]; home.packages = with pkgs; [download];
} }

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }: {
config,
let pkgs,
...
}: let
mount-vault = pkgs.writeTextFile { mount-vault = pkgs.writeTextFile {
name = "mount-vault"; name = "mount-vault";
executable = true; executable = true;
@ -49,8 +51,6 @@ let
fi fi
''; '';
}; };
in { in {
home.packages = with pkgs; [mount-vault]; home.packages = with pkgs; [mount-vault];
} }

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }: {
config,
let pkgs,
...
}: let
umount-vault = pkgs.writeTextFile { umount-vault = pkgs.writeTextFile {
name = "umount-vault"; name = "umount-vault";
executable = true; executable = true;
@ -16,5 +18,4 @@ let
$VERACRYPT -t -d $VERACRYPT -t -d
''; '';
}; };
in {home.packages = with pkgs; [umount-vault];} in {home.packages = with pkgs; [umount-vault];}

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services.autorandr.enable = true; services.autorandr.enable = true;
home-manager.users.cyryl = _: { home-manager.users.cyryl = _: {
programs.autorandr = { programs.autorandr = {
@ -23,12 +27,9 @@
}; };
profiles = { profiles = {
"foureighty-docked" = { "foureighty-docked" = {
fingerprint = { fingerprint = {
eDP1 = eDP1 = "00ffffffffffff0030e4ee0500000000001c0104a51f1178e272e5a15148a2280e505400000001010101010101010101010101010101695e00a0a0a029503020a50035ae1000001a000000000000000000000000000000000000000000fe004c4720446973706c61790a2020000000fe004c503134305148322d535044310060";
"00ffffffffffff0030e4ee0500000000001c0104a51f1178e272e5a15148a2280e505400000001010101010101010101010101010101695e00a0a0a029503020a50035ae1000001a000000000000000000000000000000000000000000fe004c4720446973706c61790a2020000000fe004c503134305148322d535044310060"; DP1 = "00ffffffffffff0026cd4e66f3030000271d0104b53c22783ef6d5a7544b9e250d5054bfef80714f8140818081c09500b300d1c001014dd000a0f0703e8030203500544f2100001a000000ff0031313636333933393031303131000000fd00184c1fa03c000a202020202020000000fc00504c3237393255480a202020200176020320f15390050403020716011f121314201511065d5e5f2309070783010000023a801871382d40582c4500544f2100001f011d8018711c1620582c2500544f2100009fa76600a0f0701f8030205500544f2100001ff45100a0f070198030203500544f2100001f565e00a0a0a0295030203500544f2100001b000000000059";
DP1 =
"00ffffffffffff0026cd4e66f3030000271d0104b53c22783ef6d5a7544b9e250d5054bfef80714f8140818081c09500b300d1c001014dd000a0f0703e8030203500544f2100001a000000ff0031313636333933393031303131000000fd00184c1fa03c000a202020202020000000fc00504c3237393255480a202020200176020320f15390050403020716011f121314201511065d5e5f2309070783010000023a801871382d40582c4500544f2100001f011d8018711c1620582c2500544f2100009fa76600a0f0701f8030205500544f2100001ff45100a0f070198030203500544f2100001f565e00a0a0a0295030203500544f2100001b000000000059";
}; };
config = { config = {
eDP1 = {enable = false;}; eDP1 = {enable = false;};
@ -42,8 +43,7 @@
}; };
"foureighty" = { "foureighty" = {
fingerprint = { fingerprint = {
eDP1 = eDP1 = "00ffffffffffff0030e4ee0500000000001c0104a51f1178e272e5a15148a2280e505400000001010101010101010101010101010101695e00a0a0a029503020a50035ae1000001a000000000000000000000000000000000000000000fe004c4720446973706c61790a2020000000fe004c503134305148322d535044310060";
"00ffffffffffff0030e4ee0500000000001c0104a51f1178e272e5a15148a2280e505400000001010101010101010101010101010101695e00a0a0a029503020a50035ae1000001a000000000000000000000000000000000000000000fe004c4720446973706c61790a2020000000fe004c503134305148322d535044310060";
}; };
config = { config = {
eDP1 = { eDP1 = {
@ -57,5 +57,4 @@
}; };
}; };
}; };
} }

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
imports = [./autorandr.nix ./openweathermap-secrets.nix]; imports = [./autorandr.nix ./openweathermap-secrets.nix];
environment.systemPackages = with pkgs; [dconf]; environment.systemPackages = with pkgs; [dconf];
programs.dconf.enable = true; programs.dconf.enable = true;
@ -6,17 +10,21 @@
security.sudo.extraRules = [ security.sudo.extraRules = [
{ {
users = ["cyryl"]; users = ["cyryl"];
commands = [{ commands = [
{
command = "${pkgs.i3}/bin/i3-msg"; command = "${pkgs.i3}/bin/i3-msg";
options = ["NOPASSWD"]; options = ["NOPASSWD"];
}]; }
];
} }
{ {
users = ["cyryl"]; users = ["cyryl"];
commands = [{ commands = [
{
command = "${pkgs.intel-gpu-tools}/bin/intel_gpu_top"; command = "${pkgs.intel-gpu-tools}/bin/intel_gpu_top";
options = ["NOPASSWD"]; options = ["NOPASSWD"];
}]; }
];
} }
]; ];

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services.dunst = { services.dunst = {
enable = true; enable = true;
settings = { settings = {

View file

@ -1,5 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
home.packages = with pkgs; [grobi]; home.packages = with pkgs; [grobi];
services.grobi = { services.grobi = {
enable = true; enable = true;

View file

@ -1,6 +1,9 @@
{ config, pkgs, ... }: { {
imports = config,
[ ./i3.nix ./i3status-rust.nix ./dunst.nix ./rofi.nix ./xidlehook.nix ]; pkgs,
...
}: {
imports = [./i3.nix ./i3status-rust.nix ./dunst.nix ./rofi.nix ./xidlehook.nix];
home.sessionVariables = {CM_LAUNCHER = "rofi";}; home.sessionVariables = {CM_LAUNCHER = "rofi";};
@ -27,5 +30,4 @@
}; };
xsession = {enable = true;}; xsession = {enable = true;};
} }

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
programs.i3status = { programs.i3status = {
enable = true; enable = true;
enableDefault = false; enableDefault = false;
@ -32,5 +36,4 @@
}; };
}; };
}; };
} }

View file

@ -1,5 +1,9 @@
{ config, pkgs, ... }: {
let mod = "Mod4"; config,
pkgs,
...
}: let
mod = "Mod4";
in { in {
home.packages = with pkgs; [font-awesome intel-gpu-tools]; home.packages = with pkgs; [font-awesome intel-gpu-tools];
@ -23,8 +27,7 @@ in {
notification = false; notification = false;
} }
{ {
command = command = "exec xdg-mime default org.gnome.Evince.desktop application/pdf";
"exec xdg-mime default org.gnome.Evince.desktop application/pdf";
always = false; always = false;
notification = false; notification = false;
} }
@ -42,9 +45,9 @@ in {
}; };
workspaceLayout = "tabbed"; workspaceLayout = "tabbed";
bars = [{ bars = [
statusCommand = {
"${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-top.toml"; statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-top.toml";
position = "top"; position = "top";
colors.background = "#001e26"; colors.background = "#001e26";
colors.statusline = "#708183"; colors.statusline = "#708183";
@ -54,7 +57,8 @@ in {
}; };
trayOutput = "primary"; trayOutput = "primary";
}]; }
];
modifier = mod; modifier = mod;
keybindings = { keybindings = {
@ -65,25 +69,17 @@ in {
"${mod}+Shift+l" = "exec physlock -d"; "${mod}+Shift+l" = "exec physlock -d";
"${mod}+Return" = "exec i3-sensible-terminal"; "${mod}+Return" = "exec i3-sensible-terminal";
"XF86AudioRaiseVolume" = "XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%";
"exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%"; "XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioLowerVolume" = "XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle";
"exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%"; "XF86AudioMicMute" = "exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86AudioMute" =
"exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" =
"exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86MonBrightnessUp" = "XF86MonBrightnessUp" = "exec light -s sysfs/backlight/intel_backlight -A 5";
"exec light -s sysfs/backlight/intel_backlight -A 5"; "XF86MonBrightnessDown" = "exec light -s sysfs/backlight/intel_backlight -U 5";
"XF86MonBrightnessDown" =
"exec light -s sysfs/backlight/intel_backlight -U 5";
"Print" = "Print" = "exec ${pkgs.gnome3.gnome-screenshot}/bin/gnome-screenshot -i";
"exec ${pkgs.gnome3.gnome-screenshot}/bin/gnome-screenshot -i";
"${mod}+r" = "${mod}+r" = "exec ${pkgs.rofi}/bin/rofi -show combi -combi-modi window#run#ssh -modi combi";
"exec ${pkgs.rofi}/bin/rofi -show combi -combi-modi window#run#ssh -modi combi";
"${mod}+c" = "exec ${pkgs.clipmenu}/bin/clipmenu"; "${mod}+c" = "exec ${pkgs.clipmenu}/bin/clipmenu";
"${mod}+q" = "kill"; "${mod}+q" = "kill";
"${mod}+f" = "fullscreen toggle"; "${mod}+f" = "fullscreen toggle";
@ -120,8 +116,6 @@ in {
"${mod}+Ctrl+Up" = "move workspace to output up"; "${mod}+Ctrl+Up" = "move workspace to output up";
"${mod}+Ctrl+Down" = "move workspace to output down"; "${mod}+Ctrl+Down" = "move workspace to output down";
}; };
}; };
}; };
} }

View file

@ -1,5 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
programs.i3status-rust = { programs.i3status-rust = {
enable = true; enable = true;
bars = { bars = {

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
sops.secrets.openweathermap-api-key = { sops.secrets.openweathermap-api-key = {
inherit (config.users.users.cyryl) group; inherit (config.users.users.cyryl) group;
mode = "0440"; mode = "0440";

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services.polybar = { services.polybar = {
enable = true; enable = true;
script = "polybar -r main_bar &"; script = "polybar -r main_bar &";
@ -40,8 +44,7 @@
"module/weather" = { "module/weather" = {
type = "custom/script"; type = "custom/script";
interval = 600; interval = 600;
exec = exec = "${pkgs.bash}/bin/bash -c 'source ~/dev/dotfiles/nixos/i3/polybar/openweathermap-fullfeatured.sh'";
"${pkgs.bash}/bin/bash -c 'source ~/dev/dotfiles/nixos/i3/polybar/openweathermap-fullfeatured.sh'";
label-font = 2; label-font = 2;
}; };
@ -56,8 +59,7 @@
"module/temperature" = { "module/temperature" = {
type = "custom/script"; type = "custom/script";
interval = 5; interval = 5;
exec = exec = "${pkgs.bash}/bin/bash -c 'source ~/dev/dotfiles/nixos/i3/polybar/cpu-temp.sh'";
"${pkgs.bash}/bin/bash -c 'source ~/dev/dotfiles/nixos/i3/polybar/cpu-temp.sh'";
}; };
"module/memory" = { "module/memory" = {
@ -89,8 +91,6 @@
format-discharging = "<label-discharging>"; format-discharging = "<label-discharging>";
label-discharging = "%time%"; label-discharging = "%time%";
}; };
}; };
}; };
} }

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.rofi = { programs.rofi = {
enable = true; enable = true;
font = "Berkeley Mono 16"; font = "Berkeley Mono 16";

View file

@ -1,11 +1,14 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services.xidlehook = { services.xidlehook = {
enable = true; enable = true;
not-when-audio = true; not-when-audio = true;
not-when-fullscreen = true; not-when-fullscreen = true;
environment = { environment = {
"PRIMARY_DISPLAY" = "PRIMARY_DISPLAY" = "$(${pkgs.xorg.xrandr}/bin/xrandr | awk '/ primary/{print $1}')";
"$(${pkgs.xorg.xrandr}/bin/xrandr | awk '/ primary/{print $1}')";
}; };
timers = [ timers = [
{ {
@ -24,6 +27,5 @@
''}"; ''}";
} }
]; ];
}; };
} }

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services.xserver = { services.xserver = {
enable = true; enable = true;
displayManager.sddm = { displayManager.sddm = {
@ -10,4 +14,3 @@
}; };
users.users.cyryl.packages = with pkgs; []; users.users.cyryl.packages = with pkgs; [];
} }

Some files were not shown because too many files have changed in this diff Show more