Move nki-home to sway

This commit is contained in:
Natsu Kagami 2022-05-03 10:30:53 -04:00
parent 9bb3cc915c
commit 4b473b6a71
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51
5 changed files with 40 additions and 26 deletions

View file

@ -329,11 +329,11 @@
}, },
"secrets": { "secrets": {
"locked": { "locked": {
"lastModified": 1635971132, "lastModified": 1651588062,
"narHash": "sha256-w5QAlp+RmVFh3E9Kb79eX+QvcV/jTGPy/y4REGswzy8=", "narHash": "sha256-4AQqNsc2vTkpJZJOFW7nuVD7hV1w+ZRLAhiJhRQEiSE=",
"ref": "master", "ref": "master",
"rev": "9183da438dffec97148a1a7e6ec3462fa372ffe8", "rev": "f8320c88e4c073f18e49abeb60091c1c73dd0d9a",
"revCount": 1, "revCount": 2,
"type": "git", "type": "git",
"url": "ssh://git@github.com/natsukagami/nix-deploy-secrets" "url": "ssh://git@github.com/natsukagami/nix-deploy-secrets"
}, },

View file

@ -91,6 +91,7 @@
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.nki = import ./home/kagami-pc-home.nix; home-manager.users.nki = import ./home/kagami-pc-home.nix;
} }
inputs.secrets.nixosModules.x86_64-linux.common
(overlayForSystem "x86_64-linux") (overlayForSystem "x86_64-linux")
]; ];
}; };

View file

@ -29,10 +29,20 @@
]); ]);
# Enable X11 configuration # Enable X11 configuration
linux.graphical.type = "x11"; linux.graphical.type = "wayland";
linux.graphical.wallpaper = ./images/wallpaper_1.png; linux.graphical.wallpaper = ./images/wallpaper_1.png;
linux.graphical.x11.hidpi = true; programs.my-sway.enable = true;
linux.graphical.x11.enablei3 = true; programs.my-sway.fontSize = 13.0;
programs.my-sway.enableLaptopBars = false;
# Keyboard options
wayland.windowManager.sway.config.input."type:keyboard".xkb_layout = "jp";
# 144hz adaptive refresh ON!
wayland.windowManager.sway.config.output."ViewSonic Corporation XG2402 SERIES V4K182501054" = {
mode = "1920x1080@144Hz";
adaptive_sync = "on";
};
# linux.graphical.x11.hidpi = true;
# linux.graphical.x11.enablei3 = true;
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage

View file

@ -54,6 +54,12 @@ in
description = "The command to the terminal emulator to be used"; description = "The command to the terminal emulator to be used";
default = "${pkgs.alacritty}/bin/alacritty"; default = "${pkgs.alacritty}/bin/alacritty";
}; };
enableLaptopBars = mkOption {
type = types.bool;
description = "Whether to enable laptop-specific bars (battery)";
default = true;
};
}; };
config.wayland.windowManager.sway = mkIf cfg.enable { config.wayland.windowManager.sway = mkIf cfg.enable {
@ -225,8 +231,11 @@ in
"memory" "memory"
"temperature" "temperature"
"backlight" "backlight"
"battery" ] ++ (
"battery#bat2" if cfg.enableLaptopBars
then [ "battery" "battery#bat2" ]
else [ ]
) ++ [
"clock" "clock"
]; ];
@ -261,7 +270,7 @@ in
states = [ 0 50 ]; states = [ 0 50 ];
format-icons = [ "" "" ]; format-icons = [ "" "" ];
}; };
"battery" = { "battery" = mkIf cfg.enableLaptopBars {
states = { states = {
good = 95; good = 95;
warning = 30; warning = 30;
@ -272,7 +281,7 @@ in
# format-full = ""; # format-full = "";
format-icons = [ "" "" "" "" "" ]; format-icons = [ "" "" "" "" "" ];
}; };
"battery#bat2" = { "battery#bat2" = mkIf cfg.enableLaptopBars {
bat = "BAT2"; bat = "BAT2";
}; };
"network" = { "network" = {

View file

@ -73,11 +73,14 @@
# keyMap = "us"; # keyMap = "us";
# }; # };
# Enable the X11 windowing system. # Enable sway on login.
services.xserver.enable = true; environment.loginShellInit = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
exec sway
fi
'';
# Configure keymap in X11 # Configure keymap in X11
services.xserver.layout = "jp"; # services.xserver.layout = "jp";
# services.xserver.xkbOptions = ""; # services.xserver.xkbOptions = "";
# Enable CUPS to print documents. # Enable CUPS to print documents.
@ -154,9 +157,9 @@
# Enable Desktop Environment. # Enable Desktop Environment.
services.xserver.displayManager = { services.xserver.displayManager = {
lightdm.enable = true; # lightdm.enable = true;
}; };
services.xserver.desktopManager.cinnamon.enable = true; # services.xserver.desktopManager.cinnamon.enable = true;
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
@ -229,15 +232,6 @@
bindPort = 6565; bindPort = 6565;
}; };
# extra host for my personal server
sops.secrets.hosts = {
mode = "0755";
};
services.dnsmasq.enable = true;
services.dnsmasq.extraConfig = ''
addn-hosts=${config.sops.secrets.hosts.path}
'';
# Gaming! # Gaming!
programs.steam.enable = true; programs.steam.enable = true;
hardware.opengl.driSupport = true; hardware.opengl.driSupport = true;