added lenar
This commit is contained in:
parent
87a39426a4
commit
61335826af
4 changed files with 245 additions and 0 deletions
13
flake.nix
13
flake.nix
|
@ -11,6 +11,8 @@
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
disko.url = "github:nix-community/disko";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
|
@ -28,6 +30,17 @@
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
lenar = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./hosts/lenar
|
||||||
|
./hosts/base
|
||||||
|
inputs.disko.nixosModules.disko
|
||||||
|
];
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
|
||||||
};
|
};
|
||||||
|
|
32
hosts/lenar/default.nix
Normal file
32
hosts/lenar/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.hostName = "lenar"; # Define your hostname.
|
||||||
|
|
||||||
|
# My own modules configuration
|
||||||
|
krop = {
|
||||||
|
ide = {
|
||||||
|
enable = true;
|
||||||
|
install-pycharm = true;
|
||||||
|
};
|
||||||
|
python.install-older = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
|
users = {
|
||||||
|
"krop" = import ./home.nix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
53
hosts/lenar/disko.nix
Normal file
53
hosts/lenar/disko.nix
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
main = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/nvme0n1";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
ESP = {
|
||||||
|
priority = 1;
|
||||||
|
name = "ESP";
|
||||||
|
start = "1M";
|
||||||
|
end = "128M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f" ]; # Override existing partition
|
||||||
|
# Subvolumes must set a mountpoint in order to be mounted,
|
||||||
|
# unless their parent is mounted
|
||||||
|
subvolumes = {
|
||||||
|
# Subvolume name is different from mountpoint
|
||||||
|
"/rootfs" = {
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
# Subvolume name is the same as the mountpoint
|
||||||
|
"/home" = {
|
||||||
|
mountOptions = [ "compress=zstd" ];
|
||||||
|
mountpoint = "/home";
|
||||||
|
};
|
||||||
|
# Parent is not mounted so the mountpoint must be set
|
||||||
|
"/nix" = {
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||||||
|
mountpoint = "/nix";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mountpoint = "/partition-root";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
147
hosts/lenar/home.nix
Normal file
147
hosts/lenar/home.nix
Normal file
|
@ -0,0 +1,147 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.username = "krop";
|
||||||
|
home.homeDirectory = "/home/krop";
|
||||||
|
|
||||||
|
# This value determines the Home Manager release that your configuration is
|
||||||
|
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||||
|
# introduces backwards incompatible changes.
|
||||||
|
#
|
||||||
|
# You should not change this value, even if you update Home Manager. If you do
|
||||||
|
# want to update the value, then make sure to first check the Home Manager
|
||||||
|
# release notes.
|
||||||
|
home.stateVersion = "24.05"; # Please read the comment before changing.
|
||||||
|
|
||||||
|
# The home.packages option allows you to install Nix packages into your
|
||||||
|
# environment.
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gnomeExtensions.grand-theft-focus
|
||||||
|
# # Adds the 'hello' command to your environment. It prints a friendly
|
||||||
|
# # "Hello, world!" when run.
|
||||||
|
# hello
|
||||||
|
|
||||||
|
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||||
|
# # overrides. You can do that directly here, just don't forget the
|
||||||
|
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||||
|
# # fonts?
|
||||||
|
# (nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||||
|
|
||||||
|
# # You can also create simple shell scripts directly inside your
|
||||||
|
# # configuration. For example, this adds a command 'my-hello' to your
|
||||||
|
# # environment:
|
||||||
|
# (writeShellScriptBin "my-hello" ''
|
||||||
|
# echo "Hello, ${config.home.username}!"
|
||||||
|
# '')
|
||||||
|
];
|
||||||
|
|
||||||
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
|
# plain files is through 'home.file'.
|
||||||
|
home.file = {
|
||||||
|
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||||
|
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||||
|
# # symlink to the Nix store copy.
|
||||||
|
# ".screenrc".source = dotfiles/screenrc;
|
||||||
|
|
||||||
|
# # You can also set the file content immediately.
|
||||||
|
# ".gradle/gradle.properties".text = ''
|
||||||
|
# org.gradle.console=verbose
|
||||||
|
# org.gradle.daemon.idletimeout=3600000
|
||||||
|
# '';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Home Manager can also manage your environment variables through
|
||||||
|
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
||||||
|
# shell provided by Home Manager. If you don't want to manage your shell
|
||||||
|
# through Home Manager then you have to manually source 'hm-session-vars.sh'
|
||||||
|
# located at either
|
||||||
|
#
|
||||||
|
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# /etc/profiles/per-user/krop/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
home.sessionVariables = {
|
||||||
|
# EDITOR = "emacs";
|
||||||
|
};
|
||||||
|
|
||||||
|
dconf = {
|
||||||
|
enable = true;
|
||||||
|
settings."org/gnome/shell" = {
|
||||||
|
disable-user-extensions = false;
|
||||||
|
enabled-extensions = with pkgs.gnomeExtensions; [
|
||||||
|
grand-theft-focus.extensionUuid
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
Settings = ''
|
||||||
|
gtk-application-prefer-dark-theme=1
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
gtk4.extraConfig = {
|
||||||
|
Settings = ''
|
||||||
|
gtk-application-prefer-dark-theme=1
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "adwaita"; # TODO: fix themes
|
||||||
|
style.name = "adwaita-dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "Jakub Kropáček";
|
||||||
|
userEmail = "kropikuba@gmail.com";
|
||||||
|
includes =
|
||||||
|
let
|
||||||
|
workcfg = {
|
||||||
|
user = {
|
||||||
|
email = "jakub.kropacek@olc.cz";
|
||||||
|
name = "Jakub Kropáček";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
[
|
||||||
|
{
|
||||||
|
condition = "gitdir:~/Repositories/OLC/**";
|
||||||
|
contents = workcfg;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
condition = "gitdir:~/Repositories/OLC-Hexpol/**";
|
||||||
|
contents = workcfg;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
extraConfig = {
|
||||||
|
init = {
|
||||||
|
defaultBranch = "master";
|
||||||
|
};
|
||||||
|
push = {
|
||||||
|
autoSetupRemote = true;
|
||||||
|
};
|
||||||
|
status = {
|
||||||
|
submoduleSummary = true;
|
||||||
|
};
|
||||||
|
diff = {
|
||||||
|
submodule = "log";
|
||||||
|
};
|
||||||
|
core = {
|
||||||
|
autocrlf = "input";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
Loading…
Reference in a new issue