Skip to content

Commit d6f21fc

Browse files
committed
Add eros config
This has some extra garbage in it, I think, but it is a working configuration.
1 parent 65ba495 commit d6f21fc

File tree

8 files changed

+250
-5
lines changed

8 files changed

+250
-5
lines changed

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@
5656
{ nixpkgs.overlays = overlays; }
5757
];
5858
};
59+
60+
eros = mkSystem {
61+
inherit nixpkgs home-manager;
62+
system = "x86_64-linux";
63+
extraModules = [
64+
./hosts/eros/hardware-configuration.nix
65+
./hosts/eros/configuration.nix
66+
{ nixpkgs.overlays = overlays; }
67+
];
68+
};
5969
};
6070

6171
darwinConfigurations = {

home/default.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
universal-ctags
3737
tmux-themepack
3838
git-bug
39+
mutt
40+
mutt-oauth
3941
] ++ lib.optionals (!stdenv.isDarwin) [
4042
wslu
4143
keybase-gui

home/programs/vim.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@
2121
tagbar
2222
taboo-vim
2323
vim-helm
24-
pkgs.vim-bicep
24+
# pkgs.vim-bicep
2525
vim-terraform
2626
ultisnips
2727
pkgs.vim-sentencer
2828
vim-helm-complete
2929
vim-swap
30+
vim-ledger
3031
];
3132
extraConfig = ''
3233
colorscheme space_vim_theme

hosts/eros/configuration.nix

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
# Edit this configuration file to define what should be installed on
2+
# your system. Help is available in the configuration.nix(5) man page
3+
# and in the NixOS manual (accessible by running ‘nixos-help’).
4+
5+
{ config, pkgs, ... }:
6+
7+
{
8+
imports = [];
9+
10+
# Bootloader.
11+
boot.loader.systemd-boot.enable = true;
12+
boot.loader.efi.canTouchEfiVariables = true;
13+
14+
networking.hostName = "eros"; # Define your hostname.
15+
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
16+
17+
# Configure network proxy if necessary
18+
# networking.proxy.default = "http://user:password@proxy:port/";
19+
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
20+
21+
# Enable networking
22+
networking.networkmanager.enable = true;
23+
24+
# Set your time zone.
25+
time.timeZone = "America/New_York";
26+
27+
# Select internationalisation properties.
28+
i18n.defaultLocale = "en_US.UTF-8";
29+
30+
nix = {
31+
settings = {
32+
experimental-features = "nix-command flakes";
33+
};
34+
};
35+
36+
i18n.extraLocaleSettings = {
37+
LC_ADDRESS = "en_US.UTF-8";
38+
LC_IDENTIFICATION = "en_US.UTF-8";
39+
LC_MEASUREMENT = "en_US.UTF-8";
40+
LC_MONETARY = "en_US.UTF-8";
41+
LC_NAME = "en_US.UTF-8";
42+
LC_NUMERIC = "en_US.UTF-8";
43+
LC_PAPER = "en_US.UTF-8";
44+
LC_TELEPHONE = "en_US.UTF-8";
45+
LC_TIME = "en_US.UTF-8";
46+
};
47+
48+
# Enable the X11 windowing system.
49+
services.xserver = {
50+
enable = true;
51+
config = ''
52+
Section "InputClass"
53+
Identifier "keyboard defaults"
54+
MatchIsKeyboard "on"
55+
Option "AutoRepeat" "200 40"
56+
EndSection
57+
'';
58+
};
59+
60+
services.interception-tools = {
61+
enable = true;
62+
plugins = [ pkgs.interception-tools-plugins.caps2esc ];
63+
udevmonConfig = ''
64+
- JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.caps2esc}/bin/caps2esc -m 1 | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE"
65+
DEVICE:
66+
EVENTS:
67+
EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
68+
'';
69+
};
70+
71+
# Enable the GNOME Desktop Environment.
72+
services.xserver.displayManager.gdm.enable = true;
73+
services.xserver.desktopManager.gnome.enable = true;
74+
75+
# Configure keymap in X11
76+
services.xserver.xkb = {
77+
layout = "us";
78+
variant = "";
79+
};
80+
81+
# Enable CUPS to print documents.
82+
services.printing.enable = true;
83+
84+
# Enable sound with pipewire.
85+
hardware.pulseaudio.enable = false;
86+
security.rtkit.enable = true;
87+
services.pipewire = {
88+
enable = true;
89+
alsa.enable = true;
90+
alsa.support32Bit = true;
91+
pulse.enable = true;
92+
# If you want to use JACK applications, uncomment this
93+
#jack.enable = true;
94+
95+
# use the example session manager (no others are packaged yet so this is enabled by default,
96+
# no need to redefine it in your config for now)
97+
#media-session.enable = true;
98+
};
99+
100+
# Enable touchpad support (enabled default in most desktopManager).
101+
# services.xserver.libinput.enable = true;
102+
103+
# Define a user account. Don't forget to set a password with ‘passwd’.
104+
users.users.tim = {
105+
isNormalUser = true;
106+
description = "Tim Raymond";
107+
extraGroups = [ "networkmanager" "wheel" ];
108+
packages = with pkgs; [
109+
# thunderbird
110+
];
111+
};
112+
113+
# Install firefox.
114+
programs.firefox.enable = true;
115+
116+
# Allow unfree packages
117+
nixpkgs.config = {
118+
allowUnfree = true;
119+
};
120+
121+
# List packages installed in system profile. To search, run:
122+
# $ nix search wget
123+
environment.systemPackages = with pkgs; [
124+
gimp
125+
inkscape
126+
zeal
127+
qemu
128+
wine
129+
freecad
130+
cura-appimage
131+
flashprint
132+
caprine # facebook messenger
133+
finamp
134+
lightburn
135+
qgis
136+
gnucash
137+
nmap
138+
wireshark
139+
];
140+
141+
# Some programs need SUID wrappers, can be configured further or are
142+
# started in user sessions.
143+
# programs.mtr.enable = true;
144+
# programs.gnupg.agent = {
145+
# enable = true;
146+
# enableSSHSupport = true;
147+
# };
148+
149+
# List services that you want to enable:
150+
151+
# Enable the OpenSSH daemon.
152+
# services.openssh.enable = true;
153+
154+
# Open ports in the firewall.
155+
# networking.firewall.allowedTCPPorts = [ ... ];
156+
# networking.firewall.allowedUDPPorts = [ ... ];
157+
# Or disable the firewall altogether.
158+
# networking.firewall.enable = false;
159+
160+
# This value determines the NixOS release from which the default
161+
# settings for stateful data, like file locations and database versions
162+
# on your system were taken. It‘s perfectly fine and recommended to leave
163+
# this value at the release version of the first install of this system.
164+
# Before changing this value read the documentation for this option
165+
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
166+
system.stateVersion = "25.05"; # Did you read the comment?
167+
168+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Do not modify this file! It was generated by ‘nixos-generate-config’
2+
# and may be overwritten by future invocations. Please make changes
3+
# to /etc/nixos/configuration.nix instead.
4+
{ config, lib, pkgs, modulesPath, ... }:
5+
6+
{
7+
imports =
8+
[ (modulesPath + "/installer/scan/not-detected.nix")
9+
];
10+
11+
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
12+
boot.initrd.kernelModules = [ ];
13+
boot.kernelModules = [ "kvm-intel" "wl" ];
14+
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
15+
16+
fileSystems."/" =
17+
{ device = "/dev/disk/by-uuid/1c2fc4a4-fbfc-40b3-82ce-76ad9bc9cb52";
18+
fsType = "ext4";
19+
};
20+
21+
boot.initrd.luks.devices."luks-0683926d-c355-4128-aba3-af1b60471a79".device = "/dev/disk/by-uuid/0683926d-c355-4128-aba3-af1b60471a79";
22+
23+
fileSystems."/boot" =
24+
{ device = "/dev/disk/by-uuid/F6BA-79A4";
25+
fsType = "vfat";
26+
options = [ "fmask=0077" "dmask=0077" ];
27+
};
28+
29+
swapDevices = [ ];
30+
31+
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
32+
# (the default) this is the recommended approach. When using systemd-networkd it's
33+
# still possible to use this option, but it's recommended to use it in conjunction
34+
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
35+
networking.useDHCP = lib.mkDefault true;
36+
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
37+
38+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
39+
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
40+
}

lib/mk-system.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ nixpkgs.lib.nixosSystem {
88
{
99
home-manager.useGlobalPkgs = true;
1010
home-manager.useUserPackages = true;
11-
home-manager.users.nixos = import ../home;
11+
home-manager.users.tim = import ../home;
1212
}
1313
] ++ extraModules;
1414
}

overlays/default.nix

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,28 @@ final: prev: {
7676
--prefix PATH : ${prev.lib.makeBinPath [ prev.bash ]}
7777
'';
7878
};
79+
80+
mutt-oauth = prev.stdenv.mkDerivation {
81+
pname = "mutt_oauth2";
82+
version = "354c5b11eaac97063dd98cbc58acbcecc34e6729";
83+
meta = {
84+
mainProgram = "mutt_oauth2.py";
85+
};
86+
buildInputs = [ prev.python3 ];
87+
nativeBuildInputs = [ prev.makeWrapper ];
88+
src = prev.fetchFromGitLab {
89+
owner = "muttmua";
90+
repo = "mutt";
91+
rev = "354c5b11eaac97063dd98cbc58acbcecc34e6729";
92+
sha256 = "sha256-3slr77Rd2yDyhiTt5C+g2h5hxytqu7LJo/6u4Q15N3s=";
93+
};
94+
installPhase = ''
95+
mkdir -p $out/bin
96+
cp $src/contrib/mutt_oauth2.py $out/bin
97+
sed -i s/YOUR_GPG_IDENTITY/[email protected]/g $out/bin/mutt_oauth2.py
98+
chmod +x $out/bin/mutt_oauth2.py
99+
wrapProgram $out/bin/mutt_oauth2.py \
100+
--prefix PATH : ${prev.lib.makeBinPath [ prev.python3 ]}
101+
'';
102+
};
79103
}

0 commit comments

Comments
 (0)