Add host type and hostname to vars for easy reference by submodules
This commit is contained in:
parent
a31df4e136
commit
9a03d585e4
3 changed files with 30 additions and 39 deletions
15
flake.nix
15
flake.nix
|
|
@ -23,6 +23,8 @@
|
|||
# Generic NixOS config
|
||||
mkNixOSConfig = {
|
||||
path,
|
||||
type,
|
||||
hostname,
|
||||
extraModules ? [],
|
||||
}:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
|
|
@ -35,12 +37,21 @@
|
|||
path
|
||||
]
|
||||
++ extraModules;
|
||||
|
||||
vars.type = type;
|
||||
vars.hostname = hostname;
|
||||
};
|
||||
|
||||
# Additional modules for physical hosts
|
||||
mkPhysicalNixOSConfig = path:
|
||||
mkPhysicalNixOSConfig = {
|
||||
path,
|
||||
type,
|
||||
hostname,
|
||||
}:
|
||||
mkNixOSConfig {
|
||||
path = path;
|
||||
type = type;
|
||||
hostname = hostname;
|
||||
extraModules = [ ./hosts/physical ];
|
||||
};
|
||||
|
||||
|
|
@ -61,7 +72,7 @@
|
|||
# Collection of all of our configs
|
||||
nixosConfigurations = {
|
||||
# =========== Desktops ===========
|
||||
crow = mkPhysicalNixOSConfig ./hosts/physical/crow;
|
||||
crow = mkPhysicalNixOSConfig ./hosts/physical/crow "physical" "crow";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
../tiling
|
||||
];
|
||||
|
||||
xdg.configFile."niri/config.kdl".source = ../../../../${vars.path}/host-configs/niri/config.kdl
|
||||
xdg.configFile."niri/config.kdl".source = ../../../../hosts/${vars.type}/${vars.hostname}/host-configs/niri/config.kdl;
|
||||
|
||||
programs.zsh = {
|
||||
profileExtra = ''
|
||||
|
|
|
|||
|
|
@ -8,19 +8,6 @@
|
|||
// https://yalter.github.io/niri/Configuration:-Input
|
||||
input {
|
||||
keyboard {
|
||||
xkb {
|
||||
// You can set rules, model, layout, variant and options.
|
||||
// For more information, see xkeyboard-config(7).
|
||||
|
||||
// For example:
|
||||
// layout "us,ru"
|
||||
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
|
||||
|
||||
// If this section is empty, niri will fetch xkb settings
|
||||
// from org.freedesktop.locale1. You can control these using
|
||||
// localectl set-x11-keymap.
|
||||
}
|
||||
|
||||
// Enable numlock on startup, omitting this setting disables it.
|
||||
numlock
|
||||
}
|
||||
|
|
@ -42,31 +29,9 @@ input {
|
|||
// disabled-on-external-mouse
|
||||
}
|
||||
|
||||
mouse {
|
||||
// off
|
||||
// natural-scroll
|
||||
// accel-speed 0.2
|
||||
// accel-profile "flat"
|
||||
// scroll-method "no-scroll"
|
||||
}
|
||||
|
||||
trackpoint {
|
||||
// off
|
||||
// natural-scroll
|
||||
// accel-speed 0.2
|
||||
// accel-profile "flat"
|
||||
// scroll-method "on-button-down"
|
||||
// scroll-button 273
|
||||
// scroll-button-lock
|
||||
// middle-emulation
|
||||
}
|
||||
|
||||
// Uncomment this to make the mouse warp to the center of newly focused windows.
|
||||
// warp-mouse-to-focus
|
||||
|
||||
// Focus windows and outputs automatically when moving the mouse into them.
|
||||
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
|
||||
// focus-follows-mouse max-scroll-amount="0%"
|
||||
focus-follows-mouse max-scroll-amount="0%"
|
||||
}
|
||||
|
||||
// You can configure outputs by their name, which you can find
|
||||
|
|
@ -106,6 +71,21 @@ input {
|
|||
position x=1280 y=0
|
||||
}
|
||||
|
||||
output "HDMI-A-1" {
|
||||
mode "1920x1080@60.00"
|
||||
position x=0 y=-180
|
||||
}
|
||||
|
||||
output "DP-2" {
|
||||
mode "2560x1440@144.00"
|
||||
position x=1920 y=0
|
||||
}
|
||||
|
||||
output "DP-1" {
|
||||
mode "1680x1050@60.00"
|
||||
position x=4480 y=-195
|
||||
}
|
||||
|
||||
// Settings that influence how windows are positioned and sized.
|
||||
// Find more information on the wiki:
|
||||
// https://yalter.github.io/niri/Configuration:-Layout
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue