diff --git a/flake.nix b/flake.nix index fd6c5ce..06a1bc0 100644 --- a/flake.nix +++ b/flake.nix @@ -21,13 +21,15 @@ # nur.url = "github:nix-community/NUR"; }; outputs = { self, nixpkgs, home-manager }: - let system = "x86_64-linux"; + let + system = "x86_64-linux"; + hostname = "randolph"; in { nixosConfigurations = { - oyvoLaptop = nixpkgs.lib.nixosSystem { + ${hostname} = nixpkgs.lib.nixosSystem { inherit system; modules = [ - ./configuration.nix + ./hosts/${hostname}/configuration.nix home-manager.nixosModules.home-manager # nur.nixosModules.nur ]; diff --git a/configuration.nix b/hosts/randolph/configuration.nix similarity index 99% rename from configuration.nix rename to hosts/randolph/configuration.nix index e3402da..9cefd60 100644 --- a/configuration.nix +++ b/hosts/randolph/configuration.nix @@ -24,7 +24,7 @@ # Enable flakes. nix = { settings.experimental-features = [ "nix-command" "flakes" ]; }; - networking.hostName = "oyvoLaptop"; # Define your hostname. + networking.hostName = "randolph"; # Define your hostname. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. diff --git a/hardware-configuration.nix b/hosts/randolph/hardware-configuration.nix similarity index 100% rename from hardware-configuration.nix rename to hosts/randolph/hardware-configuration.nix diff --git a/home.nix b/hosts/randolph/home.nix similarity index 86% rename from home.nix rename to hosts/randolph/home.nix index 8955606..c7dd3d6 100644 --- a/home.nix +++ b/hosts/randolph/home.nix @@ -1,14 +1,14 @@ { config, lib, pkgs, ... }: let - scripts = ./scripts; - extra = ./extra; + scripts = ../../scripts; + extra = ../../extra; terminal = pkgs.alacritty; in { imports = [ - ./programs/kdeconnect.nix - ./programs/ssh.nix - ./programs/zsh.nix + ../../programs/kdeconnect.nix + ../../programs/ssh.nix + ../../programs/zsh.nix ]; home.username = "alice"; home.homeDirectory = "/home/alice"; @@ -54,10 +54,10 @@ in { home.packages = with pkgs; let xdg-terminal-exec = - callPackage ./pkgs/xdg-terminal-exec/xdg-terminal-exec.nix { }; - mons = callPackage ./pkgs/mons/mons.nix { }; - archivo = callPackage ./pkgs/archivo/archivo.nix { }; - highway-gothic = callPackage ./pkgs/highway-gothic/highway-gothic.nix { }; + callPackage ../../pkgs/xdg-terminal-exec/xdg-terminal-exec.nix { }; + mons = callPackage ../../pkgs/mons/mons.nix { }; + archivo = callPackage ../../pkgs/archivo/archivo.nix { }; + highway-gothic = callPackage ../../pkgs/highway-gothic/highway-gothic.nix { }; in [ gcc tree-sitter ] ++ # Basic dev tools [ marksman nil ] ++ # Language servers except those installed through package sections [ texliveFull texlab ] ++ # LaTeX @@ -145,12 +145,12 @@ in { }; }; - wayland.windowManager.sway = import ./programs/sway.nix { + wayland.windowManager.sway = import ../../programs/sway.nix { inherit scripts extra config lib pkgs terminal; }; programs.waybar = - import ./programs/waybar.nix { inherit scripts config lib pkgs terminal; }; + import ../../programs/waybar.nix { inherit scripts config lib pkgs terminal; }; programs.swaylock = { enable = true; @@ -182,9 +182,9 @@ in { # programs.neovim = import ./programs/neovim.nix; - programs.kakoune = import ./programs/kakoune.nix pkgs; + programs.kakoune = import ../../programs/kakoune.nix pkgs; xdg.configFile."kak-lsp/kak-lsp.toml".source = - ./programs/kakoune/kak-lsp.toml; + ../../programs/kakoune/kak-lsp.toml; xdg.desktopEntries.kakoune = { name = "Kakoune"; genericName = "Text Editor"; @@ -239,7 +239,7 @@ in { ]; }; - programs.firefox = import ./programs/firefox.nix { inherit pkgs; }; + programs.firefox = import ../../programs/firefox.nix { inherit pkgs; }; - programs.thunderbird = import ./programs/thunderbird.nix; + programs.thunderbird = import ../../programs/thunderbird.nix; }