diff --git a/flake.nix b/flake.nix index fc6e9f3..a25acfc 100644 --- a/flake.nix +++ b/flake.nix @@ -121,6 +121,25 @@ } ]; }; + + malcolm = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit inputs; + }; + modules = [ + # Overlays-module makes "pkgs.unstable" available in configuration.nix + ({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; }) + + ./hosts/malcolm/configuration.nix + sops-nix.nixosModules.sops + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users."felixalb" = import ./hosts/malcolm/home.nix; + } + ]; + }; }; darwinConfigurations.worf = nix-darwin.lib.darwinSystem { diff --git a/hosts/malcolm/configuration.nix b/hosts/malcolm/configuration.nix new file mode 100644 index 0000000..7e345f3 --- /dev/null +++ b/hosts/malcolm/configuration.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + + ../../base.nix + ../../common/metrics-exporters.nix + ]; + + networking = { + hostName = "malcolm"; + bridges.br0.interfaces = [ "ens18" ]; + interfaces.br0.useDHCP = false; + interfaces.br0.ipv4.addresses = [ + { address = "192.168.11.106"; prefixLength = 24; } + ]; + + hostId = "620c42d0"; + defaultGateway = "192.168.11.1"; + }; + + + system.stateVersion = "24.05"; # Did you read the comment? +} diff --git a/hosts/malcolm/hardware-configuration.nix b/hosts/malcolm/hardware-configuration.nix new file mode 100644 index 0000000..f4a4021 --- /dev/null +++ b/hosts/malcolm/hardware-configuration.nix @@ -0,0 +1,30 @@ +# 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/7240554f-d9d9-457a-91d5-c70c09d96595"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/88C2-BAC8"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/hosts/malcolm/home.nix b/hosts/malcolm/home.nix new file mode 100644 index 0000000..04b5729 --- /dev/null +++ b/hosts/malcolm/home.nix @@ -0,0 +1,12 @@ +{ pkgs, lib, ... }: +{ + imports = [ + ./../../home/base.nix + ]; + + programs = { + zsh.shellAliases."rebuild" = "sudo nixos-rebuild switch --flake /config"; + }; + + home.stateVersion = "24.05"; +}