1
0
Fork 0

Add KDE Connect

This commit is contained in:
Aires 2024-03-22 18:18:38 -04:00
parent 7925865897
commit eb63e62025
8 changed files with 40 additions and 4 deletions

View file

@ -2,6 +2,8 @@
A full set of configuration files managed via NixOS. This project follows the general structure of https://github.com/tiredofit/nixos-config A full set of configuration files managed via NixOS. This project follows the general structure of https://github.com/tiredofit/nixos-config
[!WARNING] DO NOT DOWNLOAD AND RUN `nixos-rebuild` ON THIS REPOSITORY! These are my personal configuration files. I invite you to look through them, modify them, and take inspiration from them, but if you run `nixos-rebuild`, it _will completely overwrite your current system_!
## Running ## Running
### Note on secrets management ### Note on secrets management
@ -14,6 +16,14 @@ Initialize the submodule with:
git submodule update --init --recursive git submodule update --init --recursive
``` ```
### Updating Flakes
This repo uses Flakes. To get the latest packages and update your `flake.lock` file, run this command before `nixos-rebuild`:
```sh
nix flake update
```
### Applying the configuration ### Applying the configuration
To apply the config for the first time (e.g. on a fresh install), run this command, replacing `Shura` with the name of the host: To apply the config for the first time (e.g. on a fresh install), run this command, replacing `Shura` with the name of the host:
@ -28,7 +38,7 @@ For subsequent builds, you can omit the hostname:
sudo nixos-rebuild switch --flake . sudo nixos-rebuild switch --flake .
``` ```
`switch` replaces the running system immediately, or you can use `boot` to only apply the switch during the next reboot. After applying the build at least once (or setting the hostname manually), you can omit the hostname from the command and just run `nixos-rebuild build --flake .` `switch` replaces the running system immediately, or you can use `boot` to only apply the switch during the next reboot.
### Testing ### Testing
@ -90,4 +100,4 @@ This Nix config features:
- Flatpaks - Flatpaks
- Per-user configurations - Per-user configurations
- Default ZSH shell using Oh My ZSH - Default ZSH shell using Oh My ZSH
- Secrets (in a janky hacky kinda way) - Secrets (in a janky hacky kinda way)

View file

@ -15,6 +15,7 @@
apps = { apps = {
development.enable = true; development.enable = true;
hugo.enable = true; hugo.enable = true;
kdeconnect.enable = true;
media.enable = true; media.enable = true;
office.enable = true; office.enable = true;
pandoc.enable = true; pandoc.enable = true;

View file

@ -30,6 +30,7 @@ in
dj.enable = true; dj.enable = true;
gaming.enable = true; gaming.enable = true;
hugo.enable = true; hugo.enable = true;
kdeconnect.enable = true;
media.enable = true; media.enable = true;
office.enable = true; office.enable = true;
pandoc.enable = true; pandoc.enable = true;

View file

@ -89,6 +89,8 @@ in
hostName = "Shura"; hostName = "Shura";
}; };
# TODO: Add fingerprint detection, but see this change first: https://bugs.launchpad.net/oem-priority/+bug/2024149
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -4,6 +4,7 @@
./dj.nix ./dj.nix
./gaming.nix ./gaming.nix
./hugo.nix ./hugo.nix
./kdeconnect.nix
./media.nix ./media.nix
./office.nix ./office.nix
./pandoc.nix ./pandoc.nix

View file

@ -11,7 +11,7 @@ with lib;
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
hugo #hugo # Temporarily disabled until this build issue gets fixed: https://github.com/NixOS/nixpkgs/pull/298026
rsync rsync
yarn yarn
]; ];

View file

@ -0,0 +1,22 @@
{ pkgs, config, lib, ... }:
let
cfg = config.host.apps.kdeconnect;
in
with lib;
{
options = {
host.apps.kdeconnect.enable = mkEnableOption (mdDoc "Enables KDE Connect");
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
gnomeExtensions.gsconnect
];
networking.firewall = {
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
allowedUDPPortRanges = [ { from = 1714; to = 1764; } ];
};
};
}

View file

@ -96,7 +96,6 @@ with lib;
# Gnome extensions # Gnome extensions
gnomeExtensions.appindicator gnomeExtensions.appindicator
gnomeExtensions.dash-to-panel gnomeExtensions.dash-to-panel
gnomeExtensions.gsconnect
gnomeExtensions.forge gnomeExtensions.forge
# Themeing # Themeing
gnome.gnome-themes-extra gnome.gnome-themes-extra