summaryrefslogtreecommitdiffstats
path: root/hjem-linux.nix
blob: caa0607cf40f6d8cfab4a8af2d006fe3a428da9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
  config,
  pkgs,
  username,
  ...
}: {
  imports = [
  ];

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.${username} = {
    isNormalUser = true;

    extraGroups = [
      "networkmanager"
      "wheel"
    ];
    packages = with pkgs; [];
  };

  hjem.users.${username} = {
    directory = "/home/${username}";
    files = {
      ".config/surf/styles/default.css".source = ./dotfiles/surf/styles/default.css;
      ".config/surf/script.js".source = ./dotfiles/surf/script.js;

      ".sfeed/sfeedrc".source = ./dotfiles/sfeed/sfeedrc;

      ".config/fastfetch/config.jsonc".source = ./dotfiles/fastfetch/config.jsonc;
      ".config/lazygit/config.yml".source = ./dotfiles/lazygit/config.yml;
      ".config/tealdeer/config.toml".source = ./dotfiles/tealdeer/config.toml;
    };

    packages = with pkgs; [
      discord
      lazygit
      librewolf
      btop
      mpv
      zathura
      lf
      sfeed
      delta
      python313
      imagemagick
    ];
  };

  systemd.user.services."sfeed-update" = {
    description = "Update sfeed RSS feeds";
    path = with pkgs; [
      curl
      sfeed
      coreutils
    ];
    serviceConfig = {
      Type = "oneshot";
      ExecStart = "${pkgs.sfeed}/bin/sfeed_update";
    };
  };

  systemd.user.timers."sfeed-update" = {
    description = "Run sfeed_update daily";
    timerConfig = {
      OnCalendar = "daily";
      Persistent = true;
    };
    wantedBy = ["timers.target"];
  };
}