More deduplication

This commit is contained in:
Katherina Walshe-Grey 2024-06-05 20:31:13 +01:00
parent 4eac965b88
commit 7b87bdbc2f
3 changed files with 24 additions and 22 deletions

View file

@ -2,30 +2,45 @@ let sources = import ./npins;
in { in {
meta.nixpkgs = sources.nixpkgs; meta.nixpkgs = sources.nixpkgs;
defaults = { pkgs, ... }: { defaults = { name, pkgs, ... }: {
imports = [
(import "${sources.home-manager}/nixos")
];
deployment.replaceUnknownProfiles = false; deployment.replaceUnknownProfiles = false;
networking.hostName = name;
environment.systemPackages = with pkgs; [
git
wget
];
# Make <nixpkgs> point systemwide to the pinned nixpkgs above # Make <nixpkgs> point systemwide to the pinned nixpkgs above
# https://jade.fyi/blog/pinning-nixos-with-npins/ # https://jade.fyi/blog/pinning-nixos-with-npins/
nix.settings.experimental-features = "nix-command flakes"; nix.settings.experimental-features = "nix-command flakes";
nixpkgs.flake.source = sources.nixpkgs; nixpkgs.flake.source = sources.nixpkgs;
nix.nixPath = [ "nixpkgs=flake:nixpkgs" ]; nix.nixPath = [ "nixpkgs=flake:nixpkgs" ];
imports = [
(import "${sources.home-manager}/nixos")
./users/qenya.nix
];
}; };
tohru = { name, nodes, ... }: { tohru = {
deployment = { deployment = {
allowLocalDeployment = true; allowLocalDeployment = true;
targetHost = null; targetHost = null;
}; };
networking.hostId = "31da19c1";
time.timeZone = "Europe/London";
imports = [ ./hosts/tohru/configuration.nix ]; imports = [ ./hosts/tohru/configuration.nix ];
}; };
yevaud = { yevaud = { name, ... }: {
deployment.targetHost = "yevaud.birdsong.network"; deployment.targetHost = "${name}.birdsong.network";
networking.hostId = "09673d65";
time.timeZone = "Etc/UTC";
imports = [ ./hosts/yevaud/configuration.nix ]; imports = [ ./hosts/yevaud/configuration.nix ];
}; };
} }

View file

@ -4,7 +4,6 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../users/qenya.nix
./home.nix ./home.nix
]; ];
@ -12,12 +11,8 @@
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.editor = false; boot.loader.systemd-boot.editor = false;
networking.hostName = "tohru";
networking.hostId = "31da19c1";
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8"; i18n.defaultLocale = "en_GB.UTF-8";
console.keyMap = "uk"; console.keyMap = "uk";
@ -34,9 +29,7 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
colmena colmena
git
npins npins
wget
]; ];
programs.steam = { programs.steam = {

View file

@ -4,7 +4,6 @@
imports = imports =
[ [
./hardware-configuration.nix ./hardware-configuration.nix
../../users/qenya.nix
../../services/nginx.nix ../../services/nginx.nix
../../services/openssh.nix ../../services/openssh.nix
]; ];
@ -12,11 +11,6 @@
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "yevaud";
networking.hostId = "09673d65";
time.timeZone = "Etc/UTC";
services.nginx.virtualHosts = { services.nginx.virtualHosts = {
"git.katherina.rocks" = { "git.katherina.rocks" = {
forceSSL = true; forceSSL = true;