Add host: bennu
- Separate nixpkgs for `sombrero` from `bennu`
This commit is contained in:
6
Makefile
6
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: switch
|
||||
.PHONY: bennu-switch
|
||||
|
||||
switch:
|
||||
nixos-rebuild switch --flake '.#'
|
||||
bennu-switch:
|
||||
nixos-rebuild switch --flake .#bennu
|
||||
|
||||
49
flake.lock
generated
49
flake.lock
generated
@@ -1,12 +1,33 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs2305"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1686929285,
|
||||
"narHash": "sha256-WGtVzn+vGMPTXDO0DMNKVFtf+zUSqeW+KKk4Y/Ae99I=",
|
||||
"lastModified": 1687871164,
|
||||
"narHash": "sha256-bBFlPthuYX322xOlpJvkjUBz0C+MOBjZdDOOJJ+G2jU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "07c347bb50994691d7b0095f45ebd8838cf6bc38",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs2211": {
|
||||
"locked": {
|
||||
"lastModified": 1688392541,
|
||||
"narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "93fddcf640ceca0be331210ba3101cee9d91c13d",
|
||||
"rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -16,9 +37,27 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs2305": {
|
||||
"locked": {
|
||||
"lastModified": 1689605451,
|
||||
"narHash": "sha256-u2qp2k9V1smCfk6rdUcgMKvBj3G9jVvaPHyeXinjN9E=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "53657afe29748b3e462f1f892287b7e254c26d77",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs2211": "nixpkgs2211",
|
||||
"nixpkgs2305": "nixpkgs2305"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
26
flake.nix
26
flake.nix
@@ -1,12 +1,32 @@
|
||||
{
|
||||
description = "nixos configs";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
|
||||
nixpkgs2305.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
nixpkgs2211.url = "github:nixos/nixpkgs/nixos-22.11";
|
||||
home-manager.url = "github:nix-community/home-manager/release-23.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs2305";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs }: {
|
||||
nixosConfigurations.sombrero = nixpkgs.lib.nixosSystem {
|
||||
outputs = { self, nixpkgs2305, nixpkgs2211, home-manager, ... }: {
|
||||
nixosConfigurations = {
|
||||
bennu = nixpkgs2305.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/bennu/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.alex = import ./hosts/bennu/home.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
sombrero = nixpkgs2211.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [ ./hosts/sombrero/configuration.nix ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
13
hosts/bennu/configs/.gitconfig
Normal file
13
hosts/bennu/configs/.gitconfig
Normal file
@@ -0,0 +1,13 @@
|
||||
[user]
|
||||
name = Alexander Heldt
|
||||
email = me@alexanderheldt.se
|
||||
|
||||
[core]
|
||||
editor = "vim"
|
||||
|
||||
[url "git@github.com:"]
|
||||
insteadOf = https://github.com/
|
||||
|
||||
[url "git@gitlab.com:"]
|
||||
insteadOf = https://gitlab.com/
|
||||
|
||||
107
hosts/bennu/configuration.nix
Normal file
107
hosts/bennu/configuration.nix
Normal file
@@ -0,0 +1,107 @@
|
||||
# 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, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Setup keyfile
|
||||
boot.initrd.secrets = {
|
||||
"/crypto_keyfile.bin" = null;
|
||||
};
|
||||
|
||||
networking.hostName = "bennu"; # Define your hostname.
|
||||
#networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Stockholm";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "sv_SE.UTF-8";
|
||||
LC_IDENTIFICATION = "sv_SE.UTF-8";
|
||||
LC_MEASUREMENT = "sv_SE.UTF-8";
|
||||
LC_MONETARY = "sv_SE.UTF-8";
|
||||
LC_NAME = "sv_SE.UTF-8";
|
||||
LC_NUMERIC = "sv_SE.UTF-8";
|
||||
LC_PAPER = "sv_SE.UTF-8";
|
||||
LC_TELEPHONE = "sv_SE.UTF-8";
|
||||
LC_TIME = "sv_SE.UTF-8";
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
layout = "se";
|
||||
xkbVariant = "";
|
||||
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "sv-latin1";
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.alex = {
|
||||
isNormalUser = true;
|
||||
description = "alex";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [];
|
||||
|
||||
# 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;
|
||||
|
||||
# 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.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
40
hosts/bennu/hardware-configuration.nix
Normal file
40
hosts/bennu/hardware-configuration.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
# 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 = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/9c3ef2ad-0244-4310-9984-2e548ced3e22";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-f569d036-e500-4839-bc78-ce4b032840d8".device = "/dev/disk/by-uuid/f569d036-e500-4839-bc78-ce4b032840d8";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/FCAE-6849";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
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.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
24
hosts/bennu/home.nix
Normal file
24
hosts/bennu/home.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.username = "alex";
|
||||
home.homeDirectory = "/home/alex";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
vim
|
||||
emacs
|
||||
gnumake
|
||||
tig
|
||||
firefox-devedition-unwrapped
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
includes = [
|
||||
{ path = ./configs/.gitconfig; }
|
||||
];
|
||||
};
|
||||
|
||||
home.stateVersion = "23.05";
|
||||
}
|
||||
Reference in New Issue
Block a user