Reformatting with nixfmt. Was this a bad idea? Who knows.

This commit is contained in:
kat witch 2020-11-06 14:21:49 +00:00 committed by kat
parent da58d0eb98
commit 4d55f43328
23 changed files with 275 additions and 470 deletions

View file

@ -1,8 +1,8 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let unstable = import <nixos-unstable> {}; in { let unstable = import <nixos-unstable> { };
imports = in {
[ imports = [
../../profiles/common ../../profiles/common
./hardware-configuration.nix ./hardware-configuration.nix
#./services/postgres.nix #./services/postgres.nix

View file

@ -4,23 +4,21 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = imports = [ <nixpkgs/nixos/modules/profiles/qemu-guest.nix> ];
[ <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sd_mod" "sr_mod" ]; boot.initrd.availableKernelModules =
[ "ahci" "xhci_pci" "virtio_pci" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/126049c0-34bd-4d96-a8db-276c5d172abe"; device = "/dev/disk/by-uuid/126049c0-34bd-4d96-a8db-276c5d172abe";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/1f19daed-1c51-4b14-bfe8-bd7ea075ed96"; } [{ device = "/dev/disk/by-uuid/1f19daed-1c51-4b14-bfe8-bd7ea075ed96"; }];
];
nix.maxJobs = lib.mkDefault 3; nix.maxJobs = lib.mkDefault 3;
} }

View file

@ -20,10 +20,12 @@ let
pkgs = import <nixpkgs> { }; pkgs = import <nixpkgs> { };
evalConfig = import <nixpkgs/nixos/lib/eval-config.nix>; evalConfig = import <nixpkgs/nixos/lib/eval-config.nix>;
lib = pkgs.lib; lib = pkgs.lib;
in lib.mapAttrs (name: host: host // { in lib.mapAttrs (name: host:
config = if (host ? config) then host.config else (evalConfig { host // {
modules = [ config = if (host ? config) then
(import "${toString ./.}/${name}/configuration.nix") host.config
]; else
(evalConfig {
modules = [ (import "${toString ./.}/${name}/configuration.nix") ];
}).config; }).config;
}) hosts }) hosts

View file

@ -5,8 +5,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = imports = [ # Include the results of the hardware scan.
[ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
../../profiles/common ../../profiles/common
../../profiles/desktop ../../profiles/desktop

View file

@ -4,28 +4,26 @@
{ 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" "usb_storage" "sd_mod" "sdhci_acpi" ]; boot.initrd.availableKernelModules =
[ "xhci_pci" "usb_storage" "sd_mod" "sdhci_acpi" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/fa06ba90-ffc9-4ca6-b1cf-1205340a975e"; device = "/dev/disk/by-uuid/fa06ba90-ffc9-4ca6-b1cf-1205340a975e";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/BF39-2AA3"; device = "/dev/disk/by-uuid/BF39-2AA3";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/9c88235e-9705-4b80-a988-e95eda06124f"; } [{ device = "/dev/disk/by-uuid/9c88235e-9705-4b80-a988-e95eda06124f"; }];
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
} }

View file

@ -1,8 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = imports = [
[
./hardware-configuration.nix ./hardware-configuration.nix
../../profiles/common ../../profiles/common
../../profiles/desktop ../../profiles/desktop
@ -16,12 +15,6 @@
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
home-manager.users.kat = {
imports = [
./dconf.nix
];
};
networking.hostName = "samhain"; networking.hostName = "samhain";
networking.hostId = "617050fc"; networking.hostId = "617050fc";

View file

@ -1,143 +0,0 @@
# Generated via dconf2nix: https://github.com/gvolpe/dconf2nix
{ lib, ... }:
let
mkTuple = lib.hm.gvariant.mkTuple;
in
{
dconf.settings = {
"org/gnome/control-center" = {
"last-panel" = "network";
};
"org/gnome/desktop/input-sources" = {
"current" = "uint32 0";
"sources" = [ (mkTuple [ "xkb" "gb" ]) ];
"xkb-options" = [ "terminate:ctrl_alt_bksp" ];
};
"org/gnome/desktop/interface" = {
"clock-show-seconds" = true;
"clock-show-weekday" = true;
"enable-hot-corners" = false;
"gtk-im-module" = "gtk-im-context-simple";
};
"org/gnome/desktop/notifications" = {
"application-children" = [ "im-dino-dino" "telegramdesktop" "discord" "mumble" "firefox" ];
};
"org/gnome/desktop/notifications/application/discord" = {
"application-id" = "discord.desktop";
};
"org/gnome/desktop/notifications/application/firefox" = {
"application-id" = "firefox.desktop";
};
"org/gnome/desktop/notifications/application/im-dino-dino" = {
"application-id" = "im.dino.Dino.desktop";
};
"org/gnome/desktop/notifications/application/mumble" = {
"application-id" = "mumble.desktop";
};
"org/gnome/desktop/notifications/application/telegramdesktop" = {
"application-id" = "telegramdesktop.desktop";
};
"org/gnome/desktop/privacy" = {
"report-technical-problems" = true;
};
"org/gnome/desktop/wm/keybindings" = {
"panel-main-menu" = [ "<Alt>F1" ];
};
"org/gnome/desktop/wm/preferences" = {
"button-layout" = "appmenu:minimize,maximize,close";
};
"org/gnome/evolution-data-server" = {
"migrated" = true;
"network-monitor-gio-name" = "";
};
"org/gnome/mutter" = {
"attach-modal-dialogs" = true;
"dynamic-workspaces" = true;
"edge-tiling" = true;
"focus-change-on-pointer-rest" = true;
"overlay-key" = "Super_L";
"workspaces-only-on-primary" = true;
};
"org/gnome/nautilus/preferences" = {
"default-folder-viewer" = "icon-view";
"search-filter-time-type" = "last_modified";
};
"org/gnome/nautilus/window-state" = {
"initial-size" = mkTuple [ 890 550 ];
"maximized" = false;
};
"org/gnome/settings-daemon/plugins/color" = {
#"night-light-last-coordinates" = mkTuple [ 51.579800719942405 -2.47e-2 ];
};
"org/gnome/settings-daemon/plugins/xsettings" = {
"antialiasing" = "grayscale";
"hinting" = "slight";
};
"org/gnome/shell" = {
"disabled-extensions" = "@as []";
"enabled-extensions" = [ "arc-menu@linxgem33.com" "caffeine@patapon.info" "dash-to-panel@jderose9.github.com" "emoji-selector@maestroschan.fr" "appindicatorsupport@rgcjonas.gmail.com" ];
};
"org/gnome/shell/extensions/arc-menu" = {
"arc-menu-icon" = 3;
"dtp-dtd-state" = [ true false ];
"menu-button-icon" = "Arc_Menu_Icon";
"menu-hotkey" = "Super_L";
"pinned-app-list" = [ "Firefox" "firefox" "firefox.desktop" "Terminal" "utilities-terminal" "org.gnome.Terminal.desktop" "Arc Menu Settings" "ArcMenu_ArcMenuIcon" "gnome-extensions prefs arc-menu@linxgem33.com" ];
};
"org/gnome/shell/extensions/dash-to-panel" = {
"available-monitors" = [ 1 0 2 ];
"group-apps" = false;
"hotkeys-overlay-combo" = "TEMPORARILY";
"multi-monitors" = false;
#"panel-element-positions" = "'{"0":[{"element":"showAppsButton","visible":false,"position":"stackedTL"},{"element":"activitiesButton","visible":false,"position":"stackedTL"},{"element":"leftBox","visible":true,"position":"stackedTL"},{"element":"taskbar","visible":true,"position":"stackedTL"},{"element":"centerBox","visible":true,"position":"stackedBR"},{"element":"rightBox","visible":true,"position":"stackedBR"},{"element":"dateMenu","visible":true,"position":"stackedBR"},{"element":"systemMenu","visible":true,"position":"stackedBR"},{"element":"desktopButton","visible":true,"position":"stackedBR"}],"1":[{"element":"showAppsButton","visible":false,"position":"stackedTL"},{"element":"activitiesButton","visible":false,"position":"stackedTL"},{"element":"leftBox","visible":true,"position":"stackedTL"},{"element":"taskbar","visible":true,"position":"stackedTL"},{"element":"centerBox","visible":true,"position":"stackedBR"},{"element":"rightBox","visible":true,"position":"stackedBR"},{"element":"dateMenu","visible":true,"position":"stackedBR"},{"element":"systemMenu","visible":true,"position":"stackedBR"},{"element":"desktopButton","visible":true,"position":"stackedBR"}],"2":[{"element":"showAppsButton","visible":false,"position":"stackedTL"},{"element":"activitiesButton","visible":false,"position":"stackedTL"},{"element":"leftBox","visible":true,"position":"stackedTL"},{"element":"taskbar","visible":true,"position":"stackedTL"},{"element":"centerBox","visible":true,"position":"stackedBR"},{"element":"rightBox","visible":true,"position":"stackedBR"},{"element":"dateMenu","visible":true,"position":"stackedBR"},{"element":"systemMenu","visible":true,"position":"stackedBR"},{"element":"desktopButton","visible":true,"position":"stackedBR"}]}'";
#"panel-positions" = "'{"0":"TOP","1":"TOP","2":"TOP"}'";
"panel-size" = 32;
"primary-monitor" = 1;
};
"org/gnome/shell/world-clocks" = {
"locations" = "@av []";
};
"org/gnome/system/location" = {
"enabled" = true;
};
"org/gtk/settings/file-chooser" = {
"date-format" = "regular";
"location-mode" = "path-bar";
"show-hidden" = false;
"show-size-column" = true;
"show-type-column" = true;
"sidebar-width" = 164;
"sort-column" = "name";
"sort-directories-first" = false;
"sort-order" = "ascending";
"type-format" = "category";
"window-position" = mkTuple [ 358 907 ];
"window-size" = mkTuple [ 1203 902 ];
};
};
}

View file

@ -4,32 +4,30 @@
{ 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" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "zroot/safe/root"; device = "zroot/safe/root";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "zroot/safe/home"; device = "zroot/safe/home";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/50C3-BE99"; device = "/dev/disk/by-uuid/50C3-BE99";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/88595373-9566-401b-8c9b-03bbc8314f1b"; } [{ device = "/dev/disk/by-uuid/88595373-9566-401b-8c9b-03bbc8314f1b"; }];
];
} }

View file

@ -1,8 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = imports = [
[
./hardware-configuration.nix ./hardware-configuration.nix
../../profiles/common ../../profiles/common
../../profiles/desktop ../../profiles/desktop

View file

@ -4,33 +4,30 @@
{ 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-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "zpool/safe/root"; device = "zpool/safe/root";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "zpool/safe/home"; device = "zpool/safe/home";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/4683-4139"; device = "/dev/disk/by-uuid/4683-4139";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/7e6f47fd-bedb-4012-8072-5e3a556e2f45"; } [{ device = "/dev/disk/by-uuid/7e6f47fd-bedb-4012-8072-5e3a556e2f45"; }];
];
} }

View file

@ -6,23 +6,15 @@ let
rev = "a98ec6ec158686387d66654ea96153ec06be33d7"; rev = "a98ec6ec158686387d66654ea96153ec06be33d7";
}; };
in { in {
imports = [ imports = [ ../../../modules "${home-manager}/nixos" ./pbb.nix ./users.nix ];
../../../modules
"${home-manager}/nixos"
./pbb.nix
./users.nix
];
nixpkgs.overlays = [ nixpkgs.overlays =
(self: super: import ../../../pkgs { nixpkgs = super.path; }) [ (self: super: import ../../../pkgs { nixpkgs = super.path; }) ];
];
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
#boot.kernelParams = [ "quiet" ]; #boot.kernelParams = [ "quiet" ];
nixpkgs.config = { nixpkgs.config = { allowUnfree = true; };
allowUnfree = true;
};
services.journald.extraConfig = "SystemMaxUse=512M"; services.journald.extraConfig = "SystemMaxUse=512M";
nix.gc.automatic = lib.mkDefault true; nix.gc.automatic = lib.mkDefault true;
@ -30,7 +22,6 @@ in {
nix.trustedUsers = [ "root" "@wheel" ]; nix.trustedUsers = [ "root" "@wheel" ];
environment.variables.EDITOR = "neovim"; environment.variables.EDITOR = "neovim";
services.openssh.enable = true; services.openssh.enable = true;
services.openssh.ports = lib.mkDefault [ 62954 ]; services.openssh.ports = lib.mkDefault [ 62954 ];
services.openssh.passwordAuthentication = false; services.openssh.passwordAuthentication = false;
@ -39,7 +30,6 @@ in {
services.openssh.extraConfig = "StreamLocalBindUnlink yes"; services.openssh.extraConfig = "StreamLocalBindUnlink yes";
security.sudo.wheelNeedsPassword = lib.mkForce false; security.sudo.wheelNeedsPassword = lib.mkForce false;
i18n.defaultLocale = "en_GB.UTF-8"; i18n.defaultLocale = "en_GB.UTF-8";
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";
console = { console = {

View file

@ -4,10 +4,7 @@ let
rev = "4b0275db7842fda45dcc007d87b6274c4e63382b"; rev = "4b0275db7842fda45dcc007d87b6274c4e63382b";
}; };
in { in {
imports = [ imports = [ "${pbbNixfiles}/modules" ];
"${pbbNixfiles}/modules" nixpkgs.overlays =
]; [ (self: super: import "${pbbNixfiles}/pkgs" { nixpkgs = super.path; }) ];
nixpkgs.overlays = [
(self: super: import "${pbbNixfiles}/pkgs" { nixpkgs = super.path; })
];
} }

View file

@ -2,7 +2,12 @@
{ {
users.users.root = { users.users.root = {
openssh.authorizedKeys.keys = with pkgs.lib; concatLists (mapAttrsToList (name: user: if elem "wheel" user.extraGroups then user.openssh.authorizedKeys.keys else []) config.users.users); openssh.authorizedKeys.keys = with pkgs.lib;
concatLists (mapAttrsToList (name: user:
if elem "wheel" user.extraGroups then
user.openssh.authorizedKeys.keys
else
[ ]) config.users.users);
}; };
users.users.kat = { users.users.kat = {
@ -17,14 +22,11 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.users.kat = { home-manager.users.kat = {
programs.firefox = { programs.firefox = { enable = true; };
enable = true;
};
programs.fish = { programs.fish = {
enable = true; enable = true;
plugins = [ plugins = [{
{
name = "bass"; name = "bass";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "edc"; owner = "edc";
@ -32,8 +34,7 @@
rev = "d63054b24c2f63aaa3a08fb9ec9d0da4c70ab922"; rev = "d63054b24c2f63aaa3a08fb9ec9d0da4c70ab922";
sha256 = "0pwci5xxm8308nrb52s5nyxijk0svar8nqrdfvkk2y34z1cg319b"; sha256 = "0pwci5xxm8308nrb52s5nyxijk0svar8nqrdfvkk2y34z1cg319b";
}; };
} }];
];
}; };
programs.starship = { programs.starship = {
@ -47,9 +48,7 @@
userEmail = "me@dork.dev"; userEmail = "me@dork.dev";
}; };
programs.kakoune = { programs.kakoune = { enable = true; };
enable = true;
};
programs.ssh = { programs.ssh = {
enable = true; enable = true;
@ -60,23 +59,16 @@
kat = { kat = {
forwardAgent = true; forwardAgent = true;
extraOptions = { extraOptions = {
RemoteForward = "/run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra"; RemoteForward =
"/run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra";
}; };
port = 62954; port = 62954;
}; };
in { in {
"beltane" = { "beltane" = { hostname = "beltane.dork.dev"; } // kat;
hostname = "beltane.dork.dev"; "samhain" = { hostname = "192.168.1.135"; } // kat;
} // kat; "litha" = { hostname = "192.168.1.240"; } // kat;
"samhain" = { "yule" = { hostname = "192.168.1.92"; } // kat;
hostname = "192.168.1.135";
} // kat;
"litha" = {
hostname = "192.168.1.240";
} // kat;
"yule" = {
hostname = "192.168.1.92";
} // kat;
}; };
}; };

View file

@ -1,9 +1,10 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let unstable = import ( fetchTarball https://github.com/NixOS/nixpkgs/archive/master.tar.gz ) {}; in { let
nixpkgs.config = { unstable = import
mumble.speechdSupport = true; (fetchTarball "https://github.com/NixOS/nixpkgs/archive/master.tar.gz") { };
}; in {
nixpkgs.config = { mumble.speechdSupport = true; };
home-manager.users.kat = { home-manager.users.kat = {
home.packages = [ home.packages = [
@ -46,10 +47,7 @@ let unstable = import ( fetchTarball https://github.com/NixOS/nixpkgs/archive/ma
}; };
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
fonts.fonts = [ fonts.fonts = [ pkgs.nerdfonts pkgs.corefonts ];
pkgs.nerdfonts
pkgs.corefonts
];
sound.enable = true; sound.enable = true;
hardware.pulseaudio.enable = true; hardware.pulseaudio.enable = true;

View file

@ -1,10 +1,5 @@
{ config, lib, pkgs, ... }: {
{ config, lib, pkgs, ... }: environment.systemPackages = [ pkgs.php pkgs.php74Packages.composer2 ];
{
environment.systemPackages = [
pkgs.php
pkgs.php74Packages.composer2
];
home-manager.users.kat = { home-manager.users.kat = {
home.packages = [ home.packages = [
@ -12,6 +7,7 @@
pkgs.jetbrains.idea-ultimate pkgs.jetbrains.idea-ultimate
pkgs.jetbrains.goland pkgs.jetbrains.goland
pkgs.jetbrains.phpstorm pkgs.jetbrains.phpstorm
pkgs.nixfmt
pkgs.carnix pkgs.carnix
pkgs.rustc pkgs.rustc
pkgs.cargo pkgs.cargo

View file

@ -1,14 +1,7 @@
{ config, lib, pkgs, ... }: {
{ config, lib, pkgs, ... }:
{
hardware.opengl.driSupport32Bit = true; hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ]; hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
hardware.pulseaudio.support32Bit = true; hardware.pulseaudio.support32Bit = true;
home-manager.users.kat = { home-manager.users.kat = { home.packages = [ pkgs.steam pkgs.steam-run ]; };
home.packages = [
pkgs.steam
pkgs.steam-run
];
};
} }

View file

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

View file

@ -1,6 +1,4 @@
{ config, lib, pkgs, ... }: {
{ config, lib, pkgs, ... }:
{
networking = { networking = {
networkmanager.enable = true; networkmanager.enable = true;
resolvconf.useLocalResolver = true; resolvconf.useLocalResolver = true;
@ -19,11 +17,21 @@
"https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md" "https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md"
]; ];
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md"; cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; minisign_key =
"RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
}; };
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v2/public-resolvers.md # You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v2/public-resolvers.md
server_names = [ "acsacsar-ams-ipv4" "acsacsar-ams-ipv6" "dnscrypt.eu-dk" "dnscrypt.eu-dk-ipv6" "dnscrypt.eu-nl" "dnscrypt.eu-nl-ipv6" "meganerd" "meganerd-ipv6" ]; server_names = [
"acsacsar-ams-ipv4"
"acsacsar-ams-ipv6"
"dnscrypt.eu-dk"
"dnscrypt.eu-dk-ipv6"
"dnscrypt.eu-nl"
"dnscrypt.eu-nl-ipv6"
"meganerd"
"meganerd-ipv6"
];
}; };
}; };

View file

@ -1,6 +1,4 @@
{ config, lib, pkgs, ... }: {
{ config, lib, pkgs, ... }:
{
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.displayManager.lightdm.enable = true; services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.xfce.enable = true; services.xserver.desktopManager.xfce.enable = true;

View file

@ -1,6 +1,4 @@
{ config, lib, pkgs, ... }: {
{ config, lib, pkgs, ... }:
{
services.pcscd.enable = true; services.pcscd.enable = true;
services.udev.packages = [ pkgs.yubikey-personalization ]; services.udev.packages = [ pkgs.yubikey-personalization ];

View file

@ -5,30 +5,23 @@
hosts = import ../configuration/hosts; hosts = import ../configuration/hosts;
nixosHosts = lib.filterAttrs (name: host: host ? ssh) hosts; nixosHosts = lib.filterAttrs (name: host: host ? ssh) hosts;
allGroups = lib.unique ( allGroups = lib.unique
lib.flatten ( (lib.flatten (lib.mapAttrsToList (name: host: host.groups) hosts));
lib.mapAttrsToList (
name: host: host.groups
) hosts
)
);
hostsInGroup = group: hostsInGroup = group:
lib.filterAttrs ( lib.filterAttrs (k: v: builtins.elem group v.groups) hosts;
k: v: builtins.elem group v.groups
) hosts;
hostsInAllGroups = lib.listToAttrs ( hostsInAllGroups = lib.listToAttrs
map ( (map (group: lib.nameValuePair group (lib.attrNames (hostsInGroup group)))
group: lib.nameValuePair group ( allGroups);
lib.attrNames (hostsInGroup group)
)
) allGroups );
mkDeploy = hostnames: pkgs.writeScript "deploy-${lib.concatStringsSep "-" hostnames}" '' mkDeploy = hostnames:
pkgs.writeScript "deploy-${lib.concatStringsSep "-" hostnames}" ''
#!${pkgs.stdenv.shell} #!${pkgs.stdenv.shell}
set -e -o pipefail set -e -o pipefail
export PATH=/run/wrappers/bin/:${with pkgs; lib.makeBinPath [ export PATH=/run/wrappers/bin/:${
with pkgs;
lib.makeBinPath [
coreutils coreutils
openssh openssh
nix nix
@ -37,7 +30,8 @@
nettools nettools
gzip gzip
git git
]} ]
}
MODE=$1 MODE=$1
shift || true shift || true
@ -45,13 +39,15 @@
[ "$MODE" == "" ] && MODE="switch" [ "$MODE" == "" ] && MODE="switch"
${lib.concatMapStrings (hostname: let ${lib.concatMapStrings (hostname:
let
hostAttrs = nixosHosts.${hostname}; hostAttrs = nixosHosts.${hostname};
nixosSystem = (import <nixpkgs/nixos/lib/eval-config.nix> { nixosSystem = (import <nixpkgs/nixos/lib/eval-config.nix> {
modules = [ modules = [
"${toString ../configuration}/hosts/${hostname}/configuration.nix" "${toString ../configuration}/hosts/${hostname}/configuration.nix"
]; ];
system = if hostAttrs ? system then hostAttrs.system else "x86_64-linux"; system =
if hostAttrs ? system then hostAttrs.system else "x86_64-linux";
}).config.system.build.toplevel; }).config.system.build.toplevel;
in '' in ''
( (
@ -70,7 +66,9 @@
''; '';
in { in {
deploy = (lib.mapAttrs (hostname: hostAttrs: mkDeploy [ hostname ]) nixosHosts) deploy =
// (lib.mapAttrs (group: hosts: mkDeploy hosts) hostsInAllGroups) (lib.mapAttrs (hostname: hostAttrs: mkDeploy [ hostname ]) nixosHosts)
// { all = mkDeploy (lib.attrNames nixosHosts); }; // (lib.mapAttrs (group: hosts: mkDeploy hosts) hostsInAllGroups) // {
all = mkDeploy (lib.attrNames nixosHosts);
};
} }

View file

@ -1,6 +1,5 @@
{ ... }: { ... }:
{ {
imports = [ imports = [ ];
];
} }

View file

@ -4,7 +4,6 @@ let
pkgs = import nixpkgs { }; pkgs = import nixpkgs { };
callPackage = pkgs.lib.callPackageWith (pkgs // newpkgs); callPackage = pkgs.lib.callPackageWith (pkgs // newpkgs);
newpkgs = { newpkgs = { };
};
in newpkgs in newpkgs