···60606161```
6262.
6363-├── homes # User home configuration
6363+├── users # User home configuration
6464│ │ ├── commons
6565│ │ └── <hostname>
6666-├── hosts # Host-specific configuration
6666+├── config # Host-specific configuration
6767│ └── <os> # Darwin or NixOS
6868│ │ └── <hostname>
6969├── lib # Custom functions needed to help configure
+53
config/darwin/helium/default.nix
···11+{ self, inputs, pkgs, hostname, ... }:
22+{
33+ imports = [
44+ ./homebrew
55+ ./system
66+ ];
77+88+ # pin nix group to already existant id
99+ ids.gids.nixbld = 30000;
1010+1111+ # Enable sudo via TouchID
1212+ security.pam.services.sudo_local.touchIdAuth = true;
1313+1414+ # Networking
1515+ networking.computerName = hostname;
1616+ networking.hostName = hostname;
1717+1818+ # Timezone
1919+ time.timeZone = "Europe/Paris";
2020+2121+ # System wide packages
2222+ environment.systemPackages = with pkgs; [
2323+ lazygit
2424+ kitty
2525+ just
2626+ firefox
2727+ spotify
2828+ discord
2929+ # _1password-gui
3030+ zed-editor
3131+ vscodium # used for jupyter notebook because not available in zed at this time
3232+ stats # System monitoring displayed in macos top bar - will be replaced by custom script with sketchybar
3333+ ];
3434+3535+ # Common system configurations
3636+ gems.system.garbageCollector.enable = true;
3737+3838+ # The platform the configuration will be used on.
3939+ nixpkgs.hostPlatform = "aarch64-darwin";
4040+4141+ # Allow packages
4242+ nixpkgs.config.allowUnfree = true;
4343+4444+ # Use nix as a daemon
4545+ nix.enable = true;
4646+4747+ # Enable flakes and other experimental features
4848+ nix.settings.experimental-features = [ "nix-command" "flakes" "pipe-operators" ];
4949+5050+ # Used for backwards compatibility, please read the changelog before changing.
5151+ # $ darwin-rebuild changelog
5252+ system.stateVersion = 5;
5353+}
···11+{
22+ homebrew.casks = [
33+ "beekeeper-studio" # find a better alternative
44+ "insomnia"
55+ "orbstack" # replace with simple docker desktop
66+ "figma"
77+ "obsidian"
88+ "zen-browser"
99+ "amethyst" # Window manager
1010+ "sf-symbols"
1111+ "font-hack-nerd-font" # move this to nix installation
1212+ "1password"
1313+ ];
1414+}
+22
config/darwin/helium/homebrew/default.nix
···11+{
22+ # Homebrew - Using for gui app because majority macos apps does not exists in nixpkgs repository
33+ imports = [
44+ ./brews.nix
55+ ./casks.nix
66+ ./masapps.nix
77+ ];
88+99+ homebrew.enable = true;
1010+ homebrew.onActivation = {
1111+ autoUpdate = true;
1212+ cleanup = "zap"; # uninstall all elements not listed
1313+ };
1414+1515+ # Repository authorized for homebrew
1616+ homebrew.taps = [
1717+ "homebrew/cask-versions"
1818+ "homebrew/cask-fonts"
1919+ "FelixKratz/formulae"
2020+ "mczachurski/wallpapper"
2121+ ];
2222+}
+6
config/darwin/helium/homebrew/masapps.nix
···11+{
22+ # Apps from App Store
33+ homebrew.masApps = {
44+ Xcode = 497799835;
55+ };
66+}
+19
config/darwin/helium/system/default.nix
···11+{
22+ imports = [
33+ ./dock.nix
44+ ./finder.nix
55+ ./nsglobaldomain.nix
66+ ];
77+88+ # Disable startup sound
99+ system.nvram.variables = {
1010+ "StartupMute" = "%01";
1111+ };
1212+1313+ system.defaults = {
1414+ # Deactivate state manager
1515+ WindowManager.GloballyEnabled = false;
1616+ # Text show in the login window
1717+ loginwindow.LoginwindowText = "Maybe you cannot touch me";
1818+ };
1919+}
+22
config/darwin/helium/system/dock.nix
···11+{
22+ system.defaults.dock = {
33+ autohide = true;
44+ orientation = "bottom"; # Set dock to bottom
55+ mru-spaces = false; # Auto arrange space based on the most recent use
66+ launchanim = false; # Remove animation when opening an app
77+ mineffect = "scale"; # Change animation from minimize/maximize app
88+ magnification = false;
99+ minimize-to-application = true; # Minimize app in app icon
1010+ show-recents = false; # Don't show recent open apps
1111+ tilesize = 32; # Set dock size
1212+1313+ # Set dock apps (remove all apps from dock)
1414+ persistent-apps = [];
1515+1616+ # Disable hot corners
1717+ wvous-bl-corner = 1;
1818+ wvous-br-corner = 1;
1919+ wvous-tl-corner = 1;
2020+ wvous-tr-corner = 1;
2121+ };
2222+}
+10
config/darwin/helium/system/finder.nix
···11+{
22+ system.defaults.screencapture.location = "~/Pictures/screenshots";
33+ system.defaults.finder = {
44+ AppleShowAllExtensions = true; # Show file extension
55+ AppleShowAllFiles = true; # Show hidden files
66+ FXPreferredViewStyle = "clmv"; # Set default view to column
77+ CreateDesktop = false; # Disable show icon on desktop
88+ FXDefaultSearchScope = "SCcf"; # Set default search scope to current folder
99+ };
1010+}
+22
config/darwin/helium/system/nsglobaldomain.nix
···11+{
22+ system.defaults.NSGlobalDomain = {
33+ # Switch between dark and light mode automatically
44+ AppleInterfaceStyleSwitchesAutomatically = true;
55+ # Disable saving new documents to icloud
66+ NSDocumentSaveNewDocumentsToCloud = false;
77+ # Time before the key is repeated
88+ # InitialKeyRepeat = 7;
99+ # Time between repeat key
1010+ # KeyRepeat = 6;
1111+ # Window open animation
1212+ NSAutomaticWindowAnimationsEnabled = false;
1313+ # Icon size in finder
1414+ NSTableViewDefaultSizeMode = 2;
1515+ # Drag from anywhere a window to move it
1616+ NSWindowShouldDragOnGesture = true;
1717+ # Deativate sound bip when volume is changed
1818+ "com.apple.sound.beep.feedback" = 0;
1919+ # Natural scrolling direction
2020+ "com.apple.swipescrolldirection" = true;
2121+ };
2222+}
+36
config/nixos/beryllium/default.nix
···11+{ self, inputs, pkgs, hostname, ... }:
22+{
33+ # WSL configuration
44+ wsl.enable = true;
55+ wsl.docker-desktop.enable = true;
66+77+ # Networking
88+ networking.hostName = hostname;
99+1010+ # Global packages
1111+ environment.systemPackages = with pkgs; [
1212+ git
1313+ wget
1414+ php84
1515+ nodejs_23
1616+ ];
1717+1818+ # Required to use it as vscode remote
1919+ programs.nix-ld = {
2020+ enable = true;
2121+ };
2222+2323+ # Emulate system for building others
2424+ boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
2525+2626+ # Enable flakes and other experimental features
2727+ nix.settings.experimental-features = [ "nix-command" "flakes" "pipe-operators" ];
2828+2929+ # This value determines the NixOS release from which the default
3030+ # settings for stateful data, like file locations and database versions
3131+ # on your system were taken. It‘s perfectly fine and recommended to leave
3232+ # this value at the release version of the first install of this system.
3333+ # Before changing this value read the documentation for this option
3434+ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
3535+ system.stateVersion = "24.11"; # Did you read the comment?
3636+}
+48
config/nixos/boron/default.nix
···11+{ self, inputs, pkgs, hostname, ... }:
22+{
33+ # imports = [ ./hardware.nix ];
44+55+ # EFI Bootloader
66+ boot.loader.systemd-boot.enable = true;
77+ boot.loader.efi.canTouchEfiVariables = true;
88+ boot.loader.systemd-boot.configurationLimit = 10;
99+1010+ # Locales
1111+ i18n.defaultLocale = "en_US.UTF-8";
1212+ i18n.extraLocaleSettings = {
1313+ LC_ADDRESS = "fr_FR.UTF-8";
1414+ LC_IDENTIFICATION = "fr_FR.UTF-8";
1515+ LC_MEASUREMENT = "fr_FR.UTF-8";
1616+ LC_MONETARY = "fr_FR.UTF-8";
1717+ LC_NAME = "fr_FR.UTF-8";
1818+ LC_NUMERIC = "fr_FR.UTF-8";
1919+ LC_PAPER = "fr_FR.UTF-8";
2020+ LC_TELEPHONE = "fr_FR.UTF-8";
2121+ LC_TIME = "fr_FR.UTF-8";
2222+ };
2323+2424+ # Timezone
2525+ time.timeZone = "Europe/Paris";
2626+2727+ # Keyboard
2828+ services.xserver.xkb.layout = "us";
2929+3030+ # Networking
3131+ networking.networkmanager.enable = true;
3232+ networking.hostName = hostname;
3333+3434+ # Disable CUPS since this desktop will not print something.
3535+ services.printing.enable = false;
3636+3737+ # Common system configurations
3838+ gems.system.garbageCollector.enable= true;
3939+ gems.system.autoUpdate.enable = false;
4040+4141+ # This value determines the NixOS release from which the default
4242+ # settings for stateful data, like file locations and database versions
4343+ # on your system were taken. It‘s perfectly fine and recommended to leave
4444+ # this value at the release version of the first install of this system.
4545+ # Before changing this value read the documentation for this option
4646+ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
4747+ system.stateVersion = "24.11"; # Did you read the comment?
4848+}
+48
config/nixos/carbon/default.nix
···11+{ self, inputs, pkgs, hostname, ... }:
22+{
33+ # imports = [ ./hardware.nix ];
44+55+ # EFI Bootloader
66+ boot.loader.systemd-boot.enable = true;
77+ boot.loader.efi.canTouchEfiVariables = true;
88+ boot.loader.systemd-boot.configurationLimit = 10;
99+1010+ # Locales
1111+ i18n.defaultLocale = "en_US.UTF-8";
1212+ i18n.extraLocaleSettings = {
1313+ LC_ADDRESS = "fr_FR.UTF-8";
1414+ LC_IDENTIFICATION = "fr_FR.UTF-8";
1515+ LC_MEASUREMENT = "fr_FR.UTF-8";
1616+ LC_MONETARY = "fr_FR.UTF-8";
1717+ LC_NAME = "fr_FR.UTF-8";
1818+ LC_NUMERIC = "fr_FR.UTF-8";
1919+ LC_PAPER = "fr_FR.UTF-8";
2020+ LC_TELEPHONE = "fr_FR.UTF-8";
2121+ LC_TIME = "fr_FR.UTF-8";
2222+ };
2323+2424+ # Timezone
2525+ time.timeZone = "Europe/Paris";
2626+2727+ # Keyboard
2828+ services.xserver.xkb.layout = "us";
2929+3030+ # Networking
3131+ networking.networkmanager.enable = true;
3232+ networking.hostName = hostname;
3333+3434+ # Disable CUPS since this desktop will not print something.
3535+ services.printing.enable = false;
3636+3737+ # Common system configurations
3838+ gems.system.garbageCollector.enable= true;
3939+ gems.system.autoUpdate.enable = false;
4040+4141+ # This value determines the NixOS release from which the default
4242+ # settings for stateful data, like file locations and database versions
4343+ # on your system were taken. It‘s perfectly fine and recommended to leave
4444+ # this value at the release version of the first install of this system.
4545+ # Before changing this value read the documentation for this option
4646+ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
4747+ system.stateVersion = "24.11"; # Did you read the comment?
4848+}
+94
config/nixos/hydrogen/default.nix
···11+{ self, inputs, pkgs, hostname, ... }:
22+{
33+ imports = [
44+ ./hardware.nix
55+66+ # Import users
77+ ../../../users/cosmeak/hydrogen
88+ ];
99+1010+ # EFI Bootloader
1111+ boot.loader.systemd-boot.enable = true;
1212+ boot.loader.efi.canTouchEfiVariables = true;
1313+ boot.loader.systemd-boot.configurationLimit = 10;
1414+1515+ # Locales
1616+ i18n.defaultLocale = "en_US.UTF-8";
1717+ i18n.extraLocaleSettings = {
1818+ LC_ADDRESS = "fr_FR.UTF-8";
1919+ LC_IDENTIFICATION = "fr_FR.UTF-8";
2020+ LC_MEASUREMENT = "fr_FR.UTF-8";
2121+ LC_MONETARY = "fr_FR.UTF-8";
2222+ LC_NAME = "fr_FR.UTF-8";
2323+ LC_NUMERIC = "fr_FR.UTF-8";
2424+ LC_PAPER = "fr_FR.UTF-8";
2525+ LC_TELEPHONE = "fr_FR.UTF-8";
2626+ LC_TIME = "fr_FR.UTF-8";
2727+ };
2828+2929+ # Timezone
3030+ time.timeZone = "Europe/Paris";
3131+3232+ # Keyboard
3333+ services.xserver.xkb.layout = "us";
3434+3535+ # Audio
3636+ gems.hardware.audio.enable = true;
3737+3838+ # Nvidia GPU and OpenGL
3939+ gems.hardware.nvidia.enable = true;
4040+4141+ # Networking
4242+ networking.networkmanager.enable = true;
4343+ networking.hostName = hostname;
4444+4545+ # Desktop Environment
4646+ services.xserver.enable = true;
4747+ services.xserver.desktopManager.budgie.enable = true;
4848+ services.xserver.displayManager.lightdm.enable = true;
4949+ services.displayManager.defaultSession = "budgie-desktop";
5050+ environment.budgie.excludePackages = with pkgs; [
5151+ mate.mate-terminal # don't need since we have kitty installed
5252+ ];
5353+5454+ # Global packages
5555+ environment.systemPackages = with pkgs; [
5656+ firefox
5757+ kitty
5858+ bat
5959+ eza
6060+ fzf
6161+ zoxide
6262+ tree
6363+ git
6464+ starship
6565+ pavucontrol
6666+ unzip
6767+ zip
6868+ btop
6969+ ];
7070+7171+ # Steam
7272+ gems.programs.steam.enable = true;
7373+7474+ # Disable CUPS since this desktop will not print something.
7575+ services.printing.enable = false;
7676+7777+ # Common system configurations
7878+ gems.system.garbageCollector.enable = true;
7979+ gems.system.autoUpdate.enable = false;
8080+8181+ # Enable unfree packages
8282+ nixpkgs.config.allowUnfree = true;
8383+8484+ # Enable flakes and other experimental features
8585+ nix.settings.experimental-features = [ "nix-command" "flakes" "pipe-operators" ];
8686+8787+ # This value determines the NixOS release from which the default
8888+ # settings for stateful data, like file locations and database versions
8989+ # on your system were taken. It‘s perfectly fine and recommended to leave
9090+ # this value at the release version of the first install of this system.
9191+ # Before changing this value read the documentation for this option
9292+ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
9393+ system.stateVersion = "24.11"; # Did you read the comment?
9494+}
+38
config/nixos/hydrogen/hardware.nix
···11+# Do not modify this file! It was generated by ‘nixos-generate-config’
22+# and may be overwritten by future invocations. Please make changes
33+# to /etc/nixos/configuration.nix instead.
44+{ config, lib, pkgs, modulesPath, ... }:
55+{
66+ imports =
77+ [ (modulesPath + "/installer/scan/not-detected.nix")
88+ ];
99+1010+ boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
1111+ boot.initrd.kernelModules = [ ];
1212+ boot.kernelModules = [ "kvm-intel" ];
1313+ boot.extraModulePackages = [ ];
1414+1515+ fileSystems."/" =
1616+ { device = "/dev/disk/by-uuid/1cbaa92a-7c91-496f-b1b4-32a1249ba9af";
1717+ fsType = "ext4";
1818+ };
1919+2020+ fileSystems."/boot" =
2121+ { device = "/dev/disk/by-uuid/7EAC-2F74";
2222+ fsType = "vfat";
2323+ options = [ "fmask=0077" "dmask=0077" ];
2424+ };
2525+2626+ swapDevices = [ ];
2727+2828+ # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
2929+ # (the default) this is the recommended approach. When using systemd-networkd it's
3030+ # still possible to use this option, but it's recommended to use it in conjunction
3131+ # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
3232+ networking.useDHCP = lib.mkDefault true;
3333+ # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
3434+ # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
3535+3636+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
3737+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
3838+}
+68
config/nixos/lithium/default.nix
···11+{ self, inputs, pkgs, hostname, ... }:
22+{
33+ # Force update to the last linux kernel avalaible
44+ boot.kernelPackages = pkgs.linuxPackages_latest;
55+66+ # Special hardware config for raspberry
77+ hardware = {
88+ raspberry-pi."4".apply-overlays-dtmerge.enable = true;
99+ raspberry-pi."4".fkms-3d.enable = true; # Enable hardware acceleration
1010+ deviceTree = {
1111+ enable = true;
1212+ filter = "*rpi-4-*.dtb";
1313+ };
1414+ };
1515+1616+ # Networking configuration
1717+ # networking.networkmanager.enable = true;
1818+ networking.hostName = hostname;
1919+ networking.interfaces."wlan0".useDHCP = true;
2020+ networking.wireless = {
2121+ enable = true;
2222+ interfaces = [ "wlan0" ];
2323+ };
2424+2525+ users.users."rpi" = {
2626+ isNormalUser = true;
2727+ extraGroups = [ "wheel" ];
2828+ hashedPassword = "$y$j9T$rg0syrPPtjaLILPTTplI3/$5uykqP9tXjAsvOocbfosUeN6j6dMrHRUtwudKd4QaA5"; # password generated with `mkpasswd` command
2929+3030+ # User wide packages
3131+ packages = [];
3232+ };
3333+3434+ # System wide packages
3535+ environment.systemPackages = with pkgs; [
3636+ libraspberrypi
3737+ raspberrypi-eeprom
3838+ ];
3939+4040+ # Garbage collector
4141+ nix.gc = {
4242+ automatic = true;
4343+ dates = "weekly";
4444+ options = "--delete-older-than 7d";
4545+ };
4646+4747+ nix.settings = {
4848+ auto-optimise-store = true; # Related to garbage collector
4949+ experimental-features = "nix-command flakes"; # Enable flakes
5050+ };
5151+5252+ # "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" creates a
5353+ # disk with this label on first boot. Therefore, we need to keep it. It is the
5454+ # only information from the installer image that we need to keep persistent
5555+ fileSystems."/" = {
5656+ device = "/dev/disk/by-label/NIXOS_SD";
5757+ fsType = "ext4";
5858+ };
5959+6060+ # This value determines the NixOS release from which the default
6161+ # settings for stateful data, like file locations and database versions
6262+ # on your system were taken. It‘s perfectly fine and recommended to leave
6363+ # this value at the release version of the first install of this system.
6464+ # Before changing this value read the documentation for this option
6565+ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
6666+ # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
6767+ system.stateVersion = "24.11"; # Did you read the comment?
6868+}