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

View file

@ -34,7 +34,8 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.cyryl = { 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.inputs = inputs;
}; };
} }
@ -57,9 +58,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 = [ ./nixos/home-manager ]; };
imports = [ ./nixos/home-manager ];
};
} }
]; ];

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }: {
{
networking.firewall.enable = true; networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [ 631 6566 ]; networking.firewall.allowedTCPPorts = [ 631 6566 ];
@ -21,7 +20,8 @@
description = "Epson XP-540"; description = "Epson XP-540";
location = "connected to bolty"; location = "connected to bolty";
name = "epson_xp540"; 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"; model = "raw";
ppdOptions = { PageSize = "A4"; }; ppdOptions = { PageSize = "A4"; };
}]; }];

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,11 +1,11 @@
{ 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 = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; availableKernelModules =
[ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
}; };
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,11 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = [ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
(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.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
@ -16,7 +15,8 @@
options = [ "compress=zstd" ]; 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" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0A6A-AAFC"; device = "/dev/disk/by-uuid/0A6A-AAFC";

View file

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

View file

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

View file

@ -1,11 +1,11 @@
{ 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 = [ "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; loader.grub.enable = true;
@ -18,7 +18,8 @@
fsType = "btrfs"; 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" = { 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,8 +1,8 @@
{ config, pkgs, inputs, lib, ... }: { config, pkgs, inputs, lib, ... }:
let let
tailscale = inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale; tailscale =
in inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
{ in {
systemd.services.tailscale-autoconnect = { systemd.services.tailscale-autoconnect = {
description = "Automatic connection to Tailscale"; description = "Automatic connection to Tailscale";

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,8 +1,6 @@
{ config, pkgs, discord, inputs, nixpkgs-nixos-unstable-and-unfree, ... }: { config, pkgs, discord, inputs, nixpkgs-nixos-unstable-and-unfree, ... }:
let let unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system};
unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system}; in {
in
{
programs.firejail.enable = true; programs.firejail.enable = true;
programs.firejail.wrappedBinaries = { programs.firejail.wrappedBinaries = {
firefox = { firefox = {
@ -32,63 +30,63 @@ in
style.package = pkgs.adwaita-qt; style.package = pkgs.adwaita-qt;
}; };
imports = [ imports = [ ./firejail.nix ];
./firejail.nix
];
home.packages = with pkgs; with pkgs.gnome3; with pkgs.python38Packages; [ home.packages = with pkgs;
anarchism with pkgs.gnome3;
binwalk-full with pkgs.python38Packages;
brave [
cheese anarchism
digikam binwalk-full
electrum brave
element-desktop cheese
eog digikam
evince electrum
fontconfig element-desktop
freecad eog
ghidra-bin evince
gimp fontconfig
glxinfo freecad
gnome-screenshot ghidra-bin
gsettings-desktop-schemas gimp
inkscape glxinfo
libreoffice gnome-screenshot
mindforger gsettings-desktop-schemas
modem-manager-gui inkscape
nautilus libreoffice
nyxt mindforger
obs-studio modem-manager-gui
openscad nautilus
passff-host nyxt
pdfarranger obs-studio
qcad openscad
qemu passff-host
remmina pdfarranger
shotwell qcad
signal-desktop qemu
simple-scan remmina
ssb-patchwork shotwell
tlaplusToolbox signal-desktop
tlaps simple-scan
vlc ssb-patchwork
wineFull tlaplusToolbox
wireshark tlaps
wsjtx vlc
xclip wineFull
xidlehook wireshark
yubico-piv-tool wsjtx
yubikey-manager-qt xclip
yubikey-personalization xidlehook
yubikey-personalization-gui yubico-piv-tool
] ++ yubikey-manager-qt
[ yubikey-personalization
nixpkgs-nixos-unstable-and-unfree.discord yubikey-personalization-gui
nixpkgs-nixos-unstable-and-unfree.hopper ] ++ [
nixpkgs-nixos-unstable-and-unfree.slack nixpkgs-nixos-unstable-and-unfree.discord
nixpkgs-nixos-unstable-and-unfree.spotify nixpkgs-nixos-unstable-and-unfree.hopper
nixpkgs-nixos-unstable-and-unfree.zoom-us nixpkgs-nixos-unstable-and-unfree.slack
]; nixpkgs-nixos-unstable-and-unfree.spotify
nixpkgs-nixos-unstable-and-unfree.zoom-us
];
}; };
} }

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }: {
{
home.file.".config/firejail/firefox.profile".text = '' home.file.".config/firejail/firefox.profile".text = ''
include ${pkgs.firejail}/etc/firejail/firefox.profile include ${pkgs.firejail}/etc/firejail/firefox.profile

View file

@ -1,153 +1,153 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{ home.packages = with pkgs;
home.packages = with pkgs; [ [
(vscode-with-extensions.override { (vscode-with-extensions.override {
vscodeExtensions = with vscode-extensions; [ vscodeExtensions = with vscode-extensions;
ms-python.python [
( ms-python.python
vscode-utils.buildVscodeExtension { (vscode-utils.buildVscodeExtension {
vscodeExtUniqueId = "vadimcn.vscode-lldb"; vscodeExtUniqueId = "vadimcn.vscode-lldb";
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 = "https://github.com/vadimcn/vscode-lldb/releases/download/v1.6.10/codelldb-${pkgs.system}.vsix"; url =
sha256 = "sha256-QWbpe6ofacjrTCyWSKljwHDWWeHGmKNqi7cpw8Qy5Tw="; "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 ]; };
} buildInputs = with pkgs; [ llvm lldb python37 autoPatchelfHook ];
) })
] ]
++ ++
vscode-utils.extensionsFromVscodeMarketplace [ vscode-utils.extensionsFromVscodeMarketplace [
{ {
publisher = "vscodevim"; publisher = "vscodevim";
name = "vim"; name = "vim";
version = "1.21.7"; version = "1.21.7";
sha256 = "sha256-nCcDafZ2CUhTjVha+6Mjxoil61xMGboO5lajc7dGEJg="; sha256 = "sha256-nCcDafZ2CUhTjVha+6Mjxoil61xMGboO5lajc7dGEJg=";
} }
{ {
publisher = "bbenoist"; publisher = "bbenoist";
name = "nix"; name = "nix";
version = "1.0.1"; version = "1.0.1";
sha256 = "sha256-qwxqOGublQeVP2qrLF94ndX/Be9oZOn+ZMCFX1yyoH0="; sha256 = "sha256-qwxqOGublQeVP2qrLF94ndX/Be9oZOn+ZMCFX1yyoH0=";
} }
{ {
publisher = "matklad"; publisher = "matklad";
name = "rust-analyzer"; name = "rust-analyzer";
version = "0.3.937"; version = "0.3.937";
sha256 = "sha256-aGBFKnntycpgNFdWwxFPVtQ2ryUvFCx7oet9uILiUTY="; sha256 = "sha256-aGBFKnntycpgNFdWwxFPVtQ2ryUvFCx7oet9uILiUTY=";
} }
{ {
publisher = "hashicorp"; publisher = "hashicorp";
name = "terraform"; name = "terraform";
version = "2.19.0"; version = "2.19.0";
sha256 = "sha256-k/fcEJuELz0xkwivSrP6Nxtz861BLq1wR2ZDMXVrvkY="; sha256 = "sha256-k/fcEJuELz0xkwivSrP6Nxtz861BLq1wR2ZDMXVrvkY=";
} }
{ {
publisher = "be5invis"; publisher = "be5invis";
name = "toml"; name = "toml";
version = "0.6.0"; version = "0.6.0";
sha256 = "sha256-yk7buEyQIw6aiUizAm+sgalWxUibIuP9crhyBaOjC2E="; sha256 = "sha256-yk7buEyQIw6aiUizAm+sgalWxUibIuP9crhyBaOjC2E=";
} }
{ {
publisher = "ms-vscode"; publisher = "ms-vscode";
name = "cpptools-extension-pack"; name = "cpptools-extension-pack";
version = "1.1.0"; version = "1.1.0";
sha256 = "sha256-XKHBwoRXNHIpy7gDR9/xEFdEdB4S0B9L9Jbk53f/Vbc="; sha256 = "sha256-XKHBwoRXNHIpy7gDR9/xEFdEdB4S0B9L9Jbk53f/Vbc=";
} }
{ {
publisher = "tiehuis"; publisher = "tiehuis";
name = "zig"; name = "zig";
version = "0.2.5"; version = "0.2.5";
sha256 = "sha256-P8Sep0OtdchTfnudxFNvIK+SW++TyibGVI9zd+B5tu4="; sha256 = "sha256-P8Sep0OtdchTfnudxFNvIK+SW++TyibGVI9zd+B5tu4=";
} }
{ {
publisher = "sjhuangx"; publisher = "sjhuangx";
name = "vscode-scheme"; name = "vscode-scheme";
version = "0.4.0"; version = "0.4.0";
sha256 = "07vjfymvfv98s5r5a4b5iqhgfz1wpgq2l8h3wlq1bnhhhvmq5pq4"; sha256 = "07vjfymvfv98s5r5a4b5iqhgfz1wpgq2l8h3wlq1bnhhhvmq5pq4";
} }
{ {
publisher = "shaunlebron"; publisher = "shaunlebron";
name = "vscode-parinfer"; name = "vscode-parinfer";
version = "0.6.2"; version = "0.6.2";
sha256 = "0h4v4rnximy6rbh83y4s2qj1cqbj66g9wld39mzd0zwgi6ig9syd"; sha256 = "0h4v4rnximy6rbh83y4s2qj1cqbj66g9wld39mzd0zwgi6ig9syd";
} }
{ {
publisher = "swyphcosmo"; publisher = "swyphcosmo";
name = "spellchecker"; name = "spellchecker";
version = "1.2.13"; version = "1.2.13";
sha256 = "1lr33lf01afgi74c1a9gylk92li4hyq24l8bki4l6ggl4z4c2h3w"; sha256 = "1lr33lf01afgi74c1a9gylk92li4hyq24l8bki4l6ggl4z4c2h3w";
} }
{ {
publisher = "asabil"; publisher = "asabil";
name = "meson"; name = "meson";
version = "1.1.1"; version = "1.1.1";
sha256 = "00cc28a2nb325f54bx51wf5q15x1pmsn0j9z6rnxxqxwii1dm5cl"; sha256 = "00cc28a2nb325f54bx51wf5q15x1pmsn0j9z6rnxxqxwii1dm5cl";
} }
{ {
publisher = "codezombiech"; publisher = "codezombiech";
name = "gitignore"; name = "gitignore";
version = "0.6.0"; version = "0.6.0";
sha256 = "0gnc0691pwkd9s8ldqabmpfvj0236rw7bxvkf0bvmww32kv1ia0b"; sha256 = "0gnc0691pwkd9s8ldqabmpfvj0236rw7bxvkf0bvmww32kv1ia0b";
} }
{ {
publisher = "DavidAnson"; publisher = "DavidAnson";
name = "vscode-markdownlint"; name = "vscode-markdownlint";
version = "0.26.0"; version = "0.26.0";
sha256 = "0g4pssvajn7d8p2547v7313gjyqx4pzs7cbjws2s3v2fk1sw7vbj"; sha256 = "0g4pssvajn7d8p2547v7313gjyqx4pzs7cbjws2s3v2fk1sw7vbj";
} }
{ {
publisher = "esbenp"; publisher = "esbenp";
name = "prettier-vscode"; name = "prettier-vscode";
version = "1.8.1"; version = "1.8.1";
sha256 = "0qcm2784n9qc4p77my1kwqrswpji7bp895ay17yzs5g84cj010ln"; sha256 = "0qcm2784n9qc4p77my1kwqrswpji7bp895ay17yzs5g84cj010ln";
} }
{ {
publisher = "hbenl"; publisher = "hbenl";
name = "vscode-test-explorer"; name = "vscode-test-explorer";
version = "2.9.3"; version = "2.9.3";
sha256 = "1yf85hgvganxq5n5jff9ckn3smxd6xi79cgn6k53qi5w1r5rahy0"; sha256 = "1yf85hgvganxq5n5jff9ckn3smxd6xi79cgn6k53qi5w1r5rahy0";
} }
{ {
publisher = "lextudio"; publisher = "lextudio";
name = "restructuredtext"; name = "restructuredtext";
version = "106.0.0"; version = "106.0.0";
sha256 = "096r8071202nxi1is6z7dghcmpsh0f0mm3mp3cfh1yj2mnyzlaxa"; sha256 = "096r8071202nxi1is6z7dghcmpsh0f0mm3mp3cfh1yj2mnyzlaxa";
} }
{ {
publisher = "lostintangent"; publisher = "lostintangent";
name = "vsls-pomodoro"; name = "vsls-pomodoro";
version = "0.1.0"; version = "0.1.0";
sha256 = "1b73zbkhlhacvi18cx4g3n6randy3hw9cab1gkw5gzb3375w7w3p"; sha256 = "1b73zbkhlhacvi18cx4g3n6randy3hw9cab1gkw5gzb3375w7w3p";
} }
{ {
publisher = "lostintangent"; publisher = "lostintangent";
name = "vsls-whiteboard"; name = "vsls-whiteboard";
version = "0.0.8"; version = "0.0.8";
sha256 = "13fcay9bs861msb5y694casbw66dmhl504xm5cvprssx1qka186p"; sha256 = "13fcay9bs861msb5y694casbw66dmhl504xm5cvprssx1qka186p";
} }
{ {
publisher = "mechatroner"; publisher = "mechatroner";
name = "rainbow-csv"; name = "rainbow-csv";
version = "1.0.0"; version = "1.0.0";
sha256 = "1fyamgm7zq31r3c00cn6pcb66rrkfhwfmp72qnhrajydmnvcnbg6"; sha256 = "1fyamgm7zq31r3c00cn6pcb66rrkfhwfmp72qnhrajydmnvcnbg6";
} }
{ {
publisher = "ronnidc"; publisher = "ronnidc";
name = "nunjucks"; name = "nunjucks";
version = "0.2.3"; version = "0.2.3";
sha256 = "119xgyn1dggw2rcqkn2mnz364iw5jlrxg7pcydbijsqj5d3zdfsf"; sha256 = "119xgyn1dggw2rcqkn2mnz364iw5jlrxg7pcydbijsqj5d3zdfsf";
} }
{ {
publisher = "serayuzgur"; publisher = "serayuzgur";
name = "crates"; name = "crates";
version = "0.4.2"; version = "0.4.2";
sha256 = "1knspsc98cfw4mhc0yaz0f2185sxdf9kn9qsysfs6c82g9wjaqcj"; sha256 = "1knspsc98cfw4mhc0yaz0f2185sxdf9kn9qsysfs6c82g9wjaqcj";
} }
]; ];
}) })
]; ];
} }

View file

@ -1,7 +1,12 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
(pass.withExtensions (ext: [ ext.pass-otp ext.pass-import ext.pass-genphrase ext.pass-audit ext.pass-update ])) (pass.withExtensions (ext: [
ext.pass-otp
ext.pass-import
ext.pass-genphrase
ext.pass-audit
ext.pass-update
]))
aria aria
bfg-repo-cleaner bfg-repo-cleaner
binutils binutils

View file

@ -9,8 +9,7 @@
news.display = "show"; news.display = "show";
home.packages = with pkgs; [ home.packages = with pkgs; [ ];
];
imports = [ imports = [
./programs/tmux.nix ./programs/tmux.nix

View file

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

View file

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

View file

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

View file

@ -2,19 +2,12 @@
let let
myEmacs = pkgs.emacs-nox; myEmacs = pkgs.emacs-nox;
emacsWithPackages = (pkgs.emacsPackagesGen myEmacs).emacsWithPackages; emacsWithPackages = (pkgs.emacsPackagesGen myEmacs).emacsWithPackages;
in in emacsWithPackages (epkgs:
emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [ (with epkgs.melpaStablePackages; [ magit solarized-theme evil ])
magit ++ (with epkgs.melpaPackages; [ xterm-color nix-mode ])
solarized-theme ++ (with epkgs.elpaPackages; [
evil beacon # ; highlight my cursor when scrolling
]) nameless # ; hide current package name everywhere in elisp code
++ (with epkgs.melpaPackages; [ ]) ++ [
xterm-color pkgs.notmuch # From main packages set
nix-mode ])
])
++ (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,5 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
home.file.".emacs".text = '' home.file.".emacs".text = ''
(require 'package) (require 'package)

View file

@ -13,11 +13,7 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "1p6l64s9smhwka8bh3pamqimamxziad859i62nrmxzqc49nq5s7m"; cargoSha256 = "1p6l64s9smhwka8bh3pamqimamxziad859i62nrmxzqc49nq5s7m";
buildInputs = [ buildInputs = [ openssl pkgconfig git ];
openssl
pkgconfig
git
];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A simple yet robust commandline random password generator."; description = "A simple yet robust commandline random password generator.";

View file

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

View file

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

View file

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

View file

@ -10,7 +10,4 @@ let
''; '';
}; };
in in { home.packages = with pkgs; [ download ]; }
{
home.packages = with pkgs; [ download ];
}

View file

@ -50,8 +50,7 @@ let
''; '';
}; };
in in {
{
home.packages = with pkgs; [ mount-vault ]; home.packages = with pkgs; [ mount-vault ];
} }

View file

@ -17,7 +17,4 @@ let
''; '';
}; };
in in { home.packages = with pkgs; [ umount-vault ]; }
{
home.packages = with pkgs; [ umount-vault ];
}

View file

@ -1,10 +1,10 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz; unstableTarball = fetchTarball
"https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz";
dotfiles = "/home/cyryl/dev/dotfiles"; dotfiles = "/home/cyryl/dev/dotfiles";
in in {
{
home.username = "cyryl"; home.username = "cyryl";
home.homeDirectory = "/home/cyryl"; home.homeDirectory = "/home/cyryl";
home.stateVersion = "21.11"; home.stateVersion = "21.11";
@ -12,15 +12,11 @@ in
nixpkgs.config = { nixpkgs.config = {
allowUnfree = true; allowUnfree = true;
packageOverrides = pkgs: { packageOverrides = pkgs: {
unstable = import unstableTarball { unstable = import unstableTarball { config = config.nixpkgs.config; };
config = config.nixpkgs.config;
};
}; };
}; };
home.sessionVariables = { home.sessionVariables = { LOCALE_ARCHIVE = /usr/lib/locale/locale-archive; };
LOCALE_ARCHIVE = /usr/lib/locale/locale-archive;
};
targets.genericLinux.enable = true; targets.genericLinux.enable = true;
home.file.".gitconfig".source = ~/dev/dotfiles/.gitconfig.linux.form3; home.file.".gitconfig".source = ~/dev/dotfiles/.gitconfig.linux.form3;

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
services.autorandr.enable = true; services.autorandr.enable = true;
home-manager.users.cyryl = { ... }: { home-manager.users.cyryl = { ... }: {
programs.autorandr = { programs.autorandr = {
@ -25,13 +24,13 @@
profiles = { profiles = {
"foureighty-docked" = { "foureighty-docked" = {
fingerprint = { fingerprint = {
eDP-1 = "00ffffffffffff0006af362300000000001b0104a51f117802f4f5a4544d9c270f505400000001010101010101010101010101010101e65f00a0a0a040503020350035ae100000180000000f0000000000000000000000000020000000fe0041554f0a202020202020202020000000fe004231343051414e30322e33200a00b2"; eDP-1 =
DP-1 = "00ffffffffffff0026cd4e66f3030000271d0104b53c22783ef6d5a7544b9e250d5054bfef80714f8140818081c09500b300d1c001014dd000a0f0703e8030203500544f2100001a000000ff0031313636333933393031303131000000fd00184c1fa03c000a202020202020000000fc00504c3237393255480a202020200176020320f15390050403020716011f121314201511065d5e5f2309070783010000023a801871382d40582c4500544f2100001f011d8018711c1620582c2500544f2100009fa76600a0f0701f8030205500544f2100001ff45100a0f070198030203500544f2100001f565e00a0a0a0295030203500544f2100001b000000000059"; "00ffffffffffff0006af362300000000001b0104a51f117802f4f5a4544d9c270f505400000001010101010101010101010101010101e65f00a0a0a040503020350035ae100000180000000f0000000000000000000000000020000000fe0041554f0a202020202020202020000000fe004231343051414e30322e33200a00b2";
DP-1 =
"00ffffffffffff0026cd4e66f3030000271d0104b53c22783ef6d5a7544b9e250d5054bfef80714f8140818081c09500b300d1c001014dd000a0f0703e8030203500544f2100001a000000ff0031313636333933393031303131000000fd00184c1fa03c000a202020202020000000fc00504c3237393255480a202020200176020320f15390050403020716011f121314201511065d5e5f2309070783010000023a801871382d40582c4500544f2100001f011d8018711c1620582c2500544f2100009fa76600a0f0701f8030205500544f2100001ff45100a0f070198030203500544f2100001f565e00a0a0a0295030203500544f2100001b000000000059";
}; };
config = { config = {
eDP-1 = { eDP-1 = { enable = false; };
enable = false;
};
DP-1 = { DP-1 = {
enable = true; enable = true;
primary = true; primary = true;
@ -42,7 +41,8 @@
}; };
"foureighty" = { "foureighty" = {
fingerprint = { fingerprint = {
eDP-1 = "00ffffffffffff0006af362300000000001b0104a51f117802f4f5a4544d9c270f505400000001010101010101010101010101010101e65f00a0a0a040503020350035ae100000180000000f0000000000000000000000000020000000fe0041554f0a202020202020202020000000fe004231343051414e30322e33200a00b2"; eDP-1 =
"00ffffffffffff0006af362300000000001b0104a51f117802f4f5a4544d9c270f505400000001010101010101010101010101010101e65f00a0a0a040503020350035ae100000180000000f0000000000000000000000000020000000fe0041554f0a202020202020202020000000fe004231343051414e30322e33200a00b2";
}; };
config = { config = {
eDP-1 = { eDP-1 = {

View file

@ -1,21 +1,22 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{ imports = [ ./autorandr.nix ];
imports = [ environment.systemPackages = with pkgs; [ gnome3.dconf ];
./autorandr.nix
];
environment.systemPackages = with pkgs; [
gnome3.dconf
];
programs.dconf.enable = true; programs.dconf.enable = true;
security.sudo.extraRules = [ security.sudo.extraRules = [
{ {
users = [ "cyryl" ]; users = [ "cyryl" ];
commands = [{ command = "${pkgs.i3}/bin/i3-msg"; options = [ "NOPASSWD" ]; }]; commands = [{
command = "${pkgs.i3}/bin/i3-msg";
options = [ "NOPASSWD" ];
}];
} }
{ {
users = [ "cyryl" ]; users = [ "cyryl" ];
commands = [{ command = "${pkgs.intel-gpu-tools}/bin/intel_gpu_top"; options = [ "NOPASSWD" ]; }]; commands = [{
command = "${pkgs.intel-gpu-tools}/bin/intel_gpu_top";
options = [ "NOPASSWD" ];
}];
} }
]; ];
@ -25,9 +26,7 @@
allowAnyUser = true; allowAnyUser = true;
}; };
dbus = { dbus = { packages = with pkgs; [ gnome2.GConf gnome3.dconf ]; };
packages = with pkgs; [ gnome2.GConf gnome3.dconf ];
};
fractalart.enable = true; fractalart.enable = true;
colord.enable = true; colord.enable = true;
@ -38,10 +37,7 @@
}; };
}; };
home-manager.users.cyryl = { ... }: { home-manager.users.cyryl = { ... }: {
imports = [ imports = [ ./home.nix ];
./home.nix home.packages = with pkgs; [ ];
];
home.packages = with pkgs; [
];
}; };
} }

View file

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

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
imports = [ imports = [
./i3.nix ./i3.nix
./i3-status.nix ./i3-status.nix
@ -9,9 +8,7 @@
./xidlehook.nix ./xidlehook.nix
]; ];
home.sessionVariables = { home.sessionVariables = { CM_LAUNCHER = "rofi"; };
CM_LAUNCHER = "rofi";
};
services = { services = {
picom = { picom = {
@ -35,9 +32,6 @@
longitude = -1.0; longitude = -1.0;
}; };
xsession = { xsession = { enable = true; };
enable = true;
};
} }

View file

@ -1,17 +1,12 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
programs.i3status = { programs.i3status = {
enable = true; enable = true;
enableDefault = false; enableDefault = false;
modules = { modules = {
"load" = { "load" = { position = 1; };
position = 1;
};
"disk /" = { "disk /" = {
position = 2; position = 2;
settings = { settings = { format = " %avail"; };
format = " %avail";
};
}; };
"memory" = { "memory" = {
settings = { settings = {
@ -32,9 +27,7 @@
position = 3; position = 3;
}; };
"time" = { "time" = {
settings = { settings = { format = "%a %d/%m %H:%M"; };
format = "%a %d/%m %H:%M";
};
position = 9; position = 9;
}; };
}; };

View file

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

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
services.polybar = { services.polybar = {
enable = true; enable = true;
script = "polybar -r main_bar &"; script = "polybar -r main_bar &";
@ -41,13 +40,12 @@
"module/weather" = { "module/weather" = {
type = "custom/script"; type = "custom/script";
interval = 600; 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; label-font = 2;
}; };
"module/i3" = { "module/i3" = { type = "internal/i3"; };
type = "internal/i3";
};
"module/cpu" = { "module/cpu" = {
type = "internal/cpu"; type = "internal/cpu";
@ -58,7 +56,8 @@
"module/temperature" = { "module/temperature" = {
type = "custom/script"; type = "custom/script";
interval = 5; 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" = { "module/memory" = {

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
services.xidlehook = { services.xidlehook = {
enable = true; enable = true;
not-when-audio = true; not-when-audio = true;
@ -10,8 +9,8 @@
timers = [ timers = [
{ {
delay = 60; delay = 60;
command = "xrandr --output \"$PRIMARY_DISPLAY\" --brightness .1"; command = ''xrandr --output "$PRIMARY_DISPLAY" --brightness .1'';
canceller = "xrandr --output \"$PRIMARY_DISPLAY\" --brightness 1"; canceller = ''xrandr --output "$PRIMARY_DISPLAY" --brightness 1'';
} }
{ {
delay = 600; delay = 600;

View file

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

View file

@ -1,15 +1,10 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.kernelParams = [ "intel_iommu=on" ]; boot.kernelParams = [ "intel_iommu=on" ];
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
virtualisation.kvmgt.enable = true; virtualisation.kvmgt.enable = true;
users.extraUsers.cyryl.extraGroups = [ "kvm" ]; users.extraUsers.cyryl.extraGroups = [ "kvm" ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [ virtmanager qemu swtpm ];
virtmanager
qemu
swtpm
];
} }

View file

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

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
programs.mercurial = { programs.mercurial = {
enable = true; enable = true;
userName = "Cyryl Płotnicki"; userName = "Cyryl Płotnicki";
@ -10,7 +9,6 @@
[ui] [ui]
paginate = never paginate = never
''; '';
aliases = aliases = { };
{ };
}; };
} }

View file

@ -11,7 +11,17 @@ stdenv.mkDerivation rec {
fetchSubmodules = true; fetchSubmodules = true;
}; };
buildInputs = [ libgee json-glib gnome3.evolution-data-server gnome3.evolution gtk3 webkitgtk glib libsecret libsoup ]; buildInputs = [
libgee
json-glib
gnome3.evolution-data-server
gnome3.evolution
gtk3
webkitgtk
glib
libsecret
libsoup
];
nativeBuildInputs = [ meson ninja vala pkg-config ]; nativeBuildInputs = [ meson ninja vala pkg-config ];
configurePhase = "meson build --prefix=$out"; configurePhase = "meson build --prefix=$out";
buildPhase = "ninja -C build"; buildPhase = "ninja -C build";

View file

@ -6,13 +6,15 @@ let
version = "1.6.2"; version = "1.6.2";
src = pythonPackages.fetchPypi { src = pythonPackages.fetchPypi {
inherit pname version; inherit pname version;
sha256 = "bafdd195f10f7c7395f0133bad09746a68e0e6b66da202c9bdb6b1eb4abba5e9"; sha256 =
"bafdd195f10f7c7395f0133bad09746a68e0e6b66da202c9bdb6b1eb4abba5e9";
}; };
doCheck = false; doCheck = false;
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "https://github.com/ricmoo/pyscrypt"; homepage = "https://github.com/ricmoo/pyscrypt";
license = licenses.mit; license = licenses.mit;
description = "Pure-Python Implementation of the scrypt password-based key derivation function and scrypt file format library"; description =
"Pure-Python Implementation of the scrypt password-based key derivation function and scrypt file format library";
}; };
}; };
@ -21,7 +23,8 @@ let
version = "1.0"; version = "1.0";
src = pythonPackages.fetchPypi { src = pythonPackages.fetchPypi {
inherit pname version; inherit pname version;
sha256 = "b89895ba6438038d0bdf88020ceff876cf3eae0d5c66a69b526fab31125db2c5"; sha256 =
"b89895ba6438038d0bdf88020ceff876cf3eae0d5c66a69b526fab31125db2c5";
}; };
checkInputs = [ python37Packages.pycodestyle ]; checkInputs = [ python37Packages.pycodestyle ];
propagatedBuildInputs = [ python37Packages.six ]; propagatedBuildInputs = [ python37Packages.six ];
@ -37,7 +40,8 @@ let
version = "2.0.0"; version = "2.0.0";
src = pythonPackages.fetchPypi { src = pythonPackages.fetchPypi {
inherit pname version; inherit pname version;
sha256 = "fdcaedc1fb19a63d7d875b0105b0a5b496dd0989330d454a42bcb401fa5454ec"; sha256 =
"fdcaedc1fb19a63d7d875b0105b0a5b496dd0989330d454a42bcb401fa5454ec";
}; };
checkInputs = [ python37Packages.flake8 ]; checkInputs = [ python37Packages.flake8 ];
propagatedBuildInputs = [ orderedmultidict python37Packages.six ]; propagatedBuildInputs = [ orderedmultidict python37Packages.six ];
@ -92,7 +96,8 @@ let
version = "2.1.11"; version = "2.1.11";
src = pythonPackages.fetchPypi { src = pythonPackages.fetchPypi {
inherit pname version; inherit pname version;
sha256 = "02273fcc6ae10e0f74aa12652e24d0001eec8dbf467d54ddb4dfcc2af7d7a5db"; sha256 =
"02273fcc6ae10e0f74aa12652e24d0001eec8dbf467d54ddb4dfcc2af7d7a5db";
}; };
doCheck = false; doCheck = false;
checkInputs = [ checkInputs = [
@ -101,7 +106,8 @@ let
python37Packages.pytest-flake8 python37Packages.pytest-flake8
python37Packages.pytestcov python37Packages.pytestcov
]; ];
propagatedBuildInputs = [ python37Packages.dateutil python37Packages.vobject ]; propagatedBuildInputs =
[ python37Packages.dateutil python37Packages.vobject ];
meta = with pkgs.stdenv.lib; { meta = with pkgs.stdenv.lib; {
homepage = "http://www.radicale.org/"; homepage = "http://www.radicale.org/";
license = licenses.gpl1; license = licenses.gpl1;
@ -139,9 +145,7 @@ let
}; };
}; };
in in python37.pkgs.buildPythonPackage rec {
python37.pkgs.buildPythonPackage rec {
pname = "etesync-dav"; pname = "etesync-dav";
version = "0.5.0"; version = "0.5.0";
src = pythonPackages.fetchPypi { src = pythonPackages.fetchPypi {

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
systemd.services.cpu-throttling = { systemd.services.cpu-throttling = {
enable = true; enable = true;
description = "CPU Throttling Fix"; description = "CPU Throttling Fix";
@ -8,12 +7,8 @@
]; ];
path = [ pkgs.msr-tools ]; path = [ pkgs.msr-tools ];
script = "wrmsr -a 0x1a2 0x3000000"; script = "wrmsr -a 0x1a2 0x3000000";
serviceConfig = { serviceConfig = { Type = "oneshot"; };
Type = "oneshot"; wantedBy = [ "timers.target" ];
};
wantedBy = [
"timers.target"
];
}; };
systemd.timers.cpu-throttling = { systemd.timers.cpu-throttling = {
@ -27,8 +22,6 @@
OnUnitActiveSec = 60; OnUnitActiveSec = 60;
Unit = "cpu-throttling.service"; Unit = "cpu-throttling.service";
}; };
wantedBy = [ wantedBy = [ "timers.target" ];
"timers.target"
];
}; };
} }

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
boot.kernelPatches = [{ boot.kernelPatches = [{
name = "cyplo-hardened"; name = "cyplo-hardened";
patch = null; patch = null;

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }: {
{
nix.allowedUsers = [ "@users" ]; nix.allowedUsers = [ "@users" ];
security.lockKernelModules = false; security.lockKernelModules = false;
security.protectKernelImage = true; security.protectKernelImage = true;
@ -10,11 +9,8 @@
networking.firewall.enable = true; networking.firewall.enable = true;
services.clamav.daemon.enable = true; services.clamav.daemon.enable = true;
services.clamav.updater.enable = true; services.clamav.updater.enable = true;
boot.kernelParams = [ boot.kernelParams =
"slub_debug=FZP" [ "slub_debug=FZP" "page_poison=1" "page_alloc.shuffle=1" ];
"page_poison=1"
"page_alloc.shuffle=1"
];
boot.blacklistedKernelModules = [ boot.blacklistedKernelModules = [
# Obscure network protocols # Obscure network protocols

View file

@ -6,11 +6,8 @@ let
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJwZ4M6lT2yzg8iarCzsLADAuXS4BUkLTt1+mKCECczk nix-builder@brix" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJwZ4M6lT2yzg8iarCzsLADAuXS4BUkLTt1+mKCECczk nix-builder@brix"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALNEUIxbENTdhSWzYupGFn/q+AGe0diBOTMyiZAmv7F nix-builder@vultr1" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALNEUIxbENTdhSWzYupGFn/q+AGe0diBOTMyiZAmv7F nix-builder@vultr1"
]; ];
in in {
{ imports = [ ./security.nix ];
imports = [
./security.nix
];
security.acme.email = "admin@cyplo.dev"; security.acme.email = "admin@cyplo.dev";
security.acme.acceptTerms = true; security.acme.acceptTerms = true;

View file

@ -1,6 +1,5 @@
{ {
permittedInsecurePackages = [ permittedInsecurePackages = [ ];
];
packageOverrides = pkgs: { packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
}; };

View file

@ -1,8 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let mod = "Mod4";
mod = "Mod4"; in {
in
{
services.dbus.packages = with pkgs; [ gnome2.GConf gnome3.dconf ]; services.dbus.packages = with pkgs; [ gnome2.GConf gnome3.dconf ];
services.dbus.socketActivated = true; services.dbus.socketActivated = true;
programs.dconf.enable = true; programs.dconf.enable = true;
@ -12,9 +10,7 @@ in
home-manager.users.cyryl = { ... }: { home-manager.users.cyryl = { ... }: {
programs.mako.enable = true; programs.mako.enable = true;
imports = [ imports = [ ./keybindings.nix ];
./keybindings.nix
];
home.sessionVariables = { home.sessionVariables = {
XDG_CURRENT_DESKTOP = "Unity"; XDG_CURRENT_DESKTOP = "Unity";
@ -41,7 +37,8 @@ in
home.file.".config/wofi/style.css".source = ../../.config/wofi/style.css; home.file.".config/wofi/style.css".source = ../../.config/wofi/style.css;
home.file.".config/waybar/config".source = ../../.config/waybar/config; home.file.".config/waybar/config".source = ../../.config/waybar/config;
home.file.".config/waybar/style.css".source = ../../.config/waybar/style.css; home.file.".config/waybar/style.css".source =
../../.config/waybar/style.css;
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
wrapperFeatures.base = true; wrapperFeatures.base = true;
@ -50,8 +47,7 @@ in
extraConfig = '' extraConfig = ''
default_border none default_border none
''; '';
extraSessionCommands = '' extraSessionCommands = "";
'';
config = { config = {
modifier = "${mod}"; modifier = "${mod}";
menu = "${pkgs.wofi}/bin/wofi --show drun,run"; menu = "${pkgs.wofi}/bin/wofi --show drun,run";
@ -62,18 +58,20 @@ 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 = "${pkgs.wl-clipboard}/bin/wl-paste -t text --watch ${pkgs.clipman}/bin/clipman store"; } {
command =
"${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"; }
{ {
command = ''swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off" && systemctl suspend' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 657b83' command = ''
''; swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off" && systemctl suspend' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 657b83'
'';
} }
]; ];
output.eDP-1.scale = "1.7"; output.eDP-1.scale = "1.7";
@ -81,9 +79,7 @@ in
xkb_layout = "pl"; xkb_layout = "pl";
xkb_options = "caps:ctrl_modifier"; xkb_options = "caps:ctrl_modifier";
}; };
input."2:7:SynPS/2_Synaptics_TouchPad" = { input."2:7:SynPS/2_Synaptics_TouchPad" = { tap = "enabled"; };
tap = "enabled";
};
}; };
}; };
}; };

View file

@ -1,21 +1,25 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let mod = "Mod4";
mod = "Mod4"; in {
in
{
wayland.windowManager.sway.config.keybindings = { wayland.windowManager.sway.config.keybindings = {
"${mod}+Shift+e" = "exit"; "${mod}+Shift+e" = "exit";
"${mod}+Shift+r" = "reload"; "${mod}+Shift+r" = "reload";
"${mod}+Shift+l" = "exec swaylock -c 657b83"; "${mod}+Shift+l" = "exec swaylock -c 657b83";
"${mod}+Return" = "exec ${pkgs.kitty}/bin/kitty"; "${mod}+Return" = "exec ${pkgs.kitty}/bin/kitty";
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%"; "XF86AudioRaiseVolume" =
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%"; "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle"; "XF86AudioLowerVolume" =
"XF86AudioMicMute" = "exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle"; "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"; "XF86MonBrightnessUp" =
"XF86MonBrightnessDown" = "exec light -s sysfs/backlight/intel_backlight -U 5"; "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";

View file

@ -1,10 +1,10 @@
{ config, pkgs, inputs, ... }: { config, pkgs, inputs, ... }: {
{
services.syncthing = { services.syncthing = {
enable = true; enable = true;
user = "cyryl"; user = "cyryl";
dataDir = "/home/cyryl/.syncthing"; dataDir = "/home/cyryl/.syncthing";
openDefaultPorts = true; openDefaultPorts = true;
package = inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".syncthing; package =
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".syncthing;
}; };
} }

View file

@ -1,9 +1,9 @@
{ config, pkgs, inputs, ... }: { config, pkgs, inputs, ... }:
let let
tailscale = inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale; tailscale =
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".tailscale;
in in {
{
environment.systemPackages = [ tailscale ]; environment.systemPackages = [ tailscale ];
services.tailscale = { services.tailscale = {
enable = true; enable = true;

View file

@ -1,5 +1,4 @@
{ config, lib, ... }: { config, lib, ... }: {
{
options.variables = lib.mkOption { options.variables = lib.mkOption {
type = lib.types.attrs; type = lib.types.attrs;
default = { }; default = { };

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
virtualisation.virtualbox.host = { virtualisation.virtualbox.host = {
enable = true; enable = true;
enableExtensionPack = true; enableExtensionPack = true;

View file

@ -1,7 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{ networking.wireguard = { enable = true; };
networking.wireguard = {
enable = true;
};
} }

View file

@ -1,7 +1,5 @@
let let nixpkgs = import <nixpkgs> { };
nixpkgs = import <nixpkgs> { }; in with nixpkgs;
in
with nixpkgs;
stdenv.mkDerivation { stdenv.mkDerivation {
name = "legacy_shell"; name = "legacy_shell";
buildInputs = [ buildInputs = [
@ -11,6 +9,5 @@ stdenv.mkDerivation {
cacert cacert
git git
]; ];
shellHook = '' shellHook = "";
'';
} }