Added nextcloud

This commit is contained in:
marc
2024-01-21 18:43:08 +01:00
parent d660b0fb36
commit fbab268555
3 changed files with 37 additions and 2 deletions

View File

@@ -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 <<host directory>> --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

View File

@@ -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;

21
modules/app/nextcloud.nix Normal file
View File

@@ -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;
};
};
}