diff --git a/configuration.nix b/configuration.nix index 763866d..9084160 100644 --- a/configuration.nix +++ b/configuration.nix @@ -27,10 +27,22 @@ networking.networkmanager.enable = true; networking.hostName = "qmoran-laptop"; - imports = [ - ./hardware-configuration.nix - ./users.nix - ]; + # My user for now + users.users.qmoran = { + isNormalUser = true; + description = "quin"; + extraGroups = [ "networkmanager" "wheel" "docker" ]; + packages = with pkgs; [ + gh + btop + kdePackages.kate + signal-desktop + lazygit + element-desktop + vscodium + vivaldi + ]; + }; # Bootloader. boot.loader.systemd-boot.enable = true; diff --git a/flake.nix b/flake.nix index 2560114..117afe9 100644 --- a/flake.nix +++ b/flake.nix @@ -2,27 +2,20 @@ description = "Quins NixOS flake!"; inputs = { - # NixOS official package source, using the nixos-25.11 branch here nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11"; - #nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager/release-23.05"; - # The `follows` keyword in inputs is used for inheritance. - # Here, `inputs.nixpkgs` of home-manager is kept consistent with - # the `inputs.nixpkgs` of the current flake, - # to avoid problems caused by different versions of nixpkgs. inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, home-manager, ... }@inputs: { - # Please replace my-nixos with your hostname nixosConfigurations.qmoran-laptop = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ + ./hardware-configuration.nix ./configuration.nix - home-manager.nixosModules.home-manager ]; }; }; diff --git a/rclone.nix b/rclone.nix new file mode 100644 index 0000000..afa06a8 --- /dev/null +++ b/rclone.nix @@ -0,0 +1,24 @@ +{ pkgs, lib, ... }: +let + mountPoint = "/mnt/mega"; + remoteName = "data"; + bucketName = "enc"; + configFile = "/etc/rclone.conf"; +in +{ + environment.systemPackages = with pkgs;[ + rclone + ]; + systemd.mounts = lib.singleton { + where = mountPoint; + what = "${remoteName}:${bucketName}"; + type = "rclone"; + # I think we need to be able to set a timeout here but nix is too new + options = "_netdev,allow-other,vfs-cache-mode=full,vfs-read-chunk-size=512M,vfs-read-chunk-size-limit=1G,vfs-write-back=48h,vfs-cache-max-age=3h,config=${configFile},vvv,daemon-wait=0"; + }; + + #systemd.automounts = lib.singleton { + # where = mountPoint; + # wantedBy = [ "multi-user.target" ]; + #}; +} \ No newline at end of file diff --git a/users.nix b/users.nix deleted file mode 100644 index 2acf1ec..0000000 --- a/users.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, pkgs, ... }: - -{ - - users.users.qmoran = { - isNormalUser = true; - description = "quin"; - extraGroups = [ "networkmanager" "wheel" "docker" ]; - packages = with pkgs; [ - gh - btop - kdePackages.kate - signal-desktop - lazygit - element-desktop - vscodium - vivaldi - ]; - }; - -}