Skip to content

Commit d68fea5

Browse files
committed
feat(sway): remove unused configs and improve system setup
- Removed Emacs IME script and related keybinding - Deleted unused window rules configuration - Adjusted Waybar clock format for simplicity - Increased swayidle timeout to 900 seconds - Added container configuration for NixOS with networking and services - Updated networking to enable NAT and simplify nameserver settings - Enabled nix-ld in programs configuration
1 parent e25c01b commit d68fea5

File tree

10 files changed

+62
-86
lines changed

10 files changed

+62
-86
lines changed

home-manager/programs/sway/config.d/bindkey.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
# Exit sway (logs you out of your Wayland session)
2525
bindsym $mod+Shift+x exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
2626

27-
# Launch Emacs as an IME
28-
bindsym $mod+Shift+e exec ~/.config/sway/emacs-ime.sh
29-
3027
# Reload the configuration file
3128
bindsym $mod+Shift+p exec grim screenshot.png
3229

home-manager/programs/sway/config.d/window-rules.conf

Lines changed: 0 additions & 35 deletions
This file was deleted.

home-manager/programs/sway/default.nix

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
xdg.configFile = {
33
"sway/wallpaper.png".source = ./wallpaper.png;
44
"sway/config".source = ./config;
5-
"sway/emacs-ime.sh" = {
6-
source = ./emacs-ime.sh;
7-
executable = true;
8-
};
95
"sway/config.d/" = {
106
source = ./config.d;
117
recursive = true;

home-manager/programs/sway/emacs-ime.sh

Lines changed: 0 additions & 29 deletions
This file was deleted.

home-manager/programs/waybar/config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"clock": {
99
"tooltip-format": "{:%Y-%m-%d | %H:%M}",
1010
"format-alt": "{:%Y-%m-%d}",
11-
"format": "{:%a %Y-%m-%d %I:%M %p}"
11+
"format": "{:%a %Y-%m-%d}"
1212
},
1313
"cpu": {
1414
"format": " {usage}%"

home-manager/services/swayidle/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
enable = pkgs.stdenv.isLinux;
55
timeouts = [
66
{
7-
timeout = 60;
7+
timeout = 900;
88
command = "${pkgs.swaylock}/bin/swaylock -fF";
99
}
1010
];

nixos/config/containers.nix

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
containers = {
3+
alice = {
4+
autoStart = true;
5+
6+
privateNetwork = true;
7+
hostAddress = "192.168.100.10";
8+
localAddress = "192.168.100.11";
9+
hostAddress6 = "fc00::1";
10+
localAddress6 = "fc00::2";
11+
12+
config =
13+
{
14+
config,
15+
pkgs,
16+
lib,
17+
...
18+
}:
19+
{
20+
system.stateVersion = "25.05";
21+
22+
environment.systemPackages = with pkgs; [ git ];
23+
24+
users.users.take = {
25+
isNormalUser = true;
26+
home = "/home/take";
27+
extraGroups = [ "wheel" ];
28+
};
29+
30+
services = {
31+
openssh.enable = true;
32+
httpd.enable = true;
33+
resolved.enable = true;
34+
};
35+
36+
networking = {
37+
useHostResolvConf = lib.mkForce false;
38+
firewall = {
39+
enable = true;
40+
allowedTCPPorts = [
41+
22
42+
80
43+
];
44+
};
45+
};
46+
};
47+
};
48+
};
49+
}

nixos/config/networking.nix

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,17 @@
1717
wifi-security = {
1818
auth-alg = "open";
1919
key-mgmt = "wpa-psk";
20-
psk = "uengspy3bwdkb"; # $HOME_WIFI_PASSWORD
20+
psk = "uengspy3bwdkb";
2121
};
2222
};
2323
};
2424
};
25-
enableIPv6 = true;
26-
firewall.enable = true;
27-
nameservers = [
28-
"8.8.8.8"
29-
"8.8.4.4"
30-
"1.1.1.1"
31-
"1.0.0.1"
32-
"2001:4860:4860::8888"
33-
"2001:4860:4860::8844"
34-
"2606:4700:4700::1111"
35-
"2606:4700:4700::1001"
36-
];
25+
26+
nat = {
27+
enable = true;
28+
enableIPv6 = true;
29+
internalInterfaces = [ "ve-+" ];
30+
externalInterface = "ens3";
31+
};
3732
};
3833
}

nixos/config/programs.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
fish.enable = true;
44
firefox.enable = true;
55
noisetorch.enable = true;
6+
nix-ld.enable = true;
67

78
chromium = {
89
enable = true;

nixos/default.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
}:
88
let
99
boot = import ./config/boot.nix;
10+
containers = import ./config/containers.nix;
1011
fonts = import ./config/fonts.nix { inherit pkgs; };
1112
hardware = import ./config/hardware.nix;
1213
i18n = import ./config/i18n.nix;
@@ -26,6 +27,7 @@ in
2627
imports = [
2728
xremap.nixosModules.default
2829
boot
30+
containers
2931
fonts
3032
hardware
3133
i18n

0 commit comments

Comments
 (0)