reformat all files using alejandra

This commit is contained in:
Cyryl Płotnicki 2023-08-13 17:00:41 +01:00
parent d9543e17a4
commit df4d72c06e
74 changed files with 1351 additions and 972 deletions

View file

@ -1,10 +1,24 @@
{ {
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, nixpkgs-rust-analyzer flake-utils,
, endless-sky, disko }@inputs: flake-compat,
let home-manager,
nixpkgs-nixos-unstable,
nixpkgs-master,
nixpkgs-stable,
darwin,
nixos-hardware,
nur,
sops,
nil,
helix,
alejandra,
nixpkgs-rust-analyzer,
endless-sky,
disko,
} @ inputs: let
mkServer = pkgs: system: hostname: mkServer = pkgs: system: hostname:
pkgs.lib.nixosSystem { pkgs.lib.nixosSystem {
inherit system; inherit system;
@ -19,7 +33,8 @@
mkRaspi = pkgs: hostname: mkRaspi = pkgs: hostname:
pkgs.lib.nixosSystem { pkgs.lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
modules = [ (./. + "/nixos/boxes/${hostname}") modules = [
(./. + "/nixos/boxes/${hostname}")
sops.nixosModules.sops sops.nixosModules.sops
]; ];
specialArgs = {inherit inputs;}; specialArgs = {inherit inputs;};
@ -37,8 +52,7 @@
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;
}; };
@ -70,8 +84,7 @@
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;
}; };
@ -89,9 +102,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; [
inputs.alejandra.defaultPackage.${system} inputs.alejandra.defaultPackage.${system}
cacert cacert
@ -156,8 +170,7 @@
(import (import
"${inputs.nixpkgs-stable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix") "${inputs.nixpkgs-stable}/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

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}: {
fileSystems."/".options = ["noatime" "nodiratime" "discard"]; fileSystems."/".options = ["noatime" "nodiratime" "discard"];
hardware.enableRedistributableFirmware = lib.mkDefault true; hardware.enableRedistributableFirmware = lib.mkDefault true;

View file

@ -1,8 +1,11 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
boot = { boot = {
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
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,4 +1,10 @@
{ config, pkgs, inputs, lib, ... }: { {
config,
pkgs,
inputs,
lib,
...
}: {
imports = [ imports = [
../cli.nix ../cli.nix
./bolty-boot.nix ./bolty-boot.nix

View file

@ -1,9 +1,14 @@
{ config, pkgs, inputs, lib, system, ... }: {
let config,
pkgs,
inputs,
lib,
system,
...
}: let
unstable = inputs.nixpkgs-nixos-unstable; unstable = inputs.nixpkgs-nixos-unstable;
package = unstable.legacyPackages."${system}".gitea-actions-runner; package = unstable.legacyPackages."${system}".gitea-actions-runner;
in in {
{
sops.secrets."gitea-runner-token" = { sops.secrets."gitea-runner-token" = {
sopsFile = ./gitea-runner-token.sops; sopsFile = ./gitea-runner-token.sops;
format = "binary"; format = "binary";

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, lib, ... }: {
let config,
pkgs,
inputs,
lib,
...
}: let
fqdn = "bolty.raptor-carp.ts.net"; fqdn = "bolty.raptor-carp.ts.net";
port = 30001; port = 30001;
path = "/data/grafana"; path = "/data/grafana";

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, lib, ... }: {
let config,
pkgs,
inputs,
lib,
...
}: let
port = 8123; port = 8123;
path = "/data/nginx"; path = "/data/nginx";
certPath = "${path}/cert.pem"; certPath = "${path}/cert.pem";
@ -19,7 +24,8 @@ in {
allow_anonymous = true; allow_anonymous = true;
}; };
acl = ["topic readwrite #"]; acl = ["topic readwrite #"];
}]; }
];
}; };
services.nginx = { services.nginx = {
@ -58,5 +64,4 @@ in {
]; ];
wants = ["tailscale-cert.service"]; wants = ["tailscale-cert.service"];
}; };
} }

View file

@ -1,2 +1,8 @@
{ config, pkgs, inputs, lib, ... }: { {
config,
pkgs,
inputs,
lib,
...
}: {
} }

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, lib, ... }: {
let config,
pkgs,
inputs,
lib,
...
}: let
fqdn = "bolty.raptor-carp.ts.net"; fqdn = "bolty.raptor-carp.ts.net";
port = 8086; port = 8086;
path = "/data/influxdb"; path = "/data/influxdb";
@ -48,5 +53,4 @@ in {
tls-key = "${keyPath}"; tls-key = "${keyPath}";
}; };
}; };
} }

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, lib, ... }: { {
config,
pkgs,
inputs,
lib,
...
}: {
networking.firewall.allowedTCPPorts = [2049]; networking.firewall.allowedTCPPorts = [2049];
services.nfs.server.enable = true; services.nfs.server.enable = true;
services.nfs.server.exports = '' services.nfs.server.exports = ''
@ -7,5 +13,4 @@
/data/nfs/home_assistant/media 10.0.0.244/24(rw,sync,insecure,no_subtree_check) 100.81.212.51(rw,sync,insecure,no_subtree_check) /data/nfs/home_assistant/media 10.0.0.244/24(rw,sync,insecure,no_subtree_check) 100.81.212.51(rw,sync,insecure,no_subtree_check)
/data/nfs/home_assistant/backups 10.0.0.244/24(rw,sync,insecure,no_subtree_check) 100.81.212.51(rw,sync,insecure,no_subtree_check) /data/nfs/home_assistant/backups 10.0.0.244/24(rw,sync,insecure,no_subtree_check) 100.81.212.51(rw,sync,insecure,no_subtree_check)
''; '';
} }

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, lib, ... }: { {
config,
pkgs,
inputs,
lib,
...
}: {
networking.hostName = "bolty"; networking.hostName = "bolty";
systemd.network.enable = true; systemd.network.enable = true;
networking.networkmanager.enable = false; networking.networkmanager.enable = false;

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
nix.settings.trusted-users = ["nix-ssh"]; nix.settings.trusted-users = ["nix-ssh"];
nix.sshServe = { nix.sshServe = {
enable = true; enable = true;

View file

@ -1,4 +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];
@ -15,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;

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, lib, ... }: {
let config,
pkgs,
inputs,
lib,
...
}: let
fqdn = "bolty.raptor-carp.ts.net"; fqdn = "bolty.raptor-carp.ts.net";
basePath = "/var/lib/tailscale-certs"; basePath = "/var/lib/tailscale-certs";
keyPath = "${basePath}/key.pem"; keyPath = "${basePath}/key.pem";

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, lib, ... }: { {
config,
pkgs,
inputs,
lib,
...
}: {
boot.kernelModules = ["kvm_amd"]; boot.kernelModules = ["kvm_amd"];
virtualisation = { virtualisation = {
libvirtd = { libvirtd = {
@ -17,5 +23,4 @@
networking.firewall.allowedTCPPorts = [5900]; networking.firewall.allowedTCPPorts = [5900];
security.allowUserNamespaces = true; security.allowUserNamespaces = 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 {

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,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 = [
@ -72,14 +79,10 @@
]; ];
home-manager.users.cyryl = {...}: { home-manager.users.cyryl = {...}: {
imports = imports = [../../home-manager/programs/alacritty.nix ../../gui/vscode.nix];
[ ../../home-manager/programs/alacritty.nix ../../gui/vscode.nix ]; home.packages = with inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux";
home.packages = [bisq-desktop]
with inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux"; ++ (with pkgs; [lutris])
[ bisq-desktop ] ++ ++ (with inputs.endless-sky.legacyPackages."x86_64-linux"; [endless-sky]);
(with pkgs; [ lutris ])
++ (with inputs.endless-sky.legacyPackages."x86_64-linux";
[ endless-sky ]);
}; };
} }

View file

@ -1,6 +1,11 @@
{ config, pkgs, inputs, lib, ... }: { {
imports = config,
[ inputs.nixos-hardware.nixosModules.raspberry-pi-4 ../../tailscale ]; pkgs,
inputs,
lib,
...
}: {
imports = [inputs.nixos-hardware.nixosModules.raspberry-pi-4 ../../tailscale];
networking = { networking = {
hostName = "homescreen"; hostName = "homescreen";

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, lib, ... }: { {
config,
pkgs,
inputs,
lib,
...
}: {
imports = [ imports = [
"${inputs.nixpkgs-nixos-unstable}/nixos/modules/services/misc/atuin.nix" "${inputs.nixpkgs-nixos-unstable}/nixos/modules/services/misc/atuin.nix"
../nginx.nix ../nginx.nix

View file

@ -1,8 +1,10 @@
{ config, pkgs, ... }:
let
path = "/var/www/blog/";
in
{ {
config,
pkgs,
...
}: let
path = "/var/www/blog/";
in {
imports = [../nginx.nix]; imports = [../nginx.nix];
services.nginx = { services.nginx = {
virtualHosts = { virtualHosts = {

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, lib, ... }: { {
config,
pkgs,
inputs,
lib,
...
}: {
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.grub = { boot.loader.grub = {
@ -6,5 +12,4 @@
efiSupport = true; efiSupport = true;
efiInstallAsRemovable = true; efiInstallAsRemovable = true;
}; };
} }

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, lib, ... }: { {
config,
pkgs,
inputs,
lib,
...
}: {
imports = [ imports = [
"${inputs.nixpkgs-stable}/nixos/modules/profiles/qemu-guest.nix" "${inputs.nixpkgs-stable}/nixos/modules/profiles/qemu-guest.nix"
../cli.nix ../cli.nix
@ -10,7 +16,6 @@
]; ];
networking.hostName = "mb1"; networking.hostName = "mb1";
zramSwap = { zramSwap = {
enable = true; enable = true;
algorithm = "zstd"; algorithm = "zstd";
@ -18,5 +23,4 @@
}; };
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";
} }

View file

@ -1,8 +1,11 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
imports = [../nginx.nix]; imports = [../nginx.nix];
virtualisation.oci-containers.containers.searxng = { virtualisation.oci-containers.containers.searxng = {
image = image = "searxng/searxng@sha256:650c0b183a129e10c2493126bb27c3541ffebbead6e0255fab91831457211b06";
"searxng/searxng@sha256:650c0b183a129e10c2493126bb27c3541ffebbead6e0255fab91831457211b06";
volumes = []; volumes = [];
environment = {BASE_URL = "https://search.cyplo.dev";}; environment = {BASE_URL = "https://search.cyplo.dev";};
ports = ["9999:8080"]; ports = ["9999:8080"];
@ -28,5 +31,4 @@
}; };
}; };
}; };
} }

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib,... }: { {
config,
pkgs,
lib,
...
}: {
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;
@ -17,8 +22,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,5 +1,8 @@
{ 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 {
@ -32,8 +35,7 @@ in rec {
systemctl start container@mastodon.service systemctl start container@mastodon.service
''; '';
timerConfig = {OnCalendar = "daily";}; timerConfig = {OnCalendar = "daily";};
environmentFile = environmentFile = "${config.sops.secrets.restic-backups-b2-environment.path}";
"${config.sops.secrets.restic-backups-b2-environment.path}";
}; };
}; };

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, lib, ... }: { {
config,
pkgs,
inputs,
lib,
...
}: {
imports = [../nginx.nix]; imports = [../nginx.nix];
services.nginx = { services.nginx = {
@ -15,8 +21,7 @@
}; };
}; };
virtualisation.oci-containers.containers.cryptpad = { virtualisation.oci-containers.containers.cryptpad = {
image = image = "promasu/cryptpad@sha256:29c61f69e41173188c0592e72f2273cf23a83f48e7d143337e2cd7fea441ed87";
"promasu/cryptpad@sha256:29c61f69e41173188c0592e72f2273cf23a83f48e7d143337e2cd7fea441ed87";
volumes = [ volumes = [
"${./cryptpad.config.js}:/cryptpad/config/config.js" "${./cryptpad.config.js}:/cryptpad/config/config.js"

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,9 +69,13 @@ 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-11.306.zip; url = "file:///" + ./FoundryVTT-11.306.zip;
@ -26,17 +31,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 = "23.05"; system.stateVersion = "23.05";
systemd.services."foundryvtt" = { systemd.services."foundryvtt" = {
requires = ["network-online.target"]; requires = ["network-online.target"];

View file

@ -1,5 +1,11 @@
{ config, pkgs, inputs, lib, system, ... }: {
let config,
pkgs,
inputs,
lib,
system,
...
}: let
unstable = inputs.nixpkgs-nixos-unstable; unstable = inputs.nixpkgs-nixos-unstable;
package = unstable.legacyPackages."${system}".gitea; package = unstable.legacyPackages."${system}".gitea;
httpPort = 8083; httpPort = 8083;
@ -76,15 +82,21 @@ in {
isReadOnly = true; isReadOnly = true;
}; };
}; };
config = { config, pkgs, lib, ... }: { config = {
config,
pkgs,
lib,
...
}: {
system.stateVersion = "23.05"; system.stateVersion = "23.05";
users = users // { users =
users
// {
mutableUsers = false; mutableUsers = false;
allowNoPasswordLogin = true; allowNoPasswordLogin = true;
}; };
disabledModules = ["services/misc/gitea.nix"]; disabledModules = ["services/misc/gitea.nix"];
imports = imports = ["${unstable}/nixos/modules/services/misc/gitea.nix"];
[ "${unstable}/nixos/modules/services/misc/gitea.nix" ];
services.gitea = { services.gitea = {
enable = true; enable = true;
inherit package; inherit package;
@ -101,8 +113,7 @@ in {
"markup.mermaid" = { "markup.mermaid" = {
ENABLED = true; ENABLED = true;
FILE_EXTENSIONS = ".md"; FILE_EXTENSIONS = ".md";
RENDER_COMMAND = RENDER_COMMAND = "${pkgs.asciidoc-full}/bin/asciidoc --out-file=- -";
"${pkgs.asciidoc-full}/bin/asciidoc --out-file=- -";
IS_INPUT_FILE = false; IS_INPUT_FILE = false;
}; };
server = { server = {

View file

@ -1,5 +1,10 @@
{ config, pkgs, inputs, lib, ... }: {
let config,
pkgs,
inputs,
lib,
...
}: let
newestPackages = inputs.nixpkgs-master.legacyPackages.${pkgs.system}; newestPackages = inputs.nixpkgs-master.legacyPackages.${pkgs.system};
package = newestPackages.mastodon; package = newestPackages.mastodon;
domain = "peninsula.industries"; domain = "peninsula.industries";
@ -58,14 +63,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;
@ -110,10 +119,17 @@ in {
isReadOnly = true; isReadOnly = true;
}; };
}; };
config = { config, pkgs, lib, ... }: { config = {
config,
pkgs,
lib,
...
}: {
system.stateVersion = "23.05"; system.stateVersion = "23.05";
services.postgresql.port = postgresPort; services.postgresql.port = postgresPort;
users = users // { users =
users
// {
mutableUsers = false; mutableUsers = false;
allowNoPasswordLogin = true; allowNoPasswordLogin = true;
}; };

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";
postgresPort = 5435; postgresPort = 5435;
@ -18,12 +23,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 {
@ -41,10 +51,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}";};

View file

@ -1,7 +1,19 @@
{ 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 ../../gui imports = [
./hardware-configuration.nix
../../boot.nix
../../git
../../gui
../../vim ../../vim
]; ];
@ -73,5 +85,4 @@
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229 # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false; systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false; systemd.services."autovt@tty1".enable = false;
} }

View file

@ -1,8 +1,13 @@
{ config, lib, pkgs, modulesPath, ... }: { {
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = []; imports = [];
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
[ "xhci_pci" "ahci" "usbhid" "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 = [];
@ -19,8 +24,7 @@
options = ["subvol=@"]; options = ["subvol=@"];
}; };
boot.initrd.luks.devices."luks-99498047-118a-484a-8c2a-987ca68d4943".device = boot.initrd.luks.devices."luks-99498047-118a-484a-8c2a-987ca68d4943".device = "/dev/disk/by-uuid/99498047-118a-484a-8c2a-987ca68d4943";
"/dev/disk/by-uuid/99498047-118a-484a-8c2a-987ca68d4943";
fileSystems."/boot/efi" = { fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/F179-A4EA"; device = "/dev/disk/by-uuid/F179-A4EA";

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;
@ -73,8 +81,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";
@ -83,8 +90,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,5 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
console.keyMap = "pl2"; console.keyMap = "pl2";
imports = [./tailscale]; imports = [./tailscale];
services = { services = {

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 = "23.05"; stateVersion = "23.05";
username = "cyryl"; username = "cyryl";
in { in {
@ -54,8 +60,7 @@ in {
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
networking.nameservers = networking.nameservers = ["9.9.9.9" "2620:fe::fe" "149.112.112.112" "2620:fe::9"];
[ "9.9.9.9" "2620:fe::fe" "149.112.112.112" "2620:fe::9" ];
networking.hosts = {"10.11.99.1" = ["remarkable"];}; networking.hosts = {"10.11.99.1" = ["remarkable"];};

View file

@ -1,5 +1,10 @@
{ config, pkgs, ... }: { {
nix.buildMachines = [{ config,
pkgs,
...
}: {
nix.buildMachines = [
{
hostName = "bolty"; hostName = "bolty";
sshUser = "nix-builder"; sshUser = "nix-builder";
sshKey = "/home/cyryl/.ssh/id_ed25519"; sshKey = "/home/cyryl/.ssh/id_ed25519";
@ -8,14 +13,13 @@
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;
nix.settings.substituters = nix.settings.substituters = ["https://cache.nixos.org/" "ssh://nix-ssh@bolty.raptor-carp.ts.net"];
[ "https://cache.nixos.org/" "ssh://nix-ssh@bolty.raptor-carp.ts.net" ]; nix.settings.trusted-public-keys = ["cyplodev-store-key:a/+PEufePs7giWqYyRqy+TgUKLMbY+RQuJQu2aUjdl8="];
nix.settings.trusted-public-keys =
[ "cyplodev-store-key:a/+PEufePs7giWqYyRqy+TgUKLMbY+RQuJQu2aUjdl8=" ];
} }

View file

@ -1,9 +1,14 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
services = {}; services = {};
xsession = {enable = false;}; xsession = {enable = false;};
home.packages = (with pkgs; [ gnome-usage gnome3.gnome-tweaks ]) home.packages =
(with pkgs; [gnome-usage gnome3.gnome-tweaks])
++ (with pkgs.gnomeExtensions; [ ++ (with pkgs.gnomeExtensions; [
caffeine caffeine
clipboard-indicator clipboard-indicator

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;

View file

@ -1,6 +1,12 @@
{ 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 {
@ -81,7 +87,9 @@ in {
yubikey-manager-qt yubikey-manager-qt
yubikey-personalization yubikey-personalization
yubikey-personalization-gui yubikey-personalization-gui
] ++ (with unstable; [ glaxnimate gnucash kicad thunderbird ]) ++ [ ]
++ (with unstable; [glaxnimate gnucash kicad 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,6 +1,10 @@
{ config, pkgs, inputs, ... }: { {
home.packages = with pkgs; config,
[ pkgs,
inputs,
...
}: {
home.packages = with pkgs; [
(vscode-with-extensions.override { (vscode-with-extensions.override {
vscodeExtensions = with vscode-extensions; vscodeExtensions = with vscode-extensions;
[ [
@ -14,13 +18,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 python38 autoPatchelfHook]; buildInputs = with pkgs; [llvm lldb python38 autoPatchelfHook];
}) })
] ++ vscode-utils.extensionsFromVscodeMarketplace [ ]
++ vscode-utils.extensionsFromVscodeMarketplace [
{ {
publisher = "bierner"; publisher = "bierner";
name = "markdown-mermaid"; name = "markdown-mermaid";

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, system, ... }: { {
config,
pkgs,
inputs,
system,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
(pass.withExtensions (ext: [ (pass.withExtensions (ext: [
ext.pass-otp ext.pass-otp

View file

@ -1,5 +1,11 @@
{ config, pkgs, inputs, lib, ... }: {
let username = "cyryl"; config,
pkgs,
inputs,
lib,
...
}: let
username = "cyryl";
in { in {
home.sessionVariables = { home.sessionVariables = {
LC_ALL = "en_GB.UTF-8"; LC_ALL = "en_GB.UTF-8";

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,4 +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

@ -9,10 +9,18 @@
alejandra = lib.getExe inputs.alejandra.packages.${system}.default; alejandra = lib.getExe inputs.alejandra.packages.${system}.default;
nil = lib.getExe inputs.nil.packages.${system}.default; nil = lib.getExe inputs.nil.packages.${system}.default;
in { in {
home.sessionVariables = {
home.sessionVariables = { EDITOR = "vim"; VISUAL="vim"; }; EDITOR = "vim";
programs.zsh.sessionVariables = { EDITOR = "vim"; VISUAL="vim"; }; VISUAL = "vim";
systemd.user.sessionVariables = { EDITOR = "vim"; VISUAL="vim"; }; };
programs.zsh.sessionVariables = {
EDITOR = "vim";
VISUAL = "vim";
};
systemd.user.sessionVariables = {
EDITOR = "vim";
VISUAL = "vim";
};
programs.helix = { programs.helix = {
enable = true; enable = true;

View file

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

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
programs.ssh.extraConfig = '' programs.ssh.extraConfig = ''
Host vpsfree1 vpsfree1.cyplo.dev vpsfree1.raptor-carp.ts.net Host vpsfree1 vpsfree1.cyplo.dev vpsfree1.raptor-carp.ts.net
HostName vpsfree1 HostName vpsfree1

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,
...
}: {
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,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
programs.i3status = { programs.i3status = {
enable = true; enable = true;
enableDefault = false; enableDefault = false;

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,7 +45,8 @@ in {
}; };
workspaceLayout = "tabbed"; workspaceLayout = "tabbed";
bars = [{ bars = [
{
statusCommand = "${pkgs.i3status}/bin/i3status"; statusCommand = "${pkgs.i3status}/bin/i3status";
position = "top"; position = "top";
colors.background = "#001e26"; colors.background = "#001e26";
@ -53,7 +57,8 @@ in {
}; };
trayOutput = "primary"; trayOutput = "primary";
}]; }
];
modifier = mod; modifier = mod;
keybindings = { keybindings = {
@ -64,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 ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
"exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"; "XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioLowerVolume" = "XF86AudioMute" = "exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
"exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%"; "XF86AudioMicMute" = "exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86AudioMute" =
"exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" =
"exec --no-startup-id ${pkgs.pulseaudio}/bin/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";

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
programs.rofi = { programs.rofi = {
enable = true; enable = true;
font = "BerkeleyMono Nerd Font 16"; font = "BerkeleyMono Nerd Font 16";

View file

@ -1,14 +1,15 @@
{ config, pkgs, inputs, ... }:
{ {
config,
pkgs,
inputs,
...
}: {
home-manager.users.cyryl = {...}: { home-manager.users.cyryl = {...}: {
imports = []; imports = [];
home.packages = home.packages = with inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux";
with inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux";
with gnuradio3_8Packages; with gnuradio3_8Packages;
[ gnuradio3_8 osmosdr gqrx audacity rtl-sdr inspectrum ] ++ [gnuradio3_8 osmosdr gqrx audacity rtl-sdr inspectrum]
++ (with pkgs; []);
(with pkgs; [ ]);
}; };
users.extraUsers.cyryl.extraGroups = ["plugdev"]; users.extraUsers.cyryl.extraGroups = ["plugdev"];

View file

@ -1,4 +1,8 @@
{ config, pkgs, ... }: { {
config,
pkgs,
...
}: {
imports = [./server-security.nix ./tailscale]; imports = [./server-security.nix ./tailscale];
networking.nameservers = [ networking.nameservers = [
"100.100.100.100" "100.100.100.100"

View file

@ -1,5 +1,8 @@
{ config, pkgs, ... }: {
let config,
pkgs,
...
}: let
authorizedKeys = [ authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEo4R+6J3h6Ix3xWpOMdU7Es1/YxFchHw0c+kcCOJxFb cyryl@foureighty" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEo4R+6J3h6Ix3xWpOMdU7Es1/YxFchHw0c+kcCOJxFb cyryl@foureighty"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDN/2C59i+ucvSa9FLCHlVPJp0zebLOcw0+hnBYwy0cY cyryl@skinnyv" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDN/2C59i+ucvSa9FLCHlVPJp0zebLOcw0+hnBYwy0cY cyryl@skinnyv"

View file

@ -1,5 +1,9 @@
{ config, pkgs, ... }: {
let mod = "Mod4"; config,
pkgs,
...
}: let
mod = "Mod4";
in { in {
services.dbus.packages = with pkgs; []; services.dbus.packages = with pkgs; [];
programs.dconf.enable = true; programs.dconf.enable = true;
@ -73,14 +77,15 @@ in {
titlebar = false; titlebar = false;
border = 0; border = 0;
}; };
bars = [{ bars = [
{
position = "top"; position = "top";
command = "${pkgs.waybar}/bin/waybar"; command = "${pkgs.waybar}/bin/waybar";
}]; }
];
startup = [ startup = [
{ {
command = command = "${pkgs.wl-clipboard}/bin/wl-paste -t text --watch ${pkgs.clipman}/bin/clipman store";
"${pkgs.wl-clipboard}/bin/wl-paste -t text --watch ${pkgs.clipman}/bin/clipman store";
} }
{command = "${pkgs.clipman}/bin/clipman restore";} {command = "${pkgs.clipman}/bin/clipman restore";}
{ {

View file

@ -1,5 +1,9 @@
{ config, pkgs, ... }: {
let mod = "Mod4"; config,
pkgs,
...
}: let
mod = "Mod4";
in { in {
wayland.windowManager.sway.config.keybindings = { wayland.windowManager.sway.config.keybindings = {
"${mod}+Shift+e" = "exit"; "${mod}+Shift+e" = "exit";
@ -7,19 +11,13 @@ in {
"${mod}+Shift+l" = "exec swaylock -c 657b83"; "${mod}+Shift+l" = "exec swaylock -c 657b83";
"${mod}+Return" = "exec ${pkgs.alacritty}/bin/alacritty"; "${mod}+Return" = "exec ${pkgs.alacritty}/bin/alacritty";
"XF86AudioRaiseVolume" = "XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
"exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"; "XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioLowerVolume" = "XF86AudioMute" = "exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
"exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%"; "XF86AudioMicMute" = "exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86AudioMute" =
"exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" =
"exec --no-startup-id ${pkgs.pulseaudio}/bin/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" = "exec ${pkgs.gnome3.gnome-screenshot}/bin/gnome-screenshot -i"; "Print" = "exec ${pkgs.gnome3.gnome-screenshot}/bin/gnome-screenshot -i";

View file

@ -1,5 +1,9 @@
{ config, pkgs, inputs, ... }: {
let config,
pkgs,
inputs,
...
}: let
workstations = ["skinnyv" "foryog" "thinky"]; workstations = ["skinnyv" "foryog" "thinky"];
workstations_plus_phone = ["OnePlus9"] ++ workstations; workstations_plus_phone = ["OnePlus9"] ++ workstations;
in { in {

View file

@ -1,7 +1,13 @@
{ config, pkgs, inputs, ... }: {
let config,
inherit (inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux") pkgs,
tailscale; inputs,
...
}: let
inherit
(inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux")
tailscale
;
in { in {
environment.systemPackages = [tailscale]; environment.systemPackages = [tailscale];
services.tailscale = { services.tailscale = {

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}: {
programs.zsh.enable = true; programs.zsh.enable = true;
home-manager.users.cyryl = {...}: {imports = [./home.nix];}; home-manager.users.cyryl = {...}: {imports = [./home.nix];};

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;
@ -7,9 +13,18 @@ let
in { in {
home.file.".vimrc".source = ../../.vimrc; home.file.".vimrc".source = ../../.vimrc;
home.packages = with pkgs; [ripgrep]; home.packages = with pkgs; [ripgrep];
home.sessionVariables = { EDITOR = "vim"; VISUAL="vim"; }; home.sessionVariables = {
programs.zsh.sessionVariables = { EDITOR = "vim"; VISUAL="vim"; }; EDITOR = "vim";
systemd.user.sessionVariables = { EDITOR = "vim"; VISUAL="vim"; }; VISUAL = "vim";
};
programs.zsh.sessionVariables = {
EDITOR = "vim";
VISUAL = "vim";
};
systemd.user.sessionVariables = {
EDITOR = "vim";
VISUAL = "vim";
};
programs.neovim = { programs.neovim = {
enable = true; enable = true;

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: { {
config,
pkgs,
lib,
...
}: {
programs.zsh.enable = true; programs.zsh.enable = true;
home-manager.users.cyryl = {...}: {imports = [./home.nix];}; home-manager.users.cyryl = {...}: {imports = [./home.nix];};
} }

View file

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