Compare commits

...

3 commits

7 changed files with 50 additions and 43 deletions

View file

@ -11,7 +11,6 @@ in
time.timeZone = "Etc/UTC"; time.timeZone = "Etc/UTC";
# Allow remote deployment with colmena # Allow remote deployment with colmena
deployment.targetUser = null;
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
nix.settings.trusted-users = [ "@wheel" ]; nix.settings.trusted-users = [ "@wheel" ];
}; };

View file

@ -27,6 +27,36 @@
}; };
outputs = inputs@{ self, nixpkgs, home-manager, plasma-manager, nur, agenix, birdsong, ... }: { outputs = inputs@{ self, nixpkgs, home-manager, plasma-manager, nur, agenix, birdsong, ... }: {
nixosModules.default = {
nix.settings.experimental-features = "nix-command flakes";
nix.nixPath = [ "nixpkgs=flake:nixpkgs" ];
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ nur.overlay ];
# TODO: make this or something like it work without infinite recursion
# home-manager.users."qenya" = lib.mkIf (config.users.users ? "qenya") self.homeManagerModules."qenya";
home-manager.users."qenya" = self.homeManagerModules."qenya";
imports = [
home-manager.nixosModules.home-manager
nur.nixosModules.nur
agenix.nixosModules.default
birdsong.nixosModules.default
./common
./services
];
};
# TODO: simplify
nixosConfigurations = {
"kilgharrah" = nixpkgs.lib.nixosSystem { modules = [ ./hosts/kilgharrah self.nixosModules.default ]; };
"tohru" = nixpkgs.lib.nixosSystem { modules = [ ./hosts/tohru self.nixosModules.default ]; };
"yevaud" = nixpkgs.lib.nixosSystem { modules = [ ./hosts/yevaud self.nixosModules.default ]; };
"orm" = nixpkgs.lib.nixosSystem { modules = [ ./hosts/orm self.nixosModules.default ]; };
"kalessin" = nixpkgs.lib.nixosSystem { modules = [ ./hosts/kalessin self.nixosModules.default ]; };
};
# The name of this output type is not standardised. I have picked # The name of this output type is not standardised. I have picked
# "homeManagerModules" as the discussion here suggests it's the most common: # "homeManagerModules" as the discussion here suggests it's the most common:
# https://github.com/nix-community/home-manager/issues/1783 # https://github.com/nix-community/home-manager/issues/1783
@ -45,39 +75,28 @@
colmena = { colmena = {
meta = { meta = {
nixpkgs = import nixpkgs { system = "x86_64-linux"; }; nixpkgs = import nixpkgs { system = "x86_64-linux"; };
nodeNixpkgs = { nodeNixpkgs = builtins.mapAttrs (name: value: value.pkgs) self.nixosConfigurations;
kalessin = import nixpkgs { system = "aarch64-linux"; }; # TODO: this should be generated from the host config somehow
};
};
defaults = { name, nodes, ... }: {
networking.hostName = name;
nix.settings.experimental-features = "nix-command flakes";
nix.nixPath = [ "nixpkgs=flake:nixpkgs" ];
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ nur.overlay ];
# TODO: make this or something like it work without infinite recursion
# home-manager.users."qenya" = lib.mkIf (config.users.users ? "qenya") self.homeManagerModules."qenya";
home-manager.users."qenya" = self.homeManagerModules."qenya";
imports = [
home-manager.nixosModules.home-manager
nur.nixosModules.nur
agenix.nixosModules.default
birdsong.nixosModules.default
./common
./services
];
}; };
# TODO: eliminate duplication with nixosConfigurations
defaults.imports = [ self.nixosModules.default ];
kilgharrah.imports = [ ./hosts/kilgharrah ]; kilgharrah.imports = [ ./hosts/kilgharrah ];
tohru.imports = [ ./hosts/tohru ]; tohru.imports = [ ./hosts/tohru ];
yevaud.imports = [ ./hosts/yevaud ]; yevaud.imports = [ ./hosts/yevaud ];
orm.imports = [ ./hosts/orm ]; orm.imports = [ ./hosts/orm ];
kalessin.imports = [ ./hosts/kalessin ]; kalessin.imports = [ ./hosts/kalessin ];
defaults.deployment = {
allowLocalDeployment = true;
buildOnTarget = true;
targetUser = null;
};
kilgharrah.deployment.targetHost = null;
tohru.deployment.targetHost = null;
yevaud.deployment.targetHost = "yevaud.birdsong.network";
orm.deployment.targetHost = "orm.birdsong.network";
kalessin.deployment.targetHost = "kalessin.birdsong.network";
}; };
# TODO: have this work on other systems too # TODO: have this work on other systems too

View file

@ -5,11 +5,8 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
networking.hostName = "kalessin";
networking.hostId = "534b538e"; networking.hostId = "534b538e";
deployment = {
targetHost = "kalessin.birdsong.network";
buildOnTarget = true;
};
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;

View file

@ -9,13 +9,9 @@
]; ];
nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.hostPlatform = "x86_64-linux";
networking.hostName = "kilgharrah";
networking.hostId = "72885bb5"; networking.hostId = "72885bb5";
deployment = {
allowLocalDeployment = true;
targetHost = null; # disallow remote deployment
};
qenya.base-graphical.enable = true; qenya.base-graphical.enable = true;
qenya.base-graphical.desktop = "plasma6"; qenya.base-graphical.desktop = "plasma6";

View file

@ -5,8 +5,8 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
networking.hostName = "orm";
networking.hostId = "00000000"; networking.hostId = "00000000";
deployment.targetHost = "orm.birdsong.network";
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;

View file

@ -11,13 +11,9 @@
]; ];
nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.hostPlatform = "x86_64-linux";
networking.hostName = "tohru";
networking.hostId = "31da19c1"; networking.hostId = "31da19c1";
deployment = {
allowLocalDeployment = true;
targetHost = null; # disallow remote deployment
};
qenya.base-graphical.enable = true; qenya.base-graphical.enable = true;
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";

View file

@ -5,8 +5,8 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
networking.hostName = "yevaud";
networking.hostId = "09673d65"; networking.hostId = "09673d65";
deployment.targetHost = "yevaud.birdsong.network";
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;