From ab3a17be258c3c4920562e3ec16d14d4a663a4e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Tue, 19 Mar 2024 20:13:05 +0100 Subject: [PATCH] wip: initialize fatteh --- .github/workflows/niveum.yml | 2 +- configs/cloud.nix | 12 +- lib/default.nix | 1 + secrets | 2 +- systems/fatteh/configuration.nix | 129 ++++++++++++++++++++++ systems/fatteh/hardware-configuration.nix | 47 ++++++++ 6 files changed, 185 insertions(+), 8 deletions(-) create mode 100644 systems/fatteh/configuration.nix create mode 100644 systems/fatteh/hardware-configuration.nix diff --git a/.github/workflows/niveum.yml b/.github/workflows/niveum.yml index d935a01..58d4ae4 100644 --- a/.github/workflows/niveum.yml +++ b/.github/workflows/niveum.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - system: [makanek,manakish,kabsa,zaatar,ful] + system: [makanek,manakish,kabsa,zaatar,ful,fatteh] steps: - uses: actions/checkout@v3 - name: Install QEMU (ARM) diff --git a/configs/cloud.nix b/configs/cloud.nix index 8657489..e8302ca 100644 --- a/configs/cloud.nix +++ b/configs/cloud.nix @@ -109,16 +109,16 @@ in { folders = let cloud-dir = "${config.users.users.me.home}/cloud"; in { - "${cloud-dir}/syncthing/zotero/storage".devices = ["kabsa" "manakish"]; - "${cloud-dir}/syncthing/common".devices = ["kabsa" "manakish"]; - "${cloud-dir}/syncthing/library".devices = ["kabsa" "manakish" "heym"]; - "${cloud-dir}/syncthing/mundoiu".devices = ["kabsa" "manakish" "heym"]; + "${cloud-dir}/syncthing/zotero/storage".devices = ["kabsa" "manakish" "fatteh"]; + "${cloud-dir}/syncthing/common".devices = ["kabsa" "manakish" "fatteh"]; + "${cloud-dir}/syncthing/library".devices = ["kabsa" "manakish" "heym" "fatteh"]; + "${cloud-dir}/syncthing/mundoiu".devices = ["kabsa" "manakish" "heym" "fatteh"]; "${cloud-dir}/syncthing/obsidian" = { - devices = ["kabsa" "manakish" "heym"]; + devices = ["kabsa" "manakish" "heym" "fatteh"]; id = "3r1hu-3barr"; }; "${cloud-dir}/syncthing/music" = { - devices = ["kabsa" "manakish" "heym" "zaatar"]; + devices = ["kabsa" "manakish" "heym" "zaatar" "fatteh"]; id = "music"; }; }; diff --git a/lib/default.nix b/lib/default.nix index 8ce4a8c..539e147 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -81,6 +81,7 @@ toum.id = "CBJQXFF-FMFGWFU-2J6FMPR-SRDTSGX-7NHOYOH-CQCABKF-KQJMRJC-SDE24Q4"; zaatar.id = "CGHO6LK-ZJBAXBD-UWI7AH3-BXYARE6-EUIM7PE-O2FUCOM-VCCRNCM-IG34WQ7"; tahina.id = "UKJ2CBO-EQPKQL4-3QLRUSG-SSYR6AB-CCCUTKU-CLPYR7N-RUI5A6Y-JTL5NA4"; + fatteh.id = "GSOGYT3-2GBHZXT-MNCTDIY-3BJIR4V-OHVOOMJ-ICVLKXR-U4C7RFB-HJOK3AC"; }; ignorePaths = [ diff --git a/secrets b/secrets index 5c4171e..8243109 160000 --- a/secrets +++ b/secrets @@ -1 +1 @@ -Subproject commit 5c4171e425e84f41e81c9aec387e451638bb4bf5 +Subproject commit 8243109d2205dc75fbca761efc7d5d267aea4534 diff --git a/systems/fatteh/configuration.nix b/systems/fatteh/configuration.nix new file mode 100644 index 0000000..0cddea4 --- /dev/null +++ b/systems/fatteh/configuration.nix @@ -0,0 +1,129 @@ +{ + config, + pkgs, + ... +}: { + imports = [ + ./hardware-configuration.nix + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.initrd.luks.devices."luks-aa6beb1b-3e54-4a0e-ac9c-e0c007d73cd5".device = "/dev/disk/by-uuid/aa6beb1b-3e54-4a0e-ac9c-e0c007d73cd5"; + networking.hostName = "nixos"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "Europe/Berlin"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "de_DE.UTF-8"; + LC_IDENTIFICATION = "de_DE.UTF-8"; + LC_MEASUREMENT = "de_DE.UTF-8"; + LC_MONETARY = "de_DE.UTF-8"; + LC_NAME = "de_DE.UTF-8"; + LC_NUMERIC = "de_DE.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; + }; + + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Enable the GNOME Desktop Environment. + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + + # Configure keymap in X11 + services.xserver = { + layout = "de"; + xkbVariant = "T3"; + }; + + # Configure console keymap + console.keyMap = "de"; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # 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; + }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.xserver.libinput.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.kfm = { + isNormalUser = true; + description = "Kierán Meinhardt"; + extraGroups = ["networkmanager" "wheel"]; + packages = with pkgs; [ + firefox + # thunderbird + ]; + }; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # 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. It‘s 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.11"; # Did you read the comment? +} diff --git a/systems/fatteh/hardware-configuration.nix b/systems/fatteh/hardware-configuration.nix new file mode 100644 index 0000000..eacdaf6 --- /dev/null +++ b/systems/fatteh/hardware-configuration.nix @@ -0,0 +1,47 @@ +# 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" "nvme" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/42b747ff-a432-4c0e-bb0a-59f0a68c44a2"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-67c1f7da-4318-49f7-bd98-cc731990b595".device = "/dev/disk/by-uuid/67c1f7da-4318-49f7-bd98-cc731990b595"; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/9051-0891"; + fsType = "vfat"; + }; + + swapDevices = [ + {device = "/dev/disk/by-uuid/529a1893-773e-4d04-bf6c-16e67e1ed3c7";} + ]; + + # 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.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wwan0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}