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,10 +6,11 @@
config,
pkgs,
...
}: {
imports = [
# ../shared/vial.nix
];
}:
{
imports = [
# ../shared/vial.nix
];
nixpkgs = {
overlays = [
];
@ -18,27 +19,26 @@
};
};
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;
programs.bash = {
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
environment.etc =
lib.mapAttrs'
(name: value: {
name = "nix/path/${name}";
value.source = value.flake;
})
config.nix.registry;
programs.bash = {
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
environment.etc = lib.mapAttrs' (name: value: {
name = "nix/path/${name}";
value.source = value.flake;
}) config.nix.registry;
nix.settings = {
experimental-features = "nix-command flakes";
@ -47,42 +47,42 @@
virtualisation.docker = {
enable = true;
liveRestore = false;
liveRestore = false;
};
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services = {
tailscale = {
enable = true;
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services = {
tailscale = {
enable = true;
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
hardware = {
bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Disable="Headset";
};
};
settings = {
General = {
Disable = "Headset";
};
};
};
};
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";
EDITOR = "nvim";
TERM = "xterm-256color";
};
@ -91,13 +91,12 @@
fonts.packages = with pkgs; [
(nerdfonts.override {
fonts = [
"Hack"
"Hack"
"FiraCode"
];
})
];
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "sv_SE.UTF-8";
@ -112,55 +111,57 @@
};
boot.loader = {
efi = {
canTouchEfiVariables = false;
};
grub = {
efiSupport = true;
efiInstallAsRemovable = true;
device = "nodev";
};
};
efi = {
canTouchEfiVariables = false;
};
grub = {
efiSupport = true;
efiInstallAsRemovable = true;
device = "nodev";
};
};
console.keyMap = "sv-latin1";
environment.systemPackages = with pkgs; [
vim
neovim
git
openssh
rofi
];
environment.systemPackages = with pkgs; [
vim
neovim
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;
picom.enable = true;
openssh = {
enable = true;
};
strongswan = {
enable = true;
secrets = [
"ipsec.d/ipsec.nm-l2tp.secrets"
];
};
xserver = {
displayManager = {
startx.enable = true;
};
strongswan = {
enable = true;
xkb = {
layout = "se";
variant = "";
};
secrets = [
"ipsec.d/ipsec.nm-l2tp.secrets"
];
};
xserver = {
displayManager = {
startx.enable = true;
};
enable = true;
xkb = {
layout = "se";
variant = "";
};
windowManager = {
dwm = {
enable = true;
@ -170,7 +171,7 @@
locate = {
enable = true;
package = pkgs.mlocate;
localuser = null;
localuser = null;
};
blueman = {
enable = true;
@ -179,4 +180,3 @@
system.stateVersion = "23.11";
}

View file

@ -7,13 +7,14 @@
pkgs,
myhostname,
...
}: {
}:
{
imports = [
../shared/dwm.nix
../shared/vscode.nix
# ../shared/dmenu.nix
# ../shared/rofi.nix
# ../shared/mpv.nix
# ../shared/rofi.nix
# ../shared/mpv.nix
../shared/kitty.nix
../shared/alacritty.nix
../shared/tmux.nix
@ -30,145 +31,142 @@
];
nixpkgs = {
overlays = [];
overlays = [ ];
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
};
home.packages = with pkgs; [
# System
# System
xsel
unzip
zip
zip
wget
alsa-utils
upower
gcc
gnumake
cmake
arion
cmake
arion
htop
pavucontrol
procps
procps
openssh
networkmanager
fd
bat
bluez
bluez-tools
unstable.betterlockscreen
# tmux
fzf
eza
btop
thttpd
xcolor
openssl
dig
jq
wireguard-tools
acpi
light
fd
bat
bluez
bluez-tools
unstable.betterlockscreen
# tmux
fzf
eza
btop
thttpd
xcolor
openssl
dig
jq
wireguard-tools
acpi
light
# Dev
unstable.fluxcd
argocd
gh
unstable.deno
unstable.hugo
unstable.logstash
ngrok
tailwindcss
nodejs_23
yarn
plantuml
go
# dotnetCorePackages.sdk_8_0_3xx
dotnetCorePackages.sdk_9_0_1xx
templ
goa
azuredatastudio
mdbtools
prettierd
# Dev
unstable.fluxcd
argocd
gh
unstable.deno
unstable.hugo
unstable.logstash
ngrok
tailwindcss
nodejs_23
yarn
plantuml
go
templ
goa
azuredatastudio
mdbtools
prettierd
#Tools
qrencode
air
k9s
#Tools
qrencode
air
unstable.k9s
git
lazydocker
kubectl
lazydocker
kubectl
#LSP
# roslyn
roslyn-ls
dockerfile-language-server-nodejs
docker-compose-language-service
bash-language-server
python312Packages.python-lsp-server
yaml-language-server
lua-language-server
typescript
#LSP
# roslyn
roslyn-ls
dockerfile-language-server-nodejs
docker-compose-language-service
bash-language-server
python312Packages.python-lsp-server
yaml-language-server
lua-language-server
typescript
nil
jdt-language-server
texlab
marksman
tree-sitter
vue-language-server
typescript-language-server
gopls
rust-analyzer
jdt-language-server
texlab
marksman
tree-sitter
vue-language-server
typescript-language-server
gopls
rust-analyzer
# UI
# rofi-bluetooth
pastel
imagemagick
# UI
# rofi-bluetooth
pastel
imagemagick
#VPN
openvpn
networkmanagerapplet
networkmanager-l2tp
strongswan
networkmanager_strongswan
networkmanager_strongswan
# Display
# Display
scrot
xbanish
feh
brightnessctl
dunst
# Documents
ripgrep
grc
texliveFull
pandoc
poppler_utils
# Documents
ripgrep
grc
texliveFull
pandoc
poppler_utils
#Desktop
fluent-reader
unstable.feishin
libreoffice
unstable.signal-desktop
pinta
#Desktop
fluent-reader
unstable.feishin
libreoffice
unstable.signal-desktop
pinta
zathura
vial
vial
thunderbird
alacritty
alacritty
neovim
fastfetch
lazygit
byzanz
byzanz
remmina
obsidian
obsidian
# Utils
speedcrunch
# Utils
speedcrunch
#Unfree
#Unfree
discord
slack
];
@ -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,13 +1,15 @@
{ config
, pkgs
, ...
}: {
{
config,
pkgs,
...
}:
{
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
users = {
defaultUserShell = pkgs.bash;
groups = {
ios = {};
};
groups = {
ios = { };
};
users = {
fw = {
initialPassword = "password";
@ -18,24 +20,24 @@
"wheel"
"audio"
"docker"
"input"
"input"
];
openssh.authorizedKeys = {
keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDALsdpwvC0w/Aj+1fWtzJyyWoUrGkdh8o2thVHeQQBNo0D7cmVberYmi4Cv9gWGX6PaElrnOl0KRdGyro2wxOYokSxgk2VgWW67BFITAQAbKyG2NhXXPbhb4jccDo7WH7TtOG8IofuJTPRu1Duda6k4RN0I0CkyAN6LGX+zy49cq0qKf9ijXYhCDYNih3+Fu/ig0aW/SYmsVoUl2VFTWdI5x5/wLvIjTEZhmAtYIeYADaLnom356cFrUysZa++FUujQAz3Ow236BvP95XZdTsqvfWNZFNIpC9VYF72JeIDCs5wDIr0GFmanF2On1nar+jJpoOE8SdHt357p5g/PqXV5TisN2xQRkqVwO9tWtMl4sF84jA4ULnY2gQWv9jErMxymUQ1IwuPUzDDlbRHCtfexAtkBy7wv6xslKAzG1QahvF/btNs5Caj3LN31rgAuxyooCbKGKTeBP3kHPKcz1iupgidfbO/QqVXBRQJTEdGyAKa8hVmLQZZPC/XUhxESAk= fw@fw-nix"
];
};
openssh.authorizedKeys = {
keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDALsdpwvC0w/Aj+1fWtzJyyWoUrGkdh8o2thVHeQQBNo0D7cmVberYmi4Cv9gWGX6PaElrnOl0KRdGyro2wxOYokSxgk2VgWW67BFITAQAbKyG2NhXXPbhb4jccDo7WH7TtOG8IofuJTPRu1Duda6k4RN0I0CkyAN6LGX+zy49cq0qKf9ijXYhCDYNih3+Fu/ig0aW/SYmsVoUl2VFTWdI5x5/wLvIjTEZhmAtYIeYADaLnom356cFrUysZa++FUujQAz3Ow236BvP95XZdTsqvfWNZFNIpC9VYF72JeIDCs5wDIr0GFmanF2On1nar+jJpoOE8SdHt357p5g/PqXV5TisN2xQRkqVwO9tWtMl4sF84jA4ULnY2gQWv9jErMxymUQ1IwuPUzDDlbRHCtfexAtkBy7wv6xslKAzG1QahvF/btNs5Caj3LN31rgAuxyooCbKGKTeBP3kHPKcz1iupgidfbO/QqVXBRQJTEdGyAKa8hVmLQZZPC/XUhxESAk= fw@fw-nix"
];
};
};
ios = {
initialPassword = "password";
isNormalUser = true;
description = "iOS Integration";
group = "ios";
openssh.authorizedKeys = {
keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDIQ9GkzI12xKZyZMmBusLw3UkxdkKEmifxTxSP74YnOXM7SknBUxkpAm0OY3wwbeF8Qht8O/mUM8x1ILpjIUPg2OZh2OslqU+slcoWAoeR8DE6hEwUIrozzlqLkL3JKIE1g2Sx7Gay7QheTJH4e51sXn15Gb3h3ByTa1LyQCWBXP4BPRs4hbVbGu0U1Qe3qav+ubnEthmLbaE+jS6SZb0TkQqKFJIq3skCRI59AkWTCOywhB3CpwP05y/to4EKUDYttf8r8pyfvJ7WMTYHFPCL3uVnutAuIVScHchMwt52kRHD8sZR2/vOM8tOeWB3zIo2XYyCIKlZjm318unqlLv8ol3sfzsSHcEvXLzXxF66/NmpTfjtlnze6hE/GxvjxC4zM7oCf/7o0UNq8VrQto0qUScjqgv5uP7GOitx2dVMGjFfGmXngeBPEIbN+WrPFPUrzylZP5tivrnyzamm7SlGUMlvtKm/G5vurxjtrvpvLKDPvKLAtueTii2xViOXTxZBQw6/mvLyhIrc3+jepgUvTVyKb88Home0WPzedCWPqzkHWgo7wvh4ybZ/JDJv2Gh1vKtKPNUwUbwl2ljJ8DagHK3qxyrfVFo9b+NmR+S21RBzF8CVhP3+MVGRNtsGMxLm4GjvODpcJrCPj/5R6NAWE7sBCP63SvHaLnlaHefsHQ== ios"
];
};
openssh.authorizedKeys = {
keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDIQ9GkzI12xKZyZMmBusLw3UkxdkKEmifxTxSP74YnOXM7SknBUxkpAm0OY3wwbeF8Qht8O/mUM8x1ILpjIUPg2OZh2OslqU+slcoWAoeR8DE6hEwUIrozzlqLkL3JKIE1g2Sx7Gay7QheTJH4e51sXn15Gb3h3ByTa1LyQCWBXP4BPRs4hbVbGu0U1Qe3qav+ubnEthmLbaE+jS6SZb0TkQqKFJIq3skCRI59AkWTCOywhB3CpwP05y/to4EKUDYttf8r8pyfvJ7WMTYHFPCL3uVnutAuIVScHchMwt52kRHD8sZR2/vOM8tOeWB3zIo2XYyCIKlZjm318unqlLv8ol3sfzsSHcEvXLzXxF66/NmpTfjtlnze6hE/GxvjxC4zM7oCf/7o0UNq8VrQto0qUScjqgv5uP7GOitx2dVMGjFfGmXngeBPEIbN+WrPFPUrzylZP5tivrnyzamm7SlGUMlvtKm/G5vurxjtrvpvLKDPvKLAtueTii2xViOXTxZBQw6/mvLyhIrc3+jepgUvTVyKb88Home0WPzedCWPqzkHWgo7wvh4ybZ/JDJv2Gh1vKtKPNUwUbwl2ljJ8DagHK3qxyrfVFo9b+NmR+S21RBzF8CVhP3+MVGRNtsGMxLm4GjvODpcJrCPj/5R6NAWE7sBCP63SvHaLnlaHefsHQ== ios"
];
};
};
};
};

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": {

319
flake.nix
View file

@ -4,150 +4,213 @@
inputs = {
# Nixpkgs
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
fw-pkgs.url = "github:fwastring/fwpkgs/main";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
fw-pkgs.url = "github:fwastring/fwpkgs/main";
# Home manager
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
self,
nixpkgs,
home-manager,
nixpkgs-unstable,
fw-pkgs,
...
} @ inputs: let
inherit (self) outputs;
system = "x86_64-linux";
overlay-unstable = final: prev: {
outputs =
{
self,
nixpkgs,
home-manager,
nixpkgs-unstable,
fw-pkgs,
...
}@inputs:
let
inherit (self) outputs;
system = "x86_64-linux";
overlay-unstable = final: prev: {
unstable = import nixpkgs-unstable {
inherit system;
inherit system;
config.allowUnfree = true;
};
};
overlay-fw-pkgs = final: prev: {
overlay-fw-pkgs = final: prev: {
fw-pkgs = import fw-pkgs {
inherit system;
inherit system;
config.allowUnfree = false;
};
};
in {
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
myhostname = "laptop";
};
modules = [
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./maskiner/laptop/configuration.nix
];
in
{
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
myhostname = "laptop";
};
modules = [
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
./maskiner/laptop/configuration.nix
];
};
desktop = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
myhostname = "desktop";
};
modules = [
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
./maskiner/desktop/configuration.nix
];
};
jobb = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
myhostname = "jobb";
};
modules = [ ./maskiner/jobb/configuration.nix ];
};
work-desktop = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
myhostname = "work-desktop";
};
modules = [ ./maskiner/work-desktop/configuration.nix ];
};
lillen = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
myhostname = "lillen";
};
modules = [ ./maskiner/lillen/configuration.nix ];
};
};
desktop = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
myhostname = "desktop";
};
modules = [
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./maskiner/desktop/configuration.nix
];
};
jobb = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
myhostname = "jobb";
};
modules = [./maskiner/jobb/configuration.nix];
};
work-desktop = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
myhostname = "work-desktop";
};
modules = [./maskiner/work-desktop/configuration.nix];
};
lillen = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
myhostname = "lillen";
};
modules = [./maskiner/lillen/configuration.nix];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"fw@laptop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
myhostname = "laptop";
};
modules = [
./config/home.nix
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-fw-pkgs ]; })
];
};
"fw@desktop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
myhostname = "desktop";
};
# > Our main home-manager configuration file <
modules = [
./config/home.nix
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-fw-pkgs ]; })
];
};
"fw@jobb" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
myhostname = "jobb";
};
# > Our main home-manager configuration file <
modules = [
./config/home.nix
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-fw-pkgs ]; })
];
};
"fw@work-desktop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
myhostname = "work-desktop";
};
# > Our main home-manager configuration file <
modules = [
./config/home.nix
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-fw-pkgs ]; })
];
};
"fw@lillen" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
myhostname = "lillen";
};
# > Our main home-manager configuration file <
modules = [
./config/lill-home.nix
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-fw-pkgs ]; })
];
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"fw@laptop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
myhostname = "laptop";
};
modules = [
./config/home.nix
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-fw-pkgs ];
}
)
];
};
"fw@desktop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
myhostname = "desktop";
};
# > Our main home-manager configuration file <
modules = [
./config/home.nix
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-fw-pkgs ];
}
)
];
};
"fw@jobb" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
myhostname = "jobb";
};
# > Our main home-manager configuration file <
modules = [
./config/home.nix
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-fw-pkgs ];
}
)
];
};
"fw@work-desktop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
myhostname = "work-desktop";
};
# > Our main home-manager configuration file <
modules = [
./config/home.nix
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-fw-pkgs ];
}
)
];
};
"fw@lillen" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
myhostname = "lillen";
};
# > Our main home-manager configuration file <
modules = [
./config/lill-home.nix
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-unstable ];
}
)
(
{ nixpkgs, ... }:
{
nixpkgs.overlays = [ overlay-fw-pkgs ];
}
)
];
};
};
};
};
}

View file

@ -1,13 +1,15 @@
{ config
, pkgs
, ...
}: {
{
config,
pkgs,
...
}:
{
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
users = {
defaultUserShell = pkgs.bash;
groups = {
ios = {};
};
groups = {
ios = { };
};
users = {
fw = {
initialPassword = "password";
@ -18,13 +20,13 @@
"wheel"
"audio"
"docker"
"input"
"input"
];
openssh.authorizedKeys = {
keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDALsdpwvC0w/Aj+1fWtzJyyWoUrGkdh8o2thVHeQQBNo0D7cmVberYmi4Cv9gWGX6PaElrnOl0KRdGyro2wxOYokSxgk2VgWW67BFITAQAbKyG2NhXXPbhb4jccDo7WH7TtOG8IofuJTPRu1Duda6k4RN0I0CkyAN6LGX+zy49cq0qKf9ijXYhCDYNih3+Fu/ig0aW/SYmsVoUl2VFTWdI5x5/wLvIjTEZhmAtYIeYADaLnom356cFrUysZa++FUujQAz3Ow236BvP95XZdTsqvfWNZFNIpC9VYF72JeIDCs5wDIr0GFmanF2On1nar+jJpoOE8SdHt357p5g/PqXV5TisN2xQRkqVwO9tWtMl4sF84jA4ULnY2gQWv9jErMxymUQ1IwuPUzDDlbRHCtfexAtkBy7wv6xslKAzG1QahvF/btNs5Caj3LN31rgAuxyooCbKGKTeBP3kHPKcz1iupgidfbO/QqVXBRQJTEdGyAKa8hVmLQZZPC/XUhxESAk= fw@fw-nix"
];
};
openssh.authorizedKeys = {
keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDALsdpwvC0w/Aj+1fWtzJyyWoUrGkdh8o2thVHeQQBNo0D7cmVberYmi4Cv9gWGX6PaElrnOl0KRdGyro2wxOYokSxgk2VgWW67BFITAQAbKyG2NhXXPbhb4jccDo7WH7TtOG8IofuJTPRu1Duda6k4RN0I0CkyAN6LGX+zy49cq0qKf9ijXYhCDYNih3+Fu/ig0aW/SYmsVoUl2VFTWdI5x5/wLvIjTEZhmAtYIeYADaLnom356cFrUysZa++FUujQAz3Ow236BvP95XZdTsqvfWNZFNIpC9VYF72JeIDCs5wDIr0GFmanF2On1nar+jJpoOE8SdHt357p5g/PqXV5TisN2xQRkqVwO9tWtMl4sF84jA4ULnY2gQWv9jErMxymUQ1IwuPUzDDlbRHCtfexAtkBy7wv6xslKAzG1QahvF/btNs5Caj3LN31rgAuxyooCbKGKTeBP3kHPKcz1iupgidfbO/QqVXBRQJTEdGyAKa8hVmLQZZPC/XUhxESAk= fw@fw-nix"
];
};
};
max = {
initialPassword = "password";

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,48 +7,37 @@
pkgs,
myhostname,
...
}: {
# You can import other NixOS modules here
imports = [
./hardware-configuration.nix
../../config/base.nix
../../config/users.nix
];
}:
{
# You can import other NixOS modules here
imports = [
./hardware-configuration.nix
../../config/base.nix
../../config/users.nix
];
networking.hostName = myhostname;
networking.hostName = myhostname;
environment.systemPackages = with pkgs; [
dotnet-sdk_8
];
environment.systemPackages = with pkgs; [
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 ];
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
X11Forwarding = true;
};
extraConfig = ''
AllowUsers fw
'';
};
};
services.xserver.dpi = 140;
services = {
openssh = {
enable = true;
ports = [55504];
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
X11Forwarding = true;
};
extraConfig = ''
AllowUsers fw
'';
};
};
system.stateVersion = "23.11";
system.stateVersion = "23.11";
}

View file

@ -7,22 +7,31 @@
pkgs,
myhostname,
...
}: {
}:
{
# You can import other NixOS modules here
imports = [
./hardware-configuration.nix
../../config/base.nix
../../shared/openssh.nix
../../jobb/users.nix
../../config/base.nix
../../shared/openssh.nix
../../jobb/users.nix
];
environment.systemPackages = with pkgs; [
kubectl
azure-cli
];
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,21 +17,25 @@ let
xorg.libXinerama
];
});
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: {
src = builtins.fetchGit {
url = "https://github.com/FredzyW/dwmblocks.git";
rev = "ec1b1a61a80e0ba92842e5117736ff977bb6cfa5";
};
});
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: {
src = builtins.fetchGit {
url = "https://github.com/FredzyW/dwmblocks.git";
rev = "ec1b1a61a80e0ba92842e5117736ff977bb6cfa5";
};
});
in
{
home.packages = [ dwm dwmblocks ];
home.packages = [
dwm
dwmblocks
];
}

View file

@ -6,15 +6,15 @@
isDefault = true;
userChrome = ''
@import "${
builtins.fetchGit {
url = "https://github.com/rockofox/firefox-minima";
ref = "main";
rev = "dc40a861b24b378982c265a7769e3228ffccd45a"; # <-- Change this
}
}/userChrome.css";
'';
builtins.fetchGit {
url = "https://github.com/rockofox/firefox-minima";
ref = "main";
rev = "dc40a861b24b378982c265a7769e3228ffccd45a"; # <-- Change this
}
}/userChrome.css";
'';
settings = {
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
};
};
};

View file

@ -1,76 +1,78 @@
{ pkgs, ... }:
{
programs.fish = {
enable = true;
plugins = [
{
name = "z";
src = pkgs.fetchFromGitHub {
owner = "jethrokuan";
repo = "z";
rev = "e0e1b9dfdba362f8ab1ae8c1afc7ccf62b89f7eb";
sha256 = "0dbnir6jbwjpjalz14snzd3cgdysgcs3raznsijd6savad3qhijc";
};
}
{
name = "autopair";
src = pkgs.fishPlugins.autopair.src;
}
{
name = "foreign-env";
src = pkgs.fishPlugins.foreign-env.src;
}
{
name = "fzf";
src = pkgs.fishPlugins.fzf.src;
}
{
name = "done";
src = pkgs.fishPlugins.done.src;
}
{
name = "sponge";
src = pkgs.fishPlugins.sponge.src;
}
{
name = "grc";
src = pkgs.fishPlugins.grc.src;
}
];
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'";
};
interactiveShellInit = ''
fish_vi_key_bindings
set fish_greeting # Disable greeting
set FLAKE_DIR "/home/fw/nix"
set HM_DIR "$FLAKE_DIR#fw@jobb"
set SYSTEM_DIR "$FLAKE_DIR#jobb"
set -Ux FZF_CTRL_R_OPTS "--reverse"
set -Ux FZF_TMUX_OPTS "-p"
set -e GOROOT
set -e GOPATH
programs.fish = {
enable = true;
plugins = [
{
name = "z";
src = pkgs.fetchFromGitHub {
owner = "jethrokuan";
repo = "z";
rev = "e0e1b9dfdba362f8ab1ae8c1afc7ccf62b89f7eb";
sha256 = "0dbnir6jbwjpjalz14snzd3cgdysgcs3raznsijd6savad3qhijc";
};
}
{
name = "autopair";
src = pkgs.fishPlugins.autopair.src;
}
{
name = "foreign-env";
src = pkgs.fishPlugins.foreign-env.src;
}
{
name = "fzf";
src = pkgs.fishPlugins.fzf.src;
}
{
name = "done";
src = pkgs.fishPlugins.done.src;
}
{
name = "sponge";
src = pkgs.fishPlugins.sponge.src;
}
{
name = "grc";
src = pkgs.fishPlugins.grc.src;
}
];
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";
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
set fish_greeting # Disable greeting
set FLAKE_DIR "/home/fw/nix"
set HM_DIR "$FLAKE_DIR#fw@jobb"
set SYSTEM_DIR "$FLAKE_DIR#jobb"
set -Ux FZF_CTRL_R_OPTS "--reverse"
set -Ux FZF_TMUX_OPTS "-p"
set -e GOROOT
set -e GOPATH
# Mocha
set -Ux FZF_DEFAULT_OPTS "\
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
--color=marker:#b4befe,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 \
--color=selected-bg:#45475a \
--multi"
'';
};
# Mocha
set -Ux FZF_DEFAULT_OPTS "\
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
--color=marker:#b4befe,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 \
--color=selected-bg:#45475a \
--multi"
'';
};
}

View file

@ -1,18 +1,27 @@
{ pkgs, lib, myhostname, ... }:
{
pkgs,
lib,
myhostname,
...
}:
{
programs.kitty = {
enable = true;
font = if myhostname == "laptop" then {
# name = "Iosevka Nerd Font Bold";
# name = "ComicShannsMono Nerd Font Bold";
name = "Hack Nerd Font Mono Bold";
size = 15;
} else {
# name = "Iosevka Nerd Font Bold";
# name = "ComicShannsMono Nerd Font Bold";
name = "Hack Nerd Font Mono Bold";
size = 12;
};
font =
if myhostname == "laptop" then
{
# name = "Iosevka Nerd Font Bold";
# name = "ComicShannsMono Nerd Font Bold";
name = "Hack Nerd Font Mono Bold";
size = 15;
}
else
{
# name = "Iosevka Nerd Font Bold";
# name = "ComicShannsMono Nerd Font Bold";
name = "Hack Nerd Font Mono Bold";
size = 12;
};
shellIntegration = {
mode = "no-cursor";
};

View file

@ -1,16 +1,16 @@
{ config, pkgs, ...}:
{ config, pkgs, ... }:
{
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
AuthenticationMethods = "publickey password";
TrustedUserCAKeys = "/etc/ssh/ssh_ca.pub";
Banner = "none";
PasswordAuthentication = true;
# PasswordAuthentication = false;
PubKeyAuthentication = true;
Port = 22;
};
enable = true;
settings = {
AuthenticationMethods = "publickey password";
TrustedUserCAKeys = "/etc/ssh/ssh_ca.pub";
Banner = "none";
PasswordAuthentication = true;
# PasswordAuthentication = false;
PubKeyAuthentication = true;
Port = 22;
};
};
}

View file

@ -38,7 +38,7 @@
port = 22;
user = "ifacts";
identityFile = "/home/fw/.ssh/ifacts-ssh-key";
};
};
"kobo" = {
hostname = "192.168.1.192";
port = 22;
@ -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

@ -4,32 +4,39 @@
enable = true;
mouse = true;
plugins = with pkgs; [
tmuxPlugins.sensible
tmuxPlugins.pain-control
tmuxPlugins.sessionist
{
plugin = tmuxPlugins.continuum;
extraConfig = ''
set -g @continuum-boot 'on'
set -g @continuum-restore 'on'
'';
}
{
plugin = fw-pkgs.tmuxPlugins.minimal;
extraConfig = ''
bind-key b set-option status
'';
}
tmuxPlugins.sensible
tmuxPlugins.pain-control
tmuxPlugins.sessionist
{
plugin = tmuxPlugins.continuum;
extraConfig = ''
set -g @continuum-boot 'on'
set -g @continuum-restore 'on'
'';
}
{
plugin = fw-pkgs.tmuxPlugins.minimal;
extraConfig = ''
bind-key b set-option status
'';
}
];
prefix = "C-a";
terminal = "alacritty";
keyMode = "vi";
escapeTime = 0;
escapeTime = 0;
extraConfig = ''
set -g base-index 1
setw -g pane-base-index 1
set-option -ga terminal-overrides ",alacritty:Tc"
set -g base-index 1
setw -g pane-base-index 1
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'
'';
};
}