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

View File

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

View File

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

View File

@ -1,9 +1,11 @@
{ 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 = [];

View File

@ -1,5 +1,10 @@
{ config, pkgs, inputs, lib, ... }:
let
{
config,
pkgs,
inputs,
lib,
...
}: let
physicalInterface = "enp4s0";
bridgeInterface = "br0";
in {
@ -29,10 +34,12 @@ in {
wakeOnLan.enable = true;
};
"${bridgeInterface}" = {
ipv4.addresses = [{
ipv4.addresses = [
{
"address" = "10.0.0.8";
"prefixLength" = 24;
}];
}
];
};
};
bridges = {"${bridgeInterface}".interfaces = ["${physicalInterface}"];};
@ -57,5 +64,4 @@ in {
security.allowUserNamespaces = true;
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 {
imports = [];
networking.firewall.allowedTCPPorts = [port];
}

View File

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

View File

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

View File

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

View File

@ -1,5 +1,9 @@
{ config, pkgs, lib, ... }: {
{
config,
pkgs,
lib,
...
}: {
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [631 6566];
networking.firewall.allowedUDPPorts = [631 6566];
@ -16,15 +20,16 @@
'';
};
hardware.printers.ensurePrinters = [{
hardware.printers.ensurePrinters = [
{
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";};
}];
}
];
hardware.sane = {
enable = true;
@ -45,5 +50,4 @@
hagath
'';
};
}

View File

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

View File

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

View File

@ -1,4 +1,8 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
environment.systemPackages = with pkgs; [restic];
networking.firewall.allowedTCPPorts = [8000];
services.restic.server = {
@ -8,5 +12,4 @@
prometheus = true;
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";
imports = [

View File

@ -1,11 +1,16 @@
{ 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,4 +1,8 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
environment.systemPackages = with pkgs; [
atop
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";
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 form3_cert_path);
in {
@ -24,12 +31,8 @@ in {
(runCommand "berkeley-fonts" {} ''
mkdir -vp "$out/share/fonts/opentype"
mkdir -vp "$out/share/fonts/truetype"
${pkgs.unzip}/bin/unzip ${
../../fonts.zip
} \*.otf -d $out/share/fonts/opentype
${pkgs.unzip}/bin/unzip ${
../../fonts.zip
} \*.ttf -d $out/share/fonts/truetype
${pkgs.unzip}/bin/unzip ${../../fonts.zip} \*.otf -d $out/share/fonts/opentype
${pkgs.unzip}/bin/unzip ${../../fonts.zip} \*.ttf -d $out/share/fonts/truetype
'')
nerdfonts
@ -55,11 +58,9 @@ in {
imports = [];
home.packages = with pkgs; [awscli kubectl cargo-update];
programs.git.userEmail = lib.mkForce "cyryl.plotnicki@form3.tech";
programs.git.extraConfig.user.signingkey =
"6441B1BC81F8FB1561C9AFF5534222210FE423ED";
programs.git.extraConfig.user.signingkey = "6441B1BC81F8FB1561C9AFF5534222210FE423ED";
programs.git.extraConfig.commit.gpgsign = true;
programs.git.extraConfig."url \"git@github.com:\"".insteadOf =
"https://github.com/";
programs.git.extraConfig."url \"git@github.com:\"".insteadOf = "https://github.com/";
programs.gpg.enable = true;
programs.gpg.homedir = "/Users/cyryl/.gnupg";
programs.zsh.loginExtra = ''

View File

@ -1,4 +1,8 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
boot.kernelPackages = pkgs.linuxPackages_latest;
nixpkgs.overlays = [
(self: super: {
@ -6,10 +10,12 @@
super.buildLinux ({
ignoreConfigErrors = true;
enableParallelBuilding = true;
} // x);
}
// x);
})
];
boot.kernelPatches = [{
boot.kernelPatches = [
{
name = "foureighty";
patch = null;
extraConfig = ''
@ -89,5 +95,6 @@
X86_SGX 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";
imports = [
@ -55,7 +62,6 @@
buttonMapping = "1 0 3 4 5 6 7 8 9 10";
};
};
};
services.fprintd = {enable = true;};
programs.ccache.enable = true;

View File

@ -1,11 +1,16 @@
{ 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.systemd-boot.enable = true;
@ -14,8 +19,7 @@
};
boot.initrd.secrets = {"/crypto_keyfile.bin" = null;};
boot.initrd.luks.devices."luks-43a80125-4089-45be-9561-fab93f984916".device =
"/dev/disk/by-uuid/43a80125-4089-45be-9561-fab93f984916";
boot.initrd.luks.devices."luks-43a80125-4089-45be-9561-fab93f984916".device = "/dev/disk/by-uuid/43a80125-4089-45be-9561-fab93f984916";
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/D6C0-1A9D";

View File

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

View File

@ -1,6 +1,4 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
export __NV_PRIME_RENDER_OFFLOAD=1
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";
services.thinkfan = {
enable = true;

View File

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

View File

@ -1,10 +1,14 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
services.home-assistant = {
enable = true;
openFirewall = true;
package = (pkgs.home-assistant.override {
package =
(pkgs.home-assistant.override {
extraPackages = ps: with ps; [];
extraComponents = [
"api"
@ -23,7 +27,7 @@
"zeroconf"
"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];
imports = [../../git ../../mercurial];

View File

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

View File

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

View File

@ -1,10 +1,13 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}: {
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 = [];
@ -15,19 +18,20 @@
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";
fsType = "vfat";
};
swapDevices = [{
swapDevices = [
{
device = "/swapfile";
size = 16 * 1024;
priority = 1;
}];
}
];
zramSwap = {
enable = true;

View File

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

View File

@ -1,11 +1,16 @@
{ 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,8 +23,7 @@
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,4 +1,9 @@
{ config, pkgs, lib, ... }: {
{
config,
pkgs,
lib,
...
}: {
time.timeZone = "Europe/London";
services.xserver.desktopManager.plasma5.enable = lib.mkForce false;
@ -7,6 +12,5 @@
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,9 +1,11 @@
{ config, pkgs, ... }:
let
{
config,
pkgs,
...
}: let
genericBackupPath = "/var/lib/backups/";
containersBackupPath = "${genericBackupPath}/oci-containers/";
in rec {
environment.systemPackages = with pkgs; [restic];
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
'';
timerConfig = {OnCalendar = "hourly";};
environmentFile =
"${config.sops.secrets.restic-backups-b2-environment.path}";
environmentFile = "${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];
services.nginx = {
@ -13,5 +16,4 @@
};
};
};
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,12 +1,15 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
services.nginx = {
virtualHosts = {
"cyplo.dev" = {
forceSSL = true;
enableACME = true;
locations."= /.well-known/matrix/server".extraConfig =
let server = { "m.server" = "cyplo.dev:443"; };
locations."= /.well-known/matrix/server".extraConfig = let
server = {"m.server" = "cyplo.dev:443";};
in ''
add_header Content-Type application/json;
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;
domain = "news.cyplo.dev";
in {
@ -17,12 +22,17 @@ in {
containers.rss = {
autoStart = true;
forwardPorts = [{
forwardPorts = [
{
containerPort = port;
hostPort = port;
}];
config = { config, pkgs, ... }:
let
}
];
config = {
config,
pkgs,
...
}: let
inherit (config.services.tt-rss) pool;
inherit (config.services.tt-rss) root;
in {
@ -38,10 +48,12 @@ in {
enable = true;
virtualHosts = {
"${domain}" = {
listen = [{
listen = [
{
inherit port;
addr = "0.0.0.0";
}];
}
];
root = "${root}/www";
locations."/" = {index = "index.php";};
locations."^~ /feed-icons" = {root = "${root}";};
@ -59,5 +71,4 @@ in {
};
};
};
}

View File

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

View File

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

View File

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

View File

@ -5,10 +5,14 @@
# from vpsAdminOS repository:
#
# https://github.com/vpsfreecz/vpsadminos/blob/staging/os/lib/nixos-container/vpsadminos.nix
{ config, pkgs, lib, ... }:
with lib;
let nameservers = [ "1.1.1.1" "2606:4700:4700::1111" ];
{
config,
pkgs,
lib,
...
}:
with lib; let
nameservers = ["1.1.1.1" "2606:4700:4700::1111"];
in {
networking.nameservers = mkDefault nameservers;
services.resolved = mkDefault {fallbackDns = nameservers;};
@ -16,10 +20,12 @@ in {
systemd.services.systemd-sysctl.enable = false;
systemd.sockets."systemd-journald-audit".enable = false;
systemd.mounts = [{
systemd.mounts = [
{
where = "/sys/kernel/debug";
enable = false;
}];
}
];
systemd.services.systemd-udev-trigger.enable = false;
systemd.services.rpc-gssd.enable = false;
@ -27,7 +33,8 @@ in {
boot.enableContainers = mkDefault true;
boot.loader.initScript.enable = true;
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";
# 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;
agentPort = 9000;
domain = "ci.cyplo.dev";
@ -8,8 +13,7 @@ let
agent = {
dependsOn = ["${serverContainerName}"];
volumes = ["/var/run/podman/podman.sock:/var/run/docker.sock"];
image =
"woodpeckerci/woodpecker-agent@sha256:9a98e25ca6fcf7c437ad355cfce53a696c55b9864399a4d456429a20bfb44545";
image = "woodpeckerci/woodpecker-agent@sha256:9a98e25ca6fcf7c437ad355cfce53a696c55b9864399a4d456429a20bfb44545";
environmentFiles = ["${config.sops.secrets.gitea-env.path}"];
environment = {
WOODPECKER_SERVER = "${serverContainerName}:${toString agentPort}";
@ -19,7 +23,6 @@ let
};
extraOptions = ["--network=woodpecker"];
};
in {
imports = [../nginx.nix];
@ -43,8 +46,7 @@ in {
virtualisation.podman.defaultNetwork.dnsname.enable = true;
virtualisation.oci-containers.containers = {
"${serverContainerName}" = {
image =
"woodpeckerci/woodpecker-server@sha256:e6027e46a782d50790183b7274a2a2ad3a6c6fb9a645e6af81a16419613c28ea";
image = "woodpeckerci/woodpecker-server@sha256:e6027e46a782d50790183b7274a2a2ad3a6c6fb9a645e6af81a16419613c28ea";
volumes = ["woodpecker-server-data:${path}"];
environmentFiles = ["${config.sops.secrets.gitea-env.path}"];
environment = {
@ -62,5 +64,4 @@ in {
woodpecker-agent3 = 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";
imports = [./hardware-configuration.nix ../../boot.nix ../../git];
@ -50,9 +57,7 @@
isNormalUser = true;
description = "cyryl";
extraGroups = ["networkmanager" "wheel"];
packages = with pkgs;
[
packages = with pkgs; [
];
};
@ -76,5 +81,4 @@
};
system = {stateVersion = "22.05";};
}

View File

@ -1,10 +1,13 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
@ -15,26 +18,22 @@
boot.initrd.secrets = {"/crypto_keyfile.bin" = null;};
boot.initrd.luks.devices."luks-e6cb9de6-a571-4462-ba9e-6f8dafdd3d21".device =
"/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".device = "/dev/disk/by-uuid/e6cb9de6-a571-4462-ba9e-6f8dafdd3d21";
boot.initrd.luks.devices."luks-e6cb9de6-a571-4462-ba9e-6f8dafdd3d21".keyFile = "/crypto_keyfile.bin";
fileSystems."/" = {
device = "/dev/disk/by-uuid/d19afedb-d03b-4a85-9ad7-d99d2ed057c5";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-10f9ad25-cff6-4a5c-ae92-4847e1374b2d".device =
"/dev/disk/by-uuid/10f9ad25-cff6-4a5c-ae92-4847e1374b2d";
boot.initrd.luks.devices."luks-10f9ad25-cff6-4a5c-ae92-4847e1374b2d".device = "/dev/disk/by-uuid/10f9ad25-cff6-4a5c-ae92-4847e1374b2d";
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/5A4D-EDA3";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/5c9ab30b-9128-4c31-b392-785e7acbc0d2"; }];
swapDevices = [{device = "/dev/disk/by-uuid/5c9ab30b-9128-4c31-b392-785e7acbc0d2";}];
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"];
services.smartd.enable = true;
@ -6,7 +12,8 @@
networking.networkmanager = {
enable = true;
dispatcherScripts = [{
dispatcherScripts = [
{
source = pkgs.writeText "upHook" ''
enable_disable_wifi ()
{
@ -27,7 +34,8 @@
fi
'';
type = "basic";
}];
}
];
};
hardware.enableRedistributableFirmware = true;
@ -69,8 +77,7 @@
description = "Epson XP-540 via bolty";
name = "epson_xp540_via_bolty";
deviceUri = "ipp://bolty:631/printers/epson_xp540";
model =
"epson-inkjet-printer-escpr/Epson-XP-540_Series-epson-escpr-en.ppd";
model = "epson-inkjet-printer-escpr/Epson-XP-540_Series-epson-escpr-en.ppd";
ppdOptions = {
PageSize = "A4";
Duplex = "DuplexNoTumble";
@ -79,8 +86,7 @@
{
description = "Samsung SCX-4623 Series";
name = "samsung-SCX-4623";
deviceUri =
"usb://Samsung/SCX-4623%20Series?serial=Z2TYBFFZC01007W&interface=1";
deviceUri = "usb://Samsung/SCX-4623%20Series?serial=Z2TYBFFZC01007W&interface=1";
model = "samsung/SCX-4623FW.ppd";
ppdOptions = {
PageSize = "A4";

View File

@ -1,4 +1,8 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
console.keyMap = "pl";
imports = [./tailscale];
services = {
@ -41,7 +45,6 @@
Option "TearFree" "true"
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";
username = "cyryl";
in {
@ -51,8 +57,7 @@ in {
shell = pkgs.zsh;
};
networking.nameservers =
[ "91.239.100.100" "89.233.43.71" "1.1.1.1" "8.8.8.8" ];
networking.nameservers = ["91.239.100.100" "89.233.43.71" "1.1.1.1" "8.8.8.8"];
networking.hosts = {"10.11.99.1" = ["remarkable"];};
@ -73,17 +78,12 @@ in {
defaultFonts.monospace = ["Berkeley Mono"];
};
fonts.fonts = with pkgs;
[
fonts.fonts = with pkgs; [
(runCommand "berkeley-fonts" {} ''
mkdir -vp "$out/share/fonts/opentype"
mkdir -vp "$out/share/fonts/truetype"
${pkgs.unzip}/bin/unzip ${
./fonts.zip
} \*.otf -d $out/share/fonts/opentype
${pkgs.unzip}/bin/unzip ${
./fonts.zip
} \*.ttf -d $out/share/fonts/truetype
${pkgs.unzip}/bin/unzip ${./fonts.zip} \*.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 = ''
Host vpsfree1
HostName vpsfree1
@ -6,7 +10,8 @@
StrictHostKeyChecking=accept-new
'';
nix.buildMachines = [{
nix.buildMachines = [
{
hostName = "bolty";
sshUser = "nix-builder";
sshKey = "/home/cyryl/.ssh/id_ed25519";
@ -15,11 +20,11 @@
speedFactor = 1;
supportedFeatures = ["kvm" "big-parallel"];
mandatoryFeatures = [];
}];
}
];
nix.extraOptions = ''
builders-use-substitutes = 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 {
home-manager.users.cyryl = {
accounts.email.accounts.cyplo = {
@ -70,10 +75,8 @@ in {
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,4 +1,8 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
services = {};
xsession = {enable = false;};

View File

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

View File

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

View File

@ -1,4 +1,8 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
services.xserver = {videoDrivers = ["modesetting"];};
hardware.opengl = {
@ -17,5 +21,4 @@
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];};
}

View File

@ -1,4 +1,9 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
...
}: {
programs.git = {
enable = true;
lfs.enable = true;
@ -25,13 +30,10 @@
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";
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";
vacuum = "!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];
home-manager.users.cyryl = {...}: {imports = [./home.nix];};

View File

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

View File

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

View File

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

View File

@ -1,10 +1,15 @@
{ config, pkgs, discord, inputs, nixpkgs-nixos-stable-and-unfree
, nixpkgs-nixos-unstable-and-unfree, ... }:
let
{
config,
pkgs,
discord,
inputs,
nixpkgs-nixos-stable-and-unfree,
nixpkgs-nixos-unstable-and-unfree,
...
}: let
unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system};
nixpkgs-master = inputs.nixpkgs-master.legacyPackages.${pkgs.system};
in {
security.chromiumSuidSandbox.enable = true;
home-manager.users.cyryl = {...}: {
@ -76,7 +81,9 @@ in {
yubikey-manager-qt
yubikey-personalization
yubikey-personalization-gui
] ++ [ unstable.gnucash unstable.thunderbird ] ++ [
]
++ [unstable.gnucash unstable.thunderbird]
++ [
nixpkgs-nixos-stable-and-unfree.discord
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
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 {
vscodeExtensions = with vscode-extensions;
[
@ -10,17 +13,13 @@
name = "vadimcn.vscode-lldb-1.6.10";
src = fetchurl {
name = "vadimcn.vscode-lldb.zip";
url =
"https://github.com/vadimcn/vscode-lldb/releases/download/v1.6.10/codelldb-${pkgs.system}.vsix";
url = "https://github.com/vadimcn/vscode-lldb/releases/download/v1.6.10/codelldb-${pkgs.system}.vsix";
sha256 = "sha256-QWbpe6ofacjrTCyWSKljwHDWWeHGmKNqi7cpw8Qy5Tw=";
};
buildInputs = with pkgs; [llvm lldb python37 autoPatchelfHook];
})
]
++
vscode-utils.extensionsFromVscodeMarketplace [
++ vscode-utils.extensionsFromVscodeMarketplace [
{
publisher = "vscodevim";
name = "vim";

View File

@ -1,4 +1,10 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
system,
...
}: {
home.packages = with pkgs; [
(pass.withExtensions (ext: [
ext.pass-otp
@ -7,6 +13,7 @@
ext.pass-audit
ext.pass-update
]))
inputs.alejandra.packages.${system}.default
age
android-tools
aria
@ -53,6 +60,5 @@
wget
whois
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 {
home.sessionVariables = {
LC_ALL = "en_GB.UTF-8";
@ -30,5 +35,4 @@ in {
./programs/vim.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.".gdbinit".text = ''
set auto-load python-scripts on

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,8 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
programs.tmux = {
enable = true;
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}";
nil = inputs.nil.packages."${system}".default;
cocPackage = unstablePackages.vimPlugins.coc-nvim;
@ -27,7 +33,6 @@ in {
};
};
};
};
viAlias = true;
vimAlias = true;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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