Compare commits

...

4 commits

Author SHA1 Message Date
d11a31ebcd remove default cli apps from mac
Some checks failed
use nix / build (push) Failing after 3m55s
2024-06-28 20:20:49 +01:00
5dc73f59e2 add note on generating keys 2024-06-28 20:20:39 +01:00
421064ce53 add kitty and firefox on a mac 2024-06-28 19:40:14 +01:00
1b67f19e18 add airy 2024-06-28 19:25:30 +01:00
10 changed files with 112 additions and 39 deletions

View file

@ -5,6 +5,12 @@ My dotfiles - including my vim, terminal and font config.
My current setup consists of multiple machines running NixOS.
This is using flakes for reproducibility and home manager for setting up user-specific things.
## generating ssh keys
```
ssh-keygen -t ed25519
```
Workstations are set up by running ` sudo nixos-rebuild switch --flake '.#'` and servers are by `nixos-rebuild switch --flake '.#servername' --target-host root@hostname`.
I don't use home manager the program, everything is referenced from the top flake.

View file

@ -137,17 +137,22 @@
"x86_64-linux".default = mkShell nixpkgs-stable "x86_64-linux";
"aarch64-linux".default = mkShell nixpkgs-stable "aarch64-linux";
};
# Expose the package set, including overlays, for convenience.
darwinPackages = self.darwinConfigurations."airy".pkgs;
darwinConfigurations = {
"FORM3-CYRYLPLOTN" = darwin.lib.darwinSystem rec {
system = "x86_64-darwin";
"airy" = darwin.lib.darwinSystem rec {
system = "aarch64-darwin";
modules = [
(./. + "/nixos/boxes/form3")
(./. + "/nixos/boxes/airy")
{users.users.cyryl.home = "/Users/cyryl";}
home-manager.darwinModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.cyryl = {
home.homeDirectory = "/Users/cyryl";
imports = [./nixos/home-manager];
_module.args.inputs = inputs;
_module.args.system = system;

View file

@ -0,0 +1,38 @@
{
config,
pkgs,
inputs,
lib,
nixpkgs-nixos-unstable-and-unfree,
...
}: {
imports = [
../../git
../../helix
../../mercurial
../../vim
../../zsh
];
services.nix-daemon.enable = true;
nix.settings.experimental-features = "nix-command flakes";
programs.zsh.enable = true; # default shell on catalina
system.stateVersion = 4;
# The platform the configuration will be used on.
nixpkgs.hostPlatform = "aarch64-darwin";
homebrew.enable = true;
homebrew.casks = ["firefox"];
home-manager.users.cyryl = {...}: {
imports = [
../../home-manager/programs/kitty.nix
];
home.packages = with pkgs; [];
programs = {
};
};
}

View file

@ -1,9 +1,12 @@
{ config, pkgs, ... }:
let
{
config,
pkgs,
...
}: let
genericBackupPath = "/var/lib/backups/";
nixosContainersBackupPath = "/var/lib/nixos-containers/";
in rec {
environment.systemPackages = with pkgs; [ restic ];
environment.systemPackages = with pkgs; [restic];
sops.secrets."restic-backups-b2-repo-password" = {
sopsFile = ./restic.sops.yaml;
@ -29,7 +32,7 @@ in rec {
systemctl stop container@foundryvtt.service
systemctl stop cryptpad.service
systemctl stop forgejo.service
systemctl stop mastodon*
systemctl stop mastodon*
systemctl stop postgresql.service
'';
backupCleanupCommand = ''
@ -37,12 +40,11 @@ in rec {
systemctl start forgejo.service
systemctl start cryptpad.service
systemctl start container@foundryvtt.service
systemctl start --all mastodon*
systemctl start --all mastodon*
'';
timerConfig = { OnCalendar = "daily"; };
environmentFile =
"${config.sops.secrets.restic-backups-b2-environment.path}";
exclude = [ "cache" ];
timerConfig = {OnCalendar = "daily";};
environmentFile = "${config.sops.secrets.restic-backups-b2-environment.path}";
exclude = ["cache"];
pruneOpts = [
"--keep-hourly 25"
"--keep-daily 8"
@ -50,7 +52,7 @@ in rec {
"--keep-monthly 13"
"--keep-yearly 2"
];
checkOpts = [ "--with-cache" ];
checkOpts = ["--with-cache"];
};
};

View file

@ -1,5 +1,11 @@
{ config, pkgs, inputs, lib, system, ... }:
let
{
config,
pkgs,
inputs,
lib,
system,
...
}: let
unstable = inputs.nixpkgs-nixos-unstable;
package = unstable.legacyPackages."${system}".forgejo;
httpPort = 8083;
@ -22,20 +28,19 @@ let
};
groups."${systemGroupName}" = {
inherit gid;
members = [ "${systemUserName}" "nginx" ];
members = ["${systemUserName}" "nginx"];
};
};
in {
imports =
[ ../nginx.nix "${unstable}/nixos/modules/services/misc/forgejo.nix" ];
disabledModules = [ "services/misc/forgejo.nix" ];
imports = [../nginx.nix "${unstable}/nixos/modules/services/misc/forgejo.nix"];
disabledModules = ["services/misc/forgejo.nix"];
inherit users;
boot.kernel.sysctl = { "net.ipv4.ip_unprivileged_port_start" = 0; };
boot.kernel.sysctl = {"net.ipv4.ip_unprivileged_port_start" = 0;};
systemd.services.systemd-sysctl.enable = lib.mkForce true;
networking.firewall.allowedTCPPorts = [ sshPort ];
networking.firewall.allowedTCPPorts = [sshPort];
services.nginx = {
virtualHosts = {
"${domain}" = {

View file

@ -1,8 +1,12 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
console.keyMap = "pl2";
imports = [ ./tailscale ];
imports = [./tailscale];
services = {
udev.packages = [ pkgs.android-udev-rules ];
udev.packages = [pkgs.android-udev-rules];
ratbagd.enable = true;
gvfs.enable = true;

View file

@ -1,10 +1,15 @@
{ config, pkgs, ... }: {
services = { };
{
config,
pkgs,
...
}: {
services = {};
xsession = { enable = false; };
xsession = {enable = false;};
home.sessionVariables = { QT_QPA_PLATFORM = "wayland"; };
home.packages = (with pkgs; [ gnome-usage gnome3.gnome-tweaks ])
home.sessionVariables = {QT_QPA_PLATFORM = "wayland";};
home.packages =
(with pkgs; [gnome-usage gnome3.gnome-tweaks])
++ (with pkgs.gnomeExtensions; [
caffeine
clipboard-indicator
@ -14,7 +19,7 @@
dconf.settings = {
"org/gnome/mutter" = {
# https://github.com/NixOS/nixpkgs/issues/114514#issuecomment-1177709271
experimental-features = [ "scale-monitor-framebuffer" ];
experimental-features = ["scale-monitor-framebuffer"];
};
"org/gnome/shell" = {
disable-user-extensions = false;

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, system, ... }: {
{
config,
pkgs,
inputs,
system,
...
}: {
home.packages = with pkgs; [
(pass.withExtensions (ext: [
ext.pass-otp
@ -16,7 +22,6 @@
bottom
curl
dive
dmidecode
dnsutils
docker-compose
du-dust
@ -53,7 +58,6 @@
unzip
wget
wl-clipboard
xdotool
inputs.nixpkgs-nixos-unstable.legacyPackages."x86_64-linux".yt-dlp
inputs.nixpkgs-nixos-unstable.legacyPackages."${system}".yt-dlp
];
}

View file

@ -12,6 +12,7 @@
atop
btop
btrfs-progs
dmidecode
glibcLocales
hsetroot
lm_sensors
@ -24,5 +25,6 @@
topgrade
wirelesstools
woeusb
xdotool
];
}

View file

@ -1,11 +1,13 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
services = {
kdeconnect.enable = true;
kdeconnect.indicator = true;
};
home.packages = [ ];
dconf.settings = { };
home.packages = [];
dconf.settings = {};
}