Compare commits

...

2 Commits

Author SHA1 Message Date
Daan Vanoverloop d7a08d5f19 Update 2023-07-01 11:33:15 +02:00
Daan Vanoverloop ecdeba0805 Refactor 2023-07-01 11:21:43 +02:00
8 changed files with 144 additions and 71 deletions

49
nixos/flake.lock Normal file
View File

@ -0,0 +1,49 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1687871164,
"narHash": "sha256-bBFlPthuYX322xOlpJvkjUBz0C+MOBjZdDOOJJ+G2jU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "07c347bb50994691d7b0095f45ebd8838cf6bc38",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1688109178,
"narHash": "sha256-BSdeYp331G4b1yc7GIRgAnfUyaktW2nl7k0C577Tttk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b72aa95f7f096382bff3aea5f8fde645bca07422",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

26
nixos/flake.nix Normal file
View File

@ -0,0 +1,26 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
home-manager.url = "github:nix-community/home-manager/release-23.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ self, nixpkgs, home-manager }:
let
homeconfig = {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.daan = import ./modules/home;
};
in
{
nixosConfigurations.danacus-yoga = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./systems/yoga/configuration.nix
home-manager.nixosModules.home-manager
homeconfig
];
};
};
}

View File

@ -1,30 +1,11 @@
# 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,60 +69,11 @@ 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
];
};
# home-manager.users.daan = { pkgs, ... }: {
# imports = [ "./home" ];
# };
# Allow unfree packages
nixpkgs.config.allowUnfree = true;

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.
}