Updates to raspi server

This commit is contained in:
Alexander Bantyev 2021-11-06 12:06:38 +03:00
parent b4ad926d08
commit 7633581020
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
7 changed files with 21 additions and 20 deletions

View File

@ -130,21 +130,16 @@
deploy = {
user = "root";
nodes = (builtins.mapAttrs (_: machine: {
nodes = (builtins.mapAttrs (name: machine:
let activateable = name == "T420-Laptop" || name == "RasPi-Server"; in {
hostname = machine.config.networking.hostName;
profiles.system = {
user = "balsoft";
path = deploy-rs.lib.x86_64-linux.activate.noop
machine.config.system.build.toplevel;
user = if activateable then "root" else "balsoft";
path = with deploy-rs.lib.${machine.pkgs.system}.activate; if activateable
then nixos machine
else noop machine.config.system.build.toplevel;
};
}) self.nixosConfigurations) // {
T420-Laptop = {
hostname =
self.nixosConfigurations.T420-Laptop.config.networking.hostName;
profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.T420-Laptop;
};
};
}) self.nixosConfigurations);
};
};
}

View File

@ -1,8 +1,12 @@
{ inputs, ... }: {
imports = with inputs.self.nixosModules; [
{ inputs, pkgs, lib, ... }: {
imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [
./hardware-configuration.nix
inputs.self.nixosRoles.server
mailserver
themes
fonts
cage
gtk
alacritty
];
boot.loader.raspberryPi = {
@ -10,6 +14,8 @@
version = 3;
};
nix.package = lib.mkForce pkgs.nixUnstable;
deviceSpecific.devInfo = {
cpu = {
vendor = "broadcom";

View File

@ -16,8 +16,6 @@
services.logind.lidSwitch = "ignore";
security.sudo.wheelNeedsPassword = false;
deviceSpecific.devInfo = {
legacy = true;
cpu = {

View File

@ -1,5 +1,5 @@
{ config, pkgs, inputs, lib, ... }: {
environment.systemPackages = [ inputs.himalaya.defaultPackage.x86_64-linux ];
environment.systemPackages = [ inputs.himalaya.defaultPackage.${pkgs.system} ];
home-manager.users.balsoft = {
xdg.configFile."himalaya/config.toml".text = ''
downloads-dir="/home/balsoft/Downloads/mail"

View File

@ -23,7 +23,7 @@
"serokell-1:aIojg2Vxgv7MkzPJoftOO/I8HKX622sT+c0fjnZBLj0="
];
package = inputs.nix.defaultPackage.x86_64-linux.overrideAttrs (oa: {
package = inputs.nix.defaultPackage.${pkgs.system}.overrideAttrs (oa: {
patches = [ ./nix.patch ./unset-is-macho.patch ] ++ oa.patches or [ ];
# HAHA
doInstallCheck = false;

View File

@ -2,7 +2,7 @@
let
filterGit =
builtins.filterSource (type: name: name != ".git" || type != "directory");
system = "x86_64-linux";
inherit (pkgs) system;
old = import inputs.nixpkgs-old ({
config = config.nixpkgs.config;
localSystem = { inherit system; };

View File

@ -2,4 +2,6 @@
imports = [
./base.nix
];
security.sudo.wheelNeedsPassword = false;
}