refactor config; for other branches change flake.nix #1

Merged
vorboyvo merged 2 commits from randolph into main 2024-06-17 21:05:38 -04:00
4 changed files with 21 additions and 19 deletions

View file

@ -21,13 +21,15 @@
# nur.url = "github:nix-community/NUR"; # nur.url = "github:nix-community/NUR";
}; };
outputs = { self, nixpkgs, home-manager }: outputs = { self, nixpkgs, home-manager }:
let system = "x86_64-linux"; let
system = "x86_64-linux";
hostname = "randolph";
in { in {
nixosConfigurations = { nixosConfigurations = {
oyvoLaptop = nixpkgs.lib.nixosSystem { ${hostname} = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
./configuration.nix ./hosts/${hostname}/configuration.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
# nur.nixosModules.nur # nur.nixosModules.nur
]; ];

View file

@ -24,7 +24,7 @@
# Enable flakes. # Enable flakes.
nix = { settings.experimental-features = [ "nix-command" "flakes" ]; }; nix = { settings.experimental-features = [ "nix-command" "flakes" ]; };
networking.hostName = "oyvoLaptop"; # Define your hostname. networking.hostName = "randolph"; # Define your hostname.
networking.networkmanager.enable = networking.networkmanager.enable =
true; # Easiest to use and most distros use this by default. true; # Easiest to use and most distros use this by default.

View file

@ -1,14 +1,14 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
scripts = ./scripts; scripts = ../../scripts;
extra = ./extra; extra = ../../extra;
terminal = pkgs.alacritty; terminal = pkgs.alacritty;
in { in {
imports = [ imports = [
./programs/kdeconnect.nix ../../programs/kdeconnect.nix
./programs/ssh.nix ../../programs/ssh.nix
./programs/zsh.nix ../../programs/zsh.nix
]; ];
home.username = "alice"; home.username = "alice";
home.homeDirectory = "/home/alice"; home.homeDirectory = "/home/alice";
@ -54,10 +54,10 @@ in {
home.packages = with pkgs; home.packages = with pkgs;
let let
xdg-terminal-exec = xdg-terminal-exec =
callPackage ./pkgs/xdg-terminal-exec/xdg-terminal-exec.nix { }; callPackage ../../pkgs/xdg-terminal-exec/xdg-terminal-exec.nix { };
mons = callPackage ./pkgs/mons/mons.nix { }; mons = callPackage ../../pkgs/mons/mons.nix { };
archivo = callPackage ./pkgs/archivo/archivo.nix { }; archivo = callPackage ../../pkgs/archivo/archivo.nix { };
highway-gothic = callPackage ./pkgs/highway-gothic/highway-gothic.nix { }; highway-gothic = callPackage ../../pkgs/highway-gothic/highway-gothic.nix { };
in [ gcc tree-sitter ] ++ # Basic dev tools in [ gcc tree-sitter ] ++ # Basic dev tools
[ marksman nil ] ++ # Language servers except those installed through package sections [ marksman nil ] ++ # Language servers except those installed through package sections
[ texliveFull texlab ] ++ # LaTeX [ 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; inherit scripts extra config lib pkgs terminal;
}; };
programs.waybar = programs.waybar =
import ./programs/waybar.nix { inherit scripts config lib pkgs terminal; }; import ../../programs/waybar.nix { inherit scripts config lib pkgs terminal; };
programs.swaylock = { programs.swaylock = {
enable = true; enable = true;
@ -182,9 +182,9 @@ in {
# programs.neovim = import ./programs/neovim.nix; # 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 = xdg.configFile."kak-lsp/kak-lsp.toml".source =
./programs/kakoune/kak-lsp.toml; ../../programs/kakoune/kak-lsp.toml;
xdg.desktopEntries.kakoune = { xdg.desktopEntries.kakoune = {
name = "Kakoune"; name = "Kakoune";
genericName = "Text Editor"; 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;
} }