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,
pkgs,
...
}: {
}:
{
imports = [
# ../shared/vial.nix
];
@ -18,8 +19,10 @@
};
};
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
nix.nixPath = ["/etc/nix/path"];
nix.registry = (lib.mapAttrs (_: flake: { inherit flake; })) (
(lib.filterAttrs (_: lib.isType "flake")) inputs
);
nix.nixPath = [ "/etc/nix/path" ];
users.defaultUserShell = pkgs.bash;
documentation.man.generateCaches = false;
programs.fish.enable = true;
@ -32,13 +35,10 @@
fi
'';
};
environment.etc =
lib.mapAttrs'
(name: value: {
environment.etc = lib.mapAttrs' (name: value: {
name = "nix/path/${name}";
value.source = value.flake;
})
config.nix.registry;
}) config.nix.registry;
nix.settings = {
experimental-features = "nix-command flakes";
@ -69,7 +69,7 @@
powerOnBoot = true;
settings = {
General = {
Disable="Headset";
Disable = "Headset";
};
};
};
@ -78,8 +78,8 @@
networking.networkmanager.enable = true;
networking.nameservers = [ "8.8.8.8" ];
# networking.resolvconf.enable = pkgs.lib.mkForce false;
# networking.dhcpcd.extraConfig = "nohook resolv.conf";
# networking.networkmanager.dns = "none";
# networking.dhcpcd.extraConfig = "nohook resolv.conf";
# networking.networkmanager.dns = "none";
environment.sessionVariables = {
EDITOR = "nvim";
@ -97,7 +97,6 @@
})
];
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "sv_SE.UTF-8";
@ -129,19 +128,21 @@
git
openssh
rofi
(wrapHelm kubernetes-helm {
plugins = with pkgs.kubernetes-helmPlugins; [
helm-secrets
helm-diff
helm-s3
helm-git
];
})
k3sup
nixfmt-rfc-style
nixd
vault
];
services = {
# udev = {
# extraRules = ''
# KERNEL=="ttyACM0", MODE:="666"
# '';
# packages = with pkgs; [
# vial
# via
# ];
# };
picom.enable = true;
openssh = {
enable = true;
@ -179,4 +180,3 @@
system.stateVersion = "23.11";
}

View file

@ -7,7 +7,8 @@
pkgs,
myhostname,
...
}: {
}:
{
imports = [
../shared/dwm.nix
../shared/vscode.nix
@ -30,14 +31,13 @@
];
nixpkgs = {
overlays = [];
overlays = [ ];
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
};
home.packages = with pkgs; [
# System
xsel
@ -86,8 +86,6 @@
yarn
plantuml
go
# dotnetCorePackages.sdk_8_0_3xx
dotnetCorePackages.sdk_9_0_1xx
templ
goa
azuredatastudio
@ -97,7 +95,7 @@
#Tools
qrencode
air
k9s
unstable.k9s
git
lazydocker
kubectl
@ -177,7 +175,13 @@
programs.man.generateCaches = false;
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.homeDirectory = "/home/fw";

View file

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

22
flake.lock generated
View file

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

View file

@ -12,14 +12,16 @@
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
outputs =
{
self,
nixpkgs,
home-manager,
nixpkgs-unstable,
fw-pkgs,
...
} @ inputs: let
}@inputs:
let
inherit (self) outputs;
system = "x86_64-linux";
overlay-unstable = final: prev: {
@ -34,7 +36,8 @@
config.allowUnfree = false;
};
};
in {
in
{
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
@ -44,7 +47,12 @@
myhostname = "laptop";
};
modules = [
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
./maskiner/laptop/configuration.nix
];
};
@ -54,7 +62,12 @@
myhostname = "desktop";
};
modules = [
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
./maskiner/desktop/configuration.nix
];
};
@ -63,21 +76,21 @@
inherit inputs outputs;
myhostname = "jobb";
};
modules = [./maskiner/jobb/configuration.nix];
modules = [ ./maskiner/jobb/configuration.nix ];
};
work-desktop = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
myhostname = "work-desktop";
};
modules = [./maskiner/work-desktop/configuration.nix];
modules = [ ./maskiner/work-desktop/configuration.nix ];
};
lillen = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
myhostname = "lillen";
};
modules = [./maskiner/lillen/configuration.nix];
modules = [ ./maskiner/lillen/configuration.nix ];
};
};
@ -92,8 +105,18 @@
};
modules = [
./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 {
@ -105,8 +128,18 @@
# > Our main home-manager configuration file <
modules = [
./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 {
@ -118,8 +151,18 @@
# > Our main home-manager configuration file <
modules = [
./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 {
@ -131,8 +174,18 @@
# > Our main home-manager configuration file <
modules = [
./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 {
@ -144,8 +197,18 @@
# > Our main home-manager configuration file <
modules = [
./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,12 +1,14 @@
{ config
, pkgs
, ...
}: {
{
config,
pkgs,
...
}:
{
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
users = {
defaultUserShell = pkgs.bash;
groups = {
ios = {};
ios = { };
};
users = {
fw = {

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,
myhostname,
...
}: {
}:
{
# You can import other NixOS modules here
imports = [
./hardware-configuration.nix
@ -21,24 +22,12 @@
dotnet-sdk_8
];
# boot.loader = {
# efi = {
# canTouchEfiVariables = true;
# };
# grub = {
# enable = true;
# efiSupport = true;
# useOSProber = true;
# };
# };
services.xserver.dpi = 140;
services = {
openssh = {
enable = true;
ports = [55504];
ports = [ 55504 ];
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;

View file

@ -7,7 +7,8 @@
pkgs,
myhostname,
...
}: {
}:
{
# You can import other NixOS modules here
imports = [
./hardware-configuration.nix
@ -19,10 +20,18 @@
environment.systemPackages = with pkgs; [
kubectl
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;

View file

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

View file

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

View file

@ -38,20 +38,22 @@
}
];
shellAbbrs = {
homec="nvim ~/nix/config/home.nix";
n="eza -l --no-time --no-permissions --no-user";
ls="eza -l --no-time --no-permissions --no-user";
dev="nix develop --command fish";
spot="steam-run ~/program/spotify_player";
sc="sc-im";
e="nvim";
c="ssh";
home="home-manager switch --flake $HM_DIR";
reb="sudo nixos-rebuild switch --flake $SYSTEM_DIR";
cam="jira issue create && jira issue assign && jira issue move";
latest="git log | head -1 | awk '{print $2;}' | xsel -ib";
vpnup="nmcli con up 'iFacts VPN'";
vpndown="nmcli con down 'iFacts VPN'";
homec = "nvim ~/nix/config/home.nix";
n = "eza -l --no-time --no-permissions --no-user";
ls = "eza -l --no-time --no-permissions --no-user";
dev = "nix develop --command fish";
k = "kubectl";
ka = "kubectl apply -f";
spot = "steam-run ~/program/spotify_player";
sc = "sc-im";
e = "nvim";
c = "ssh";
home = "home-manager switch --flake $HM_DIR";
reb = "sudo nixos-rebuild switch --flake $SYSTEM_DIR";
cam = "jira issue create && jira issue assign && jira issue move";
latest = "git log | head -1 | awk '{print $2;}' | xsel -ib";
vpnup = "nmcli con up 'iFacts VPN'";
vpndown = "nmcli con down 'iFacts VPN'";
};
interactiveShellInit = ''
fish_vi_key_bindings

View file

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

View file

@ -1,4 +1,4 @@
{ config, pkgs, ...}:
{ config, pkgs, ... }:
{
# Enable the OpenSSH daemon.
services.openssh = {

View file

@ -62,6 +62,18 @@
user = "fw";
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" = {
hostname = "192.168.0.184";
port = 22;

View file

@ -29,7 +29,14 @@
extraConfig = ''
set -g 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'
'';
};
}