This commit is contained in:
fwastring 2025-04-07 14:19:10 +02:00
parent 7cf0bb0c1c
commit 10fd762b95
17 changed files with 753 additions and 562 deletions

View file

@ -6,7 +6,8 @@
config, config,
pkgs, pkgs,
... ...
}: { }:
{
imports = [ imports = [
# ../shared/vial.nix # ../shared/vial.nix
]; ];
@ -18,7 +19,9 @@
}; };
}; };
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs); nix.registry = (lib.mapAttrs (_: flake: { inherit flake; })) (
(lib.filterAttrs (_: lib.isType "flake")) inputs
);
nix.nixPath = [ "/etc/nix/path" ]; nix.nixPath = [ "/etc/nix/path" ];
users.defaultUserShell = pkgs.bash; users.defaultUserShell = pkgs.bash;
documentation.man.generateCaches = false; documentation.man.generateCaches = false;
@ -32,13 +35,10 @@
fi fi
''; '';
}; };
environment.etc = environment.etc = lib.mapAttrs' (name: value: {
lib.mapAttrs'
(name: value: {
name = "nix/path/${name}"; name = "nix/path/${name}";
value.source = value.flake; value.source = value.flake;
}) }) config.nix.registry;
config.nix.registry;
nix.settings = { nix.settings = {
experimental-features = "nix-command flakes"; experimental-features = "nix-command flakes";
@ -97,7 +97,6 @@
}) })
]; ];
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = { i18n.extraLocaleSettings = {
LC_ADDRESS = "sv_SE.UTF-8"; LC_ADDRESS = "sv_SE.UTF-8";
@ -129,19 +128,21 @@
git git
openssh openssh
rofi rofi
(wrapHelm kubernetes-helm {
plugins = with pkgs.kubernetes-helmPlugins; [
helm-secrets
helm-diff
helm-s3
helm-git
];
})
k3sup
nixfmt-rfc-style
nixd
vault
]; ];
services = { services = {
# udev = {
# extraRules = ''
# KERNEL=="ttyACM0", MODE:="666"
# '';
# packages = with pkgs; [
# vial
# via
# ];
# };
picom.enable = true; picom.enable = true;
openssh = { openssh = {
enable = true; enable = true;
@ -179,4 +180,3 @@
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

View file

@ -7,7 +7,8 @@
pkgs, pkgs,
myhostname, myhostname,
... ...
}: { }:
{
imports = [ imports = [
../shared/dwm.nix ../shared/dwm.nix
../shared/vscode.nix ../shared/vscode.nix
@ -37,7 +38,6 @@
}; };
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
# System # System
xsel xsel
@ -86,8 +86,6 @@
yarn yarn
plantuml plantuml
go go
# dotnetCorePackages.sdk_8_0_3xx
dotnetCorePackages.sdk_9_0_1xx
templ templ
goa goa
azuredatastudio azuredatastudio
@ -97,7 +95,7 @@
#Tools #Tools
qrencode qrencode
air air
k9s unstable.k9s
git git
lazydocker lazydocker
kubectl kubectl
@ -177,7 +175,13 @@
programs.man.generateCaches = false; programs.man.generateCaches = false;
xsession.enable = true; xsession.enable = true;
xsession.windowManager.command = if myhostname == "laptop" then "/home/fw/nix/.xinitrc.laptop" else if myhostname == "jobb" then "/home/fw/nix/.xinitrc.jobb" else "/home/fw/nix/.xinitrc"; xsession.windowManager.command =
if myhostname == "laptop" then
"/home/fw/nix/.xinitrc.laptop"
else if myhostname == "jobb" then
"/home/fw/nix/.xinitrc.jobb"
else
"/home/fw/nix/.xinitrc";
home.username = "fw"; home.username = "fw";
home.homeDirectory = "/home/fw"; home.homeDirectory = "/home/fw";

View file

@ -1,7 +1,9 @@
{ config {
, pkgs config,
, ... pkgs,
}: { ...
}:
{
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed. # TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
users = { users = {
defaultUserShell = pkgs.bash; defaultUserShell = pkgs.bash;

22
flake.lock generated
View file

@ -23,43 +23,43 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726989464, "lastModified": 1736373539,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", "rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-24.05", "ref": "release-24.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1730327045, "lastModified": 1739055578,
"narHash": "sha256-xKel5kd1AbExymxoIfQ7pgcX6hjw9jCgbiBjiUfSVJ8=", "narHash": "sha256-2MhC2Bgd06uI1A0vkdNUyDYsMD0SLNGKtD8600mZ69A=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "080166c15633801df010977d9d7474b4a6c549d7", "rev": "a45fa362d887f4d4a7157d95c28ca9ce2899b70e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-24.05", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1730531603, "lastModified": 1739020877,
"narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=", "narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d", "rev": "a79cfe0ebd24952b580b1cf08cd906354996d547",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -12,14 +12,16 @@
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { outputs =
{
self, self,
nixpkgs, nixpkgs,
home-manager, home-manager,
nixpkgs-unstable, nixpkgs-unstable,
fw-pkgs, fw-pkgs,
... ...
} @ inputs: let }@inputs:
let
inherit (self) outputs; inherit (self) outputs;
system = "x86_64-linux"; system = "x86_64-linux";
overlay-unstable = final: prev: { overlay-unstable = final: prev: {
@ -34,7 +36,8 @@
config.allowUnfree = false; config.allowUnfree = false;
}; };
}; };
in { in
{
# NixOS configuration entrypoint # NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname' # Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = { nixosConfigurations = {
@ -44,7 +47,12 @@
myhostname = "laptop"; myhostname = "laptop";
}; };
modules = [ modules = [
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) (
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
./maskiner/laptop/configuration.nix ./maskiner/laptop/configuration.nix
]; ];
}; };
@ -54,7 +62,12 @@
myhostname = "desktop"; myhostname = "desktop";
}; };
modules = [ modules = [
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) (
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
./maskiner/desktop/configuration.nix ./maskiner/desktop/configuration.nix
]; ];
}; };
@ -92,8 +105,18 @@
}; };
modules = [ modules = [
./config/home.nix ./config/home.nix
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) (
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-fw-pkgs ]; }) { nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-fw-pkgs ];
}
)
]; ];
}; };
"fw@desktop" = home-manager.lib.homeManagerConfiguration { "fw@desktop" = home-manager.lib.homeManagerConfiguration {
@ -105,8 +128,18 @@
# > Our main home-manager configuration file < # > Our main home-manager configuration file <
modules = [ modules = [
./config/home.nix ./config/home.nix
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) (
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-fw-pkgs ]; }) { nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-fw-pkgs ];
}
)
]; ];
}; };
"fw@jobb" = home-manager.lib.homeManagerConfiguration { "fw@jobb" = home-manager.lib.homeManagerConfiguration {
@ -118,8 +151,18 @@
# > Our main home-manager configuration file < # > Our main home-manager configuration file <
modules = [ modules = [
./config/home.nix ./config/home.nix
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) (
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-fw-pkgs ]; }) { nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-fw-pkgs ];
}
)
]; ];
}; };
"fw@work-desktop" = home-manager.lib.homeManagerConfiguration { "fw@work-desktop" = home-manager.lib.homeManagerConfiguration {
@ -131,8 +174,18 @@
# > Our main home-manager configuration file < # > Our main home-manager configuration file <
modules = [ modules = [
./config/home.nix ./config/home.nix
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) (
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-fw-pkgs ]; }) { nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-fw-pkgs ];
}
)
]; ];
}; };
"fw@lillen" = home-manager.lib.homeManagerConfiguration { "fw@lillen" = home-manager.lib.homeManagerConfiguration {
@ -144,8 +197,18 @@
# > Our main home-manager configuration file < # > Our main home-manager configuration file <
modules = [ modules = [
./config/lill-home.nix ./config/lill-home.nix
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) (
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-fw-pkgs ]; }) { nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-fw-pkgs ];
}
)
]; ];
}; };
}; };

View file

@ -1,7 +1,9 @@
{ config {
, pkgs config,
, ... pkgs,
}: { ...
}:
{
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed. # TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
users = { users = {
defaultUserShell = pkgs.bash; defaultUserShell = pkgs.bash;

84
jobb/users.nix.bak Normal file
View file

@ -0,0 +1,84 @@
{ config
, pkgs
, ...
}: {
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
users = {
defaultUserShell = pkgs.bash;
users = {
ifacts = {
isNormalUser = true;
description = "iFacts";
extraGroups = [ "networkmanager" "wheel" "docker" ];
packages = with pkgs; [];
};
docker = {
isNormalUser = true;
description = "Docker User";
extraGroups = [ "docker" ];
packages = with pkgs; [];
};
kube = {
isNormalUser = true;
description = "Kubernetes User";
extraGroups = [];
packages = with pkgs; [];
};
bastian = {
isNormalUser = true;
description = "Bastian Lemström";
extraGroups = [ "networkmanager" "wheel" "docker" ];
packages = with pkgs; [];
};
emilian = {
isNormalUser = true;
description = "Emilian Ionascu";
extraGroups = [ "networkmanager" "wheel" "docker" ];
packages = with pkgs; [];
};
bob = {
isNormalUser = true;
description = "Bob Haq";
extraGroups = [ "networkmanager" "wheel" "docker" ];
packages = with pkgs; [];
};
george = {
isNormalUser = true;
description = "George Caraus";
extraGroups = [ "networkmanager" "wheel" "docker" ];
packages = with pkgs; [];
};
max = {
isNormalUser = true;
description = "Max Huldin";
extraGroups = [ "networkmanager" "wheel" "docker" ];
packages = with pkgs; [];
};
sebnor = {
isNormalUser = true;
description = "Sebastian Nordin";
extraGroups = [ "networkmanager" "wheel" "docker" ];
packages = with pkgs; [];
};
fw = {
isNormalUser = true;
shell = pkgs.fish;
description = "Fredrik Wastring";
extraGroups = [ "networkmanager" "wheel" "docker" ];
packages = with pkgs; [
neovim
fastfetch
cmake
fzf
];
};
};
};
}

View file

@ -7,7 +7,8 @@
pkgs, pkgs,
myhostname, myhostname,
... ...
}: { }:
{
# You can import other NixOS modules here # You can import other NixOS modules here
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
@ -21,18 +22,6 @@
dotnet-sdk_8 dotnet-sdk_8
]; ];
# boot.loader = {
# efi = {
# canTouchEfiVariables = true;
# };
# grub = {
# enable = true;
# efiSupport = true;
# useOSProber = true;
# };
# };
services.xserver.dpi = 140; services.xserver.dpi = 140;
services = { services = {

View file

@ -7,7 +7,8 @@
pkgs, pkgs,
myhostname, myhostname,
... ...
}: { }:
{
# You can import other NixOS modules here # You can import other NixOS modules here
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
@ -19,10 +20,18 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
kubectl kubectl
azure-cli azure-cli
dotnetCorePackages.sdk_8_0_3xx
k3s
cifs-utils
nfs-utils
]; ];
services.k3s.enable = false;
services.openiscsi = {
enable = true;
name = "iqn.2016-04.com.open-iscsi:work-desktop";
};
networking.hostName = myhostname; networking.hostName = myhostname;

View file

@ -16,4 +16,3 @@ in
{ {
home.packages = [ dmenu ]; home.packages = [ dmenu ];
} }

View file

@ -1,4 +1,9 @@
{ pkgs, lib, myhostname, ... }: {
pkgs,
lib,
myhostname,
...
}:
let let
dwm = pkgs.dwm.overrideAttrs (old: { dwm = pkgs.dwm.overrideAttrs (old: {
src = builtins.fetchGit { src = builtins.fetchGit {
@ -12,12 +17,16 @@ let
xorg.libXinerama xorg.libXinerama
]; ];
}); });
dwmblocks = if myhostname == "desktop" then pkgs.dwmblocks.overrideAttrs (old: { dwmblocks =
if myhostname == "desktop" then
pkgs.dwmblocks.overrideAttrs (old: {
src = builtins.fetchGit { src = builtins.fetchGit {
url = "https://github.com/FredzyW/dwmblocks.git"; url = "https://github.com/FredzyW/dwmblocks.git";
rev = "7c81c55390f2deec2a3804217abe80221ef6f46a"; rev = "7c81c55390f2deec2a3804217abe80221ef6f46a";
}; };
}) else pkgs.dwmblocks.overrideAttrs (old: { })
else
pkgs.dwmblocks.overrideAttrs (old: {
src = builtins.fetchGit { src = builtins.fetchGit {
url = "https://github.com/FredzyW/dwmblocks.git"; url = "https://github.com/FredzyW/dwmblocks.git";
rev = "ec1b1a61a80e0ba92842e5117736ff977bb6cfa5"; rev = "ec1b1a61a80e0ba92842e5117736ff977bb6cfa5";
@ -25,8 +34,8 @@ let
}); });
in in
{ {
home.packages = [ dwm dwmblocks ]; home.packages = [
dwm
dwmblocks
];
} }

View file

@ -42,6 +42,8 @@
n = "eza -l --no-time --no-permissions --no-user"; n = "eza -l --no-time --no-permissions --no-user";
ls = "eza -l --no-time --no-permissions --no-user"; ls = "eza -l --no-time --no-permissions --no-user";
dev = "nix develop --command fish"; dev = "nix develop --command fish";
k = "kubectl";
ka = "kubectl apply -f";
spot = "steam-run ~/program/spotify_player"; spot = "steam-run ~/program/spotify_player";
sc = "sc-im"; sc = "sc-im";
e = "nvim"; e = "nvim";

View file

@ -1,13 +1,22 @@
{ pkgs, lib, myhostname, ... }: {
pkgs,
lib,
myhostname,
...
}:
{ {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
font = if myhostname == "laptop" then { font =
if myhostname == "laptop" then
{
# name = "Iosevka Nerd Font Bold"; # name = "Iosevka Nerd Font Bold";
# name = "ComicShannsMono Nerd Font Bold"; # name = "ComicShannsMono Nerd Font Bold";
name = "Hack Nerd Font Mono Bold"; name = "Hack Nerd Font Mono Bold";
size = 15; size = 15;
} else { }
else
{
# name = "Iosevka Nerd Font Bold"; # name = "Iosevka Nerd Font Bold";
# name = "ComicShannsMono Nerd Font Bold"; # name = "ComicShannsMono Nerd Font Bold";
name = "Hack Nerd Font Mono Bold"; name = "Hack Nerd Font Mono Bold";

View file

@ -62,6 +62,18 @@
user = "fw"; user = "fw";
identityFile = "/home/fw/.ssh/fw-ssh-key"; identityFile = "/home/fw/.ssh/fw-ssh-key";
}; };
"kube02" = {
hostname = "192.168.0.159";
port = 22;
user = "fw";
identityFile = "/home/fw/.ssh/fw-ssh-key";
};
"kube03" = {
hostname = "192.168.0.182";
port = 22;
user = "fw";
identityFile = "/home/fw/.ssh/fw-ssh-key";
};
"runner01" = { "runner01" = {
hostname = "192.168.0.184"; hostname = "192.168.0.184";
port = 22; port = 22;

View file

@ -29,7 +29,14 @@
extraConfig = '' extraConfig = ''
set -g base-index 1 set -g base-index 1
setw -g pane-base-index 1 setw -g pane-base-index 1
set-option -ga terminal-overrides ",alacritty:Tc" set -g default-terminal "xterm-kitty"
set -g terminal-overrides "xterm-kitty"
# true colours support
# set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides ",xterm-256color:Tc"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
# underscore colours - needs tmux-3.0
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
''; '';
}; };
} }