tangled
alpha
login
or
join now
aottr.dev
/
otterden
0
fork
atom
❄️ Nix configurations
0
fork
atom
overview
issues
pulls
pipelines
add git and gpg
Alex Ottr
9 months ago
6d395c18
d93feabb
+73
-27
5 changed files
expand all
collapse all
unified
split
hosts
otter
configuration.nix
hardware-configuration.nix
home.nix
modules
home-manager
git.nix
nixos
common
gpg.nix
+11
-18
hosts/otter/configuration.nix
···
1
1
-
{ config, pkgs, ... }:
1
1
+
{ config, lib, pkgs, ... }:
2
2
3
3
{
4
4
imports =
5
5
[ # Include the results of the hardware scan.
6
6
./hardware-configuration.nix
7
7
+
../../modules/nixos/common/i18n.nix
8
8
+
../../modules/nixos/common/gpg.nix
7
9
];
8
10
9
11
# Bootloader.
···
14
16
boot.kernelPackages = pkgs.linuxPackages_latest;
15
17
16
18
boot.initrd.luks.devices."luks-7736f743-324d-43d9-b3ad-5ddd3b3bd0e0".device = "/dev/disk/by-uuid/7736f743-324d-43d9-b3ad-5ddd3b3bd0e0";
17
17
-
networking.hostName = "otter"; # Define your hostname.
19
19
+
20
20
+
networking = {
21
21
+
hostName = "otter";
22
22
+
networkmanager.enable = true;
23
23
+
domain = "otter.place";
24
24
+
useDHCP = lib.mkDefault true;
25
25
+
};
26
26
+
18
27
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
19
28
20
29
# Configure network proxy if necessary
21
30
# networking.proxy.default = "http://user:password@proxy:port/";
22
31
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
23
32
24
24
-
# Enable networking
25
25
-
networking.networkmanager.enable = true;
26
33
27
34
# Set your time zone.
28
35
time.timeZone = "Europe/Paris";
29
36
30
30
-
# Select internationalisation properties.
31
31
-
i18n.defaultLocale = "en_US.UTF-8";
32
32
-
33
33
-
i18n.extraLocaleSettings = {
34
34
-
LC_ADDRESS = "fr_FR.UTF-8";
35
35
-
LC_IDENTIFICATION = "fr_FR.UTF-8";
36
36
-
LC_MEASUREMENT = "fr_FR.UTF-8";
37
37
-
LC_MONETARY = "fr_FR.UTF-8";
38
38
-
LC_NAME = "fr_FR.UTF-8";
39
39
-
LC_NUMERIC = "fr_FR.UTF-8";
40
40
-
LC_PAPER = "fr_FR.UTF-8";
41
41
-
LC_TELEPHONE = "fr_FR.UTF-8";
42
42
-
LC_TIME = "fr_FR.UTF-8";
43
43
-
};
44
37
45
38
# Enable the X11 windowing system.
46
39
# You can disable this if you're only using the Wayland session.
+4
-9
hosts/otter/hardware-configuration.nix
···
10
10
boot.kernelModules = [ "kvm-amd" ];
11
11
boot.extraModulePackages = [ ];
12
12
13
13
-
powerManagement.cpuFreqGovernor = "powersave";
13
13
+
# powerManagement = {
14
14
+
# cpuFreqGovernor = "powersave";
15
15
+
# powertop.enable = true;
16
16
+
# };
14
17
15
18
fileSystems."/" =
16
19
{ device = "/dev/disk/by-uuid/9b07d71e-c941-4369-97d7-eb2d8b223508";
···
28
31
swapDevices =
29
32
[ { device = "/dev/disk/by-uuid/8e8176f7-0b19-4fed-8ddf-721cc27abe2f"; }
30
33
];
31
31
-
32
32
-
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
33
33
-
# (the default) this is the recommended approach. When using systemd-networkd it's
34
34
-
# still possible to use this option, but it's recommended to use it in conjunction
35
35
-
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
36
36
-
networking.useDHCP = lib.mkDefault true;
37
37
-
# networking.interfaces.enp193s0f3u1.useDHCP = lib.mkDefault true;
38
38
-
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
39
34
40
35
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
41
36
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+1
hosts/otter/home.nix
···
7
7
8
8
imports = [
9
9
../../modules/home-manager/vscode.nix
10
10
+
../../modules/home-manager/git.nix
10
11
];
11
12
12
13
home.packages = [];
+45
modules/home-manager/git.nix
···
1
1
+
{
2
2
+
config,
3
3
+
lib,
4
4
+
pkgs,
5
5
+
...
6
6
+
}: {
7
7
+
8
8
+
programs.fish.shellAbbrs = {
9
9
+
g = "git";
10
10
+
ga = "git add";
11
11
+
gcm = "git commit -sm";
12
12
+
gp = "git push";
13
13
+
gpl = "git pull";
14
14
+
gr = "git rebase";
15
15
+
gs = "git status";
16
16
+
};
17
17
+
18
18
+
19
19
+
programs.gh = {
20
20
+
enable = true;
21
21
+
settings = {
22
22
+
version = "1";
23
23
+
git_protocol = "ssh";
24
24
+
};
25
25
+
};
26
26
+
27
27
+
programs.git = {
28
28
+
enable = true;
29
29
+
30
30
+
userName = "Alex Ottr";
31
31
+
userEmail = "alex@otter.foo";
32
32
+
signing = {
33
33
+
key = "B899892A9D13D8A761B5F3E0E3DC722E2943A517";
34
34
+
signByDefault = true;
35
35
+
};
36
36
+
37
37
+
extraConfig = {
38
38
+
init.defaultBranch = "main";
39
39
+
pull.rebase = true;
40
40
+
rerere.enabled = true;
41
41
+
42
42
+
tag.gpgSign = false;
43
43
+
};
44
44
+
};
45
45
+
}
+12
modules/nixos/common/gpg.nix
···
1
1
+
{...}: {
2
2
+
programs.gnupg.agent = {
3
3
+
enable = true;
4
4
+
enableSSHSupport = true;
5
5
+
settings = {
6
6
+
default-cache-ttl = 1209600;
7
7
+
default-cache-ttl-ssh = 1209600;
8
8
+
max-cache-ttl = 1209600;
9
9
+
max-cache-ttl-ssh = 1209600;
10
10
+
};
11
11
+
};
12
12
+
}