mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-28 14:50:55 +01:00
Added user setup
This commit is contained in:
parent
42cd7bb365
commit
91361e1910
6 changed files with 64 additions and 51 deletions
21
base.nix
Normal file
21
base.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
imports = [ ./users/julien.nix ];
|
||||||
|
luj.nix.enable = true;
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Paris";
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
console = {
|
||||||
|
font = "Lat2-Terminus16";
|
||||||
|
keyMap = "fr";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,37 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
nix = {
|
|
||||||
autoOptimiseStore = true;
|
|
||||||
allowedUsers = [ "julien" ];
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "daily";
|
|
||||||
};
|
|
||||||
package = pkgs.nixUnstable;
|
|
||||||
extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Paris";
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
console = {
|
|
||||||
font = "Lat2-Terminus16";
|
|
||||||
keyMap = "fr";
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.julien = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
home = "/home/julien";
|
|
||||||
shell = pkgs.fish;
|
|
||||||
};
|
|
||||||
|
|
||||||
#boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
24
flake.lock
generated
24
flake.lock
generated
|
@ -38,11 +38,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1638959036,
|
"lastModified": 1639223729,
|
||||||
"narHash": "sha256-d75Ow/rV3nq4penfTJz9H3/OlIHttoKoJUDEfink/8k=",
|
"narHash": "sha256-C+OYsFVCNZwzQ4ShMBTJaFS489auGr42cDrceckKpXc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "829e89a16f4f96428d1b94e68d4c06107b5491c0",
|
"rev": "6fe3b539e057feadbf94e845412f4b438260690b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -74,11 +74,11 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "contrib",
|
"dir": "contrib",
|
||||||
"lastModified": 1639103355,
|
"lastModified": 1639175880,
|
||||||
"narHash": "sha256-wWnqc8isaB4QX+zHV3WDYw5FbAUKb7rZuvMKDrNFtnI=",
|
"narHash": "sha256-G2O/ViPfnLYCA/GriyN1HdIdU5COSCF1SVGSy1TGB+I=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "ac2d140a33dfe88f882218e15a443b8300cca6b2",
|
"rev": "3f8703093de56254ffdbf8ef6ddbe7942af54257",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -95,11 +95,11 @@
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1639124025,
|
"lastModified": 1639210387,
|
||||||
"narHash": "sha256-okHiC/RiJYq9C37JVpiuGE8KPiud3OAzFGSX8+i7E/Q=",
|
"narHash": "sha256-5HiroEpFRN5tG88X5ZWM7K+Pr2Q5bYmzJhgKVVbbhYg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "f85eb1d7a4512c63725dbf03737269f3544dccb2",
|
"rev": "f38af8005370113e959c111ec8723450bb50f8b8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -158,11 +158,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1639134982,
|
"lastModified": 1639213198,
|
||||||
"narHash": "sha256-iBa3GjvmEKn26FNp1TTwYp8pxwleczC7G6zkXf1A79U=",
|
"narHash": "sha256-yo7yibkdqey6jAJZVT8h01H9fnFHc1e/MkP0OnfeHJA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "65887ad64ee3adef81b6efbc6d4361a40c5aebe0",
|
"rev": "119cb1d52853c245666eaef9dfb1a11b4b6eb48d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
28
modules/nix/default.nix
Normal file
28
modules/nix/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.luj.nix;
|
||||||
|
in
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
options.luj.nix = {
|
||||||
|
enable = mkEnableOption "Enable nix experimental";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable
|
||||||
|
{
|
||||||
|
nix = {
|
||||||
|
autoOptimiseStore = true;
|
||||||
|
allowedUsers = [ "julien" ];
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "daily";
|
||||||
|
};
|
||||||
|
package = pkgs.nixUnstable;
|
||||||
|
extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,11 +3,12 @@
|
||||||
users.users.julien = {
|
users.users.julien = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
home = "/home/julien";
|
home = "/home/julien";
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
openssh.authorizedKeys.keyFiles = [
|
openssh.authorizedKeys.keyFiles = [
|
||||||
(pkgs.fetchurl {
|
(pkgs.fetchurl {
|
||||||
url = "https://github.com/JulienMalka.keys";
|
url = "https://github.com/JulienMalka.keys";
|
||||||
sha256 = "sha256:0lhvhdrzp2vphqhkcgl34xzn0sill6w7mgq8xh1akm1z1rsvd9v4";
|
sha256 = "sha256:d9IujbXim6tE3RYdwPwqRVMOEmRW/gbDkHlYn/QnG0w=";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,7 +12,7 @@ in
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
};
|
};
|
||||||
modules = builtins.attrValues modules ++ [
|
modules = builtins.attrValues modules ++ [
|
||||||
./configuration.nix
|
./base.nix
|
||||||
host-config
|
host-config
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue