aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix12
-rw-r--r--hosts/mantis/configuration.nix89
-rw-r--r--programs/atuin.nix10
-rw-r--r--programs/tmux.nix2
-rw-r--r--scripts/battery.nix6
5 files changed, 44 insertions, 75 deletions
diff --git a/flake.nix b/flake.nix
index 16326a5..a781e59 100644
--- a/flake.nix
+++ b/flake.nix
@@ -89,6 +89,18 @@
89 imports = [ ./hosts/mantis/configuration.nix ]; 89 imports = [ ./hosts/mantis/configuration.nix ];
90 _module.args.self = self; 90 _module.args.self = self;
91 } 91 }
92 home-manager.nixosModules.home-manager
93 {
94 home-manager.useGlobalPkgs = true;
95 home-manager.useUserPackages = true;
96 home-manager.users.op = {
97 imports = [ ./hosts/mantis/home.nix ];
98 _module.args.self = self;
99 _module.args.inputs = inputs;
100 _module.args.theme = import ./theme;
101 _module.args.font = import ./font.nix;
102 };
103 }
92 ]; 104 ];
93 }; 105 };
94 106
diff --git a/hosts/mantis/configuration.nix b/hosts/mantis/configuration.nix
index acc2a49..c774eef 100644
--- a/hosts/mantis/configuration.nix
+++ b/hosts/mantis/configuration.nix
@@ -1,6 +1,6 @@
1# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). 1# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
2 2
3{ config, lib, pkgs, ... }: 3{ config, lib, pkgs, self, ... }:
4 4
5{ 5{
6 imports = 6 imports =
@@ -12,58 +12,19 @@
12 boot.loader.systemd-boot.enable = true; 12 boot.loader.systemd-boot.enable = true;
13 boot.loader.efi.canTouchEfiVariables = true; 13 boot.loader.efi.canTouchEfiVariables = true;
14 14
15 networking.hostName = "mantis"; # Define your hostname. 15 networking.hostName = "mantis";
16 # Pick only one of the below networking options.
17 # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
18 # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
19
20 # Set your time zone.
21 time.timeZone = "Europe/London"; 16 time.timeZone = "Europe/London";
22 17
23 # Configure network proxy if necessary 18 nixpkgs.overlays = with self.overlays; [
24 # networking.proxy.default = "http://user:password@proxy:port/"; 19 prompt
25 # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 20 better-text-objs
26 21 vim-colors-plain
27 # Select internationalisation properties. 22 ];
28 # i18n.defaultLocale = "en_US.UTF-8";
29 # console = {
30 # font = "Lat2-Terminus16";
31 # keyMap = "us";
32 # useXkbConfig = true; # use xkb.options in tty.
33 # };
34
35 # Enable the X11 windowing system.
36 services.xserver.enable = true;
37
38
39 # Enable the GNOME Desktop Environment.
40 services.xserver.displayManager.gdm.enable = true;
41 services.xserver.desktopManager.gnome.enable = true;
42
43
44 # Configure keymap in X11
45 # services.xserver.xkb.layout = "us";
46 # services.xserver.xkb.options = "eurosign:e,caps:escape";
47
48 # Enable CUPS to print documents.
49 # services.printing.enable = true;
50
51 # Enable sound.
52 # hardware.pulseaudio.enable = true;
53 # OR
54 # services.pipewire = {
55 # enable = true;
56 # pulse.enable = true;
57 # };
58 23
59 # Enable touchpad support (enabled default in most desktopManager).
60 services.xserver.libinput.enable = true;
61 services.tailscale.enable = true;
62 24
63 # Define a user account. Don't forget to set a password with ‘passwd’.
64 users.users.op = { 25 users.users.op = {
65 isNormalUser = true; 26 isNormalUser = true;
66 extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. 27 extraGroups = [ "wheel" ];
67 packages = with pkgs; [ 28 packages = with pkgs; [
68 qutebrowser 29 qutebrowser
69 tree 30 tree
@@ -72,39 +33,19 @@
72 home = "/home/op"; 33 home = "/home/op";
73 }; 34 };
74 35
75 # List packages installed in system profile. To search, run:
76 # $ nix search wget
77 environment.systemPackages = with pkgs; [ 36 environment.systemPackages = with pkgs; [
78 vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. 37 man-pages
79 wget 38 man-pages-posix
80 git 39 (lib.hiPrio pkgs.bashInteractive_5)
81 ]; 40 ];
82 41
83 # Some programs need SUID wrappers, can be configured further or are 42 services = {
84 # started in user sessions. 43 openssh.enable = true;
85 # programs.mtr.enable = true; 44 tailscale.enable = true;
86 # programs.gnupg.agent = { 45 };
87 # enable = true;
88 # enableSSHSupport = true;
89 # };
90
91 # List services that you want to enable:
92 46
93 # Enable the OpenSSH daemon.
94 services.openssh.enable = true;
95 nix.settings.experimental-features = [ "nix-command" "flakes" ]; 47 nix.settings.experimental-features = [ "nix-command" "flakes" ];
96 48
97 # Open ports in the firewall.
98 # networking.firewall.allowedTCPPorts = [ ... ];
99 # networking.firewall.allowedUDPPorts = [ ... ];
100 # Or disable the firewall altogether.
101 # networking.firewall.enable = false;
102
103 # Copy the NixOS configuration file and link it from the resulting system
104 # (/run/current-system/configuration.nix). This is useful in case you
105 # accidentally delete configuration.nix.
106 # system.copySystemConfiguration = true;
107
108 # This option defines the first version of NixOS you have installed on this particular machine, 49 # This option defines the first version of NixOS you have installed on this particular machine,
109 # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. 50 # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
110 # 51 #
diff --git a/programs/atuin.nix b/programs/atuin.nix
index 2a501fc..38dac37 100644
--- a/programs/atuin.nix
+++ b/programs/atuin.nix
@@ -2,5 +2,15 @@
2 programs.atuin = { 2 programs.atuin = {
3 enable = true; 3 enable = true;
4 enableBashIntegration = true; 4 enableBashIntegration = true;
5 settings = {
6 invert = true;
7 history_format = "{command}";
8 theme.name = "minimal";
9 style = "compact";
10 inline_height = 10;
11 prefers_reduced_motion = true;
12 show_help = false;
13 show_tabs = false;
14 };
5 }; 15 };
6} 16}
diff --git a/programs/tmux.nix b/programs/tmux.nix
index 43778dd..c8745c7 100644
--- a/programs/tmux.nix
+++ b/programs/tmux.nix
@@ -138,7 +138,7 @@ in
138 # status left 138 # status left
139 set -g status-left-length 70 139 set -g status-left-length 70
140 set -g status-left "#[fg=colour7]#(bat -q) " 140 set -g status-left "#[fg=colour7]#(bat -q) "
141 set -ag status-left "#[fg=colour15]#(${cmus-np}/bin/cmus-np) #[fg=colour8]#(${cmus-status}/bin/cmus-status)" 141 # set -ag status-left "#[fg=colour15]#(${cmus-np}/bin/cmus-np) #[fg=colour8]#(${cmus-status}/bin/cmus-status)"
142 142
143 # include pwd and branch in pane border 143 # include pwd and branch in pane border
144 set -g pane-border-status top 144 set -g pane-border-status top
diff --git a/scripts/battery.nix b/scripts/battery.nix
index 87b6cff..3aed4f9 100644
--- a/scripts/battery.nix
+++ b/scripts/battery.nix
@@ -17,6 +17,12 @@ pkgs.writeScriptBin name
17 17
18 bat_status="" 18 bat_status=""
19 bat_status=$( cat /sys/class/power_supply/BAT0/capacity ) 19 bat_status=$( cat /sys/class/power_supply/BAT0/capacity )
20
21 if [ -z $bat_status ]; then
22 echo -ne "#[fg=color2]${symbol} #[fg=colour8]$HOSTNAME"
23 exit 0
24 fi
25
20 charging_status=$( cat /sys/class/power_supply/BAT0/status ) 26 charging_status=$( cat /sys/class/power_supply/BAT0/status )
21 27
22 health() { 28 health() {