This commit is contained in:
steveej 2024-02-08 20:53:22 +01:00
parent a9218a80e6
commit 7137e93805
49 changed files with 2034 additions and 2002 deletions

View file

@ -1,9 +1,10 @@
{ pkgs
, lib
, ...
{
pkgs,
lib,
...
}: {
# required for running blueman-applet in user sessions
services.dbus.packages = with pkgs; [ blueman ];
services.dbus.packages = with pkgs; [blueman];
hardware.bluetooth.enable = true;
services.blueman.enable = true;
}

View file

@ -1,12 +1,11 @@
{ nodeFlake
, repoFlake
, repoFlakeInputs'
, packages'
, pkgs
, ...
}:
let
{
nodeFlake,
repoFlake,
repoFlakeInputs',
packages',
pkgs,
...
}: let
# TODO: make this configurable
homeUser = "steveej";
commonHomeImports = [
@ -14,8 +13,7 @@ let
../../home-manager/programs/neovim.nix
../../home-manager/programs/zsh.nix
];
in
{
in {
imports = [
nodeFlake.inputs.home-manager.nixosModules.home-manager
];
@ -45,5 +43,5 @@ in
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
environment.pathsToLink = [ "/share/zsh" ];
environment.pathsToLink = ["/share/zsh"];
}

View file

@ -1,7 +1,8 @@
{ nodeFlake
, pkgs
, lib
, ...
{
nodeFlake,
pkgs,
lib,
...
}: {
nix.daemonCPUSchedPolicy = "idle";
nix.daemonIOSchedClass = "idle";
@ -25,5 +26,4 @@
];
nix.registry.nixpkgs.flake = nodeFlake.inputs.nixpkgs;
}

View file

@ -1,15 +1,13 @@
{ config
, lib
, pkgs
, repoFlakeInputs'
, ...
}:
let
{
config,
lib,
pkgs,
repoFlakeInputs',
...
}: let
# TODO: make configurable
homeUser = "steveej";
in
{
in {
sops.secrets.radicale_htpasswd = {
sopsFile = ../../../secrets/desktop/radicale_htpasswd;
format = "binary";
@ -19,11 +17,13 @@ in
home-manager.users.${homeUser} = _: {
imports = [
# TODO: bump these to latest and make it work
(args:
import ../../home-manager/programs/radicale.nix (args // {
osConfig = config;
pkgs = repoFlakeInputs'.radicalePkgs.legacyPackages;
})
(
args:
import ../../home-manager/programs/radicale.nix (args
// {
osConfig = config;
pkgs = repoFlakeInputs'.radicalePkgs.legacyPackages;
})
)
];
};

View file

@ -1,14 +1,12 @@
{ pkgs
, lib
, config
, ...
}:
let
{
pkgs,
lib,
config,
...
}: let
# TODO: make this configurable
homeUser = "steveej";
in
{
in {
services.xserver.serverFlagsSection = ''
Option "BlankTime" "0"
Option "StandbyTime" "0"
@ -30,7 +28,7 @@ in
# required by swaywm
security.polkit.enable = true;
security.pam.services.swaylock = { };
security.pam.services.swaylock = {};
# test these on https://mozilla.github.io/webrtc-landing/gum_test.html
xdg.portal = {
@ -54,7 +52,6 @@ in
];
};
# rtkit is optional but recommended
security.rtkit.enable = true;
services.pipewire = {
@ -74,8 +71,8 @@ in
# autologin steveej on tty1
# TODO: make user configurable
systemd.services."autovt@tty1".description = "Autologin at the TTY1";
systemd.services."autovt@tty1".after = [ "systemd-logind.service" ]; # without it user session not started and xorg can't be run from this tty
systemd.services."autovt@tty1".wantedBy = [ "multi-user.target" ];
systemd.services."autovt@tty1".after = ["systemd-logind.service"]; # without it user session not started and xorg can't be run from this tty
systemd.services."autovt@tty1".wantedBy = ["multi-user.target"];
systemd.services."autovt@tty1".serviceConfig = {
ExecStart = [
"" # override upstream default with an empty ExecStart
@ -85,19 +82,17 @@ in
Type = "idle";
};
programs =
let
steveejSwayOnTty1 = ''
if test $(id --user steveej) = $(id -u) && test $(tty) = "/dev/tty1"; then
exec sway
fi
'';
in
{
bash.loginShellInit = steveejSwayOnTty1;
# TODO: only do this when zsh is enabled. first naiv attempt lead infinite recursion
zsh.loginShellInit = steveejSwayOnTty1;
};
programs = let
steveejSwayOnTty1 = ''
if test $(id --user steveej) = $(id -u) && test $(tty) = "/dev/tty1"; then
exec sway
fi
'';
in {
bash.loginShellInit = steveejSwayOnTty1;
# TODO: only do this when zsh is enabled. first naiv attempt lead infinite recursion
zsh.loginShellInit = steveejSwayOnTty1;
};
home-manager.users."${homeUser}" = _: {
imports = [

View file

@ -1,9 +1,5 @@
{ lib, ... }:
let
{lib, ...}: let
passwords = import ../../variables/passwords.crypt.nix;
in
{
in {
time.timeZone = lib.mkDefault passwords.timeZone.stefan;
}