The godconfig dear god

main
Johannes Hendrik Gerard van der Weide 2023-11-06 20:14:02 +01:00
parent d9fa0a8858
commit daece86e42
50 changed files with 982 additions and 107 deletions

View File

@ -0,0 +1,11 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{ outputs, lib, config, pkgs, ... }:
{
# Set hostname
networking.hostName = "puter";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.05";
}

View 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" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d42a3a57-a48e-442c-8c39-eaa4d908c655";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-528cf9f0-1010-4643-b33d-4556cbbd8e12".device = "/dev/disk/by-uuid/528cf9f0-1010-4643-b33d-4556cbbd8e12";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/42F5-ED7B";
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.wlp170s0.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;
}

View File

@ -0,0 +1,30 @@
{ config, pkgs, inputs, ... }:
{
# Allow unfree packages
nixpkgs.config = {
permittedInsecurePackages = [
"electron-24.8.6"
"electron-22.3.27"
];
};
# Fonts
fonts.packages = [
pkgs.ibm-plex
];
environment = {
# Systemwide installed packages
systemPackages = with pkgs; [
# System
gnome.gnome-control-center
gnome.nautilus
gnome.file-roller
alacritty
gnome-text-editor
warp
tor-browser-bundle-bin
# Utils
popsicle
];
};
}

View File

@ -0,0 +1,28 @@
{ config, pkgs, ... }:
{
networking.hostName = "HermitCollective";
networking.domain = "hermitcollective.net";
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
};
# Accept ACME terms
security.acme.acceptTerms = true;
security.acme.defaults.email = "hertog@fsfe.org";
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 22 80 443 8080 8181 1935 ];
# networking.firewall.allowedUDPPorts = [ ... ];
# 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. Its 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?
}

View File

@ -0,0 +1,43 @@
# 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" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/94c7af9d-2a39-4ae1-9447-91b1bacec334";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/B7A8-E52E";
fsType = "vfat";
};
fileSystems."/mnt/sdb" =
{ device = "/dev/disk/by-uuid/e5d63d88-bbc6-4532-9636-69587868ca6b";
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.enp6s0.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;
}

View File

@ -0,0 +1,12 @@
{ config, pkgs, inputs, ... }:
{
environment = {
# Systemwide installed packages
systemPackages = with pkgs; [
iftop
openssl
git
];
};
}

13
Programs/firefox.nix Normal file
View File

@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
programs.firefox = {
enable = true;
profiles.hertog = {
isDefault = true;
name = "Hertog";
path = "/home/hertog/.mozilla/firefox/7p5jc0z4.default";
};
};
}

11
Programs/git.nix Normal file
View File

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
# Git configuration
programs.git = {
enable = true;
userName = "Johannes Hendrik Gerard van der Weide";
userEmail = "hertog@fsfe.org";
};
}

13
Programs/helix.nix Normal file
View File

@ -0,0 +1,13 @@
{ pkgs, ... }:
{
# Helix configuration
programs.helix = {
enable = true;
defaultEditor = false;
settings = {
theme = "adwaita-dark";
};
};
}

15
Programs/hyfetch.nix Normal file
View File

@ -0,0 +1,15 @@
{ pkgs, config, ... }:
{
# Hyfetch config :3
programs.hyfetch = {
enable = true;
settings = {
preset = "bisexual";
mode = "rgb";
color_align = {
mode = "horizontal";
};
};
};
}

27
Programs/neovim.nix Normal file
View File

@ -0,0 +1,27 @@
{ config, pkgs, ... }:
{
programs.neovim = {
enable = true;
defaultEditor = true;
vimAlias = true;
coc = {
enable = true;
};
# VimRC
extraConfig = ''
set background=dark
colorscheme PaperColor
'';
extraLuaConfig = ''
print("Welcome to Vim Hertog! :3")
'';
# Plugins
plugins = with pkgs.vimPlugins; [
vim-nix
nvim-treesitter-parsers.cpp
papercolor-theme
];
};
}

9
Programs/obs.nix Normal file
View File

@ -0,0 +1,9 @@
{ pkgs, ... }:
{
# OBS studio configuration
programs.obs-studio = {
enable = true;
};
}

38
Programs/zsh.nix Normal file
View File

@ -0,0 +1,38 @@
{ pkgs, ... }:
{
# Zsh config
programs.zsh = {
enable = true;
initExtra = "
hyfetch
";
shellAliases = {
ll = "ls -l";
please = "sudo";
update = "sudo nixos-rebuild switch --flake /etc/nixos/";
};
plugins = [
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "v0.7.0";
sha256 = "149zh2rm59blr2q458a5irkfh82y3dwdich60s9670kl3cl5h2m1";
};
}
];
oh-my-zsh = {
enable = true;
plugins = [
"git"
"thefuck"
"sudo"
];
theme = "mh";
};
};
}

View File

@ -8,4 +8,4 @@
recommendedProxySettings = true;
recommendedTlsSettings = true;
};
}
}

View File

@ -26,7 +26,7 @@
tt_rss-users tt_rss tt_rss
'';
};
services.nginx.virtualHosts."feeds.hermitcollective.net" = { # TT-RSS hostname
enableACME = true; # Use ACME certs
forceSSL = true; # Force SSL

View File

@ -7,4 +7,4 @@
enableACME = true;
root = "/var/www/blog.hermitcollective.net/docs";
};
}
}

View File

@ -5,6 +5,6 @@
services.nginx.virtualHosts."hermitcollective.net" = {
forceSSL = true;
enableACME = true;
root = "/var/www/hermitcollective.net";
root = "/var/www/hermitcollective.net/docs";
};
}
}

View File

@ -7,4 +7,4 @@
enableACME = true;
root = "/var/www/hertog.hermitcollective.net";
};
}
}

12
System/appliances.nix Normal file
View File

@ -0,0 +1,12 @@
{ config, ... }:
{
# Enable support for flashing zsa keyboards and the flipperzero their firmware
hardware = {
keyboard.zsa.enable = true;
flipperzero.enable = true;
};
# Enable CUPS to print documents.
services.printing.enable = true;
}

20
System/audio.nix Normal file
View File

@ -0,0 +1,20 @@
{ config, ... }:
{
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
}

39
System/configuration.nix Normal file
View File

@ -0,0 +1,39 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{ outputs, lib, config, pkgs, ... }:
{
nix = {
settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Deduplicate and optimize nix store
auto-optimise-store = true;
};
};
# Bootloader.
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot = {
enable = true;
editor = false;
};
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# Select internationalisation properties.
i18n.defaultLocale = "nl_NL.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "nl_NL.UTF-8";
LC_IDENTIFICATION = "nl_NL.UTF-8";
LC_MEASUREMENT = "nl_NL.UTF-8";
LC_MONETARY = "nl_NL.UTF-8";
LC_NAME = "nl_NL.UTF-8";
LC_NUMERIC = "nl_NL.UTF-8";
LC_PAPER = "nl_NL.UTF-8";
LC_TELEPHONE = "nl_NL.UTF-8";
LC_TIME = "nl_NL.UTF-8";
};
}

8
System/getty.nix Normal file
View File

@ -0,0 +1,8 @@
{ config, lib, ... }:
{
services.getty = {
helpLine = "";
greetingLine = "Welcome hermit!";
};
}

22
System/gnome.nix Normal file
View File

@ -0,0 +1,22 @@
{ config, pkgs, ... }:
{
# Enable the X11 windowing system.
services.xserver = {
enable = true;
layout = "nl";
xkbVariant = "us";
libinput.enable = true;
displayManager.gdm.enable = true;
desktopManager = {
gnome.enable = true;
xterm.enable = false;
};
};
# Disable gnome default apps while keeping the gnome settings daemon
services.gnome = {
core-utilities.enable = false;
};
services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
}

39
System/packages.nix Normal file
View File

@ -0,0 +1,39 @@
{ config, pkgs, inputs, ... }:
{
# Allow unfree packages
nixpkgs.config = {
allowUnfree = true;
};
# Set zsh (config is still per user)
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
environment = {
# Default shell
shells = [ pkgs.zsh ];
# Other defaults
variables = {
EDITOR = "vi";
SYSTEMD_EDITOR = "vi";
VISUAL = "vi";
};
# Nixos default installed packages (this is set to get rid of nano >:3 )
defaultPackages = with pkgs; [
nvi
perl
rsync
strace
];
# Systemwide installed packages
systemPackages = with pkgs; [
ranger
parted
util-linux
bottom
curl
wget
gitui
lynx
];
};
}

13
Users/Hertog/firefox.nix Normal file
View File

@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
programs.firefox = {
enable = true;
profiles.hertog = {
isDefault = true;
name = "Hertog";
path = "/home/hertog/.mozilla/firefox/7p5jc0z4.default";
};
};
}

11
Users/Hertog/git.nix Normal file
View File

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
# Git configuration
programs.git = {
enable = true;
userName = "Johannes Hendrik Gerard van der Weide";
userEmail = "hertog@fsfe.org";
};
}

13
Users/Hertog/helix.nix Normal file
View File

@ -0,0 +1,13 @@
{ pkgs, ... }:
{
# Helix configuration
programs.helix = {
enable = true;
defaultEditor = false;
settings = {
theme = "adwaita-dark";
};
};
}

66
Users/Hertog/homeFull.nix Normal file
View File

@ -0,0 +1,66 @@
{ config, pkgs, ... }:
{
home = {
stateVersion = "23.05";
username = "hertog";
homeDirectory = "/home/hertog";
packages = with pkgs; [
# Base
epiphany
firefox
thunderbird
telegram-desktop
vlc
bottles
# Office
slack
onlyoffice-bin
marker
# Security
keepassxc
# Entertainment
steam
cartridges
prismlauncher-qt5
qFlipper
protonup-qt
stremio
spotify
# Art
inkscape
gimp
# Shell
thefuck
pmbootstrap
wally-cli
# Programming
godot_4
superTuxKart
signal-desktop
logseq
apostrophe
blanket
bookworm
retroarch
libretro.flycast
endeavour
R
rstudio
qemu
qemu_kvm
nixos-generators
];
};
imports = [
# Home-manager configured program files
./neovim.nix
./helix.nix
./obs.nix
./hyfetch.nix
./zsh.nix
./git.nix
];
programs.home-manager.enable = true;
}

View File

@ -0,0 +1,22 @@
{ config, pkgs, ... }:
{
home = {
stateVersion = "23.05";
username = "hertog";
homeDirectory = "/home/hertog";
packages = with pkgs; [
# Base
thefuck
];
};
imports = [
# Home-manager configured program files
./neovim.nix
./hyfetch.nix
./zsh.nix
./git.nix
];
programs.home-manager.enable = true;
}

15
Users/Hertog/hyfetch.nix Normal file
View File

@ -0,0 +1,15 @@
{ pkgs, config, ... }:
{
# Hyfetch config :3
programs.hyfetch = {
enable = true;
settings = {
preset = "bisexual";
mode = "rgb";
color_align = {
mode = "horizontal";
};
};
};
}

27
Users/Hertog/neovim.nix Normal file
View File

@ -0,0 +1,27 @@
{ config, pkgs, ... }:
{
programs.neovim = {
enable = true;
defaultEditor = true;
vimAlias = true;
coc = {
enable = true;
};
# VimRC
extraConfig = ''
set background=dark
colorscheme PaperColor
'';
extraLuaConfig = ''
print("Welcome to Vim Hertog! :3")
'';
# Plugins
plugins = with pkgs.vimPlugins; [
vim-nix
nvim-treesitter-parsers.cpp
papercolor-theme
];
};
}

9
Users/Hertog/obs.nix Normal file
View File

@ -0,0 +1,9 @@
{ pkgs, ... }:
{
# OBS studio configuration
programs.obs-studio = {
enable = true;
};
}

14
Users/Hertog/user.nix Normal file
View File

@ -0,0 +1,14 @@
{ config, pkgs, ... }:
{
users.users.hertog = {
# Left empty so no password is needed in iso
initialPassword = "";
isNormalUser = true;
description = "Johannes Hendrik Gerard van der Weide";
extraGroups = [ "networkmanager" "wheel" "sudo" "adm" "video" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEjpvCSpIUMsZ8pmz2LbvsJUdYroenTp6PYXw9ACiYBq hertog@fsfe.org"
];
};
}

38
Users/Hertog/zsh.nix Normal file
View File

@ -0,0 +1,38 @@
{ pkgs, ... }:
{
# Zsh config
programs.zsh = {
enable = true;
initExtra = "
hyfetch
";
shellAliases = {
ll = "ls -l";
please = "sudo";
update = "sudo nixos-rebuild switch --flake /etc/nixos/";
};
plugins = [
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "v0.7.0";
sha256 = "149zh2rm59blr2q458a5irkfh82y3dwdich60s9670kl3cl5h2m1";
};
}
];
oh-my-zsh = {
enable = true;
plugins = [
"git"
"thefuck"
"sudo"
];
theme = "mh";
};
};
}

11
Users/Sara/git.nix Normal file
View File

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
# Git configuration
programs.git = {
enable = true;
userName = "Sara Gerretsen";
userEmail = "sara@saragerretsen.nl";
};
}

43
Users/Sara/homeFull.nix Normal file
View File

@ -0,0 +1,43 @@
{ config, pkgs, ... }:
{
home = {
stateVersion = "23.05";
username = "sara";
homeDirectory = "/home/sara";
packages = with pkgs; [
# Base
firefox
thunderbird
signal-desktop
# Office
onlyoffice-bin
# Security
keepassxc
# Entertainment
stremio
spotify
# Art
inkscape
# Shell
thefuck
# Programming
gcc
cmake
make
godot_4
rustc
rustup
cargo
];
};
imports = [
# Home-manager configured program files
./neovim.nix
./hyfetch.nix
./zsh.nix
./git.nix
];
programs.home-manager.enable = true;
}

View File

@ -0,0 +1,22 @@
{ config, pkgs, ... }:
{
home = {
stateVersion = "23.05";
username = "sara";
homeDirectory = "/home/sara";
packages = with pkgs; [
# Base
thefuck
];
};
imports = [
# Home-manager configured program files
./neovim.nix
./hyfetch.nix
./zsh.nix
./git.nix
];
programs.home-manager.enable = true;
}

15
Users/Sara/hyfetch.nix Normal file
View File

@ -0,0 +1,15 @@
{ pkgs, config, ... }:
{
# Hyfetch config :3
programs.hyfetch = {
enable = true;
settings = {
preset = "trans";
mode = "rgb";
color_align = {
mode = "horizontal";
};
};
};
}

27
Users/Sara/neovim.nix Normal file
View File

@ -0,0 +1,27 @@
{ config, pkgs, ... }:
{
programs.neovim = {
enable = true;
defaultEditor = true;
vimAlias = true;
coc = {
enable = true;
};
# VimRC
extraConfig = ''
set background=dark
colorscheme PaperColor
'';
extraLuaConfig = ''
print("Welcome to Vim Sara! :3")
'';
# Plugins
plugins = with pkgs.vimPlugins; [
vim-nix
nvim-treesitter-parsers.cpp
papercolor-theme
];
};
}

14
Users/Sara/user.nix Normal file
View File

@ -0,0 +1,14 @@
{ config, pkgs, ... }:
{
users.users.sara = {
# Left empty so no password is needed in iso
initialPassword = "";
isNormalUser = true;
description = "Sara Gerretsen";
extraGroups = [ "networkmanager" "wheel" "sudo" "adm" "video" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBhmYV/SSGScbig1xXa7EHFwaxtD0e0QCorPUromR0nM sara@fedora-fw"
];
};
}

38
Users/Sara/zsh.nix Normal file
View File

@ -0,0 +1,38 @@
{ pkgs, ... }:
{
# Zsh config
programs.zsh = {
enable = true;
initExtra = "
hyfetch
";
shellAliases = {
ll = "ls -l";
please = "sudo";
};
plugins = [
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "v0.7.0";
sha256 = "149zh2rm59blr2q458a5irkfh82y3dwdich60s9670kl3cl5h2m1";
};
}
];
oh-my-zsh = {
enable = true;
plugins = [
"git"
"thefuck"
"sudo"
];
# Set the theme here
#theme = "mh";
};
};
}

View File

@ -1,79 +0,0 @@
{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
# Services
./services/ssh.nix
./services/nginx.nix
./services/uptime-kuma.nix
./services/nextcloud.nix
./services/tt-rss.nix
./services/owncast.nix
# Sites
./sites/hermitcollective.net
./sites/blog.hermitcollective.net
./sites/hertog.hermitcollective.net
# Users
./users/hertog.nix
./users/sara.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "HermitCollective";
networking.domain = "hermitcollective.net";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Accept ACME terms
security.acme.acceptTerms = true;
security.acme.defaults.email = "hertog@fsfe.org";
environment.systemPackages = with pkgs; [
neofetch
helix
hyfetch
bottom
iftop
openssl
git
];
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 22 80 443 8080 8181 1935 ];
# 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. Its 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?
nix.settings.experimental-features = [ "nix-command" "flakes" ];
}

48
flake.lock Normal file
View File

@ -0,0 +1,48 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1698670511,
"narHash": "sha256-jQIu3UhBMPHXzVkHQO1O2gg8SVo5lqAVoC6mOaLQcLQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "8e5416b478e465985eec274bc3a018024435c106",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1699099776,
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

100
flake.nix Normal file
View File

@ -0,0 +1,100 @@
{
description = "NixOS system configuration";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, ... }@inputs:
let
system = "x86_64-linux";
currentSystem = system;
pkgs = import nixpkgs {
inherit system;
};
lib = nixpkgs.lib;
in {
nixosConfigurations = {
# Configuration for my framework 13 inch 11gen laptop
laptop = lib.nixosSystem {
inherit system;
modules = [
# Set hardware config for the right host
./Hosts/hertog-laptop/hardware-configuration.nix
# System
./System/configuration.nix
./Hosts/hertog-laptop/configuration.nix
# Comment out what's needed based on host
#./System/getty.nix
./System/gnome.nix
./System/audio.nix
# Appliances is where printer support is enabled but also things like flipperzero flashing
./System/appliances.nix
# Systemwide installed pacakges userpackages are set through home-manager
./System/packages.nix
./Hosts/hertog-laptop/packages.nix
# Users still need to be set outside of home-manager
./Users/Hertog/user.nix
# Home manager imports
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.hertog = import ./Users/Hertog/homeFull.nix;
};
}
];
specialArgs = {
inputs = inputs;
inherit system;
};
};
# HermitCollective Server config
server = lib.nixosSystem {
inherit system;
modules = [
# System configuration
./Hosts/hertog-server/hardware-configuration.nix
./System/configuration.nix
./Hosts/hertog-server/configuration.nix
./System/getty.nix
./System/packages.nix
./Hosts/hertog-server/packages.nix
# Services
./Services/ssh.nix
./Services/nginx.nix
./Services/nextcloud.nix
./Services/tt-rss.nix
./Services/owncast.nix
./Services/uptime-kuma.nix
# Sites
./Sites/hermitcollective.net
./Sites/blog.hermitcollective.net
./Sites/hertog.hermitcollective.net
# Users
./Users/Hertog/user.nix
./Users/Sara/user.nix
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.hertog = import ./Users/Hertog/homeMinimal.nix;
users.sara = import ./Users/Sara/homeMinimal.nix;
};
}
];
specialArgs = {
inputs = inputs;
inherit system;
};
};
};
};
}

View File

@ -1,10 +0,0 @@
{ config, pkgs, ... }:
{
users.users.hertog = {
isNormalUser = true;
description = "Johannes Hendrik Gerard van der Weide";
extraGroups = [ "networkmanager" "wheel" "podman" ];
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEjpvCSpIUMsZ8pmz2LbvsJUdYroenTp6PYXw9ACiYBq hertog@fsfe.org"];
packages = with pkgs; [];
};
}

View File

@ -1,12 +0,0 @@
{ config, pkgs, ... }:
{
users.users.sara = {
isNormalUser = true;
description = "Sara Gerretsen";
extraGroups = [ "networkmanager" "wheel" "podman" ];
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBhmYV/SSGScbig1xXa7EHFwaxtD0e0QCorPUromR0nM sara@fedora-fw"];
packages = with pkgs; [
# User packages go here
];
};
}