Skip to content

Commit

Permalink
feat(nixos): cachixe
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Dec 12, 2023
1 parent 8335cd0 commit c38b5f9
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
19 changes: 19 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,25 @@
in
{
nixosConfigurations = {
cachixe = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{ nixpkgs.overlays = overlays; }
./machines/cachixe.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.carlos = {
imports = [
./modules/home.nix
./modules/nixos.nix
./modules/shell.nix
];
};
}
];
};
media = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
Expand Down
24 changes: 24 additions & 0 deletions machines/cachixe.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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’).
{ ... }:
{
imports =
[
./shared.nix
./hardware/cachixe.nix
];

networking.hostName = "cachixe";
services.qemuGuest.enable = 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. It‘s 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 = "23.11"; # Did you read the comment?
}

34 changes: 34 additions & 0 deletions machines/hardware/cachixe.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 + "/profiles/qemu-guest.nix")
];

boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];

fileSystems."/" =
{
device = "/dev/disk/by-uuid/7f2e80b5-39cb-4f10-b0ce-977eb2246b56";
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.ens18.useDHCP = lib.mkDefault true;

nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

0 comments on commit c38b5f9

Please sign in to comment.