[lucia] successfull deploy

This commit is contained in:
2023-10-03 15:27:31 +02:00
parent a2114923d0
commit 93739f1ff3
4 changed files with 82 additions and 82 deletions

View File

@@ -54,22 +54,15 @@ in
];
};
rpi1_base_image = nixosSystem {
lucia_sd-img = nixosSystem {
system = "aarch64-linux";
modules = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-raspberrypi.nix"
./modules/sshd.nix
specialArgs.inputs = inputs;
modules = defaultModules ++ [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
./lucia/configuration.nix
{
nixpkgs.config.allowUnsupportedSystem = true;
nixpkgs.crossSystem.system = "aarch64-linux";
networking.hostName = "rp1_base_image";
networking.networkmanager.enable = true;
system.stateVersion = "22.11";
sdImage.compressImage = false;
}
];
};
}

View File

@@ -1,42 +1,42 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
zramSwap.enable = true;
zramSwap.memoryPercent = 150;
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
#"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
./hardware_configuration.nix
../modules/sshd.nix
../modules/malobeo_user.nix
];
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
boot.loader.grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf
boot.loader.generic-extlinux-compatible.enable = true;
networking.hostName = "lucia"; # Define your hostname.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
networking.dhcpcd.enable = true;
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkbOptions in tty.
# };
services = {
mopidy = {
enable = true;
configuration = ''
[core]
restore_state = true
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
#sound.enable = true;
#hardware.pulseaudio.enable = true;
[youtube]
allow_cache = true
youtube_dl_package = yt_dlp
'';
extensionPackages = with pkgs; [ mopidy-muse mopidy-youtube python3Packages.yt-dlp ];
};
};
networking.firewall.allowedTCPPorts = [ 6680 ];
environment.systemPackages = with pkgs; [
vim
@@ -44,38 +44,8 @@
wget
git
pciutils
nix-tree
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.05"; # Did you read the comment?
system.stateVersion = "23.05";
}

View File

@@ -0,0 +1,33 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enu1u1u1.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
}

View File

@@ -25,18 +25,22 @@ in (utils.lib.eachSystem (builtins.filter filter_system utils.lib.defaultSystems
nixosModules.malobeo = import ./machines/durruti/host_config.nix;
images.rpi1_base_image = nixosConfigurations.rpi1_base_image.config.system.build.sdImage;
packages.x86_64-linux = {
#images.lucia_base_image = nixosConfigurations.lucia.config.system.build.sdImage;
lucia_base_img = nixos-generators.nixosGenerate {
system = "aarch64-linux";
modules = [
./machines/modules/sshd.nix
{
networking.networkmanager.enable = true;
}
];
format = "sd-aarch64-installer";
};
};
#packages.x86_64-linux = {
# lucia_base_img = nixos-generators.nixosGenerate {
# system = "aarch64-linux";
# modules = [
# #"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-raspberrypi.nix"
# ./machines/modules/sshd.nix
# {
# nixpkgs.config.allowUnsupportedSystem = true;
# nixpkgs.crossSystem.system = "aarch64-linux";
# networking.dhcpcd.enable = true;
# }
# ];
# format = "sd-aarch64-installer";
# };
#};
}