Move things into abstacted sections to maximuse reuse
This commit is contained in:
parent
9e9aa8fcd8
commit
bd5039992c
67
flake.nix
67
flake.nix
|
@ -22,14 +22,32 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
home-config = {
|
home-config = {
|
||||||
imports = [home-manager.nixosModules.home-manager];
|
imports = [home-manager.nixosModules.home-manager ./users/root];
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = false;
|
useUserPackages = false;
|
||||||
|
users.root.imports = [./home/env/bash.nix ./home/env/starship.nix];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
hyprland-config = {
|
hyprland-config = {
|
||||||
imports = [hyprland.homeManagerModules.default];
|
imports = [hyprland.nixosModules.default];
|
||||||
|
security.pam.services.swaylock = {};
|
||||||
|
programs.hyprland.enable = true;
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings = rec {
|
||||||
|
initial_session.command = "Hyprland";
|
||||||
|
default_session = initial_session;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
hyprland-home-config = {pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
hyprland.homeManagerModules.default
|
||||||
|
./home/desktop/hyprland.nix
|
||||||
|
./home/gui
|
||||||
|
];
|
||||||
|
programs.firefox.package = pkgs.firefox-wayland;
|
||||||
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
||||||
preload = ${wallpapers.outputs.default}
|
preload = ${wallpapers.outputs.default}
|
||||||
wallpaper = ,${wallpapers.outputs.default}
|
wallpaper = ,${wallpapers.outputs.default}
|
||||||
|
@ -45,8 +63,8 @@
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
home-config
|
home-config
|
||||||
./hosts/common.nix
|
./hosts/Legion
|
||||||
./hosts/Legion/configuration.nix
|
./users/xenia
|
||||||
./services/Legion.nix
|
./services/Legion.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -58,23 +76,11 @@
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
home-config
|
home-config
|
||||||
hyprland.nixosModules.default
|
hyprland-config
|
||||||
./hosts/common.nix
|
./hosts/Vanguard
|
||||||
./hosts/Vanguard/configuration.nix
|
./users/xenia
|
||||||
./services/sshd
|
./services/sshd
|
||||||
{
|
{home-manager.users.xenia.imports = [hyprland-home-config];}
|
||||||
security.pam.services.swaylock = {};
|
|
||||||
programs.hyprland.enable = true;
|
|
||||||
home-manager.users.xenia = {
|
|
||||||
imports = [
|
|
||||||
hyprland-config
|
|
||||||
./hosts/Vanguard/users/xenia.nix
|
|
||||||
./home/personal.nix
|
|
||||||
./home/gui
|
|
||||||
./home/desktop/hyprland.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
N0245 = nixpkgs.lib.nixosSystem {
|
N0245 = nixpkgs.lib.nixosSystem {
|
||||||
|
@ -85,24 +91,11 @@
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
home-config
|
home-config
|
||||||
hyprland.nixosModules.default
|
hyprland-config
|
||||||
./hosts/common.nix
|
./hosts/N0245
|
||||||
./hosts/N0245/configuration.nix
|
./users/elitherl/N0245.nix
|
||||||
./services/syncthing/N0245.nix
|
./services/syncthing/N0245.nix
|
||||||
{
|
{home-manager.users.elitherl.imports = [hyprland-home-config];}
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
security.pam.services.swaylock = {};
|
|
||||||
programs.hyprland.enable = true;
|
|
||||||
home-manager.users.elitherl = {
|
|
||||||
imports = [
|
|
||||||
hyprland-config
|
|
||||||
./hosts/N0245/users/elitherl.nix
|
|
||||||
./home/work.nix
|
|
||||||
./home/gui
|
|
||||||
./home/desktop/hyprland.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,40 +1,17 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running `nixos-help`).
|
# and in the NixOS manual (accessible by running `nixos-help`).
|
||||||
{pkgs, ...}: {
|
{...}: {
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
../common.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
layout = "gb";
|
|
||||||
xkbVariant = "";
|
|
||||||
};
|
|
||||||
console.keyMap = "uk";
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "Europe/London";
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "en_GB.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "en_GB.UTF-8";
|
|
||||||
LC_MEASUREMENT = "en_GB.UTF-8";
|
|
||||||
LC_MONETARY = "en_GB.UTF-8";
|
|
||||||
LC_NAME = "en_GB.UTF-8";
|
|
||||||
LC_NUMERIC = "en_GB.UTF-8";
|
|
||||||
LC_PAPER = "en_GB.UTF-8";
|
|
||||||
LC_TELEPHONE = "en_GB.UTF-8";
|
|
||||||
LC_TIME = "en_GB.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "Legion"; # Define your hostname.
|
hostName = "Legion"; # Define your hostname.
|
||||||
nameservers = ["192.168.1.230" "127.0.0.1" "9.9.9.9"];
|
nameservers = ["192.168.1.230" "127.0.0.1" "9.9.9.9"];
|
||||||
|
@ -49,25 +26,6 @@
|
||||||
upper = "05:00";
|
upper = "05:00";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
users.users.xenia = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Evie Litherland-Smith";
|
|
||||||
extraGroups = ["networkmanager" "wheel"];
|
|
||||||
shell = pkgs.fish;
|
|
||||||
openssh.authorizedKeys.keys = import ../../auth/authorized_keys.nix;
|
|
||||||
};
|
|
||||||
home-manager.users.xenia = {
|
|
||||||
imports = [../../home/personal.nix];
|
|
||||||
home.username = "xenia";
|
|
||||||
home.homeDirectory = "/home/xenia";
|
|
||||||
home.stateVersion = "22.11";
|
|
||||||
};
|
|
||||||
home-manager.users.root = {
|
|
||||||
imports = [../../home/env/bash.nix ../../home/env/starship.nix];
|
|
||||||
home.username = "root";
|
|
||||||
home.homeDirectory = "/root";
|
|
||||||
home.stateVersion = "22.11";
|
|
||||||
};
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
|
|
|
@ -1,17 +1,12 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
{pkgs, ...}: {
|
{...}: {
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
../common.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.package = pkgs.nixUnstable;
|
|
||||||
nix.extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
@ -26,26 +21,11 @@
|
||||||
boot.initrd.luks.devices."luks-761eeb11-3091-4142-9232-4fb33165eccd".keyFile = "/crypto_keyfile.bin";
|
boot.initrd.luks.devices."luks-761eeb11-3091-4142-9232-4fb33165eccd".keyFile = "/crypto_keyfile.bin";
|
||||||
|
|
||||||
networking.hostName = "N0245"; # Define your hostname.
|
networking.hostName = "N0245"; # Define your hostname.
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
environment.etc."ppp/options".text = ''
|
environment.etc."ppp/options".text = ''
|
||||||
ipcp-accept-remote
|
ipcp-accept-remote
|
||||||
'';
|
'';
|
||||||
users.users.elitherl = {
|
services.greetd.settings.user = "elitherl";
|
||||||
isNormalUser = true;
|
|
||||||
description = "Evie Litherland-Smith";
|
|
||||||
extraGroups = ["networkmanager" "wheel"];
|
|
||||||
shell = pkgs.fish;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.greetd = {
|
|
||||||
enable = true;
|
|
||||||
settings = rec {
|
|
||||||
initial_session = {
|
|
||||||
command = "Hyprland";
|
|
||||||
user = "elitherl";
|
|
||||||
};
|
|
||||||
default_session = initial_session;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
|
|
1
hosts/N0245/default.nix
Normal file
1
hosts/N0245/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{...}: {imports = [./configuration.nix];}
|
|
@ -1,48 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
home.username = "elitherl";
|
|
||||||
home.homeDirectory = "/home/elitherl";
|
|
||||||
home.stateVersion = "22.11";
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
zotero
|
|
||||||
openfortivpn
|
|
||||||
nomachine-client
|
|
||||||
teams-for-linux
|
|
||||||
zoom-us
|
|
||||||
];
|
|
||||||
programs.firefox.package = pkgs.firefox-wayland;
|
|
||||||
|
|
||||||
wayland.windowManager.hyprland.extraConfig = ''
|
|
||||||
source=./common.conf
|
|
||||||
|
|
||||||
monitor = eDP-1,preferred,auto,1.0
|
|
||||||
monitor = DP-3,preferred,auto,auto
|
|
||||||
monitor = DP-4,preferred,auto,auto,transform,1
|
|
||||||
|
|
||||||
workspace = DP-3,1
|
|
||||||
workspace = DP-3,2
|
|
||||||
workspace = DP-3,3
|
|
||||||
workspace = DP-3,4
|
|
||||||
|
|
||||||
windowrule = float, title:^([Zz]oom).*$
|
|
||||||
windowrule = center, title:^([Zz]oom).*$
|
|
||||||
windowrule = workspace 3 silent, ^(teams-for-linux)$
|
|
||||||
windowrule = workspace 3, title:^([Zz]oom).*$
|
|
||||||
windowrule = workspace 4 silent, ^(Nxplayer.bin)$
|
|
||||||
|
|
||||||
exec-once = firefox
|
|
||||||
exec-once = teams-for-linux
|
|
||||||
'';
|
|
||||||
programs.waybar.settings = {
|
|
||||||
main."output" = "!DP-4";
|
|
||||||
alt = {
|
|
||||||
"include" = [
|
|
||||||
"~/.config/waybar/modules.json"
|
|
||||||
"~/.config/waybar/layout.json"
|
|
||||||
];
|
|
||||||
"output" = "DP-4";
|
|
||||||
"modules-left" = ["wlr/workspaces"];
|
|
||||||
"modules-center" = ["clock#compact"];
|
|
||||||
"modules-right" = ["tray"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -5,6 +5,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
../common.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
|
@ -30,24 +31,7 @@
|
||||||
hardware.steam-hardware.enable = true;
|
hardware.steam-hardware.enable = true;
|
||||||
hardware.opengl.driSupport32Bit = true;
|
hardware.opengl.driSupport32Bit = true;
|
||||||
|
|
||||||
users.users.xenia = {
|
services.greetd.settings.user = "xenia";
|
||||||
isNormalUser = true;
|
|
||||||
description = "Evie Litherland-Smith";
|
|
||||||
extraGroups = ["networkmanager" "wheel"];
|
|
||||||
shell = pkgs.fish;
|
|
||||||
openssh.authorizedKeys.keys = import ../../auth/authorized_keys.nix;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.greetd = {
|
|
||||||
enable = true;
|
|
||||||
settings = rec {
|
|
||||||
initial_session = {
|
|
||||||
command = "Hyprland";
|
|
||||||
user = "xenia";
|
|
||||||
};
|
|
||||||
default_session = initial_session;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
|
|
1
hosts/Vanguard/default.nix
Normal file
1
hosts/Vanguard/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{...}: {imports = [./configuration.nix];}
|
|
@ -1,6 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
home.username = "xenia";
|
|
||||||
home.homeDirectory = "/home/xenia";
|
|
||||||
home.stateVersion = "22.11";
|
|
||||||
programs.firefox.package = pkgs.firefox-wayland;
|
|
||||||
}
|
|
|
@ -21,7 +21,13 @@
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
||||||
};
|
};
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
environment.localBinInPath = true;
|
environment = {
|
||||||
|
localBinInPath = true;
|
||||||
|
shellAliases = {
|
||||||
|
ll = "ls -l";
|
||||||
|
update = "sudo nixos-rebuild switch --flake 'git+https://git.xenia.me.uk/xenia/nixos.git?ref=main'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
layout = "gb";
|
layout = "gb";
|
||||||
|
|
46
users/elitherl/N0245.nix
Normal file
46
users/elitherl/N0245.nix
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
imports = [./default.nix];
|
||||||
|
home-manager.users.elitherl = {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
zotero
|
||||||
|
openfortivpn
|
||||||
|
nomachine-client
|
||||||
|
teams-for-linux
|
||||||
|
zoom-us
|
||||||
|
];
|
||||||
|
wayland.windowManager.hyprland.extraConfig = ''
|
||||||
|
source=./common.conf
|
||||||
|
|
||||||
|
monitor = eDP-1,preferred,auto,1.0
|
||||||
|
monitor = DP-3,preferred,auto,auto
|
||||||
|
monitor = DP-4,preferred,auto,auto,transform,1
|
||||||
|
|
||||||
|
workspace = DP-3,1
|
||||||
|
workspace = DP-3,2
|
||||||
|
workspace = DP-3,3
|
||||||
|
workspace = DP-3,4
|
||||||
|
|
||||||
|
windowrule = float, title:^([Zz]oom).*$
|
||||||
|
windowrule = center, title:^([Zz]oom).*$
|
||||||
|
windowrule = workspace 3 silent, ^(teams-for-linux)$
|
||||||
|
windowrule = workspace 3, title:^([Zz]oom).*$
|
||||||
|
windowrule = workspace 4 silent, ^(Nxplayer.bin)$
|
||||||
|
|
||||||
|
exec-once = firefox
|
||||||
|
exec-once = teams-for-linux
|
||||||
|
'';
|
||||||
|
programs.waybar.settings = {
|
||||||
|
main."output" = "!DP-4";
|
||||||
|
alt = {
|
||||||
|
"include" = [
|
||||||
|
"~/.config/waybar/modules.json"
|
||||||
|
"~/.config/waybar/layout.json"
|
||||||
|
];
|
||||||
|
"output" = "DP-4";
|
||||||
|
"modules-left" = ["wlr/workspaces"];
|
||||||
|
"modules-center" = ["clock#compact"];
|
||||||
|
"modules-right" = ["tray"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
16
users/elitherl/default.nix
Normal file
16
users/elitherl/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
users.users.elitherl = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Evie Litherland-Smith";
|
||||||
|
extraGroups = ["networkmanager" "wheel"];
|
||||||
|
shell = pkgs.fish;
|
||||||
|
};
|
||||||
|
home-manager.users.elitherl = {
|
||||||
|
imports = [../../home/work.nix];
|
||||||
|
home = {
|
||||||
|
username = "elitherl";
|
||||||
|
homeDirectory = "/home/elitherl";
|
||||||
|
stateVersion = "22.11";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
7
users/root/default.nix
Normal file
7
users/root/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{...}: {
|
||||||
|
home-manager.users.root = {
|
||||||
|
home.username = "root";
|
||||||
|
home.homeDirectory = "/root";
|
||||||
|
home.stateVersion = "22.11";
|
||||||
|
};
|
||||||
|
}
|
17
users/xenia/default.nix
Normal file
17
users/xenia/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
users.users.xenia = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Evie Litherland-Smith";
|
||||||
|
extraGroups = ["networkmanager" "wheel"];
|
||||||
|
shell = pkgs.fish;
|
||||||
|
openssh.authorizedKeys.keys = import ../../auth/authorized_keys.nix;
|
||||||
|
};
|
||||||
|
home-manager.users.xenia = {
|
||||||
|
imports = [../../home/personal.nix];
|
||||||
|
home = {
|
||||||
|
username = "xenia";
|
||||||
|
homeDirectory = "/home/xenia";
|
||||||
|
stateVersion = "22.11";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue