started reformatting and added formatter

This commit is contained in:
Jakub Kropáček 2024-09-19 17:44:40 +02:00
parent 77e9e90c6d
commit c6e3daefbf
10 changed files with 243 additions and 164 deletions

View file

@ -13,7 +13,9 @@
};
};
outputs = inputs@{ self, nixpkgs, ... }: {
outputs =
inputs@{ self, nixpkgs, ... }:
{
# Please replace my-nixos with your hostname
nixosConfigurations = {
work-ntb = nixpkgs.lib.nixosSystem {
@ -32,5 +34,6 @@
inherit inputs;
};
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
};
}

View file

@ -2,11 +2,16 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, hostname, ... }:
{
config,
pkgs,
hostname,
...
}:
{
imports =
[ # Include the results of the hardware scan.
imports = [
# Include the results of the hardware scan.
../${hostname}/hardware-configuration.nix
];
@ -95,17 +100,21 @@
users.users.krop = {
isNormalUser = true;
description = "Jakub Kropacek";
extraGroups = [ "networkmanager" "wheel" ];
extraGroups = [
"networkmanager"
"wheel"
];
shell = pkgs.zsh;
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# List packages installed in system profile. To search, run:
# $ nix search wget
@ -126,7 +135,6 @@
gnomeExtensions.grand-theft-focus
];
programs = {
tmux.enable = true;
zsh.enable = true;
@ -141,8 +149,14 @@
services.flatpak = {
enable = true;
remotes = [
{ name = "flathub"; location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; }
{ name = "flathub-beta"; location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo"; }
{
name = "flathub";
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
}
{
name = "flathub-beta";
location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo";
}
];
packages = [
"org.gnome.World.PikaBackup"

View file

@ -1,6 +1,15 @@
{config, pkgs, inputs, ...}: {
{
config,
pkgs,
inputs,
...
}:
{
imports = [
(import ../base {inherit config pkgs; hostname = "work-ntb"; })
(import ../base {
inherit config pkgs;
hostname = "work-ntb";
})
];
# My own modules configuration
@ -13,7 +22,9 @@
};
home-manager = {
extraSpecialArgs = { inherit inputs; };
extraSpecialArgs = {
inherit inputs;
};
users = {
"krop" = import ./home.nix;
};

View file

@ -1,27 +1,42 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/360cfb7a-07d9-445b-83e2-6ef19bd55948";
fileSystems."/" = {
device = "/dev/disk/by-uuid/360cfb7a-07d9-445b-83e2-6ef19bd55948";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/5F8E-3C09";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5F8E-3C09";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ];

View file

@ -100,17 +100,20 @@
style.name = "adwaita-dark";
};
programs.git = {
enable = true;
userName = "Jakub Kropáček";
userEmail = "kropikuba@gmail.com";
includes = let workcfg = {
includes =
let
workcfg = {
user = {
email = "jakub.kropacek@olc.cz";
name = "Jakub Kropáček";
};
}; in [
};
in
[
{
condition = "gitdir:~/Repositories/OLC/**";
contents = workcfg;

View file

@ -1,4 +1,4 @@
{...}:
{ ... }:
{
imports = [
./dev

View file

@ -1,7 +1,13 @@
{ config, pkgs, lib, ... }@inputs:
{
config,
pkgs,
lib,
...
}@inputs:
let
cfg = config.krop.devtools;
in {
in
{
imports = [
./python.nix
./ide.nix
@ -15,7 +21,8 @@ in {
};
};
config = let
config =
let
tools = with pkgs; [
lazygit
lazydocker
@ -23,7 +30,8 @@ in {
albert
openssl_3_3
];
in {
in
{
environment.systemPackages = tools;
};
}

View file

@ -0,0 +1,4 @@
{
...
}:
{ }

View file

@ -1,23 +1,32 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
cfg = config.krop.ide;
in {
in
{
options.krop.ide = {
enable = lib.mkOption {
type = lib.types.bool;
default = lib.mkOptionDefault true;
default = true;
example = true;
};
install-pycharm = lib.mkOption {
type = lib.types.bool;
default = lib.mkOptionDefault false;
default = false;
example = true;
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
environment.systemPackages =
with pkgs;
[
zed-editor
vscodium
] ++ lib.optionals cfg.install-pycharm [pkgs.jetbrains.pycharm-professional];
]
++ lib.optionals cfg.install-pycharm [ pkgs.jetbrains.pycharm-professional ];
};
}

View file

@ -1,24 +1,36 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
cfg = config.krop.python;
in {
in
{
options.krop.python = {
enable = lib.mkOption {
type = lib.types.bool;
default = lib.mkOptionDefault false;
default = false;
example = true;
};
install-older = lib.mkOption {
type = lib.types.bool;
default = lib.mkOptionDefault true;
default = true;
example = true;
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
environment.systemPackages =
with pkgs;
[
python3
poetry
] ++ lib.optionals cfg.install-older [python311 python310];
]
++ lib.optionals cfg.install-older [
python311
python310
];
};
}