refactor(flake): re-organise systems and modules
This commit is contained in:
parent
af70a9b56f
commit
eac470013b
6 changed files with 51 additions and 45 deletions
|
@ -1,7 +1,3 @@
|
|||
# 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’).
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
@ -22,11 +18,6 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
|
@ -42,7 +33,7 @@ in
|
|||
DefaultTimeoutStopSec=10s
|
||||
'';
|
||||
|
||||
networking.hostName = "nixedo"; # Define your hostname.
|
||||
# networking.hostName = "nixedo"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
21
system/nixos/default.nix
Normal file
21
system/nixos/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ inputs, username }:
|
||||
|
||||
let
|
||||
configuration = import ./configuration.nix;
|
||||
hardware-configuration = import ./hardware-configuration.nix;
|
||||
in
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
inputs.home-manager.nixosModules.home-manager {
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users."${username}" = import ./home-manager.nix;
|
||||
};
|
||||
}
|
||||
|
||||
configuration
|
||||
hardware-configuration
|
||||
];
|
||||
}
|
50
system/nixos/home-manager.nix
Normal file
50
system/nixos/home-manager.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../home-manager/modules/common.nix
|
||||
../../home-manager/modules/git.nix
|
||||
../../home-manager/modules/home-manager.nix
|
||||
../../home-manager/modules/tmux.nix
|
||||
../../home-manager/modules/zsh.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "22.05";
|
||||
|
||||
home.username = "opdavies";
|
||||
home.homeDirectory = "/home/opdavies";
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox-devedition;
|
||||
};
|
||||
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
window.opacity = 0.9;
|
||||
|
||||
window.padding = {
|
||||
x = 15;
|
||||
y = 15;
|
||||
};
|
||||
|
||||
font = {
|
||||
size = 12.0;
|
||||
|
||||
normal.family = "JetBrainsMono Nerd Font Mono";
|
||||
italic.style = "Regular";
|
||||
bolditalic.style = "Regular";
|
||||
bold.style = "Regular";
|
||||
|
||||
offset.y = 12;
|
||||
glyph_offset.y = 6;
|
||||
};
|
||||
|
||||
shell = { program = "zsh"; };
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [ discord meslo-lg slack teams vlc wofi xcape zoom-us ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue