diff --git a/flake.nix b/flake.nix index e70fe21e..fa8c5fb5 100644 --- a/flake.nix +++ b/flake.nix @@ -20,7 +20,9 @@ modules = [ home-manager.nixosModules.home-manager ./hosts/Legion/configuration.nix - ./machines/Legion + ./common.nix + ./locales/en_GB.nix + ./services/Legion.nix ]; }; N0245 = nixpkgs.lib.nixosSystem { @@ -40,11 +42,11 @@ homeConfigurations = { "tux" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages."aarch64-darwin"; - modules = [./machines/Monarch/tux.nix]; + modules = [./hosts/Monarch/home.nix]; }; "xenia" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages."aarch64-linux"; - modules = [./machines/Northstar/xenia.nix]; + modules = [./hosts/Northstar/home.nix]; }; }; }; diff --git a/hosts/Legion/configuration.nix b/hosts/Legion/configuration.nix index 924c210c..0d9303c8 100644 --- a/hosts/Legion/configuration.nix +++ b/hosts/Legion/configuration.nix @@ -1,21 +1,42 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running `nixos-help`). +{pkgs, ...}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; -{ config, pkgs, ... }: - -{ - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; - - nix.extraOptions = '' experimental-features = nix-command flakes ''; + nix.extraOptions = ''experimental-features = nix-command flakes ''; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + networking = { + hostName = "Legion"; # Define your hostname. + nameservers = ["192.168.1.230" "127.0.0.1" "9.9.9.9"]; + firewall = {enable = true;}; + }; + system.autoUpgrade = { + enable = true; + flake = "https://git.xenia.me.uk/xenia/nixos?ref=flake-conversion"; + dates = "02:00"; + allowReboot = true; + rebootWindow = { + lower = "03: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 = import ./home.nix; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It's perfectly fine and recommended to leave @@ -23,6 +44,4 @@ # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "23.05"; # Did you read the comment? - } - diff --git a/machines/Legion/xenia.nix b/hosts/Legion/home.nix similarity index 100% rename from machines/Legion/xenia.nix rename to hosts/Legion/home.nix diff --git a/machines/Monarch/tux.nix b/hosts/Monarch/home.nix similarity index 100% rename from machines/Monarch/tux.nix rename to hosts/Monarch/home.nix diff --git a/machines/Northstar/xenia.nix b/hosts/Northstar/home.nix similarity index 100% rename from machines/Northstar/xenia.nix rename to hosts/Northstar/home.nix diff --git a/machines/J0162/default.nix b/machines/J0162/default.nix deleted file mode 100644 index d30551d2..00000000 --- a/machines/J0162/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{pkgs, ...}: { - imports = [ - ../../common.nix - ../../hardware/audio.nix - ../../hardware/bluetooth.nix - ../../locales/en_GB.nix - ../../desktop/hyprland.nix - ../../services/syncthing/J0162.nix - ]; - - networking.hostName = "J0162"; # Define your hostname. - system.autoUpgrade = { - enable = false; - allowReboot = false; - }; - environment.etc."ppp/options".text = '' - ipcp-accept-remote - ''; - users.users.elitherl = { - isNormalUser = true; - description = "Evie Litherland-Smith"; - extraGroups = ["networkmanager" "wheel"]; - shell = pkgs.fish; - }; - home-manager.users.elitherl = import ./elitherl.nix; - - # services.greetd = { - # enable = true; - # settings = rec { - # initial_session = { - # command = "${pkgs.hyprland}/bin/Hyprland"; - # user = "elitherl"; - # }; - # default_session = initial_session; - # }; - # }; -} diff --git a/machines/J0162/elitherl.nix b/machines/J0162/elitherl.nix deleted file mode 100644 index baaf32c6..00000000 --- a/machines/J0162/elitherl.nix +++ /dev/null @@ -1,60 +0,0 @@ -{pkgs, ...}: { - imports = [ - ../../home/work.nix - ../../home/gui - ../../home/desktop/hyprland.nix - ]; - 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.00 - monitor=DP-2,preferred,auto,auto - monitor=DP-3,preferred,auto,auto,transform,1 - windowrule = float, title:^([Zz]oom).*$ - windowrule = center, title:^([Zz]oom).*$ - # windowrule = workspace 4 silent, ^(Microsoft Teams - Preview)$ - windowrule = workspace 3, title:^([Zz]oom).*$ - windowrule = workspace 4 silent, ^(Nxplayer.bin)$ - ''; - programs.waybar.settings = { - main = { - "output" = "!DP-3"; - "modules-left" = [ - "wlr/workspaces" - "cpu" - "memory" - "temperature" - ]; - "modules-center" = ["clock"]; - "modules-right" = [ - "pulseaudio" - "bluetooth" - "network#compact" - "backlight" - "battery" - "tray" - ]; - }; - alt = { - "include" = [ - "~/.config/waybar/modules.json" - "~/.config/waybar/layout.json" - ]; - "output" = "DP-3"; - "modules-left" = []; - "modules-center" = ["wlr/workspaces"]; - "modules-right" = []; - }; - }; -} diff --git a/machines/Legion/default.nix b/machines/Legion/default.nix deleted file mode 100644 index 0d2f51f2..00000000 --- a/machines/Legion/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{pkgs, ...}: { - imports = [ - ../../common.nix - ../../locales/en_GB.nix - ../../services/Legion.nix - ]; - networking = { - hostName = "Legion"; # Define your hostname. - nameservers = ["192.168.1.230" "127.0.0.1" "9.9.9.9"]; - firewall = {enable = true;}; - }; - system.autoUpgrade = { - enable = true; - dates = "02:00"; - allowReboot = true; - rebootWindow = { - lower = "03: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 = import ./xenia.nix; -} diff --git a/machines/N0245/default.nix b/machines/N0245/default.nix deleted file mode 100644 index 8518abf1..00000000 --- a/machines/N0245/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{pkgs, ...}: { - imports = [ - ../../common.nix - ../../hardware/audio.nix - ../../hardware/bluetooth.nix - ../../locales/en_GB.nix - ../../wm/sway.nix - ../../services/syncthing/N0245.nix - ]; - - networking.hostName = "N0245"; # Define your hostname. - system.autoUpgrade = { - enable = false; - allowReboot = false; - }; - environment.etc."ppp/options".text = '' - ipcp-accept-remote - ''; - users.users.elitherl = { - isNormalUser = true; - description = "Evie Litherland-Smith"; - extraGroups = ["networkmanager" "wheel"]; - shell = pkgs.fish; - }; - home-manager.users.elitherl = import ./elitherl.nix; - - services.greetd = { - enable = true; - settings = rec { - initial_session = { - command = "sway"; - user = "elitherl"; - }; - default_session = initial_session; - }; - }; -}