nixos-config/modules/sean.nix

39 lines
978 B
Nix
Raw Normal View History

2021-11-09 17:20:34 +00:00
{ config, lib, pkgs, ... }:
{
users.users.sean = {
2022-03-28 05:15:58 +00:00
uid = 2000;
2021-11-09 17:20:34 +00:00
isNormalUser = true;
2022-02-13 03:41:57 +00:00
extraGroups = [
"audio"
"dialout"
"input"
"networkmanager"
"video"
"wheel"
"wireshark"
];
2023-05-31 20:50:26 +00:00
openssh.authorizedKeys.keys = import ../lib/ssh-keys.nix;
2021-11-09 17:20:34 +00:00
};
systemd.tmpfiles.rules = [ "e /home/sean/Downloads - - - 9d" ];
2021-11-09 17:24:21 +00:00
2022-06-22 03:28:28 +00:00
environment.systemPackages =
[
(pkgs.writeShellScriptBin "sc-check" ''
2022-06-22 19:56:21 +00:00
out="$(mktemp -d)"
nix build -o "$out/out" \
"bck#nixosConfigurations.$(hostname).config.system.build.toplevel"
readlink /run/current-system "$out/out"
2022-06-23 04:09:52 +00:00
rm -r "$out"
2022-06-22 03:28:28 +00:00
'')
]
++ map
(x: (pkgs.writeShellScriptBin "sc-${x}" "nixos-rebuild ${x} --refresh --flake bck"))
[ "boot" "build" "switch" "test" ];
2021-11-10 01:51:17 +00:00
2022-12-06 06:43:00 +00:00
environment.etc."my-settings.sh".text = ''
2021-11-10 01:51:17 +00:00
git config --global user.email "sean.bck@gmail.com"
git config --global user.name "Sean Buckley"
'';
2021-11-09 17:20:34 +00:00
}