2
2
mirror of https://git.feal.no/felixalb/nixos-config.git synced 2024-12-22 04:07:28 +01:00

Add edison

This commit is contained in:
Felix Albrigtsen 2023-09-13 23:40:50 +02:00 committed by Felix Albrigtsen
parent 6b8599d30a
commit a0693ca9fc
4 changed files with 124 additions and 0 deletions

View File

@ -42,6 +42,7 @@
environment.systemPackages = with pkgs; [
bat
bottom
exa
git
gnugrep
gnutar

View File

@ -47,6 +47,19 @@
matrix-synapse-next.nixosModules.synapse
];
};
edison = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
# Overlays-module makes "pkgs.unstable" available in configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/edison/configuration.nix
sops-nix.nixosModules.sops
];
};
chapel = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {

View File

@ -0,0 +1,69 @@
{ config, pkgs, ... }:
{
imports =
[
../../base.nix
../../common/metrics-exporters.nix
./hardware-configuration.nix
];
networking = {
hostName = "edison";
defaultGateway = "192.168.10.1";
nameservers = [ "192.168.11.100" "1.1.1.1" ];
interfaces.eno1.ipv4 = {
addresses = [
{ address = "192.168.10.170"; prefixLength = 24; }
];
};
hostId = "8f84a235";
};
# sops.defaultSopsFile = ../../secrets/edison/edison.yaml;
environment.variables = { EDITOR = "vim"; };
environment.systemPackages = with pkgs; [
((vim_configurable.override { }).customize{
name = "vim";
vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
start = [ vim-nix vim-lastplace vim-commentary ];
opt = [];
};
vimrcConfig.customRC = ''
" your custom vimrc
set number
set relativenumber
set nu rnu
set signcolumn=number
set hlsearch
set smartcase
set incsearch
set autoindent
set expandtab
set shiftwidth=2
set tabstop=2
set smartindent
set smarttab
set ruler
set undolevels=1000
set nocompatible
set backspace=indent,eol,start
" Turn on syntax highlighting by default
syntax on
" ...
'';
}
)
];
networking.firewall.allowedTCPPorts = [ 22 ];
system.stateVersion = "23.05";
}

View File

@ -0,0 +1,41 @@
# 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" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/14b254e1-d94f-4b9b-a910-7fcf7e33af46";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/A197-7913";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/d56040a0-3009-4899-95fa-1b82e60e32e4"; }
];
# 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.enp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.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;
}