From fbab2685556662afd32b0270aa28d72528196307 Mon Sep 17 00:00:00 2001 From: marc Date: Sun, 21 Jan 2024 18:43:08 +0100 Subject: [PATCH] Added nextcloud --- README.org | 16 +++++++++++++++- hosts/reykjavik/default.nix | 2 +- modules/app/nextcloud.nix | 21 +++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 modules/app/nextcloud.nix diff --git a/README.org b/README.org index 8f425e8..8b83dac 100644 --- a/README.org +++ b/README.org @@ -4,11 +4,18 @@ #+BEGIN_SRC bash nix-shell -p git #+END_SRC + 2. Clone the flake #+BEGIN_SRC bash - git clone https://git.lajuntament.space/marc/samfelag.git + git clone https://git.samfelag.xyz/marc/samfelag.git #+END_SRC + 3. Partition the disk + We'll partition the disk in the follwing way: + * 512MB at the beginning for the boot partition + * 8GB at the end for swap + * The rest (at the middle) for the filesystem (/) + 1. Locate the disk #+BEGIN_SRC bash lsblk @@ -30,6 +37,7 @@ sudo parted /dev/nvme0n1 -- mkpart ESP fat32 1MB 512MB sudo parted /dev/nvme0n1 -- set 3 esp on #+END_SRC + 4. Format the partitions 1. Root partition #+BEGIN_SRC bash @@ -43,6 +51,7 @@ #+BEGIN_SRC bash sudo mkfs.fat -F 32 -n BOOT /dev/nvme0n1p3 #+END_SRC + 5. Mount the filesystems 1. Root partition #+BEGIN_SRC bash @@ -57,25 +66,30 @@ #+BEGIN_SRC bash sudo swapon /dev/disk/by-label/swap #+END_SRC + 6. Create the host nix configuration If the host is not present under system/hosts, create a new folder for the host. Generate the hardware configuration file, you can use nixos-generate-config as a base: #+BEGIN_SRC bash nixos-generate-config --dir <> --no-filesystems #+END_SRC + 7. Install nixos! #+BEGIN_SRC bash sudo nixos-install --impure --root /mnt --flake '.#reykjavik' #+END_SRC + 8. Set up the user You'll set the root password during the installation. You can then reboot and use the installed OS. First thing you'll have to do is log in as root and set the password for your user: #+BEGIN_SRC bash passwd marc #+END_SRC + * Rebuilding #+BEGIN_SRC bash sudo nixos-rebuild switch --impure --flake '.#reykjavik' #+END_SRC + * Modules ** Desktop environment *** Themeing diff --git a/hosts/reykjavik/default.nix b/hosts/reykjavik/default.nix index eca16dd..f59d70e 100644 --- a/hosts/reykjavik/default.nix +++ b/hosts/reykjavik/default.nix @@ -77,7 +77,7 @@ in # - Other apps ------------------------------- app.spotify.enable = true; app.skype.enable = true; - # app.netflix.enable = true; + app.nextcloud.enable = true; # - Gaming ----------------------------------- gaming.lutris.enable = true; diff --git a/modules/app/nextcloud.nix b/modules/app/nextcloud.nix new file mode 100644 index 0000000..2646a4b --- /dev/null +++ b/modules/app/nextcloud.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.samfelag.modules.app.nextcloud; +in +{ + options.samfelag.modules.app.nextcloud = { + enable = lib.mkEnableOption "nextcloud"; + }; + config = lib.mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + nextcloud-client + ]; + + hm.services.nextcloud-client = { + enable = true; + startInBackground = true; + }; + + }; +}