diff --git a/lib/luj.nix b/lib/luj.nix index 4bc0b59..79c266f 100644 --- a/lib/luj.nix +++ b/lib/luj.nix @@ -47,6 +47,11 @@ inputs: lib: with lib; let nixpkgs_version = inputs.nixpkgs; hm_version = inputs.home-manager; }; + telecom = { + arch = "x86_64-linux"; + nixpkgs_version = inputs.nixpkgs; + hm_version = inputs.home-manager; + }; enigma = { arch = "aarch64-linux"; nixpkgs_version = inputs.nixpkgs; diff --git a/machines/telecom/default.nix b/machines/telecom/default.nix new file mode 100644 index 0000000..9f55b3c --- /dev/null +++ b/machines/telecom/default.nix @@ -0,0 +1,112 @@ +{ config, pkgs, lib, inputs, nixpkgs-patched, ... }: + +{ + imports = + [ + ./hardware.nix + ./home-julien.nix + ../../users/julien.nix + ../../users/default.nix + ]; + + + + boot.loader.systemd-boot.enable = true; + boot.initrd.systemd.enable = true; + sound.enable = true; + #hardware.pulseaudio.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; + wireplumber.enable = true; + + }; + + services.postgresql.enable = true; + + networking.hostName = "telecom"; + + networking.wireless.enable = false; + + programs.hyprland.enable = true; + programs.hyprland.package = pkgs.hyprland; + environment.sessionVariables = { + LIBSEAT_BACKEND = "logind"; + }; + + services.xserver = { + enable = true; + layout = "fr"; + displayManager.gdm.enable = true; + }; + + services.tailscale.enable = true; + networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + + networking.networkmanager.dns = "systemd-resolved"; + services.resolved.enable = true; + + + time.timeZone = "Europe/Paris"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + console = { + font = "Lat2-Terminus16"; + useXkbConfig = true; # use xkbOptions in tty. + }; + + hardware.opengl.enable = true; + hardware.opengl.driSupport = true; + + programs.dconf.enable = true; + + security.polkit.enable = true; + + services.tlp.enable = true; + + security.tpm2.enable = true; + security.tpm2.pkcs11.enable = true; # expose /run/current-system/sw/lib/libtpm2_pkcs11.so + security.tpm2.tctiEnvironment.enable = true; # TPM2TOOLS_TCTI and TPM2_PKCS11_TCTI env variables + users.users.julien.extraGroups = [ "tss" ]; # tss group has access to TPM devices + + hardware.bluetooth.enable = true; + + environment.systemPackages = with pkgs; [ + tailscale + brightnessctl + sbctl + wl-mirror + ]; + + services.printing.enable = true; + services.avahi.enable = true; + services.avahi.nssmdns = true; + # for a WiFi printer + services.avahi.openFirewall = true; + + + security.pam.services.swaylock = { }; + + programs.ssh.startAgent = true; + + programs.adb.enable = true; + services.udev.packages = [ + pkgs.android-udev-rules + ]; + services.gnome.gnome-keyring.enable = true; + + system.stateVersion = "23.05"; + +} + + + diff --git a/machines/telecom/hardware.nix b/machines/telecom/hardware.nix new file mode 100644 index 0000000..6857c4d --- /dev/null +++ b/machines/telecom/hardware.nix @@ -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" "thunderbolt" "vmd" "nvme" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/f7072a83-0478-48ea-9f55-074541c1c524"; + fsType = "btrfs"; + }; + + boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/56dc5a16-94ca-4a9c-a215-51ed55aec6b5"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/9331-9E52"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/63debceb-44e6-4e27-94df-092dd59fd9e2"; } + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s13f0u4u4u4.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; +} diff --git a/machines/telecom/home-julien.nix b/machines/telecom/home-julien.nix new file mode 100644 index 0000000..97d4929 --- /dev/null +++ b/machines/telecom/home-julien.nix @@ -0,0 +1,117 @@ +{ pkgs, lib, config, ... }: +{ + + luj.hmgr.julien = + { + home.stateVersion = "22.11"; + luj.programs.neovim.enable = true; + luj.programs.ssh-client.enable = true; + luj.programs.git.enable = true; + luj.programs.gtk.enable = true; + luj.programs.alacritty.enable = true; + luj.programs.hyprland.enable = true; + luj.programs.waybar.enable = true; + luj.programs.kitty.enable = true; + luj.emails.enable = true; + + programs.rofi = { + enable = true; + package = pkgs.rofi-wayland; + font = "Fira Font"; + theme = "DarkBlue"; + }; + + programs.direnv = { + enable = true; + enableFishIntegration = true; + nix-direnv.enable = true; + }; + + home.pointerCursor = { + name = "Adwaita"; + package = pkgs.gnome.adwaita-icon-theme; + size = 15; + x11 = { + enable = true; + defaultCursor = "Adwaita"; + }; + }; + + home.packages = with pkgs; + [ + du-dust + kitty + jq + lazygit + fira-code + feh + meld + vlc + jftui + stable.nerdfonts + libreoffice + font-awesome + nodejs + neomutt + htop + evince + mosh + obsidian + zotero + flameshot + kitty + networkmanagerapplet + element-desktop + xdg-utils + sops + step-cli + coq + gh + gh-dash + cvc5 + nixpkgs-patched.signal-desktop-beta + coqPackages.coqide + (why3.withProvers + [ + unstable.cvc4 + alt-ergo + z3 + ]) + libsForQt5.neochat + scli + texlive.combined.scheme-full + ]; + + fonts.fontconfig.enable = true; + + home.keyboard = { + layout = "fr"; + }; + + services.dunst = { + enable = true; + }; + + programs.chromium = { + enable = true; + commandLineArgs = [ + "--ozone-platform-hint=wayland" + "--load-media-router-component-extension=1" + ]; + extensions = [ + { id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # uBlock Origin + { id = "ldlghkoiihaelfnggonhjnfiabmaficg"; } # Alt+Q switcher + { id = "enjjhajnmggdgofagbokhmifgnaophmh"; } # Resolution Zoom for HiDPI + { id = "fihnjjcciajhdojfnbdddfaoknhalnja"; } # I don't care about cookies + { id = "ekhagklcjbdpajgpjgmbionohlpdbjgc"; } # Zotero Connector + { id = "hlepfoohegkhhmjieoechaddaejaokhf"; } # Refined GitHub + { id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden + { id = "dcpihecpambacapedldabdbpakmachpb"; updateUrl = "https://raw.githubusercontent.com/iamadamdev/bypass-paywalls-chrome/master/src/updates/updates.xml"; } + ]; + }; + + + }; + + +} diff --git a/machines/telecom/wallpaper.jpg b/machines/telecom/wallpaper.jpg new file mode 100644 index 0000000..403fd4e Binary files /dev/null and b/machines/telecom/wallpaper.jpg differ