sisko: Init new host

This commit is contained in:
Felix Albrigtsen 2024-11-30 23:36:53 +01:00
parent c281b2de38
commit 8759e193ff
7 changed files with 238 additions and 0 deletions

View File

@ -97,6 +97,9 @@
# Web host # Web host
malcolm = normalSys "malcolm" { }; malcolm = normalSys "malcolm" { };
# Home desktop
sisko = normalSys "sisko" { };
}; };
# Daily driver macbook # Daily driver macbook

View File

@ -41,6 +41,9 @@
name = "Felix Albrigtsen"; name = "Felix Albrigtsen";
email = lib.mkDefault "felix@albrigtsen.it"; email = lib.mkDefault "felix@albrigtsen.it";
}; };
safe = {
directory = "/config";
};
}; };
ignores = [ ignores = [
"*~" "*~"

View File

@ -0,0 +1,10 @@
{ config, pkgs, lib, ... }:
{
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
};
environment.systemPackages = with pkgs; [
];
}

View File

@ -0,0 +1,40 @@
{ config, pkgs, lib, ... }:
{
imports =
[
../../base.nix
../../common/metrics-exporters.nix
./hardware-configuration.nix
./desktop.nix
./applications.nix
];
networking = {
hostName = "sisko";
defaultGateway = "192.168.10.1";
interfaces.enp14s0.ipv4 = {
addresses = [
{ address = "192.168.10.172"; prefixLength = 24; }
];
};
hostId = "b716d781";
};
hardware.bluetooth.enable = true;
sops.defaultSopsFile = ../../secrets/sisko/sisko.yaml;
environment.variables = { EDITOR = "vim"; };
nixpkgs.config = {
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"copilot.vim"
"steam"
"steam-unwrapped"
];
};
system.stateVersion = "24.11";
}

58
hosts/sisko/desktop.nix Normal file
View File

@ -0,0 +1,58 @@
{ config, pkgs, lib, ... }:
{
# Video
hardware.graphics = {
enable = true;
enable32Bit = true;
};
# services.displayManager.ly.enable = true;
programs.hyprland = {
enable = true;
withUWSM = true;
xwayland.enable = true;
};
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Audio
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
};
hardware.pulseaudio.enable = false;
# Misc
fonts = {
fontDir.enable = true;
packages = with pkgs; [
noto-fonts
noto-fonts-emoji
noto-fonts-cjk-sans
font-awesome
fira-code
hack-font
(nerdfonts.override {
fonts = [
"Hack"
];
})
];
};
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
SSH_AUTH_SOCK = "/run/user/${toString config.users.users.felixalb.uid}/keyring/ssh";
};
services.gnome.gnome-keyring.enable = true;
home-manager.users.felixalb = {
services = {
dunst.enable = true;
};
};
}

View File

@ -0,0 +1,48 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/60a70caf-ca37-488d-8c2a-98a7e9b67d84";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/60a70caf-ca37-488d-8c2a-98a7e9b67d84";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/60a70caf-ca37-488d-8c2a-98a7e9b67d84";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/12CE-A600";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ {
device = "/swapfile";
size = 64*1024;
} ];
networking.useDHCP = lib.mkDefault false;
# networking.interfaces.enp14s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp15s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

76
hosts/sisko/home.nix Normal file
View File

@ -0,0 +1,76 @@
{ pkgs, lib, ... }:
{
imports = [
./../../home/base.nix
./../../home/alacritty.nix
];
home.packages = with pkgs; [
bc
catimg
chromium
dante
dig
element-desktop
hunspellDicts.en_US
hunspellDicts.nb_NO
jq
libreoffice
mpv
nixpkgs-2211.remmina
openssl
pwgen
unstable.tlclient
traceroute
virt-manager
w3m
(unstable.python311.withPackages (ps: with ps; [
numpy
pycryptodome
requests
]))
];
programs = {
aerc = {
enable = true;
package = pkgs.unstable.aerc;
};
alacritty.enable = true;
firefox.enable = true;
rbw = {
enable = true;
settings = {
base_url = "https://pw.feal.no";
email = "felix@albrigtsen.it";
pinentry = pkgs.pinentry-gnome3;
};
};
rofi = {
enable = true;
theme = "iggy";
};
zsh = {
shellAliases."rebuild" = "sudo nixos-rebuild switch --flake /config";
prezto.pmodules = [ "ssh" ];
};
neovim.plugins = with pkgs.vimPlugins; [ copilot-vim ];
};
xdg.mimeApps = {
enable = true;
defaultApplications = {
"text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/about" = "firefox.desktop";
"x-scheme-handler/unknown" = "firefox.desktop";
};
};
home.stateVersion = "24.11";
}