This commit is contained in:
Daan Vanoverloop 2023-07-01 11:21:43 +02:00
parent bf6789c6f9
commit ecdeba0805
7 changed files with 77 additions and 62 deletions

9
nixos/flake.nix Normal file
View File

@ -0,0 +1,9 @@
{
outputs = { self, nixpkgs }: {
nixosConfigurations.danacus-yoga = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ ./systems/yoga/configuration.nix ];
};
};
}

View File

@ -1,30 +1,19 @@
# 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, pkgs, ... }:
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz";
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
[
(import "${home-manager}/nixos")
];
fileSystems."/".options = [ "compress=zstd" ];
fileSystems."/home".options = [ "compress=zstd" ];
fileSystems."/nix".options = [ "compress=zstd" "noatime" ];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
networking.hostName = "danacus-yoga"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
@ -88,59 +77,10 @@ in
isNormalUser = true;
description = "Daan Vanoverloop";
extraGroups = [ "networkmanager" "wheel" ];
# shell = pkgs.zsh;
};
home-manager.users.daan = { pkgs, ... }: {
home.username = "daan";
home.homeDirectory = "/home/daan";
home.stateVersion = "23.05";
imports = [ ./dconf.nix ./gnome.nix ];
home.sessionVariables = { GTK_THEME = "Adwaita:dark"; };
programs.home-manager.enable = true;
programs.helix = {
enable = true;
settings = {
theme = "onedark";
editor = {
line-number = "relative";
cursor-shape.insert = "bar";
soft-wrap.enable = true;
};
};
};
programs.zsh = {
enable = true;
shellAliases = {
reload = "source ~/.zshrc";
l = "ls -l";
};
sessionVariables = {
EDITOR = "hx";
TERM = "xterm-256color";
COLORTERM = "truecolor";
NIX_BUILD_SHELL = "zsh";
};
oh-my-zsh = {
enable = true;
custom = "$HOME/.config/oh-my-zsh";
plugins = [
"git" "tig" "gitfast" "colorize" "command-not-found" "cp" "dirhistory" "sudo" "zsh-autosuggestions" "zsh-syntax-highlighting" "nix-shell"
];
theme = "avit";
};
};
home.packages = with pkgs; [
nil
jellyfin-media-player
];
imports = [ "./home" ];
};
# Allow unfree packages

View File

@ -0,0 +1,47 @@
{ pkgs, ... }:
{
home.username = "daan";
home.homeDirectory = "/home/daan";
home.stateVersion = "23.05";
imports = [ ./dconf.nix ./gnome.nix ];
home.sessionVariables = { GTK_THEME = "Adwaita:dark"; };
programs.home-manager.enable = true;
programs.helix = {
enable = true;
settings = {
theme = "onedark";
editor = {
line-number = "relative";
cursor-shape.insert = "bar";
soft-wrap.enable = true;
};
};
};
programs.zsh = {
enable = true;
shellAliases = {
reload = "source ~/.zshrc";
l = "ls -l";
};
sessionVariables = {
EDITOR = "hx";
TERM = "xterm-256color";
COLORTERM = "truecolor";
NIX_BUILD_SHELL = "zsh";
};
oh-my-zsh = {
enable = true;
custom = "$HOME/.config/oh-my-zsh";
plugins = [
"git" "tig" "gitfast" "colorize" "command-not-found" "cp" "dirhistory" "sudo" "zsh-autosuggestions" "zsh-syntax-highlighting" "nix-shell"
];
theme = "avit";
};
};
}

View File

@ -0,0 +1,19 @@
# 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, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../../modules/common.nix
];
fileSystems."/".options = [ "compress=zstd" ];
fileSystems."/home".options = [ "compress=zstd" ];
fileSystems."/nix".options = [ "compress=zstd" "noatime" ];
networking.hostName = "danacus-yoga"; # Define your hostname.
}