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
[!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
### Note on secrets management
@ -14,6 +16,14 @@ Initialize the submodule with:
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
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 .
```
`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
@ -90,4 +100,4 @@ This Nix config features:
- Flatpaks
- Per-user configurations
- 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 = {
development.enable = true;
hugo.enable = true;
kdeconnect.enable = true;
media.enable = true;
office.enable = true;
pandoc.enable = true;

View file

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

View file

@ -89,6 +89,8 @@ in
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";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

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

View file

@ -11,7 +11,7 @@ with lib;
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
hugo
#hugo # Temporarily disabled until this build issue gets fixed: https://github.com/NixOS/nixpkgs/pull/298026
rsync
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
gnomeExtensions.appindicator
gnomeExtensions.dash-to-panel
gnomeExtensions.gsconnect
gnomeExtensions.forge
# Themeing
gnome.gnome-themes-extra